(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _xrandr
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$prev'))}
              arms: [
                (case_arm
                  pat_list: [
                    {<-display>}
                    {<-d>}
                    {<-help>}
                    {<-s>}
                    {<--size>}
                    {<-r>}
                    {<--rate>}
                    {<--refresh>}
                    {<--screen>}
                    {<--fb>}
                    {<--fbmm>}
                    {<--dpi>}
                    {<--pos>}
                    {<--set>}
                    {<--scale>}
                    {<--transform>}
                    {<--crtc>}
                    {<--panning>}
                    {<--gamma>}
                    {<--newmode>}
                    {<--rmmode>}
                    {<--addmode>}
                    {<--delmode>}
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [39 88 94 -1]
                )
                (case_arm
                  pat_list: [
                    {<--output>}
                    {<--left-of>}
                    {<--right-of>}
                    {<--above>}
                    {<--below>}
                    {<--same-as>}
                  ]
                  action: [
                    (C {<local>} 
                      {<Id.Lit_VarLike 'outputs='> 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Pipeline
                              children: [
                                (C {(DQ ($ Id.VSub_Number '$1'))})
                                (C {<awk>} {(SQ <'/connected/ {print $1}'>)})
                              ]
                              negated: F
                            )
                        )
                      }
                    )
                    (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 ($ Id.VSub_DollarName '$outputs'))} 
                                          {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [131]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [97 108 158 -1]
                )
                (case_arm
                  pat_list: [{<--mode>}]
                  action: [
                    (C {<local>} {<i>} {<output>})
                    (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_GlobDEqual
                                                  left: 
                                                    {
                                                      (DQ 
                                                        (braced_var_sub
                                                          token: <Id.VSub_Name words>
                                                          bracket_op: 
                                                            (bracket_op.ArrayIndex
                                                              expr: <Id.Lit_ArithVarLike i>
                                                            )
                                                        )
                                                      )
                                                    }
                                                  right: {<--output>}
                                                )
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:output)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (braced_var_sub
                                                token: <Id.VSub_Name words>
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: <Id.Lit_ArithVarLike i>
                                                        right: {<Id.Lit_Digits 1>}
                                                      )
                                                  )
                                              )
                                            }
                                          spids: [221]
                                        )
                                      ]
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Break break>
                                    )
                                  ]
                                  spids: [198 218]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: (bool_expr.WordTest w:{($ Id.VSub_DollarName '$output')})
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<local>} 
                              {<Id.Lit_VarLike 'modes='> 
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {(DQ ($ Id.VSub_Number '$1'))})
                                        (C {<sed>} {<-e>} 
                                          {(DQ <'1,/'> ($ Id.VSub_DollarName '$output') <'/ d'>)} {<-e>} {(DQ <'/connected/,'> <Id.Lit_Dollar '$'> <' d'>)} {<-e>} 
                                          {
                                            (DQ <'s/'> <Id.Lit_BadBackslash '\\'> <'([^[:space:]]'> 
                                              <Id.Lit_BadBackslash '\\'> <')[[:space:]].*/'> <Id.Lit_BadBackslash '\\'> <'1/'>
                                            )
                                          }
                                        )
                                      ]
                                      negated: F
                                    )
                                )
                              }
                            )
                            (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 ($ Id.VSub_DollarName '$modes'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                )
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [301]
                                )
                              ]
                            )
                          ]
                          spids: [241 250]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [161 162 331 -1]
                )
                (case_arm
                  pat_list: [{<-o>} {<--orientation>}]
                  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 <'normal inverted left right 0 1 2 3'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [340]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [334 337 369 -1]
                )
                (case_arm
                  pat_list: [{<--reflect>}]
                  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 <'normal x y xy'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [376]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [372 373 403 -1]
                )
                (case_arm
                  pat_list: [{<--rotate>}]
                  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 <'normal inverted left right'>)} 
                                          {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [410]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [406 407 437 -1]
                )
                (case_arm
                  pat_list: [{<--setprovideroutputsource>} {<--setprovideroffloadsink>}]
                  action: [
                    (C {<local>} 
                      {<Id.Lit_VarLike 'providers='> 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [{(DQ ($ Id.VSub_Number '$1'))} {<--listproviders>}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                                (C {<sed>} {<-ne>} {(SQ <'s/.* name:\\([^ ]*\\).*/\\1/p'>)})
                              ]
                              negated: F
                            )
                        )
                      }
                    )
                    (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 ($ Id.VSub_DollarName '$providers'))} 
                                          {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [474]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [440 443 505 -1]
                )
              ]
            )
            (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" -help 2>&1 |\n'> 
                                      <
'        sed -e "s/ or / /g" -e "s/<[^>]*>]//g" | _parse_help - )'
                                      >
                                    )
                                  } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [512]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_xrandr>} {<xrandr>})
  ]
)