	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function replace_repeat
_replace_repeat:                        ## @replace_repeat
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%ecx, %ebx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	testl	%r8d, %r8d
	sete	%r14b
	subl	%r8d, %r9d
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	_basestr@GOTPCREL(%rip), %rax
	movq	%rdi, %r12
	subq	(%rax), %r12
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	callq	_strlen
	movl	%r15d, -80(%rbp)                ## 4-byte Spill
	subl	%r15d, %eax
	leal	-1(%r13), %r15d
	movl	%r15d, %ecx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	imull	%ebx, %ecx
	xorl	%edx, %edx
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r13d
	movl	16(%rbp), %r13d
	cmovgel	%ecx, %edx
	addl	%eax, %edx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	addl	%r12d, %edx
	movq	_REPEAT_PLUS_APPENDED@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	jne	LBB0_2
## %bb.1:
	incl	%edx
	jmp	LBB0_5
LBB0_2:
	movq	_REPEAT_WITH_Q@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_4
## %bb.3:
	xorl	%ecx, %ecx
	movb	%r14b, %cl
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	imull	-44(%rbp), %eax                 ## 4-byte Folded Reload
	addl	%ecx, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_4:
	movq	_REPEAT_ZERO@GOTPCREL(%rip), %rax
	leal	2(%rdx), %ecx
	cmpl	%r13d, (%rax)
	cmovnel	%edx, %ecx
	movl	%ecx, %edx
LBB0_5:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	_basestr@GOTPCREL(%rip), %r12
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	leal	1(%rdx), %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_lastre@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_FATAL
LBB0_7:
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	movq	_REPEAT_ZERO@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_9
## %bb.8:
	movl	%r14d, %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	subl	%edx, %eax
	movslq	%eax, %r13
	movw	$10536, (%rbx,%r13)             ## imm = 0x2928
	addl	$2, %r13d
	cmpl	$2, -96(%rbp)                   ## 4-byte Folded Reload
	jge	LBB0_10
	jmp	LBB0_12
LBB0_9:
	movl	%r14d, %r13d
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$2, -96(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_12
LBB0_10:
	movslq	%r13d, %r14
	movslq	%edx, %r12
	addq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	%r12, %r14
	addl	%edx, %r13d
	decl	%r15d
	jne	LBB0_11
LBB0_12:
	movl	16(%rbp), %r15d
	movq	_REPEAT_PLUS_APPENDED@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_14
## %bb.13:
	movslq	%r13d, %rax
	incl	%r13d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movb	$43, (%r15,%rax)
	movq	%rdx, %r14
	jmp	LBB0_22
LBB0_14:
	movq	_REPEAT_WITH_Q@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_20
## %bb.15:
	cmpl	$0, -96(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_17
## %bb.16:
	movslq	%r13d, %rax
	incl	%r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movb	$63, (%rcx,%rax)
LBB0_17:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%rdx, %r14
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.18:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r13d, %rbx
	leaq	(%r15,%rbx), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movl	%ecx, %r13d
	callq	_memcpy
	movl	%r13d, %ecx
	movl	%ebx, %eax
	addl	%r14d, %eax
	leal	(%rbx,%r14), %r13d
	incl	%r13d
	cltq
	movb	$63, (%r15,%rax)
	decl	%ecx
	jne	LBB0_19
	jmp	LBB0_22
LBB0_20:
	movq	%rdx, %r14
LBB0_21:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_22:
	movslq	%r13d, %rbx
	leaq	(%r15,%rbx), %rdi
	movslq	-80(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	addq	%rax, %rsi
	movl	-76(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	_memcpy
	addl	%r13d, %ebx
	movq	_REPEAT_ZERO@GOTPCREL(%rip), %r12
	movl	16(%rbp), %edx
	cmpl	%edx, (%r12)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	cmovel	%ebx, %eax
	cltq
	movb	$0, (%r15,%rax)
	movq	_firstbasestr@GOTPCREL(%rip), %rax
	movq	_basestr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	cmpq	%rdi, (%rax)
	je	LBB0_25
## %bb.23:
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.24:
	movl	%edx, %r13d
	callq	_xfree
	movl	%r13d, %edx
LBB0_25:
	movq	%r15, (%rbx)
	movslq	-72(%rbp), %rax                 ## 4-byte Folded Reload
	addq	%rax, %r15
	movq	_prestr@GOTPCREL(%rip), %rcx
	movq	%r15, (%rcx)
	movl	$1, %eax
	cmpl	%edx, (%r12)
	jne	LBB0_27
## %bb.26:
	movslq	%r14d, %rax
	subq	%rax, %r15
	movq	%r15, (%rcx)
	movl	$2, %eax
LBB0_27:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_basestr,8,3                    ## @basestr
	.comm	_REPEAT_PLUS_APPENDED,4,2       ## @REPEAT_PLUS_APPENDED
	.comm	_REPEAT_WITH_Q,4,2              ## @REPEAT_WITH_Q
	.comm	_REPEAT_ZERO,4,2                ## @REPEAT_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of space in reg expr %.10s.."

	.comm	_lastre,4,2                     ## @lastre
	.comm	_firstbasestr,8,3               ## @firstbasestr
	.comm	_prestr,8,3                     ## @prestr
	.no_dead_strip	_replace_repeat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function replace_repeat
_replace_repeat:                        ; @replace_repeat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x6
	mov	x27, x4
	mov	x20, x3
	mov	x25, x2
	mov	x26, x1
	cmp	w4, #0
	cset	w23, eq
	sub	w22, w5, w4
Lloh0:
	adrp	x28, _basestr@GOTPAGE
Lloh1:
	ldr	x28, [x28, _basestr@GOTPAGEOFF]
	ldr	x8, [x28]
	sub	x21, x0, x8
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	bl	_strlen
	subs	w24, w27, #1
	mul	w8, w24, w20
	csel	w8, w8, wzr, gt
	sub	w10, w0, w26
	add	w8, w10, w8
	add	w8, w8, w21
Lloh2:
	adrp	x9, _REPEAT_PLUS_APPENDED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _REPEAT_PLUS_APPENDED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w9, w19
	str	w26, [sp, #28]                  ; 4-byte Folded Spill
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	add	w23, w8, #1
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x9, _REPEAT_WITH_Q@GOTPAGE
Lloh6:
	ldr	x9, [x9, _REPEAT_WITH_Q@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w9, w19
	b.ne	LBB0_4
; %bb.3:
	madd	w9, w22, w20, w22
	add	w9, w9, w23
	add	w23, w9, w8
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x9, _REPEAT_ZERO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _REPEAT_ZERO@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	add	w10, w8, #2
	cmp	w9, w19
	csel	w23, w10, w8, eq
LBB0_5:
	add	w0, w23, #1
	bl	_malloc
	mov	x26, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _lastre@GOTPAGE
Lloh12:
	ldr	x8, [x8, _lastre@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FATAL
LBB0_7:
	ldr	x1, [x28]
	mov	x0, x26
	mov	x2, x21
	bl	_memcpy
Lloh16:
	adrp	x8, _REPEAT_ZERO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _REPEAT_ZERO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w8, w19
	str	w23, [sp, #8]                   ; 4-byte Folded Spill
	b.ne	LBB0_9
; %bb.8:
	mov	x8, x21
	sxtw	x8, w8
	sub	x8, x8, w20, sxtw
	mov	w9, #10536
	strh	w9, [x26, x8]
	add	w23, w8, #2
	b	LBB0_10
LBB0_9:
	mov	x23, x21
LBB0_10:
	cmp	w27, #2
	str	x21, [sp]                       ; 8-byte Folded Spill
	b.lt	LBB0_13
; %bb.11:
	sxtw	x21, w20
	add	x28, x26, w23, sxtw
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x28
	mov	x1, x25
	mov	x2, x20
	bl	_memcpy
	add	x28, x28, x21
	add	w23, w23, w20
	subs	w24, w24, #1
	b.ne	LBB0_12
LBB0_13:
Lloh19:
	adrp	x8, _REPEAT_PLUS_APPENDED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REPEAT_PLUS_APPENDED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_15
; %bb.14:
	mov	w8, #43
	strb	w8, [x26, w23, sxtw]
	add	w23, w23, #1
	b	LBB0_21
LBB0_15:
Lloh22:
	adrp	x8, _REPEAT_WITH_Q@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REPEAT_WITH_Q@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_21
; %bb.16:
	ldr	x24, [sp]                       ; 8-byte Folded Reload
Lloh25:
	adrp	x28, _basestr@GOTPAGE
Lloh26:
	ldr	x28, [x28, _basestr@GOTPAGEOFF]
	cbnz	w27, LBB0_18
; %bb.17:
	mov	w8, #63
	strb	w8, [x26, w23, sxtw]
	add	w23, w23, #1
LBB0_18:
	cmp	w22, #1
Lloh27:
	adrp	x27, _REPEAT_ZERO@GOTPAGE
Lloh28:
	ldr	x27, [x27, _REPEAT_ZERO@GOTPAGEOFF]
	b.lt	LBB0_22
; %bb.19:
	mov	w21, #63
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x0, x26, w23, sxtw
	mov	x1, x25
	mov	x2, x20
	bl	_memcpy
	add	w8, w23, w20
	add	w23, w8, #1
	strb	w21, [x26, w8, sxtw]
	subs	w22, w22, #1
	b.ne	LBB0_20
	b	LBB0_22
LBB0_21:
	ldr	x24, [sp]                       ; 8-byte Folded Reload
Lloh29:
	adrp	x28, _basestr@GOTPAGE
Lloh30:
	ldr	x28, [x28, _basestr@GOTPAGEOFF]
Lloh31:
	adrp	x27, _REPEAT_ZERO@GOTPAGE
Lloh32:
	ldr	x27, [x27, _REPEAT_ZERO@GOTPAGEOFF]
LBB0_22:
	add	x0, x26, w23, sxtw
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x1, x9, w8, sxtw
	ldr	w21, [sp, #12]                  ; 4-byte Folded Reload
	mov	x2, x21
	bl	_memcpy
	ldr	w8, [x27]
	add	w9, w23, w21
	cmp	w8, w19
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	csel	w8, w9, w8, eq
	strb	wzr, [x26, w8, sxtw]
Lloh33:
	adrp	x8, _firstbasestr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _firstbasestr@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	ldr	x0, [x28]
	cmp	x8, x0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_24
; %bb.23:
	bl	_xfree
LBB0_24:
	str	x26, [x28]
	add	x8, x26, w24, sxtw
Lloh36:
	adrp	x9, _prestr@GOTPAGE
Lloh37:
	ldr	x9, [x9, _prestr@GOTPAGEOFF]
	str	x8, [x9]
	ldr	w10, [x27]
	cmp	w10, w19
	b.ne	LBB0_26
; %bb.25:
	sub	x8, x8, w20, sxtw
	str	x8, [x9]
	mov	w0, #2
	b	LBB0_27
LBB0_26:
	mov	w0, #1
LBB0_27:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_basestr,8,3                    ; @basestr
	.comm	_REPEAT_PLUS_APPENDED,4,2       ; @REPEAT_PLUS_APPENDED
	.comm	_REPEAT_WITH_Q,4,2              ; @REPEAT_WITH_Q
	.comm	_REPEAT_ZERO,4,2                ; @REPEAT_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of space in reg expr %.10s.."

	.comm	_lastre,4,2                     ; @lastre
	.comm	_firstbasestr,8,3               ; @firstbasestr
	.comm	_prestr,8,3                     ; @prestr
	.no_dead_strip	_replace_repeat
.subsections_via_symbols
