	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_on_signal@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_signal
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_signal
	movl	$8080, %edi                     ## imm = 0x1F90
	callq	_sm_listen
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	$4096, %edi                     ## imm = 0x1000
	callq	_sm_new
	movq	%rax, %rbx
	movq	_on_accept@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_on_recv@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_on_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	$4, %edi
	callq	_malloc
	movslq	%eax, %r15
	movl	$8080, (%r15)                   ## imm = 0x1F90
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	movl	$1, %r8d
	callq	*16(%rbx)
	movq	_quit_flag@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	*(%rbx)
	testq	%rax, %rax
	jns	LBB0_3
## %bb.5:
	movl	$-1, %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_sm_free
	jmp	LBB0_7
LBB0_1:
	movl	$-1, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_on_signal,4,2                  ## @on_signal
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_on_accept,4,2                  ## @on_accept
	.comm	_on_recv,4,2                    ## @on_recv
	.comm	_on_close,4,2                   ## @on_close
	.comm	_quit_flag,4,2                  ## @quit_flag
	.comm	_stderr,4,2                     ## @stderr
.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:
	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
Lloh0:
	adrp	x8, _SIGINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x19, _on_signal@GOTPAGE
Lloh4:
	ldr	x19, [x19, _on_signal@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_signal
Lloh5:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_signal
	mov	w22, #8080
	mov	w0, #8080
	bl	_sm_listen
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x21, x0
	mov	w0, #4096
	bl	_sm_new
	mov	x19, x0
Lloh8:
	adrp	x8, _on_accept@GOTPAGE
Lloh9:
	ldr	x8, [x8, _on_accept@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0, #32]
Lloh11:
	adrp	x8, _on_recv@GOTPAGE
Lloh12:
	ldr	x8, [x8, _on_recv@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _on_close@GOTPAGE
Lloh15:
	ldr	x9, [x9, _on_close@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	mov	w0, #4
	bl	_malloc
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
	str	w22, [x20]
	ldr	x8, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	mov	x3, x20
	mov	w4, #1
	blr	x8
Lloh17:
	adrp	x21, _quit_flag@GOTPAGE
Lloh18:
	ldr	x21, [x21, _quit_flag@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	mov	x0, x19
	mov	w1, #2
	blr	x8
	tbz	x0, #63, LBB0_2
; %bb.4:
	mov	w21, #-1
	b	LBB0_7
LBB0_5:
	mov	w21, #-1
	b	LBB0_8
LBB0_6:
	mov	w21, #0
LBB0_7:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_sm_free
LBB0_8:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_on_signal,4,2                  ; @on_signal
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_on_accept,4,2                  ; @on_accept
	.comm	_on_recv,4,2                    ; @on_recv
	.comm	_on_close,4,2                   ; @on_close
	.comm	_quit_flag,4,2                  ; @quit_flag
	.comm	_stderr,4,2                     ; @stderr
.subsections_via_symbols
