	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lima_gp_soft_reset_async_wait
_lima_gp_soft_reset_async_wait:         ## @lima_gp_soft_reset_async_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
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	_LIMA_GP_INT_RAWSTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$100, %r8d
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%r15d, %r14d
	jmp	LBB0_5
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_4:
	movq	_LIMA_GP_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LIMA_GP_IRQ_MASK_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gp_write
	movq	_LIMA_GP_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LIMA_GP_IRQ_MASK_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gp_write
	movl	$0, (%rbx)
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIMA_GP_INT_RAWSTAT,8,3        ## @LIMA_GP_INT_RAWSTAT
	.comm	_LIMA_GP_IRQ_RESET_COMPLETED,4,2 ## @LIMA_GP_IRQ_RESET_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gp soft reset time out\n"

	.comm	_LIMA_GP_INT_CLEAR,4,2          ## @LIMA_GP_INT_CLEAR
	.comm	_LIMA_GP_IRQ_MASK_ALL,4,2       ## @LIMA_GP_IRQ_MASK_ALL
	.comm	_LIMA_GP_INT_MASK,4,2           ## @LIMA_GP_INT_MASK
	.comm	_LIMA_GP_IRQ_MASK_USED,4,2      ## @LIMA_GP_IRQ_MASK_USED
	.no_dead_strip	_lima_gp_soft_reset_async_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lima_gp_soft_reset_async_wait
_lima_gp_soft_reset_async_wait:         ; @lima_gp_soft_reset_async_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
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldp	x8, x21, [x0, #8]
Lloh0:
	adrp	x9, _LIMA_GP_INT_RAWSTAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LIMA_GP_INT_RAWSTAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w2, #0
	mov	w3, #0
	mov	w4, #100
	bl	_readl_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	mov	w20, #0
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _LIMA_GP_INT_CLEAR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LIMA_GP_INT_CLEAR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _LIMA_GP_IRQ_MASK_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LIMA_GP_IRQ_MASK_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_gp_write
Lloh11:
	adrp	x8, _LIMA_GP_INT_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LIMA_GP_INT_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _LIMA_GP_IRQ_MASK_USED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LIMA_GP_IRQ_MASK_USED@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_gp_write
	str	wzr, [x19]
LBB0_5:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LIMA_GP_INT_RAWSTAT,8,3        ; @LIMA_GP_INT_RAWSTAT
	.comm	_LIMA_GP_IRQ_RESET_COMPLETED,4,2 ; @LIMA_GP_IRQ_RESET_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gp soft reset time out\n"

	.comm	_LIMA_GP_INT_CLEAR,4,2          ; @LIMA_GP_INT_CLEAR
	.comm	_LIMA_GP_IRQ_MASK_ALL,4,2       ; @LIMA_GP_IRQ_MASK_ALL
	.comm	_LIMA_GP_INT_MASK,4,2           ; @LIMA_GP_INT_MASK
	.comm	_LIMA_GP_IRQ_MASK_USED,4,2      ; @LIMA_GP_IRQ_MASK_USED
	.no_dead_strip	_lima_gp_soft_reset_async_wait
.subsections_via_symbols
