	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_read_string
_buffer_read_string:                    ## @buffer_read_string
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	-33(%rbp), %rsi
	callq	_buffer_read_char
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_7
## %bb.1:
	movzbl	-33(%rbp), %esi
	movl	%esi, (%r12)
	cmpl	$255, %esi
	je	LBB0_7
## %bb.2:
	cmpb	$-2, %sil
	jne	LBB0_5
## %bb.3:
	movl	$0, (%r12)
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_buffer_read_data
	testq	%rax, %rax
	js	LBB0_7
## %bb.4:
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_memcpy
	movl	(%r12), %esi
LBB0_5:
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_buffer_read_data
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_buffer_read_pad
	movl	$1, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_buffer_read_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_read_string
_buffer_read_string:                    ; @buffer_read_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x1, sp, #15
	bl	_buffer_read_char
	tbnz	x0, #63, LBB0_7
; %bb.1:
	ldrb	w1, [sp, #15]
	str	w1, [x21]
	cmp	w1, #255
	b.eq	LBB0_7
; %bb.2:
	cmp	w1, #254
	b.ne	LBB0_5
; %bb.3:
	str	wzr, [x21]
	mov	x2, sp
	mov	x0, x19
	mov	w1, #3
	bl	_buffer_read_data
	tbnz	x0, #63, LBB0_7
; %bb.4:
	ldr	x1, [sp]
	mov	x0, x21
	mov	w2, #3
	bl	_memcpy
	ldr	w1, [x21]
LBB0_5:
	mov	x0, x19
	mov	x2, x20
	bl	_buffer_read_data
	tbnz	x0, #63, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_buffer_read_pad
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_buffer_read_string
.subsections_via_symbols
