	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ngd_send
_ngd_send:                              ## @ngd_send
	.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	%r8, %r15
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_sotongpcb
	movq	%rax, %rbx
	movq	_NG_HOOKSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	testq	%r15, %r15
	jne	LBB0_9
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.2:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	testq	%r13, %r13
	je	LBB0_10
## %bb.4:
	movl	(%r13), %edx
	cmpl	$3, %edx
	jl	LBB0_10
## %bb.5:
	movq	8(%r13), %rsi
	cmpb	$0, (%rsi)
	je	LBB0_10
## %bb.6:
	addl	$-2, %edx
	cmpl	%r12d, %edx
	jge	LBB0_9
## %bb.7:
	movq	%rcx, %r12
	movq	%rcx, %rdi
	movq	%rdx, %r13
	callq	_memmove
	movl	%r13d, %eax
	movb	$0, (%r12,%rax)
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_ng_findhook
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:
	movq	_EHOSTUNREACH@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	movq	(%rax), %rdi
	callq	_NG_NODE_NUMHOOKS
	cmpl	$1, %eax
	jne	LBB0_20
## %bb.11:
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_LIST_FIRST
LBB0_12:
	movq	_NG_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_NG_SEND_DATA_FLAGS
                                        ## implicit-def: $ebx
	testq	%r15, %r15
	jne	LBB0_15
	jmp	LBB0_16
LBB0_13:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_20:
	movq	_EDESTADDRREQ@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
	testq	%r15, %r15
	je	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	callq	_m_freem
LBB0_16:
	testq	%r14, %r14
	je	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	callq	_m_freem
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.19:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_HOOKSIZ,4,2                 ## @NG_HOOKSIZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_EDESTADDRREQ,4,2               ## @EDESTADDRREQ
	.comm	_EHOSTUNREACH,4,2               ## @EHOSTUNREACH
	.comm	_NG_WAITOK,4,2                  ## @NG_WAITOK
	.no_dead_strip	_ngd_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ngd_send
_ngd_send:                              ; @ngd_send
	.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
	sub	sp, sp, #16
	mov	x20, x4
	mov	x23, x3
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_sotongpcb
	mov	x21, x0
Lloh3:
	adrp	x8, _NG_HOOKSIZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_HOOKSIZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x22, x9, x10
	mov	sp, x22
	cbnz	x20, LBB0_9
; %bb.1:
	cbz	x21, LBB0_9
; %bb.2:
	ldr	x9, [x21]
	cbz	x9, LBB0_13
; %bb.3:
	cbz	x23, LBB0_10
; %bb.4:
	ldr	w10, [x23]
	cmp	w10, #3
	b.lt	LBB0_10
; %bb.5:
	ldr	x1, [x23, #8]
	ldrb	w11, [x1]
	cbz	w11, LBB0_10
; %bb.6:
	sub	w23, w10, #2
	cmp	w23, w8
	b.ge	LBB0_9
; %bb.7:
	mov	x0, x22
	mov	x2, x23
	bl	_memmove
	strb	wzr, [x22, w23, uxtw]
	ldr	x8, [x21]
	ldr	x0, [x8]
	mov	x1, x22
	bl	_ng_findhook
	cbnz	x0, LBB0_12
; %bb.8:
Lloh8:
	adrp	x8, _EHOSTUNREACH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EHOSTUNREACH@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	cbnz	x20, LBB0_14
	b	LBB0_15
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	cbnz	x20, LBB0_14
	b	LBB0_15
LBB0_10:
	ldr	x0, [x9]
	bl	_NG_NODE_NUMHOOKS
	cmp	w0, #1
	b.ne	LBB0_19
; %bb.11:
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_LIST_FIRST
LBB0_12:
Lloh14:
	adrp	x8, _NG_WAITOK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NG_WAITOK@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x1, x0
	mov	x2, x19
	bl	_NG_SEND_DATA_FLAGS
                                        ; implicit-def: $w21
	cbnz	x20, LBB0_14
	b	LBB0_15
LBB0_13:
Lloh17:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
	cbz	x20, LBB0_15
LBB0_14:
	mov	x0, x20
	bl	_m_freem
LBB0_15:
	cbz	x19, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_m_freem
LBB0_17:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.18:
	mov	x0, x21
	sub	sp, x29, #48
	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_19:
Lloh23:
	adrp	x8, _EDESTADDRREQ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EDESTADDRREQ@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	cbnz	x20, LBB0_14
	b	LBB0_15
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_HOOKSIZ,4,2                 ; @NG_HOOKSIZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_EDESTADDRREQ,4,2               ; @EDESTADDRREQ
	.comm	_EHOSTUNREACH,4,2               ; @EHOSTUNREACH
	.comm	_NG_WAITOK,4,2                  ; @NG_WAITOK
	.no_dead_strip	_ngd_send
.subsections_via_symbols
