(BraceGroup
  children: [
    (C {<.>} {<'/DietPi/dietpi/func/dietpi-globals'>})
    (C {<G_CHECK_ROOT_USER>})
    (C {<G_CHECK_ROOTFS_RW>})
    (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Bugreport>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UPLOAD_FILESIZE_LIMIT)
          op: assign_op.Equal
          rhs: {<83886080>}
          spids: [87]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UPLOAD_FILESIZE)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [91]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DATE_CURRENT)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: (C {<date>} {<Id.Lit_Other '+'> (DQ <'%d-%m-%Y'>)})
              )
            }
          spids: [96]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ONLINE_BUG_REPORT)
          op: assign_op.Equal
          rhs: {<1>}
          spids: [108]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CREATE_BUG_REPORT)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [112]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BUG_REPORT_COMPLETED)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [116]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIQUE_ID_HW)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: (C {<sed>} {<-n>} {<5p>} {<'/DietPi/dietpi/.hw_model'>})
              )
            }
          spids: [121]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIQUE_ID_BUGNUMBER)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [133]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:INTERNET_AVAILABLE)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [137]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FTP_ADDR)
          op: assign_op.Equal
          rhs: {(DQ <dietpi.com>)}
          spids: [142]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FTP_USER)
          op: assign_op.Equal
          rhs: {(DQ <dietpi-survey>)}
          spids: [148]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FTP_PASS)
          op: assign_op.Equal
          rhs: {(DQ <raspberry13>)}
          spids: [154]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILEPATH_TEMP)
          op: assign_op.Equal
          rhs: {(DQ <'/tmp/dietpi-bugreport'>)}
          spids: [161]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILE_GENERATED_ZIP)
          op: assign_op.Equal
          rhs: {(DQ <bugreport.zip>)}
          spids: [168]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILE_BUGREPORT_TEXT)
          op: assign_op.Equal
          rhs: {(DQ <bugreport.txt>)}
          spids: [174]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILE_BUG_NUMBER)
          op: assign_op.Equal
          rhs: {(DQ <'/DietPi/dietpi/.bug_id'>)}
          spids: [180]
        )
      ]
    )
    (command.ShFunction
      name: Generate_Template_Doc
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<_EOF_>}
                      here_end_span_id: 246
                      stdin_parts: [
                        <'----------------------------------------------------------------\n'>
                        <' DietPi : Bug Report\n'>
                        <' #Date\n'>
                        <'----------------------------------------------------------------\n'>
                        <' Please fill out the information regarding your issue.\n'>
                        <'\n'>
                        <' When completed, save and exit nano:\n'>
                        <' - Press CTRL+X\n'>
                        <' - Press Y\n'>
                        <' - Press Enter\n'>
                        <'\n'>
                        <'----------------------------------------------------------------\n'>
                        <' Your contact information\n'>
                        <'----------------------------------------------------------------\n'>
                        <'Email address =\n'>
                        <'Name          =\n'>
                        <'\n'>
                        <'\n'>
                        <'----------------------------------------------------------------\n'>
                        <' Short Description of the issue (eg: Desktop wont start):\n'>
                        <'----------------------------------------------------------------\n'>
                        <'\n'>
                        <'\n'>
                        <'----------------------------------------------------------------\n'>
                        <' When does the issue occur? (eg: I tried to run startx):\n'>
                        <'----------------------------------------------------------------\n'>
                        <'\n'>
                        <'\n'>
                        <'----------------------------------------------------------------\n'>
                        <' Error Codes (if applicable):\n'>
                        <'----------------------------------------------------------------\n'>
                        <'\n'>
                        <'\n'>
                        <'----------------------------------------------------------------\n'>
                        <' Additional Notes:\n'>
                        <'----------------------------------------------------------------\n'>
                        <'\n'>
                        <'\n'>
                        <'End of Line ;)\n'>
                      ]
                    )
                )
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ ($ Id.VSub_DollarName '$FILE_BUGREPORT_TEXT'))}
                )
              ]
              do_fork: T
            )
            (C {<sed>} {<-i>} 
              {
                (DQ <'/#Date/c'> <Id.Lit_BadBackslash '\\'> <' '> ($ Id.VSub_DollarName '$DATE_CURRENT'))
              } {(DQ ($ Id.VSub_DollarName '$FILE_BUGREPORT_TEXT'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: Generate_Zip_File
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'zip_settings='> (DQ <-9>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {($ Id.VSub_DollarName '$ONLINE_BUG_REPORT')}
                                  right: {<Id.Lit_Digits 1>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:FILE_GENERATED_ZIP)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ <bugreport-> ($ Id.VSub_DollarName '$UNIQUE_ID_HW') <-> 
                                ($ Id.VSub_DollarName '$UNIQUE_ID_BUGNUMBER') <.zip>
                              )
                            }
                          spids: [320]
                        )
                      ]
                    )
                  ]
                  spids: [302 316]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:FILE_GENERATED_ZIP)
                      op: assign_op.Equal
                      rhs: {(DQ <bugreport.zip>)}
                      spids: [339]
                    )
                  ]
                )
              ]
            )
            (C {<zip>} {(DQ ($ Id.VSub_DollarName '$zip_settings'))} 
              {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))} {(DQ ($ Id.VSub_DollarName '$FILE_BUGREPORT_TEXT'))}
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'afile_list='> 
                (sh_array_literal
                  left: <Id.Op_LParen _>
                  words: [
                    {(DQ <'/var/log/*'>)}
                    {(DQ <'/DietPi/*'>)}
                    {(DQ <'/boot/dietpi.txt'>)}
                    {(DQ <'/boot/config.txt'>)}
                    {(DQ <'/boot/dietpi/*'>)}
                    {(DQ <'/var/tmp/dietpi/logs/*'>)}
                    {(DQ <'/var/lib/dietpi/*'>)}
                    {(DQ <'/etc/X11/xorg.conf'>)}
                    {(DQ <'/etc/bash.bashrc'>)}
                    {(DQ <'/etc/rc.local'>)}
                    {(DQ <'/etc/asound.conf'>)}
                    {(DQ <'/etc/network/interfaces'>)}
                    {(DQ <'/etc/fstab'>)}
                    {(DQ <'/etc/dphys-swapfile'>)}
                    {(DQ <'/etc/sysctl.conf'>)}
                    {(DQ <'/etc/sysctl.d/*'>)}
                    {(DQ <'/root/.bashrc'>)}
                    {(DQ <'/etc/init.d/*'>)}
                    {(DQ <'/etc/systemd/*'>)}
                    {(DQ <'/etc/apt/sources.list'>)}
                    {(DQ <'/etc/apt/sources.list.d/*'>)}
                  ]
                )
              }
            )
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Id.Arith_Equal
                  left: <Id.Lit_ArithVarLike i>
                  right: {<Id.Lit_Digits 0>}
                )
              cond: 
                (arith_expr.Binary
                  op_id: Id.Arith_Less
                  left: <Id.Lit_ArithVarLike i>
                  right: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name afile_list>
                        prefix_op: (Id.VSub_Pound)
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike i>)
              body: 
                (command.DoGroup
                  children: [
                    (C {<zip>} {<-r>} {(DQ ($ Id.VSub_DollarName '$zip_settings'))} 
                      {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))} 
                      {
                        (braced_var_sub
                          token: <Id.VSub_Name afile_list>
                          bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')})
                        )
                      }
                    )
                  ]
                )
            )
            (C {<unset>} {<afile_list>})
            (C {<local>} 
              {<Id.Lit_VarLike 'acommand_list='> 
                (sh_array_literal
                  left: <Id.Op_LParen _>
                  words: [
                    {(DQ <'ls -lha /var/log'>)}
                    {(DQ <'dpkg -l'>)}
                    {(DQ <'ifconfig -a'>)}
                    {(DQ <iwconfig>)}
                    {(DQ <'ip a'>)}
                    {(DQ <lsusb>)}
                    {(DQ <'cat /proc/cpuinfo'>)}
                    {(DQ <'ps aux'>)}
                    {(DQ <blkid>)}
                    {(DQ <mount>)}
                    {(DQ <'df -h'>)}
                    {(DQ <'ls /etc/rc*.d/'>)}
                    {(DQ <'cut -d: -f1 /etc/passwd'>)}
                    {(DQ <locale>)}
                    {(DQ <'ls -lha /mnt'>)}
                    {(DQ <dmesg>)}
                    {(DQ <lsmod>)}
                    {(DQ <'systemctl status *.service -l'>)}
                    {(DQ <'systemctl status *.mount -l'>)}
                    {(DQ <'/DietPi/dietpi/dietpi-services status'>)}
                  ]
                )
              }
            )
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Id.Arith_Equal
                  left: <Id.Lit_ArithVarLike i>
                  right: {<Id.Lit_Digits 0>}
                )
              cond: 
                (arith_expr.Binary
                  op_id: Id.Arith_Less
                  left: <Id.Lit_ArithVarLike i>
                  right: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name acommand_list>
                        prefix_op: (Id.VSub_Pound)
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike i>)
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [
                        {
                          (braced_var_sub
                            token: <Id.VSub_Name acommand_list>
                            bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')})
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<command_output_> ($ Id.VSub_DollarName '$i') <.txt>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<zip>} {<-r>} {(DQ ($ Id.VSub_DollarName '$zip_settings'))} 
                      {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))} {<command_output_> ($ Id.VSub_DollarName '$i') <.txt>}
                    )
                    (C {<rm>} {<command_output_> ($ Id.VSub_DollarName '$i') <.txt>})
                  ]
                )
            )
            (C {<unset>} {<acommand_list>})
          ]
        )
    )
    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))})
    (C {<cd>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))})
    (C {<G_CHECK_URL>} {(DQ ($ Id.VSub_DollarName '$FTP_ADDR'))})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_QMark '$?')}
                          right: {<Id.Lit_Digits 0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INTERNET_AVAILABLE)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [861]
                )
              ]
            )
          ]
          spids: [843 857]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$INTERNET_AVAILABLE')}
                          right: {<Id.Lit_Digits 0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<clear>})
            (C {<whiptail>} {<--title>} {(DQ <Offline>)} {<--yesno>} 
              {
                (DQ <'Error: Unable to connect to '> ($ Id.VSub_DollarName '$FTP_ADDR') 
                  <Id.Lit_BadBackslash '\\'> <'n- Make sure a network device is installed.'> <Id.Lit_BadBackslash '\\'> 
                  <'n- Check your network connection is functional.'> <Id.Lit_BadBackslash '\\'> <'n- '> ($ Id.VSub_DollarName '$FTP_ADDR') <' may be offline.'> 
                  <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'n Would you like to generate an offline bug report?'> 
                  <Id.Lit_BadBackslash '\\'> <'n - /DietPi/bugreport.zip'>
                )
              } {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Exit>)} {<--defaultno>} {<--backtitle>} 
              {(DQ <'DietPi Bug Report'>)} {<14>} {<70>}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CHOICE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [950]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {($ Id.VSub_DollarName '$CHOICE')}
                                  right: {<Id.Lit_Digits 0>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ONLINE_BUG_REPORT)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [972]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CREATE_BUG_REPORT)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [976]
                        )
                      ]
                    )
                  ]
                  spids: [954 968]
                )
              ]
            )
          ]
          spids: [874 888]
        )
      ]
      else_action: [
        (C {<whiptail>} {<--title>} {(DQ <'Send DietPi Bug Report?'>)} {<--yesno>} 
          {
            (DQ <'DietPi will generate and upload a bug report for your system.'> 
              <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'nThis file will contain:'> <Id.Lit_BadBackslash '\\'> 
              <'n- Your description of the bug/issue.'> <Id.Lit_BadBackslash '\\'> <'n- DietPi settings.'> <Id.Lit_BadBackslash '\\'> <'n- Log files.'> 
              <Id.Lit_BadBackslash '\\'> <'n- Config files specific to DietPi.'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> 
              <'nDo you wish to continue?'>
            )
          } {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Exit>)} {<--defaultno>} {<--backtitle>} 
          {(DQ <'DietPi Bug Report'>)} {<15>} {<70>}
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:CHOICE)
              op: assign_op.Equal
              rhs: {($ Id.VSub_QMark '$?')}
              spids: [1048]
            )
          ]
        )
        (command.If
          arms: [
            (if_arm
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Id.Arith_DEqual
                              left: {($ Id.VSub_DollarName '$CHOICE')}
                              right: {<Id.Lit_Digits 0>}
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ONLINE_BUG_REPORT)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [1070]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:CREATE_BUG_REPORT)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [1074]
                    )
                  ]
                )
              ]
              spids: [1052 1066]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$CREATE_BUG_REPORT')}
                          right: {<Id.Lit_Digits 1>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                              {(DQ ($ Id.VSub_DollarName '$FILE_BUGREPORT_TEXT'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<Generate_Template_Doc>})]
                  spids: [1121 1136]
                )
              ]
            )
            (C {<nano>} {(DQ ($ Id.VSub_DollarName '$FILE_BUGREPORT_TEXT'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} 
                              {(DQ ($ Id.VSub_DollarName '$FILE_BUG_NUMBER'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:UNIQUE_ID_BUGNUMBER)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$FILE_BUG_NUMBER'))})
                              )
                            }
                          spids: [1185]
                        )
                      ]
                    )
                  ]
                  spids: [1168 1181]
                )
              ]
            )
            (C {<Generate_Zip_File>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {($ Id.VSub_DollarName '$ONLINE_BUG_REPORT')}
                                  right: {<Id.Lit_Digits 0>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<rm>} {<'/DietPi/bugreport.zip'>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_AndGreat '&>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<cp>}
                        {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))}
                        {<'/DietPi/bugreport.zip'>}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_AndGreat '&>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BUG_REPORT_COMPLETED)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [1265]
                        )
                      ]
                    )
                  ]
                  spids: [1220 1234]
                )
              ]
              else_action: [
                (C {<G_CHECK_URL>} {(DQ ($ Id.VSub_DollarName '$FTP_ADDR'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DParen
                                  child: 
                                    (arith_expr.Binary
                                      op_id: Id.Arith_DEqual
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<Id.Lit_Digits 0>}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:UPLOAD_FILESIZE)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (C {<stat>} {<-c> <Id.Lit_Other '%'> <s>} 
                                        {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))}
                                      )
                                  )
                                }
                              spids: [1311]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DParen
                                          child: 
                                            (arith_expr.Binary
                                              op_id: Id.Arith_Great
                                              left: {($ Id.VSub_DollarName '$UPLOAD_FILESIZE')}
                                              right: {($ Id.VSub_DollarName '$UPLOAD_FILESIZE_LIMIT')}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:BUG_REPORT_COMPLETED)
                                      op: assign_op.Equal
                                      rhs: {<-2>}
                                      spids: [1348]
                                    )
                                  ]
                                )
                              ]
                              spids: [1330 1344]
                            )
                          ]
                          else_action: [
                            (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Uploading bug report, please wait...'>)})
                            (C {<wput>} {<--timeout> <Id.Lit_Equals '='> <10th-4>} 
                              {<--tries> <Id.Lit_Equals '='> <1>} {<--waitretry> <Id.Lit_Equals '='> <2>} {<-B>} {<-u>} {(DQ ($ Id.VSub_DollarName '$FILE_GENERATED_ZIP'))} 
                              {<ftp> <Id.Lit_Colon ':'> <'//'> (DQ ($ Id.VSub_DollarName '$FTP_USER')) 
                                <Id.Lit_Colon ':'> (DQ ($ Id.VSub_DollarName '$FTP_PASS')) <Id.Lit_At '@'> (DQ ($ Id.VSub_DollarName '$FTP_ADDR'))
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BUG_REPORT_COMPLETED)
                                  op: assign_op.Equal
                                  rhs: {<1>}
                                  spids: [1408]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                      spids: [1289 1303]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BUG_REPORT_COMPLETED)
                          op: assign_op.Equal
                          rhs: {<-1>}
                          spids: [1421]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [1095 1109]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$BUG_REPORT_COMPLETED')}
                          right: {<Id.Lit_Digits 1>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {($ Id.VSub_DollarName '$ONLINE_BUG_REPORT')}
                                  right: {<Id.Lit_Digits 0>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<whiptail>} {<--title>} {(DQ <'Bug Report Created'>)} {<--msgbox>} 
                      {
                        (DQ <'Your offline bug report has been generated:'> <Id.Lit_BadBackslash '\\'> 
                          <'n - /DietPi/bugreport.zip'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> 
                          <'nContact DietPi for support using one of the below:'> <Id.Lit_BadBackslash '\\'> <'n- Github Issue : https://github.com/Fourdee/DietPi/issues'> 
                          <Id.Lit_BadBackslash '\\'> <'n- RPi Forum    : https://goo.gl/QzyTVm'> <Id.Lit_BadBackslash '\\'> 
                          <'n- Odroid Forum : http://goo.gl/26owYc'> <Id.Lit_BadBackslash '\\'> <'n- DietPi Forum : http://dietpi.com/phpbb/viewforum.php?f=9'>
                        )
                      } {<--backtitle>} {(DQ <'DietPi Bug Report'>)} {<16>} {<70>}
                    )
                    (C {<'/DietPi/dietpi/dietpi-banner'>} {<1>})
                    (C {<echo>} {<-e>} 
                      {
                        (DQ <Id.Lit_BadBackslash '\\'> 
                          <'n Bug report generated. /DietPi/bugreport.zip '> <Id.Lit_BadBackslash '\\'> <'n '>
                        )
                      }
                    )
                  ]
                  spids: [1467 1481]
                )
              ]
              else_action: [
                (C {<whiptail>} {<--title>} {(DQ <'Bug Report Sent'>)} {<--msgbox>} 
                  {
                    (DQ <'Your bug report has been sent.'> <Id.Lit_BadBackslash '\\'> 
                      <
'nPlease make note of your reference code below. This will need to be used when contacting DietPi for support.'
                      > <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'n Reference CODE: '> 
                      ($ Id.VSub_DollarName '$UNIQUE_ID_HW') <-> ($ Id.VSub_DollarName '$UNIQUE_ID_BUGNUMBER') <' '> <Id.Lit_BadBackslash '\\'> <n> 
                      <Id.Lit_BadBackslash '\\'> <'nContact DietPi for support using one of the below:'> <Id.Lit_BadBackslash '\\'> 
                      <'n- Github Issue : https://github.com/Fourdee/DietPi/issues'> <Id.Lit_BadBackslash '\\'> <'n- RPi Forum    : https://goo.gl/QzyTVm'> <Id.Lit_BadBackslash '\\'> 
                      <'n- Odroid Forum : http://goo.gl/26owYc'> <Id.Lit_BadBackslash '\\'> <'n- DietPi Forum : http://dietpi.com/phpbb/viewforum.php?f=9'>
                    )
                  } {<--backtitle>} {(DQ <'DietPi Bug Report'>)} {<18>} {<70>}
                )
                (C {<'/DietPi/dietpi/dietpi-banner'>} {<1>})
                (C {<echo>} {<-e>} 
                  {
                    (DQ <Id.Lit_BadBackslash '\\'> <'n Bug report Sent. Thank you.'> 
                      <Id.Lit_BadBackslash '\\'> <'n Your reference code: '> ($ Id.VSub_DollarName '$UNIQUE_ID_HW') <-> 
                      ($ Id.VSub_DollarName '$UNIQUE_ID_BUGNUMBER') <' '> <Id.Lit_BadBackslash '\\'> <n>
                    )
                  }
                )
              ]
            )
            (command.DParen
              child: 
                (arith_expr.UnaryAssign
                  op_id: Id.Node_PostDPlus
                  child: <Id.Lit_ArithVarLike UNIQUE_ID_BUGNUMBER>
                )
            )
            (command.Simple
              words: [{<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$UNIQUE_ID_BUGNUMBER'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ ($ Id.VSub_DollarName '$FILE_BUG_NUMBER'))}
                )
              ]
              do_fork: T
            )
          ]
          spids: [1445 1459]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$BUG_REPORT_COMPLETED')}
                          right: (arith_expr.Unary op_id:Id.Node_UnaryMinus child:{<Id.Lit_Digits 1>})
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<whiptail>} {<--title>} {(DQ <'Upload failed'>)} {<--msgbox>} 
              {
                (DQ <'Error: Unable to upload Bug report.'> <Id.Lit_BadBackslash '\\'> <n> 
                  <Id.Lit_BadBackslash '\\'> <'nConnection to '> ($ Id.VSub_DollarName '$FTP_ADDR') <' has failed:'> <Id.Lit_BadBackslash '\\'> 
                  <'n- Check your network connection is functional.'> <Id.Lit_BadBackslash '\\'> <'n- Please try again later.'>
                )
              } {<--backtitle>} {(DQ <'DietPi Bug Report'>)} {<12>} {<70>}
            )
            (C {<'/DietPi/dietpi/dietpi-banner'>} {<1>})
          ]
          spids: [1661 1676]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$BUG_REPORT_COMPLETED')}
                          right: (arith_expr.Unary op_id:Id.Node_UnaryMinus child:{<Id.Lit_Digits 2>})
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<whiptail>} {<--title>} {(DQ <'Bug report upload failed'>)} {<--msgbox>} 
              {
                (DQ <'Error: Bug report file exceeds size limit'> <Id.Lit_BadBackslash '\\'> 
                  <'n - Max size = '> 
                  (word_part.ArithSub
                    anode: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Slash
                        left: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Slash
                            left: {($ Id.VSub_DollarName '$UPLOAD_FILESIZE_LIMIT')}
                            right: {<Id.Lit_Digits 1024>}
                          )
                        right: {<Id.Lit_Digits 1024>}
                      )
                  ) <MB> <Id.Lit_BadBackslash '\\'> <'n - Bug report size = '> 
                  (word_part.ArithSub
                    anode: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Slash
                        left: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Slash
                            left: {($ Id.VSub_DollarName '$UPLOAD_FILESIZE')}
                            right: {<Id.Lit_Digits 1024>}
                          )
                        right: {<Id.Lit_Digits 1024>}
                      )
                  ) <MB> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'nThis bug report has NOT been sent.'>
                )
              } {<--backtitle>} {(DQ <'DietPi Bug Report'>)} {<12>} {<60>}
            )
            (C {<'/DietPi/dietpi/dietpi-banner'>} {<1>})
          ]
          spids: [1725 1740]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: {($ Id.VSub_DollarName '$CREATE_BUG_REPORT')}
                          right: {<Id.Lit_Digits 0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<'/DietPi/dietpi/dietpi-banner'>} {<1>})
            (C {<echo>} {<-e>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> <'nBug report aborted by user.'> 
                  <Id.Lit_BadBackslash '\\'> <n>
                )
              }
            )
          ]
          spids: [1817 1831]
        )
      ]
    )
    (C {<cd>} {(DQ ($ Id.VSub_DollarName '$HOME'))})
    (command.Simple
      words: [{<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))}]
      redirects: [(redir op:<Id.Redir_AndGreat '&>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)