(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _getent
      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:i spids:[36])
                  op: Equal
                  spids: [36]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:db spids:[38])
                  op: Equal
                  spids: [38]
                )
              ]
              spids: [34]
            )
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Arith_Equal
                  left: (lhs_expr.LhsName name:i spids:[45])
                  right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                )
              cond: 
                (arith_expr.ArithBinary
                  op_id: Arith_Less
                  left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                  right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike cword>)
                )
              update: 
                (arith_expr.UnaryAssign
                  op_id: Node_PostDPlus
                  child: (lhs_expr.LhsName name:i spids:[57])
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: 
                        {
                          (word_part.BracedVarSub
                            token: <VSub_Name words>
                            bracket_op: 
                              (bracket_op.ArrayIndex
                                expr: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                              )
                            spids: [69 74]
                          )
                        }
                      arms: [
                        (case_arm
                          pat_list: [{(-V)} {(--version)} {(--usage)} {(-) (SQ <'?'>)} {(--help)}]
                          action: [(command.ControlFlow token:<ControlFlow_Return return>)]
                          spids: [79 91 97 16777215]
                        )
                        (case_arm
                          pat_list: [{(-s)} {(--service)}]
                          action: [
                            (command.DParen
                              child: 
                                (arith_expr.UnaryAssign
                                  op_id: Node_PostDPlus
                                  child: (lhs_expr.LhsName name:i spids:[108])
                                )
                              spids: [106 112]
                            )
                          ]
                          spids: [100 103 115 16777215]
                        )
                        (case_arm
                          pat_list: [{(-) (Lit_Other '*')}]
                          spids: [118 120 123 16777215]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:db spids:[134])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.BracedVarSub
                                        token: <VSub_Name words>
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                                          )
                                        spids: [135 140]
                                      )
                                    }
                                  spids: [134]
                                )
                              ]
                              spids: [134]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Break break>
                            )
                          ]
                          spids: [126 127 146 16777215]
                        )
                      ]
                      spids: [67 76 149]
                    )
                  ]
                  spids: [64 152]
                )
            )
            (command.Case
              to_match: {($ VSub_DollarName '$db')}
              arms: [
                (case_arm
                  pat_list: [{(passwd)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[167])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-u)} {(--)} {(DQ ($ VSub_DollarName '$cur'))})
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [170 182]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [167]
                        )
                      ]
                      spids: [167]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [163 164 192 16777215]
                )
                (case_arm
                  pat_list: [{(group)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[199])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-g)} {(--)} {(DQ ($ VSub_DollarName '$cur'))})
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [202 214]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [199]
                        )
                      ]
                      spids: [199]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [195 196 224 16777215]
                )
                (case_arm
                  pat_list: [{(services)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[231])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-s)} {(--)} {(DQ ($ VSub_DollarName '$cur'))})
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [234 246]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [231]
                        )
                      ]
                      spids: [231]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [227 228 256 16777215]
                )
                (case_arm
                  pat_list: [{(hosts)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[263])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-A)} {(hostname)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [266 280]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [263]
                        )
                      ]
                      spids: [263]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [259 260 290 16777215]
                )
                (case_arm
                  pat_list: [{(protocols)} {(networks)} {(ahosts)} {(ahostsv4)} {(ahostsv6)} {(rpc)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[307])
                          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: [
                                                              (C {($ VSub_Number '$1')} 
                                                                {($ VSub_DollarName '$db')}
                                                              )
                                                              (C {(awk)} {(SQ <'{ print $1 }'>)})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                    left_token: <Left_CommandSub '$('>
                                                    spids: [317 333]
                                                  )
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [310 342]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [307]
                        )
                      ]
                      spids: [307]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [293 304 352 16777215]
                )
                (case_arm
                  pat_list: [{(aliases)} {(shadow)} {(gshadow)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[363])
                          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: [
                                                              (C {($ VSub_Number '$1')} 
                                                                {($ VSub_DollarName '$db')}
                                                              )
                                                              (C {(cut)} {(-d) (Lit_Other ':')} {(-f1)})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                    left_token: <Left_CommandSub '$('>
                                                    spids: [373 388]
                                                  )
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [366 399]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [363]
                        )
                      ]
                      spids: [363]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [355 360 409 16777215]
                )
                (case_arm
                  pat_list: [{(ethers)} {(netgroup)}]
                  action: [(command.ControlFlow token:<ControlFlow_Return return>)]
                  spids: [412 415 421 16777215]
                )
              ]
              spids: [156 160 424]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-s)} {(--service)}]
                  action: [(command.ControlFlow token:<ControlFlow_Return return>)]
                  spids: [435 438 444 16777215]
                )
              ]
              spids: [428 432 447]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {($ VSub_DollarName '$split')})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ 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:[476])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [479 495]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [476]
                        )
                      ]
                      spids: [476]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$COMPREPLY')}
                              right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')}
                            )
                        )
                        (C {(compopt)} {(-o)} {(nospace)})
                      ]
                    )
                  ]
                  spids: [16777215 473]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolUnary
                              op_id: BoolUnary_z
                              child: {($ VSub_DollarName '$db')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[534])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'passwd group hosts services protocols\n'> 
                                                  <
'            networks ahosts ahostsv4 ahostsv6 aliases ethers netgroup rpc\n'
                                                  > <'            shadow gshadow'>
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [537 555]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [534]
                        )
                      ]
                      spids: [534]
                    )
                  ]
                  spids: [520 531]
                )
              ]
              spids: [16777215 560]
            )
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_getent)} {(getent)})
  ]
)