(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:JOBS)
          op: Equal
          rhs: 
            {
              (ArithSubPart
                anode: 
                  (ArithBinary
                    op_id: Arith_Minus
                    left: 
                      (ArithWord
                        w: 
                          {
                            (CommandSubPart
                              command_list: (CommandList children:[(C {(nproc)})])
                              left_token: <Left_CommandSub '$('>
                              spids: [41 43]
                            )
                          }
                      )
                    right: (ArithWord w:{(Lit_Digits 1)})
                  )
                spids: [39 50]
              )
            }
          spids: [38]
        )
      ]
      spids: [36]
    )
    (FuncDef
      name: log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[66])]
            )
          ]
          spids: [57]
        )
      spids: [53 56]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (C {(log)} {(DQ ($ VSub_At '$@'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [76]
        )
      spids: [72 75]
    )
    (FuncDef
      name: fail
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(SQ <'TEST FAILURE  '>)} {(DQ ($ VSub_At '$@'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [97]
        )
      spids: [93 96]
    )
    (FuncDef
      name: run-task-with-status
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_file)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [127]
                )
              ]
              spids: [125]
            )
            (C {(shift)})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(/usr/bin/env)} {(KW_Time time)} {(--output)} {($ VSub_Name '$out_file')} {(--format)} 
                  {(SQ <'%x %e'>)} {(--)} {(DQ ($ VSub_At '$@'))}
                )
                (C {(true)})
              ]
            )
            (C {(sed)} {(-i)} {(SQ <'/Command exited with non-zero status/d'>)} 
              {($ VSub_Name '$out_file')}
            )
          ]
          spids: [122]
        )
      spids: [118 121]
    )
    (FuncDef
      name: run-task-with-status-test
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(run-task-with-status)} {(_tmp/status.txt)} {(sh)} {(-c)} {(SQ <'sleep 0.1; exit 1'>)})
                (C {(true)})
              ]
            )
            (C {(cat)} {(_tmp/status.txt)})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (SimpleCommand
                                words: [{(wc)} {(-l)}]
                                redirects: [
                                  (Redir
                                    op_id: Redir_Less
                                    fd: 16777215
                                    arg_word: {(_tmp/status.txt)}
                                    spids: [249]
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [244 252]
                      )
                    )
                  } {(Lit_Other '=')} {(SQ <1>)}
                )
                (C {(die)} {(DQ ('Expected only one line'))})
              ]
            )
          ]
          spids: [216]
        )
      spids: [212 215]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number '$0')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [277 281]
                      )
                    )
                  } {(Lit_Other '=')} {(SQ <common.sh>)}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(DQ ($ VSub_At '$@'))})]
          spids: [16777215 291]
        )
      ]
      spids: [16777215 298]
    )
  ]
)