(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _udevadm
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>} {<-s>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (C {<local>} {<i>} {<udevcmd>})
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Id.Arith_Equal
                  left: <Id.Lit_ArithVarLike i>
                  right: {<Id.Lit_Digits 1>}
                )
              cond: 
                (arith_expr.Binary
                  op_id: Id.Arith_Less
                  left: <Id.Lit_ArithVarLike i>
                  right: <Id.Lit_ArithVarLike cword>
                )
              update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike i>)
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobNEqual
                                          left: 
                                            {
                                              (braced_var_sub
                                                token: <Id.VSub_Name words>
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: <Id.Lit_ArithVarLike i>
                                                  )
                                              )
                                            }
                                          right: {<-> <Id.Lit_Other '*'>}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:udevcmd)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name words>
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: <Id.Lit_ArithVarLike i>
                                          )
                                      )
                                    }
                                  spids: [96]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [74 93]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [
                    {<--help>}
                    {<--version>}
                    {<--property>}
                    {<--children-max>}
                    {<--timeout>}
                    {<--seq-start>}
                    {<--seq-end>}
                    {<--attr-match>}
                    {<--attr-nomatch>}
                    {<--parent-match>}
                    {<--property-match>}
                    {<--tag-match>}
                    {<--subsystem-match>}
                    {<--subsystem-nomatch>}
                    {<--sysname-match>}
                    {<--path>}
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [122 159 165 -1]
                )
                (case_arm
                  pat_list: [{<--log-priority>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {(SQ <'err info debug'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [172]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [168 169 199 -1]
                )
                (case_arm
                  pat_list: [{<--query>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {(SQ <'name symlink path property all'>)} 
                                          {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [206]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [202 203 235 -1]
                )
                (case_arm
                  pat_list: [{<--name>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cur)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name cur>
                                suffix_op: 
                                  (suffix_op.Unary
                                    tok: <Id.VTest_ColonEquals ':='>
                                    arg_word: {<Id.Lit_Slash '/'> <dev> <Id.Lit_Slash '/'>}
                                  )
                              )
                            }
                          spids: [242]
                        )
                      ]
                    )
                    (C {<_filedir>})
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [238 239 258 -1]
                )
                (case_arm
                  pat_list: [{<--device-id-of-file>} {<--exit-if-exists>}]
                  action: [(C {<_filedir>}) (command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [261 264 273 -1]
                )
                (case_arm
                  pat_list: [{<--action>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {(SQ <'add change remove'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [280]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [276 277 307 -1]
                )
                (case_arm
                  pat_list: [{<--type>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {(SQ <'devices subsystems failed'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [314]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [310 311 341 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {($ Id.VSub_DollarName '$split')})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_z
                                  child: {($ Id.VSub_DollarName '$udevcmd')}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$cur')}
                      arms: [
                        (case_arm
                          pat_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: <Id.Op_LParen _>
                                        words: [
                                          {
                                            (command_sub
                                              left_token: <Id.Left_DollarParen '$('>
                                              child: 
                                                (C {<compgen>} {<-W>} {(SQ <'--help --version --debug'>)} 
                                                  {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                )
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [382]
                                )
                              ]
                            )
                          ]
                          spids: [377 379 408 -1]
                        )
                        (case_arm
                          pat_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: <Id.Op_LParen _>
                                        words: [
                                          {
                                            (command_sub
                                              left_token: <Id.Left_DollarParen '$('>
                                              child: 
                                                (C {<compgen>} {<-W>} 
                                                  {
                                                    (DQ 
                                                      (command_sub
                                                        left_token: <Id.Left_DollarParen '$('>
                                                        child: 
                                                          (command.Pipeline
                                                            children: [
                                                              (command.Simple
                                                                words: [
                                                                  {(DQ ($ Id.VSub_Number '$1'))}
                                                                  {<--help>}
                                                                ]
                                                                redirects: [
                                                                  (redir
                                                                    op: <Id.Redir_Great '2>'>
                                                                    loc: (redir_loc.Fd fd:2)
                                                                    arg: {<'/dev/null'>}
                                                                  )
                                                                ]
                                                                do_fork: T
                                                              )
                                                              (C {<awk>} 
                                                                {
                                                                  (SQ 
                                                                    <'/^[[:space:]]+/ { print $1 }'>
                                                                  )
                                                                }
                                                              )
                                                            ]
                                                            negated: F
                                                          )
                                                      )
                                                    )
                                                  } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                )
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [415]
                                )
                              ]
                            )
                          ]
                          spids: [411 412 459 -1]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [356 367]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$cur')}
                                  right: {<-> <Id.Lit_Other '*'>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} 
                                          {
                                            (SQ 
                                              <
'$( "$1" $udevcmd --help 2>/dev/null | _parse_help - )'
                                              >
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [489]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$COMPREPLY')}
                              right: {<Id.Lit_Other '*'> <Id.BoolBinary_GlobEqual '='>}
                            )
                        )
                        (C {<compopt>} {<-o>} {<nospace>})
                      ]
                    )
                  ]
                  spids: [472 486]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_udevadm>} {<udevadm>})
  ]
)