	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function append_replace_str
_append_replace_str:                    ## @append_replace_str
	.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	%r9, %rbx
	movl	%r8d, %r13d
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movl	%edx, %edi
	callq	_mrb_hash_p
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	(%rax), %edx
	movl	(%rcx), %ecx
	subl	%edx, %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mrb_str_substr
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mrb_hash_get
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mrb_str_to_str
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mrb_str_cat_str                ## TAILCALL
LBB0_2:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, -76(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_mrb_string_p
	movl	%eax, %edi
	callq	_mrb_assert
	movl	%r12d, %edi
	callq	_RSTRING_PTR
	movq	%rax, %r15
	movl	%r12d, %edi
	callq	_RSTRING_LEN
	movslq	%eax, %r14
	addq	%r15, %r14
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_RSTRING_PTR
	movq	%rax, %r12
	cmpq	%r14, %rax
	jae	LBB0_26
## %bb.3:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	callq	_mrb_str_cat
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	cmpq	%r14, %r12
	jae	LBB0_27
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	cmpb	$92, (%r12)
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	1(%r12), %r15
	cmpq	%r14, %r15
	jae	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movsbl	(%r15), %edi
	cmpl	$92, %edi
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$107, %edi
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	3(%r12), %r15
	cmpq	%r14, %r15
	jae	LBB0_28
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpb	$60, 2(%r12)
	jne	LBB0_28
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$62, (%r15,%rbx)
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	leaq	(%r15,%rbx), %rax
	incq	%rax
	incq	%rbx
	cmpq	%r14, %rax
	jne	LBB0_14
	jmp	LBB0_28
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	jmp	LBB0_24
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	callq	_isdigit
	testl	%eax, %eax
	je	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movsbl	(%r15), %eax
	leal	-48(%rax), %ecx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpl	16(%r12), %ecx
	jge	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movslq	%eax, %rbx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_RSTRING_PTR
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	movslq	-192(%rcx,%rbx,4), %rsi
	movl	-192(%rdx,%rbx,4), %ecx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	subl	%esi, %ecx
	movq	%rsi, %rdx
	addq	%rax, %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	jmp	LBB0_24
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	(%r15,%rbx), %r12
	xorl	%edi, %edi
	cmpq	%r14, %r12
	setb	%dil
	callq	_mrb_assert
	xorl	%edi, %edi
	cmpb	$62, (%r15,%rbx)
	sete	%dil
	callq	_mrb_assert
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_onig_name_to_backref_number
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jns	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_E_INDEX_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_RSTRING_PTR
	subl	%eax, %r15d
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_str_substr
	movq	%r13, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	callq	_mrb_raisef
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_RSTRING_PTR
	movslq	-72(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rdx
	movq	8(%rsi), %rsi
	movslq	(%rdx,%rcx,4), %rdx
	movl	(%rsi,%rcx,4), %ecx
	subl	%edx, %ecx
	addq	%rax, %rdx
	movq	%r13, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	jmp	LBB0_5
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	movb	$92, -42(%rbp)
	movb	(%r15), %al
	movb	%al, -41(%rbp)
	movq	%r13, %rdi
	movl	%ebx, %esi
	leaq	-42(%rbp), %rdx
	movl	$2, %ecx
LBB0_24:                                ##   in Loop: Header=BB0_7 Depth=1
	callq	_mrb_str_cat
LBB0_25:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %r12
	jmp	LBB0_6
LBB0_26:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
LBB0_27:
	cmpq	%r14, %r12
	je	LBB0_29
LBB0_28:
	movq	_E_REGEXP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_mrb_raisef
LBB0_29:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E_INDEX_ERROR,4,2              ## @E_INDEX_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"undefined group name reference: %S"

	.comm	_E_REGEXP_ERROR,4,2             ## @E_REGEXP_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"invalid replace expression: %S"

	.no_dead_strip	_append_replace_str
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function append_replace_str
_append_replace_str:                    ; @append_replace_str
	.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	x23, x5
	mov	x24, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	bl	_mrb_hash_p
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x8, x9, [x23]
	ldr	w2, [x8]
	ldr	w8, [x9]
	sub	w3, w8, w2
	mov	x0, x19
	mov	x1, x22
	bl	_mrb_str_substr
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_hash_get
	mov	x1, x0
	mov	x0, x19
	bl	_mrb_str_to_str
	mov	x2, x0
	mov	x0, x19
	mov	x1, 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
	b	_mrb_str_cat_str
LBB0_2:
	str	w24, [sp, #8]                   ; 4-byte Folded Spill
	mov	x0, x20
	bl	_mrb_string_p
	bl	_mrb_assert
	mov	x0, x20
	bl	_RSTRING_PTR
	mov	x25, x0
	mov	x0, x20
	bl	_RSTRING_LEN
	add	x24, x25, w0, sxtw
	mov	x0, x20
	bl	_RSTRING_PTR
	mov	x26, x0
	cmp	x0, x24
	b.lo	LBB0_9
LBB0_3:
	cmp	x26, x24
	b.eq	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _E_REGEXP_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E_REGEXP_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_mrb_raisef
LBB0_5:
	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_6:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x26
	mov	w3, #1
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_mrb_str_cat
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x26, #1
	cmp	x26, x24
	b.hs	LBB0_3
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	mov	x27, x26
	ldrb	w8, [x27], #1
	cmp	w8, #92
	ccmp	x27, x24, #2, eq
	b.hs	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrsb	w8, [x27]
	cmp	w8, #92
	b.eq	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #107
	b.ne	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x26, #3
	cmp	x27, x24
	b.hs	LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrb	w8, [x26, #2]
	cmp	w8, #60
	b.ne	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x28, #0
LBB0_15:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x27, x28]
	cmp	w8, #62
	b.eq	LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	add	x28, x28, #1
	add	x8, x27, x28
	cmp	x8, x24
	b.ne	LBB0_15
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x27
	mov	w3, #1
	b	LBB0_25
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=1
	and	w8, w8, #0xff
	sxtb	w0, w8
	bl	_isdigit
	cbz	w0, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrsb	x8, [x27]
	sub	x25, x8, #48
	ldr	w8, [x23, #16]
	cmp	w25, w8
	b.ge	LBB0_26
; %bb.20:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_RSTRING_PTR
	lsl	x8, x25, #2
	ldp	x9, x10, [x23]
	ldrsw	x9, [x9, x8]
	add	x2, x0, x9
	ldr	w8, [x10, x8]
	sub	w3, w8, w9
	mov	x0, x19
	mov	x1, x21
	b	LBB0_25
LBB0_21:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x27, x28
	cmp	x26, x24
	cset	w0, lo
	bl	_mrb_assert
	ldrb	w8, [x26]
	cmp	w8, #62
	cset	w0, eq
	bl	_mrb_assert
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	mov	x1, x27
	mov	x2, x26
	mov	x3, x23
	bl	_onig_name_to_backref_number
	mov	x25, x0
	tbz	w0, #31, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh5:
	adrp	x8, _E_INDEX_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E_INDEX_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	mov	x0, x20
	bl	_RSTRING_PTR
	sub	w2, w27, w0
	mov	x0, x19
	mov	x1, x20
	mov	x3, x28
	bl	_str_substr
	mov	x3, x0
	mov	x0, x19
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_mrb_raisef
LBB0_23:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_RSTRING_PTR
	sbfiz	x8, x25, #2, #32
	ldp	x9, x10, [x23]
	ldrsw	x9, [x9, x8]
	add	x2, x0, x9
	ldr	w8, [x10, x8]
	sub	w3, w8, w9
	mov	x0, x19
	mov	x1, x21
	b	LBB0_7
LBB0_24:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w8, #92
	strb	w8, [sp, #14]
	ldrb	w8, [x27]
	strb	w8, [sp, #15]
	add	x2, sp, #14
	mov	x0, x19
	mov	x1, x21
	mov	w3, #2
LBB0_25:                                ;   in Loop: Header=BB0_9 Depth=1
	bl	_mrb_str_cat
LBB0_26:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x26, x27
	b	LBB0_8
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_E_INDEX_ERROR,4,2              ; @E_INDEX_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"undefined group name reference: %S"

	.comm	_E_REGEXP_ERROR,4,2             ; @E_REGEXP_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"invalid replace expression: %S"

	.no_dead_strip	_append_replace_str
.subsections_via_symbols
