	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_mci_wait_for_interrupt
_ar9003_mci_wait_for_interrupt:         ## @ar9003_mci_wait_for_interrupt
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_ath9k_hw_common
	movq	%rax, %r14
	testl	%ebx, %ebx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_REG_READ
	testl	%r15d, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	leal	-10(%rbx), %eax
	cmpl	$10, %ebx
	jl	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	jne	LBB0_1
	jmp	LBB0_11
LBB0_4:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_REG_WRITE
	movq	_AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_10
## %bb.5:
	movq	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	callq	_ar9003_mci_reset_req_wakeup
LBB0_7:
	movq	_AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING@GOTPCREL(%rip), %rax
	movq	_AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_9
## %bb.8:
	movq	_AR_MCI_INTERRUPT_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_REG_WRITE
LBB0_9:
	movq	_AR_MCI_INTERRUPT_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_MCI_INTERRUPT_RX_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_REG_WRITE
LBB0_10:
	testl	%ebx, %ebx
	jg	LBB0_12
LBB0_11:
	movq	_MCI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_ath_dbg
	movl	(%rbx), %r15d
	movq	_AR_MCI_INTERRUPT_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	_AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_REG_READ
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_ath_dbg
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_MCI_INTERRUPT_RX_MSG_RAW,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_RAW
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE
	.comm	_AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING
	.comm	_AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING
	.comm	_AR_MCI_INTERRUPT_RAW,4,2       ## @AR_MCI_INTERRUPT_RAW
	.comm	_AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE,4,2 ## @AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE
	.comm	_AR_MCI_INTERRUPT_RX_MSG,4,2    ## @AR_MCI_INTERRUPT_RX_MSG
	.comm	_MCI,4,2                        ## @MCI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MCI Wait for Reg 0x%08x = 0x%08x timeout\n"

L_.str.1:                               ## @.str.1
	.asciz	"MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x\n"

	.no_dead_strip	_ar9003_mci_wait_for_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_mci_wait_for_interrupt
_ar9003_mci_wait_for_interrupt:         ; @ar9003_mci_wait_for_interrupt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_ath9k_hw_common
	mov	x19, x0
Lloh0:
	adrp	x24, _AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPAGEOFF]
	cbz	w23, LBB0_11
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_REG_READ
	tst	w0, w21
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	subs	w23, w23, #10
	b.lt	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	b.ne	LBB0_1
	b	LBB0_11
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_REG_WRITE
	ldr	w8, [x24]
	cmp	w8, w22
	b.ne	LBB0_10
; %bb.5:
Lloh2:
	adrp	x8, _AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_ar9003_mci_reset_req_wakeup
LBB0_7:
Lloh5:
	adrp	x8, _AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING@GOTPAGEOFF]
Lloh7:
	adrp	x9, _AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x25, _AR_MCI_INTERRUPT_RAW@GOTPAGE
Lloh12:
	ldr	x25, [x25, _AR_MCI_INTERRUPT_RAW@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
	ldr	w1, [x25]
Lloh13:
	adrp	x8, _AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_WRITE
LBB0_9:
	ldr	w1, [x25]
Lloh16:
	adrp	x8, _AR_MCI_INTERRUPT_RX_MSG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_RX_MSG@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_WRITE
LBB0_10:
	cmp	w23, #0
	b.gt	LBB0_12
LBB0_11:
Lloh19:
	adrp	x23, _MCI@GOTPAGE
Lloh20:
	ldr	x23, [x23, _MCI@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	mov	x4, x21
	bl	_ath_dbg
	ldr	w21, [x23]
Lloh23:
	adrp	x8, _AR_MCI_INTERRUPT_RAW@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_RAW@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_REG_READ
	mov	x22, x0
	ldr	w1, [x24]
	mov	x0, x20
	bl	_REG_READ
	mov	x4, x0
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_ath_dbg
	mov	w23, #0
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_MCI_INTERRUPT_RX_MSG_RAW,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_RAW
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE
	.comm	_AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING
	.comm	_AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING
	.comm	_AR_MCI_INTERRUPT_RAW,4,2       ; @AR_MCI_INTERRUPT_RAW
	.comm	_AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE,4,2 ; @AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE
	.comm	_AR_MCI_INTERRUPT_RX_MSG,4,2    ; @AR_MCI_INTERRUPT_RX_MSG
	.comm	_MCI,4,2                        ; @MCI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MCI Wait for Reg 0x%08x = 0x%08x timeout\n"

l_.str.1:                               ; @.str.1
	.asciz	"MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x\n"

	.no_dead_strip	_ar9003_mci_wait_for_interrupt
.subsections_via_symbols
