	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcpstream_client
_tcpstream_client:                      ## @tcpstream_client
	.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, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%edi, -56(%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, %r15
	movq	%rbx, %rdi
	callq	_srandom
	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	-56(%rbp), %rsi
	movl	%r14d, %edi
	movl	$4, %edx
	callq	_connect
	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:
	movq	_MAX_LOOPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.5:
	movq	_MAX_LONGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%r13d
	cmpl	%ecx, %r13d
	jge	LBB0_13
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	testl	%eax, %eax
	jle	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fill_buffer
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_send
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=2
	incl	%ebx
	movq	_MAX_LONGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$8, %r12d
	cmpl	%eax, %ebx
	jl	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_MAX_LOOPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_12
LBB0_10:
	movl	%r12d, %edi
	callq	_tcpstream_client.cold.1
LBB0_13:
	movl	%r14d, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function tcpstream_client.cold.1
_tcpstream_client.cold.1:               ## @tcpstream_client.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
	movl	%edi, %edx
	leaq	L_.str.2(%rip), %rdi
	pushq	$-1
	popq	%rsi
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	popq	%rbp
	retq
	.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	"connect: %s"

	.comm	_MAX_LOOPS,4,2                  ## @MAX_LOOPS
L_.str.2:                               ## @.str.2
	.asciz	"%d bytes written of %d expected\n"

	.comm	_stdout,4,2                     ## @stdout
L_.str.3:                               ## @.str.3
	.asciz	"send"

	.no_dead_strip	_tcpstream_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcpstream_client
_tcpstream_client:                      ; @tcpstream_client
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	stur	w0, [x29, #-80]
Lloh3:
	adrp	x23, _MAX_LONGS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX_LONGS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	mov	x0, x1
	bl	_srandom
Lloh7:
	adrp	x8, _PF_INET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_2:
	sub	x1, x29, #80
	mov	x0, x20
	mov	w2, #4
	bl	_connect
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_4:
Lloh23:
	adrp	x24, _MAX_LOOPS@GOTPAGE
Lloh24:
	ldr	x24, [x24, _MAX_LOOPS@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.5:
	mov	w25, #0
	ldr	w8, [x23]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #1
	cmp	w25, w9
	b.ge	LBB0_13
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w21, #0
	mov	w22, #0
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x22
	bl	_fill_buffer
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	w3, #0
	bl	_send
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w22, w22, #1
	ldr	w8, [x23]
	add	w21, w21, #8
	cmp	w22, w8
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x24]
	b	LBB0_6
LBB0_12:
	mov	x0, x21
	bl	_tcpstream_client.cold.1
LBB0_13:
	mov	x0, x20
	bl	_close
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function tcpstream_client.cold.1
_tcpstream_client.cold.1:               ; @tcpstream_client.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
	mov	x2, x0
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	w1, #-1
	bl	_printf
Lloh30:
	adrp	x8, _stdout@GOTPAGE
Lloh31:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_fflush
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.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	"connect: %s"

	.comm	_MAX_LOOPS,4,2                  ; @MAX_LOOPS
l_.str.2:                               ; @.str.2
	.asciz	"%d bytes written of %d expected\n"

	.comm	_stdout,4,2                     ; @stdout
l_.str.3:                               ; @.str.3
	.asciz	"send"

	.no_dead_strip	_tcpstream_client
.subsections_via_symbols
