(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _iptables
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cur spids:[13])
                  op: Equal
                  spids: [13]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:prev spids:[15])
                  op: Equal
                  spids: [15]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:words spids:[17])
                  op: Equal
                  spids: [17]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cword spids:[19])
                  op: Equal
                  spids: [19]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:split spids:[21])
                  op: Equal
                  spids: [21]
                )
              ]
              spids: [11]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)} {(-s)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:table spids:[36])
                  op: Equal
                  spids: [36]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:chain spids:[38])
                  op: Equal
                  rhs: {(SQ <'s/^Chain \\([^ ]\\{1,\\}\\).*$/\\1/p'>)}
                  spids: [38]
                )
              ]
              spids: [34]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (word_part.BracedVarSub
                                    token: <VSub_Name words>
                                    bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                                    spids: [49 54]
                                  )
                                }
                              right: 
                                {(Lit_Other '*') (BoolUnary_t -t) 
                                  (word_part.EscapedLiteralPart
                                    token: <Lit_EscapedChar '\\ '>
                                  ) (Lit_Other '*') (filter) (Lit_Other '*')
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:table spids:[71])
                          op: Equal
                          rhs: {(DQ ('-t filter'))}
                          spids: [71]
                        )
                      ]
                      spids: [71]
                    )
                  ]
                  spids: [16777215 68]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (word_part.BracedVarSub
                                    token: <VSub_Name words>
                                    bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                                    spids: [81 86]
                                  )
                                }
                              right: 
                                {(Lit_Other '*') (BoolUnary_t -t) 
                                  (word_part.EscapedLiteralPart
                                    token: <Lit_EscapedChar '\\ '>
                                  ) (Lit_Other '*') (nat) (Lit_Other '*')
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:table spids:[103])
                          op: Equal
                          rhs: {(DQ ('-t nat'))}
                          spids: [103]
                        )
                      ]
                      spids: [103]
                    )
                  ]
                  spids: [77 100]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (word_part.BracedVarSub
                                    token: <VSub_Name words>
                                    bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                                    spids: [113 118]
                                  )
                                }
                              right: 
                                {(Lit_Other '*') (BoolUnary_t -t) 
                                  (word_part.EscapedLiteralPart
                                    token: <Lit_EscapedChar '\\ '>
                                  ) (Lit_Other '*') (mangle) (Lit_Other '*')
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:table spids:[135])
                          op: Equal
                          rhs: {(DQ ('-t mangle'))}
                          spids: [135]
                        )
                      ]
                      spids: [135]
                    )
                  ]
                  spids: [109 132]
                )
              ]
              spids: [16777215 141]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-) (Lit_Other '*') (Lit_Other '[') (AIDRPFXLZ) (Lit_Other ']')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[160])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'`iptables $table -nL | \\\n'> 
                                                  <
'                sed -ne "s/^Chain \\([^ ]\\{1,\\}\\).*$/\\1/p"`'
                                                  >
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [163 180]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [160]
                        )
                      ]
                      spids: [160]
                    )
                  ]
                  spids: [152 157 185 16777215]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '*') (t)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[194])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'nat filter mangle'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [197 213]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [194]
                        )
                      ]
                      spids: [194]
                    )
                  ]
                  spids: [188 191 218 16777215]
                )
                (case_arm
                  pat_list: [{(-j)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.LogicalOr
                                      left: 
                                        (bool_expr.BoolBinary
                                          op_id: BoolBinary_GlobDEqual
                                          left: {(DQ ($ VSub_DollarName '$table'))}
                                          right: {(DQ ('-t filter'))}
                                        )
                                      right: 
                                        (bool_expr.BoolUnary
                                          op_id: BoolUnary_z
                                          child: {(DQ ($ VSub_DollarName '$table'))}
                                        )
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY spids:[253])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(compgen)} {(-W)} 
                                                      {
                                                        (SQ <'ACCEPT DROP LOG ULOG REJECT\n'> 
                                                          <
'                `iptables $table -nL | sed -ne "$chain" \\\n'
                                                          > <'                -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`'>
                                                        )
                                                      } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [256 276]
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [253]
                                )
                              ]
                              spids: [253]
                            )
                          ]
                          spids: [16777215 250]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_DollarName '$table')}
                                      right: {(DQ ('-t nat'))}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY spids:[299])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(compgen)} {(-W)} 
                                                      {
                                                        (SQ 
                                                          <
'ACCEPT DROP LOG ULOG REJECT MIRROR SNAT\n'
                                                          > <'                DNAT MASQUERADE `iptables $table -nL | \\\n'> 
                                                          <
'                sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`'
                                                          >
                                                        )
                                                      } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [302 322]
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [299]
                                )
                              ]
                              spids: [299]
                            )
                          ]
                          spids: [281 296]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_DollarName '$table')}
                                      right: {(DQ ('-t mangle'))}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY spids:[345])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(compgen)} {(-W)} 
                                                      {
                                                        (SQ 
                                                          <
'ACCEPT DROP LOG ULOG REJECT MARK TOS\n'
                                                          > <'                `iptables $table -nL | sed -ne "$chain" \\\n'> 
                                                          <
'                -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`'
                                                          >
                                                        )
                                                      } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [348 368]
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [345]
                                )
                              ]
                              spids: [345]
                            )
                          ]
                          spids: [327 342]
                        )
                      ]
                      spids: [16777215 373]
                    )
                  ]
                  spids: [221 222 376 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {(DQ ($ VSub_DollarName '$cur'))}
                                      right: {(-) (Lit_Other '*')}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY spids:[402])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(compgen)} {(-W)} 
                                                      {
                                                        (SQ 
                                                          <
'--in-interface --out-interface --source\n'
                                                          > <'                --destination --protocol --fragment --match --append --delete\n'> 
                                                          <
'                --insert --replace --list --flush --zero --new --delete-chain\n'
                                                          > <'                --policy --rename-chain --proto --source --destination\n'> 
                                                          <
'                --in-interface --jump --match --numeric --out-interface --table\n'
                                                          > <'                --verbose --line-numbers --exact --fragment --modprobe\n'> 
                                                          <
'                --set-counters --version'
                                                          >
                                                        )
                                                      } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [405 427]
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [402]
                                )
                              ]
                              spids: [402]
                            )
                          ]
                          spids: [16777215 399]
                        )
                      ]
                      spids: [16777215 432]
                    )
                  ]
                  spids: [379 380 435 16777215]
                )
              ]
              spids: [145 149 438]
            )
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_iptables)} {(iptables)})
  ]
)