	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcpstream_server
_tcpstream_server:                      ## @tcpstream_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)
	movq	_MAX_LONGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_2:
	leaq	-80(%rbp), %rsi
	movl	%r14d, %edi
	movl	$8, %edx
	callq	_bind
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_4:
	movl	%r14d, %edi
	movl	$-1, %esi
	callq	_listen
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_6:
	leaq	-56(%rbp), %r15
	leaq	-48(%rbp), %r12
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	leaq	-56(%rbp), %r15
	leaq	-48(%rbp), %r12
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_bzero
	movl	$8, -48(%rbp)
	movl	%r14d, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_accept
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %edi
	callq	_inet_ntoa
	movq	%rax, %r14
	movl	-56(%rbp), %edi
	callq	_ntohs
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_srandom
	movq	_MAX_LOOPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_MAX_LONGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=2
	incl	%edx
	cmpl	%ecx, %edx
	jge	LBB0_20
LBB0_11:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
	testl	%eax, %eax
	jle	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_11 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	_MSG_WAITALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_recv
	movl	%eax, %r14d
	cltq
	cmpq	%rax, %r15
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=3
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_check_buffer
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=3
	addl	%r14d, %r13d
	incq	%r12
	movq	_MAX_LONGS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %r15
	cmpq	%rax, %r12
	jl	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_MAX_LOOPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_stderr@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	addl	%r13d, %r14d
	leaq	L_.str.6(%rip), %rsi
	movl	%r13d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r12), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_LONGS,4,2                  ## @MAX_LONGS
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"bind: %s"

L_.str.2:                               ## @.str.2
	.asciz	"listen: %s"

L_.str.3:                               ## @.str.3
	.asciz	"accept"

L_.str.4:                               ## @.str.4
	.asciz	"connection opened from %s:%d\n"

	.comm	_MAX_LOOPS,4,2                  ## @MAX_LOOPS
	.comm	_MSG_WAITALL,4,2                ## @MSG_WAITALL
L_.str.5:                               ## @.str.5
	.asciz	"recv"

	.comm	_stderr,4,2                     ## @stderr
L_.str.6:                               ## @.str.6
	.asciz	"Corruption in block beginning %d and ending %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Block size %d\n"

L_str:                                  ## @str
	.asciz	"connection closed"

	.no_dead_strip	_tcpstream_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcpstream_server
_tcpstream_server:                      ; @tcpstream_server
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #48
	stur	x1, [x29, #-112]                ; 8-byte Folded Spill
	stur	x0, [x29, #-88]
Lloh0:
	adrp	x23, _MAX_LONGS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX_LONGS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh2:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh3:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh4:
	adrp	x8, _PF_INET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_2:
	sub	x1, x29, #88
	mov	x0, x21
	mov	w2, #8
	bl	_bind
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_4:
	mov	x0, x21
	mov	w1, #-1
	bl	_listen
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_6:
	mov	w22, #8
Lloh25:
	adrp	x19, _MAX_LOOPS@GOTPAGE
Lloh26:
	ldr	x19, [x19, _MAX_LOOPS@GOTPAGEOFF]
Lloh27:
	adrp	x27, _MSG_WAITALL@GOTPAGE
Lloh28:
	ldr	x27, [x27, _MSG_WAITALL@GOTPAGEOFF]
	stur	w21, [x29, #-116]               ; 4-byte Folded Spill
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
Lloh31:
	adrp	x0, l_str@PAGE
Lloh32:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x0, x28
	bl	_close
	ldur	w21, [x29, #-116]               ; 4-byte Folded Reload
	mov	w22, #8
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;       Child Loop BB0_16 Depth 3
	sub	x0, x29, #96
	mov	w1, #8
	bl	_bzero
	stur	w22, [x29, #-100]
	sub	x1, x29, #96
	sub	x2, x29, #100
	mov	x0, x21
	bl	_accept
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_9
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x28, x0
	ldur	w0, [x29, #-92]
	bl	_inet_ntoa
	mov	x22, x0
	ldur	w0, [x29, #-96]
	bl	_ntohs
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #-16]!
Lloh35:
	adrp	x0, l_.str.4@PAGE
Lloh36:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	ldur	x0, [x29, #-112]                ; 8-byte Folded Reload
	bl	_srandom
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w24, #0
	mov	w21, #0
	ldr	w8, [x23]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	w21, w21, #1
	cmp	w21, w9
	b.ge	LBB0_8
LBB0_14:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_16 Depth 3
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	mov	x25, #0
	mov	x26, #0
LBB0_16:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_14 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w3, [x27]
	mov	x0, x28
	mov	x1, x20
	mov	x2, x25
	bl	_recv
	cmp	x25, w0, sxtw
	b.ne	LBB0_7
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=3
	mov	x22, x0
	mov	x0, x20
	mov	x1, x26
	bl	_check_buffer
	cbz	x0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=3
	add	w24, w22, w24
	add	x26, x26, #1
	ldrsw	x8, [x23]
	add	x25, x25, #8
	cmp	x26, x8
	b.lt	LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w9, [x19]
	b	LBB0_13
LBB0_20:                                ;   in Loop: Header=BB0_9 Depth=1
Lloh37:
	adrp	x21, _stderr@GOTPAGE
Lloh38:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	ldr	w0, [x21]
	add	w8, w22, w24
	str	x8, [sp, #-16]!
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x24
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x21]
Lloh41:
	adrp	x1, l_.str.7@PAGE
Lloh42:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x2, x25
	bl	_fprintf
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_LONGS,4,2                  ; @MAX_LONGS
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"bind: %s"

l_.str.2:                               ; @.str.2
	.asciz	"listen: %s"

l_.str.3:                               ; @.str.3
	.asciz	"accept"

l_.str.4:                               ; @.str.4
	.asciz	"connection opened from %s:%d\n"

	.comm	_MAX_LOOPS,4,2                  ; @MAX_LOOPS
	.comm	_MSG_WAITALL,4,2                ; @MSG_WAITALL
l_.str.5:                               ; @.str.5
	.asciz	"recv"

	.comm	_stderr,4,2                     ; @stderr
l_.str.6:                               ; @.str.6
	.asciz	"Corruption in block beginning %d and ending %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Block size %d\n"

l_str:                                  ; @str
	.asciz	"connection closed"

	.no_dead_strip	_tcpstream_server
.subsections_via_symbols
