	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_ack
_wait_ack:                              ## @wait_ack
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_wait_xfer_done
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.2:
	xorl	%r14d, %r14d
	movq	_SGI_I2C_NACK@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %edi
	callq	*8(%r12)
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_3
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SGI_I2C_NACK,4,2               ## @SGI_I2C_NACK
	.no_dead_strip	_wait_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_ack
_wait_ack:                              ; @wait_ack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_wait_xfer_done
	cbz	x0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.4:
	mov	w20, #0
Lloh3:
	adrp	x21, _SGI_I2C_NACK@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SGI_I2C_NACK@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x19, #16]
	blr	x8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.lt	LBB0_5
	b	LBB0_1
LBB0_7:
	mov	w0, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SGI_I2C_NACK,4,2               ; @SGI_I2C_NACK
	.no_dead_strip	_wait_ack
.subsections_via_symbols
