(BraceGroup
  left: <Id.Lit_LBrace '{'>
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'INPUT='> name:INPUT)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [71]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_EqualTilde
                          left: {($ Id.VSub_Number 1)}
                          right: 
                            {<Id.Lit_Other '^'> <-> <Id.Lit_Other '?'> <Id.Lit_Other '['> <0-9> 
                              <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other '$'>
                            }
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'INPUT='> name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                  spids: [99]
                )
              ]
              redirects: []
            )
          ]
          spids: [75 95]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<.>} {<'/DietPi/dietpi/func/dietpi-globals'>})
    (C {<G_CHECK_ROOT_USER>})
    (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-LED_control>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FP_SETTINGS='> name:FP_SETTINGS)
          op: assign_op.Equal
          rhs: {(SQ <'/DietPi/dietpi/.dietpi-led_control'>)}
          spids: [133]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'aLED_NAME='> name:aLED_NAME)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [140]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'aLED_SETTING_AVAILABLE='>
              name: aLED_SETTING_AVAILABLE
            )
          op: assign_op.Equal
          rhs: {<0>}
          spids: [144]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'aLED_SETTING_CURRENT='>
              name: aLED_SETTING_CURRENT
            )
          op: assign_op.Equal
          rhs: {<0>}
          spids: [148]
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name: Init_LED_Info
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'aLED_NAME='> name:aLED_NAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: (C {<ls>} {<'/sys/class/leds'>})
                              right: <Id.Eof_RParen _>
                            )
                          }
                        ]
                      )
                    }
                  spids: [160]
                )
              ]
              redirects: []
            )
            (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
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name aLED_NAME>
                        var_name: aLED_NAME
                        prefix_op: <Id.VSub_Pound '#'>
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:($ Id.Lit_ArithVarLike i))
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.IndexedName
                              left: <Id.Lit_ArrayLhsOpen 'aLED_SETTING_AVAILABLE['>
                              name: aLED_SETTING_AVAILABLE
                              index: {($ Id.VSub_DollarName i)}
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<cat>} 
                                        {<'/sys/class/leds/'> 
                                          (braced_var_sub
                                            left: <Id.Left_DollarBrace '${'>
                                            token: <Id.VSub_Name aLED_NAME>
                                            var_name: aLED_NAME
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: {($ Id.VSub_DollarName i)}
                                              )
                                            right: <Id.Right_DollarBrace '}'>
                                          ) <'/trigger'>
                                        }
                                      )
                                      (C {<tr>} {<-d>} {(SQ <'[]'>)})
                                    ]
                                    negated: F
                                    stderr_indices: []
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          spids: [206]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.IndexedName
                              left: <Id.Lit_ArrayLhsOpen 'aLED_SETTING_CURRENT['>
                              name: aLED_SETTING_CURRENT
                              index: {($ Id.VSub_DollarName i)}
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<cat>} 
                                        {<'/sys/class/leds/'> 
                                          (braced_var_sub
                                            left: <Id.Left_DollarBrace '${'>
                                            token: <Id.VSub_Name aLED_NAME>
                                            var_name: aLED_NAME
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: {($ Id.VSub_DollarName i)}
                                              )
                                            right: <Id.Right_DollarBrace '}'>
                                          ) <'/trigger'>
                                        }
                                      )
                                      (C {<grep>} {<-o>} {(SQ <'\\[.*\\]'>)})
                                      (C {<tr>} {<-d>} {(SQ <'[]'>)})
                                    ]
                                    negated: F
                                    stderr_indices: []
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          spids: [235]
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: 
                                    {
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name aLED_NAME>
                                        var_name: aLED_NAME
                                        prefix_op: <Id.VSub_Pound '#'>
                                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    }
                                  right: {<Id.Lit_Digits 0>}
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<G_DIETPI-NOTIFY>} {<1>} 
                      {(SQ <'Unable to find any supported LEDS on this device.'>)}
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
                  ]
                  spids: [279 299]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: Settings_Write_Apply
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<rm>} {(DQ ($ Id.VSub_DollarName FP_SETTINGS))}]
              redirects: [
                (redir
                  op: <Id.Redir_AndGreat '&>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
              ]
              more_env: []
              do_fork: T
            )
            (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-LED_Control>} {(DQ <'Applying LED triggers'>)})
            (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
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name aLED_NAME>
                        var_name: aLED_NAME
                        prefix_op: <Id.VSub_Pound '#'>
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:($ Id.Lit_ArithVarLike i))
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {<-e>}
                        {
                          (DQ 
                            (braced_var_sub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Name aLED_SETTING_CURRENT>
                              var_name: aLED_SETTING_CURRENT
                              bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                              right: <Id.Right_DollarBrace '}'>
                            )
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {
                              (DQ <'/sys/class/leds/'> 
                                (braced_var_sub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name aLED_NAME>
                                  var_name: aLED_NAME
                                  bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                  right: <Id.Right_DollarBrace '}'>
                                ) <'/trigger'>
                              )
                            }
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                    (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>}
                                        )
                                      redirects: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<G_DIETPI-NOTIFY>} {<0>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name aLED_NAME>
                                    var_name: aLED_NAME
                                    bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                    right: <Id.Right_DollarBrace '}'>
                                  ) <': '> 
                                  (braced_var_sub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name aLED_SETTING_CURRENT>
                                    var_name: aLED_SETTING_CURRENT
                                    bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                )
                              }
                            )
                          ]
                          spids: [412 426]
                        )
                      ]
                      else_action: [
                        (C {<G_DIETPI-NOTIFY>} {<1>} 
                          {
                            (DQ 
                              (braced_var_sub
                                left: <Id.Left_DollarBrace '${'>
                                token: <Id.VSub_Name aLED_NAME>
                                var_name: aLED_NAME
                                bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                right: <Id.Right_DollarBrace '}'>
                              ) <': '> 
                              (braced_var_sub
                                left: <Id.Left_DollarBrace '${'>
                                token: <Id.VSub_Name aLED_SETTING_CURRENT>
                                var_name: aLED_SETTING_CURRENT
                                bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                right: <Id.Right_DollarBrace '}'>
                              )
                            )
                          }
                        )
                      ]
                      redirects: []
                    )
                    (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: 509
                              stdin_parts: [
                                (braced_var_sub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name aLED_NAME>
                                  var_name: aLED_NAME
                                  bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                  right: <Id.Right_DollarBrace '}'>
                                )
                                <' '>
                                (braced_var_sub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name aLED_SETTING_CURRENT>
                                  var_name: aLED_SETTING_CURRENT
                                  bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName i)})
                                  right: <Id.Right_DollarBrace '}'>
                                )
                                <'\n'>
                              ]
                            )
                        )
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(DQ ($ Id.VSub_DollarName FP_SETTINGS))}
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                  ]
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: Settings_Read
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName FP_SETTINGS))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<local>} {<Id.Lit_VarLike 'index='> <0>})
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: (condition.Shell commands:[(C {<read>} {<-r>} {<line>})])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.DParen
                                              child: 
                                                (arith_expr.Binary
                                                  op_id: Id.Arith_Less
                                                  left: {($ Id.VSub_DollarName index)}
                                                  right: 
                                                    {
                                                      (braced_var_sub
                                                        left: <Id.Left_DollarBrace '${'>
                                                        token: <Id.VSub_Name aLED_NAME>
                                                        var_name: aLED_NAME
                                                        prefix_op: <Id.VSub_Pound '#'>
                                                        bracket_op: 
                                                          (bracket_op.WholeArray
                                                            op_id: Id.Lit_At
                                                          )
                                                        right: <Id.Right_DollarBrace '}'>
                                                      )
                                                    }
                                                )
                                              redirects: []
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (command.Sentence
                                                  child: 
                                                    (C {<Id.Lit_LBracket '['>} 
                                                      {
                                                        (DQ 
                                                          (braced_var_sub
                                                            left: <Id.Left_DollarBrace '${'>
                                                            token: <Id.VSub_Name aLED_NAME>
                                                            var_name: aLED_NAME
                                                            bracket_op: 
                                                              (bracket_op.ArrayIndex
                                                                expr: {($ Id.VSub_DollarName index)}
                                                              )
                                                            right: <Id.Right_DollarBrace '}'>
                                                          )
                                                        )
                                                      } {<Id.Lit_Equals '='>} 
                                                      {
                                                        (DQ 
                                                          (command_sub
                                                            left_token: <Id.Left_DollarParen '$('>
                                                            child: 
                                                              (command.Pipeline
                                                                children: [
                                                                  (C {<echo>} {<-e>} 
                                                                    {($ Id.VSub_DollarName line)}
                                                                  )
                                                                  (C {<awk>} {(SQ <'{print $1}'>)})
                                                                ]
                                                                negated: F
                                                                stderr_indices: []
                                                              )
                                                            right: <Id.Eof_RParen _>
                                                          )
                                                        )
                                                      } {<Id.Lit_RBracket ']'>}
                                                    )
                                                  terminator: <Id.Op_Semi _>
                                                )
                                              ]
                                            )
                                          action: [
                                            (command.ShAssignment
                                              pairs: [
                                                (assign_pair
                                                  lhs: 
                                                    (sh_lhs_expr.IndexedName
                                                      left: 
                                                        <Id.Lit_ArrayLhsOpen 'aLED_SETTING_CURRENT['>
                                                      name: aLED_SETTING_CURRENT
                                                      index: {($ Id.VSub_DollarName index)}
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (command_sub
                                                        left_token: <Id.Left_DollarParen '$('>
                                                        child: 
                                                          (command.Pipeline
                                                            children: [
                                                              (C {<echo>} {<-e>} 
                                                                {(DQ ($ Id.VSub_DollarName line))}
                                                              )
                                                              (C {<awk>} {(SQ <'{print $2}'>)})
                                                            ]
                                                            negated: F
                                                            stderr_indices: []
                                                          )
                                                        right: <Id.Eof_RParen _>
                                                      )
                                                    }
                                                  spids: [631]
                                                )
                                              ]
                                              redirects: []
                                            )
                                            (command.DParen
                                              child: 
                                                (arith_expr.UnaryAssign
                                                  op_id: Id.Node_PostDPlus
                                                  child: ($ Id.Lit_ArithVarLike index)
                                                )
                                              redirects: []
                                            )
                                          ]
                                          spids: [590 627]
                                        )
                                      ]
                                      else_action: []
                                      redirects: []
                                    )
                                  ]
                                  spids: [563 583]
                                )
                              ]
                              else_action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                              redirects: []
                            )
                          ]
                        )
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ ($ Id.VSub_DollarName FP_SETTINGS))}
                        )
                      ]
                    )
                  ]
                  spids: [527 540]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'WHIP_TITLE='> name:WHIP_TITLE)
          op: assign_op.Equal
          rhs: {(SQ <'DietPi - LED Control'>)}
          spids: [702]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TARGETMENUID='> name:TARGETMENUID)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [708]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SELECTED_LED_NAME='> name:SELECTED_LED_NAME)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [712]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEFAULT_ITEM='> name:DEFAULT_ITEM)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [717]
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name: Menu_Main
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<Init_LED_Info>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TARGETMENUID='> name:TARGETMENUID)
                  op: assign_op.Equal
                  rhs: {<-1>}
                  spids: [734]
                )
              ]
              redirects: []
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'whiptail_menu_array='> 
                (sh_array_literal left:<Id.Op_LParen _> words:[])
              }
            )
            (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
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name aLED_NAME>
                        var_name: aLED_NAME
                        prefix_op: <Id.VSub_Pound '#'>
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:($ Id.Lit_ArithVarLike i))
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'whiptail_menu_array+='>
                              name: whiptail_menu_array
                            )
                          op: assign_op.PlusEqual
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name aLED_NAME>
                                        var_name: aLED_NAME
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: {($ Id.VSub_DollarName i)}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    )
                                  }
                                  {
                                    (DQ <': '> 
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name aLED_SETTING_CURRENT>
                                        var_name: aLED_SETTING_CURRENT
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: {($ Id.VSub_DollarName i)}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [776]
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTION='> name:OPTION)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            words: [
                              {<whiptail>}
                              {<--title>}
                              {(DQ ($ Id.VSub_DollarName WHIP_TITLE))}
                              {<--menu>}
                              {(DQ <'Please select an LED to configure its options:'>)}
                              {<--cancel-button>}
                              {(DQ <Back>)}
                              {<16>}
                              {<60>}
                              {<8>}
                              {
                                (DQ 
                                  (braced_var_sub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name whiptail_menu_array>
                                    var_name: whiptail_menu_array
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                )
                              }
                            ]
                            redirects: [
                              (redir
                                op: <Id.Redir_GreatAnd '3>&'>
                                loc: (redir_loc.Fd fd:3)
                                arg: {<1>}
                              )
                              (redir
                                op: <Id.Redir_GreatAnd '1>&'>
                                loc: (redir_loc.Fd fd:1)
                                arg: {<2>}
                              )
                              (redir
                                op: <Id.Redir_GreatAnd '2>&'>
                                loc: (redir_loc.Fd fd:2)
                                arg: {<3>}
                              )
                            ]
                            more_env: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                  spids: [804]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CHOICE='> name:CHOICE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [853]
                )
              ]
              redirects: []
            )
            (C {<unset>} {<whiptail_menu_array>})
            (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>}
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'SELECTED_LED_NAME='>
                              name: SELECTED_LED_NAME
                            )
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTION)}
                          spids: [882]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'TARGETMENUID='>
                              name: TARGETMENUID
                            )
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [886]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [864 878]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: Menu_LED_Options
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TARGETMENUID='> name:TARGETMENUID)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [906]
                )
              ]
              redirects: []
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'whiptail_menu_array='> 
                (sh_array_literal left:<Id.Op_LParen _> words:[])
              }
            )
            (C {<local>} {<Id.Lit_VarLike 'current_index='> <0>})
            (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
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name aLED_NAME>
                        var_name: aLED_NAME
                        prefix_op: <Id.VSub_Pound '#'>
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:($ Id.Lit_ArithVarLike i))
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {(DQ ($ Id.VSub_DollarName SELECTED_LED_NAME))} {<Id.Lit_Equals '='>} 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            left: <Id.Left_DollarBrace '${'>
                                            token: <Id.VSub_Name aLED_NAME>
                                            var_name: aLED_NAME
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: {($ Id.VSub_DollarName i)}
                                              )
                                            right: <Id.Right_DollarBrace '}'>
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Pipeline
                              children: [
                                (C {<echo>} {<-e>} 
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name aLED_SETTING_AVAILABLE>
                                        var_name: aLED_SETTING_AVAILABLE
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: {($ Id.VSub_DollarName i)}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    )
                                  }
                                )
                                (command.Simple
                                  words: [{<tr>} {(SQ <' '>)} {(SQ <'\\n'>)}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/tmp/aLED_SETTING_AVAILABLE'>}
                                    )
                                  ]
                                  more_env: []
                                  do_fork: T
                                )
                              ]
                              negated: F
                              stderr_indices: []
                            )
                            (command.WhileUntil
                              keyword: <Id.KW_While while>
                              cond: (condition.Shell commands:[(C {<read>} {<-r>} {<line>})])
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'whiptail_menu_array+='>
                                              name: whiptail_menu_array
                                            )
                                          op: assign_op.PlusEqual
                                          rhs: 
                                            {
                                              (sh_array_literal
                                                left: <Id.Op_LParen _>
                                                words: [{(DQ ($ Id.VSub_DollarName line))} {(SQ )}]
                                              )
                                            }
                                          spids: [1024]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                )
                              redirects: [
                                (redir
                                  op: <Id.Redir_Less '<'>
                                  loc: (redir_loc.Fd fd:0)
                                  arg: {<'/tmp/aLED_SETTING_AVAILABLE'>}
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'DEFAULT_ITEM='>
                                      name: DEFAULT_ITEM
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name aLED_SETTING_CURRENT>
                                        var_name: aLED_SETTING_CURRENT
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: {($ Id.VSub_DollarName i)}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    }
                                  spids: [1044]
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'current_index='>
                                      name: current_index
                                    )
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName i)}
                                  spids: [1053]
                                )
                              ]
                              redirects: []
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [954 976]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTION='> name:OPTION)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            words: [
                              {<whiptail>}
                              {<--title>}
                              {(DQ ($ Id.VSub_DollarName WHIP_TITLE))}
                              {<--menu>}
                              {
                                (DQ <'Please select an option for '> 
                                  ($ Id.VSub_DollarName SELECTED_LED_NAME) <' LED:'>
                                )
                              }
                              {<--default-item>}
                              {(DQ ($ Id.VSub_DollarName DEFAULT_ITEM))}
                              {<--cancel-button>}
                              {(DQ <Back>)}
                              {<18>}
                              {<60>}
                              {<10>}
                              {
                                (DQ 
                                  (braced_var_sub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name whiptail_menu_array>
                                    var_name: whiptail_menu_array
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                )
                              }
                            ]
                            redirects: [
                              (redir
                                op: <Id.Redir_GreatAnd '3>&'>
                                loc: (redir_loc.Fd fd:3)
                                arg: {<1>}
                              )
                              (redir
                                op: <Id.Redir_GreatAnd '1>&'>
                                loc: (redir_loc.Fd fd:1)
                                arg: {<2>}
                              )
                              (redir
                                op: <Id.Redir_GreatAnd '2>&'>
                                loc: (redir_loc.Fd fd:2)
                                arg: {<3>}
                              )
                            ]
                            more_env: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                  spids: [1070]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CHOICE='> name:CHOICE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [1127]
                )
              ]
              redirects: []
            )
            (C {<unset>} {<whiptail_menu_array>})
            (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>}
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.IndexedName
                              left: <Id.Lit_ArrayLhsOpen 'aLED_SETTING_CURRENT['>
                              name: aLED_SETTING_CURRENT
                              index: {($ Id.VSub_DollarName current_index)}
                            )
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTION)}
                          spids: [1156]
                        )
                      ]
                      redirects: []
                    )
                    (C {<Settings_Write_Apply>})
                  ]
                  spids: [1138 1152]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (C {<Init_LED_Info>})
    (C {<Settings_Read>})
    (C {<Settings_Write_Apply>})
    (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 INPUT)}
                          right: {<Id.Lit_Digits 0>}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.DParen
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_Great
                          left: {($ Id.VSub_DollarName TARGETMENUID)}
                          right: (arith_expr.Unary op_id:Id.Node_UnaryMinus child:{<Id.Lit_Digits 1>})
                        )
                      redirects: []
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (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 TARGETMENUID)}
                                          right: {<Id.Lit_Digits 0>}
                                        )
                                      redirects: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<Menu_Main>})]
                          spids: [1240 1254]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DParen
                                      child: 
                                        (arith_expr.Binary
                                          op_id: Id.Arith_DEqual
                                          left: {($ Id.VSub_DollarName TARGETMENUID)}
                                          right: {<Id.Lit_Digits 1>}
                                        )
                                      redirects: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<Menu_LED_Options>})]
                          spids: [1262 1276]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
          ]
          spids: [1203 1217]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<unset>} {<aLED_NAME>})
    (C {<unset>} {<aLED_SETTING_AVAILABLE>})
    (C {<unset>} {<aLED_SETTING_CURRENT>})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
  ]
  redirects: []
  right: <Id.Lit_RBrace '}'>
)