	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_bmi_get_rx_lkahd
_ath6kl_bmi_get_rx_lkahd:               ## @ath6kl_bmi_get_rx_lkahd
	.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
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	_BMI_COMMUNICATION_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	addq	%rbx, %r12
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	leaq	-44(%rbp), %r15
	movq	_ENDPOINT1@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RX_LOOKAHEAD_VALID_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIF_RD_SYNC_BYTE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_ath6kl_sdio_read_write_sync
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%r13), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	andl	%eax, -44(%rbp)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_time_before
	movl	-44(%rbp), %ecx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, %ecx
	je	LBB0_2
LBB0_6:
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	jne	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	_ath6kl_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_BMI_COMMUNICATION_TIMEOUT,4,2  ## @BMI_COMMUNICATION_TIMEOUT
	.comm	_RX_LOOKAHEAD_VALID_ADDRESS,4,2 ## @RX_LOOKAHEAD_VALID_ADDRESS
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ## @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to read RX_LOOKAHEAD_VALID\n"

	.comm	_ENDPOINT1,4,2                  ## @ENDPOINT1
L_.str.1:                               ## @.str.1
	.asciz	"bmi_recv_buf FIFO empty\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ath6kl_bmi_get_rx_lkahd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_bmi_get_rx_lkahd
_ath6kl_bmi_get_rx_lkahd:               ; @ath6kl_bmi_get_rx_lkahd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
Lloh2:
	adrp	x8, _BMI_COMMUNICATION_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BMI_COMMUNICATION_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_6
; %bb.1:
Lloh5:
	adrp	x23, _RX_LOOKAHEAD_VALID_ADDRESS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _RX_LOOKAHEAD_VALID_ADDRESS@GOTPAGEOFF]
Lloh7:
	adrp	x24, _HIF_RD_SYNC_BYTE_INC@GOTPAGE
Lloh8:
	ldr	x24, [x24, _HIF_RD_SYNC_BYTE_INC@GOTPAGEOFF]
	mov	w25, #1
Lloh9:
	adrp	x26, _ENDPOINT1@GOTPAGE
Lloh10:
	ldr	x26, [x26, _ENDPOINT1@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	ldr	w4, [x24]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #4
	bl	_ath6kl_sdio_read_write_sync
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	lsl	w8, w25, w8
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_before
	ldr	w8, [sp, #12]
	cmp	x0, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_2
; %bb.4:
	cbz	w8, LBB0_6
; %bb.5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ath6kl_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	mov	x21, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_BMI_COMMUNICATION_TIMEOUT,4,2  ; @BMI_COMMUNICATION_TIMEOUT
	.comm	_RX_LOOKAHEAD_VALID_ADDRESS,4,2 ; @RX_LOOKAHEAD_VALID_ADDRESS
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ; @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to read RX_LOOKAHEAD_VALID\n"

	.comm	_ENDPOINT1,4,2                  ; @ENDPOINT1
l_.str.1:                               ; @.str.1
	.asciz	"bmi_recv_buf FIFO empty\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ath6kl_bmi_get_rx_lkahd
.subsections_via_symbols
