(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TMP)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<mktemp>} {<-d>} {<'/tmp/mtree.XXXXXX'>})
              )
            }
          spids: [19]
        )
      ]
    )
    (C {<mkdir>} {<-p>} {(${ Id.VSub_Name TMP) <'/mr'>} {(${ Id.VSub_Name TMP) <'/mr/optional-dir'>} 
      {(${ Id.VSub_Name TMP) <'/mr/some-dir'>}
    )
    (C {<touch>} {(${ Id.VSub_Name TMP) <'/mr/optional-file'>} {(${ Id.VSub_Name TMP) <'/mr/some-file'>})
    (command.Simple
      words: [{<mtree>} {<-c>} {<-p>} {(${ Id.VSub_Name TMP) <'/mr'>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name TMP) <'/_'>}
        )
      ]
      do_fork: T
    )
    (C {<rm>} {<-rf>} {(${ Id.VSub_Name TMP) <'/mr/optional-file'>} 
      {(${ Id.VSub_Name TMP) <'/mr/optional-dir'>}
    )
    (command.Simple
      words: [{<mtree>} {<-p>} {(${ Id.VSub_Name TMP) <'/mr'>} {<-K>} {<optional>}]
      redirects: [
        (redir
          op: <Id.Redir_Less '<'>
          loc: (redir_loc.Fd fd:0)
          arg: {(${ Id.VSub_Name TMP) <'/_'>}
        )
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})
      ]
      do_fork: T
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:res)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '$?')}
          spids: [119]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$res')} {<-ne>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'ERROR \'optional\' keyword failed'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (C {<rm>} {<-rf>} {(${ Id.VSub_Name TMP)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [123 137]
        )
      ]
    )
    (C {<rm>} {<-rf>} {(${ Id.VSub_Name TMP)})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)