	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_gets
_buffer_gets:                           ## @buffer_gets
	.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	%rsi, %r14
	movq	%rdi, %r12
	movslq	(%rdi), %rax
	movq	%rax, %rcx
	addq	8(%rdi), %rcx
	movq	%rcx, (%rsi)
	leaq	20(%rdi), %r15
	movl	%eax, %r13d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, (%r12)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rax), %ecx
	movl	16(%r12), %ebx
	cmpl	%ebx, %ecx
	jl	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rax
	movq	%rax, (%r14)
	xorl	%edi, %edi
	cmpl	%ebx, %r13d
	setle	%dil
	callq	_assert
	movl	16(%r12), %ebx
	subl	%r13d, %ebx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rdi
	movslq	%r13d, %rsi
	addq	%rdi, %rsi
	movl	%ebx, %edx
	callq	_memmove
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	subl	%r13d, (%r12)
	movl	%ebx, 16(%r12)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%ebx, %rax
	movq	8(%r12), %rsi
	addq	%rax, %rsi
	movl	$8, %edx
	subl	%eax, %edx
	movq	%r15, %rdi
	callq	_socket_read
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	addl	16(%r12), %ebx
	movl	%ebx, 16(%r12)
	movl	(%r12), %eax
	xorl	%r13d, %r13d
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rcx
	movslq	%eax, %rdx
	leal	1(%rdx), %eax
	cmpb	$13, (%rcx,%rdx)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setl	%dil
	callq	_assert
	movq	8(%r12), %rcx
	movslq	(%r12), %rax
	cmpb	$10, 1(%rcx,%rax)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	incq	%rax
	jmp	LBB0_12
LBB0_7:
	movl	$-1, %ebx
	jmp	LBB0_15
LBB0_13:
	movb	$0, (%rcx,%rax)
	addl	$2, (%r12)
	movq	_verbosity@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	jle	LBB0_15
## %bb.14:
	movq	(%r14), %rdi
	callq	_puts
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,8,3                  ## @verbosity
	.no_dead_strip	_buffer_gets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_gets
_buffer_gets:                           ; @buffer_gets
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldrsw	x24, [x0]
	ldr	x8, [x0, #8]
	add	x8, x8, x24
	str	x8, [x1]
	add	x21, x0, #20
	mov	w23, #8
	mov	x8, x24
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	w8, [x20]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w8, #1
	ldr	w22, [x20, #16]
	cmp	w9, w22
	b.lt	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w24, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #8]
	str	x8, [x19]
	cmp	w24, w22
	cset	w0, le
	bl	_assert
	ldr	w8, [x20, #16]
	subs	w22, w8, w24
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, #8]
	add	x1, x0, w24, sxtw
	mov	x2, x22
	bl	_memmove
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x20]
	sub	w8, w8, w24
	str	w8, [x20]
	str	w22, [x20, #16]
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, w22, sxtw
	sub	w2, w23, w22
	mov	x0, x21
	bl	_socket_read
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w24, #0
	ldr	w8, [x20, #16]
	add	w22, w8, w0
	str	w22, [x20, #16]
	ldr	w8, [x20]
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x20, #8]
	ldrb	w9, [x9, w8, sxtw]
	add	w8, w8, #1
	cmp	w9, #13
	b.ne	LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w22
	cset	w0, lt
	bl	_assert
	ldr	x9, [x20, #8]
	ldrsw	x10, [x20]
	add	x8, x10, #1
	ldrb	w11, [x9, x8]
	cmp	w11, #10
	b.ne	LBB0_1
; %bb.11:
	strb	wzr, [x9, x10]
	ldr	w8, [x20]
	add	w8, w8, #2
	str	w8, [x20]
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_13
; %bb.12:
	ldr	x0, [x19]
	bl	_puts
LBB0_13:
	mov	w0, #0
	b	LBB0_15
LBB0_14:
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.no_dead_strip	_buffer_gets
.subsections_via_symbols
