	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetNewPort
_GetNewPort:                            ## @GetNewPort
	.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
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_LIBALIAS_LOCK_ASSERT
	movq	_GET_ALIAS_PORT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_GET_NEW_PORT_MAX_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_PKT_ALIAS_SAME_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.2:
	movq	40(%r12), %rbx
	movq	%rbx, %rdi
	callq	_ntohs
	jmp	LBB0_7
LBB0_3:
	movl	$-1, %r15d
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	ja	LBB0_18
## %bb.4:
	movl	%ebx, %ebx
LBB0_5:
	movq	%rbx, 8(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_18
LBB0_6:
	xorl	%eax, %eax
	callq	_arc4random
	movq	_ALIAS_PORT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movslq	%eax, %rdi
	movq	_ALIAS_PORT_BASE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_htons
	movq	%rax, %rbx
LBB0_7:
	movl	$-1, %r15d
	testl	%r13d, %r13d
	jle	LBB0_18
## %bb.8:
	leaq	20(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_GetSocket
	testq	%rax, %rax
	jne	LBB0_5
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_arc4random
	movq	_ALIAS_PORT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movslq	%eax, %rdi
	movq	_ALIAS_PORT_BASE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_htons
	movq	%rax, %rbx
	decl	%r13d
	je	LBB0_18
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	32(%r12), %esi
	movl	28(%r12), %edx
	movl	16(%r12), %r9d
	movl	24(%r12), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %r8
	callq	_FindLinkIn
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_LINK_PARTIALLY_SPECIFIED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	testl	%ecx, (%rax)
	je	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_PKT_ALIAS_USE_SOCKETS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_LINK_PARTIALLY_SPECIFIED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	16(%r12), %ecx
	movq	_LINK_TCP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_LINK_UDP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_16
	jmp	LBB0_5
LBB0_18:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GET_ALIAS_PORT,4,2             ## @GET_ALIAS_PORT
	.comm	_GET_NEW_PORT_MAX_ATTEMPTS,4,2  ## @GET_NEW_PORT_MAX_ATTEMPTS
	.comm	_PKT_ALIAS_SAME_PORTS,4,2       ## @PKT_ALIAS_SAME_PORTS
	.comm	_ALIAS_PORT_MASK,4,2            ## @ALIAS_PORT_MASK
	.comm	_ALIAS_PORT_BASE,8,3            ## @ALIAS_PORT_BASE
	.comm	_LINK_PARTIALLY_SPECIFIED,4,2   ## @LINK_PARTIALLY_SPECIFIED
	.comm	_PKT_ALIAS_USE_SOCKETS,4,2      ## @PKT_ALIAS_USE_SOCKETS
	.comm	_LINK_TCP,4,2                   ## @LINK_TCP
	.comm	_LINK_UDP,4,2                   ## @LINK_UDP
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_GetNewPort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetNewPort
_GetNewPort:                            ; @GetNewPort
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_LIBALIAS_LOCK_ASSERT
Lloh0:
	adrp	x8, _GET_ALIAS_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GET_ALIAS_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _GET_NEW_PORT_MAX_ATTEMPTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GET_NEW_PORT_MAX_ATTEMPTS@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _PKT_ALIAS_SAME_PORTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PKT_ALIAS_SAME_PORTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x24, _ALIAS_PORT_MASK@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ALIAS_PORT_MASK@GOTPAGEOFF]
Lloh11:
	adrp	x25, _ALIAS_PORT_BASE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _ALIAS_PORT_BASE@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	x21, [x19, #40]
	mov	x0, x21
	bl	_ntohs
	cmp	w23, #1
	b.ge	LBB0_6
	b	LBB0_16
LBB0_3:
	lsr	w8, w21, #16
	cbnz	w8, LBB0_16
; %bb.4:
	mov	w21, w21
	b	LBB0_15
LBB0_5:
	bl	_arc4random
	ldr	w8, [x24]
	and	w8, w8, w0
	ldr	x9, [x25]
	add	x0, x9, w8, sxtw
	bl	_htons
	mov	x21, x0
	cmp	w23, #1
	b.lt	LBB0_16
LBB0_6:
	add	x22, x19, #20
Lloh13:
	adrp	x26, _PKT_ALIAS_USE_SOCKETS@GOTPAGE
Lloh14:
	ldr	x26, [x26, _PKT_ALIAS_USE_SOCKETS@GOTPAGEOFF]
Lloh15:
	adrp	x27, _LINK_PARTIALLY_SPECIFIED@GOTPAGE
Lloh16:
	ldr	x27, [x27, _LINK_PARTIALLY_SPECIFIED@GOTPAGEOFF]
Lloh17:
	adrp	x28, _LINK_UDP@GOTPAGE
Lloh18:
	ldr	x28, [x28, _LINK_UDP@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_arc4random
	ldr	w8, [x24]
	and	w8, w8, w0
	ldr	x9, [x25]
	add	x0, x9, w8, sxtw
	bl	_htons
	mov	x21, x0
	subs	w23, w23, #1
	b.eq	LBB0_16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [x19, #28]
	ldr	w3, [x19, #24]
	ldr	w5, [x19, #16]
	mov	x0, x20
	mov	x4, x21
	mov	w6, #0
	bl	_FindLinkIn
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x19]
	ldr	w8, [x27]
	tst	w8, w9
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x0]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w3, [x19, #16]
Lloh19:
	adrp	x8, _LINK_TCP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LINK_TCP@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x28]
	cmp	w3, w8
	ccmp	w3, w9, #4, ne
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_GetSocket
	cbz	x0, LBB0_7
LBB0_15:
	mov	w0, #0
	str	x21, [x19, #8]
	b	LBB0_17
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GET_ALIAS_PORT,4,2             ; @GET_ALIAS_PORT
	.comm	_GET_NEW_PORT_MAX_ATTEMPTS,4,2  ; @GET_NEW_PORT_MAX_ATTEMPTS
	.comm	_PKT_ALIAS_SAME_PORTS,4,2       ; @PKT_ALIAS_SAME_PORTS
	.comm	_ALIAS_PORT_MASK,4,2            ; @ALIAS_PORT_MASK
	.comm	_ALIAS_PORT_BASE,8,3            ; @ALIAS_PORT_BASE
	.comm	_LINK_PARTIALLY_SPECIFIED,4,2   ; @LINK_PARTIALLY_SPECIFIED
	.comm	_PKT_ALIAS_USE_SOCKETS,4,2      ; @PKT_ALIAS_USE_SOCKETS
	.comm	_LINK_TCP,4,2                   ; @LINK_TCP
	.comm	_LINK_UDP,4,2                   ; @LINK_UDP
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_GetNewPort
.subsections_via_symbols
