	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_emul_mem_handler
_pci_emul_mem_handler:                  ## @pci_emul_mem_handler
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r14d
	movq	%rcx, %r13
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r12
	movq	24(%rbp), %rbx
	movq	8(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_PCI_BARMAX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%ebx, (%rax)
	setge	%dil
	callq	_assert
	movq	(%r12), %rax
	movslq	%ebx, %r15
	movq	%r12, %rbx
	leaq	(,%r15,8), %rcx
	leaq	(%rcx,%rcx,2), %r12
	movq	(%rax,%r12), %rax
	movq	_PCIBAR_MEM32@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PCIBAR_MEM64@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	(%rbx), %rcx
	movq	8(%rcx,%r12), %rax
	xorl	%edi, %edi
	cmpq	%r13, %rax
	jg	LBB0_2
## %bb.1:
	movslq	%r14d, %rdx
	leaq	(%r15,%r15,2), %rsi
	addq	16(%rcx,%rsi,8), %rax
	addq	%r13, %rdx
	xorl	%edi, %edi
	cmpq	%rax, %rdx
	setle	%dil
LBB0_2:
	callq	_assert
	movq	16(%rbp), %rax
	movq	(%rax), %rax
	leaq	(%r15,%r15,2), %rcx
	subq	8(%rax,%rcx,8), %r13
	movq	_MEM_F_WRITE@GOTPCREL(%rip), %rax
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_6
## %bb.3:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r10
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rcx
	cmpl	$8, %r14d
	jne	LBB0_5
## %bb.4:
	movl	%ecx, %ecx
	movq	%rcx, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	16(%rbp), %rdx
	movq	%rax, %r12
	movq	24(%rbp), %r14
	movl	%r14d, %ecx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	*%r10
	addq	$4, %r13
	movslq	4(%r15), %rax
	movq	%rax, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	16(%rbp), %rdx
	movl	%r14d, %ecx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	*8(%r12)
	jmp	LBB0_9
LBB0_6:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	cmpl	$8, %r14d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	16(%rbp), %rdx
	movq	%rcx, %r12
	movq	24(%rbp), %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	*%rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, (%r14)
	addq	$4, %r13
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	16(%rbp), %rdx
	movq	24(%rbp), %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	*(%r12)
	shlq	$32, %rax
	orq	%rax, (%r14)
	jmp	LBB0_9
LBB0_5:
	movq	%rcx, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	16(%rbp), %rdx
	movq	24(%rbp), %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	movl	%r14d, %r9d
	callq	*%r10
	jmp	LBB0_9
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	16(%rbp), %rdx
	movq	24(%rbp), %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	movl	%r14d, %r9d
	callq	*%rax
	movq	%rax, (%rbx)
LBB0_9:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_BARMAX,4,2                 ## @PCI_BARMAX
	.comm	_PCIBAR_MEM32,8,3               ## @PCIBAR_MEM32
	.comm	_PCIBAR_MEM64,8,3               ## @PCIBAR_MEM64
	.comm	_MEM_F_WRITE,4,2                ## @MEM_F_WRITE
	.no_dead_strip	_pci_emul_mem_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_emul_mem_handler
_pci_emul_mem_handler:                  ; @pci_emul_mem_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x21, x6
	mov	x22, x5
	mov	x24, x4
	mov	x26, x3
	mov	x25, x2
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	mov	x23, x0
	ldr	x27, [x6, #8]
Lloh0:
	adrp	x8, _PCI_BARMAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_BARMAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, ge
	bl	_assert
	ldr	x8, [x21]
	sxtw	x28, w20
	add	x9, x28, w20, sxtw #1
	lsl	x19, x9, #3
	ldr	x8, [x8, x19]
Lloh3:
	adrp	x9, _PCIBAR_MEM32@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCIBAR_MEM32@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh6:
	adrp	x9, _PCIBAR_MEM64@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCIBAR_MEM64@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	add	x9, x8, x19
	ldr	x9, [x9, #8]
	cmp	x9, x26
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	add	x10, x26, w24, sxtw
	mov	w11, #24
	madd	x8, x28, x11, x8
	ldr	x8, [x8, #16]
	add	x8, x8, x9
	cmp	x10, x8
	cset	w0, le
LBB0_3:
	bl	_assert
	ldr	x8, [x21]
	mov	w9, #24
	madd	x8, x28, x9, x8
	ldr	x8, [x8, #8]
	sub	x26, x26, x8
Lloh9:
	adrp	x8, _MEM_F_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MEM_F_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w25
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x27, #8]
	ldr	x6, [x22]
	cmp	w24, #8
	b.ne	LBB0_8
; %bb.5:
	and	x6, x6, #0xffffffff
	mov	x0, x23
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	mov	x4, x26
	mov	w5, #4
	blr	x8
	ldr	x8, [x27, #8]
	add	x4, x26, #4
	ldrsw	x6, [x22, #4]
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	mov	w5, #4
	blr	x8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x27]
	cmp	w24, #8
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x23
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	mov	x4, x26
	mov	w5, #4
	blr	x8
	str	x0, [x22]
	ldr	x8, [x27]
	add	x4, x26, #4
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	mov	w5, #4
	blr	x8
	ldr	x8, [x22]
	orr	x8, x8, x0, lsl #32
	str	x8, [x22]
	b	LBB0_10
LBB0_8:
	mov	x0, x23
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x2, x21
	mov	x3, x20
	mov	x4, x26
	mov	x5, x24
	blr	x8
	b	LBB0_10
LBB0_9:
	mov	x0, x23
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x2, x21
	mov	x3, x20
	mov	x4, x26
	mov	x5, x24
	blr	x8
	str	x0, [x22]
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_BARMAX,4,2                 ; @PCI_BARMAX
	.comm	_PCIBAR_MEM32,8,3               ; @PCIBAR_MEM32
	.comm	_PCIBAR_MEM64,8,3               ; @PCIBAR_MEM64
	.comm	_MEM_F_WRITE,4,2                ; @MEM_F_WRITE
	.no_dead_strip	_pci_emul_mem_handler
.subsections_via_symbols
