	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_mac_rx                      ## -- Begin function zd_mac_rx
	.p2align	4, 0x90
_zd_mac_rx:                             ## @zd_mac_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_zd_hw_mac
	movq	%rax, %r15
	movl	%r13d, %ebx
	movq	_ZD_PLCP_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_FCS_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rcx, %rax
	addq	$18, %rax
	cmpq	%rbx, %rax
	jbe	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_33
LBB0_3:
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-64(%r12,%rbx,8), %ecx
	movq	_ZD_RX_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_7
## %bb.4:
	cmpq	$0, 32(%r15)
	je	LBB0_1
## %bb.5:
	movq	_ZD_RX_CRC32_ERROR@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.6:
	movq	_RX_FLAG_FAILED_FCS_CRC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
LBB0_7:
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%rbx,8), %rbx
	addq	$-64, %rbx
	movq	_zd_channels@GOTPCREL(%rip), %rax
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	%r15, %rdi
	addq	$24, %rdi
	callq	__zd_chip_get_channel
	cltq
	movl	-4(%r14,%rax,4), %eax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, -52(%rbp)
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_zd_check_signal
	movl	%eax, -60(%rbp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_zd_rx_rate
	movl	8(%r15), %edi
	testl	%edi, %edi
	jle	LBB0_24
## %bb.8:
	movq	16(%r15), %rcx
	leaq	-1(%rdi), %rsi
	movl	%edi, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jae	LBB0_10
## %bb.9:
	xorl	%esi, %esi
LBB0_20:
	testq	%rdx, %rdx
	jne	LBB0_21
LBB0_24:
	movq	_ZD_PLCP_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	leaq	(%r12,%rbx,8), %r12
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -72(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_25
LBB0_27:
	subl	%ebx, %r13d
	addl	$-8, %r13d
	movq	%r12, %rdi
	callq	_get_unaligned
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ieee80211_is_data_qos
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_ieee80211_has_a4
	movl	%eax, %r14d
	xorl	%eax, %eax
	cmpl	%r14d, %r15d
	setne	%al
	leal	(%r13,%rax,2), %edi
	callq	_dev_alloc_skb
	testq	%rax, %rax
	je	LBB0_28
## %bb.29:
	movq	%rax, %rbx
	cmpl	%r14d, %r15d
	je	LBB0_31
## %bb.30:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_skb_reserve
LBB0_31:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_skb_put_data
	movq	%rbx, %rdi
	callq	_IEEE80211_SKB_RXCB
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	movl	$20, %edx
	callq	_memcpy
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_ieee80211_rx_irqsafe
LBB0_32:
	xorl	%eax, %eax
LBB0_33:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%rsi
	decq	%rdx
	je	LBB0_24
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rcx,%rsi,8), %rax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%esi, -64(%rbp)
	jmp	LBB0_23
LBB0_25:
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_filter_ack
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	cmpl	$0, (%r15)
	jne	LBB0_27
	jmp	LBB0_32
LBB0_28:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	andl	$-4, %edi
	xorl	%esi, %esi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	$4, %rsi
	cmpq	%rsi, %rdi
	je	LBB0_20
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rcx,%rsi,8), %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	8(%rcx,%rsi,8), %rax
	je	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	16(%rcx,%rsi,8), %rax
	je	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	24(%rcx,%rsi,8), %rax
	jne	LBB0_19
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%esi, -64(%rbp)
	cmpq	8(%rcx,%rsi,8), %rax
	jne	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%rsi), %ebx
	movl	%ebx, -64(%rbp)
	cmpq	16(%rcx,%rsi,8), %rax
	jne	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	2(%rsi), %ebx
	movl	%ebx, -64(%rbp)
	cmpq	24(%rcx,%rsi,8), %rax
	jne	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	3(%rsi), %ebx
	movl	%ebx, -64(%rbp)
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ZD_PLCP_HEADER_SIZE,4,2        ## @ZD_PLCP_HEADER_SIZE
	.comm	_FCS_LEN,4,2                    ## @FCS_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ZD_RX_ERROR,4,2                ## @ZD_RX_ERROR
	.comm	_ZD_RX_CRC32_ERROR,4,2          ## @ZD_RX_CRC32_ERROR
	.comm	_RX_FLAG_FAILED_FCS_CRC,4,2     ## @RX_FLAG_FAILED_FCS_CRC
	.comm	_zd_channels,8,3                ## @zd_channels
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_mac_rx                      ; -- Begin function zd_mac_rx
	.p2align	2
_zd_mac_rx:                             ; @zd_mac_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_zd_hw_mac
	mov	w23, w20
Lloh0:
	adrp	x24, _ZD_PLCP_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ZD_PLCP_HEADER_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x24]
Lloh2:
	adrp	x9, _FCS_LEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FCS_LEN@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	add	x8, x8, x9
	add	x8, x8, #18
	cmp	x8, x23
	b.ls	LBB0_3
LBB0_1:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_31
LBB0_3:
	mov	x21, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	add	x23, x22, x23, lsl #3
	ldr	w8, [x23, #-64]!
Lloh7:
	adrp	x9, _ZD_RX_ERROR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ZD_RX_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ands	w25, w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	x9, [x21, #32]
	cbz	x9, LBB0_1
; %bb.5:
Lloh10:
	adrp	x9, _ZD_RX_CRC32_ERROR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ZD_RX_CRC32_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.6:
Lloh13:
	adrp	x8, _RX_FLAG_FAILED_FCS_CRC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RX_FLAG_FAILED_FCS_CRC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	orr	w8, w9, w8
	str	w8, [sp, #24]
LBB0_7:
Lloh16:
	adrp	x8, _zd_channels@GOTPAGE
Lloh17:
	ldr	x8, [x8, _zd_channels@GOTPAGEOFF]
Lloh18:
	ldr	x26, [x8]
	add	x0, x21, #24
	bl	__zd_chip_get_channel
	add	x8, x26, w0, sxtw #2
	ldur	w8, [x8, #-4]
Lloh19:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	ldr	w1, [x23, #4]
	mov	x0, x19
	bl	_zd_check_signal
	str	w0, [sp, #12]
	mov	x0, x22
	mov	x1, x23
	bl	_zd_rx_rate
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.8:
	ldr	x9, [x21, #16]
	cmp	w8, #8
	b.hs	LBB0_10
; %bb.9:
	mov	x10, #0
	b	LBB0_33
LBB0_10:
	add	x10, sp, #8
	add	x11, x9, x8, lsl #3
	cmp	x10, x11
	b.hs	LBB0_13
; %bb.11:
	orr	x10, x10, #0x4
	cmp	x9, x10
	b.hs	LBB0_13
; %bb.12:
	mov	x10, #0
	b	LBB0_33
LBB0_13:
	mov	x11, #0
	and	x10, x8, #0xfffffff8
	dup.2d	v0, x0
	add	x12, x9, #32
	mov	w13, #2
	mov	w14, #3
	mov	w15, #4
	mov	w16, #5
	mov	w17, #6
	mov	w1, #7
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	and	w7, w7, #0x1
	tst	w23, #0x1
	csel	w7, w13, w7, ne
	tst	w5, #0x1
	csel	w5, w14, w7, ne
	tst	w6, #0x1
	csel	w5, w15, w5, ne
	tst	w3, #0x1
	csel	w3, w16, w5, ne
	tst	w4, #0x1
	csel	w3, w17, w3, ne
	tst	w2, #0x1
	csel	w2, w1, w3, ne
	orr	w2, w2, w11
	str	w2, [sp, #8]
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x11, x11, #8
	add	x12, x12, #64
	cmp	x10, x11
	b.eq	LBB0_24
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x12, #-32]
	ldp	q3, q4, [x12]
	cmeq.2d	v1, v0, v1
	xtn.2s	v1, v1
	cmeq.2d	v2, v0, v2
	xtn.2s	v2, v2
	cmeq.2d	v3, v0, v3
	xtn.2s	v3, v3
	cmeq.2d	v4, v0, v4
	xtn.2s	v4, v4
	mov.s	w7, v1[1]
	fmov	w26, s1
	mov.s	w5, v2[1]
	fmov	w23, s2
	mov.s	w3, v3[1]
	fmov	w6, s3
	mov.s	w2, v4[1]
	fmov	w4, s4
	tbnz	w26, #0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w7, #0, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w23, #0, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w5, #0, LBB0_14
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w6, #0, LBB0_14
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w3, #0, LBB0_14
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w4, #0, LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_16 Depth=1
	tbz	w2, #0, LBB0_15
	b	LBB0_14
LBB0_24:
	cmp	x10, x8
	b.ne	LBB0_33
LBB0_25:
	ldrsw	x23, [x24]
	add	x22, x22, x23, lsl #3
	cbz	w25, LBB0_35
LBB0_26:
	sub	w8, w20, w23
	sub	w20, w8, #8
	mov	x0, x22
	bl	_get_unaligned
	mov	x21, x0
	bl	_ieee80211_is_data_qos
	mov	x23, x0
	mov	x0, x21
	bl	_ieee80211_has_a4
	mov	x24, x0
	cmp	w23, w0
	cset	w8, ne
	add	w0, w20, w8, lsl #1
	bl	_dev_alloc_skb
	cbz	x0, LBB0_37
; %bb.27:
	mov	x21, x0
	cmp	w23, w24
	b.eq	LBB0_29
; %bb.28:
	mov	x0, x21
	mov	w1, #2
	bl	_skb_reserve
LBB0_29:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_skb_put_data
	mov	x0, x21
	bl	_IEEE80211_SKB_RXCB
	add	x1, sp, #8
	mov	w2, #20
	bl	_memcpy
	mov	x0, x19
	mov	x1, x21
	bl	_ieee80211_rx_irqsafe
LBB0_30:
	mov	w0, #0
LBB0_31:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x10, x10, #1
	cmp	x8, x10
	b.eq	LBB0_25
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x10, lsl #3]
	cmp	x0, x11
	b.ne	LBB0_32
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	str	w10, [sp, #8]
	b	LBB0_32
LBB0_35:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_filter_ack
	cbz	x0, LBB0_26
; %bb.36:
	ldr	w8, [x21]
	cbnz	w8, LBB0_26
	b	LBB0_30
LBB0_37:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ZD_PLCP_HEADER_SIZE,4,2        ; @ZD_PLCP_HEADER_SIZE
	.comm	_FCS_LEN,4,2                    ; @FCS_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ZD_RX_ERROR,4,2                ; @ZD_RX_ERROR
	.comm	_ZD_RX_CRC32_ERROR,4,2          ; @ZD_RX_CRC32_ERROR
	.comm	_RX_FLAG_FAILED_FCS_CRC,4,2     ; @RX_FLAG_FAILED_FCS_CRC
	.comm	_zd_channels,8,3                ; @zd_channels
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
