	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stu300_wait_while_busy
_stu300_wait_while_busy:                ## @stu300_wait_while_busy
	.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	%rdi, %r13
	movq	_BUSY_RELEASE_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.1:
	xorl	%r14d, %r14d
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	_I2C_SR1_BUSY_IND@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rdi
	incl	%r14d
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movq	(%r13), %rdi
	movl	8(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r13, %rdi
	callq	_stu300_init_hw
	movq	_BUSY_RELEASE_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %r14d
	jge	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%r12), %rdi
	movq	_STU300_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	%rdi, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rsi
	callq	_time_after
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_I2C_SR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_stu300_r8
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	$1, %edi
	callq	_msleep
	movq	(%r12), %rdi
	jmp	LBB0_3
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUSY_RELEASE_ATTEMPTS,4,2      ## @BUSY_RELEASE_ATTEMPTS
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_STU300_TIMEOUT,8,3             ## @STU300_TIMEOUT
	.comm	_I2C_SR1,8,3                    ## @I2C_SR1
	.comm	_I2C_SR1_BUSY_IND,4,2           ## @I2C_SR1_BUSY_IND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transaction timed out waiting for device to be free (not busy). Attempt: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"base address = 0x%08x, reinit hardware\n"

L_.str.2:                               ## @.str.2
	.asciz	"giving up after %d attempts to reset the bus.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_stu300_wait_while_busy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stu300_wait_while_busy
_stu300_wait_while_busy:                ; @stu300_wait_while_busy
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x24, _BUSY_RELEASE_ATTEMPTS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BUSY_RELEASE_ATTEMPTS@GOTPAGEOFF]
	ldr	w2, [x24]
	cmp	w2, #1
	b.lt	LBB0_8
; %bb.1:
	mov	w20, #0
Lloh2:
	adrp	x25, _jiffies@GOTPAGE
Lloh3:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
Lloh4:
	adrp	x26, _STU300_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _STU300_TIMEOUT@GOTPAGEOFF]
Lloh6:
	adrp	x27, _I2C_SR1@GOTPAGE
Lloh7:
	ldr	x27, [x27, _I2C_SR1@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
Lloh10:
	adrp	x28, _I2C_SR1_BUSY_IND@GOTPAGE
Lloh11:
	ldr	x28, [x28, _I2C_SR1_BUSY_IND@GOTPAGEOFF]
Lloh12:
	adrp	x22, l_.str.1@PAGE
Lloh13:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19]
	add	w20, w20, #1
	mov	x1, x21
	mov	x2, x20
	bl	_dev_err
	ldr	x0, [x19]
	ldr	w2, [x19, #8]
	mov	x1, x22
	bl	_dev_err
	mov	x0, x19
	bl	_stu300_init_hw
	ldr	w2, [x24]
	cmp	w20, w2
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	x0, [x25]
	ldr	x8, [x26]
	add	x23, x8, x0
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x1, x23
	bl	_time_after
	cbnz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_stu300_r8
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	w0, #1
	bl	_msleep
	ldr	x0, [x25]
	b	LBB0_4
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	x0, [x19]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BUSY_RELEASE_ATTEMPTS,4,2      ; @BUSY_RELEASE_ATTEMPTS
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_STU300_TIMEOUT,8,3             ; @STU300_TIMEOUT
	.comm	_I2C_SR1,8,3                    ; @I2C_SR1
	.comm	_I2C_SR1_BUSY_IND,4,2           ; @I2C_SR1_BUSY_IND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transaction timed out waiting for device to be free (not busy). Attempt: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"base address = 0x%08x, reinit hardware\n"

l_.str.2:                               ; @.str.2
	.asciz	"giving up after %d attempts to reset the bus.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_stu300_wait_while_busy
.subsections_via_symbols
