	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_eeprom
_read_eeprom:                           ## @read_eeprom
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	$0, -48(%rbp)
	movl	$1, -104(%rbp)
	leaq	-48(%rbp), %rax
	movq	%rax, -96(%rbp)
	movl	$0, -88(%rbp)
	movl	4(%rsi), %eax
	movl	%eax, -84(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -64(%rbp)
	movl	%eax, -60(%rbp)
	movl	(%rsi), %edi
	leaq	-104(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	-80(%rbp), %r12
	movq	%r14, %rbx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$64, %r15d
	movl	$64, %eax
	cmovll	%r15d, %eax
	movl	%eax, -80(%rbp)
	movq	%rbx, -72(%rbp)
	movl	(%r13), %edi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	-80(%rbp), %rax
	leaq	(%rbx,%rax,4), %rbx
	subl	%eax, %r15d
	jg	LBB0_5
## %bb.8:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	cmpl	$16, %r13d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	$0, %ebx
	jl	LBB0_12
## %bb.9:
	leaq	L_.str.1(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movl	$16, %ecx
	movq	%r14, %r8
	callq	_dev_dbg
	leal	16(%rbx), %eax
	addq	$64, %r14
	addl	$31, %ebx
	cmpl	%r13d, %ebx
	movl	%eax, %ebx
	jl	LBB0_10
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_2
LBB0_6:
	movl	%eax, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_2:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_12:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't read eeprom\n"

L_.str.1:                               ## @.str.1
	.asciz	"i2c eeprom %02x: %*ph\n"

	.no_dead_strip	_read_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_eeprom
_read_eeprom:                           ; @read_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	str	wzr, [sp, #60]
	mov	w8, #1
	str	w8, [sp, #32]
	add	x8, sp, #60
	str	x8, [sp, #40]
	ldp	w0, w8, [x1]
	stp	wzr, w8, [sp, #48]
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
	add	x1, sp, #32
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_9
; %bb.1:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.2:
	mov	w24, #64
	mov	x25, x21
	mov	x26, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w26, #64
	csel	w8, w26, w24, lt
	str	w8, [sp, #8]
	str	x25, [sp, #16]
	ldr	w0, [x22]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [sp, #8]
	add	x25, x25, x8, lsl #2
	sub	w26, w26, w8
	cmp	w26, #0
	b.gt	LBB0_3
; %bb.5:
	cmp	w20, #16
	b.lt	LBB0_8
; %bb.6:
	mov	w23, #0
Lloh3:
	adrp	x22, l_.str.1@PAGE
Lloh4:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x22
	mov	x2, x23
	mov	w3, #16
	mov	x4, x21
	bl	_dev_dbg
	add	w8, w23, #31
	add	w23, w23, #16
	add	x21, x21, #64
	cmp	w8, w20
	b.lt	LBB0_7
LBB0_8:
	mov	w23, #0
	b	LBB0_10
LBB0_9:
	mov	x23, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_10:
	mov	x0, x23
	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
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't read eeprom\n"

l_.str.1:                               ; @.str.1
	.asciz	"i2c eeprom %02x: %*ph\n"

	.no_dead_strip	_read_eeprom
.subsections_via_symbols
