	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_read                    ## -- Begin function client_read
	.p2align	4, 0x90
_client_read:                           ## @client_read
	.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	_LOG_DEBUG@GOTPCREL(%rip), %r14
	movq	_linebuf@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r15
	movq	_linelen@GOTPCREL(%rip), %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movslq	(%rbx), %rsi
	movl	$8, %edx
	subq	%rsi, %rdx
	addq	16(%rbx), %rsi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	callq	_bufferevent_read
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addl	%eax, (%rbx)
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_get_line
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r14), %edi
	movl	4(%rbx), %edx
	movl	(%r13), %ecx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_logmsg
	movq	%rbx, %rdi
	callq	_client_parse
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	8(%rbx), %edi
	movl	(%r13), %esi
	movl	(%r12), %edx
	callq	_bufferevent_write
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_1
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_logmsg
LBB0_7:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_end_session                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_DEBUG,4,2                  ## @LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"#%d client: %s"

	.comm	_linebuf,4,2                    ## @linebuf
	.comm	_linelen,4,2                    ## @linelen
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"#%d client command too long or not clean"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_read                    ; -- Begin function client_read
	.p2align	2
_client_read:                           ; @client_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	mov	w24, #8
Lloh0:
	adrp	x25, _LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	adrp	x26, _linebuf@GOTPAGE
Lloh3:
	ldr	x26, [x26, _linebuf@GOTPAGEOFF]
Lloh4:
	adrp	x27, _linelen@GOTPAGE
Lloh5:
	ldr	x27, [x27, _linelen@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	ldrsw	x8, [x19]
	sub	x22, x24, x8
	ldr	x9, [x19, #16]
	add	x1, x9, x8
	mov	x0, x20
	mov	x2, x22
	bl	_bufferevent_read
	mov	x23, x0
	ldr	w8, [x19]
	add	w8, w8, w23
	str	w8, [x19]
	ldr	x0, [x19, #16]
	mov	x1, x19
	bl	_get_line
	cmp	w0, #1
	b.lt	LBB0_4
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25]
	ldr	w2, [x19, #4]
	ldr	w8, [x26]
	str	x8, [sp]
	mov	x1, x21
	bl	_logmsg
	mov	x0, x19
	bl	_client_parse
	cbz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w0, [x19, #8]
	ldr	w1, [x26]
	ldr	w2, [x27]
	bl	_bufferevent_write
	ldr	x0, [x19, #16]
	mov	x1, x19
	bl	_get_line
	cmp	w0, #0
	b.gt	LBB0_2
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	x23, x22
	b.eq	LBB0_1
; %bb.6:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
Lloh8:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_logmsg
LBB0_8:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_end_session
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_DEBUG,4,2                  ; @LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"#%d client: %s"

	.comm	_linebuf,4,2                    ; @linebuf
	.comm	_linelen,4,2                    ; @linelen
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"#%d client command too long or not clean"

.subsections_via_symbols
