	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apply_subst_template           ## -- Begin function apply_subst_template
	.p2align	4, 0x90
_apply_subst_template:                  ## @apply_subst_template
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	_rhbufi@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_22
## %bb.1:
	movq	_rhbuf@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	leaq	3(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_rbuf@GOTPCREL(%rip), %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rdi
	movq	_rbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	1(%r12), %r13d
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edx
	callq	_REALLOC
	movb	(%r14), %al
	movq	(%r15), %rcx
	movslq	%r12d, %rdx
	movb	%al, (%rcx,%rdx)
	movl	%r13d, %r12d
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	%r14, %rax
	movq	_rhbuf@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_22
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
	movb	(%r14), %al
	cmpb	$92, %al
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$38, %al
	jne	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rbx
	movslq	4(%rax), %r13
	movq	(%r15), %rdi
	movq	_rbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	subl	%ebx, %edx
	addl	%r13d, %edx
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_REALLOC
	cmpl	%r13d, %ebx
	jge	LBB0_19
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r12d, %r12
	movl	%r13d, %ecx
	subl	%ebx, %ecx
	movq	%rbx, %rax
	notq	%rax
	addq	%r13, %rax
	andq	$3, %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdi,%rbx), %edx
	incq	%rbx
	movq	(%r15), %rsi
	movb	%dl, (%rsi,%r12)
	incq	%r12
	decq	%rcx
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$3, %rax
	jb	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	subq	%rbx, %r13
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-3(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, (%rax,%rdx)
	movzbl	-2(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 1(%rax,%rdx)
	movzbl	-1(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 2(%rax,%rdx)
	movzbl	(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 3(%rax,%rdx)
	addq	$4, %rax
	cmpq	%rax, %r13
	jne	LBB0_9
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %r12
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%r14), %eax
	incq	%r14
	leal	-49(%rax), %ecx
	cmpb	$8, %cl
	ja	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	$-48, %eax
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jg	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx,%rax,8), %rbx
	movslq	4(%rcx,%rax,8), %r13
	movq	(%r15), %rdi
	movq	_rbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	subl	%ebx, %edx
	addl	%r13d, %edx
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_REALLOC
	cmpl	%r13d, %ebx
	jge	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r12d, %r12
	movl	%r13d, %ecx
	subl	%ebx, %ecx
	movq	%rbx, %rax
	notq	%rax
	addq	%r13, %rax
	andq	$3, %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdi,%rbx), %edx
	incq	%rbx
	movq	(%r15), %rsi
	movb	%dl, (%rsi,%r12)
	incq	%r12
	decq	%rcx
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$3, %rax
	jae	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_rhbufi@GOTPCREL(%rip), %rbx
	jmp	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	subq	%rbx, %r13
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-3(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, (%rax,%rdx)
	movzbl	-2(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 1(%rax,%rdx)
	movzbl	-1(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 2(%rax,%rdx)
	movzbl	(%rbx,%rax), %ecx
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movb	%cl, 3(%rax,%rdx)
	addq	$4, %rax
	cmpq	%rax, %r13
	jne	LBB0_17
	jmp	LBB0_18
LBB0_22:
	movq	_rbuf@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_rbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	1(%r12), %edx
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_REALLOC
	movq	(%rbx), %rcx
	movslq	%r12d, %rax
	movb	$0, (%rcx,%rax)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rhbuf,8,3                      ## @rhbuf
	.comm	_rhbufi,4,2                     ## @rhbufi
	.comm	_rbuf,8,3                       ## @rbuf
	.comm	_rbufsz,4,2                     ## @rbufsz
	.comm	_ERR,4,2                        ## @ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apply_subst_template           ; -- Begin function apply_subst_template
	.p2align	2
_apply_subst_template:                  ; @apply_subst_template
	.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
	str	w3, [sp, #4]                    ; 4-byte Folded Spill
	mov	x22, x2
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x27, _rhbufi@GOTPAGE
Lloh1:
	ldr	x27, [x27, _rhbufi@GOTPAGEOFF]
Lloh2:
	adrp	x24, _rbuf@GOTPAGE
Lloh3:
	ldr	x24, [x24, _rbuf@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh4:
	adrp	x26, _rbufsz@GOTPAGE
Lloh5:
	ldr	x26, [x26, _rbufsz@GOTPAGEOFF]
Lloh6:
	adrp	x25, _ERR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ERR@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x20, x1
Lloh8:
	adrp	x28, _rhbuf@GOTPAGE
Lloh9:
	ldr	x28, [x28, _rhbuf@GOTPAGEOFF]
	ldr	x19, [x28]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x24]
	ldr	w1, [x26]
	add	w23, w22, #1
	ldr	w3, [x25]
	mov	x2, x23
	bl	_REALLOC
	ldrb	w8, [x19]
	ldr	x9, [x24]
	strb	w8, [x9, w22, sxtw]
	mov	x22, x23
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	ldr	x8, [x28]
	ldrsw	x9, [x27]
	sub	x8, x19, x8
	cmp	x8, x9
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	ldrb	w8, [x19]
	cmp	w8, #92
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #38
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldpsw	x23, x21, [x20]
	ldr	x0, [x24]
	ldr	w1, [x26]
	sub	w8, w22, w23
	add	w2, w8, w21
	ldr	w3, [x25]
	bl	_REALLOC
	cmp	w23, w21
	b.ge	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x10, w22
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x8, x23
	sub	x9, x21, x23
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w11, [x8], #1
	ldr	x12, [x24]
	add	x22, x10, #1
	strb	w11, [x12, x10]
	mov	x10, x22
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x19, #1]!
	sub	w9, w8, #49
	cmp	w9, #8
	b.hi	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w8, #48
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w8, w9
	b.gt	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x20, w8, uxtw #3
	ldpsw	x23, x21, [x8]
	ldr	x0, [x24]
	ldr	w1, [x26]
	sub	w8, w22, w23
	add	w2, w8, w21
	ldr	w3, [x25]
	bl	_REALLOC
	cmp	w23, w21
	b.ge	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sxtw	x10, w22
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x8, x23
	sub	x9, x21, x23
LBB0_14:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w11, [x8], #1
	ldr	x12, [x24]
	add	x22, x10, #1
	strb	w11, [x12, x10]
	mov	x10, x22
	subs	x9, x9, #1
	b.ne	LBB0_14
	b	LBB0_9
LBB0_15:
	ldr	x0, [x24]
	ldr	w1, [x26]
	add	w2, w22, #1
	ldr	w3, [x25]
	bl	_REALLOC
	ldr	x8, [x24]
	strb	wzr, [x8, w22, sxtw]
	mov	x0, x22
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_rhbuf,8,3                      ; @rhbuf
	.comm	_rhbufi,4,2                     ; @rhbufi
	.comm	_rbuf,8,3                       ; @rbuf
	.comm	_rbufsz,4,2                     ; @rbufsz
	.comm	_ERR,4,2                        ; @ERR
.subsections_via_symbols
