	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unparsestring                  ## -- Begin function unparsestring
	.p2align	4, 0x90
_unparsestring:                         ## @unparsestring
	.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, %r14
	movq	%rdi, %r12
	movl	(%rdi), %ebx
	incl	%ebx
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_max
	imull	%eax, %ebx
	movl	%ebx, %edi
	callq	_xmalloc
	movb	(%r14), %cl
	movq	%rax, %r13
	testb	%cl, %cl
	je	LBB0_2
## %bb.1:
	movq	%rax, %r13
	incq	%r13
	movb	%cl, (%rax)
LBB0_2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r12)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_17
## %bb.3:
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_7 Depth=1
	movsbq	%r15b, %rax
	movq	__toebcdic@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	__toascii@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	(%rdx,%rax,4), %rax
	orq	$64, %rax
	shlq	$2, %rax
	movzbl	(%rcx,%rax), %eax
	movb	%al, 1(%r13)
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %r13
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	movslq	(%r12), %rax
	cmpq	%rax, %r14
	jge	LBB0_17
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movzbl	(%rax,%r14), %r15d
	movsbl	%r15b, %ebx
	movl	%ebx, %edi
	callq	_Iscntrl
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movb	$94, (%r13)
	movl	$127, %edi
	callq	_CTL_ESC
	cmpb	%al, %r15b
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movb	$63, 1(%r13)
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, %eax
	andb	$-3, %al
	cmpb	$92, %al
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movb	$92, (%r13)
	movb	%r15b, 1(%r13)
	jmp	LBB0_5
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpb	$32, %r15b
	jne	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_one_wctomb
	cltq
	addq	%rax, %r13
	jmp	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	callq	_Isprint
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	callq	_Isspace
	testl	%eax, %eax
	je	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movb	$92, (%r13)
	movl	%r15d, %eax
	sarb	$6, %al
	andb	$7, %al
	orb	$48, %al
	movb	%al, 1(%r13)
	movl	%r15d, %eax
	shrb	$3, %al
	andb	$7, %al
	orb	$48, %al
	movb	%al, 2(%r13)
	andb	$7, %r15b
	orb	$48, %r15b
	movb	%r15b, 3(%r13)
	addq	$4, %r13
	jmp	LBB0_6
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpb	$0, (%rax)
	je	LBB0_20
## %bb.18:
	movb	1(%rax), %al
	testb	%al, %al
	je	LBB0_20
## %bb.19:
	movb	%al, (%r13)
	incq	%r13
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	$0, (%r13)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
	.comm	__toebcdic,8,3                  ## @_toebcdic
	.comm	__toascii,8,3                   ## @_toascii
	.comm	_CHAR,1,0                       ## @CHAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unparsestring                  ; -- Begin function unparsestring
	.p2align	2
_unparsestring:                         ; @unparsestring
	.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, x1
	mov	x22, x0
	ldr	w19, [x0]
Lloh0:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_max
	madd	w0, w0, w19, w0
	bl	_xmalloc
	ldrb	w8, [x20]
	mov	x21, x0
	cbz	w8, LBB0_2
; %bb.1:
	mov	x21, x0
	strb	w8, [x21], #1
LBB0_2:
	ldr	w8, [x22]
	cmp	w8, #1
	stp	x20, x0, [sp]                   ; 16-byte Folded Spill
	b.lt	LBB0_17
; %bb.3:
	mov	x24, #0
	mov	w25, #92
	mov	w26, #94
	mov	w27, #63
Lloh3:
	adrp	x28, __toebcdic@GOTPAGE
Lloh4:
	ldr	x28, [x28, __toebcdic@GOTPAGEOFF]
Lloh5:
	adrp	x19, __toascii@GOTPAGE
Lloh6:
	ldr	x19, [x19, __toascii@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	sxtw	x8, w23
	ldr	x9, [x28]
	ldr	x10, [x19]
	ldrsw	x8, [x10, x8, lsl #2]
	lsl	x8, x8, #2
	orr	x8, x8, #0x100
	ldr	w8, [x9, x8]
	strb	w8, [x21, #1]
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #2
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.ge	LBB0_17
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldrsb	w23, [x8, x24]
	and	w20, w23, #0xff
	mov	x0, x23
	bl	_Iscntrl
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w26, [x21]
	mov	w0, #127
	bl	_CTL_ESC
	cmp	w20, w0, uxtb
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w27, [x21, #1]
	b	LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	and	w8, w20, #0xfffffffd
	cmp	w8, #92
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	strb	w25, [x21]
	strb	w20, [x21, #1]
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	sxtb	w23, w20
	cmp	w20, #32
	b.ne	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_one_wctomb
	add	x21, x21, w0, sxtw
	b	LBB0_6
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_Isprint
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_Isspace
	cbz	w0, LBB0_13
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w25, [x21]
	mov	w8, #48
	bfxil	w8, w23, #6, #3
	strb	w8, [x21, #1]
	mov	w8, #48
	bfxil	w8, w20, #3, #3
	strb	w8, [x21, #2]
	mov	w8, #48
	bfxil	w8, w20, #0, #3
	strb	w8, [x21, #3]
	add	x21, x21, #4
	b	LBB0_6
LBB0_17:
	ldp	x9, x0, [sp]                    ; 16-byte Folded Reload
	ldrb	w8, [x9]
	cbz	w8, LBB0_20
; %bb.18:
	ldrb	w8, [x9, #1]
	cbz	w8, LBB0_20
; %bb.19:
	strb	w8, [x21], #1
LBB0_20:
	strb	wzr, [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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	__toebcdic,8,3                  ; @_toebcdic
	.comm	__toascii,8,3                   ; @_toascii
	.comm	_CHAR,1,0                       ; @CHAR
.subsections_via_symbols
