	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_fifo_res_copy
_vmw_fifo_res_copy:                     ## @vmw_fifo_res_copy
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rsi, %r12
	subl	%edx, %ebx
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_2:
	cmpl	%r14d, %ebx
	movl	%r14d, %r13d
	cmovll	%ebx, %r13d
	movq	_SVGA_FIFO_RESERVED@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r12,%rax,4), %rsi
	movl	%r14d, %edi
	callq	_vmw_mmio_write
	xorl	%eax, %eax
	callq	_mb
	sarl	$2, %r15d
	movslq	%r15d, %rax
	leaq	(%r12,%rax,4), %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	cmpl	%r14d, %ebx
	jge	LBB0_3
## %bb.4:
	subl	%r13d, %r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	sarl	$2, %eax
	cltq
	leaq	(%r12,%rax,4), %rdi
	sarl	$2, %r13d
	movslq	%r13d, %rax
	leaq	(%r15,%rax,4), %rsi
	movl	%r14d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_FIFO_RESERVED,4,2         ## @SVGA_FIFO_RESERVED
	.no_dead_strip	_vmw_fifo_res_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_fifo_res_copy
_vmw_fifo_res_copy:                     ; @vmw_fifo_res_copy
	.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	x20, x5
	mov	x19, x4
	mov	x23, x2
	mov	x21, x1
	sub	w25, w3, w2
	ldr	x22, [x0]
	cbnz	x22, LBB0_2
; %bb.1:
	ldr	x22, [x0, #8]
LBB0_2:
	cmp	w25, w20
	csel	w24, w25, w20, lt
Lloh0:
	adrp	x8, _SVGA_FIFO_RESERVED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SVGA_FIFO_RESERVED@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x1, x21, x8, lsl #2
	mov	x0, x20
	bl	_vmw_mmio_write
	bl	_mb
	asr	w8, w23, #2
	add	x0, x21, w8, sxtw #2
	mov	x1, x22
	mov	x2, x24
	bl	_memcpy
	cmp	w25, w20
	b.ge	LBB0_4
; %bb.3:
	sub	w2, w20, w24
	asr	w8, w19, #2
	add	x0, x21, w8, sxtw #2
	asr	w8, w24, #2
	add	x1, x22, w8, sxtw #2
	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
	b	_memcpy
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_FIFO_RESERVED,4,2         ; @SVGA_FIFO_RESERVED
	.no_dead_strip	_vmw_fifo_res_copy
.subsections_via_symbols
