	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_subst
_do_subst:                              ## @do_subst
	.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
	movq	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rdx
	incq	%rdx
	xorl	%ebx, %ebx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movq	%r14, %rsi
	movq	%r8, %rcx
	xorl	%r8d, %r8d
	callq	_regexec
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rdx
	incq	%rdx
	movq	%r14, %rsi
	movq	%r13, %rcx
	movl	%ebx, %r8d
	callq	_regexec
	movq	%r14, %r12
	testl	%eax, %eax
	jne	LBB0_14
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	xorl	%ebx, %ebx
	cmpb	$10, -1(%rax,%r12)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_REG_NOTBOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=2
	movslq	4(%r13), %rsi
	leaq	(%r12,%rsi), %r15
	cmpl	%eax, %esi
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movzbl	(%r12), %eax
	testb	%al, %al
	je	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=2
	movsbl	%al, %edi
	callq	_addchar
	leaq	1(%r12), %r14
	xorl	%ebx, %ebx
	cmpb	$10, (%r12)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	movq	_REG_NOTBOL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_addchars
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_add_replace
	movslq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rax), %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rdx
	incq	%rdx
	movq	%r14, %rsi
	movq	%r13, %rcx
	movl	%ebx, %r8d
	callq	_regexec
	testl	%eax, %eax
	je	LBB0_2
## %bb.13:
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	movq	%r12, %r14
LBB0_14:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_15:
	movq	_REG_NOMATCH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_exit_regerror
LBB0_17:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pbstr                          ## TAILCALL
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_NOTBOL,4,2                 ## @REG_NOTBOL
	.comm	_REG_NOMATCH,4,2                ## @REG_NOMATCH
	.no_dead_strip	_do_subst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_subst
_do_subst:                              ; @do_subst
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x1]
	add	x2, x8, #1
	mov	x0, x1
	mov	x1, x19
	mov	x3, x4
	mov	w4, #0
	bl	_regexec
	cbz	w0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _REG_NOMATCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_NOMATCH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x1, x21
	mov	x2, x20
	bl	_exit_regerror
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_pbstr
LBB0_4:
	mov	x26, #0
	mov	w24, #0
Lloh3:
	adrp	x25, _REG_NOTBOL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _REG_NOTBOL@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x22]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x8, x19
	ldurb	w9, [x9, #-1]
	ldr	w10, [x25]
	cmp	w9, #10
	csel	w24, wzr, w10, eq
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x1, [x22, #4]
	add	x27, x19, x1
	cmp	w1, w8
	ccmp	x27, x26, #0, eq
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x19]
	cbz	w8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	sxtb	w0, w8
	bl	_addchar
	ldrb	w8, [x19], #1
	ldr	w9, [x25]
	cmp	w8, #10
	csel	w24, wzr, w9, eq
	ldr	x8, [x21]
	add	x2, x8, #1
	mov	x0, x21
	mov	x1, x19
	mov	x3, x22
	mov	x4, x24
	bl	_regexec
	cbz	w0, LBB0_5
	b	LBB0_1
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_addchars
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_add_replace
	ldrsw	x8, [x22]
	add	x19, x19, x8
	ldr	x8, [x21]
	add	x2, x8, #1
	mov	x0, x21
	mov	x1, x19
	mov	x3, x22
	mov	x4, x24
	bl	_regexec
	mov	x26, x27
	cbz	w0, LBB0_5
	b	LBB0_1
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_NOTBOL,4,2                 ; @REG_NOTBOL
	.comm	_REG_NOMATCH,4,2                ; @REG_NOMATCH
	.no_dead_strip	_do_subst
.subsections_via_symbols
