(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _ipv6calc
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(cur)} {(prev)} {(words)} {(cword)} {(split)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(_init_completion)} {(-s)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:30)
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$prev'))}
              arms: [
                (case_arm
                  pat_list: [{(-d)} {(--debug)}]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:49)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [43 46 54 -1]
                )
                (case_arm
                  pat_list: [{(-I)} {(--in)} {(-O)} {(--out)} {(-A)} {(--action)}]
                  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:76)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:78)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (DQ 
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 85
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (command.Simple
                                                                words: [
                                                                  {($ Id.VSub_Number '$1')}
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName '$prev')
                                                                    )
                                                                  }
                                                                  {(-h)}
                                                                ]
                                                                redirects: [
                                                                  (redir.Redir
                                                                    op: 
                                                                      (Token
                                                                        id: Id.Redir_GreatAnd
                                                                        val: '2>&'
                                                                        span_id: 95
                                                                      )
                                                                    fd: 2
                                                                    arg_word: {(1)}
                                                                  )
                                                                ]
                                                              )
                                                              (C {(sed)} {(-ne)} 
                                                                {
                                                                  (SQ 
                                                                    (Token
                                                                      id: Id.Lit_Chars
                                                                      val: 
's/^[[:space:]]\\{1,\\}\\([^[:space:]:]\\{1,\\}\\)[[:space:]]*:.*/\\1/p'
                                                                      span_id: 107
                                                                    )
                                                                  )
                                                                }
                                                              )
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [75]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:126)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [57 68 131 -1]
                )
                (case_arm
                  pat_list: [{(--db-geoip)} {(--db-ip2location-ipv4)} {(--db-ip2location-ipv6)}]
                  action: [
                    (C {(_filedir)})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:145)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [134 139 150 -1]
                )
                (case_arm
                  pat_list: [{(--printstart)} {(--printend)}]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:159)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [153 156 164 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {($ Id.VSub_DollarName '$split')})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:175)
                  arg_word: {(0)}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                              right: {(-) (Id.Lit_Other '*')}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:195)
                    )
                  ]
                  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:201)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:203)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'--help --debug --quiet --in --out --action\n'
                                                    span_id: 210
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            --examples --showinfo --show_types --machine_readable --db-geoip\n'
                                                    span_id: 211
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            --db-geoip-default --db-ip2location-ipv4 --db-ip2location-ipv6\n'
                                                    span_id: 212
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            --lowercase --uppercase --printprefix --printsuffix --maskprefix\n'
                                                    span_id: 213
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            --masksuffix --printstart --printend --printcompressed\n'
                                                    span_id: 214
                                                  ) 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'            --printuncompressed --printfulluncompressed --printmirrored'
                                                    span_id: 215
                                                  )
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [200]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:231)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [181 197]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:240)
              arg_word: {(0)}
            )
          ]
        )
    )
    (C {(complete)} {(-F)} {(_ipv6calc)} {(ipv6calc)})
  ]
)