	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_server
_tcp_server:                            ## @tcp_server
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movl	%esi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	movl	%r13d, (%r12)
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_2:
	movb	$65, -41(%rbp)
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-41(%rbp), %rsi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	cmpl	$1, %eax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_5:
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	callq	_errx
LBB0_6:
	movl	$10, %edi
	callq	_sleep
	movb	$65, -41(%rbp)
	movl	(%r12), %ecx
	leaq	-41(%rbp), %rsi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_send
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	leaq	L_.str.3(%rip), %rsi
	movl	$-1, %edi
	callq	_errx
	jmp	LBB0_10
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
	movq	_EPIPE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_10
## %bb.9:
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	movl	%r13d, (%r12)
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_10:
	movl	%ebx, %edi
	callq	_close
	movl	%r14d, %edi
	callq	_close
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcp_server: accept"

	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
L_.str.1:                               ## @.str.1
	.asciz	"tcp_server: send (1)"

L_.str.2:                               ## @.str.2
	.asciz	"tcp_server: send (1) len"

L_.str.3:                               ## @.str.3
	.asciz	"tcp_server: send (2): success"

	.comm	_EPIPE,4,2                      ## @EPIPE
L_.str.4:                               ## @.str.4
	.asciz	"tcp_server: send (2)"

	.no_dead_strip	_tcp_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_server
_tcp_server:                            ; @tcp_server
	.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	x19, x1
	mov	x21, x0
	mov	x0, x1
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x22, _errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh2:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
	str	w23, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
	mov	w8, #65
	strb	w8, [sp, #15]
Lloh7:
	adrp	x22, _MSG_NOSIGNAL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MSG_NOSIGNAL@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x1, sp, #15
	mov	x0, x20
	mov	w2, #1
	bl	_send
	tbnz	w0, #31, LBB0_4
; %bb.3:
	cmp	w0, #1
	b.ne	LBB0_5
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x23, _errno@GOTPAGE
Lloh10:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	ldr	w24, [x23]
Lloh11:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
	str	w24, [x23]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_5:
Lloh16:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_6:
	mov	w0, #10
	bl	_sleep
	mov	w8, #65
	strb	w8, [sp, #15]
	ldr	w3, [x22]
	add	x1, sp, #15
	mov	x0, x20
	mov	w2, #1
	bl	_send
	tbnz	w0, #31, LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #-1
	bl	_errx
	b	LBB0_10
LBB0_8:
Lloh26:
	adrp	x22, _errno@GOTPAGE
Lloh27:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh28:
	adrp	x8, _EPIPE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w23, w8
	b.eq	LBB0_10
; %bb.9:
Lloh31:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kill
	str	w23, [x22]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_10:
	mov	x0, x20
	bl	_close
	mov	x0, x19
	bl	_close
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcp_server: accept"

	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
l_.str.1:                               ; @.str.1
	.asciz	"tcp_server: send (1)"

l_.str.2:                               ; @.str.2
	.asciz	"tcp_server: send (1) len"

l_.str.3:                               ; @.str.3
	.asciz	"tcp_server: send (2): success"

	.comm	_EPIPE,4,2                      ; @EPIPE
l_.str.4:                               ; @.str.4
	.asciz	"tcp_server: send (2)"

	.no_dead_strip	_tcp_server
.subsections_via_symbols
