	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coalesced_mmio_write
_coalesced_mmio_write:                  ## @coalesced_mmio_write
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %ebx
	movl	%esi, %r12d
	callq	_to_mmio
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	(%rax), %r13
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_coalesced_mmio_in_range
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_spin_lock
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movl	%r12d, 8(%rcx,%rax,4)
	movl	%ebx, (%rcx,%rax,4)
	movl	4(%rcx,%rax,4), %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	xorl	%eax, %eax
	callq	_smp_wmb
	movq	(%r13), %rax
	incq	%rax
	movq	_KVM_COALESCED_MMIO_MAX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_5
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	movq	%rdx, (%r13)
	movq	%r14, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_KVM_COALESCED_MMIO_MAX,4,2     ## @KVM_COALESCED_MMIO_MAX
	.no_dead_strip	_coalesced_mmio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coalesced_mmio_write
_coalesced_mmio_write:                  ; @coalesced_mmio_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	bl	_to_mmio
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x8]
	mov	x1, x22
	mov	x2, x20
	bl	_coalesced_mmio_in_range
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_lock
	ldp	x9, x8, [x23]
	mov	w10, #12
	madd	x8, x9, x10, x8
	str	w22, [x8, #8]
	str	w20, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	bl	_smp_wmb
	ldr	x8, [x23]
	add	x8, x8, #1
Lloh0:
	adrp	x9, _KVM_COALESCED_MMIO_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVM_COALESCED_MMIO_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x23]
	mov	x0, x19
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_KVM_COALESCED_MMIO_MAX,4,2     ; @KVM_COALESCED_MMIO_MAX
	.no_dead_strip	_coalesced_mmio_write
.subsections_via_symbols
