	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tun_napi_alloc_frags
_tun_napi_alloc_frags:                  ## @tun_napi_alloc_frags
	.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	_MAX_SKB_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	cmpl	%eax, (%rdx)
	jle	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_local_bh_disable
	movq	%r15, %rdi
	callq	_napi_get_frags
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_local_bh_enable
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	callq	_iov_iter_single_seg_count
	movq	%r14, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	___skb_grow
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_4:
	movq	%r15, %rdi
	callq	_napi_free_frags
	jmp	LBB0_7
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, (%r14)
	subq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	movq	%r13, 8(%r14)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addq	%r13, 16(%r14)
	cmpl	$2, (%r12)
	jl	LBB0_14
## %bb.9:
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r15,8), %r13
	testq	%r13, %r13
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	ja	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rdi
	callq	_netdev_alloc_frag
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_virt_to_head_page
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_page_address
	cltq
	subq	%rax, %rbx
	leal	-1(%r15), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movq	%r13, %r8
	callq	_skb_fill_page_desc
	incq	%r15
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jl	LBB0_10
LBB0_14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SKB_FRAGS,4,2              ## @MAX_SKB_FRAGS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tun_napi_alloc_frags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tun_napi_alloc_frags
_tun_napi_alloc_frags:                  ; @tun_napi_alloc_frags
	.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
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _MAX_SKB_FRAGS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_SKB_FRAGS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w9, w9, #1
	cmp	w8, w9
	b.gt	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_local_bh_disable
	mov	x0, x19
	bl	_napi_get_frags
	mov	x21, x0
	bl	_local_bh_enable
	cbz	x21, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_iov_iter_single_seg_count
	mov	x24, x0
	mov	x0, x21
	mov	x1, x24
	bl	___skb_grow
	mov	x23, x0
	cbz	w0, LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_napi_free_frags
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_5:
	mov	x0, x23
	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
	b	_ERR_PTR
LBB0_6:
	ldr	x8, [x21, #16]
	sub	x9, x22, x24
	add	x8, x8, x9
	stp	x22, x9, [x21]
	str	x8, [x21, #16]
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.7:
	mov	w25, #1
Lloh6:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x22, [x8, x25, lsl #3]
	ldr	x8, [x26]
	cmp	x22, #0
	ccmp	x22, x8, #2, ne
	b.hi	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	bl	_netdev_alloc_frag
	cbz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x0
	bl	_virt_to_head_page
	mov	x24, x0
	bl	_page_address
	sub	x3, x23, w0, sxtw
	sub	w1, w25, #1
	mov	x0, x21
	mov	x2, x24
	mov	x4, x22
	bl	_skb_fill_page_desc
	add	x25, x25, #1
	ldrsw	x8, [x20]
	cmp	x25, x8
	b.lt	LBB0_8
LBB0_11:
	mov	x0, x21
	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
LBB0_12:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SKB_FRAGS,4,2              ; @MAX_SKB_FRAGS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tun_napi_alloc_frags
.subsections_via_symbols
