	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_recvbuf_mergeable
_add_recvbuf_mergeable:                 ## @add_recvbuf_mergeable
	.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
	movl	%edx, %r12d
	movq	%rsi, %rbx
	leaq	12(%rsi), %r15
	callq	_virtnet_get_headroom
	movl	%eax, %r13d
	xorl	%eax, %eax
	testl	%r13d, %r13d
	setne	%al
	leal	(%r13,%rax,4), %edi
	callq	_SKB_DATA_ALIGN
	movl	%eax, %r14d
	leaq	8(%rbx), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_get_mergeable_buf_len
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	%eax, %r14d
	movl	%r14d, %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, %edx
	callq	_skb_page_frag_refill
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movl	20(%rbx), %edi
	callq	_page_address
	movslq	12(%rbx), %rcx
	addq	%rax, %rcx
	movl	%r13d, %r12d
	addq	%rcx, %r12
	movl	20(%rbx), %edi
	callq	_get_page
	movl	12(%rbx), %edx
	addl	%r14d, %edx
	movl	%edx, 12(%rbx)
	movl	16(%rbx), %eax
	movl	%eax, %ecx
	subl	%edx, %ecx
	cmpl	%r14d, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jae	LBB0_4
## %bb.3:
	addl	%ecx, %r14d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_4:
	movl	(%rbx), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_sg_init_one
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_mergeable_len_to_ctx
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movl	$1, %edx
	movq	%r12, %rcx
	movq	%rax, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_virtqueue_add_inbuf_ctx
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_virt_to_head_page
	movl	%eax, %edi
	callq	_put_page
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_add_recvbuf_mergeable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_recvbuf_mergeable
_add_recvbuf_mergeable:                 ; @add_recvbuf_mergeable
	.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	x19, x2
	mov	x20, x1
	add	x22, x1, #12
	bl	_virtnet_get_headroom
	mov	x21, x0
	cmp	w0, #0
	cset	w8, ne
	add	w0, w0, w8, lsl #2
	bl	_SKB_DATA_ALIGN
	mov	x24, x0
	add	x1, x20, #8
	mov	x0, x20
	mov	x2, x24
	bl	_get_mergeable_buf_len
	mov	x23, x0
	add	w25, w0, w24
	mov	x0, x25
	mov	x1, x22
	mov	x2, x19
	bl	_skb_page_frag_refill
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_6
LBB0_2:
	ldr	w0, [x20, #20]
	bl	_page_address
	ldrsw	x8, [x20, #12]
	add	x8, x0, x8
	add	x24, x8, w21, uxtw
	ldr	w0, [x20, #20]
	bl	_get_page
	ldp	w9, w8, [x20, #12]
	add	w10, w9, w25
	sub	w9, w8, w10
	str	w10, [x20, #12]
	cmp	w9, w25
	b.hs	LBB0_4
; %bb.3:
	add	w23, w9, w23
	str	w8, [x22]
LBB0_4:
	ldr	w0, [x20]
	mov	x1, x24
	mov	x2, x23
	bl	_sg_init_one
	mov	x0, x23
	mov	x1, x21
	bl	_mergeable_len_to_ctx
	mov	x4, x0
	ldp	w1, w0, [x20]
	mov	w2, #1
	mov	x3, x24
	mov	x5, x19
	bl	_virtqueue_add_inbuf_ctx
	mov	x19, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x24
	bl	_virt_to_head_page
	bl	_put_page
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_add_recvbuf_mergeable
.subsections_via_symbols
