	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_hif_poll_mboxmsg_rx     ## -- Begin function ath6kl_hif_poll_mboxmsg_rx
	.p2align	4, 0x90
_ath6kl_hif_poll_mboxmsg_rx:            ## @ath6kl_hif_poll_mboxmsg_rx
	.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	%edx, %eax
	movq	%rdi, %r15
	movq	_HTC_MAILBOX@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %r14d
	shll	%cl, %r14d
	movq	_ATH6KL_TIME_QUANTUM@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ATH6KL_TIME_QUANTUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mdelay
	movq	_ATH6KL_DBG_HIF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_ath6kl_dbg
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	jle	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r15), %edi
	movq	_HOST_INT_STATUS_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIF_RD_SYNC_BYTE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdx
	movl	$24, %ecx
	callq	_hif_read_write_sync
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, (%r15)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, 4(%r15)
	je	LBB0_7
## %bb.6:
	movq	16(%r15), %rax
	movq	_HTC_MAILBOX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_le32_to_cpu
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_8:
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	jne	LBB0_11
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_ath6kl_err
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_ATH6KL_TARGET_DEBUG_INTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_ath6kl_hif_proc_dbg_intr
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_err
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HTC_MAILBOX,4,2                ## @HTC_MAILBOX
	.comm	_ATH6KL_TIME_QUANTUM,4,2        ## @ATH6KL_TIME_QUANTUM
	.comm	_HOST_INT_STATUS_ADDRESS,4,2    ## @HOST_INT_STATUS_ADDRESS
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ## @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read reg table\n"

	.comm	_ATH6KL_DBG_HIF,4,2             ## @ATH6KL_DBG_HIF
L_.str.1:                               ## @.str.1
	.asciz	"hif retry mbox poll try %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"timeout waiting for recv message\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_ATH6KL_TARGET_DEBUG_INTR_MASK,4,2 ## @ATH6KL_TARGET_DEBUG_INTR_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_hif_poll_mboxmsg_rx     ; -- Begin function ath6kl_hif_poll_mboxmsg_rx
	.p2align	2
_ath6kl_hif_poll_mboxmsg_rx:            ; @ath6kl_hif_poll_mboxmsg_rx
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x24, _ATH6KL_TIME_QUANTUM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ATH6KL_TIME_QUANTUM@GOTPAGEOFF]
	ldr	w8, [x24]
	sdiv	w21, w2, w8
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x1
Lloh2:
	adrp	x8, _HTC_MAILBOX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HTC_MAILBOX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w26, w9, w8
Lloh5:
	adrp	x27, _HOST_INT_STATUS_ADDRESS@GOTPAGE
Lloh6:
	ldr	x27, [x27, _HOST_INT_STATUS_ADDRESS@GOTPAGEOFF]
Lloh7:
	adrp	x28, _HIF_RD_SYNC_BYTE_INC@GOTPAGE
Lloh8:
	ldr	x28, [x28, _HIF_RD_SYNC_BYTE_INC@GOTPAGEOFF]
Lloh9:
	adrp	x25, _ATH6KL_DBG_HIF@GOTPAGE
Lloh10:
	ldr	x25, [x25, _ATH6KL_DBG_HIF@GOTPAGEOFF]
Lloh11:
	adrp	x22, l_.str.1@PAGE
Lloh12:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x24]
	bl	_mdelay
	ldr	w0, [x25]
	mov	x1, x22
	mov	x2, x21
	bl	_ath6kl_dbg
	subs	w21, w21, #1
	b.le	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #24]
	ldr	w1, [x27]
	ldr	w4, [x28]
	mov	x2, x19
	mov	w3, #24
	bl	_hif_read_write_sync
	cbnz	w0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	tst	w8, w26
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #4]
	tst	w8, w26
	b.eq	LBB0_2
; %bb.6:
	ldr	x8, [x19, #16]
Lloh13:
	adrp	x9, _HTC_MAILBOX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HTC_MAILBOX@GOTPAGEOFF]
Lloh15:
	ldrsw	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_le32_to_cpu
	mov	w23, #0
	str	w0, [x20]
	b	LBB0_12
LBB0_7:
	cbz	w21, LBB0_9
; %bb.8:
	mov	w23, #0
	b	LBB0_12
LBB0_9:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ath6kl_err
Lloh18:
	adrp	x8, _ETIME@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	w8, [x19, #8]
Lloh21:
	adrp	x9, _ATH6KL_TARGET_DEBUG_INTR_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATH6KL_TARGET_DEBUG_INTR_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_ath6kl_hif_proc_dbg_intr
	b	LBB0_12
LBB0_11:
	mov	x23, x0
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HTC_MAILBOX,4,2                ; @HTC_MAILBOX
	.comm	_ATH6KL_TIME_QUANTUM,4,2        ; @ATH6KL_TIME_QUANTUM
	.comm	_HOST_INT_STATUS_ADDRESS,4,2    ; @HOST_INT_STATUS_ADDRESS
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ; @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read reg table\n"

	.comm	_ATH6KL_DBG_HIF,4,2             ; @ATH6KL_DBG_HIF
l_.str.1:                               ; @.str.1
	.asciz	"hif retry mbox poll try %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"timeout waiting for recv message\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_ATH6KL_TARGET_DEBUG_INTR_MASK,4,2 ; @ATH6KL_TARGET_DEBUG_INTR_MASK
.subsections_via_symbols
