	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function server_listen
_server_listen:                         ## @server_listen
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_RAI_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rcx
	xorl	%edi, %edi
	movq	%rbx, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
	jmp	LBB0_8
LBB0_2:
	movq	-24(%rbp), %rax
	movl	16(%rax), %edi
	movl	8(%rax), %edx
	movl	12(%rax), %esi
	callq	_rsocket
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movl	$1, -12(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_rsetsockopt
	movl	%eax, -12(%rbp)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movl	%ebx, %edi
	callq	_rbind
	movl	%eax, -12(%rbp)
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_rlisten
	movl	%eax, -12(%rbp)
	testl	%eax, %eax
	jne	LBB0_12
LBB0_6:
	movl	%ebx, -12(%rbp)
LBB0_7:
	movq	-24(%rbp), %rdi
	callq	_freeaddrinfo
	movl	-12(%rbp), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_6
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
LBB0_13:
	callq	_perror
	movl	%ebx, %edi
	callq	_rclose
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_RAI_PASSIVE,4,2                ## @RAI_PASSIVE
	.comm	_port,4,2                       ## @port
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getaddrinfo failed: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"rsocket failed\n"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
L_.str.2:                               ## @.str.2
	.asciz	"rsetsockopt failed"

L_.str.3:                               ## @.str.3
	.asciz	"rbind failed"

L_.str.4:                               ## @.str.4
	.asciz	"rlisten failed"

	.no_dead_strip	_server_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function server_listen
_server_listen:                         ; @server_listen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh0:
	adrp	x8, _RAI_PASSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RAI_PASSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #44]
Lloh3:
	adrp	x8, _port@GOTPAGE
Lloh4:
	ldr	x8, [x8, _port@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	add	x3, sp, #16
	mov	x0, #0
	bl	_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_gai_strerror
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_8
LBB0_2:
	ldr	x8, [sp, #16]
	ldp	w1, w0, [x8, #12]
	ldr	w2, [x8, #8]
	bl	_rsocket
	mov	x19, x0
	tbnz	w0, #31, LBB0_9
; %bb.3:
	mov	w8, #1
	str	w8, [sp, #12]
Lloh8:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_rsetsockopt
	str	w0, [sp, #12]
	cbnz	w0, LBB0_10
; %bb.4:
	ldr	x8, [sp, #16]
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_rbind
	str	w0, [sp, #12]
	cbnz	w0, LBB0_11
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_rlisten
	str	w0, [sp, #12]
	cbnz	w0, LBB0_12
LBB0_6:
	str	w19, [sp, #12]
LBB0_7:
	ldr	x0, [sp, #16]
	bl	_freeaddrinfo
	ldr	w19, [sp, #12]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_6
LBB0_10:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_13:
	bl	_perror
	mov	x0, x19
	bl	_rclose
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_RAI_PASSIVE,4,2                ; @RAI_PASSIVE
	.comm	_port,4,2                       ; @port
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getaddrinfo failed: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"rsocket failed\n"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
l_.str.2:                               ; @.str.2
	.asciz	"rsetsockopt failed"

l_.str.3:                               ; @.str.3
	.asciz	"rbind failed"

l_.str.4:                               ; @.str.4
	.asciz	"rlisten failed"

	.no_dead_strip	_server_listen
.subsections_via_symbols
