	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_receive_frame_ok
_ath5k_receive_frame_ok:                ## @ath5k_receive_frame_ok
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	incl	48(%rdi)
	movl	24(%rsi), %eax
	addl	%eax, 44(%rdi)
	movl	(%rsi), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movl	(%rbx), %edx
	movq	_AR5K_RXERR_CRC@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_3
## %bb.2:
	incl	40(%r14)
LBB0_3:
	movq	_AR5K_RXERR_FIFO@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_5
## %bb.4:
	incl	36(%r14)
LBB0_5:
	movq	_AR5K_RXERR_PHY@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_11
## %bb.6:
	incl	32(%r14)
	movl	4(%rbx), %eax
	leal	-1(%rax), %edx
	cmpl	$30, %edx
	ja	LBB0_8
## %bb.7:
	movq	24(%r14), %rdx
	incl	(%rdx,%rax,4)
	movl	4(%rbx), %eax
LBB0_8:
	movslq	%eax, %rdx
	movq	_AR5K_RX_PHY_ERROR_OFDM_RESTART@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	movq	_AR5K_RX_PHY_ERROR_CCK_RESTART@GOTPCREL(%rip), %rdi
	cmpq	%rdx, (%rdi)
	jne	LBB0_23
LBB0_10:
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movl	(%rsi), %edx
	notl	%edx
	andl	%eax, %edx
	movl	%edx, (%rbx)
LBB0_11:
	movq	_AR5K_RXERR_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_14
## %bb.12:
	incl	16(%r14)
	movq	8(%rbx), %rsi
	movq	_AR5K_RXKEYIX_INVALID@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_14
## %bb.13:
	testl	%edx, (%rcx)
	je	LBB0_22
LBB0_14:
	movq	_AR5K_RXERR_MIC@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_16
## %bb.15:
	incl	12(%r14)
	jmp	LBB0_22
LBB0_16:
	movq	_FIF_FCSFAIL@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	(%r14), %esi
	je	LBB0_18
## %bb.17:
	movl	(%rcx), %esi
LBB0_18:
	orl	%eax, %esi
	notl	%esi
	xorl	%eax, %eax
	testl	%esi, %edx
	jne	LBB0_23
LBB0_19:
	movl	16(%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	incl	8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_22:
	movl	$1, %eax
LBB0_23:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_RXERR_CRC,4,2             ## @AR5K_RXERR_CRC
	.comm	_AR5K_RXERR_FIFO,4,2            ## @AR5K_RXERR_FIFO
	.comm	_AR5K_RXERR_PHY,4,2             ## @AR5K_RXERR_PHY
	.comm	_AR5K_RX_PHY_ERROR_OFDM_RESTART,8,3 ## @AR5K_RX_PHY_ERROR_OFDM_RESTART
	.comm	_AR5K_RX_PHY_ERROR_CCK_RESTART,8,3 ## @AR5K_RX_PHY_ERROR_CCK_RESTART
	.comm	_AR5K_RXERR_DECRYPT,4,2         ## @AR5K_RXERR_DECRYPT
	.comm	_AR5K_RXKEYIX_INVALID,8,3       ## @AR5K_RXKEYIX_INVALID
	.comm	_AR5K_RXERR_MIC,4,2             ## @AR5K_RXERR_MIC
	.comm	_FIF_FCSFAIL,4,2                ## @FIF_FCSFAIL
	.no_dead_strip	_ath5k_receive_frame_ok
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_receive_frame_ok
_ath5k_receive_frame_ok:                ; @ath5k_receive_frame_ok
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	add	x8, x1, #24
	ldur	d0, [x0, #44]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x8]
	add.2s	v0, v0, v1
	stur	d0, [x0, #44]
	ldr	w0, [x1]
	bl	_unlikely
	cbz	x0, LBB0_17
; %bb.1:
	ldr	w9, [x20]
Lloh0:
	adrp	x8, _AR5K_RXERR_CRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5K_RXERR_CRC@GOTPAGEOFF]
	ldr	w10, [x8]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
	ldr	w10, [x19, #40]
	add	w10, w10, #1
	str	w10, [x19, #40]
LBB0_3:
Lloh2:
	adrp	x10, _AR5K_RXERR_FIFO@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AR5K_RXERR_FIFO@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w10, [x19, #36]
	add	w10, w10, #1
	str	w10, [x19, #36]
LBB0_5:
Lloh5:
	adrp	x10, _AR5K_RXERR_PHY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AR5K_RXERR_PHY@GOTPAGEOFF]
	ldr	w11, [x10]
	tst	w11, w9
	b.eq	LBB0_10
; %bb.6:
	ldr	w9, [x19, #32]
	add	w9, w9, #1
	str	w9, [x19, #32]
	ldr	w9, [x20, #4]
	sub	w12, w9, #1
	mov	x11, x9
	cmp	w12, #30
	b.hi	LBB0_8
; %bb.7:
	ldr	x11, [x19, #24]
	lsl	x9, x9, #2
	ldr	w12, [x11, x9]
	add	w12, w12, #1
	str	w12, [x11, x9]
	ldr	w11, [x20, #4]
LBB0_8:
	sxtw	x9, w11
Lloh7:
	adrp	x11, _AR5K_RX_PHY_ERROR_OFDM_RESTART@GOTPAGE
Lloh8:
	ldr	x11, [x11, _AR5K_RX_PHY_ERROR_OFDM_RESTART@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
Lloh10:
	adrp	x12, _AR5K_RX_PHY_ERROR_CCK_RESTART@GOTPAGE
Lloh11:
	ldr	x12, [x12, _AR5K_RX_PHY_ERROR_CCK_RESTART@GOTPAGEOFF]
Lloh12:
	ldr	x12, [x12]
	cmp	x11, x9
	ccmp	x12, x9, #4, ne
	b.ne	LBB0_15
; %bb.9:
	ldr	w9, [x8]
	ldr	w11, [x20]
	orr	w9, w11, w9
	str	w9, [x20]
	ldr	w10, [x10]
	bic	w9, w9, w10
	str	w9, [x20]
LBB0_10:
Lloh13:
	adrp	x10, _AR5K_RXERR_DECRYPT@GOTPAGE
Lloh14:
	ldr	x10, [x10, _AR5K_RXERR_DECRYPT@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.11:
	ldr	w11, [x19, #16]
	add	w11, w11, #1
	str	w11, [x19, #16]
	ldr	x11, [x20, #8]
Lloh16:
	adrp	x12, _AR5K_RXKEYIX_INVALID@GOTPAGE
Lloh17:
	ldr	x12, [x12, _AR5K_RXKEYIX_INVALID@GOTPAGEOFF]
Lloh18:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_13
; %bb.12:
	ldr	w11, [x8]
	tst	w11, w9
	b.eq	LBB0_19
LBB0_13:
Lloh19:
	adrp	x11, _AR5K_RXERR_MIC@GOTPAGE
Lloh20:
	ldr	x11, [x11, _AR5K_RXERR_MIC@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_16
; %bb.14:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_19
LBB0_15:
	mov	w0, #0
	b	LBB0_20
LBB0_16:
	mov	w0, #0
	ldr	w11, [x19]
Lloh22:
	adrp	x12, _FIF_FCSFAIL@GOTPAGE
Lloh23:
	ldr	x12, [x12, _FIF_FCSFAIL@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	ldr	w8, [x8]
	tst	w12, w11
	csel	w8, wzr, w8, eq
	orr	w8, w8, w10
	bics	wzr, w9, w8
	b.ne	LBB0_20
LBB0_17:
	ldr	w0, [x20, #16]
	bl	_unlikely
	cbz	x0, LBB0_19
; %bb.18:
	mov	w0, #0
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_20
LBB0_19:
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_RXERR_CRC,4,2             ; @AR5K_RXERR_CRC
	.comm	_AR5K_RXERR_FIFO,4,2            ; @AR5K_RXERR_FIFO
	.comm	_AR5K_RXERR_PHY,4,2             ; @AR5K_RXERR_PHY
	.comm	_AR5K_RX_PHY_ERROR_OFDM_RESTART,8,3 ; @AR5K_RX_PHY_ERROR_OFDM_RESTART
	.comm	_AR5K_RX_PHY_ERROR_CCK_RESTART,8,3 ; @AR5K_RX_PHY_ERROR_CCK_RESTART
	.comm	_AR5K_RXERR_DECRYPT,4,2         ; @AR5K_RXERR_DECRYPT
	.comm	_AR5K_RXKEYIX_INVALID,8,3       ; @AR5K_RXKEYIX_INVALID
	.comm	_AR5K_RXERR_MIC,4,2             ; @AR5K_RXERR_MIC
	.comm	_FIF_FCSFAIL,4,2                ; @FIF_FCSFAIL
	.no_dead_strip	_ath5k_receive_frame_ok
.subsections_via_symbols
