	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eeprom_read
_eeprom_read:                           ## @eeprom_read
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_eeprom_wait_ready
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	_LBCIF_CONTROL_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LBCIF_CONTROL_LBCIF_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_byte
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_LBCIF_ADDRESS_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_pci_write_config_dword
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_eeprom_wait_ready
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movl	%eax, (%r14)
	movq	_LBCIF_STATUS_ACK_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	-28(%rbp), %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_LBCIF_CONTROL_REGISTER,4,2     ## @LBCIF_CONTROL_REGISTER
	.comm	_LBCIF_CONTROL_LBCIF_ENABLE,4,2 ## @LBCIF_CONTROL_LBCIF_ENABLE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_LBCIF_ADDRESS_REGISTER,4,2     ## @LBCIF_ADDRESS_REGISTER
	.comm	_LBCIF_STATUS_ACK_ERROR,4,2     ## @LBCIF_STATUS_ACK_ERROR
	.no_dead_strip	_eeprom_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eeprom_read
_eeprom_read:                           ; @eeprom_read
	.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, x2
	mov	x21, x1
	ldr	x20, [x0]
	mov	x0, x20
	mov	x1, #0
	bl	_eeprom_wait_ready
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LBCIF_CONTROL_REGISTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LBCIF_CONTROL_REGISTER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _LBCIF_CONTROL_LBCIF_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LBCIF_CONTROL_LBCIF_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pci_write_config_byte
	cbnz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _LBCIF_ADDRESS_REGISTER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LBCIF_ADDRESS_REGISTER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_pci_write_config_dword
	cbz	x0, LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
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
LBB0_5:
	add	x1, sp, #12
	mov	x0, x20
	bl	_eeprom_wait_ready
	tbnz	w0, #31, LBB0_4
; %bb.6:
	str	w0, [x19]
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _LBCIF_STATUS_ACK_ERROR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LBCIF_STATUS_ACK_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _EIO@GOTPAGE
Lloh16:
	ldr	x10, [x10, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w9, w8
	csneg	w0, wzr, w10, eq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LBCIF_CONTROL_REGISTER,4,2     ; @LBCIF_CONTROL_REGISTER
	.comm	_LBCIF_CONTROL_LBCIF_ENABLE,4,2 ; @LBCIF_CONTROL_LBCIF_ENABLE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_LBCIF_ADDRESS_REGISTER,4,2     ; @LBCIF_ADDRESS_REGISTER
	.comm	_LBCIF_STATUS_ACK_ERROR,4,2     ; @LBCIF_STATUS_ACK_ERROR
	.no_dead_strip	_eeprom_read
.subsections_via_symbols
