	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sg_fd_to_skb
_sg_fd_to_skb:                          ## @sg_fd_to_skb
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_qm_fd_get_offset
	movl	%eax, %r15d
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_qm_fd_addr
	movl	%eax, %edi
	callq	_phys_to_virt
	movq	%rax, %r14
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_IS_ALIGNED
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	_DPAA_SGT_MAX_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movslq	%r15d, %rax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addq	%rax, %r14
	xorl	%r12d, %r12d
	movq	%r14, %rbx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_qm_sg_entry_is_ext
	movl	%eax, %edi
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_qm_sg_addr
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_phys_to_virt
	movq	%rax, %r13
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_IS_ALIGNED
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_dpaa_bpid2pool
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r12
	movl	4(%rax), %edi
	callq	_this_cpu_ptr
	movq	%rax, %rbx
	movl	(%r12), %edx
	movl	8(%r12), %edi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	callq	_dma_unmap_single
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_virt_to_page
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_virt_to_head_page
	movq	%rax, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	%eax, %r13d
	movq	%r14, %rdi
	callq	_page_address
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_page_address
	subl	%eax, %r14d
	addl	%r13d, %r14d
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_qm_sg_entry_get_off
	addl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_qm_sg_entry_get_len
	movl	(%r12), %r9d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	leal	-1(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, %r8d
	callq	_skb_add_rx_frag
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %r14d
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	addl	%eax, %r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	callq	_build_skb
	xorl	%edi, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_rx_csum_offload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, (%r12)
	xorl	%edi, %edi
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	cmpl	(%rbx), %r15d
	setne	%dil
	callq	_WARN_ON
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_skb_reserve
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_qm_sg_entry_get_len
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_skb_put
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	decl	(%rax)
	movq	%rbx, %rdi
	callq	_qm_sg_entry_is_final
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	_DPAA_SGT_MAX_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jl	LBB0_3
	jmp	LBB0_11
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
LBB0_13:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.14:
	incq	%rbx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	decq	%rbx
	cmpq	$1, %rbx
	jbe	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	-8(%r14,%rbx,4), %edi
	callq	_dpaa_bpid2pool
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	4(%rax), %edi
	callq	_this_cpu_ptr
	incl	(%rax)
	jmp	LBB0_17
LBB0_18:
	movq	_DPAA_SGT_MAX_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_24
## %bb.19:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_qm_sg_addr
	movl	%eax, %edi
	callq	_phys_to_virt
	movq	%rax, %rdi
	callq	_skb_free_frag
	movl	(%r14), %edi
	callq	_dpaa_bpid2pool
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	4(%rax), %edi
	callq	_this_cpu_ptr
	decl	(%rax)
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	%r14, %rdi
	callq	_qm_sg_entry_is_final
	testq	%rax, %rax
	jne	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_21 Depth=1
	incq	%rbx
	movq	_DPAA_SGT_MAX_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_21
LBB0_24:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_free_frag
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_9:
	movq	_DPAA_SGT_MAX_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movq	%r14, %rdi
	callq	_skb_free_frag
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_25:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMP_CACHE_BYTES,4,2            ## @SMP_CACHE_BYTES
	.comm	_DPAA_SGT_MAX_ENTRIES,4,2       ## @DPAA_SGT_MAX_ENTRIES
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No final bit on SGT\n"

	.no_dead_strip	_sg_fd_to_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sg_fd_to_skb
_sg_fd_to_skb:                          ; @sg_fd_to_skb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x1
	bl	_qm_fd_get_offset
	mov	x20, x0
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x19
	bl	_qm_fd_addr
	bl	_phys_to_virt
	mov	x19, x0
Lloh0:
	adrp	x8, _SMP_CACHE_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMP_CACHE_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_IS_ALIGNED
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh3:
	adrp	x23, _DPAA_SGT_MAX_ENTRIES@GOTPAGE
Lloh4:
	ldr	x23, [x23, _DPAA_SGT_MAX_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x22, #0
	mov	x24, #0
	str	x19, [sp]                       ; 8-byte Folded Spill
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	add	x20, x19, w20, sxtw
	mov	x25, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_qm_sg_entry_is_ext
	bl	_WARN_ON
	mov	x0, x25
	bl	_qm_sg_addr
	mov	x19, x0
	bl	_phys_to_virt
	mov	x27, x0
Lloh5:
	adrp	x8, _SMP_CACHE_BYTES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMP_CACHE_BYTES@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_IS_ALIGNED
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w0, [x25]
	bl	_dpaa_bpid2pool
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x0
	ldr	w0, [x0, #4]
	bl	_this_cpu_ptr
	mov	x26, x0
	ldr	w0, [x28, #8]
	ldr	w2, [x28]
Lloh8:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x1, x19
	bl	_dma_unmap_single
	cbz	x24, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	bl	_virt_to_page
	mov	x19, x0
	mov	x0, x27
	bl	_virt_to_head_page
	mov	x21, x0
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	sub	w8, w8, #1
	and	w27, w8, w27
	mov	x0, x19
	bl	_page_address
	mov	x19, x0
	mov	x0, x21
	bl	_page_address
	sub	w8, w19, w0
	add	w19, w8, w27
	mov	x0, x25
	bl	_qm_sg_entry_get_off
	add	w19, w0, w19
	mov	x0, x25
	bl	_qm_sg_entry_get_len
	mov	x4, x0
	ldr	w5, [x28]
	sub	w1, w22, #1
	mov	x0, x24
	mov	x2, x21
	mov	x3, x19
	bl	_skb_add_rx_frag
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w19, [x28]
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	add	w1, w0, w19
	mov	x0, x27
	bl	_build_skb
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	x19, x1, [sp, #16]              ; 16-byte Folded Reload
	mov	x0, x19
	bl	_rx_csum_offload
	str	w0, [x24]
	ldr	w8, [x19]
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w19, w8
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x24
	mov	x1, x19
	bl	_skb_reserve
	mov	x0, x25
	bl	_qm_sg_entry_get_len
	mov	x1, x0
	mov	x0, x24
	bl	_skb_put
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	sub	w8, w8, #1
	str	w8, [x26]
	mov	x0, x25
	bl	_qm_sg_entry_is_final
	cbnz	x0, LBB0_22
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x23]
	add	x25, x25, #4
	cmp	x22, x8
	b.lt	LBB0_2
	b	LBB0_23
LBB0_9:
	mov	w22, #0
	mov	x24, #0
	b	LBB0_24
LBB0_10:
	cbz	w22, LBB0_15
; %bb.11:
	sub	x19, x22, #1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x8, x19, #1
	sub	x19, x19, #1
	cmp	x8, #1
	b.ls	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, x19, lsl #2]
	bl	_dpaa_bpid2pool
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x0, #4]
	bl	_this_cpu_ptr
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	b	LBB0_12
LBB0_15:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.16:
	mov	x19, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_qm_sg_addr
	bl	_phys_to_virt
	bl	_skb_free_frag
	ldr	w0, [x20]
	bl	_dpaa_bpid2pool
	cbz	x0, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x0, #4]
	bl	_this_cpu_ptr
	ldr	w8, [x0]
	sub	w8, w8, #1
	str	w8, [x0]
LBB0_19:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x20
	bl	_qm_sg_entry_is_final
	cbnz	x0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x23]
	add	x20, x20, #4
	cmp	x19, x8
	b.lt	LBB0_17
LBB0_21:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_skb_free_frag
	mov	x24, #0
	b	LBB0_25
LBB0_22:
	ldr	w8, [x23]
LBB0_23:
	ldr	x19, [sp]                       ; 8-byte Folded Reload
LBB0_24:
	cmp	w22, w8
	cset	w0, eq
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	mov	x0, x19
	bl	_skb_free_frag
LBB0_25:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SMP_CACHE_BYTES,4,2            ; @SMP_CACHE_BYTES
	.comm	_DPAA_SGT_MAX_ENTRIES,4,2       ; @DPAA_SGT_MAX_ENTRIES
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No final bit on SGT\n"

	.no_dead_strip	_sg_fd_to_skb
.subsections_via_symbols
