(CommandList
  children: [
    (FuncDef
      name: _ipsec_connections
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(LhsName name:keyword) op:Equal spids:[22])
                (assign_pair lhs:(LhsName name:name) op:Equal spids:[24])
              ]
              spids: [20]
            )
            (While
              cond: [
                (Sentence
                  child: (C {(read)} {(-r)} {(keyword)} {(name)})
                  terminator: <Op_Semi ';'>
                )
              ]
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_Name '$keyword')}
                                      right: 
                                        {(Lit_Other '[') (Lit_Pound '#') (Lit_Other ']') 
                                          (Lit_Other '*')
                                        }
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (Sentence
                              child: (ControlFlow token:<ControlFlow_Continue continue>)
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [16777215 57]
                        )
                      ]
                      spids: [16777215 62]
                    )
                    (AndOr
                      children: [
                        (DBracket
                          expr: 
                            (LogicalAnd
                              left: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_Name '$keyword')}
                                  right: {(conn)}
                                )
                              right: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobNEqual
                                  left: {($ VSub_Name '$name')}
                                  right: {(SQ <'%default'>)}
                                )
                            )
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: PlusEqual
                              rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_Name '$name'))}])}
                              spids: [87]
                            )
                          ]
                          spids: [87]
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  spids: [38 97]
                )
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:COMPREPLY)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} {(SQ <'${COMPREPLY[@]}'>)} {(--)} 
                                      {(DQ ($ VSub_Name '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [103 119]
                            )
                          }
                        ]
                      )
                    }
                  spids: [100]
                )
              ]
              spids: [100]
            )
          ]
          spids: [17]
        )
      spids: [13 16]
    )
    (FuncDef
      name: _ipsec_freeswan
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(LhsName name:cur) op:Equal spids:[135])
                (assign_pair lhs:(LhsName name:prev) op:Equal spids:[137])
                (assign_pair lhs:(LhsName name:words) op:Equal spids:[139])
                (assign_pair lhs:(LhsName name:cword) op:Equal spids:[141])
              ]
              spids: [133]
            )
            (AndOr
              children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {($ VSub_Name '$cword')}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'auto barf eroute klipsdebug look manual\n'> 
                                                  <
'            pluto ranbits rsasigkey setup showdefaults showhostkey spi spigrp\n'
                                                  > <'            tncfg whack'>
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [171 189]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [168]
                        )
                      ]
                      spids: [168]
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [16777215 165]
                )
              ]
              spids: [16777215 199]
            )
            (Case
              to_match: 
                {
                  (BracedVarSub
                    token: <VSub_Name words>
                    bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)}))
                    spids: [205 210]
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(auto)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'--asynchronous --up --add --delete\n'> 
                                                  <
'                --replace --down --route --unroute --ready --status\n'
                                                  > <'                --rereadsecrets'>
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [222 240]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [219]
                        )
                      ]
                      spids: [219]
                    )
                  ]
                  spids: [215 216 245 16777215]
                )
                (case_arm
                  pat_list: [{(manual)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {(SQ <'--up --down --route --unroute --union'>)} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [255 273]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [252]
                        )
                      ]
                      spids: [252]
                    )
                  ]
                  spids: [248 249 278 16777215]
                )
                (case_arm
                  pat_list: [{(ranbits)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'--quick --continuous --bytes'>)} 
                                              {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [288 306]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [285]
                        )
                      ]
                      spids: [285]
                    )
                  ]
                  spids: [281 282 311 16777215]
                )
                (case_arm
                  pat_list: [{(setup)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'--start --stop --restart'>)} 
                                              {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [321 337]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [318]
                        )
                      ]
                      spids: [318]
                    )
                  ]
                  spids: [314 315 342 16777215]
                )
                (case_arm pat_list:[{(Lit_Other '*')}] spids:[345 346 349 16777215])
              ]
              spids: [203 212 352]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [130]
        )
      spids: [126 129]
    )
    (FuncDef
      name: _ipsec_strongswan
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(LhsName name:cur) op:Equal spids:[372])
                (assign_pair lhs:(LhsName name:prev) op:Equal spids:[374])
                (assign_pair lhs:(LhsName name:words) op:Equal spids:[376])
                (assign_pair lhs:(LhsName name:cword) op:Equal spids:[378])
              ]
              spids: [370]
            )
            (AndOr
              children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {($ VSub_Name '$cword')}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'down irdumm leases listaacerts listacerts\n'> 
                                                  <
'            listalgs listall listcacerts listcainfos listcards listcerts\n'
                                                  > <'            listcrls listgroups listocsp listocspcerts listpubkeys openac pki\n'> 
                                                  <
'            pluto pool purgecerts purgecrls purgeike purgeocsp ready reload\n'
                                                  > <'            rereadaacerts rereadacerts rereadall rereadcacerts rereadcrls\n'> 
                                                  <
'            rereadgroups rereadocspcerts rereadsecrets restart route scdecrypt\n'
                                                  > <'            scencrypt scepclient secrets start starter status statusall stop\n'> 
                                                  <
'            stroke unroute uci up update version whack --confdir --copyright\n'
                                                  > <'            --directory --help --version --versioncode'>
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [408 432]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [405]
                        )
                      ]
                      spids: [405]
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [16777215 402]
                )
              ]
              spids: [16777215 442]
            )
            (Case
              to_match: 
                {
                  (BracedVarSub
                    token: <VSub_Name words>
                    bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)}))
                    spids: [448 453]
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(down)} {(route)} {(status)} {(statusall)} {(unroute)} {(up)}]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:confdir)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: (CommandList children:[(C {(ipsec)} {(--confdir)})])
                                left_token: <Left_CommandSub '$('>
                                spids: [475 481]
                              )
                            }
                          spids: [474]
                        )
                      ]
                      spids: [472]
                    )
                    (SimpleCommand
                      words: [{(_ipsec_connections)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Less
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$confdir') (/ipsec.conf))}
                          spids: [486]
                        )
                      ]
                    )
                  ]
                  spids: [458 469 494 16777215]
                )
                (case_arm
                  pat_list: [{(list) (Lit_Other '*')}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <--utc>)} {(--)} 
                                              {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [505 521]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [502]
                        )
                      ]
                      spids: [502]
                    )
                  ]
                  spids: [497 499 526 16777215]
                )
                (case_arm
                  pat_list: [{(restart)} {(start)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'--attach-gdb --auto-update --debug\n'> 
                                                  <
'                --debug-all --debug-more --nofork'
                                                  >
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [538 555]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [535]
                        )
                      ]
                      spids: [535]
                    )
                  ]
                  spids: [529 532 560 16777215]
                )
                (case_arm
                  pat_list: [{(pki)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (ArrayLiteralPart
                                words: [
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'--gen --issue --keyid --print --pub\n'> 
                                                  <
'                --req --self --signcrl --verify'
                                                  >
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [570 587]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [567]
                        )
                      ]
                      spids: [567]
                    )
                  ]
                  spids: [563 564 592 16777215]
                )
                (case_arm pat_list:[{(pool)}] spids:[595 596 599 16777215])
                (case_arm
                  pat_list: [{(irdumm)}]
                  action: [(C {(_filedir)} {(SQ <rb>)})]
                  spids: [602 603 613 16777215]
                )
                (case_arm pat_list:[{(Lit_Other '*')}] spids:[616 617 620 16777215])
              ]
              spids: [446 455 623]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [367]
        )
      spids: [363 366]
    )
    (Case
      to_match: 
        {
          (DQ 
            (CommandSubPart
              command_list: 
                (CommandList
                  children: [
                    (SimpleCommand
                      words: [{(ipsec)} {(--version)}]
                      redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[643])]
                    )
                  ]
                )
              left_token: <Left_CommandSub '$('>
              spids: [637 646]
            )
          )
        }
      arms: [
        (case_arm
          pat_list: [{(Lit_Other '*') (strongSwan) (Lit_Other '*')}]
          action: [(C {(complete)} {(-F)} {(_ipsec_strongswan)} {(ipsec)})]
          spids: [652 655 667 16777215]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [(C {(complete)} {(-F)} {(_ipsec_freeswan)} {(ipsec)})]
          spids: [670 671 683 16777215]
        )
      ]
      spids: [634 649 685]
    )
  ]
)