	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_memory_string             ## -- Begin function read_memory_string
	.p2align	4, 0x90
_read_memory_string:                    ## @read_memory_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	%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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movslq	%edx, %r15
	testl	%r15d, %r15d
	jle	LBB0_27
## %bb.1:
	movl	%edx, %r14d
	xorl	%eax, %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %r13
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rax
	subq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	cmpq	%r15, %rax
	jge	LBB0_27
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %r12d
	subl	%eax, %r12d
	cmpl	$8, %r12d
	movl	$8, %ebx
	cmovll	%r12d, %ebx
	movslq	%eax, %rdi
	addq	-56(%rbp), %rdi                 ## 8-byte Folded Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_read_memory
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, %ebx
	movl	$1, %eax
	cmovgel	%ebx, %eax
	cmpb	$0, (%r13)
	je	LBB0_28
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%r13), %rcx
	cmpl	$2, %ebx
	jl	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	2(%r13), %rcx
	cmpl	$2, %eax
	je	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	3(%r13), %rcx
	cmpl	$3, %eax
	je	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	4(%r13), %rcx
	cmpl	$4, %eax
	je	LBB0_2
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	5(%r13), %rcx
	cmpl	$5, %eax
	je	LBB0_2
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	6(%r13), %rcx
	cmpl	$6, %eax
	je	LBB0_2
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	7(%r13), %rcx
	cmpl	$7, %eax
	je	LBB0_2
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	$8, %r13
	jmp	LBB0_3
LBB0_27:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	$0, -1(%r15,%rax)
LBB0_28:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_memory_string             ; -- Begin function read_memory_string
	.p2align	2
_read_memory_string:                    ; @read_memory_string
	.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
	mov	x19, x2
	mov	x20, x1
	cmp	w2, #1
	b.lt	LBB0_21
; %bb.1:
	mov	x21, x0
	mov	x8, #0
	sxtw	x24, w19
	mov	w25, #8
	mov	x22, x20
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x8, x22, x20
	cmp	x8, x24
	b.ge	LBB0_21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w26, w19, w8
	cmp	w26, #8
	csel	w23, w26, w25, lt
	add	x0, x21, w8, sxtw
	mov	x1, x22
	mov	x2, x23
	bl	_read_memory
	cmp	w26, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #1
	csinc	w8, w23, wzr, gt
	ldrb	w9, [x22]
	cbz	w9, LBB0_22
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #1
	cmp	w23, #2
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #2
	cmp	w8, #2
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #3
	cmp	w8, #3
	b.eq	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #4
	cmp	w8, #4
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #5
	cmp	w8, #5
	b.eq	LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #6
	cmp	w8, #6
	b.eq	LBB0_2
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x9]
	cbz	w9, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x22, #7
	cmp	w8, #7
	b.eq	LBB0_2
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x9]
	cbz	w8, LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #8
	b	LBB0_3
LBB0_21:
	add	x8, x20, w19, sxtw
	sturb	wzr, [x8, #-1]
LBB0_22:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
