	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_write
_i2c_write:                             ## @i2c_write
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	%ecx, -72(%rbp)
	movq	%rdx, -64(%rbp)
	movl	$0, -56(%rbp)
	movl	%esi, -52(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_dprintk
	movq	_debug@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_5
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_4
## %bb.2:
	movl	%r12d, %ebx
	leaq	L_.str.1(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r14,4), %esi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_pr_cont
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_3
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_cont
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_5:
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_drxk_i2c_transfer
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	cmpl	$1, %eax
	cmovel	%eax, %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	":"

	.comm	_debug,4,2                      ## @debug
L_.str.1:                               ## @.str.1
	.asciz	" %02x"

L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"i2c write error at addr 0x%02x\n"

	.no_dead_strip	_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_write
_i2c_write:                             ; @i2c_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	str	w3, [sp, #8]
	str	x2, [sp, #16]
	stp	wzr, w1, [sp, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_dprintk
Lloh2:
	adrp	x8, _debug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_5
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w23, w22
Lloh5:
	adrp	x22, l_.str.1@PAGE
Lloh6:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21], #4
	str	x8, [sp]
	mov	x0, x22
	bl	_pr_cont
	subs	x23, x23, #1
	b.ne	LBB0_3
LBB0_4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_cont
LBB0_5:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_drxk_i2c_transfer
	cmp	w0, #1
	mov	w8, #-1
	ccmp	w0, w8, #4, ne
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	csneg	w20, w0, w8, le
	tbz	w20, #31, LBB0_7
; %bb.6:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_err
LBB0_7:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	":"

	.comm	_debug,4,2                      ; @debug
l_.str.1:                               ; @.str.1
	.asciz	" %02x"

l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"i2c write error at addr 0x%02x\n"

	.no_dead_strip	_i2c_write
.subsections_via_symbols
