(command.CommandList
  children: [
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(.)} {(./build.conf)})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
      ]
    )
    (C {(export)} {(Lit_VarLike 'LANG=') (C)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DEBUG spids:[29])
          op: Equal
          rhs: {(0)}
          spids: [29]
        )
      ]
      spids: [29]
    )
    (C {(rm)} {(-f)} {(./fw-) (Lit_Other '*') (.log)})
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {($ VSub_DollarName '$DEBUG')} {(-ne)} {(1)} {(-a)} {(-d)} 
          {(zfirmware_workdir)} {(Lit_Other ']')}
        )
        (C {(rm)} {(-r)} {(zfirmware_workdir)})
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:CWD spids:[68])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: (command.CommandList children:[(C {(pwd)})])
                left_token: <Left_Backtick '`'>
                spids: [69 71]
              )
            }
          spids: [68]
        )
      ]
      spids: [68]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DPipe]
      children: [
        (command.Pipeline
          children: [(C {(busybox)}) (C {(grep)} {(-qow)} {(SQ <stat>)})]
          negated: F
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:STAT spids:[89])
              op: Equal
              rhs: {(SQ <'busybox stat'>)}
              spids: [89]
            )
          ]
          spids: [89]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:STAT spids:[96])
              op: Equal
              rhs: {(stat)}
              spids: [96]
            )
          ]
          spids: [96]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:SRC_FW_DIR spids:[104])
          op: Equal
          rhs: {(SQ <../linux-firmware>)}
          spids: [104]
        )
      ]
      spids: [104]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DEST_FW_DIR spids:[109])
          op: Equal
          rhs: {(SQ <zfirmware_workdir/lib>)}
          spids: [109]
        )
      ]
      spids: [109]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:SRC_FILE_FW spids:[115])
          op: Equal
          rhs: {(${ VSub_Name SRC_FW_DIR) (/WHENCE)}
          spids: [115]
        )
      ]
      spids: [115]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:dotconfig spids:[121])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {(find)} {(output)} {(-maxdepth)} {(1)} {(-type)} {(f)} {(-name)} 
                            {(SQ <'DOTconfig*'>)}
                          )
                          (C {(head)} {(-1)})
                        ]
                        negated: F
                      )
                    ]
                  )
                left_token: <Left_Backtick '`'>
                spids: [122 146]
              )
            }
          spids: [121]
        )
      ]
      spids: [121]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_DollarName '$dotconfig'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:DOTCONFIG_str spids:[165])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(grep)} {(-v)} {(-E)} {(SQ <'^#|is not set$'>)} 
                                {($ VSub_DollarName '$dotconfig')}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [166 178]
                      )
                    }
                  spids: [165]
                )
              ]
              spids: [165]
            )
          ]
          spids: [16777215 162]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ('WARNING: No DOTconfig file in output/'))})
        (C {(echo)} {(DQ ('Put a DOTconfig file there...'))})
      ]
      spids: [180 200]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:FIRMWARE_SFS spids:[203])
          op: Equal
          rhs: 
            {
              (DQ (sources/fdrv_) (${ VSub_Name kernel_version) (_) (${ VSub_Name package_name_suffix) 
                (.sfs)
              )
            }
          spids: [203]
        )
      ]
      spids: [203]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:FIRMWARE_RESULT_DIR spids:[216])
          op: Equal
          rhs: {(SQ <zfirmware_workdir/lib/firmware>)}
          spids: [216]
        )
      ]
      spids: [216]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:FIRMWARE_EXTRA_DIR spids:[221])
          op: Equal
          rhs: {(SQ <zfirmware_workdir/lib/linux-firmware>)}
          spids: [221]
        )
      ]
      spids: [221]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:kernel_package spids:[227])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {(find)} {(output)} {(-type)} {(d)} {(-name)} {(SQ <'linux_kernel*'>)})
                          (C {(head)} {(-1)})
                        ]
                        negated: F
                      )
                    ]
                  )
                left_token: <Left_Backtick '`'>
                spids: [228 248]
              )
            }
          spids: [227]
        )
      ]
      spids: [227]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ (${ VSub_Name kernel_package))} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:kernel_package spids:[272])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(find)} {($ VSub_DollarName '$CWD')} {(-type)} {(d)} {(-name)} 
                                    {(SQ <'linux_kernel*'>)}
                                  )
                                  (C {(head)} {(-1)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [273 293]
                      )
                    }
                  spids: [272]
                )
              ]
              spids: [272]
            )
          ]
          spids: [16777215 269]
        )
      ]
      spids: [16777215 295]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:dest_kernel_package spids:[311])
          op: Equal
          rhs: {(${ VSub_Name kernel_package) (/lib/firmware)}
          spids: [311]
        )
      ]
      spids: [311]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(${ VSub_Name dest_kernel_package)} {(Lit_Other ']')})
        (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest_kernel_package')})
      ]
    )
    (command.FuncDef
      name: func_git
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_DollarName '$SRC_FW_DIR'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(cd)} {($ VSub_DollarName '$SRC_FW_DIR')})
                    (C {(echo)} {(DQ ('Updating the git firmware repo'))})
                    (C {(git)} {(pull)})
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')})
                        (C {(echo)} {(DQ ('Failed to update git firmware'))})
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [16777215 372]
                )
              ]
              else_action: [
                (C {(cd)} {(..)})
                (C {(echo)} {(DQ ('Cloning the firmware repo may take a long time'))})
                (C {(git)} {(clone)} 
                  {(git) (Lit_Other ':') 
                    (//git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git)
                  }
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')})
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (C {(echo)} {(DQ ('Failed to clone the git firmware repo'))})
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                      spids: [16777215 458]
                    )
                  ]
                  spids: [16777215 473]
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [422 481]
            )
          ]
          spids: [357]
        )
      spids: [353 356]
    )
    (command.FuncDef
      name: process_driver
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:driver spids:[495])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [495]
                )
              ]
              spids: [493]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:DRIVER spids:[501])
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name driver>
                        suffix_op: (suffix_op.StringUnary op_id:VOp1_DCaret arg_word:{})
                        spids: [502 505]
                      )
                    }
                  spids: [501]
                )
              ]
              spids: [499]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:DRIVER spids:[508])
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name DRIVER>
                        suffix_op: 
                          (suffix_op.PatSub
                            pat: {(-)}
                            replace: {(_)}
                            replace_mode: Lit_Slash
                            spids: [511]
                          )
                        spids: [509 516]
                      )
                    }
                  spids: [508]
                )
              ]
              spids: [508]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$DRIVER')}
              arms: [
                (case_arm
                  pat_list: [{(RADEON)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[532])
                          op: Equal
                          rhs: {(SQ <'DRM_RADEON='>)}
                          spids: [532]
                        )
                      ]
                      spids: [532]
                    )
                  ]
                  spids: [529 530 537 16777215]
                )
                (case_arm
                  pat_list: [{(NOUVEAU)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[543])
                          op: Equal
                          rhs: {(SQ <'DRM_NOUVEAU='>)}
                          spids: [543]
                        )
                      ]
                      spids: [543]
                    )
                  ]
                  spids: [540 541 548 16777215]
                )
                (case_arm
                  pat_list: [{(AMDGPU)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[554])
                          op: Equal
                          rhs: {(SQ <'DRM_AMDGPU='>)}
                          spids: [554]
                        )
                      ]
                      spids: [554]
                    )
                  ]
                  spids: [551 552 559 16777215]
                )
                (case_arm
                  pat_list: [{(I915)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[565])
                          op: Equal
                          rhs: {(SQ <'DRM_I915='>)}
                          spids: [565]
                        )
                      ]
                      spids: [565]
                    )
                  ]
                  spids: [562 563 570 16777215]
                )
                (case_arm
                  pat_list: [{(KEYSPAN)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[576])
                          op: Equal
                          rhs: {(SQ <'SERIAL_KEYSPAN='>)}
                          spids: [576]
                        )
                      ]
                      spids: [576]
                    )
                  ]
                  spids: [573 574 580 16777215]
                )
                (case_arm
                  pat_list: [{(LIBERTAS)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[586])
                          op: Equal
                          rhs: {(LIBERTAS_USB)}
                          spids: [586]
                        )
                      ]
                      spids: [586]
                    )
                  ]
                  spids: [583 584 589 16777215]
                )
                (case_arm
                  pat_list: [{(RTL8821AE)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[594])
                          op: Equal
                          rhs: {(8821AE)}
                          spids: [594]
                        )
                      ]
                      spids: [594]
                    )
                  ]
                  spids: [592 593 597 16777215]
                )
                (case_arm
                  pat_list: [{(MWIFIEX)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[603])
                          op: Equal
                          rhs: {(MWIFIEX_USB)}
                          spids: [603]
                        )
                      ]
                      spids: [603]
                    )
                  ]
                  spids: [600 601 606 16777215]
                )
                (case_arm
                  pat_list: [{(MWLWIFI)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:DRIVER spids:[612])
                          op: Equal
                          rhs: {(SQ <CONFIG_MAC80211>)}
                          spids: [612]
                        )
                      ]
                      spids: [612]
                    )
                  ]
                  spids: [609 610 616 16777215]
                )
              ]
              spids: [519 523 622]
            )
            (C {(echo)} {(-n)} {(DQ ($ VSub_DollarName '$driver') (' '))})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:D spids:[635])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ VSub_DollarName '$DOTCONFIG_str'))})
                                  (C {(grep)} {($ VSub_DollarName '$DRIVER')})
                                  (C {(head)} {(-n1)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [636 654]
                      )
                    }
                  spids: [635]
                )
              ]
              spids: [635]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$D'))} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                  spids: [16777215 671]
                )
              ]
              else_action: [
                (C {(echo)} {(--)} {($ VSub_DollarName '$D')} {(--)})
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [682 699]
            )
          ]
          spids: [490]
        )
      spids: [486 489]
    )
    (command.FuncDef
      name: get_func
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:file spids:[713])
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [713]
                )
              ]
              spids: [711]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:source_path spids:[721])
                  op: Equal
                  rhs: {(${ VSub_Name SRC_FW_DIR) (/) (${ VSub_Name file)}
                  spids: [721]
                )
              ]
              spids: [719]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:target_dir spids:[733])
                  op: Equal
                  rhs: 
                    {(${ VSub_Name CWD) (/) (${ VSub_Name FIRMWARE_EXTRA_DIR) (/) (${ VSub_Name file)}
                  spids: [733]
                )
              ]
              spids: [731]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:target_dir spids:[747])
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name target_dir>
                        suffix_op: 
                          (suffix_op.StringUnary
                            op_id: VOp1_Percent
                            arg_word: {(Lit_Slash /) ('*')}
                          )
                        spids: [748 753]
                      )
                    }
                  spids: [747]
                )
              ]
              spids: [747]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ (${ VSub_Name target_dir))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(mkdir)} {(-p)} {(${ VSub_Name target_dir)})]
                  spids: [16777215 777]
                )
              ]
              spids: [16777215 792]
            )
            (command.SimpleCommand
              words: [{(cp)} {(-d)} {(${ VSub_Name source_path)} {(${ VSub_Name target_dir)}]
              redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-eq)} {(0)} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ($ VSub_DollarName '$file') (' \t') 
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {($ VSub_DollarName '$STAT')} {(-c)} {(Lit_Other '%') (s)} 
                                      {($ VSub_DollarName '$SRC_FW_DIR') (/) 
                                        ($ VSub_DollarName '$file')
                                      }
                                    )
                                  ]
                                )
                              left_token: <Left_Backtick '`'>
                              spids: [831 842]
                            )
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(fw-1.log)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 823]
                )
              ]
              else_action: [
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ('FAILURE: ') ($ VSub_DollarName '$file'))}]
                  redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(fw-1.log)})]
                )
              ]
              spids: [850 865]
            )
          ]
          spids: [708]
        )
      spids: [704 707]
    )
    (command.FuncDef
      name: extract_firmware
      body: 
        (command.BraceGroup
          children: [
            (command.Subshell
              child: 
                (command.WhileUntil
                  keyword: <KW_While while>
                  cond: [
                    (command.Sentence
                      child: (C {(read)} {(-r)} {(field)} {(value)} {(etc)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Case
                          to_match: {($ VSub_DollarName '$field')}
                          arms: [
                            (case_arm
                              pat_list: [{(DQ ('Driver:'))}]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:driver spids:[909])
                                      op: Equal
                                      rhs: {($ VSub_DollarName '$value')}
                                      spids: [909]
                                    )
                                  ]
                                  spids: [909]
                                )
                                (command.AndOr
                                  ops: [Op_DPipe]
                                  children: [
                                    (C {(process_driver)} {($ VSub_DollarName '$driver')})
                                    (command.ControlFlow
                                      token: <ControlFlow_Continue continue>
                                    )
                                  ]
                                )
                                (command.SimpleCommand
                                  words: [{(echo)} {(-n)} {(DQ ($ VSub_DollarName '$driver') (' '))}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Redir_GreatAnd '>&'>
                                      fd: 16777215
                                      arg_word: {(2)}
                                    )
                                  ]
                                )
                                (command.WhileUntil
                                  keyword: <KW_While while>
                                  cond: [
                                    (command.Sentence
                                      child: (C {(Lit_Other '[')} {(1)} {(Lit_Other ']')})
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (C {(read)} {(-r)} {(field)} {(value)} {(etc)})
                                        (command.Case
                                          to_match: {($ VSub_DollarName '$field')}
                                          arms: [
                                            (case_arm
                                              pat_list: [{(DQ ('File:'))}]
                                              action: [
                                                (command.Sentence
                                                  child: 
                                                    (command.Assignment
                                                      keyword: Assign_None
                                                      pairs: [
                                                        (assign_pair
                                                          lhs: 
                                                            (lhs_expr.LhsName
                                                              name: file
                                                              spids: [975]
                                                            )
                                                          op: Equal
                                                          rhs: {($ VSub_DollarName '$value')}
                                                          spids: [975]
                                                        )
                                                      ]
                                                      spids: [975]
                                                    )
                                                  terminator: <Op_Semi ';'>
                                                )
                                                (C {(get_func)} {($ VSub_DollarName '$file')})
                                              ]
                                              spids: [970 973 984 16777215]
                                            )
                                            (case_arm
                                              pat_list: [{(DQ ('License:'))} {(DQ ('Licence:'))}]
                                              action: [
                                                (command.ControlFlow
                                                  token: <ControlFlow_Break break>
                                                )
                                              ]
                                              spids: [987 994 998 16777215]
                                            )
                                          ]
                                          spids: [963 967 1001]
                                        )
                                      ]
                                      spids: [949 1004]
                                    )
                                )
                              ]
                              spids: [903 906 16777215 1007]
                            )
                          ]
                          spids: [897 901 1007]
                        )
                      ]
                      spids: [894 1010]
                    )
                  redirects: [
                    (redir.Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: {(${ VSub_Name SRC_FILE_FW)}
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(fw-2.log)})]
              spids: [877 1019]
            )
          ]
          spids: [874]
        )
      spids: [870 873]
    )
    (command.FuncDef
      name: fw_filter
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:list spids:[1034])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [1034]
                )
              ]
              spids: [1034]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')})
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:B spids:[1050])
                      op: Equal
                      rhs: {(10000000)}
                      spids: [1050]
                    )
                  ]
                  spids: [1050]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:B spids:[1055])
                      op: Equal
                      rhs: {($ VSub_Number '$2')}
                      spids: [1055]
                    )
                  ]
                  spids: [1055]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {($ VSub_DollarName '$B')} {(-eq)} {(0)} {(Lit_Other ']')})
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:B spids:[1074])
                      op: Equal
                      rhs: {(10000000)}
                      spids: [1074]
                    )
                  ]
                  spids: [1074]
                )
              ]
            )
            (C {(echo)} {(DQ ('Filtering with ') ($ VSub_DollarName '$list'))})
            (command.Subshell
              child: 
                (command.CommandList
                  children: [
                    (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
                    (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
                    (C {(echo)} {(DQ ('Filtering with ') ($ VSub_DollarName '$list'))})
                    (C {(echo)} {(SQ <'FILTERED FIRMWARE LIST IN ZDRV'>)})
                    (C {(echo)} {(SQ <'=============================='>)})
                    (C {(mkdir)} {(-p)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filelist spids:[1128])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(find)} {(${ VSub_Name FIRMWARE_EXTRA_DIR)})
                                          (C {(sed)} 
                                            {
                                              (DQ ('s%') (${ VSub_Name FIRMWARE_EXTRA_DIR) 
                                                (Lit_Other '\\') ('/%%')
                                              )
                                            }
                                          )
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [1129 1148]
                              )
                            }
                          spids: [1128]
                        )
                      ]
                      spids: [1128]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filelist2 spids:[1154])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(find)} {(${ VSub_Name SRC_FW_DIR)})
                                          (C {(sed)} {(-e)} 
                                            {
                                              (DQ ('s%') (${ VSub_Name SRC_FW_DIR) (Lit_Other '\\') 
                                                ('/%%')
                                              )
                                            } {(-e)} {(SQ <'s|\\.git/||'>)}
                                          )
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [1155 1182]
                              )
                            }
                          spids: [1154]
                        )
                      ]
                      spids: [1154]
                    )
                    (command.WhileUntil
                      keyword: <KW_While while>
                      cond: [(command.Sentence child:(C {(read)} {(line)}) terminator:<Op_Semi ';'>)]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:file spids:[1202])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.BracedVarSub
                                        token: <VSub_Name line>
                                        suffix_op: 
                                          (suffix_op.StringUnary
                                            op_id: VOp1_DPound
                                            arg_word: {('*') (Lit_Slash /)}
                                          )
                                        spids: [1203 1208]
                                      )
                                    }
                                  spids: [1202]
                                )
                              ]
                              spids: [1202]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:file2 spids:[1211])
                                  op: Equal
                                  rhs: {(${ VSub_Name line)}
                                  spids: [1211]
                                )
                              ]
                              spids: [1211]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:action spids:[1217])
                                  op: Equal
                                  rhs: {(mv)}
                                  spids: [1217]
                                )
                              ]
                              spids: [1217]
                            )
                            (command.SimpleCommand
                              words: [{(echo)} {(-n)} {(DQ ($ VSub_DollarName '$file') (' '))}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:file_path spids:[1237])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSubPart
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.Pipeline
                                                children: [
                                                  (C {(echo)} {(DQ ($ VSub_DollarName '$filelist'))})
                                                  (C {(grep)} 
                                                    {(DQ ('^') (${ VSub_Name file2) (Lit_Other '$'))}
                                                  )
                                                  (C {(head)} {(-n1)})
                                                ]
                                                negated: F
                                              )
                                            ]
                                          )
                                        left_token: <Left_Backtick '`'>
                                        spids: [1238 1262]
                                      )
                                    }
                                  spids: [1237]
                                )
                              ]
                              spids: [1237]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(Lit_Other '[')} {(KW_Bang '!')} 
                                          {(DQ ($ VSub_DollarName '$file_path'))} {(Lit_Other ']')}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:file_path spids:[1282])
                                          op: Equal
                                          rhs: 
                                            {
                                              (word_part.CommandSubPart
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Pipeline
                                                        children: [
                                                          (C {(echo)} 
                                                            {(DQ ($ VSub_DollarName '$filelist'))}
                                                          )
                                                          (C {(grep)} 
                                                            {
                                                              (DQ (Lit_Other '\\') (/) 
                                                                (${ VSub_Name file) (Lit_Other '$')
                                                              )
                                                            }
                                                          )
                                                          (C {(head)} {(-n1)})
                                                        ]
                                                        negated: F
                                                      )
                                                    ]
                                                  )
                                                left_token: <Left_Backtick '`'>
                                                spids: [1283 1308]
                                              )
                                            }
                                          spids: [1282]
                                        )
                                      ]
                                      spids: [1282]
                                    )
                                    (command.AndOr
                                      ops: [Op_DAmp]
                                      children: [
                                        (C {(Lit_Other '[')} {(-z)} 
                                          {(DQ ($ VSub_DollarName '$file_path'))} {(Lit_Other ']')}
                                        )
                                        (command.ControlFlow
                                          token: <ControlFlow_Continue continue>
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [16777215 1279]
                                )
                              ]
                              spids: [16777215 1326]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:source_path spids:[1329])
                                  op: Equal
                                  rhs: 
                                    {(${ VSub_Name FIRMWARE_EXTRA_DIR) (/) (${ VSub_Name file_path)}
                                  spids: [1329]
                                )
                              ]
                              spids: [1329]
                            )
                            (command.AndOr
                              ops: [Op_DPipe]
                              children: [
                                (C {(Lit_Other '[')} {(-f)} {(${ VSub_Name source_path)} {(-o)} {(-h)} 
                                  {(${ VSub_Name source_path)} {(Lit_Other ']')}
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Continue continue>
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:target_dir spids:[1362])
                                  op: Equal
                                  rhs: 
                                    {(${ VSub_Name FIRMWARE_RESULT_DIR) (/) (${ VSub_Name file_path)}
                                  spids: [1362]
                                )
                              ]
                              spids: [1362]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:target_dir spids:[1372])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.BracedVarSub
                                        token: <VSub_Name target_dir>
                                        suffix_op: 
                                          (suffix_op.StringUnary
                                            op_id: VOp1_Percent
                                            arg_word: {(Lit_Slash /) ('*')}
                                          )
                                        spids: [1373 1378]
                                      )
                                    }
                                  spids: [1372]
                                )
                              ]
                              spids: [1372]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} 
                                          {(DQ (${ VSub_Name target_dir))} {(Lit_Other ']')}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [(C {(mkdir)} {(-p)} {(${ VSub_Name target_dir)})]
                                  spids: [16777215 1402]
                                )
                              ]
                              spids: [16777215 1417]
                            )
                            (command.AndOr
                              ops: [Op_DAmp Op_DPipe]
                              children: [
                                (C {(Lit_Other '[')} {(-h)} {(DQ (${ VSub_Name source_path))} {(-a)} 
                                  {(-e)} {(DQ (${ VSub_Name source_path))} {(Lit_Other ']')}
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:SSIZE spids:[1448])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.CommandSubPart
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {($ VSub_DollarName '$STAT')} {(-L)} {(-c)} 
                                                    {(Lit_Other '%') (s)} {(${ VSub_Name source_path)}
                                                  )
                                                ]
                                              )
                                            left_token: <Left_Backtick '`'>
                                            spids: [1449 1462]
                                          )
                                        }
                                      spids: [1448]
                                    )
                                  ]
                                  spids: [1448]
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:SSIZE spids:[1466])
                                      op: Equal
                                      rhs: 
                                        {
                                          (word_part.CommandSubPart
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(stat)} {(-c)} {(Lit_Other '%') (s)} 
                                                    {(${ VSub_Name source_path)}
                                                  )
                                                ]
                                              )
                                            left_token: <Left_Backtick '`'>
                                            spids: [1467 1478]
                                          )
                                        }
                                      spids: [1466]
                                    )
                                  ]
                                  spids: [1466]
                                )
                              ]
                            )
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$SSIZE'))} 
                                  {(Lit_Other ']')}
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Continue continue>
                                )
                              ]
                            )
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(Lit_Other '[')} {($ VSub_DollarName '$SSIZE')} {(-gt)} 
                                  {(DQ ($ VSub_DollarName '$B'))} {(Lit_Other ']')}
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Continue continue>
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:ret spids:[1523])
                                  op: Equal
                                  rhs: {(0)}
                                  spids: [1523]
                                )
                              ]
                              spids: [1523]
                            )
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(Lit_Other '[')} {(-h)} {(DQ (${ VSub_Name source_path))} 
                                  {(Lit_Other ']')}
                                )
                                (C {(${ VSub_Name action)} {(-f)} {(${ VSub_Name source_path)} 
                                  {(${ VSub_Name target_dir) (/)}
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:ret spids:[1560])
                                  op: Equal
                                  rhs: {($ VSub_QMark '$?')}
                                  spids: [1560]
                                )
                              ]
                              spids: [1560]
                            )
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(Lit_Other '[')} {(-e)} {(DQ (${ VSub_Name source_path))} 
                                  {(Lit_Other ']')}
                                )
                                (C {(${ VSub_Name action)} {(-f)} {(${ VSub_Name source_path)} 
                                  {(${ VSub_Name target_dir) (/)}
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:ret spids:[1594])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: (arith_expr.ArithWord w:{($ VSub_DollarName '$ret')})
                                            right: (arith_expr.ArithWord w:{($ VSub_QMark '$?')})
                                          )
                                        spids: [1595 1602]
                                      )
                                    }
                                  spids: [1594]
                                )
                              ]
                              spids: [1594]
                            )
                            (command.AndOr
                              ops: [Op_DAmp Op_DPipe]
                              children: [
                                (C {(Lit_Other '[')} {($ VSub_DollarName '$ret')} {(-le)} {(1)} 
                                  {(Lit_Other ']')}
                                )
                                (C {(echo)} {(DQ (${ VSub_Name file) (' SUCCESS'))})
                                (C {(echo)} {(DQ (${ VSub_Name file) (' FAIL'))})
                              ]
                            )
                          ]
                          spids: [1199 1638]
                        )
                      redirects: [
                        (redir.Redir
                          op: <Redir_Less '<'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$list')}
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(fw-2.log)})]
              spids: [1086 1645]
            )
          ]
          spids: [1031]
        )
      spids: [1028 1031]
    )
    (command.FuncDef
      name: licence_func
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} {(DQ ('Extracting licences'))})
            (C {(mkdir)} {(-p)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/licences)})
            (C {(find)} {(${ VSub_Name SRC_FW_DIR)} {(-type)} {(f)} {(-iname)} {(SQ <'licen?e*'>)} {(-exec)} 
              {(cp)} {(SQ <'{}'>)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/licences)} 
              {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\;'>)}
            )
          ]
          spids: [1659]
        )
      spids: [1654 1658]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$GIT_ALREADY_DOWNLOADED'))} 
                  {(KW_Bang '!') (Lit_Other '=')} {(DQ (yes))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(func_git)})
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(DQ (ERROR))})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [1752]
                )
              ]
            )
          ]
          spids: [16777215 1745]
        )
      ]
      spids: [16777215 1770]
    )
    (C {(cd)} {(${ VSub_Name CWD)})
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_DollarName '$DEST_FW_DIR'))} {(Lit_Other ']')})
        (C {(rm)} {(-rf)} {(DQ ($ VSub_DollarName '$DEST_FW_DIR'))})
      ]
    )
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$DEST_FW_DIR'))})
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(-f)} {(DQ (${ VSub_Name FIRMWARE_SFS))} {(Lit_Other ']')})
        (C {(rm)} {(-f)} {(${ VSub_Name FIRMWARE_SFS)})
      ]
    )
    (command.Sentence
      child: 
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:FW_FLAG spids:[1834])
              op: Equal
              rhs: {($ VSub_Number '$1')}
              spids: [1834]
            )
          ]
          spids: [1834]
        )
      terminator: <Op_Semi ';'>
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_DollarName '$FW_FLAG'))} {(-a)} {(-z)} 
                  {(DQ ($ VSub_DollarName '$CUTBYTES'))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Sentence
              child: 
                (C {(echo)} {(-n)} 
                  {
                    (DQ ('\n') ('Cut down firmware?\n') 
                      ('1. Cut down according to firmware.lst [default]\n') ('2. Cut down according to built modules (needs work)\n') ("3. Don't cut down\n") ('\n') 
                      ('Choose option: ')
                    )
                  }
                )
              terminator: <Op_Semi ';'>
            )
            (C {(read)} {(cdf)})
            (command.Case
              to_match: {($ VSub_DollarName '$cdf')}
              arms: [
                (case_arm
                  pat_list: [{(2)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:FW_FLAG spids:[1894])
                          op: Equal
                          rhs: {(DQ (big))}
                          spids: [1894]
                        )
                      ]
                      spids: [1894]
                    )
                  ]
                  spids: [1891 1892 1899 16777215]
                )
                (case_arm
                  pat_list: [{(3)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:FW_FLAG spids:[1905])
                          op: Equal
                          rhs: {(DQ (complete))}
                          spids: [1905]
                        )
                      ]
                      spids: [1905]
                    )
                  ]
                  spids: [1902 1903 1910 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:FW_FLAG spids:[1916])
                          op: Equal
                          rhs: {(DQ )}
                          spids: [1916]
                        )
                      ]
                      spids: [1916]
                    )
                  ]
                  spids: [1913 1914 1920 16777215]
                )
              ]
              spids: [1884 1888 1923]
            )
          ]
          spids: [16777215 1860]
        )
      ]
      spids: [16777215 1925]
    )
    (command.Case
      to_match: {($ VSub_DollarName '$FW_FLAG')}
      arms: [
        (case_arm
          pat_list: [{(complete)}]
          action: [
            (C {(mkdir)} {(-p)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
            (C {(echo)} {(DQ ('Copy all firmware'))})
            (C {(cp)} {(-an)} {(${ VSub_Name SRC_FW_DIR) (/) (Lit_Other '*')} 
              {(${ VSub_Name FIRMWARE_RESULT_DIR) (/)}
            )
            (C {(rm)} {(-rf)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/.git)} 
              {(${ VSub_Name FIRMWARE_RESULT_DIR) (/LICEN) (Lit_Other '*')}
            )
            (C {(licence_func)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name dest_kernel_package))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(cp)} {(-an)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/) (Lit_Other '*')} 
                      {(${ VSub_Name dest_kernel_package) (/)}
                    )
                    (C {(rm)} {(-r)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
                  ]
                  spids: [16777215 2006]
                )
              ]
              else_action: [
                (C {(mksquashfs)} {(zfirmware_workdir)} 
                  {
                    (word_part.BracedVarSub
                      token: <VSub_Name FIRMWARE_SFS>
                      suffix_op: 
                        (suffix_op.StringUnary
                          op_id: VOp1_DPound
                          arg_word: {('*') (Lit_Slash /)}
                        )
                      spids: [2041 2046]
                    )
                  } {(-comp)} {(xz)}
                )
                (command.SimpleCommand
                  words: [
                    {(md5sum)}
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name FIRMWARE_SFS>
                        suffix_op: 
                          (suffix_op.StringUnary
                            op_id: VOp1_DPound
                            arg_word: {('*') (Lit_Slash /)}
                          )
                        spids: [2055 2060]
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: 
                        {
                          (word_part.BracedVarSub
                            token: <VSub_Name FIRMWARE_SFS>
                            suffix_op: 
                              (suffix_op.StringUnary
                                op_id: VOp1_DPound
                                arg_word: {('*') (Lit_Slash /)}
                              )
                            spids: [2064 2069]
                          ) (.md5.txt)
                        }
                    )
                  ]
                )
              ]
              spids: [2034 2073]
            )
          ]
          spids: [1935 1936 2076 16777215]
        )
        (case_arm
          pat_list: [{(big)}]
          action: [
            (C {(echo)} {(DQ ('Extracting firmware'))})
            (C {(extract_firmware)})
            (C {(echo)})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:echo spids:[2103])
                  op: Equal
                  rhs: {(DQ ('Not filtering'))}
                  spids: [2103]
                )
              ]
              spids: [2103]
            )
            (C {(mv)} {(${ VSub_Name FIRMWARE_EXTRA_DIR)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
            (C {(licence_func)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name dest_kernel_package))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(cp)} {(-n)} {(-r)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/) (Lit_Other '*')} 
                      {(${ VSub_Name dest_kernel_package) (/)}
                    )
                  ]
                  spids: [16777215 2139]
                )
              ]
              spids: [16777215 2160]
            )
          ]
          spids: [2079 2080 2163 16777215]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [
            (command.Pipeline
              children: [
                (C {(grep)} {(SQ <'^File'>)} {($ VSub_DollarName '$SRC_FILE_FW')})
                (C {(grep)} {(-oE)} {(SQ <'\\: [a-zA-Z].*|\\: L.*|\\: [0-9].*'>)})
                (C {(sed)} {(SQ <'s/^\\: //'>)})
                (command.SimpleCommand
                  words: [{(grep)} {(-vE)} {(SQ <'liquidio|cxgb[34]|phanfw.bin'>)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(firmware.lst)})]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_DollarName '$CUTBYTES'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: 
                        (C {(echo)} {(-n)} 
                          {
                            (DQ ('\n') ('Cut down firmware more?\n') 
                              (
'1. Cut down with some big, mostly obscure firmware removed (default)\n'
                              ) ('2. Cut down eliminating fw bigger than 1.5MB - usually safe\n') 
                              (
'3. Cut down eliminating fw bigger than 1MB - may cut wifi support\n'
                              ) ('4. Cut down eliminating fw bigger than 500KB - use at own risk\n') 
                              ('5. Cut down eliminating fw bigger than 250KB - are you insane?\n') ('\n') ('Choose option: ')
                            )
                          }
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (C {(read)} {(cdfplus)})
                    (command.Case
                      to_match: {($ VSub_DollarName '$cdfplus')}
                      arms: [
                        (case_arm
                          pat_list: [{(2)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:CUTBYTES spids:[2266])
                                  op: Equal
                                  rhs: {(1500000)}
                                  spids: [2266]
                                )
                              ]
                              spids: [2266]
                            )
                          ]
                          spids: [2263 2264 2269 16777215]
                        )
                        (case_arm
                          pat_list: [{(3)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:CUTBYTES spids:[2275])
                                  op: Equal
                                  rhs: {(1000000)}
                                  spids: [2275]
                                )
                              ]
                              spids: [2275]
                            )
                          ]
                          spids: [2272 2273 2278 16777215]
                        )
                        (case_arm
                          pat_list: [{(4)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:CUTBYTES spids:[2284])
                                  op: Equal
                                  rhs: {(500000)}
                                  spids: [2284]
                                )
                              ]
                              spids: [2284]
                            )
                          ]
                          spids: [2281 2282 2287 16777215]
                        )
                        (case_arm
                          pat_list: [{(5)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:CUTBYTES spids:[2293])
                                  op: Equal
                                  rhs: {(250000)}
                                  spids: [2293]
                                )
                              ]
                              spids: [2293]
                            )
                          ]
                          spids: [2290 2291 2296 16777215]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:CUTBYTES spids:[2302])
                                  op: Equal
                                  rhs: {(0)}
                                  spids: [2302]
                                )
                              ]
                              spids: [2302]
                            )
                          ]
                          spids: [2299 2300 2305 16777215]
                        )
                      ]
                      spids: [2256 2260 2308]
                    )
                  ]
                  spids: [16777215 2230]
                )
              ]
              spids: [16777215 2311]
            )
            (C {(echo)} {(DQ ('Extracting firmware'))})
            (C {(extract_firmware)})
            (C {(echo)})
            (C {(fw_filter)} {(firmware.lst)} {($ VSub_DollarName '$CUTBYTES')})
            (C {(find)} {(${ VSub_Name FIRMWARE_EXTRA_DIR)} {(-type)} {(d)} {(-empty)} {(-delete)})
            (C {(licence_func)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name dest_kernel_package))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(cp)} {(-n)} {(-r)} {(${ VSub_Name FIRMWARE_RESULT_DIR) (/) (Lit_Other '*')} 
                      {(${ VSub_Name dest_kernel_package) (/)}
                    )
                  ]
                  spids: [16777215 2375]
                )
              ]
              spids: [16777215 2396]
            )
            (C {(rm)} {(-r)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
            (C {(mv)} {(${ VSub_Name FIRMWARE_EXTRA_DIR)} {(${ VSub_Name FIRMWARE_RESULT_DIR)})
            (C {(mksquashfs)} {(zfirmware_workdir)} {(${ VSub_Name FIRMWARE_SFS)} {(-comp)} {(xz)})
            (command.SimpleCommand
              words: [{(md5sum)} {(${ VSub_Name FIRMWARE_SFS)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(${ VSub_Name FIRMWARE_SFS) (.md5.txt)}
                )
              ]
            )
          ]
          spids: [2166 2167 2450 16777215]
        )
      ]
      spids: [1928 1932 2452]
    )
    (command.Subshell
      child: 
        (command.CommandList
          children: [
            (C {(echo)} {(SQ <'================'>)})
            (C {(echo)} {(DQ ('FIRMWARE IN FDRV'))})
            (C {(echo)} {(SQ <'================'>)})
            (C {(cat)} {(fw-1.log)})
            (C {(echo)} {(SQ <'=============================='>)})
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(-f)} {(${ VSub_Name list) (.log)} {(Lit_Other ']')})
                (C {(cat)} {(${ VSub_Name list) (.log)})
                (C {(rm)} {(${ VSub_Name list) (.log)})
              ]
            )
          ]
        )
      redirects: [(redir.Redir op:<Redir_AndDGreat '&>>'> fd:16777215 arg_word:{(build.log)})]
      spids: [2455 2520]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_DollarName '$DEBUG')} {(-ne)} {(1)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(rm)} {(-f)} {(fw-) (Lit_Other '*') (.log)})
            (C {(rm)} {(-rf)} {(zfirmware_workdir)})
          ]
          spids: [16777215 2544]
        )
      ]
      spids: [16777215 2562]
    )
    (C {(echo)} {(DQ ('Firmware script complete.'))})
  ]
)