(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SRCDIR)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>}))}
          spids: [82]
        )
      ]
    )
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.Sentence
              child: (C {<local>} {<Id.Lit_VarLike 'tc='> (${ Id.VSub_Number 1)})
              terminator: <Id.Op_Semi _>
            )
            (C {<shift>})
            (command.Sentence
              child: (C {<local>} {<Id.Lit_VarLike 'xo_fmt='> (${ Id.VSub_Number 1)})
              terminator: <Id.Op_Semi _>
            )
            (C {<shift>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:XO)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<atf_config_get>} {<usr.bin.xo.test_xo>} {<'/usr/bin/xo'>})
                      )
                    }
                  spids: [118]
                )
              ]
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'err_file='> 
                (DQ (${ Id.VSub_Name SRCDIR) <'/'> (${ Id.VSub_Name tc) 
                  (braced_var_sub
                    token: <Id.VSub_Name xo_fmt>
                    suffix_op: 
                      (suffix_op.Unary
                        tok: <Id.VTest_ColonPlus ':+'>
                        arg_word: {<.> (${ Id.VSub_Name xo_fmt)}
                      )
                  ) <.err>
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-s>} {(DQ (${ Id.VSub_Name err_file))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:err_flag)
                      op: assign_op.Equal
                      rhs: {(DQ <'-e file:'> (${ Id.VSub_Name err_file))}
                      spids: [166]
                    )
                  ]
                )
              ]
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'out_file='> 
                (DQ (${ Id.VSub_Name SRCDIR) <'/'> (${ Id.VSub_Name tc) 
                  (braced_var_sub
                    token: <Id.VSub_Name xo_fmt>
                    suffix_op: 
                      (suffix_op.Unary
                        tok: <Id.VTest_ColonPlus ':+'>
                        arg_word: {<.> (${ Id.VSub_Name xo_fmt)}
                      )
                  ) <.out>
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-s>} {(DQ (${ Id.VSub_Name out_file))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:out_flag)
                      op: assign_op.Equal
                      rhs: {(DQ <'-o file:'> (${ Id.VSub_Name out_file))}
                      spids: [212]
                    )
                  ]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-e>} 
              {<file> <Id.Lit_Colon ':'> (${ Id.VSub_Name err_file)} {<-o>} {<file> <Id.Lit_Colon ':'> (${ Id.VSub_Name out_file)} {<env>} 
              {<Id.Lit_VarLike 'LC_ALL='> <en_US.UTF-8>} {<Id.Lit_VarLike 'TZ='> (DQ <EST>)} {(DQ (${ Id.VSub_Name SRCDIR) <'/'> (${ Id.VSub_Name tc))} 
              {(DQ (${ Id.VSub_Name XO) <' --libxo:W'> (${ Id.VSub_Name xo_fmt))}
            )
          ]
        )
    )
    (command.ShFunction
      name: add_testcase
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'tc='> (${ Id.VSub_Number 1)})
            (C {<local>} {<tc_escaped>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:oldIFS)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$IFS')}
                  spids: [306]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {(SQ <.>)}
                  spids: [310]
                )
              ]
            )
            (C {<set>} {<-->} {($ Id.VSub_DollarName '$tc')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tc_script)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Number 1)}
                  spids: [323]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<3>} {<Id.Lit_RBracket ']'>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:xo_fmt)
                      op: assign_op.Equal
                      rhs: {(${ Id.VSub_Number 2)}
                      spids: [341]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$oldIFS')}
                  spids: [350]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tc_escaped)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ (${ Id.VSub_Name tc_script) 
                        (braced_var_sub
                          token: <Id.VSub_Name xo_fmt>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VTest_ColonPlus ':+'>
                              arg_word: {<__> (${ Id.VSub_Name xo_fmt)}
                            )
                        )
                      )
                    }
                  spids: [354]
                )
              ]
            )
            (C {<atf_test_case>} {(${ Id.VSub_Name tc_escaped)})
            (C {<eval>} 
              {
                (DQ (${ Id.VSub_Name tc_escaped) <'_body() { check '> (${ Id.VSub_Name tc_script) <' '> 
                  (${ Id.VSub_Name xo_fmt) <'; }'>
                )
              }
            )
            (C {<atf_add_test_case>} {(${ Id.VSub_Name tc_escaped)})
          ]
        )
    )
    (command.ShFunction
      name: atf_init_test_cases
      body: 
        (BraceGroup
          children: [
            (command.ForEach
              iter_name: path
              iter_words: [
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (C {<find>} {<-Es>} {(DQ (${ Id.VSub_Name SRCDIR))} {<-name>} {(SQ <'*.out'>)})
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<add_testcase>} 
                      {
                        (braced_var_sub
                          token: <Id.VSub_Name path>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_DPound '##'>
                              arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>}
                            )
                        )
                      }
                    )
                  ]
                )
            )
          ]
        )
    )
  ]
)