	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_listen_fd                 ## -- Begin function port_listen_fd
	.p2align	4, 0x90
_port_listen_fd:                        ## @port_listen_fd
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movl	$1, -28(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	movl	%r15d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	%r14d, %edi
	callq	_htons
	movl	%eax, -36(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movl	%eax, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%r15d, %edi
	movl	$12, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_3
## %bb.6:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_os_set_fd_block
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	movl	%eax, %r14d
	jmp	LBB0_8
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r15d, %edi
	callq	_close
	movl	%r14d, %r15d
	jmp	LBB0_9
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_errno,4,2                      ## @errno
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_listen_fd                 ; -- Begin function port_listen_fd
	.p2align	2
_port_listen_fd:                        ; @port_listen_fd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x0
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #12]
Lloh6:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	tbnz	x0, #63, LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _AF_INET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x20
	bl	_htons
	str	w0, [sp, #20]
Lloh15:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_htonl
	str	w0, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_bind
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_listen
	tbnz	x0, #63, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_os_set_fd_block
	tbz	w0, #31, LBB0_9
; %bb.5:
	mov	x20, x0
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x19
	bl	_close
	mov	x19, x20
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_errno,4,2                      ; @errno
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
.subsections_via_symbols
