(command.CommandList
  children: [
    (C {<set>} {<-e>})
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:common_objpfx)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [54]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<shift>})
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:test_program_prefix_before_env)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [60]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<shift>})
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:run_program_env)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [66]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<shift>})
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:test_program_prefix_after_env)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [72]
                )
              ]
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<shift>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:status)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [79]
        )
      ]
    )
    (C {<trap>} {(DQ <'rm -f '> (${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace.leak; exit 1'>)} 
      {<1>} {<2>} {<15>}
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(${ Id.VSub_Name test_program_prefix_before_env)} {(${ Id.VSub_Name run_program_env)} 
          {<Id.Lit_VarLike 'MALLOC_TRACE='> (${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace.leak'>} {(${ Id.VSub_Name test_program_prefix_after_env)} 
          {(${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace'>}
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:status)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [129]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<test>} {($ Id.VSub_DollarName '$status')} {<-eq>} {<0>})
                        (C {<test>} {<-f>} {(${ Id.VSub_Name common_objpfx) <'malloc/mtrace'>})
                      ]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(${ Id.VSub_Name common_objpfx) <'malloc/mtrace'>}
                    {(${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace.leak'>}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace.out'>}
                    )
                  ]
                  do_fork: T
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:status)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [178]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [133 155]
        )
      ]
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name common_objpfx) <'malloc/tst-mtrace.leak'>})
    (command.ControlFlow
      token: <Id.ControlFlow_Exit exit>
      arg_word: {($ Id.VSub_DollarName '$status')}
    )
  ]
)