(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (AndOr
              ops: [Op_DPipe Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')})
                (Subshell
                  child: 
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Number '$2'))} 
                          {(Lit_Other ']')}
                        )
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$2'))} 
                          {(Lit_Other ']')}
                        )
                      ]
                    )
                  spids: [48 76]
                )
                (Subshell
                  child: 
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Number '$3'))} 
                          {(Lit_Other ']')}
                        )
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Number '$3'))} 
                          {(Lit_Other ']')}
                        )
                      ]
                    )
                  spids: [81 109]
                )
              ]
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Usage: trximg.sh file1 [file2 [file3]]'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[120])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 111]
        )
      ]
      spids: [16777215 128]
    )
    (FuncDef
      name: leout
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:X) op:Equal rhs:{(0)} spids:[144])]
              spids: [144]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:DATA)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [148]
                )
              ]
              spids: [148]
            )
            (While
              cond: [
                (C {(Lit_Other '[')} {($ VSub_Name '$X')} {(-lt)} {($ VSub_Number '$1')} {(Lit_Other ']')})
              ]
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:BYTE)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Percent
                                    left: (ArithWord w:{($ VSub_Name '$DATA')})
                                    right: (ArithWord w:{(Lit_Digits 256)})
                                  )
                                spids: [180 184]
                              )
                            }
                          spids: [179]
                        )
                      ]
                      spids: [179]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:DATA)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Slash
                                    left: (ArithWord w:{($ VSub_Name '$DATA')})
                                    right: (ArithWord w:{(Lit_Digits 256)})
                                  )
                                spids: [188 192]
                              )
                            }
                          spids: [187]
                        )
                      ]
                      spids: [187]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:OCTAL) op:Equal rhs:{(DQ )} spids:[201])]
                      spids: [201]
                    )
                    (ForEach
                      iter_name: i
                      iter_words: [{(1)} {(2)} {(3)}]
                      do_arg_iter: F
                      body: 
                        (DoGroup
                          children: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:OCTAL)
                                  op: Equal
                                  rhs: 
                                    {
                                      (ArithSubPart
                                        anode: 
                                          (ArithBinary
                                            op_id: Arith_Percent
                                            left: (ArithWord w:{($ VSub_Name '$BYTE')})
                                            right: (ArithWord w:{(Lit_Digits 8)})
                                          )
                                        spids: [223 227]
                                      ) (DQ ($ VSub_Name '$OCTAL'))
                                    }
                                  spids: [222]
                                )
                              ]
                              spids: [222]
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:BYTE)
                                  op: Equal
                                  rhs: 
                                    {
                                      (ArithSubPart
                                        anode: 
                                          (ArithBinary
                                            op_id: Arith_Slash
                                            left: (ArithWord w:{($ VSub_Name '$BYTE')})
                                            right: (ArithWord w:{(Lit_Digits 8)})
                                          )
                                        spids: [234 238]
                                      )
                                    }
                                  spids: [233]
                                )
                              ]
                              spids: [233]
                            )
                          ]
                          spids: [219 241]
                        )
                      spids: [211 16777215]
                    )
                    (C {(echo)} {(-ne)} {(DQ (Lit_Other '\\') (0) ($ VSub_Name '$OCTAL'))})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:X)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name '$X')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [263 267]
                              )
                            }
                          spids: [262]
                        )
                      ]
                      spids: [262]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:BYTE)
                          op: Equal
                          rhs: {($ VSub_Name '$x')}
                          spids: [270]
                        )
                      ]
                      spids: [270]
                    )
                  ]
                  spids: [171 274]
                )
            )
          ]
          spids: [141]
        )
      spids: [135 140]
    )
    (FuncDef
      name: padlen
      body: 
        (BraceGroup
          children: [
            (C {(echo)} 
              {
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Percent
                      left: 
                        (ArithBinary
                          op_id: Arith_Minus
                          left: (ArithWord w:{($ VSub_Number '$1')})
                          right: 
                            (ArithBinary
                              op_id: Arith_Percent
                              left: (ArithWord w:{($ VSub_Number '$2')})
                              right: (ArithWord w:{($ VSub_Number '$1')})
                            )
                        )
                      right: (ArithWord w:{($ VSub_Number '$1')})
                    )
                  spids: [294 306]
                )
              }
            )
          ]
          spids: [289]
        )
      spids: [283 288]
    )
    (FuncDef
      name: roundlen
      body: 
        (BraceGroup
          children: [
            (C {(echo)} 
              {
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Plus
                      left: (ArithWord w:{($ VSub_Number '$2')})
                      right: 
                        (ArithWord
                          w: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (C {(padlen)} {($ VSub_Number '$1')} {($ VSub_Number '$2')})
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [329 335]
                              )
                            }
                        )
                    )
                  spids: [326 336]
                )
              }
            )
          ]
          spids: [321]
        )
      spids: [315 320]
    )
    (FuncDef
      name: filelen
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [(C {(wc)} {(-c)} {(DQ ($ VSub_Number '$1'))}) (C {(awk)} {(SQ <'{print $1}'>)})]
              negated: F
            )
          ]
          spids: [351]
        )
      spids: [345 350]
    )
    (FuncDef
      name: zpad
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {($ VSub_Number '$1')} {(-ne)} {(0)} {(Lit_Other ']')})
                (SimpleCommand
                  words: [
                    {(dd)}
                    {(Lit_VarLike 'if=') (/dev/zero)}
                    {(Lit_VarLike 'bs=') ($ VSub_Number '$1')}
                    {(Lit_VarLike 'count=') (1)}
                  ]
                  redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[409])]
                )
              ]
            )
          ]
          spids: [383]
        )
      spids: [377 382]
    )
    (FuncDef
      name: zpad_file
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')})
                (ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (C {(cat)} {($ VSub_Number '$2')})
            (C {(zpad)} 
              {
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(padlen)} {($ VSub_Number '$1')} 
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [(C {(filelen)} {(DQ ($ VSub_Number '$2'))})]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [455 461]
                            )
                          }
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [450 462]
                )
              }
            )
          ]
          spids: [425]
        )
      spids: [419 424]
    )
    (FuncDef
      name: emit_header
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [(C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')})]
                  action: [
                    (C {(echo)} {(-n)} {(DQ (HDR0))})
                    (C {(leout)} {(4)} {($ VSub_Name '$LENGTH')})
                    (C {(leout)} {(4)} {($ VSub_Name '$CRC32')})
                  ]
                  spids: [16777215 491]
                )
              ]
              spids: [16777215 526]
            )
            (C {(leout)} {(2)} {(0)})
            (C {(leout)} {(2)} {(1)})
            (C {(leout)} {(4)} {(28)})
            (C {(leout)} {(4)} {($ VSub_Name '$OFFSET2')})
            (C {(leout)} {(4)} {($ VSub_Name '$OFFSET3')})
          ]
          spids: [475]
        )
      spids: [471 474]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:TOTAL)
          op: Equal
          rhs: 
            {
              (ArithSubPart
                anode: 
                  (ArithBinary
                    op_id: Arith_Plus
                    left: (ArithWord w:{(Lit_Digits 28)})
                    right: 
                      (ArithWord
                        w: 
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (C {(roundlen)} {(4)} 
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [(C {(filelen)} {(DQ ($ VSub_Number '$1'))})]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [595 601]
                                        )
                                      }
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [590 602]
                            )
                          }
                      )
                  )
                spids: [587 603]
              )
            }
          spids: [586]
        )
      ]
      spids: [586]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:OFFSET2) op:Equal rhs:{(0)} spids:[620])]
              spids: [620]
            )
          ]
          spids: [16777215 617]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:OFFSET2)
              op: Equal
              rhs: {($ VSub_Name '$TOTAL')}
              spids: [626]
            )
          ]
          spids: [626]
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:TOTAL)
              op: Equal
              rhs: 
                {
                  (ArithSubPart
                    anode: 
                      (ArithBinary
                        op_id: Arith_Plus
                        left: (ArithWord w:{($ VSub_Name '$TOTAL')})
                        right: 
                          (ArithWord
                            w: 
                              {
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(roundlen)} {(4)} 
                                          {
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [(C {(filelen)} {(DQ ($ VSub_Number '$2'))})]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [639 645]
                                            )
                                          }
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [634 646]
                                )
                              }
                          )
                      )
                    spids: [631 647]
                  )
                }
              spids: [630]
            )
          ]
          spids: [630]
        )
      ]
      spids: [623 649]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$3'))} {(Lit_Other ']')})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:OFFSET3) op:Equal rhs:{(0)} spids:[666])]
              spids: [666]
            )
          ]
          spids: [16777215 663]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:OFFSET3)
              op: Equal
              rhs: {($ VSub_Name '$TOTAL')}
              spids: [672]
            )
          ]
          spids: [672]
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:TOTAL)
              op: Equal
              rhs: 
                {
                  (ArithSubPart
                    anode: 
                      (ArithBinary
                        op_id: Arith_Plus
                        left: (ArithWord w:{($ VSub_Name '$TOTAL')})
                        right: 
                          (ArithWord
                            w: 
                              {
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(roundlen)} {(4)} 
                                          {
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [(C {(filelen)} {(DQ ($ VSub_Number '$3'))})]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [685 691]
                                            )
                                          }
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [680 692]
                                )
                              }
                          )
                      )
                    spids: [677 693]
                  )
                }
              spids: [676]
            )
          ]
          spids: [676]
        )
      ]
      spids: [669 695]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:LENGTH)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(roundlen)} {(4096)} {($ VSub_Name '$TOTAL')})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [698 704]
              )
            }
          spids: [697]
        )
      ]
      spids: [697]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:CRC32)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (Pipeline
                        children: [
                          (Subshell
                            child: 
                              (CommandList
                                children: [
                                  (C {(emit_header)} {(skip)})
                                  (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$1'))})
                                  (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$2'))})
                                  (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$3'))})
                                  (C {(zpad)} 
                                    {
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [(C {(padlen)} {(4096)} {($ VSub_Name '$TOTAL')})]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [752 758]
                                      )
                                    }
                                  )
                                ]
                              )
                            spids: [715 761]
                          )
                          (C {(cksum)} {(-NILP)})
                        ]
                        negated: F
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [712 769]
              )
            }
          spids: [711]
        )
      ]
      spids: [711]
    )
    (C {(emit_header)})
    (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$1'))})
    (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$2'))})
    (C {(zpad_file)} {(4)} {(DQ ($ VSub_Number '$3'))})
    (C {(zpad)} 
      {
        (CommandSubPart
          command_list: (CommandList children:[(C {(padlen)} {(4096)} {($ VSub_Name '$TOTAL')})])
          left_token: <Left_CommandSub '$('>
          spids: [804 810]
        )
      }
    )
  ]
)