	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_eeprom_read_byte
_idt_eeprom_read_byte:                  ## @idt_eeprom_read_byte
	.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	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_CCODE_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdi), %eax
	movl	%eax, -88(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	_RETRY_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	-88(%rbp), %r13
	movq	_EEPROM_TOUT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_EEPROM_WRRD_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	_EEPROM_OP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	4(%rbx), %eax
	movl	%eax, -72(%rbp)
	movl	24(%rbx), %eax
	movl	%eax, -60(%rbp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, -64(%rbp)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	*8(%rbx)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_EEPROM_RD_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	*16(%rbx)
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-72(%rbp), %edx
	movq	_EEPROM_NAERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	$1, %r15d
	jb	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ecx
	andl	%edx, %ecx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	callq	_msleep
	jmp	LBB0_1
LBB0_2:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_5:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dev_err
	jmp	LBB0_12
LBB0_9:
	movq	_EEPROM_LAERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_EEPROM_MSS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%edx, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_11:
	movl	-68(%rbp), %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CCODE_EEPROM,4,2               ## @CCODE_EEPROM
	.comm	_RETRY_CNT,4,2                  ## @RETRY_CNT
	.comm	_EEPROM_WRRD_CNT,4,2            ## @EEPROM_WRRD_CNT
	.comm	_EEPROM_OP_READ,4,2             ## @EEPROM_OP_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init eeprom addr 0x%02hhx"

	.comm	_EEPROM_RD_CNT,4,2              ## @EEPROM_RD_CNT
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read eeprom data 0x%02hhx"

	.comm	_EEPROM_NAERR,4,2               ## @EEPROM_NAERR
L_.str.2:                               ## @.str.2
	.asciz	"EEPROM busy, retry reading after %d ms"

	.comm	_EEPROM_TOUT,4,2                ## @EEPROM_TOUT
	.comm	_EEPROM_LAERR,4,2               ## @EEPROM_LAERR
	.comm	_EEPROM_MSS,4,2                 ## @EEPROM_MSS
L_.str.3:                               ## @.str.3
	.asciz	"Communication with eeprom failed, cmd 0x%hhx"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_idt_eeprom_read_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idt_eeprom_read_byte
_idt_eeprom_read_byte:                  ; @idt_eeprom_read_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #32]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _CCODE_EEPROM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CCODE_EEPROM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #16]
	add	x8, sp, #32
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _RETRY_CNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETRY_CNT@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
Lloh6:
	adrp	x26, _EEPROM_WRRD_CNT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EEPROM_WRRD_CNT@GOTPAGEOFF]
Lloh8:
	adrp	x27, _EEPROM_OP_READ@GOTPAGE
Lloh9:
	ldr	x27, [x27, _EEPROM_OP_READ@GOTPAGEOFF]
Lloh10:
	adrp	x28, _EEPROM_RD_CNT@GOTPAGE
Lloh11:
	ldr	x28, [x28, _EEPROM_RD_CNT@GOTPAGEOFF]
Lloh12:
	adrp	x20, _EEPROM_TOUT@GOTPAGE
Lloh13:
	ldr	x20, [x20, _EEPROM_TOUT@GOTPAGEOFF]
Lloh14:
	adrp	x23, l_.str.2@PAGE
Lloh15:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	str	w8, [sp, #20]
	ldr	w8, [x22, #4]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x22, #24]
	str	w8, [sp, #32]
	str	w9, [sp, #44]
	mov	x0, x21
	bl	_cpu_to_le16
	str	w0, [sp, #40]
	ldr	x8, [x22, #8]
	add	x1, sp, #16
	mov	x0, x22
	blr	x8
	cbnz	w0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x28]
	str	w8, [sp, #20]
	ldr	x8, [x22, #16]
	add	x1, sp, #16
	mov	x0, x22
	blr	x8
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w2, [sp, #32]
Lloh16:
	adrp	x8, _EEPROM_NAERR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EEPROM_NAERR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cbz	w25, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	and	w9, w8, w2
	cbz	w9, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, x23
	bl	_dev_dbg
	ldr	w0, [x20]
	bl	_msleep
	sub	w25, w25, #1
	b	LBB0_1
LBB0_6:
	mov	x24, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x24, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_12
LBB0_9:
Lloh23:
	adrp	x9, _EEPROM_LAERR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EEPROM_LAERR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _EEPROM_MSS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _EEPROM_MSS@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w2
	b.eq	LBB0_11
; %bb.10:
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh31:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_12
LBB0_11:
	mov	w24, #0
	ldr	w8, [sp, #36]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_12:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_CCODE_EEPROM,4,2               ; @CCODE_EEPROM
	.comm	_RETRY_CNT,4,2                  ; @RETRY_CNT
	.comm	_EEPROM_WRRD_CNT,4,2            ; @EEPROM_WRRD_CNT
	.comm	_EEPROM_OP_READ,4,2             ; @EEPROM_OP_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init eeprom addr 0x%02hhx"

	.comm	_EEPROM_RD_CNT,4,2              ; @EEPROM_RD_CNT
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read eeprom data 0x%02hhx"

	.comm	_EEPROM_NAERR,4,2               ; @EEPROM_NAERR
l_.str.2:                               ; @.str.2
	.asciz	"EEPROM busy, retry reading after %d ms"

	.comm	_EEPROM_TOUT,4,2                ; @EEPROM_TOUT
	.comm	_EEPROM_LAERR,4,2               ; @EEPROM_LAERR
	.comm	_EEPROM_MSS,4,2                 ; @EEPROM_MSS
l_.str.3:                               ; @.str.3
	.asciz	"Communication with eeprom failed, cmd 0x%hhx"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_idt_eeprom_read_byte
.subsections_via_symbols
