	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_sensor_inb
_stk_sensor_inb:                        ## @stk_sensor_inb
	.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	$24, %rsp
	.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_RX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_stk_camera_write_reg
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movq	_STK_IIC_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_STK_IIC_OP_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_stk_camera_write_reg
	testq	%rax, %rax
	jne	LBB0_12
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_STK_IIC_STAT@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r12
	movq	_MAX_RETRIES@GOTPCREL(%rip), %r14
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_stk_camera_read_reg
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%r15), %eax
	cmpl	(%r14), %r15d
	movl	%eax, %r15d
	jl	LBB0_3
LBB0_7:
	movq	_STK_IIC_STAT_RX_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_8
## %bb.10:
	movq	_STK_IIC_RX_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_stk_camera_read_reg
	testq	%rax, %rax
	movl	$1, %r14d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rax
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_4:
	movl	$1, %r14d
	jmp	LBB0_12
LBB0_8:
	testq	%rsi, %rsi
	movl	$1, %r14d
	je	LBB0_12
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STK_IIC_RX_INDEX,4,2           ## @STK_IIC_RX_INDEX
	.comm	_STK_IIC_OP,4,2                 ## @STK_IIC_OP
	.comm	_STK_IIC_OP_RX,8,3              ## @STK_IIC_OP_RX
	.comm	_STK_IIC_STAT,4,2               ## @STK_IIC_STAT
	.comm	_MAX_RETRIES,4,2                ## @MAX_RETRIES
	.comm	_STK_IIC_STAT_RX_OK,8,3         ## @STK_IIC_STAT_RX_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stk_sensor_inb failed, status=0x%02x\n"

	.comm	_STK_IIC_RX_VALUE,4,2           ## @STK_IIC_RX_VALUE
	.no_dead_strip	_stk_sensor_inb
.subsections_via_symbols

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

	.comm	_STK_IIC_RX_VALUE,4,2           ; @STK_IIC_RX_VALUE
	.no_dead_strip	_stk_sensor_inb
.subsections_via_symbols
