	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_bpf_setprog
_ng_bpf_setprog:                        ## @ng_bpf_setprog
	.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
	movq	%rsi, %rbx
	movl	%edi, %r15d
	callq	_NG_HOOK_PRIVATE
	movq	%rax, %r14
	movq	(%rbx), %rsi
	movq	_bpf_maxinsns@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jg	LBB0_6
## %bb.1:
	movl	16(%rbx), %edi
	callq	_bpf_validate
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	(%rbx), %rdi
	callq	_NG_BPF_HOOKPROG_SIZE
	movl	%eax, %r13d
	movq	_M_NETGRAPH_BPF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_memmove
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movq	_M_NETGRAPH_BPF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
LBB0_5:
	movq	%r12, (%r14)
	movl	%r15d, %edi
	callq	_NG_HOOK_NODE
	movq	(%r14), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_ng_findhook
	movq	%rax, 16(%r14)
	movl	%r15d, %edi
	callq	_NG_HOOK_NODE
	movq	(%r14), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	callq	_ng_findhook
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_bpf_maxinsns,8,3               ## @bpf_maxinsns
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_M_NETGRAPH_BPF,4,2             ## @M_NETGRAPH_BPF
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ng_bpf_setprog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_bpf_setprog
_ng_bpf_setprog:                        ; @ng_bpf_setprog
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	bl	_NG_HOOK_PRIVATE
	ldr	x1, [x21]
Lloh0:
	adrp	x8, _bpf_maxinsns@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bpf_maxinsns@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.gt	LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x21, #16]
	bl	_bpf_validate
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x0, [x21]
	bl	_NG_BPF_HOOKPROG_SIZE
	mov	x23, x0
Lloh3:
	adrp	x24, _M_NETGRAPH_BPF@GOTPAGE
Lloh4:
	ldr	x24, [x24, _M_NETGRAPH_BPF@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh5:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x22, x0
	mov	x1, x21
	mov	x2, x23
	bl	_memmove
	ldr	x0, [x19]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x24]
	bl	_free
LBB0_5:
	str	x22, [x19]
	mov	x0, x20
	bl	_NG_HOOK_NODE
	ldr	x8, [x19]
	ldr	w1, [x8, #12]
	bl	_ng_findhook
	str	x0, [x19, #16]
	mov	x0, x20
	bl	_NG_HOOK_NODE
	ldr	x8, [x19]
	ldr	w1, [x8, #8]
	bl	_ng_findhook
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_bpf_maxinsns,8,3               ; @bpf_maxinsns
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_M_NETGRAPH_BPF,4,2             ; @M_NETGRAPH_BPF
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ng_bpf_setprog
.subsections_via_symbols
