	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function denali_wait_for_irq
_denali_wait_for_irq:                   ## @denali_wait_for_irq
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	16(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %ebx
	testl	%r14d, %ebx
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_5
LBB0_2:
	movl	%r14d, 4(%r15)
	leaq	12(%r15), %rbx
	movq	%rbx, %rdi
	callq	_reinit_completion
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r15), %ebx
	jmp	LBB0_5
LBB0_3:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout while waiting for irq 0x%x\n"

	.no_dead_strip	_denali_wait_for_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function denali_wait_for_irq
_denali_wait_for_irq:                   ; @denali_wait_for_irq
	.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, x1
	mov	x20, x0
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w22, [x20]
	tst	w22, w19
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_2:
	str	w19, [x20, #4]
	add	x22, x20, #12
	mov	x0, x22
	bl	_reinit_completion
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w22, [x20]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	mov	w22, #0
LBB0_5:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout while waiting for irq 0x%x\n"

	.no_dead_strip	_denali_wait_for_irq
.subsections_via_symbols
