	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replace_s                      ## -- Begin function replace_s
	.p2align	4, 0x90
_replace_s:                             ## @replace_s
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_create_s
	movq	%rax, %rdi
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_14
LBB0_2:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ebx killed $ebx def $rbx
	subl	%r15d, %ebx
	callq	_SIZE
	addl	%r12d, %ebx
	je	LBB0_9
## %bb.3:
	movl	%eax, %r14d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	leal	(%r14,%rbx), %r12d
	movq	8(%r13), %rdi
	callq	_CAPACITY
	movl	%eax, %ecx
	movq	8(%r13), %rax
	cmpl	%ecx, %r12d
	jle	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	movl	%r12d, %esi
	callq	_increase_size
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_14
LBB0_5:
	movslq	%r15d, %rcx
	leaq	(%rax,%rcx,4), %rsi
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movslq	%ebx, %r12
	leaq	(%rsi,%r12,4), %rdi
	subl	%r15d, %r14d
	shll	$2, %r14d
	movl	%r14d, %edx
	callq	_memmove
	movq	8(%r13), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_SET_SIZE
	addl	%r12d, (%r13)
	movl	4(%r13), %eax
	cmpl	%r15d, %eax
	jge	LBB0_7
## %bb.6:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	movl	%ecx, %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jg	LBB0_8
	jmp	LBB0_9
LBB0_14:
	movl	$-1, %eax
	jmp	LBB0_15
LBB0_7:
	addl	%ebx, %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_8:
	movl	%eax, 4(%r13)
LBB0_9:
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.10:
	movslq	-48(%rbp), %rdi                 ## 4-byte Folded Reload
	shlq	$2, %rdi
	addq	8(%r13), %rdi
	shll	$2, %r12d
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memmove
LBB0_11:
	xorl	%eax, %eax
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_15
## %bb.12:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx)
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replace_s                      ; -- Begin function replace_s
	.p2align	2
_replace_s:                             ; @replace_s
	.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	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x0, [x0, #8]
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_create_s
	str	x0, [x23, #8]
	cbz	x0, LBB0_7
LBB0_2:
	sub	w8, w22, w24
	add	w27, w8, w21
	bl	_SIZE
	cbz	w27, LBB0_10
; %bb.3:
	mov	x26, x0
	add	w25, w0, w27
	ldr	x0, [x23, #8]
	bl	_CAPACITY
	mov	x8, x0
	ldr	x0, [x23, #8]
	cmp	w25, w8
	b.le	LBB0_5
; %bb.4:
	mov	x1, x25
	bl	_increase_size
	str	x0, [x23, #8]
	cbz	x0, LBB0_7
LBB0_5:
	add	x1, x0, w24, sxtw #2
	add	x0, x1, w27, sxtw #2
	sub	w8, w26, w24
	lsl	w2, w8, #2
	bl	_memmove
	ldr	x0, [x23, #8]
	mov	x1, x25
	bl	_SET_SIZE
	ldp	w8, w9, [x23]
	add	w8, w8, w27
	str	w8, [x23]
	cmp	w9, w24
	b.ge	LBB0_8
; %bb.6:
	mov	x8, x22
	cmp	w9, w22
	b.gt	LBB0_9
	b	LBB0_10
LBB0_7:
	mov	w0, #-1
	b	LBB0_14
LBB0_8:
	add	w8, w9, w27
LBB0_9:
	str	w8, [x23, #4]
LBB0_10:
	cbz	w21, LBB0_12
; %bb.11:
	ldr	x8, [x23, #8]
	add	x0, x8, w22, sxtw #2
	lsl	w2, w21, #2
	mov	x1, x20
	bl	_memmove
LBB0_12:
	mov	w0, #0
	cbz	x19, LBB0_14
; %bb.13:
	str	w27, [x19]
LBB0_14:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
