	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_rmnode                      ## -- Begin function ng_rmnode
	.p2align	4, 0x90
_ng_rmnode:                             ## @ng_rmnode
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NGF_CLOSING@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	cmpq	_ng_deadnode@GOTPCREL(%rip), %rdi
	je	LBB0_16
## %bb.2:
	movq	%r14, %rdi
	callq	_NG_NODE_REF
	movq	_NGF_INVALID@GOTPCREL(%rip), %r12
	movl	(%r15), %eax
	orl	(%r12), %eax
	orl	%eax, (%r14)
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	*%rax
LBB0_5:
	leaq	16(%r14), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_LIST_FIRST
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rdi
	callq	_ng_destroy_hook
	jmp	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_ng_flush_input_queue
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	callq	*%rax
	movq	%r14, %rdi
	callq	_NG_NODE_IS_VALID
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movl	(%r15), %eax
	orl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r14)
	jmp	LBB0_12
LBB0_16:
	leaq	L_str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_13:
	movq	%r14, %rdi
	callq	_NG_NODE_UNREF
LBB0_14:
	movq	%r14, %rdi
	callq	_ng_unname
LBB0_12:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_NG_NODE_UNREF                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NGF_CLOSING,4,2                ## @NGF_CLOSING
	.comm	_ng_deadnode,24,3               ## @ng_deadnode
	.comm	_NGF_INVALID,4,2                ## @NGF_INVALID
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"shutdown called on deadnode"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_rmnode                      ; -- Begin function ng_rmnode
	.p2align	2
_ng_rmnode:                             ; @ng_rmnode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _NGF_CLOSING@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NGF_CLOSING@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x8, _ng_deadnode@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ng_deadnode@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.3:
	mov	x0, x19
	bl	_NG_NODE_REF
Lloh4:
	adrp	x22, _NGF_INVALID@GOTPAGE
Lloh5:
	ldr	x22, [x22, _NGF_INVALID@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	add	x20, x19, #16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_LIST_FIRST
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_ng_destroy_hook
	b	LBB0_7
LBB0_9:
	mov	x0, x19
	bl	_ng_flush_input_queue
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
; %bb.10:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.11:
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_NG_NODE_IS_VALID
	cbz	x0, LBB0_15
; %bb.12:
	ldr	w8, [x22]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	b	LBB0_16
LBB0_13:
Lloh6:
	adrp	x0, l_str@PAGE
Lloh7:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_puts
LBB0_14:
	mov	x0, x19
	bl	_NG_NODE_UNREF
LBB0_15:
	mov	x0, x19
	bl	_ng_unname
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_NG_NODE_UNREF
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NGF_CLOSING,4,2                ; @NGF_CLOSING
	.comm	_ng_deadnode,24,3               ; @ng_deadnode
	.comm	_NGF_INVALID,4,2                ; @NGF_INVALID
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"shutdown called on deadnode"

.subsections_via_symbols
