	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_read_string             ## -- Begin function target_read_string
	.p2align	4, 0x90
_target_read_string:                    ## @target_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %ebx
	movq	%rsi, %r14
	movl	%edi, %r12d
	movl	$4, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$4, %edi
	callq	_xmalloc
	movq	%rax, %r13
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	movq	%r13, %rdi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-76(%rbp), %r14d                ## 4-byte Reload
	addl	%r15d, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%r15d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	-80(%rbp), %ebx                 ## 4-byte Reload
	subl	%r15d, %ebx
	jle	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r12d
	andl	$3, %r12d
	movl	$4, %esi
	subl	%r12d, %esi
	movl	%ebx, -80(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_MIN
	movl	%eax, %r15d
	movl	%r14d, %edi
	andl	$-4, %edi
	leaq	-84(%rbp), %rbx
	movq	%rbx, %rsi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_target_xfer_memory
	testl	%eax, %eax
	movl	%r14d, -76(%rbp)                ## 4-byte Spill
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %r15d
	xorl	%r12d, %r12d
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_target_xfer_memory
	testl	%eax, %eax
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_6
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rbx
	subq	%rdi, %rbx
	movslq	%r15d, %rax
	addq	%rbx, %rax
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movslq	%esi, %rcx
	cmpq	%rcx, %rax
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%esi, %esi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_xrealloc
	movq	%rax, %rdi
	movl	%ebx, %r13d
	addq	%rax, %r13
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
	movl	%r15d, %ecx
	leaq	(%rax,%rbp), %rdx
	addq	$-84, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdx,%rax), %ebx
	movb	%bl, (%r13,%rax)
	cmpb	$0, (%rdx,%rax)
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r13
	jmp	LBB0_14
LBB0_11:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %ecx
	incl	%ecx
	xorl	%eax, %eax
	movq	%rdi, %r13
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	testq	%r15, %r15
	jne	LBB0_18
	jmp	LBB0_19
LBB0_1:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testq	%r15, %r15
	je	LBB0_19
LBB0_18:
	movl	%eax, (%r15)
LBB0_19:
	testq	%r14, %r14
	je	LBB0_21
## %bb.20:
	movq	%r13, (%r14)
LBB0_21:
	movl	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	movq	%rdi, %r13
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%r15, %r15
	jne	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_read_string             ; -- Begin function target_read_string
	.p2align	2
_target_read_string:                    ; @target_read_string
	.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	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x24, x0
	mov	w0, #4
	bl	_xmalloc
	mov	x22, x0
	cmp	w23, #1
	b.lt	LBB0_18
; %bb.1:
	str	x19, [sp]                       ; 8-byte Folded Spill
	mov	w21, #0
	mov	w26, #4
	mov	x25, x22
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w27, w24
	sub	w23, w23, w27
	add	w21, w27, w21
	cmp	w23, #0
	b.le	LBB0_19
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	and	w28, w24, #0x3
	mov	w8, #4
	sub	w1, w8, w28
	mov	x0, x23
	bl	_MIN
	mov	x27, x0
	and	w0, w24, #0xfffffffc
	add	x1, sp, #12
	mov	w2, #4
	mov	w3, #0
	bl	_target_xfer_memory
	cbz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #1
	add	x1, sp, #12
	mov	x0, x24
	mov	w2, #1
	mov	w3, #0
	bl	_target_xfer_memory
	cbnz	w0, LBB0_20
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x19, x22, x25
	add	x8, x19, w27, sxtw
	cmp	x8, w26, sxtw
	b.le	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w26, w26, #1
	mov	x0, x25
	mov	x1, x26
	bl	_xrealloc
	mov	x25, x0
	add	x22, x0, w19, uxtw
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w27, #1
	b.lt	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, w27
	add	w8, w21, #1
	add	x10, sp, #12
	add	x10, x10, w28, uxtw
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w11, [x10]
	strb	w11, [x22]
	ldrb	w11, [x10]
	cbz	w11, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x22, x22, #1
	add	w8, w8, #1
	add	x10, x10, #1
	subs	x9, x9, #1
	b.ne	LBB0_10
	b	LBB0_2
LBB0_12:
	mov	w0, #0
	mov	x22, x25
	mov	x21, x8
LBB0_13:
	ldr	x19, [sp]                       ; 8-byte Folded Reload
	cbz	x20, LBB0_15
LBB0_14:
	str	w0, [x20]
LBB0_15:
	cbz	x19, LBB0_17
; %bb.16:
	str	x22, [x19]
LBB0_17:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	mov	w0, #0
	mov	w21, #0
	cbnz	x20, LBB0_14
	b	LBB0_15
LBB0_19:
	mov	w0, #0
LBB0_20:
	mov	x22, x25
	b	LBB0_13
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
