	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_emul_cfgdata
_pci_emul_cfgdata:                      ## @pci_emul_cfgdata
	.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	%r9, %r13
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	leal	-1(%r15), %eax
	cmpl	$2, %eax
	setb	%al
	cmpl	$4, %r8d
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_cfgenable@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_cfgoff@GOTPCREL(%rip), %rax
	movq	_CONF1_DATA_PORT@GOTPCREL(%rip), %rcx
	addl	(%rax), %ebx
	subl	(%rcx), %ebx
	movq	_cfgbus@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_cfgslot@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_cfgfunc@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	pushq	%r13
	pushq	%r15
	pushq	%rbx
	callq	_pci_cfgrw
	addq	$32, %rsp
	jmp	LBB0_4
LBB0_2:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	movl	$-1, (%r13)
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cfgoff,4,2                     ## @cfgoff
	.comm	_CONF1_DATA_PORT,4,2            ## @CONF1_DATA_PORT
	.comm	_cfgenable,8,3                  ## @cfgenable
	.comm	_cfgbus,4,2                     ## @cfgbus
	.comm	_cfgslot,4,2                    ## @cfgslot
	.comm	_cfgfunc,4,2                    ## @cfgfunc
	.no_dead_strip	_pci_emul_cfgdata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_emul_cfgdata
_pci_emul_cfgdata:                      ; @pci_emul_cfgdata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x5
	mov	x19, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	sub	w8, w4, #1
	cmp	w4, #4
	ccmp	w8, #2, #0, ne
	cset	w0, lo
	bl	_assert
Lloh0:
	adrp	x8, _cfgenable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cfgenable@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _cfgoff@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cfgoff@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CONF1_DATA_PORT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CONF1_DATA_PORT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w8, w8, w24
	sub	w6, w8, w9
Lloh9:
	adrp	x8, _cfgbus@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cfgbus@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x8, _cfgslot@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cfgslot@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
Lloh15:
	adrp	x8, _cfgfunc@GOTPAGE
Lloh16:
	ldr	x8, [x8, _cfgfunc@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	str	x20, [sp]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x7, x19
	bl	_pci_cfgrw
	b	LBB0_4
LBB0_2:
	cbz	w21, LBB0_4
; %bb.3:
	mov	w8, #-1
	str	w8, [x20]
LBB0_4:
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_cfgoff,4,2                     ; @cfgoff
	.comm	_CONF1_DATA_PORT,4,2            ; @CONF1_DATA_PORT
	.comm	_cfgenable,8,3                  ; @cfgenable
	.comm	_cfgbus,4,2                     ; @cfgbus
	.comm	_cfgslot,4,2                    ; @cfgslot
	.comm	_cfgfunc,4,2                    ; @cfgfunc
	.no_dead_strip	_pci_emul_cfgdata
.subsections_via_symbols
