	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_reader                  ## -- Begin function client_reader
	.p2align	4, 0x90
_client_reader:                         ## @client_reader
	.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
	movq	%rdi, %r15
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_get_client_gather
	movq	%r15, %rdi
	callq	_client_read_special
LBB0_4:
	leaq	12(%r15), %r14
	movq	%r14, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_get_write_ptr
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_get_write_space
	testl	%eax, %eax
	jg	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_free_all_buffers
	movl	$8, 4(%r15)
	movq	%r14, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_get_write_ptr
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_get_write_space
LBB0_6:
	movl	%eax, %r13d
	testq	%r12, %r12
	setne	%al
	testl	%r13d, %r13d
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_C_NORD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	xorl	%ebx, %ebx
	testl	%eax, 8(%r15)
	je	LBB0_7
## %bb.12:
	cmpl	%r13d, %ebx
	jl	LBB0_13
LBB0_14:
	testl	%ebx, %ebx
	jle	LBB0_17
LBB0_15:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_advance_write_ptr
	cmpq	$0, 16(%r15)
	je	LBB0_19
## %bb.16:
	movq	%r15, %rdi
	callq	_get_client_gather
	movq	%r15, %rdi
	callq	_client_read_special
	xorl	%ebx, %ebx
	jmp	LBB0_36
LBB0_7:
	movl	(%r15), %edi
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_recv
	movl	%eax, %ebx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movq	%r12, %r9
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_11
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_11:
	movq	_C_NORD@GOTPCREL(%rip), %rcx
	cmpl	%r13d, %ebx
	jge	LBB0_14
LBB0_13:
	movl	(%rcx), %eax
	orl	%eax, 8(%r15)
	testl	%ebx, %ebx
	jg	LBB0_15
LBB0_17:
	cmpq	$0, 16(%r15)
	je	LBB0_19
## %bb.18:
	movq	_C_WANTRD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r15)
	movl	$2, %ebx
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%eax, %r13d
	cmpl	$1024, %eax                     ## imm = 0x400
	movl	$1024, %r12d                    ## imm = 0x400
	cmovll	%eax, %r12d
	testl	%eax, %eax
	jle	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movslq	%r12d, %rax
	addq	%rbx, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$10, (%rbx,%rdx)
	je	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=2
	leaq	(%rbx,%rdx), %rcx
	incq	%rcx
	incq	%rdx
	cmpq	%rax, %rcx
	jb	LBB0_23
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_19 Depth=1
	leaq	(%rbx,%rdx), %rax
	leaq	1(%rdx), %r12
	movb	$0, (%rbx,%rdx)
	cmpq	%rbx, %rax
	jbe	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpb	$13, -1(%rbx,%rdx)
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_19 Depth=1
	movb	$0, -1(%rbx,%rdx)
	decl	%edx
LBB0_33:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_client_execute
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_advance_read_ptr
	testl	%ebx, %ebx
	js	LBB0_34
## %bb.35:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	callq	_free_unused_buffers
	testl	%ebx, %ebx
	jne	LBB0_36
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
	movq	%r14, %rdi
	callq	_get_read_ptr
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_get_ready_bytes
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	xorl	%ebx, %ebx
	jmp	LBB0_36
LBB0_25:
	cmpl	$1024, %r12d                    ## imm = 0x400
	jl	LBB0_29
## %bb.26:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_28
## %bb.27:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_28:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_advance_read_ptr
	movl	$-1, %ebx
	jmp	LBB0_36
LBB0_29:
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_force_ready_bytes
	xorl	%ebx, %ebx
	cmpl	%r13d, %eax
	setle	%bl
	negl	%ebx
LBB0_36:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	movl	$-1, %ebx
	jmp	LBB0_36
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in client_reader(%d)\n"

	.comm	_C_NORD,4,2                     ## @C_NORD
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
L_.str.1:                               ## @.str.1
	.asciz	"recv() from %d: %d read out of %d at %p\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"recv()"

	.comm	_C_WANTRD,4,2                   ## @C_WANTRD
L_.str.3:                               ## @.str.3
	.asciz	"client socket #%d: command line longer than 1024 bytes\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_reader                  ; -- Begin function client_reader
	.p2align	2
_client_reader:                         ; @client_reader
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x24, _verbosity@GOTPAGE
Lloh1:
	ldr	x24, [x24, _verbosity@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_get_client_gather
	mov	x0, x19
	bl	_client_read_special
LBB0_4:
	add	x20, x19, #12
	mov	x0, x20
	mov	w1, #512
	bl	_get_write_ptr
	mov	x23, x0
	mov	x0, x20
	bl	_get_write_space
	cmp	w0, #0
	b.gt	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_free_all_buffers
	mov	w8, #8
	str	w8, [x19, #4]
	mov	x0, x20
	mov	w1, #512
	bl	_get_write_ptr
	mov	x23, x0
	mov	x0, x20
	bl	_get_write_space
LBB0_6:
	mov	x21, x0
	cmp	x23, #0
	ccmp	w0, #0, #4, ne
	cset	w0, gt
	bl	_assert
	ldr	w8, [x19, #8]
Lloh7:
	adrp	x25, _C_NORD@GOTPAGE
Lloh8:
	ldr	x25, [x25, _C_NORD@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.7:
	mov	w22, #0
LBB0_8:
	cmp	w22, w21
	b.ge	LBB0_10
; %bb.9:
	ldr	w8, [x25]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_10:
	cmp	w22, #1
	b.lt	LBB0_17
; %bb.11:
	mov	x0, x20
	mov	x1, x22
	bl	_advance_write_ptr
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_29
; %bb.12:
	mov	x0, x19
	bl	_get_client_gather
	mov	x0, x19
	bl	_client_read_special
	mov	w21, #0
	b	LBB0_36
LBB0_13:
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _MSG_DONTWAIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x1, x23
	mov	x2, x21
	bl	_recv
	mov	x22, x0
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.14:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x19]
	stp	x21, x23, [sp, #8]
	str	x22, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	tbz	w22, #31, LBB0_8
; %bb.15:
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.16:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	b	LBB0_8
LBB0_17:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_29
; %bb.18:
Lloh25:
	adrp	x8, _C_WANTRD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _C_WANTRD@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	mov	w21, #2
	b	LBB0_36
LBB0_19:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x23, x0
	mov	w8, #1024
	cmp	w0, #1024
	csel	w22, w0, w8, lt
	cmp	w0, #1
	b.lt	LBB0_31
; %bb.20:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x8, #0
	add	x9, x21, w22, sxtw
LBB0_21:                                ;   Parent Loop BB0_29 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w10, [x21, x8]
	cmp	w10, #10
	b.eq	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	add	x8, x8, #1
	add	x10, x21, x8
	cmp	x10, x9
	b.lo	LBB0_21
	b	LBB0_31
LBB0_23:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x9, x21, x8
	cmp	x9, x21
	strb	wzr, [x9]
	b.ls	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_29 Depth=1
	ldurb	w10, [x9, #-1]
	cmp	w10, #13
	b.ne	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_29 Depth=1
	sturb	wzr, [x9, #-1]
	sub	w2, w8, #1
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x2, x8
LBB0_27:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x22, x8, #1
	mov	x0, x19
	mov	x1, x21
	bl	_client_execute
	mov	x21, x0
	mov	x0, x20
	mov	x1, x22
	bl	_advance_read_ptr
	tbnz	w21, #31, LBB0_37
; %bb.28:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x20
	bl	_free_unused_buffers
	cbnz	w21, LBB0_36
LBB0_29:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	mov	x0, x20
	bl	_get_read_ptr
	mov	x21, x0
	mov	x0, x20
	bl	_get_ready_bytes
	cbnz	w0, LBB0_19
; %bb.30:
	mov	w21, #0
	b	LBB0_36
LBB0_31:
	cmp	w22, #1024
	b.lt	LBB0_35
; %bb.32:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.33:
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
LBB0_34:
	mov	x0, x20
	mov	x1, x22
	bl	_advance_read_ptr
	mov	w21, #-1
	b	LBB0_36
LBB0_35:
	mov	x0, x20
	mov	w1, #1024
	bl	_force_ready_bytes
	cmp	w0, w23
	csetm	w21, le
LBB0_36:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_37:
	mov	w21, #-1
	b	LBB0_36
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in client_reader(%d)\n"

	.comm	_C_NORD,4,2                     ; @C_NORD
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
l_.str.1:                               ; @.str.1
	.asciz	"recv() from %d: %d read out of %d at %p\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"recv()"

	.comm	_C_WANTRD,4,2                   ; @C_WANTRD
l_.str.3:                               ; @.str.3
	.asciz	"client socket #%d: command line longer than 1024 bytes\n"

.subsections_via_symbols
