(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _modinfo
      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]
                )
              ]
              spids: [11]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$prev'))}
              arms: [
                (case_arm
                  pat_list: [{(-F)} {(--field)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[45])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'alias author depends description\n'> 
                                                  <
'                filename firmware license parm srcversion staging vermagic\n'
                                                  > <'                version'>
                                                )
                                              } {(--)} 
                                              {
                                                (DQ 
                                                  (word_part.BracedVarSub
                                                    token: <VSub_Name cur>
                                                    suffix_op: 
                                                      (suffix_op.StringUnary
                                                        op_id: VOp1_DComma
                                                        arg_word: (word.EmptyWord)
                                                      )
                                                    spids: [63 66]
                                                  )
                                                )
                                              }
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [48 69]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [45]
                        )
                      ]
                      spids: [45]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [39 42 77 16777215]
                )
                (case_arm
                  pat_list: [{(-k)}]
                  action: [
                    (C {(_kernel_versions)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [80 81 90 16777215]
                )
              ]
              spids: [30 36 93]
            )
            (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:[116])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'-V --version -F --field -k -0 --null -a -d\n'> 
                                                  <'            -l -p -n'>
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [119 136]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [116]
                        )
                      ]
                      spids: [116]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [16777215 113]
                )
              ]
              spids: [16777215 144]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[150])
                  op: Equal
                  spids: [150]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:version spids:[152])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: (command.CommandList children:[(C {(uname)} {(-r)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [153 157]
                      )
                    }
                  spids: [152]
                )
              ]
              spids: [148]
            )
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Arith_Equal
                  left: (lhs_expr.LhsName name:i spids:[164])
                  right: 
                    (arith_expr.ArithBinary
                      op_id: Arith_Minus
                      left: 
                        (arith_expr.ArithWord
                          w: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name words>
                                prefix_op: VSub_Pound
                                bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                                spids: [166 172]
                              )
                            }
                        )
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
              cond: 
                (arith_expr.ArithBinary
                  op_id: Arith_Great
                  left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                  right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                )
              update: 
                (arith_expr.UnaryAssign
                  op_id: Node_PostDMinus
                  child: (lhs_expr.LhsName name:i spids:[182])
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: 
                                        {
                                          (word_part.BracedVarSub
                                            token: <VSub_Name words>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithVarRef
                                                    token: <Lit_ArithVarLike i>
                                                  )
                                              )
                                            spids: [196 201]
                                          )
                                        }
                                      right: {(-k)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:version spids:[213])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.BracedVarSub
                                        token: <VSub_Name words>
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: 
                                              (arith_expr.ArithBinary
                                                op_id: Arith_Plus
                                                left: 
                                                  (arith_expr.ArithVarRef
                                                    token: <Lit_ArithVarLike i>
                                                  )
                                                right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                              )
                                          )
                                        spids: [214 221]
                                      )
                                    }
                                  spids: [213]
                                )
                              ]
                              spids: [213]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Break break>
                            )
                          ]
                          spids: [16777215 210]
                        )
                      ]
                      spids: [16777215 227]
                    )
                  ]
                  spids: [189 230]
                )
            )
            (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: 
                                {
                                  (word_part.ExtGlobPart
                                    op: <ExtGlob_At '@('>
                                    arms: [{(Lit_Other '*') (/)} {('[.~]')}]
                                    spids: [248 253]
                                  ) (Lit_Other '*')
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(_filedir)} {(SQ <'@(?(k)o?(.gz))'>)})]
                  spids: [16777215 259]
                )
              ]
              else_action: [(C {(_modules)} {($ VSub_DollarName '$version')})]
              spids: [269 277]
            )
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_modinfo)} {(modinfo)})
  ]
)