(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _ipv6calc
      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.Case
              to_match: {(DQ ($ VSub_DollarName '$prev'))}
              arms: [
                (case_arm
                  pat_list: [{(-d)} {(--debug)}]
                  action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                  spids: [43 46 54 16777215]
                )
                (case_arm
                  pat_list: [{(-I)} {(--in)} {(-O)} {(--out)} {(-A)} {(--action)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[75])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (DQ 
                                                  (word_part.CommandSubPart
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (command.SimpleCommand
                                                                words: [
                                                                  {($ VSub_Number '$1')}
                                                                  {(DQ ($ VSub_DollarName '$prev'))}
                                                                  {(-h)}
                                                                ]
                                                                redirects: [
                                                                  (redir.Redir
                                                                    op: <Redir_GreatAnd '2>&'>
                                                                    fd: 2
                                                                    arg_word: {(1)}
                                                                  )
                                                                ]
                                                              )
                                                              (C {(sed)} {(-ne)} 
                                                                {
                                                                  (SQ 
                                                                    <
's/^[[:space:]]\\{1,\\}\\([^[:space:]:]\\{1,\\}\\)[[:space:]]*:.*/\\1/p'
                                                                    >
                                                                  )
                                                                }
                                                              )
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                    left_token: <Left_CommandSub '$('>
                                                    spids: [85 110]
                                                  )
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [78 121]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [75]
                        )
                      ]
                      spids: [75]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [57 68 131 16777215]
                )
                (case_arm
                  pat_list: [{(--db-geoip)} {(--db-ip2location-ipv4)} {(--db-ip2location-ipv6)}]
                  action: [
                    (C {(_filedir)})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [134 139 150 16777215]
                )
                (case_arm
                  pat_list: [{(--printstart)} {(--printend)}]
                  action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                  spids: [153 156 164 16777215]
                )
              ]
              spids: [34 40 167]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {($ VSub_DollarName '$split')})
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (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:[200])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'--help --debug --quiet --in --out --action\n'> 
                                                  <
'            --examples --showinfo --show_types --machine_readable --db-geoip\n'
                                                  > <'            --db-geoip-default --db-ip2location-ipv4 --db-ip2location-ipv6\n'> 
                                                  <
'            --lowercase --uppercase --printprefix --printsuffix --maskprefix\n'
                                                  > <'            --masksuffix --printstart --printend --printcompressed\n'> 
                                                  <
'            --printuncompressed --printfulluncompressed --printmirrored'
                                                  >
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [203 226]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [200]
                        )
                      ]
                      spids: [200]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [16777215 197]
                )
              ]
              spids: [16777215 236]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_ipv6calc)} {(ipv6calc)})
  ]
)