	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9005_i2c_write
_af9005_i2c_write:                      ## @af9005_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, %r14
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movl	%r8d, %ecx
	xorl	%eax, %eax
	callq	_deb_i2c
	movq	_deb_i2c@GOTPCREL(%rip), %rdx
	movq	%r14, %r15
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_debug_dump
	leaq	L_.str.2(%rip), %rdi
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.1:
	movl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -80(%rbp)
	leaq	(%rbx,%r14), %rax
	movq	%rax, -72(%rbp)
	movq	(%r15,%r14,8), %rax
	movq	%rax, -64(%rbp)
	movq	_APO_REG_I2C_RW_SILICON_TUNER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-80(%rbp), %rdx
	movl	$3, %ecx
	callq	_af9005_write_tuner_registers
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_2
## %bb.4:
	xorl	%r13d, %r13d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_deb_i2c
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_write i2caddr %x, reg %x, len %d data "

	.comm	_APO_REG_I2C_RW_SILICON_TUNER,4,2 ## @APO_REG_I2C_RW_SILICON_TUNER
L_.str.1:                               ## @.str.1
	.asciz	"i2c_write failed\n"

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

	.no_dead_strip	_af9005_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9005_i2c_write
_af9005_i2c_write:                      ; @af9005_i2c_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	stp	x2, x23, [sp, #8]
	str	x1, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_i2c
Lloh5:
	adrp	x2, _deb_i2c@GOTPAGE
Lloh6:
	ldr	x2, [x2, _deb_i2c@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x23
	bl	_debug_dump
	cmp	w23, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w25, w23
Lloh7:
	adrp	x27, _APO_REG_I2C_RW_SILICON_TUNER@GOTPAGE
Lloh8:
	ldr	x27, [x27, _APO_REG_I2C_RW_SILICON_TUNER@GOTPAGEOFF]
Lloh9:
	adrp	x26, l_.str.1@PAGE
Lloh10:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh11:
	adrp	x23, l_.str.2@PAGE
Lloh12:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	stp	x21, x20, [sp, #32]
	ldr	x8, [x19]
	str	x8, [sp, #48]
	ldr	w1, [x27]
	add	x2, sp, #32
	mov	x0, x22
	mov	w3, #3
	bl	_af9005_write_tuner_registers
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #8
	add	x20, x20, #1
	subs	x25, x25, #1
	b.ne	LBB0_2
; %bb.4:
	mov	w24, #0
	b	LBB0_7
LBB0_5:
	mov	w24, #0
Lloh13:
	adrp	x23, l_.str.2@PAGE
Lloh14:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x24, x0
	mov	x23, x26
LBB0_7:
	mov	x0, x23
	bl	_deb_i2c
	ldr	x8, [sp, #56]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x24
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_write i2caddr %x, reg %x, len %d data "

	.comm	_APO_REG_I2C_RW_SILICON_TUNER,4,2 ; @APO_REG_I2C_RW_SILICON_TUNER
l_.str.1:                               ; @.str.1
	.asciz	"i2c_write failed\n"

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

	.no_dead_strip	_af9005_i2c_write
.subsections_via_symbols
