(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-lt>} {<1>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(SQ <'Specify binary to run as the first argument'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [4 18]
        )
      ]
    )
    (command.ForEach
      iter_name: _tin
      iter_words: [{(${ Id.VSub_Name TEST_DIR) <'/'> <Id.Lit_Star '*'> <.in>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_t)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$_tin')})
                              (C {<sed>} {<-e>} {(SQ <'s/.in$//'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [54]
                )
              ]
            )
            (C {($ Id.VSub_Number '$1')} {($ Id.VSub_DollarName '$_t') <.in>} 
              {($ Id.VSub_DollarName '$_t') <.out>}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Test: '> ($ Id.VSub_DollarName '$_t') <' failed, output:'>)})
                    (C {<cat>} {($ Id.VSub_DollarName '$_t') <.out>})
                    (C {<rm>} {($ Id.VSub_DollarName '$_t') <.out>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [83 97]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$_t') <.res>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<diff>}
                        {<-s>}
                        {($ Id.VSub_DollarName '$_t') <.out>}
                        {($ Id.VSub_DollarName '$_t') <.res>}
                        {<-u>}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '2>'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<rm>} {($ Id.VSub_DollarName '$_t') <.out>})
                            (C {<echo>} 
                              {(DQ <'Test: '> ($ Id.VSub_DollarName '$_t') <' output missmatch'>)}
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [161 175]
                        )
                      ]
                    )
                  ]
                  spids: [129 142]
                )
              ]
            )
            (C {<rm>} {($ Id.VSub_DollarName '$_t') <.out>})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<2>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {($ Id.VSub_Number '$3')} {(${ Id.VSub_Name TEST_DIR) <'/generate.out'>})
            (command.Simple
              words: [
                {<diff>}
                {<-s>}
                {(${ Id.VSub_Name TEST_DIR) <'/generate.out'>}
                {(${ Id.VSub_Name TEST_DIR) <'/generate.res'>}
                {<-u>}
              ]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<rm>} {(${ Id.VSub_Name TEST_DIR) <'/generate.out'>})
                    (C {<echo>} {(DQ <'Test: generate.res output missmatch'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [257 271]
                )
              ]
            )
            (C {<rm>} {(${ Id.VSub_Name TEST_DIR) <'/generate.out'>})
          ]
          spids: [212 226]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<3>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [(C {<rm>} {<'/tmp/_ucl_test_schema.out'>}) (C {<true>})]
            )
            (command.ForEach
              iter_name: i
              iter_words: [{(${ Id.VSub_Name TEST_DIR) <'/schema/'> <Id.Lit_Star '*'> <.json>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_name)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<basename>} {($ Id.VSub_DollarName '$i')})
                              )
                            }
                          spids: [350]
                        )
                      ]
                    )
                    (C {<printf>} 
                      {(DQ <'running schema test suite '> ($ Id.VSub_DollarName '$_name') <'... '>)}
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp Id.Op_DPipe]
                      children: [
                        (command.Pipeline
                          children: [
                            (C {<cat>} {($ Id.VSub_DollarName '$i')})
                            (command.Simple
                              words: [{($ Id.VSub_Number '$4')}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/tmp/_ucl_test_schema.out'>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          negated: F
                        )
                        (command.Subshell child:(C {<echo>} {(DQ <OK>)}))
                        (command.Subshell child:(C {<echo>} {(DQ <Fail>)}))
                      ]
                    )
                  ]
                )
            )
          ]
          spids: [307 321]
        )
      ]
    )
    (C {<sh>} {<-c>} {(DQ <'xz -c < /dev/null > /dev/null'>)})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<-a>} 
                      {($ Id.VSub_Pound '$#')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(SQ <'Running speed tests'>)})
            (command.ForEach
              iter_name: _tin
              iter_words: [{(${ Id.VSub_Name TEST_DIR) <'/'> <Id.Lit_Star '*'> <.xz>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<echo>} {(DQ <'Unpacking '> ($ Id.VSub_DollarName '$_tin') <...>)})
                    (command.Simple
                      words: [{<xz>} {<-cd>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {($ Id.VSub_DollarName '$_tin')}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name TEST_DIR) <'/test_file'>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      words: [{<cat>} {(${ Id.VSub_Name TEST_DIR) <'/test_file'>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<echo>} 
                      {(DQ <'Starting benchmarking for '> ($ Id.VSub_DollarName '$_tin') <...>)}
                    )
                    (C {($ Id.VSub_Number '$2')} {(${ Id.VSub_Name TEST_DIR) <'/test_file'>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {(DQ <'Test: '> ($ Id.VSub_DollarName '$_tin') <' failed'>)})
                            (C {<rm>} {(${ Id.VSub_Name TEST_DIR) <'/test_file'>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [527 541]
                        )
                      ]
                    )
                    (C {<rm>} {(${ Id.VSub_Name TEST_DIR) <'/test_file'>})
                  ]
                )
            )
          ]
          spids: [419 441]
        )
      ]
    )
  ]
)