	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acceptor
_acceptor:                              ## @acceptor
	.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	_AF_INET@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movl	$16, -56(%rbp)
	movl	(%r14), %eax
	movl	%eax, -44(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movl	%eax, -48(%rbp)
	movq	_TEST_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	_EVF_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_acceptor_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	callq	_mevent_add
	movq	_accept_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	_accept_condvar@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	testl	%eax, %eax
	je	LBB0_7
LBB0_14:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_accept_condvar@GOTPCREL(%rip), %r15
	movq	_accept_mutex@GOTPCREL(%rip), %r12
	leaq	-60(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r13d
	cmpb	$0, _acceptor.first.4(%rip)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movb	$1, _acceptor.first.4(%rip)
	movq	_EVF_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_timer_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	callq	_mevent_add
	movq	_tevp@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_echoer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pthread_create
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_pthread_cond_wait
	testl	%eax, %eax
	je	LBB0_8
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	jmp	LBB0_13
LBB0_1:
	callq	_acceptor.cold.1
	jmp	LBB0_14
LBB0_3:
	callq	_acceptor.cold.2
	jmp	LBB0_14
LBB0_5:
	callq	_acceptor.cold.3
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function acceptor.cold.1
_acceptor.cold.1:                       ## @acceptor.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$4
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function acceptor.cold.2
_acceptor.cold.2:                       ## @acceptor.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	pushq	$4
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function acceptor.cold.3
_acceptor.cold.3:                       ## @acceptor.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$4
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create socket"

	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_TEST_PORT,4,2                  ## @TEST_PORT
L_.str.1:                               ## @.str.1
	.asciz	"cannot bind socket"

L_.str.2:                               ## @.str.2
	.asciz	"cannot listen socket"

	.comm	_EVF_READ,4,2                   ## @EVF_READ
	.comm	_acceptor_callback,4,2          ## @acceptor_callback
	.comm	_accept_mutex,4,2               ## @accept_mutex
	.comm	_accept_condvar,4,2             ## @accept_condvar
L_.str.3:                               ## @.str.3
	.asciz	"accept error"

.zerofill __DATA,__bss,_acceptor.first.4,1,2 ## @acceptor.first.4
	.comm	_EVF_TIMER,4,2                  ## @EVF_TIMER
	.comm	_timer_callback,4,2             ## @timer_callback
	.comm	_tevp,4,2                       ## @tevp
	.comm	_echoer,4,2                     ## @echoer
L_str:                                  ## @str
	.asciz	"incoming connection, spawning thread"

	.no_dead_strip	_acceptor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acceptor
_acceptor:                              ; @acceptor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x20, _AF_INET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_12
; %bb.1:
	mov	x19, x0
	mov	w8, #16
	ldr	w9, [x20]
	str	w8, [sp, #16]
	str	w9, [sp, #28]
Lloh5:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_htonl
	str	w0, [sp, #24]
Lloh8:
	adrp	x8, _TEST_PORT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TEST_PORT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [sp, #20]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	tbnz	x0, #63, LBB0_13
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_listen
	tbnz	x0, #63, LBB0_14
; %bb.3:
Lloh11:
	adrp	x8, _EVF_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EVF_READ@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _acceptor_callback@GOTPAGE
Lloh15:
	ldr	x8, [x8, _acceptor_callback@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, #0
	bl	_mevent_add
Lloh17:
	adrp	x20, _accept_mutex@GOTPAGE
Lloh18:
	ldr	x20, [x20, _accept_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_pthread_mutex_lock
Lloh19:
	adrp	x0, _accept_condvar@GOTPAGE
Lloh20:
	ldr	x0, [x0, _accept_condvar@GOTPAGEOFF]
	mov	x1, x20
	bl	_pthread_cond_wait
	cbz	w0, LBB0_5
LBB0_4:
	mov	x0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
Lloh21:
	adrp	x20, _accept_condvar@GOTPAGE
Lloh22:
	ldr	x20, [x20, _accept_condvar@GOTPAGEOFF]
Lloh23:
	adrp	x21, _accept_mutex@GOTPAGE
Lloh24:
	ldr	x21, [x21, _accept_mutex@GOTPAGEOFF]
	adrp	x25, _acceptor.first.4@PAGE
Lloh25:
	adrp	x27, _echoer@GOTPAGE
Lloh26:
	ldr	x27, [x27, _echoer@GOTPAGEOFF]
Lloh27:
	adrp	x28, _EVF_TIMER@GOTPAGE
Lloh28:
	ldr	x28, [x28, _EVF_TIMER@GOTPAGEOFF]
Lloh29:
	adrp	x22, _timer_callback@GOTPAGE
Lloh30:
	ldr	x22, [x22, _timer_callback@GOTPAGEOFF]
Lloh31:
	adrp	x23, l_str@PAGE
Lloh32:
	add	x23, x23, l_str@PAGEOFF
Lloh33:
	adrp	x26, _tevp@GOTPAGE
Lloh34:
	ldr	x26, [x26, _tevp@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	tbnz	w0, #31, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	ldrb	w8, [x25, _acceptor.first.4@PAGEOFF]
	tbnz	w8, #0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
	strb	w8, [x25, _acceptor.first.4@PAGEOFF]
	ldr	w1, [x28]
	ldr	w2, [x22]
	mov	w0, #1
	mov	x3, #0
	bl	_mevent_add
	str	w0, [x26]
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_puts
	ldr	w2, [x27]
	mov	w3, w24
	add	x0, sp, #12
	mov	x1, #0
	bl	_pthread_create
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_pthread_cond_wait
	cbz	w0, LBB0_6
	b	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_10
LBB0_12:
	bl	_acceptor.cold.1
LBB0_13:
	bl	_acceptor.cold.2
LBB0_14:
	bl	_acceptor.cold.3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function acceptor.cold.1
_acceptor.cold.1:                       ; @acceptor.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh37:
	adrp	x0, l_.str@PAGE
Lloh38:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function acceptor.cold.2
_acceptor.cold.2:                       ; @acceptor.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh39:
	adrp	x0, l_.str.1@PAGE
Lloh40:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function acceptor.cold.3
_acceptor.cold.3:                       ; @acceptor.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh41:
	adrp	x0, l_.str.2@PAGE
Lloh42:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function OUTLINED_FUNCTION_0
_OUTLINED_FUNCTION_0:                   ; @OUTLINED_FUNCTION_0 Thunk
	.cfi_startproc
; %bb.0:
	mov	w0, #4
	b	_exit
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create socket"

	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_TEST_PORT,4,2                  ; @TEST_PORT
l_.str.1:                               ; @.str.1
	.asciz	"cannot bind socket"

l_.str.2:                               ; @.str.2
	.asciz	"cannot listen socket"

	.comm	_EVF_READ,4,2                   ; @EVF_READ
	.comm	_acceptor_callback,4,2          ; @acceptor_callback
	.comm	_accept_mutex,4,2               ; @accept_mutex
	.comm	_accept_condvar,4,2             ; @accept_condvar
l_.str.3:                               ; @.str.3
	.asciz	"accept error"

.zerofill __DATA,__bss,_acceptor.first.4,1,2 ; @acceptor.first.4
	.comm	_EVF_TIMER,4,2                  ; @EVF_TIMER
	.comm	_timer_callback,4,2             ; @timer_callback
	.comm	_tevp,4,2                       ; @tevp
	.comm	_echoer,4,2                     ; @echoer
l_str:                                  ; @str
	.asciz	"incoming connection, spawning thread"

	.no_dead_strip	_acceptor
.subsections_via_symbols
