	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qup_i2c_wait_for_complete
_qup_i2c_wait_for_complete:             ## @qup_i2c_wait_for_complete
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	addq	$28, %rdi
	movl	24(%rbx), %esi
	callq	_wait_for_completion_timeout
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_QUP_SW_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 8(%rbx)
	je	LBB0_8
LBB0_4:
	movq	_QUP_I2C_NACK_FLAG@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QUP_SW_RESET,8,3               ## @QUP_SW_RESET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_QUP_I2C_NACK_FLAG,4,2          ## @QUP_I2C_NACK_FLAG
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_qup_i2c_wait_for_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qup_i2c_wait_for_complete
_qup_i2c_wait_for_complete:             ; @qup_i2c_wait_for_complete
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #28
	ldr	w1, [x19, #24]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _QUP_SW_RESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QUP_SW_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
Lloh3:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
LBB0_3:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_5
LBB0_4:
Lloh6:
	adrp	x9, _QUP_I2C_NACK_FLAG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QUP_I2C_NACK_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _ENXIO@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ENXIO@GOTPAGEOFF]
Lloh11:
	adrp	x11, _EIO@GOTPAGE
Lloh12:
	ldr	x11, [x11, _EIO@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_QUP_SW_RESET,8,3               ; @QUP_SW_RESET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_QUP_I2C_NACK_FLAG,4,2          ; @QUP_I2C_NACK_FLAG
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_qup_i2c_wait_for_complete
.subsections_via_symbols
