	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_busbusy
_wait_for_busbusy:                      ## @wait_for_busbusy
	.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, %r12d
	movq	%rdi, %r14
	movl	$-1000, %ebx                    ## imm = 0xFC18
	movq	_I2CSR_MBB@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r12d, %r12d
	setne	%r13b
	movq	_I2C_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_read_reg
	andl	(%r15), %eax
	setne	%cl
	testb	%cl, %r13b
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	orl	%r12d, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_DELAY
	incl	%ebx
	jne	LBB0_1
## %bb.4:
	movq	_IIC_ETIMEOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_IIC_NOERR@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_STATUS_REG,4,2             ## @I2C_STATUS_REG
	.comm	_I2CSR_MBB,4,2                  ## @I2CSR_MBB
	.comm	_IIC_NOERR,4,2                  ## @IIC_NOERR
	.comm	_IIC_ETIMEOUT,4,2               ## @IIC_ETIMEOUT
	.no_dead_strip	_wait_for_busbusy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_busbusy
_wait_for_busbusy:                      ; @wait_for_busbusy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	w22, #-1000
Lloh0:
	adrp	x23, _I2C_STATUS_REG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2C_STATUS_REG@GOTPAGEOFF]
Lloh2:
	adrp	x24, _I2CSR_MBB@GOTPAGE
Lloh3:
	ldr	x24, [x24, _I2CSR_MBB@GOTPAGEOFF]
Lloh4:
	adrp	x21, _IIC_NOERR@GOTPAGE
Lloh5:
	ldr	x21, [x21, _IIC_NOERR@GOTPAGEOFF]
Lloh6:
	adrp	x25, _IIC_ETIMEOUT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _IIC_ETIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_i2c_read_reg
	ldr	w8, [x24]
	ands	w8, w8, w0
	ccmp	w19, #0, #4, ne
	orr	w8, w8, w19
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_DELAY
	adds	w22, w22, #1
	b.lo	LBB0_1
; %bb.3:
	mov	x21, x25
LBB0_4:
	ldr	w0, [x21]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_STATUS_REG,4,2             ; @I2C_STATUS_REG
	.comm	_I2CSR_MBB,4,2                  ; @I2CSR_MBB
	.comm	_IIC_NOERR,4,2                  ; @IIC_NOERR
	.comm	_IIC_ETIMEOUT,4,2               ; @IIC_ETIMEOUT
	.no_dead_strip	_wait_for_busbusy
.subsections_via_symbols
