	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpp_demangle_read_subst_stdtmpl
_cpp_demangle_read_subst_stdtmpl:       ## @cpp_demangle_read_subst_stdtmpl
	.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
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r13
	movq	%rbx, %rdi
	callq	_strlen
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	(%r13), %r15
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_cpp_demangle_read_tmpl_args
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movl	(%r15), %edx
	decl	%edx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_vector_str_substr
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movl	-56(%rbp), %eax
	leal	(%rax,%r12), %edi
	incl	%edi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	addq	%r12, %rdi
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_memcpy
	movq	-56(%rbp), %rax
	addq	%r12, %rax
	movb	$0, (%r15,%rax)
	movq	-56(%rbp), %rdx
	addq	%r12, %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_cpp_demangle_push_subst
	xorl	%r14d, %r14d
	testl	%eax, %eax
	setne	%r14b
	jmp	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_8:
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cpp_demangle_read_subst_stdtmpl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpp_demangle_read_subst_stdtmpl
_cpp_demangle_read_subst_stdtmpl:       ; @cpp_demangle_read_subst_stdtmpl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	w20, #0
	cbz	x0, LBB0_10
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_10
; %bb.2:
	mov	x19, x0
	mov	x0, x22
	bl	_strlen
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.3:
	ldr	x21, [x19]
	ldr	x23, [x21]
	mov	x0, x19
	bl	_cpp_demangle_read_tmpl_args
	cbz	w0, LBB0_7
; %bb.4:
	ldr	w8, [x21]
	sub	w2, w8, #1
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x23
	bl	_vector_str_substr
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	w8, [sp, #8]
	add	w8, w8, w20
	add	w0, w8, #1
	bl	_malloc
	mov	x23, x0
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_memcpy
	add	x0, x23, x20
	ldr	x2, [sp, #8]
	mov	x1, x21
	bl	_memcpy
	ldr	x8, [sp, #8]
	add	x8, x8, x20
	strb	wzr, [x23, x8]
	ldr	x8, [sp, #8]
	add	x2, x8, x20
	mov	x0, x19
	mov	x1, x23
	bl	_cpp_demangle_push_subst
	cmp	w0, #0
	cset	w20, ne
	b	LBB0_9
LBB0_7:
	mov	w20, #0
	b	LBB0_10
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x23
	bl	_free
	mov	x0, x21
	bl	_free
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cpp_demangle_read_subst_stdtmpl
.subsections_via_symbols
