	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7601u_rx_skb_from_seg
_mt7601u_rx_skb_from_seg:               ## @mt7601u_rx_skb_from_seg
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	testq	%r9, %r9
	movl	$128, %edi
	cmovel	%ecx, %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_alloc_skb
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	movq	%r13, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_mt76_mac_process_rx
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	cmpl	%r15d, %r13d
	jg	LBB0_10
## %bb.3:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_ieee80211_get_hdrlen_from_buf
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movl	%eax, %r15d
	movl	(%r14), %r14d
	movq	_MT_RXINFO_L2PAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	testl	%r14d, %eax
	je	LBB0_5
## %bb.6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_skb_put_data
	movslq	%r15d, %rax
	addq	%rax, %r12
	addq	$2, %r12
	subl	%r15d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_10:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_dev_err_ratelimited
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_7:
	movq	%r14, %rdi
	callq	_skb_tailroom
	addl	$8, %r15d
	cmpl	%eax, %r13d
	cmovlel	%r13d, %r15d
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_skb_put_data
	subl	%r15d, %r13d
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rax
	jmp	LBB0_12
LBB0_9:
	movslq	%r15d, %rax
	addq	%rax, %r12
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_page_address
	cltq
	subq	%rax, %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movl	%r13d, %r8d
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	callq	_skb_add_rx_frag
	movq	%r15, %rdi
	callq	_get_page
	movq	%r14, %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_MT_RXINFO_L2PAD,4,2            ## @MT_RXINFO_L2PAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: incorrect frame len:%u hdr:%u\n"

	.no_dead_strip	_mt7601u_rx_skb_from_seg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7601u_rx_skb_from_seg
_mt7601u_rx_skb_from_seg:               ; @mt7601u_rx_skb_from_seg
	.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	x20, x5
	mov	x21, x4
	mov	x24, x3
	mov	x22, x2
	mov	x25, x1
	mov	x26, x0
	cmp	x5, #0
	mov	w8, #128
	csel	w0, w3, w8, eq
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_alloc_skb
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.1:
	mov	x0, x26
	mov	x1, x19
	mov	x2, x22
	mov	x3, x25
	bl	_mt76_mac_process_rx
	mov	x23, x0
	cmp	w0, #0
	ccmp	w0, w24, #0, ne
	b.gt	LBB0_7
; %bb.2:
	mov	x0, x22
	mov	x1, x23
	bl	_ieee80211_get_hdrlen_from_buf
	cbz	w0, LBB0_7
; %bb.3:
	mov	x24, x0
	ldr	w25, [x25]
Lloh3:
	adrp	x8, _MT_RXINFO_L2PAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_RXINFO_L2PAD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	tst	w0, w25
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	bl	_skb_put_data
	add	w8, w24, #2
	add	x22, x22, w8, sxtw
	sub	w23, w23, w24
	mov	w24, #0
LBB0_5:
	mov	x0, x19
	bl	_skb_tailroom
	add	w8, w24, #8
	cmp	w23, w0
	csel	w24, w8, w23, gt
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	bl	_skb_put_data
	subs	w23, w23, w24
	b.eq	LBB0_8
; %bb.6:
	add	x22, x22, w24, sxtw
	mov	x0, x20
	bl	_page_address
	sub	x3, x22, w0, sxtw
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	x4, x23
	mov	x5, x21
	bl	_skb_add_rx_frag
	mov	x0, x20
	bl	_get_page
	b	LBB0_8
LBB0_7:
	ldr	w0, [x26]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	w3, #0
	bl	_dev_err_ratelimited
	mov	x0, x19
	bl	_dev_kfree_skb
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_MT_RXINFO_L2PAD,4,2            ; @MT_RXINFO_L2PAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: incorrect frame len:%u hdr:%u\n"

	.no_dead_strip	_mt7601u_rx_skb_from_seg
.subsections_via_symbols
