	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bpf_zerocopy_ioctl_setzbuf     ## -- Begin function bpf_zerocopy_ioctl_setzbuf
	.p2align	4, 0x90
_bpf_zerocopy_ioctl_setzbuf:            ## @bpf_zerocopy_ioctl_setzbuf
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	_BPF_BUFMODE_ZBUF@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	16(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.3:
	movq	(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.4:
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_zbuf_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movl	8(%r12), %esi
	movq	(%r12), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	callq	_zbuf_setup
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_zbuf_free
	jmp	LBB0_13
LBB0_7:
	movq	%r14, %rdi
	callq	_BPFD_LOCK
	cmpq	$0, 56(%r14)
	jne	LBB0_11
## %bb.8:
	cmpq	$0, 32(%r14)
	jne	LBB0_11
## %bb.9:
	cmpq	$0, 40(%r14)
	jne	LBB0_11
## %bb.10:
	cmpq	$0, 48(%r14)
	je	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_BPFD_UNLOCK
	movq	-40(%rbp), %rdi
	callq	_zbuf_free
	movq	-48(%rbp), %rdi
	callq	_zbuf_free
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-48(%rbp), %rax
	movq	%rax, 40(%r14)
	movq	-40(%rbp), %rax
	movq	%rax, 32(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movq	(%r12), %rax
	addq	$-4, %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_BPFD_UNLOCK
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_BPF_BUFMODE_ZBUF,8,3           ## @BPF_BUFMODE_ZBUF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bpf_zerocopy_ioctl_setzbuf: not in zbuf mode"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bpf_zerocopy_ioctl_setzbuf     ; -- Begin function bpf_zerocopy_ioctl_setzbuf
	.p2align	2
_bpf_zerocopy_ioctl_setzbuf:            ; @bpf_zerocopy_ioctl_setzbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x1]
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
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_11
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.2:
	ldr	x2, [x20]
	cbz	x2, LBB0_11
; %bb.3:
	add	x3, sp, #8
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_zbuf_setup
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.4:
	ldr	w1, [x20, #8]
	ldr	x2, [x20]
	mov	x3, sp
	mov	x0, x21
	bl	_zbuf_setup
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_zbuf_free
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_BPFD_LOCK
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_10
; %bb.7:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_10
; %bb.9:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_BPFD_UNLOCK
	ldr	x0, [sp, #8]
	bl	_zbuf_free
	ldr	x0, [sp]
	bl	_zbuf_free
LBB0_11:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	ldp	x8, x9, [sp]
	stp	x9, x8, [x19, #32]
	stp	xzr, xzr, [x19, #16]
	ldr	x8, [x20]
	sub	x8, x8, #4
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_BPFD_UNLOCK
	mov	w22, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BPF_BUFMODE_ZBUF,8,3           ; @BPF_BUFMODE_ZBUF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bpf_zerocopy_ioctl_setzbuf: not in zbuf mode"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
