	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ListenerUDPMainLoop            ## -- Begin function ListenerUDPMainLoop
	.p2align	4, 0x90
_ListenerUDPMainLoop:                   ## @ListenerUDPMainLoop
	.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
	subq	$24, %rsp
	.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	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Debug
	movq	_LISTENER_STATUS_TRYING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	leaq	L_.str.1(%rip), %r14
	leaq	L_.str.2(%rip), %r15
	movq	_LISTEN_RETRY_TIME@GOTPCREL(%rip), %r13
                                        ## implicit-def: $r12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_10 Depth 2
	movq	16(%rbx), %rax
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_Debug
	movl	32(%rbx), %edi
	movq	8(%rbx), %rax
	movq	(%rax), %rdx
	xorl	%esi, %esi
	callq	_NewUDPEx2
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_Debug
	movl	28(%rbx), %edi
	movl	(%r13), %esi
	callq	_Wait
	cmpq	$0, 16(%rbx)
	movl	$0, %eax
	je	LBB0_3
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_LISTENER_STATUS_LISTENING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rbx)
	movl	4(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_Debug
	cmpq	$0, 16(%rbx)
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r15
	movq	_UDP_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Malloc
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %r13
	leaq	-60(%rbp), %r12
	movq	%r12, %rdi
	callq	_InitSockSet
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	callq	_AddSockSet
	movq	_SELECT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r13, %r12
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_Select
	movq	(%rbx), %rdi
	movq	_UDP_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rcx
	callq	_RecvFrom
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	(%rbx), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	cmpq	$0, 16(%rbx)
	jne	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	_SOCK_LATER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdi
	movq	-56(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	movq	%r12, %r8
	movq	%rax, %r9
	callq	_UDPReceivedPacket
	jmp	LBB0_10
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
	leaq	L_.str.2(%rip), %r15
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdi
	callq	_Disconnect
	movq	(%rbx), %rdi
	callq	_ReleaseSock
	movq	$0, (%rbx)
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_Debug
	movq	%r12, %rdi
	callq	_Free
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_Debug
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ListenerUDPMainLoop Starts.\n"

	.comm	_LISTENER_STATUS_TRYING,4,2     ## @LISTENER_STATUS_TRYING
L_.str.1:                               ## @.str.1
	.asciz	"NewUDP()\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to NewUDP.\n"

	.comm	_LISTEN_RETRY_TIME,4,2          ## @LISTEN_RETRY_TIME
L_.str.3:                               ## @.str.3
	.asciz	"UDP Halt.\n"

	.comm	_LISTENER_STATUS_LISTENING,4,2  ## @LISTENER_STATUS_LISTENING
L_.str.4:                               ## @.str.4
	.asciz	"Start Listening at UDP Port %u.\n"

	.comm	_UDP_PACKET_SIZE,4,2            ## @UDP_PACKET_SIZE
	.comm	_SELECT_TIME,4,2                ## @SELECT_TIME
L_.str.5:                               ## @.str.5
	.asciz	"UDP Listen Stopped.\n"

	.comm	_SOCK_LATER,8,3                 ## @SOCK_LATER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ListenerUDPMainLoop            ; -- Begin function ListenerUDPMainLoop
	.p2align	2
_ListenerUDPMainLoop:                   ; @ListenerUDPMainLoop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Debug
Lloh2:
	adrp	x8, _LISTENER_STATUS_TRYING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LISTENER_STATUS_TRYING@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh5:
	adrp	x20, l_.str.1@PAGE
Lloh6:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh7:
	adrp	x21, l_.str.2@PAGE
Lloh8:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh9:
	adrp	x25, _LISTEN_RETRY_TIME@GOTPAGE
Lloh10:
	ldr	x25, [x25, _LISTEN_RETRY_TIME@GOTPAGEOFF]
Lloh11:
	adrp	x22, l_.str.4@PAGE
Lloh12:
	add	x22, x22, l_.str.4@PAGEOFF
Lloh13:
	adrp	x27, _UDP_PACKET_SIZE@GOTPAGE
Lloh14:
	ldr	x27, [x27, _UDP_PACKET_SIZE@GOTPAGEOFF]
Lloh15:
	adrp	x28, _SELECT_TIME@GOTPAGE
Lloh16:
	ldr	x28, [x28, _SELECT_TIME@GOTPAGEOFF]
Lloh17:
	adrp	x26, _SOCK_LATER@GOTPAGE
Lloh18:
	ldr	x26, [x26, _SOCK_LATER@GOTPAGEOFF]
Lloh19:
	adrp	x23, l_.str.5@PAGE
Lloh20:
	add	x23, x23, l_.str.5@PAGEOFF
                                        ; implicit-def: $x24
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x19, #16]
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbnz	x8, LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x20
	bl	_Debug
	ldr	w0, [x19, #32]
	ldr	x8, [x19, #8]
	ldr	x2, [x8]
	mov	w1, #0
	bl	_NewUDPEx2
	str	x0, [x19]
	cbnz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x21
	bl	_Debug
	ldr	w0, [x19, #28]
	ldr	w1, [x25]
	bl	_Wait
	mov	x8, #0
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_3
	b	LBB0_14
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh21:
	adrp	x8, _LISTENER_STATUS_LISTENING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LISTENER_STATUS_LISTENING@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	ldr	w8, [x0, #4]
	str	x8, [sp]
	mov	x0, x22
	bl	_Debug
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19]
	bl	_Disconnect
	ldr	x0, [x19]
	bl	_ReleaseSock
	str	xzr, [x19]
	mov	x0, x23
	bl	_Debug
	mov	x0, x24
	bl	_Free
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x27]
	bl	_Malloc
	mov	x24, x0
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #12
	bl	_InitSockSet
	ldr	x1, [x19]
	add	x0, sp, #12
	bl	_AddSockSet
	ldr	w1, [x28]
	add	x0, sp, #12
	mov	x2, #0
	mov	x3, #0
	bl	_Select
	ldr	x0, [x19]
	ldr	w4, [x27]
	add	x1, sp, #28
	add	x2, sp, #16
	mov	x3, x24
	bl	_RecvFrom
	mov	x5, x0
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19]
	ldr	w8, [x8]
	cbz	w8, LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x26]
	cmp	x5, x8
	b.eq	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	ldp	x1, x0, [x19]
	ldr	x3, [sp, #16]
	add	x2, sp, #28
	mov	x4, x24
	bl	_UDPReceivedPacket
	b	LBB0_9
LBB0_14:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Debug
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ListenerUDPMainLoop Starts.\n"

	.comm	_LISTENER_STATUS_TRYING,4,2     ; @LISTENER_STATUS_TRYING
l_.str.1:                               ; @.str.1
	.asciz	"NewUDP()\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to NewUDP.\n"

	.comm	_LISTEN_RETRY_TIME,4,2          ; @LISTEN_RETRY_TIME
l_.str.3:                               ; @.str.3
	.asciz	"UDP Halt.\n"

	.comm	_LISTENER_STATUS_LISTENING,4,2  ; @LISTENER_STATUS_LISTENING
l_.str.4:                               ; @.str.4
	.asciz	"Start Listening at UDP Port %u.\n"

	.comm	_UDP_PACKET_SIZE,4,2            ; @UDP_PACKET_SIZE
	.comm	_SELECT_TIME,4,2                ; @SELECT_TIME
l_.str.5:                               ; @.str.5
	.asciz	"UDP Listen Stopped.\n"

	.comm	_SOCK_LATER,8,3                 ; @SOCK_LATER
.subsections_via_symbols
