	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et8ek8_i2c_read_reg
_et8ek8_i2c_read_reg:                   ## @et8ek8_i2c_read_reg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.3:
	movq	%rcx, %r14
	movl	%esi, %r12d
	movq	_ET8EK8_REG_8BIT@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_6
## %bb.4:
	movq	_ET8EK8_REG_16BIT@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movl	8(%r15), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movl	$2, -80(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -72(%rbp)
	movb	%dh, -44(%rbp)
	movl	%edx, %r13d
	movb	%dl, -43(%rbp)
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movl	%r12d, -80(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movl	4(%r15), %edi
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_8
## %bb.10:
	movb	-44(%rbp), %al
	movb	%al, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_dev_err
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ET8EK8_REG_8BIT,4,2            ## @ET8EK8_REG_8BIT
	.comm	_ET8EK8_REG_16BIT,4,2           ## @ET8EK8_REG_16BIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read from offset 0x%x error %d\n"

	.no_dead_strip	_et8ek8_i2c_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et8ek8_i2c_read_reg
_et8ek8_i2c_read_reg:                   ; @et8ek8_i2c_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_5
; %bb.1:
	mov	x23, x1
Lloh0:
	adrp	x8, _ET8EK8_REG_8BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ET8EK8_REG_8BIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ET8EK8_REG_16BIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ET8EK8_REG_16BIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_6
; %bb.2:
	mov	x21, x3
	mov	x19, x2
	ldr	w8, [x20, #8]
	str	w8, [sp, #40]
	mov	w8, #2
	str	w8, [sp, #16]
	add	x8, sp, #12
	stp	x8, xzr, [sp, #24]
	lsr	w8, w2, #8
	strb	w8, [sp, #12]
	strb	w2, [sp, #13]
	add	x1, sp, #16
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_8
; %bb.3:
	str	w23, [sp, #16]
Lloh6:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [sp, #32]
	ldr	w0, [x20, #4]
	add	x1, sp, #16
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	w22, #0
	ldrb	w8, [sp, #12]
	strb	w8, [x21]
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_8:
	mov	x22, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x22
	bl	_dev_err
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ET8EK8_REG_8BIT,4,2            ; @ET8EK8_REG_8BIT
	.comm	_ET8EK8_REG_16BIT,4,2           ; @ET8EK8_REG_16BIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read from offset 0x%x error %d\n"

	.no_dead_strip	_et8ek8_i2c_read_reg
.subsections_via_symbols
