	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_ea_init                    ## -- Begin function pci_ea_init
	.p2align	4, 0x90
_pci_ea_init:                           ## @pci_ea_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_PCI_CAP_ID_EA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_find_capability
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %r14d
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	movslq	%eax, %rdx
	movq	_PCI_EA_NUM_ENT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	leaq	-28(%rbp), %rcx
	callq	_pci_bus_read_config_byte
	movq	_PCI_EA_NUM_ENT_MASK@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %ecx
	andl	(%rax), %ecx
	movl	%ecx, -28(%rbp)
	jle	LBB0_4
## %bb.2:
	movq	(%r15), %rax
	movq	_PCI_HEADER_TYPE_BRIDGE@GOTPCREL(%rip), %rcx
	movq	_PCI_EA_FIRST_ENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leal	(%rdx,%r14), %esi
	cmpq	(%rcx), %rax
	leal	4(%rdx,%r14), %eax
	cmovnel	%esi, %eax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_ea_read
	incl	%ebx
	cmpl	-28(%rbp), %ebx
	jl	LBB0_3
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_EA,4,2              ## @PCI_CAP_ID_EA
	.comm	_PCI_EA_NUM_ENT,8,3             ## @PCI_EA_NUM_ENT
	.comm	_PCI_EA_NUM_ENT_MASK,4,2        ## @PCI_EA_NUM_ENT_MASK
	.comm	_PCI_EA_FIRST_ENT,4,2           ## @PCI_EA_FIRST_ENT
	.comm	_PCI_HEADER_TYPE_BRIDGE,8,3     ## @PCI_HEADER_TYPE_BRIDGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_ea_init                    ; -- Begin function pci_ea_init
	.p2align	2
_pci_ea_init:                           ; @pci_ea_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_CAP_ID_EA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_EA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_find_capability
	cbz	w0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldp	w1, w0, [x19, #8]
Lloh3:
	adrp	x8, _PCI_EA_NUM_ENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_EA_NUM_ENT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x2, x8, w20, sxtw
	add	x3, sp, #12
	bl	_pci_bus_read_config_byte
Lloh6:
	adrp	x8, _PCI_EA_NUM_ENT_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_EA_NUM_ENT_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w21, #0
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _PCI_HEADER_TYPE_BRIDGE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCI_HEADER_TYPE_BRIDGE@GOTPAGEOFF]
Lloh11:
	adrp	x10, _PCI_EA_FIRST_ENT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PCI_EA_FIRST_ENT@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	ldr	w10, [x10]
	add	w10, w10, w20
	add	w11, w10, #4
	cmp	x8, x9
	csel	w1, w11, w10, eq
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_pci_ea_read
	mov	x1, x0
	add	w21, w21, #1
	ldr	w8, [sp, #12]
	cmp	w21, w8
	b.lt	LBB0_3
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CAP_ID_EA,4,2              ; @PCI_CAP_ID_EA
	.comm	_PCI_EA_NUM_ENT,8,3             ; @PCI_EA_NUM_ENT
	.comm	_PCI_EA_NUM_ENT_MASK,4,2        ; @PCI_EA_NUM_ENT_MASK
	.comm	_PCI_EA_FIRST_ENT,4,2           ; @PCI_EA_FIRST_ENT
	.comm	_PCI_HEADER_TYPE_BRIDGE,8,3     ; @PCI_HEADER_TYPE_BRIDGE
.subsections_via_symbols
