	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NiListenThread                 ## -- Begin function NiListenThread
	.p2align	4, 0x90
_NiListenThread:                        ## @NiListenThread
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r12
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.2:
	movq	%rdi, %r15
	xorl	%edi, %edi
	callq	_NewList
	movl	%eax, (%r12)
	movb	$1, %r13b
	movq	_DEFAULT_NAT_ADMIN_PORT@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_Listen
	movq	%rax, %r14
	testb	$1, %r13b
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_NoticeThreadInit
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%r14, %r14
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%r12), %edi
	movq	_NAT_ADMIN_PORT_LISTEN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_Wait
	xorl	%r13d, %r13d
	cmpq	$0, 8(%r12)
	je	LBB0_3
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, 16(%r12)
	movl	(%r14), %edi
	callq	_AddRef
	movq	%r14, %rdi
	callq	_Accept
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %rbx
	movq	_NiAdminThread@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%r12)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$24, %edi
	callq	_ZeroMalloc
	movq	%r12, 16(%rax)
	movq	%rbx, (%rax)
	movl	(%r15), %edi
	movq	%rax, %rsi
	callq	_NewThread
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_WaitThreadInit
	movq	%rbx, %rdi
	callq	_ReleaseThread
	movq	%r14, %rdi
	callq	_Accept
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_13
LBB0_11:
	movq	%rbx, %rdi
	callq	_ReleaseSock
LBB0_13:
	movl	(%r12), %edi
	callq	_LockList
	movl	(%r12), %edi
	callq	_LIST_NUM
	testq	%rax, %rax
	jle	LBB0_16
## %bb.14:
	xorl	%r15d, %r15d
	movq	_INFINITE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_LIST_DATA
	movq	%rax, %rbx
	movq	(%rax), %rdi
	callq	_Disconnect
	movq	8(%rbx), %rdi
	movl	(%r13), %esi
	callq	_WaitThread
	movq	8(%rbx), %rdi
	callq	_ReleaseThread
	movq	(%rbx), %rdi
	callq	_ReleaseSock
	movq	%rbx, %rdi
	callq	_Free
	incq	%r15
	movl	(%r12), %edi
	callq	_LIST_NUM
	cmpq	%rax, %r15
	jl	LBB0_15
LBB0_16:
	movl	(%r12), %edi
	callq	_UnlockList
	movl	(%r12), %edi
	callq	_ReleaseList
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ReleaseSock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_NAT_ADMIN_PORT,4,2     ## @DEFAULT_NAT_ADMIN_PORT
	.comm	_NAT_ADMIN_PORT_LISTEN_INTERVAL,4,2 ## @NAT_ADMIN_PORT_LISTEN_INTERVAL
	.comm	_NiAdminThread,4,2              ## @NiAdminThread
	.comm	_INFINITE,4,2                   ## @INFINITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NiListenThread                 ; -- Begin function NiListenThread
	.p2align	2
_NiListenThread:                        ; @NiListenThread
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_7
; %bb.2:
	mov	x21, x0
	mov	x0, #0
	bl	_NewList
	str	w0, [x19]
	mov	w24, #1
Lloh0:
	adrp	x22, _DEFAULT_NAT_ADMIN_PORT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DEFAULT_NAT_ADMIN_PORT@GOTPAGEOFF]
Lloh2:
	adrp	x23, _NAT_ADMIN_PORT_LISTEN_INTERVAL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _NAT_ADMIN_PORT_LISTEN_INTERVAL@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_Listen
	mov	x20, x0
	tbz	w24, #0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_NoticeThreadInit
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	x20, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #24]
	ldr	w1, [x23]
	bl	_Wait
	mov	w24, #0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
LBB0_7:
	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_8:
	str	x20, [x19, #16]
	ldr	w0, [x20]
	bl	_AddRef
	mov	x0, x20
	bl	_Accept
	cbz	x0, LBB0_13
; %bb.9:
	mov	x21, x0
Lloh4:
	adrp	x22, _NiAdminThread@GOTPAGE
Lloh5:
	ldr	x22, [x22, _NiAdminThread@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #24
	bl	_ZeroMalloc
	mov	x1, x0
	str	x19, [x0, #16]
	str	x21, [x0]
	ldr	w0, [x22]
	bl	_NewThread
	mov	x21, x0
	bl	_WaitThreadInit
	mov	x0, x21
	bl	_ReleaseThread
	mov	x0, x20
	bl	_Accept
	mov	x21, x0
	cbnz	x0, LBB0_10
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	bl	_ReleaseSock
LBB0_13:
	ldr	w0, [x19]
	bl	_LockList
	ldr	w0, [x19]
	bl	_LIST_NUM
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x21, #0
Lloh6:
	adrp	x23, _INFINITE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _INFINITE@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x21
	bl	_LIST_DATA
	mov	x22, x0
	ldr	x0, [x0]
	bl	_Disconnect
	ldr	x0, [x22, #8]
	ldr	w1, [x23]
	bl	_WaitThread
	ldr	x0, [x22, #8]
	bl	_ReleaseThread
	ldr	x0, [x22]
	bl	_ReleaseSock
	mov	x0, x22
	bl	_Free
	add	x21, x21, #1
	ldr	w0, [x19]
	bl	_LIST_NUM
	cmp	x21, x0
	b.lt	LBB0_15
LBB0_16:
	ldr	w0, [x19]
	bl	_UnlockList
	ldr	w0, [x19]
	bl	_ReleaseList
	mov	x0, x20
	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
	b	_ReleaseSock
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_NAT_ADMIN_PORT,4,2     ; @DEFAULT_NAT_ADMIN_PORT
	.comm	_NAT_ADMIN_PORT_LISTEN_INTERVAL,4,2 ; @NAT_ADMIN_PORT_LISTEN_INTERVAL
	.comm	_NiAdminThread,4,2              ; @NiAdminThread
	.comm	_INFINITE,4,2                   ; @INFINITE
.subsections_via_symbols
