(command.CommandList
  children: [
    (command.ShFunction
      name: _ipsec_connections
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(keyword)} {(name)})
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:27)
              cond: [
                (command.Sentence
                  child: (C {(read)} {(-r)} {(keyword)} {(name)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:36)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {($ Id.VSub_DollarName '$keyword')}
                                      right: 
                                        {(Id.Lit_Other '[') (Id.Lit_Pound '#') (Id.Lit_Other ']') 
                                          (Id.Lit_Other '*')
                                        }
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:55)
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Continue val:continue span_id:59)
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:60)
                            )
                          ]
                          spids: [41 57]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalAnd
                              left: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$keyword')}
                                  right: {(conn)}
                                )
                              right: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {($ Id.VSub_DollarName '$name')}
                                  right: {(SQ (Token id:Id.Lit_Chars val:'%default' span_id:80))}
                                )
                            )
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:COMPREPLY)
                              op: assign_op.PlusEqual
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: (Token id:Id.Op_LParen val:'(' span_id:88)
                                    words: [{(DQ ($ Id.VSub_DollarName '$name'))}]
                                  )
                                }
                              spids: [87]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: (Token id:Id.Op_LParen val:'(' span_id:101)
                        words: [
                          {
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:103)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(compgen)} {(-W)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'${COMPREPLY[@]}' span_id:110))} {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [100]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _ipsec_freeswan
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(cur)} {(prev)} {(words)} {(cword)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:148)
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_eq
                              left: {($ Id.VSub_DollarName '$cword')}
                              right: {(1)}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:163)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:169)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:171)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 'auto barf eroute klipsdebug look manual\n'
                                                    span_id: 178
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            pluto ranbits rsasigkey setup showdefaults showhostkey spi spigrp\n'
                                                    span_id: 179
                                                  ) (Token id:Id.Lit_Chars val:'            tncfg whack' span_id:180)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [168]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:194)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [152 165]
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:words span_id:206)
                    bracket_op: 
                      (bracket_op.ArrayIndex
                        expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                      )
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(auto)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:220)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:222)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--asynchronous --up --add --delete\n'
                                                    span_id: 229
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'                --replace --down --route --unroute --ready --status\n'
                                                    span_id: 230
                                                  ) (Token id:Id.Lit_Chars val:'                --rereadsecrets' span_id:231)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [219]
                        )
                      ]
                    )
                  ]
                  spids: [215 216 245 -1]
                )
                (case_arm
                  pat_list: [{(manual)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:253)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:255)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--up --down --route --unroute --union'
                                                    span_id: 262
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [252]
                        )
                      ]
                    )
                  ]
                  spids: [248 249 278 -1]
                )
                (case_arm
                  pat_list: [{(ranbits)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:286)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:288)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--quick --continuous --bytes'
                                                    span_id: 295
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [285]
                        )
                      ]
                    )
                  ]
                  spids: [281 282 311 -1]
                )
                (case_arm
                  pat_list: [{(setup)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:319)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:321)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--start --stop --restart'
                                                    span_id: 328
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [318]
                        )
                      ]
                    )
                  ]
                  spids: [314 315 342 -1]
                )
                (case_arm pat_list:[{(Id.Lit_Star '*')}] spids:[345 346 349 -1])
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:356)
              arg_word: {(0)}
            )
          ]
        )
    )
    (command.ShFunction
      name: _ipsec_strongswan
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(cur)} {(prev)} {(words)} {(cword)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:385)
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_eq
                              left: {($ Id.VSub_DollarName '$cword')}
                              right: {(1)}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:400)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:406)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:408)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'down irdumm leases listaacerts listacerts\n'
                                                    span_id: 415
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            listalgs listall listcacerts listcainfos listcards listcerts\n'
                                                    span_id: 416
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            listcrls listgroups listocsp listocspcerts listpubkeys openac pki\n'
                                                    span_id: 417
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            pluto pool purgecerts purgecrls purgeike purgeocsp ready reload\n'
                                                    span_id: 418
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            rereadaacerts rereadacerts rereadall rereadcacerts rereadcrls\n'
                                                    span_id: 419
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            rereadgroups rereadocspcerts rereadsecrets restart route scdecrypt\n'
                                                    span_id: 420
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            scencrypt scepclient secrets start starter status statusall stop\n'
                                                    span_id: 421
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            stroke unroute uci up update version whack --confdir --copyright\n'
                                                    span_id: 422
                                                  ) (Token id:Id.Lit_Chars val:'            --directory --help --version --versioncode' span_id:423)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [405]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:437)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [389 402]
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:words span_id:449)
                    bracket_op: 
                      (bracket_op.ArrayIndex
                        expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                      )
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(down)} {(route)} {(status)} {(statusall)} {(unroute)} {(up)}]
                  action: [
                    (C {(local)} 
                      {(Id.Lit_VarLike 'confdir=') 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:475)
                          command_list: (command.CommandList children:[(C {(ipsec)} {(--confdir)})])
                        )
                      }
                    )
                    (command.Simple
                      words: [{(_ipsec_connections)}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Less val:'<' span_id:486)
                          fd: -1
                          arg_word: {(DQ ($ Id.VSub_DollarName '$confdir') (/ipsec.conf))}
                        )
                      ]
                    )
                  ]
                  spids: [458 469 494 -1]
                )
                (case_arm
                  pat_list: [{(list) (Id.Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:503)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:505)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {(SQ (Token id:Id.Lit_Chars val:--utc span_id:512))} {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [502]
                        )
                      ]
                    )
                  ]
                  spids: [497 499 526 -1]
                )
                (case_arm
                  pat_list: [{(restart)} {(start)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:536)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:538)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--attach-gdb --auto-update --debug\n'
                                                    span_id: 545
                                                  ) (Token id:Id.Lit_Chars val:'                --debug-all --debug-more --nofork' span_id:546)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [535]
                        )
                      ]
                    )
                  ]
                  spids: [529 532 560 -1]
                )
                (case_arm
                  pat_list: [{(pki)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:568)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:570)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: '--gen --issue --keyid --print --pub\n'
                                                    span_id: 577
                                                  ) (Token id:Id.Lit_Chars val:'                --req --self --signcrl --verify' span_id:578)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [567]
                        )
                      ]
                    )
                  ]
                  spids: [563 564 592 -1]
                )
                (case_arm pat_list:[{(pool)}] spids:[595 596 599 -1])
                (case_arm
                  pat_list: [{(irdumm)}]
                  action: [(C {(_filedir)} {(SQ (Token id:Id.Lit_Chars val:rb span_id:609))})]
                  spids: [602 603 613 -1]
                )
                (case_arm pat_list:[{(Id.Lit_Star '*')}] spids:[616 617 620 -1])
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:627)
              arg_word: {(0)}
            )
          ]
        )
    )
    (command.Case
      to_match: 
        {
          (DQ 
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:637)
              command_list: 
                (command.CommandList
                  children: [
                    (command.Simple
                      words: [{(ipsec)} {(--version)}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'2>' span_id:643)
                          fd: 2
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                  ]
                )
            )
          )
        }
      arms: [
        (case_arm
          pat_list: [{(Id.Lit_Star '*') (strongSwan) (Id.Lit_Star '*')}]
          action: [(C {(complete)} {(-F)} {(_ipsec_strongswan)} {(ipsec)})]
          spids: [652 655 667 -1]
        )
        (case_arm
          pat_list: [{(Id.Lit_Star '*')}]
          action: [(C {(complete)} {(-F)} {(_ipsec_freeswan)} {(ipsec)})]
          spids: [670 671 683 -1]
        )
      ]
    )
  ]
)