	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_copy_sge                   ## -- Begin function rvt_copy_sge
	.p2align	4, 0x90
_rvt_copy_sge:                          ## @rvt_copy_sge
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movl	(%rdi), %edi
	callq	_ib_to_rvt
	movl	(%rax), %ecx
	movq	_RVT_SGE_COPY_CACHELESS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_2
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r13d, (%rax)
	setle	%cl
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_9
LBB0_2:
	movq	_RVT_SGE_COPY_ADAPTIVE@GOTPCREL(%rip), %rdx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	cmpl	(%rdx), %ecx
	jne	LBB0_9
## %bb.3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	8(%rax), %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	cmpl	%r13d, (%r12)
	jle	LBB0_4
## %bb.7:
	movq	%r14, %rdi
	callq	_wss_advance_clean_counter
	jmp	LBB0_8
LBB0_4:
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_wss_insert
	movslq	(%r12), %rsi
	leal	(%rsi,%rsi), %eax
	cmpl	%r13d, %eax
	jg	LBB0_6
## %bb.5:
	addq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_wss_insert
LBB0_6:
	movq	%r14, %rdi
	callq	_wss_exceeds_threshold
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_8:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.11:
	movl	$1, %r12d
	cmpl	$9, %r13d
	jl	LBB0_12
## %bb.13:
	addl	$-8, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_10:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	$8, %r13d
	movl	$1, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	$0, %r14d
	je	LBB0_37
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_23 Depth 3
                                        ##       Child Loop BB0_26 Depth 3
                                        ##       Child Loop BB0_29 Depth 3
                                        ##       Child Loop BB0_31 Depth 3
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	jne	LBB0_15
	jmp	LBB0_36
LBB0_34:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_rvt_update_sge
	movslq	%r14d, %rax
	addq	%rax, %rbx
	subl	%r14d, %r13d
	je	LBB0_36
LBB0_15:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_23 Depth 3
                                        ##       Child Loop BB0_26 Depth 3
                                        ##       Child Loop BB0_29 Depth 3
                                        ##       Child Loop BB0_31 Depth 3
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_rvt_get_sge_length
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON_ONCE
	movl	%r12d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_32
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	testl	%r14d, %r14d
	jle	LBB0_35
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	(%r15), %rax
	movl	%r14d, %r8d
	cmpl	$8, %r14d
	jb	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%rax, %rcx
	subq	%rbx, %rcx
	movl	$0, %edx
	cmpq	$32, %rcx
	jb	LBB0_28
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	%r8d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rcx
	movq	%rcx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rcx
	jae	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_15 Depth=2
	xorl	%ecx, %ecx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	(%r15), %rdi
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_cacheless_memcpy
	jmp	LBB0_35
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	xorl	%edx, %edx
	jmp	LBB0_28
LBB0_22:                                ##   in Loop: Header=BB0_15 Depth=2
	andq	$-4, %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_14 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movups	(%rbx,%rcx,4), %xmm0
	movups	16(%rbx,%rcx,4), %xmm1
	movups	%xmm0, (%rax,%rcx,4)
	movups	%xmm1, 16(%rax,%rcx,4)
	movups	32(%rbx,%rcx,4), %xmm0
	movups	48(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 32(%rax,%rcx,4)
	movups	%xmm1, 48(%rax,%rcx,4)
	movups	64(%rbx,%rcx,4), %xmm0
	movups	80(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 64(%rax,%rcx,4)
	movups	%xmm1, 80(%rax,%rcx,4)
	movups	96(%rbx,%rcx,4), %xmm0
	movups	112(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 96(%rax,%rcx,4)
	movups	%xmm1, 112(%rax,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdi
	jne	LBB0_23
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=2
	testq	%r9, %r9
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_15 Depth=2
	leaq	(%rax,%rcx,4), %rdi
	addq	$16, %rdi
	leaq	(%rbx,%rcx,4), %rcx
	addq	$16, %rcx
	shlq	$5, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_14 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movups	-16(%rcx,%rsi), %xmm0
	movups	(%rcx,%rsi), %xmm1
	movups	%xmm0, -16(%rdi,%rsi)
	movups	%xmm1, (%rdi,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_26
LBB0_27:                                ##   in Loop: Header=BB0_15 Depth=2
	cmpq	%r8, %rdx
	je	LBB0_35
LBB0_28:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%rdx, %rcx
	notq	%rcx
	addq	%r8, %rcx
	movq	%r8, %rsi
	andq	$3, %rsi
	je	LBB0_30
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_14 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rbx,%rdx,4), %edi
	movl	%edi, (%rax,%rdx,4)
	incq	%rdx
	decq	%rsi
	jne	LBB0_29
LBB0_30:                                ##   in Loop: Header=BB0_15 Depth=2
	cmpq	$3, %rcx
	jb	LBB0_35
	.p2align	4, 0x90
LBB0_31:                                ##   Parent Loop BB0_14 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rbx,%rdx,4), %ecx
	movl	%ecx, (%rax,%rdx,4)
	movl	4(%rbx,%rdx,4), %ecx
	movl	%ecx, 4(%rax,%rdx,4)
	movl	8(%rbx,%rdx,4), %ecx
	movl	%ecx, 8(%rax,%rdx,4)
	movl	12(%rbx,%rdx,4), %ecx
	movl	%ecx, 12(%rax,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_31
	jmp	LBB0_35
LBB0_37:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RVT_SGE_COPY_CACHELESS,4,2     ## @RVT_SGE_COPY_CACHELESS
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RVT_SGE_COPY_ADAPTIVE,4,2      ## @RVT_SGE_COPY_ADAPTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_copy_sge                   ; -- Begin function rvt_copy_sge
	.p2align	2
_rvt_copy_sge:                          ; @rvt_copy_sge
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x5
	mov	x19, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	ldr	w0, [x0]
	bl	_ib_to_rvt
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RVT_SGE_COPY_CACHELESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RVT_SGE_COPY_CACHELESS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w23
	cset	w22, le
	b	LBB0_9
LBB0_2:
Lloh6:
	adrp	x9, _RVT_SGE_COPY_ADAPTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RVT_SGE_COPY_ADAPTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	x22, [x0, #8]
Lloh9:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, w23
	b.le	LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_wss_advance_clean_counter
LBB0_5:
	mov	w22, #0
	b	LBB0_9
LBB0_6:
	ldr	x1, [x21]
	mov	x0, x22
	bl	_wss_insert
	ldrsw	x8, [x25]
	cmp	w23, w8, lsl #1
	b.lt	LBB0_8
; %bb.7:
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x22
	bl	_wss_insert
LBB0_8:
	mov	x0, x22
	bl	_wss_exceeds_threshold
	mov	x22, x0
LBB0_9:
	mov	w8, #1
	sub	w9, w23, #8
	cmp	w23, #9
	csel	w8, w8, wzr, lt
	csel	w10, wzr, w24, lt
	csel	w9, w23, w9, lt
	cmp	w24, #0
	csel	w24, wzr, w8, eq
	csel	w8, wzr, w10, eq
	csel	w23, w23, w9, eq
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w8, #0
	mov	w23, #8
	mov	w24, #1
	cbz	w26, LBB0_25
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;       Child Loop BB0_22 Depth 3
	mov	x26, x8
	cbnz	w23, LBB0_14
	b	LBB0_10
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=2
	bl	_memcpy
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	mov	x0, x21
	mov	x1, x25
	mov	x2, x19
	bl	_rvt_update_sge
	add	x20, x20, w25, sxtw
	subs	w23, w23, w25
	b.eq	LBB0_10
LBB0_14:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;       Child Loop BB0_22 Depth 3
	mov	x0, x21
	mov	x1, x23
	bl	_rvt_get_sge_length
	mov	x25, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	mov	x0, x24
	bl	_unlikely
	cbz	x0, LBB0_23
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	cmp	w25, #1
	b.lt	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	mov	x8, #0
	ldr	x10, [x21]
	mov	w9, w25
	cmp	w25, #16
	b.lo	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=2
	sub	x11, x10, x20
	cmp	x11, #64
	b.lo	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	and	x8, x9, #0xfffffff0
	add	x11, x10, #32
	add	x12, x20, #32
	mov	x13, x8
LBB0_19:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_14 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_19
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=2
	cmp	x8, x9
	b.eq	LBB0_13
LBB0_21:                                ;   in Loop: Header=BB0_14 Depth=2
	lsl	x11, x8, #2
	add	x10, x10, x11
	add	x11, x20, x11
	sub	x8, x9, x8
LBB0_22:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_14 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w9, [x11], #4
	str	w9, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_22
	b	LBB0_13
LBB0_23:                                ;   in Loop: Header=BB0_14 Depth=2
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x25
	cbz	w22, LBB0_12
; %bb.24:                               ;   in Loop: Header=BB0_14 Depth=2
	bl	_cacheless_memcpy
	b	LBB0_13
LBB0_25:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RVT_SGE_COPY_CACHELESS,4,2     ; @RVT_SGE_COPY_CACHELESS
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RVT_SGE_COPY_ADAPTIVE,4,2      ; @RVT_SGE_COPY_ADAPTIVE
.subsections_via_symbols
