	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_sensor_outb
_stk_sensor_outb:                       ## @stk_sensor_outb
	.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
	movq	%rdx, %r15
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	_STK_IIC_TX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_stk_camera_write_reg
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	_STK_IIC_TX_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_stk_camera_write_reg
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	movq	_STK_IIC_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_STK_IIC_OP_TX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_stk_camera_write_reg
	testq	%rax, %rax
	je	LBB0_3
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$1, %r14d
	movq	_STK_IIC_STAT@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r15
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_stk_camera_read_reg
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r13), %eax
	movq	_MAX_RETRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	movl	%eax, %r13d
	jl	LBB0_4
LBB0_7:
	movq	_STK_IIC_STAT_TX_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r14d, %r14d
	cmpq	%rax, %rsi
	setne	%r14b
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	cmpq	%rax, %rsi
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	$1, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_STK_IIC_TX_INDEX,4,2           ## @STK_IIC_TX_INDEX
	.comm	_STK_IIC_TX_VALUE,4,2           ## @STK_IIC_TX_VALUE
	.comm	_STK_IIC_OP,4,2                 ## @STK_IIC_OP
	.comm	_STK_IIC_OP_TX,8,3              ## @STK_IIC_OP_TX
	.comm	_STK_IIC_STAT,4,2               ## @STK_IIC_STAT
	.comm	_MAX_RETRIES,4,2                ## @MAX_RETRIES
	.comm	_STK_IIC_STAT_TX_OK,8,3         ## @STK_IIC_STAT_TX_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stk_sensor_outb failed, status=0x%02x\n"

	.no_dead_strip	_stk_sensor_outb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk_sensor_outb
_stk_sensor_outb:                       ; @stk_sensor_outb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x2, x1
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _STK_IIC_TX_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STK_IIC_TX_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_stk_camera_write_reg
	cbnz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _STK_IIC_TX_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STK_IIC_TX_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_stk_camera_write_reg
	cbnz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _STK_IIC_OP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STK_IIC_OP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _STK_IIC_OP_TX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STK_IIC_OP_TX@GOTPAGEOFF]
Lloh11:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_stk_camera_write_reg
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	mov	w20, #1
Lloh12:
	adrp	x21, _STK_IIC_STAT@GOTPAGE
Lloh13:
	ldr	x21, [x21, _STK_IIC_STAT@GOTPAGEOFF]
Lloh14:
	adrp	x22, _MAX_RETRIES@GOTPAGE
Lloh15:
	ldr	x22, [x22, _MAX_RETRIES@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_stk_camera_read_reg
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [sp, #8]
	ldr	w8, [x22]
	cmp	x1, #0
	ccmp	w20, w8, #0, eq
	add	w20, w20, #1
	b.lt	LBB0_6
; %bb.8:
Lloh16:
	adrp	x8, _STK_IIC_STAT_TX_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STK_IIC_STAT_TX_OK@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x1, x8
	cset	w0, ne
	cbz	x1, LBB0_4
; %bb.9:
	b.eq	LBB0_4
; %bb.10:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_STK_IIC_TX_INDEX,4,2           ; @STK_IIC_TX_INDEX
	.comm	_STK_IIC_TX_VALUE,4,2           ; @STK_IIC_TX_VALUE
	.comm	_STK_IIC_OP,4,2                 ; @STK_IIC_OP
	.comm	_STK_IIC_OP_TX,8,3              ; @STK_IIC_OP_TX
	.comm	_STK_IIC_STAT,4,2               ; @STK_IIC_STAT
	.comm	_MAX_RETRIES,4,2                ; @MAX_RETRIES
	.comm	_STK_IIC_STAT_TX_OK,8,3         ; @STK_IIC_STAT_TX_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stk_sensor_outb failed, status=0x%02x\n"

	.no_dead_strip	_stk_sensor_outb
.subsections_via_symbols
