	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ip_dn_destroy
_ip_dn_destroy:                         ## @ip_dn_destroy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_DN_BH_WLOCK
	movq	_dn_gone@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_ND
	movq	_ip_dn_ctl_ptr@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_ip_dn_io_ptr@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_2:
	xorl	%eax, %eax
	callq	_dummynet_flush
	xorl	%eax, %eax
	callq	_DN_BH_WUNLOCK
	movq	_dn_timeout@GOTPCREL(%rip), %rdi
	callq	_callout_drain
	movq	_dn_tq@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_dn_task@GOTPCREL(%rip), %rsi
	callq	_taskqueue_drain
	movl	(%rbx), %edi
	callq	_taskqueue_free
	movq	_dn_cfg@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_dn_ht_free
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_dn_ht_free
	movq	%rbx, %rdi
	callq	_heap_free
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DN_LOCK_DESTROY                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dn_gone,4,2                    ## @dn_gone
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"removing last instance\n"

	.comm	_ip_dn_ctl_ptr,8,3              ## @ip_dn_ctl_ptr
	.comm	_ip_dn_io_ptr,8,3               ## @ip_dn_io_ptr
	.comm	_dn_timeout,4,2                 ## @dn_timeout
	.comm	_dn_tq,4,2                      ## @dn_tq
	.comm	_dn_task,4,2                    ## @dn_task
	.comm	_dn_cfg,12,2                    ## @dn_cfg
	.no_dead_strip	_ip_dn_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ip_dn_destroy
_ip_dn_destroy:                         ; @ip_dn_destroy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_DN_BH_WLOCK
Lloh0:
	adrp	x8, _dn_gone@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dn_gone@GOTPAGEOFF]
	mov	w9, #1
Lloh2:
	str	w9, [x8]
	cbz	w19, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ND
Lloh5:
	adrp	x8, _ip_dn_ctl_ptr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ip_dn_ctl_ptr@GOTPAGEOFF]
Lloh7:
	str	xzr, [x8]
Lloh8:
	adrp	x8, _ip_dn_io_ptr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ip_dn_io_ptr@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
LBB0_2:
	bl	_dummynet_flush
	bl	_DN_BH_WUNLOCK
Lloh11:
	adrp	x0, _dn_timeout@GOTPAGE
Lloh12:
	ldr	x0, [x0, _dn_timeout@GOTPAGEOFF]
	bl	_callout_drain
Lloh13:
	adrp	x19, _dn_tq@GOTPAGE
Lloh14:
	ldr	x19, [x19, _dn_tq@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh15:
	adrp	x1, _dn_task@GOTPAGE
Lloh16:
	ldr	x1, [x1, _dn_task@GOTPAGEOFF]
	bl	_taskqueue_drain
	ldr	w0, [x19]
	bl	_taskqueue_free
Lloh17:
	adrp	x19, _dn_cfg@GOTPAGE
Lloh18:
	ldr	x19, [x19, _dn_cfg@GOTPAGEOFF]
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_dn_ht_free
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_dn_ht_free
	mov	x0, x19
	bl	_heap_free
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DN_LOCK_DESTROY
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_dn_gone,4,2                    ; @dn_gone
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"removing last instance\n"

	.comm	_ip_dn_ctl_ptr,8,3              ; @ip_dn_ctl_ptr
	.comm	_ip_dn_io_ptr,8,3               ; @ip_dn_io_ptr
	.comm	_dn_timeout,4,2                 ; @dn_timeout
	.comm	_dn_tq,4,2                      ; @dn_tq
	.comm	_dn_task,4,2                    ; @dn_task
	.comm	_dn_cfg,12,2                    ; @dn_cfg
	.no_dead_strip	_ip_dn_destroy
.subsections_via_symbols
