(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:MODULE) op:Equal rhs:{(0)} spids:[46])]
      spids: [46]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:dev_makeswap) op:Equal rhs:{(-1)} spids:[49])]
      spids: [49]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:dev_mounted) op:Equal rhs:{(-1)} spids:[52])]
      spids: [52]
    )
    (C {(trap)} {(INT)})
    (FuncDef
      name: check_prereqs
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:msg)
                  op: Equal
                  rhs: {(DQ ("skip all tests:"))}
                  spids: [70]
                )
              ]
              spids: [68]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:uid)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(id)} {(-u)})])
                        left_token: <Left_CommandSub "$(">
                        spids: [79 83]
                      )
                    }
                  spids: [78]
                )
              ]
              spids: [76]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {($ VSub_Name "$uid")} {(-ne)} {(0)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {($ VSub_Name "$msg")} {(must)} {(be)} {(run)} {(as)} {(root)}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[117])]
                    )
                    (C {(exit)} {(0)})
                  ]
                  spids: [-1 100]
                )
              ]
              spids: [-1 126]
            )
          ]
          spids: [65]
        )
      spids: [61 64]
    )
    (FuncDef
      name: zram_cleanup
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("zram cleanup"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(SQ )} spids:[147])]
              spids: [145]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(seq)} {(0)} {($ VSub_Name "$dev_makeswap")})]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [156 162]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [(C {(swapoff)} {(/dev/zram) ($ VSub_Name "$i")})]
                  spids: [165 174]
                )
              spids: [155 163]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(seq)} {(0)} {($ VSub_Name "$dev_mounted")})]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [184 190]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [(C {(umount)} {(/dev/zram) ($ VSub_Name "$i")})]
                  spids: [193 202]
                )
              spids: [183 191]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (C {(seq)} {(0)} 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name "$dev_num")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [217 224]
                              )
                            }
                          )
                        ]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [212 225]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (SimpleCommand
                      words: [{(echo)} {(1)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(/sys/block/zram) (${ VSub_Name i) (/reset)}
                          spids: [235]
                        )
                      ]
                    )
                    (C {(rm)} {(-rf)} {(zram) ($ VSub_Name "$i")})
                  ]
                  spids: [228 252]
                )
              spids: [211 226]
            )
          ]
          spids: [135]
        )
      spids: [131 134]
    )
    (FuncDef
      name: zram_unload
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {($ VSub_Name "$MODULE")} {(-ne)} {(0)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ("zram rmmod zram"))})
                    (SimpleCommand
                      words: [{(rmmod)} {(zram)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(/dev/null)}
                          spids: [293]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [297]
                        )
                      ]
                    )
                  ]
                  spids: [-1 279]
                )
              ]
              spids: [-1 301]
            )
          ]
          spids: [262]
        )
      spids: [258 261]
    )
    (FuncDef
      name: zram_load
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MODULE_PATH)
                  op: Equal
                  rhs: 
                    {(/lib/modules/) 
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(uname)} {(-r)})])
                        left_token: <Left_Backtick "`">
                        spids: [319 323]
                      ) (/kernel/drivers/block/zram/zram.ko)
                    }
                  spids: [317]
                )
              ]
              spids: [317]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$MODULE_PATH")} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:MODULE) op:Equal rhs:{(1)} spids:[341])]
                      spids: [341]
                    )
                    (C {(echo)} {(DQ ("create '") ($ VSub_Name "$dev_num") ("' zram device(s)"))})
                    (C {(modprobe)} {(zram)} {(Lit_VarLike "num_devices=") ($ VSub_Name "$dev_num")})
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(echo)} {(DQ ("failed to insert zram module"))})
                            (C {(exit)} {(1)})
                          ]
                          spids: [-1 375]
                        )
                      ]
                      spids: [-1 390]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:dev_num_created)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(ls)} {(/dev/zram) (Lit_Other "*")})
                                          (C {(wc)} {(-w)})
                                        ]
                                        negated: False
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub "$(">
                                spids: [395 406]
                              )
                            }
                          spids: [394]
                        )
                      ]
                      spids: [394]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$dev_num_created"))} {(-ne)} 
                                  {(DQ ($ VSub_Name "$dev_num"))} {(Lit_Other "]")}
                                )
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {(DQ ("unexpected num of devices: ") ($ VSub_Name "$dev_num_created"))}
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:ERR_CODE)
                                  op: Equal
                                  rhs: {(-1)}
                                  spids: [438]
                                )
                              ]
                              spids: [438]
                            )
                          ]
                          spids: [-1 427]
                        )
                      ]
                      else_action: [(C {(echo)} {(DQ ("zram load module successful"))})]
                      spids: [442 452]
                    )
                  ]
                  spids: [-1 338]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(Lit_Other "[")} {(-b)} {(/dev/zram0)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(DQ ("/dev/zram0 device file found: OK"))})]
                  spids: [455 466]
                )
              ]
              else_action: [
                (C {(echo)} {(DQ ("ERROR: No zram.ko module or no /dev/zram0 device found"))})
                (C {(echo)} {(DQ ($ VSub_Name "$TCID") (" : CONFIG_ZRAM is not set"))})
                (C {(exit)} {(1)})
              ]
              spids: [476 499]
            )
          ]
          spids: [310]
        )
      spids: [306 309]
    )
    (FuncDef
      name: zram_max_streams
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("set max_comp_streams to zram device(s)"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[521])]
              spids: [519]
            )
            (ForEach
              iter_name: max_s
              iter_words: [{($ VSub_Name "$zram_max_streams")}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:sys_path)
                          op: Equal
                          rhs: {(DQ (/sys/block/zram) (${ VSub_Name i) (/max_comp_streams))}
                          spids: [539]
                        )
                      ]
                      spids: [537]
                    )
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {($ VSub_Name "$max_s")}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {($ VSub_Name "$sys_path")}
                              spids: [553]
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ ("FAIL failed to set '") ($ VSub_Name "$max_s") ("' to ") 
                              ($ VSub_Name "$sys_path")
                            )
                          }
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (C {(sleep)} {(1)})
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:max_streams)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(cat)} {($ VSub_Name "$sys_path")})]
                                  )
                                left_token: <Left_CommandSub "$(">
                                spids: [579 583]
                              )
                            }
                          spids: [578]
                        )
                      ]
                      spids: [576]
                    )
                    (AndOr
                      children: [
                        (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$max_s"))} {(-ne)} 
                          {(DQ ($ VSub_Name "$max_streams"))} {(Lit_Other "]")}
                        )
                        (C {(echo)} 
                          {
                            (DQ ("FAIL can't set max_streams '") ($ VSub_Name "$max_s") ("', get ") 
                              ($ VSub_Name "$max_stream")
                            )
                          }
                        )
                      ]
                      op_id: Op_DAmp
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name "$i")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [617 624]
                              )
                            }
                          spids: [616]
                        )
                      ]
                      spids: [616]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_Name "$sys_path") (" = '") ($ VSub_Name "$max_streams") ("' (") 
                          ($ VSub_Name "$i") (/) ($ VSub_Name "$dev_num") (")")
                        )
                      }
                    )
                  ]
                  spids: [534 641]
                )
              spids: [530 532]
            )
            (C {(echo)} {(DQ ("zram max streams: OK"))})
          ]
          spids: [508]
        )
      spids: [504 507]
    )
    (FuncDef
      name: zram_compress_alg
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("test that we can set compression algorithm"))})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:algs)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(/sys/block/zram0/comp_algorithm)})]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [672 676]
                      )
                    }
                  spids: [671]
                )
              ]
              spids: [669]
            )
            (C {(echo)} {(DQ ("supported algs: ") ($ VSub_Name "$algs"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[689])]
              spids: [687]
            )
            (ForEach
              iter_name: alg
              iter_words: [{($ VSub_Name "$zram_algs")}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:sys_path)
                          op: Equal
                          rhs: {(DQ (/sys/block/zram) (${ VSub_Name i) (/comp_algorithm))}
                          spids: [707]
                        )
                      ]
                      spids: [705]
                    )
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(DQ ($ VSub_Name "$alg"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {($ VSub_Name "$sys_path")}
                              spids: [723]
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ ("FAIL can't set '") ($ VSub_Name "$alg") ("' to ") 
                              ($ VSub_Name "$sys_path")
                            )
                          }
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name "$i")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [742 749]
                              )
                            }
                          spids: [741]
                        )
                      ]
                      spids: [741]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_Name "$sys_path") (" = '") ($ VSub_Name "$alg") ("' (") 
                          ($ VSub_Name "$i") (/) ($ VSub_Name "$dev_num") (")")
                        )
                      }
                    )
                  ]
                  spids: [702 766]
                )
              spids: [698 700]
            )
            (C {(echo)} {(DQ ("zram set compression algorithm: OK"))})
          ]
          spids: [658]
        )
      spids: [654 657]
    )
    (FuncDef
      name: zram_set_disksizes
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("set disk size to zram device(s)"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[795])]
              spids: [793]
            )
            (ForEach
              iter_name: ds
              iter_words: [{($ VSub_Name "$zram_sizes")}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:sys_path)
                          op: Equal
                          rhs: {(DQ (/sys/block/zram) (${ VSub_Name i) (/disksize))}
                          spids: [813]
                        )
                      ]
                      spids: [811]
                    )
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(DQ ($ VSub_Name "$ds"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {($ VSub_Name "$sys_path")}
                              spids: [829]
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ ("FAIL can't set '") ($ VSub_Name "$ds") ("' to ") 
                              ($ VSub_Name "$sys_path")
                            )
                          }
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name "$i")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [849 856]
                              )
                            }
                          spids: [848]
                        )
                      ]
                      spids: [848]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_Name "$sys_path") (" = '") ($ VSub_Name "$ds") ("' (") 
                          ($ VSub_Name "$i") (/) ($ VSub_Name "$dev_num") (")")
                        )
                      }
                    )
                  ]
                  spids: [808 873]
                )
              spids: [804 806]
            )
            (C {(echo)} {(DQ ("zram set disksizes: OK"))})
          ]
          spids: [783]
        )
      spids: [779 782]
    )
    (FuncDef
      name: zram_set_memlimit
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("set memory limit to zram device(s)"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[903])]
              spids: [901]
            )
            (ForEach
              iter_name: ds
              iter_words: [{($ VSub_Name "$zram_mem_limits")}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:sys_path)
                          op: Equal
                          rhs: {(DQ (/sys/block/zram) (${ VSub_Name i) (/mem_limit))}
                          spids: [921]
                        )
                      ]
                      spids: [919]
                    )
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(DQ ($ VSub_Name "$ds"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {($ VSub_Name "$sys_path")}
                              spids: [937]
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ ("FAIL can't set '") ($ VSub_Name "$ds") ("' to ") 
                              ($ VSub_Name "$sys_path")
                            )
                          }
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name "$i")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [957 964]
                              )
                            }
                          spids: [956]
                        )
                      ]
                      spids: [956]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_Name "$sys_path") (" = '") ($ VSub_Name "$ds") ("' (") 
                          ($ VSub_Name "$i") (/) ($ VSub_Name "$dev_num") (")")
                        )
                      }
                    )
                  ]
                  spids: [916 981]
                )
              spids: [912 914]
            )
            (C {(echo)} {(DQ ("zram set memory limit: OK"))})
          ]
          spids: [890]
        )
      spids: [886 889]
    )
    (FuncDef
      name: zram_makeswap
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("make swap with zram device(s)"))})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1010])]
              spids: [1008]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (C {(seq)} {(0)} 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name "$dev_num")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [1025 1032]
                              )
                            }
                          )
                        ]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [1020 1033]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (SimpleCommand
                      words: [{(mkswap)} {(/dev/zram) ($ VSub_Name "$i")}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(err.log)}
                          spids: [1044]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [1048]
                        )
                      ]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(cat)} {(err.log)})
                            (C {(echo)} 
                              {(DQ ("FAIL mkswap /dev/zram") ($ VSub_Number "$1") (" failed"))}
                            )
                          ]
                          spids: [-1 1065]
                        )
                      ]
                      spids: [-1 1082]
                    )
                    (SimpleCommand
                      words: [{(swapon)} {(/dev/zram) ($ VSub_Name "$i")}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(err.log)}
                          spids: [1091]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [1095]
                        )
                      ]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(cat)} {(err.log)})
                            (C {(echo)} 
                              {(DQ ("FAIL swapon /dev/zram") ($ VSub_Number "$1") (" failed"))}
                            )
                          ]
                          spids: [-1 1112]
                        )
                      ]
                      spids: [-1 1129]
                    )
                    (C {(echo)} {(DQ ("done with /dev/zram") ($ VSub_Name "$i"))})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:dev_makeswap)
                          op: Equal
                          rhs: {($ VSub_Name "$i")}
                          spids: [1141]
                        )
                      ]
                      spids: [1141]
                    )
                  ]
                  spids: [1036 1145]
                )
              spids: [1019 1034]
            )
            (C {(echo)} {(DQ ("zram making zram mkswap and swapon: OK"))})
          ]
          spids: [998]
        )
      spids: [994 997]
    )
    (FuncDef
      name: zram_swapoff
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(SQ )} spids:[1167])]
              spids: [1165]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(seq)} {(0)} {($ VSub_Name "$dev_makeswap")})]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [1176 1182]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (SimpleCommand
                      words: [{(swapoff)} {(/dev/zram) ($ VSub_Name "$i")}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(err.log)}
                          spids: [1193]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [1197]
                        )
                      ]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(cat)} {(err.log)})
                            (C {(echo)} {(DQ ("FAIL swapoff /dev/zram") ($ VSub_Name "$i") (" failed"))})
                          ]
                          spids: [-1 1214]
                        )
                      ]
                      spids: [-1 1231]
                    )
                  ]
                  spids: [1185 1234]
                )
              spids: [1175 1183]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:dev_makeswap) op:Equal rhs:{(-1)} spids:[1237])]
              spids: [1237]
            )
            (C {(echo)} {(DQ ("zram swapoff: OK"))})
          ]
          spids: [1162]
        )
      spids: [1158 1161]
    )
    (FuncDef
      name: zram_makefs
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1260])]
              spids: [1258]
            )
            (ForEach
              iter_name: fs
              iter_words: [{($ VSub_Name "$zram_filesystems")}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(which)} {(mkfs.) ($ VSub_Name "$fs")}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(/dev/null)}
                              spids: [1285]
                            )
                            (Redir
                              op_id: Redir_GreatAnd
                              fd: 2
                              arg_word: {(1)}
                              spids: [1289]
                            )
                          ]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:fs)
                              op: Equal
                              rhs: {(ext2)}
                              spids: [1294]
                            )
                          ]
                          spids: [1294]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (C {(echo)} 
                      {
                        (DQ ("make ") ($ VSub_Name "$fs") (" filesystem on /dev/zram") 
                          ($ VSub_Name "$i")
                        )
                      }
                    )
                    (SimpleCommand
                      words: [{(mkfs.) ($ VSub_Name "$fs")} {(/dev/zram) ($ VSub_Name "$i")}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(err.log)}
                          spids: [1315]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [1319]
                        )
                      ]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(cat)} {(err.log)})
                            (C {(echo)} 
                              {
                                (DQ ("FAIL failed to make ") ($ VSub_Name "$fs") (" on /dev/zram") 
                                  ($ VSub_Name "$i")
                                )
                              }
                            )
                          ]
                          spids: [-1 1336]
                        )
                      ]
                      spids: [-1 1354]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name "$i")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [1358 1365]
                              )
                            }
                          spids: [1357]
                        )
                      ]
                      spids: [1357]
                    )
                    (C {(echo)} {(DQ ("zram mkfs.") ($ VSub_Name "$fs") (": OK"))})
                  ]
                  spids: [1273 1377]
                )
              spids: [1269 1271]
            )
          ]
          spids: [1255]
        )
      spids: [1251 1254]
    )
    (FuncDef
      name: zram_mount
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1391])]
              spids: [1389]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (C {(seq)} {(0)} 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name "$dev_num")})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [1406 1413]
                              )
                            }
                          )
                        ]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [1401 1414]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (C {(echo)} {(DQ ("mount /dev/zram") ($ VSub_Name "$i"))})
                    (C {(mkdir)} {(zram) ($ VSub_Name "$i")})
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(mount)} {(/dev/zram) ($ VSub_Name "$i")} {(zram) ($ VSub_Name "$i")}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(/dev/null)}
                              spids: [1442]
                            )
                          ]
                        )
                        (C {(echo)} {(DQ ("FAIL mount /dev/zram") ($ VSub_Name "$i") (" failed"))})
                      ]
                      op_id: Op_DPipe
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:dev_mounted)
                          op: Equal
                          rhs: {($ VSub_Name "$i")}
                          spids: [1459]
                        )
                      ]
                      spids: [1459]
                    )
                  ]
                  spids: [1417 1463]
                )
              spids: [1400 1415]
            )
            (C {(echo)} {(DQ ("zram mount of zram device(s): OK"))})
          ]
          spids: [1386]
        )
      spids: [1382 1385]
    )
  ]
)