	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlr_i2c_wait
_xlr_i2c_wait:                          ## @xlr_i2c_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %r15d
	callq	_xlr_i2c_idle
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_msecs_to_jiffies
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	movq	_XLR_I2C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xlr_i2c_rdreg
	movl	%eax, %ecx
	movq	_XLR_I2C_ACK_ERR@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_XLR_I2C_STATUS,4,2             ## @XLR_I2C_STATUS
	.comm	_XLR_I2C_ACK_ERR,4,2            ## @XLR_I2C_ACK_ERR
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_xlr_i2c_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlr_i2c_wait
_xlr_i2c_wait:                          ; @xlr_i2c_wait
	.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	x20, x1
	mov	x19, x0
	ldr	w21, [x0, #4]
	bl	_xlr_i2c_idle
	mov	x22, x0
	mov	x0, x20
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_wait_event_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _XLR_I2C_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLR_I2C_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_xlr_i2c_rdreg
Lloh3:
	adrp	x8, _XLR_I2C_ACK_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XLR_I2C_ACK_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EIO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w8, w0
	csneg	w0, wzr, w9, eq
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_XLR_I2C_STATUS,4,2             ; @XLR_I2C_STATUS
	.comm	_XLR_I2C_ACK_ERR,4,2            ; @XLR_I2C_ACK_ERR
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_xlr_i2c_wait
.subsections_via_symbols
