(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (-d))} 
              {(Lit_Other ']')}
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DELETE) op:Equal rhs:{(1)} spids:[28])]
              spids: [28]
            )
            (C {(shift)})
          ]
          spids: [16777215 25]
        )
      ]
      spids: [16777215 34]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:ZAP)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (SimpleCommand
                        words: [{(readlink)} {(-f)} {(DQ ($ VSub_Number '$1'))}]
                        redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[51])]
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [42 53]
              )
            }
          spids: [41]
        )
      ]
      spids: [41]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$ZAP'))} {(Lit_Other ']')})
          ]
          action: [
            (C {(echo)} {(DQ ('usage: zapchroot [-d] dirname'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 70]
        )
      ]
      spids: [16777215 84]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:i)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(readlink)} {(-f)} 
                          {
                            (DQ 
                              (CommandSubPart
                                command_list: (CommandList children:[(C {(pwd)})])
                                left_token: <Left_CommandSub '$('>
                                spids: [95 97]
                              )
                            )
                          }
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [89 99]
                )
              )
            }
          spids: [87]
        )
      ]
      spids: [87]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ZAP'))} {(Lit_Other '=') (Lit_Other '=')} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name i>
                    suffix_op: 
                      (Slice
                        begin: (ArithWord w:{(Lit_Digits 0)})
                        length: 
                          (ArithWord
                            w: 
                              {
                                (BracedVarSub
                                  token: <VSub_Name ZAP>
                                  prefix_op: VSub_Pound
                                  spids: [119 122]
                                )
                              }
                          )
                      )
                    spids: [114 123]
                  )
                )
              } {(Lit_Other ']')}
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Sanity check failed: cwd is under zapdir'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[137])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 128]
        )
      ]
      spids: [16777215 145]
    )
    (ForEach
      iter_name: i
      iter_words: [
        {
          (CommandSubPart
            command_list: 
              (CommandList
                children: [
                  (Pipeline
                    children: [(C {(awk)} {(SQ <'{print $2}'>)} {(/proc/mounts)}) (C {(tac)})]
                    negated: F
                  )
                ]
              )
            left_token: <Left_CommandSub '$('>
            spids: [158 170]
          )
        }
      ]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:i)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(echo)} {(-e)} {(DQ ($ VSub_Name '$i'))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [180 188]
                      )
                    }
                  spids: [179]
                )
              ]
              spids: [179]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ZAP'))} {(KW_Bang '!') (Lit_Other '=')} 
                  {
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Name i>
                        suffix_op: 
                          (Slice
                            begin: (ArithWord w:{(Lit_Digits 0)})
                            length: 
                              (ArithWord
                                w: 
                                  {
                                    (BracedVarSub
                                      token: <VSub_Name ZAP>
                                      prefix_op: VSub_Pound
                                      spids: [211 214]
                                    )
                                  }
                              )
                          )
                        spids: [206 215]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (ControlFlow token:<ControlFlow_Continue continue>)
              ]
            )
            (C {(echo)} {(DQ ('Umounting: ') ($ VSub_Name '$i'))})
            (C {(umount)} {(DQ ($ VSub_Name '$i'))})
          ]
          spids: [172 240]
        )
      spids: [157 16777215]
    )
  ]
)