(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIT_BINARY)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [4]
        )
      ]
    )
    (C {<shift>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIT_ARGS)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_At '$@'))}
          spids: [11]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<test>} {(DQ <x> ($ Id.VSub_DollarName '$OBJ'))} {<Id.Lit_Equals '='>} {(DQ <x>)})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:OBJ)
              op: assign_op.Equal
              rhs: {($ Id.VSub_DollarName '$PWD')}
              spids: [32]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VG_TEST)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<basename>} {($ Id.VSub_DollarName '$UNIT_BINARY')})
              )
            }
          spids: [42]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VG_LOG)
          op: assign_op.Equal
          rhs: 
            {(DQ ($ Id.VSub_DollarName '$OBJ') <'/valgrind-out/'> (${ Id.VSub_Name VG_TEST) <'.%p'>)}
          spids: [51]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VG_OPTS)
          op: assign_op.Equal
          rhs: {(DQ <'--track-origins=yes --leak-check=full --log-file='> (${ Id.VSub_Name VG_LOG))}
          spids: [61]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VG_OPTS)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$VG_OPTS') <' --trace-children=yes'>)}
          spids: [69]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VG_PATH)
          op: assign_op.Equal
          rhs: {(DQ <valgrind>)}
          spids: [75]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$VALGRIND_PATH'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:VG_PATH)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$VALGRIND_PATH'))}
                  spids: [102]
                )
              ]
            )
          ]
          spids: [80 99]
        )
      ]
    )
    (C {<exec>} {($ Id.VSub_DollarName '$VG_PATH')} {($ Id.VSub_DollarName '$VG_OPTS')} 
      {($ Id.VSub_DollarName '$UNIT_BINARY')} {($ Id.VSub_DollarName '$UNIT_ARGS')}
    )
  ]
)