	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_LISTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_usage
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_getopt
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$108, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$112, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atoi
	movl	%eax, %r12d
	jmp	LBB0_1
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atoi
	movl	%eax, %r14d
	jmp	LBB0_1
LBB0_7:
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_bzero
	movl	$16, -56(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	%r12d, %edi
	callq	_htons
	movl	%eax, -48(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	(%rbx), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	movl	%eax, %edi
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_err
LBB0_9:
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_err
LBB0_11:
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movq	_RECV_LIMIT@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	js	LBB0_16
## %bb.12:
	cmpl	$0, (%r12)
	jle	LBB0_16
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	callq	_close
	incl	%ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	js	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	(%r12), %ebx
	jl	LBB0_14
LBB0_16:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_listen
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	js	LBB0_20
## %bb.17:
	incl	%r14d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	addl	%r14d, %ecx
	cmpl	%ecx, %ebx
	jg	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%eax, %edi
	callq	_close
	incl	%ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	jns	LBB0_18
LBB0_20:
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rdi
	cmovnsq	%rax, %rdi
	movl	%ebx, %esi
	callq	_printf
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT,4,2                       ## @PORT
	.comm	_LISTEN,4,2                     ## @LISTEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p:l:"

	.comm	_optarg,4,2                     ## @optarg
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
L_.str.1:                               ## @.str.1
	.asciz	"Could not bind to INADDR_ANY:%d"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to listen with depth of %d\n"

	.comm	_RECV_LIMIT,4,2                 ## @RECV_LIMIT
L_.str.3:                               ## @.str.3
	.asciz	"Late connection at %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"recvd %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _LISTEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LISTEN@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	ldr	w19, [x9]
Lloh6:
	adrp	x23, l_.str@PAGE
Lloh7:
	add	x23, x23, l_.str@PAGEOFF
Lloh8:
	adrp	x24, _optarg@GOTPAGE
Lloh9:
	ldr	x24, [x24, _optarg@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_usage
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	bl	_getopt
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #108
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #112
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	bl	_atoi
	mov	x21, x0
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	bl	_atoi
	mov	x19, x0
	b	LBB0_2
LBB0_7:
	mov	w20, #16
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
Lloh10:
	adrp	x22, _AF_INET@GOTPAGE
Lloh11:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w8, [x22]
	str	w20, [sp]
	str	w8, [sp, #12]
	mov	x0, x21
	bl	_htons
Lloh12:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #4]
	ldr	w0, [x22]
Lloh15:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	mov	x1, sp
	mov	w2, #16
	bl	_bind
	tbz	x0, #63, LBB0_9
; %bb.8:
Lloh18:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_err
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_listen
	tbz	x0, #63, LBB0_11
; %bb.10:
Lloh23:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_11:
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	mov	w21, #0
Lloh28:
	adrp	x22, _RECV_LIMIT@GOTPAGE
Lloh29:
	ldr	x22, [x22, _RECV_LIMIT@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_16
; %bb.12:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.13:
	mov	w21, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	bl	_close
	add	w21, w21, #1
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	tbnz	w0, #31, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_14
LBB0_16:
	mov	x0, x20
	mov	w1, #0
	bl	_listen
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	tbnz	w0, #31, LBB0_20
; %bb.17:
	add	w19, w19, #1
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	add	w8, w19, w8
	cmp	w21, w8
	b.gt	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_close
	add	w21, w21, #1
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	tbz	w0, #31, LBB0_18
LBB0_20:
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
Lloh30:
	adrp	x8, l_.str.4@PAGE
Lloh31:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh32:
	adrp	x9, l_.str.3@PAGE
Lloh33:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w0, #0
	csel	x0, x9, x8, ge
	mov	x1, x21
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT,4,2                       ; @PORT
	.comm	_LISTEN,4,2                     ; @LISTEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p:l:"

	.comm	_optarg,4,2                     ; @optarg
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
l_.str.1:                               ; @.str.1
	.asciz	"Could not bind to INADDR_ANY:%d"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to listen with depth of %d\n"

	.comm	_RECV_LIMIT,4,2                 ; @RECV_LIMIT
l_.str.3:                               ; @.str.3
	.asciz	"Late connection at %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"recvd %d\n"

.subsections_via_symbols
