	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et8ek8_i2c_write_regs
_et8ek8_i2c_write_regs:                 ## @et8ek8_i2c_write_regs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 4(%rdi)
	je	LBB0_1
## %bb.3:
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.4:
	movq	%rdi, %r13
	movq	(%rsi), %rdx
	movq	_ET8EK8_REG_TERM@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	xorl	%ebx, %ebx
	movq	_ET8EK8_REG_DELAY@GOTPCREL(%rip), %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %r13
	movq	_ET8EK8_REG_TERM@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpq	%rax, %rdx
	je	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpq	%rax, %rdx
	je	LBB0_10
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	(%r15), %rdx
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_ET8EK8_REG_8BIT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	setne	%al
	movq	_ET8EK8_REG_16BIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	incl	%ebx
	movq	16(%r12), %rdx
	addq	$16, %r12
	cmpq	(%r14), %rdx
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %r14
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_et8ek8_i2c_buffered_write_regs
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rdx
	cmpq	(%r15), %rdx
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r12), %edi
	callq	_msleep
	movq	16(%r12), %rdx
	addq	$16, %r12
	xorl	%ebx, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_11:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ET8EK8_REG_TERM,8,3            ## @ET8EK8_REG_TERM
	.comm	_ET8EK8_REG_DELAY,8,3           ## @ET8EK8_REG_DELAY
	.comm	_ET8EK8_REG_8BIT,8,3            ## @ET8EK8_REG_8BIT
	.comm	_ET8EK8_REG_16BIT,8,3           ## @ET8EK8_REG_16BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid type = %d"

L_.str.1:                               ## @.str.1
	.asciz	"i2c transfer error!\n"

	.no_dead_strip	_et8ek8_i2c_write_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et8ek8_i2c_write_regs
_et8ek8_i2c_write_regs:                 ; @et8ek8_i2c_write_regs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_11
; %bb.2:
	mov	x19, x0
	mov	w21, #0
	ldr	x2, [x20]
Lloh0:
	adrp	x24, _ET8EK8_REG_TERM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ET8EK8_REG_TERM@GOTPAGEOFF]
Lloh2:
	adrp	x25, _ET8EK8_REG_DELAY@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ET8EK8_REG_DELAY@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ET8EK8_REG_8BIT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ET8EK8_REG_8BIT@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh6:
	adrp	x27, _ET8EK8_REG_16BIT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _ET8EK8_REG_16BIT@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str@PAGE
Lloh9:
	add	x22, x22, l_.str@PAGEOFF
	mov	x28, x20
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	cmp	x2, x8
	b.eq	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	x2, x8
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	cmp	x2, x8
	b.eq	LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	cmp	x2, x8
	ldr	x8, [x27]
	ccmp	x2, x8, #4, ne
	cset	w0, ne
	mov	x1, x22
	bl	_WARN
	cbnz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w21, w21, #1
	ldr	x2, [x28, #16]!
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x2, x8
	ccmp	x2, x9, #4, ne
	b.ne	LBB0_6
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_et8ek8_i2c_buffered_write_regs
	tbnz	w0, #31, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [x28]
	ldr	x8, [x25]
	cmp	x2, x8
	b.ne	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x28, #8]
	bl	_msleep
	mov	w21, #0
	ldr	x2, [x28, #16]!
	mov	x20, x28
	b	LBB0_3
LBB0_11:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	w23, #0
	b	LBB0_14
LBB0_16:
	mov	x23, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ET8EK8_REG_TERM,8,3            ; @ET8EK8_REG_TERM
	.comm	_ET8EK8_REG_DELAY,8,3           ; @ET8EK8_REG_DELAY
	.comm	_ET8EK8_REG_8BIT,8,3            ; @ET8EK8_REG_8BIT
	.comm	_ET8EK8_REG_16BIT,8,3           ; @ET8EK8_REG_16BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid type = %d"

l_.str.1:                               ; @.str.1
	.asciz	"i2c transfer error!\n"

	.no_dead_strip	_et8ek8_i2c_write_regs
.subsections_via_symbols
