(command.CommandList
  children: [
    (C {(set)} {(-x)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:MOUNTPOINT spids:[17])
          op: Equal
          rhs: {(DQ ($ VSub_Number '$1'))}
          spids: [17]
        )
      ]
      spids: [17]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$MOUNTPOINT'))} {(Lit_Other ']')})
        (C {(echo)} {(DQ ('No mountpoint specified'))})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
      ]
    )
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$MOUNTPOINT'))})
    (command.FuncDef
      name: mount_drive
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:DEVS spids:[68])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(find)} {(/dev)} {(-maxdepth)} {(1)} {(-type)} {(b)} {(KW_Bang '!')} 
                                      {(-name)} {(SQ <'loop*'>)} {(KW_Bang '!')} {(-name)} {(SQ <'nbd*'>)}
                                    )
                                    (C {(grep)} {(-v)} {(SQ <'[0-9]$'>)})
                                    (C {(sed)} {(SQ <'s@.*/dev/@@'>)})
                                    (C {(sort)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [70 120]
                        )
                      )
                    }
                  spids: [68]
                )
              ]
              spids: [68]
            )
            (command.ForEach
              iter_name: DEV
              iter_words: [{($ VSub_Name '$DEVS')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVE spids:[137])
                          op: Equal
                          rhs: {(DQ (/dev/) (${ VSub_Name DEV))}
                          spids: [137]
                        )
                      ]
                      spids: [137]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.SimpleCommand
                              words: [{(sfdisk)} {(-d)} {(DQ (${ VSub_Name DRIVE))}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                )
                                (redir.Redir
                                  op: <Redir_Great '2>'>
                                  fd: 2
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:DATA spids:[177])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSubPart
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.Pipeline
                                                children: [
                                                  (C {(sfdisk)} {(-J)} {(DQ ($ VSub_Name '$DRIVE'))})
                                                  (C {(jq)} {(-e)} {(-r)} 
                                                    {
                                                      (SQ 
                                                        <
'.partitiontable.partitions | map(select(.type=="83")) | .[0].node'
                                                        >
                                                      )
                                                    }
                                                  )
                                                ]
                                                negated: F
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [178 198]
                                      )
                                    }
                                  spids: [177]
                                )
                              ]
                              spids: [177]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-eq)} {(0)} 
                                      {(Lit_Other ']')}
                                    )
                                  ]
                                  action: [
                                    (command.AndOr
                                      ops: [Op_DAmp]
                                      children: [
                                        (C {(mount)} {(DQ ($ VSub_Name '$DATA'))} 
                                          {(DQ ($ VSub_Name '$MOUNTPOINT'))}
                                        )
                                        (command.ControlFlow
                                          token: <ControlFlow_Return return>
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [16777215 214]
                                )
                              ]
                              spids: [16777215 232]
                            )
                          ]
                          spids: [16777215 170]
                        )
                      ]
                      spids: [16777215 235]
                    )
                  ]
                  spids: [134 238]
                )
              spids: [130 16777215]
            )
            (C {(echo)} {(DQ ('WARNING: Failed to mount a persistent volume (is there one?)'))})
          ]
          spids: [61]
        )
      spids: [57 60]
    )
    (C {(mount_drive)})
  ]
)