	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bpf_zerocopy_append_bytes      ## -- Begin function bpf_zerocopy_append_bytes
	.p2align	4, 0x90
_bpf_zerocopy_append_bytes:             ## @bpf_zerocopy_append_bytes
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	(%rdi), %rax
	movq	_BPF_BUFMODE_ZBUF@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_ZBUF_FLAG_ASSIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r15), %eax
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.1:
	addl	$4, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	%ebx, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, %r13d
	movl	%edx, %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%r15), %rsi
	xorl	%edi, %edi
	cmpl	%esi, %r13d
	setl	%dil
	callq	_KASSERT
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subl	%ebx, %esi
	movl	%r12d, %edi
	callq	_min
	movl	%eax, %r15d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	%r13d, %r13
	movl	(%rax,%r13,4), %edi
	callq	_sf_buf_kva
	movslq	%ebx, %rbx
	leaq	(%rax,%rbx,4), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_memmove
	addl	%r15d, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	sete	%cl
	movl	$0, %edx
	cmovel	%edx, %ebx
	addl	%ecx, %r13d
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setl	%dil
	movslq	%ebx, %rsi
	callq	_KASSERT
	movslq	%r15d, %rax
	leaq	(%r14,%rax,4), %r14
	subl	%r15d, %r12d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jg	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BPF_BUFMODE_ZBUF,8,3           ## @BPF_BUFMODE_ZBUF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bpf_zerocopy_append_bytes: not in zbuf mode"

L_.str.1:                               ## @.str.1
	.asciz	"bpf_zerocopy_append_bytes: NULL buf"

	.comm	_ZBUF_FLAG_ASSIGNED,4,2         ## @ZBUF_FLAG_ASSIGNED
L_.str.2:                               ## @.str.2
	.asciz	"bpf_zerocopy_append_bytes: ZBUF_FLAG_ASSIGNED"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bpf_zerocopy_append_bytes      ; -- Begin function bpf_zerocopy_append_bytes
	.p2align	2
_bpf_zerocopy_append_bytes:             ; @bpf_zerocopy_append_bytes
	.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, x4
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _BPF_BUFMODE_ZBUF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BPF_BUFMODE_ZBUF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cmp	x21, #0
	cset	w0, ne
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _ZBUF_FLAG_ASSIGNED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ZBUF_FLAG_ASSIGNED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_KASSERT
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.1:
	add	w8, w22, #4
Lloh12:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	sdiv	w24, w8, w9
	msub	w25, w24, w9, w8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x1, [x21, #4]
	cmp	w24, w1
	cset	w0, lt
	bl	_KASSERT
	ldr	w8, [x23]
	sub	w1, w8, w25
	mov	x0, x19
	bl	_min
	mov	x22, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8, w24, sxtw #2]
	bl	_sf_buf_kva
	add	x0, x0, w25, sxtw #2
	mov	x1, x20
	mov	x2, x22
	bl	_memmove
	ldr	w8, [x23]
	add	w9, w22, w25
	cmp	w9, w8
	cinc	w24, w24, eq
	csel	w25, wzr, w9, eq
	cmp	w25, w8
	cset	w0, lt
	sxtw	x1, w25
	bl	_KASSERT
	sub	w19, w19, w22
	add	x20, x20, w22, sxtw #2
	cmp	w19, #0
	b.gt	LBB0_2
LBB0_3:
	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 AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BPF_BUFMODE_ZBUF,8,3           ; @BPF_BUFMODE_ZBUF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bpf_zerocopy_append_bytes: not in zbuf mode"

l_.str.1:                               ; @.str.1
	.asciz	"bpf_zerocopy_append_bytes: NULL buf"

	.comm	_ZBUF_FLAG_ASSIGNED,4,2         ; @ZBUF_FLAG_ASSIGNED
l_.str.2:                               ; @.str.2
	.asciz	"bpf_zerocopy_append_bytes: ZBUF_FLAG_ASSIGNED"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
