	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_alloc
_port_alloc:                            ## @port_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_DN_SK
	movq	%rax, %r14
	movzwl	_port_alloc.port(%rip), %ebx
	movl	%ebx, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movw	%cx, _port_alloc.port(%rip)
	movzwl	%cx, %edi
	callq	_cpu_to_le16
	movl	%eax, %edi
	callq	_check_port
	movzwl	_port_alloc.port(%rip), %ecx
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpw	%bx, %cx
	jne	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movzwl	%cx, %edi
	callq	_cpu_to_le16
	movl	%eax, (%r14)
	movw	$1, %ax
LBB0_5:
	movzwl	%ax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	1                               ## @port_alloc.port
_port_alloc.port:
	.short	8192                            ## 0x2000

	.no_dead_strip	_port_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_alloc
_port_alloc:                            ; @port_alloc
	.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
	bl	_DN_SK
	mov	x19, x0
	adrp	x20, _port_alloc.port@PAGE
	ldrh	w21, [x20, _port_alloc.port@PAGEOFF]
	mov	x0, x21
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w0, #1
	strh	w8, [x20, _port_alloc.port@PAGEOFF]
	and	w0, w8, #0xffff
	bl	_cpu_to_le16
	bl	_check_port
	mov	x8, x0
	ldrh	w0, [x20, _port_alloc.port@PAGEOFF]
	cbz	x8, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, w21
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	bl	_cpu_to_le16
	str	w0, [x19]
	mov	w0, #1
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	1                               ; @port_alloc.port
_port_alloc.port:
	.short	8192                            ; 0x2000

	.no_dead_strip	_port_alloc
.subsections_via_symbols
