(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _rsync
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>} {<-s>} {<-n>} {<Id.Lit_Colon ':'>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_expand>})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [
                    {<--config>}
                    {<--password-file>}
                    {<--include-from>}
                    {<--exclude-from>}
                    {<--files-from>}
                    {<--log-file>}
                    {<--write-batch>}
                    {<--only-write-batch>}
                    {<--read-batch>}
                  ]
                  action: [
                    (C {<compopt>} {<Id.Lit_Other '+'> <o>} {<nospace>})
                    (C {<_filedir>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [55 74 93 -1]
                )
                (case_arm
                  pat_list: [
                    {<-T>}
                    {<--temp-dir>}
                    {<--compare-dest>}
                    {<--backup-dir>}
                    {<--partial-dir>}
                    {<--copy-dest>}
                    {<--link-dest>}
                  ]
                  action: [
                    (C {<compopt>} {<Id.Lit_Other '+'> <o>} {<nospace>})
                    (C {<_filedir>} {<-d>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [96 111 132 -1]
                )
                (case_arm
                  pat_list: [{<-e>} {<--rsh>}]
                  action: [
                    (C {<compopt>} {<Id.Lit_Other '+'> <o>} {<nospace>})
                    (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 <'rsh ssh'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [149]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [135 138 178 -1]
                )
                (case_arm
                  pat_list: [{<--compress-level>}]
                  action: [
                    (C {<compopt>} {<Id.Lit_Other '+'> <o>} {<nospace>})
                    (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..9}'>)} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [193]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [181 182 222 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {($ Id.VSub_DollarName '$split')})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (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 <'--verbose --quiet --no-motd --checksum\n'> 
                                              <
'                --archive --recursive --relative --no-implied-dirs\n'
                                              > <'                --backup --backup-dir= --suffix= --update --inplace --append\n'> 
                                              <
'                --append-verify --dirs --old-dirs --links --copy-links\n'
                                              > <'                --copy-unsafe-links --safe-links --copy-dirlinks\n'> 
                                              <
'                --keep-dirlinks --hard-links --perms --executability --chmod=\n'
                                              > <'                --acls --xattrs --owner --group --devices --copy-devices\n'> 
                                              <
'                --specials --times --omit-dir-times --super --fake-super\n'
                                              > <'                --sparse --dry-run --whole-file --no-whole-file\n'> 
                                              <
'                --one-file-system --block-size= --rsh= --rsync-path=\n'
                                              > <'                --existing --ignore-existing --remove-source-files --delete\n'> 
                                              <
'                --delete-before --delete-during --delete-delay --delete-after\n'
                                              > <'                --delete-excluded --ignore-errors --force --max-delete=\n'> 
                                              <
'                --max-size= --min-size= --partial --partial-dir=\n'
                                              > <'                --delay-updates --prune-empty-dirs --numeric-ids --timeout=\n'> 
                                              <
'                --contimeout= --ignore-times --size-only --modify-window=\n'
                                              > <'                --temp-dir= --fuzzy --compare-dest= --copy-dest= --link-dest=\n'> 
                                              <
'                --compress --compress-level= --skip-compress= --cvs-exclude\n'
                                              > <'                --filter= --exclude= --exclude-from= --include= --include-from=\n'> 
                                              <
'                --files-from= --from0 --protect-args --address= --port=\n'
                                              > <'                --sockopts= --blocking-io --no-blocking-io --stats\n'> 
                                              <
'                --8-bit-output --human-readable --progress --itemize-changes\n'
                                              > <'                --out-format= --log-file= --log-file-format= --password-file=\n'> 
                                              <
'                --list-only --bwlimit= --write-batch= --only-write-batch=\n'
                                              > <'                --read-batch= --protocol= --iconv= --ipv4 --ipv6 --version\n'> 
                                              <
'                --help --daemon --config= --no-detach'
                                              >
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [251]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      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>} {<Id.Lit_Other '+'> <o>} {<nospace>})
                      ]
                    )
                  ]
                  spids: [246 248 321 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <Id.Lit_Colon ':'> <Id.Lit_Star '*'>}]
                  action: [
                    (C {<local>} {<i>} {<Id.Lit_VarLike 'shell='> <ssh>})
                    (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: 
                                                    {<-> 
                                                      (word_part.ExtGlob
                                                        op: <Id.ExtGlob_At '@('>
                                                        arms: [{<e>} {<-rsh>}]
                                                      )
                                                    }
                                                )
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:shell)
                                          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: [396]
                                        )
                                      ]
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Break break>
                                    )
                                  ]
                                  spids: [368 393]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$shell')}
                              right: {<ssh>}
                            )
                        )
                        (C {<_xfunc>} {<ssh>} {<_scp_remote_files>})
                      ]
                    )
                  ]
                  spids: [324 327 435 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<_known_hosts_real>} {<-c>} {<-a>} {(DQ ($ Id.VSub_DollarName '$cur'))})
                    (C {<_xfunc>} {<ssh>} {<_scp_local_files>})
                  ]
                  spids: [438 439 460 -1]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (C {<complete>} {<-F>} {<_rsync>} {<-o>} {<nospace>} {<rsync>})
  ]
)