(CommandList
  children: [
    (C {(set)} {(-o)} {(errexit)})
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:opt_flag)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Number 1>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{})
                spids: [34 37]
              )
            }
          spids: [33]
        )
      ]
      spids: [33]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name opt_flag))} {(Lit_Other "]")})
        (AndOr
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ("No command supplied"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[59])]
            )
            (C {(exit)} {(1)})
          ]
          op_id: Op_DAmp
        )
      ]
      op_id: Op_DAmp
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} {(DQ (${ VSub_Name opt_flag))} {(Lit_Other "=") (Lit_Other "=")} 
                  {(DQ (-t))} {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(shift)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:prefix)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{})
                        spids: [96 99]
                      )
                    }
                  spids: [95]
                )
              ]
              spids: [95]
            )
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name prefix))} {(Lit_Other "]")})
                (AndOr
                  children: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ("No prefix supplied"))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[122])]
                    )
                    (C {(exit)} {(1)})
                  ]
                  op_id: Op_DAmp
                )
              ]
              op_id: Op_DAmp
            )
            (C {(shift)})
          ]
          spids: [-1 89]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:prefix) op:Equal rhs:{(SQ <temp>)} spids:[137])]
          spids: [137]
        )
      ]
      spids: [134 142]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:cmd)
          op: Equal
          rhs: {(DQ ($ VSub_Number "$1"))}
          spids: [145]
        )
      ]
      spids: [145]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name cmd))} {(Lit_Other "]")})
        (AndOr
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ("No command supplied"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[170])]
            )
            (C {(exit)} {(1)})
          ]
          op_id: Op_DAmp
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:workspace)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(mktemp)} {(-d)} 
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TMPDIR>
                              suffix_op: 
                                (StringUnary
                                  op_id: VTest_ColonHyphen
                                  arg_word: {(Lit_Slash /) (tmp)}
                                )
                              spids: [187 192]
                            ) (/) (${ VSub_Name prefix) (.XXXXXX)
                          )
                        }
                      )
                    ]
                  )
                left_token: <Left_CommandSub "$(">
                spids: [181 199]
              )
            }
          spids: [180]
        )
      ]
      spids: [180]
    )
    (SimpleCommand
      words: [{(echo)} {(DQ ("Workspace created: ") (${ VSub_Name workspace))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[210])]
    )
    (FuncDef
      name: cleanup
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              flags: ["'-r'"]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:workspace)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number "$1"))}
                  spids: [225]
                )
              ]
              spids: [221]
            )
            (C {(rm)} {(-rf)} {(DQ (${ VSub_Name workspace))})
            (SimpleCommand
              words: [{(echo)} {(DQ ("Workspace deleted: ") (${ VSub_Name workspace))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[251])]
            )
          ]
          spids: [218]
        )
      spids: [214 217]
    )
    (C {(trap)} {(DQ ("cleanup '") (${ VSub_Name workspace) ("'"))} {(EXIT)})
    (SimpleCommand
      words: [{(pushd)} {(DQ (${ VSub_Name workspace))}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[277])]
    )
    (C {(bash)} {(-ceu)} {(DQ (${ VSub_Name cmd))})
    (SimpleCommand
      words: [{(popd)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[293])]
    )
    (C {(trap)} {(-)} {(EXIT)})
    (C {(cleanup)} {(DQ (${ VSub_Name workspace))})
  ]
)