	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk1160_i2c_busy_wait
_stk1160_i2c_busy_wait:                 ## @stk1160_i2c_busy_wait
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_STK1160_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r12, %rbx
	movq	%rbx, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	-44(%rbp), %r12
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_STK1160_SICTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_stk1160_read_reg
	testl	%r14d, -44(%rbp)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	leal	(%rax,%rax), %ecx
	leal	(%rcx,%rcx,4), %edi
	shll	$2, %eax
	leal	(%rax,%rax,4), %esi
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	jne	LBB0_2
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_STK1160_I2C_TIMEOUT,4,2        ## @STK1160_I2C_TIMEOUT
	.comm	_STK1160_SICTL,8,3              ## @STK1160_SICTL
	.comm	_USEC_PER_MSEC,4,2              ## @USEC_PER_MSEC
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_stk1160_i2c_busy_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk1160_i2c_busy_wait
_stk1160_i2c_busy_wait:                 ; @stk1160_i2c_busy_wait
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _STK1160_I2C_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STK1160_I2C_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x21, x0, x21
	mov	x0, x21
	bl	_time_is_after_jiffies
	cbz	x0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x22, _STK1160_SICTL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _STK1160_SICTL@GOTPAGEOFF]
Lloh8:
	adrp	x23, _USEC_PER_MSEC@GOTPAGE
Lloh9:
	ldr	x23, [x23, _USEC_PER_MSEC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x1, x8, #1
	add	x2, sp, #12
	mov	x0, x20
	bl	_stk1160_read_reg
	ldr	w8, [sp, #12]
	tst	w8, w19
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #1
	lsl	w1, w8, #2
	bl	_usleep_range
	mov	x0, x21
	bl	_time_is_after_jiffies
	cbnz	x0, LBB0_2
LBB0_4:
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_STK1160_I2C_TIMEOUT,4,2        ; @STK1160_I2C_TIMEOUT
	.comm	_STK1160_SICTL,8,3              ; @STK1160_SICTL
	.comm	_USEC_PER_MSEC,4,2              ; @USEC_PER_MSEC
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_stk1160_i2c_busy_wait
.subsections_via_symbols
