	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_frag_skb
_build_frag_skb:                        ## @build_frag_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	$56, %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	_DPAA2_ETH_MAX_SG_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	xorl	%r12d, %r12d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_dpaa2_sg_get_addr
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_dpaa2_iova_to_virt
	movq	%rax, %r12
	movq	_DPAA2_ETH_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_dma_unmap_page
	movq	%r15, %rdi
	callq	_dpaa2_sg_get_len
	testq	%r13, %r13
	je	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_virt_to_page
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_virt_to_head_page
	movq	%rax, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_page_address
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_page_address
	subl	%eax, %ebx
	addl	%r12d, %ebx
	movq	_DPAA2_ETH_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leal	-1(%r13), %esi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_skb_add_rx_frag
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	movq	_DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_build_skb
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_dpaa2_sg_get_offset
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_skb_reserve
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_skb_put
	movq	%rbx, %r12
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_dpaa2_sg_is_final
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movq	_DPAA2_ETH_MAX_SG_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	addq	$4, %r15
	cmpq	%rcx, %r13
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	jl	LBB0_3
	jmp	LBB0_14
LBB0_1:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_12:
	movq	_DPAA2_ETH_MAX_SG_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_14:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	xorl	%edi, %edi
	cmpl	%ecx, %r13d
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movl	(%rbx), %eax
	subl	%r13d, %eax
	addl	$-2, %eax
	movl	%eax, (%rbx)
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %r14
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_free_pages
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_dpaa2_sg_is_final
	leaq	1(%r15), %r13
	movq	_DPAA2_ETH_MAX_SG_ENTRIES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %rbx
	movslq	%ecx, %rax
	cmpq	%rax, %r15
	movq	%r13, %r15
	jl	LBB0_6
LBB0_8:
	decl	%r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, %r12
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DPAA2_ETH_MAX_SG_ENTRIES,4,2   ## @DPAA2_ETH_MAX_SG_ENTRIES
	.comm	_DPAA2_ETH_RX_BUF_SIZE,4,2      ## @DPAA2_ETH_RX_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DPAA2_ETH_RX_BUF_RAW_SIZE,4,2  ## @DPAA2_ETH_RX_BUF_RAW_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Final bit not set in SGT"

	.no_dead_strip	_build_frag_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_frag_skb
_build_frag_skb:                        ; @build_frag_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	x23, x1
Lloh0:
	adrp	x27, _DPAA2_ETH_MAX_SG_ENTRIES@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DPAA2_ETH_MAX_SG_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x22, x0
	str	x23, [sp, #8]                   ; 8-byte Folded Spill
	mov	x19, #0
	mov	x20, #0
	ldr	x8, [x0, #8]
Lloh2:
	adrp	x23, _DPAA2_ETH_RX_BUF_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DPAA2_ETH_RX_BUF_SIZE@GOTPAGEOFF]
	ldr	x8, [x8]
	stp	x0, x8, [sp, #16]               ; 16-byte Folded Spill
	str	x2, [sp]                        ; 8-byte Folded Spill
	mov	x24, x2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_dpaa2_sg_get_addr
	mov	x25, x0
	ldr	w0, [x22]
	mov	x1, x25
	bl	_dpaa2_iova_to_virt
	mov	x26, x0
	ldr	w2, [x23]
Lloh4:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x25
	bl	_dma_unmap_page
	mov	x0, x24
	bl	_dpaa2_sg_get_len
	mov	x25, x0
	cbz	x19, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x26
	bl	_virt_to_page
	mov	x22, x27
	mov	x27, x0
	mov	x0, x26
	bl	_virt_to_head_page
	mov	x28, x0
Lloh7:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	sub	w8, w8, #1
	mov	x21, x20
	mov	x20, x23
	and	w23, w8, w26
	mov	x0, x27
	mov	x27, x22
	bl	_page_address
	mov	x26, x0
	mov	x0, x28
	bl	_page_address
	sub	w8, w26, w0
	add	w3, w8, w23
	mov	x23, x20
	mov	x20, x21
	ldr	w5, [x23]
	sub	w1, w19, #1
	mov	x0, x21
	mov	x2, x28
	mov	x4, x25
	bl	_skb_add_rx_frag
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh10:
	adrp	x8, _DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_build_skb
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_dpaa2_sg_get_offset
	mov	x1, x0
	mov	x0, x20
	bl	_skb_reserve
	mov	x0, x20
	mov	x1, x25
	bl	_skb_put
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_dpaa2_sg_is_final
	cbnz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x27]
	add	x24, x24, #4
	cmp	x19, x8
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	b.lt	LBB0_2
; %bb.8:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_15
LBB0_9:
	mov	w19, #0
	mov	x20, #0
	b	LBB0_16
LBB0_10:
	ldr	w8, [x27]
	b	LBB0_15
LBB0_11:
	mov	x0, x26
	mov	w1, #0
	bl	_free_pages
	mov	x19, #0
	ldr	x21, [sp]                       ; 8-byte Folded Reload
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_dpaa2_sg_is_final
	ldr	w8, [x27]
	add	x9, x19, #1
	cbnz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sxtw	x10, w8
	add	x21, x21, #4
	cmp	x19, x10
	mov	x19, x9
	b.lt	LBB0_12
LBB0_14:
	sub	w19, w9, #1
LBB0_15:
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
LBB0_16:
	cmp	w19, w8
	cset	w0, eq
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	ldr	w8, [x23]
	sub	w8, w8, w19
	sub	w8, w8, #2
	str	w8, [x23]
	mov	x0, x20
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DPAA2_ETH_MAX_SG_ENTRIES,4,2   ; @DPAA2_ETH_MAX_SG_ENTRIES
	.comm	_DPAA2_ETH_RX_BUF_SIZE,4,2      ; @DPAA2_ETH_RX_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DPAA2_ETH_RX_BUF_RAW_SIZE,4,2  ; @DPAA2_ETH_RX_BUF_RAW_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Final bit not set in SGT"

	.no_dead_strip	_build_frag_skb
.subsections_via_symbols
