	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svn_stringbuf_replace          ## -- Begin function svn_stringbuf_replace
	.p2align	4, 0x90
_svn_stringbuf_replace:                 ## @svn_stringbuf_replace
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	testq	%r8, %r8
	je	LBB0_9
## %bb.1:
	movq	%r8, %rbx
	leaq	(%rcx,%r8), %rdx
	movq	(%r14), %rax
	cmpq	%rax, %rdx
	jbe	LBB0_4
## %bb.2:
	movslq	8(%r14), %rdx
	addq	%rdx, %rax
	cmpq	%rcx, %rax
	jbe	LBB0_4
## %bb.3:
	movl	24(%r14), %edi
	movq	%rcx, %rsi
	movq	%rbx, %rdx
	callq	_apr_pmemdup
	movq	%rax, %rcx
LBB0_4:
	movq	16(%r14), %rsi
	cmpq	%r15, %rsi
	cmovlq	%rsi, %r15
	movq	%rsi, %r12
	subq	%r15, %r12
	cmpq	%r13, %r12
	cmovgeq	%r13, %r12
	cmpq	%rbx, %r12
	jge	LBB0_6
## %bb.5:
	addq	%rbx, %rsi
	subq	%r12, %rsi
	movq	%r14, %rdi
	movq	%rcx, %r13
	callq	_svn_stringbuf_ensure
	movq	%r13, %rcx
LBB0_6:
	cmpq	%rbx, %r12
	je	LBB0_8
## %bb.7:
	movq	(%r14), %rsi
	addq	%r15, %rsi
	leaq	(%rsi,%rbx), %rdi
	addq	%r12, %rsi
	movq	16(%r14), %rax
	leaq	(%r15,%r12), %rdx
	negq	%rdx
	addq	%rax, %rdx
	incq	%rdx
	movq	%rcx, %r13
	callq	_memmove
	movq	%r13, %rcx
LBB0_8:
	addq	(%r14), %r15
	movq	%r15, %rdi
	movq	%rcx, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	subq	%r12, %rbx
	addq	%rbx, 16(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_svn_stringbuf_remove           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svn_stringbuf_replace          ; -- Begin function svn_stringbuf_replace
	.p2align	2
_svn_stringbuf_replace:                 ; @svn_stringbuf_replace
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	cbz	x4, LBB0_9
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	ldr	x8, [x20]
	add	x9, x3, x4
	cmp	x9, x8
	b.ls	LBB0_4
; %bb.2:
	ldrsw	x9, [x20, #8]
	add	x8, x8, x9
	cmp	x8, x21
	b.ls	LBB0_4
; %bb.3:
	ldr	w0, [x20, #24]
	mov	x1, x21
	mov	x2, x19
	bl	_apr_pmemdup
	mov	x21, x0
LBB0_4:
	ldr	x8, [x20, #16]
	cmp	x8, x23
	csel	x23, x8, x23, lt
	sub	x9, x8, x23
	cmp	x9, x22
	csel	x22, x9, x22, lt
	cmp	x22, x19
	b.ge	LBB0_6
; %bb.5:
	add	x8, x8, x19
	sub	x1, x8, x22
	mov	x0, x20
	bl	_svn_stringbuf_ensure
LBB0_6:
	cmp	x22, x19
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20]
	add	x8, x8, x23
	add	x0, x8, x19
	add	x1, x8, x22
	ldr	x8, [x20, #16]
	add	x9, x23, x22
	sub	x8, x8, x9
	add	x2, x8, #1
	bl	_memmove
LBB0_8:
	ldr	x8, [x20]
	add	x0, x8, x23
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x20, #16]
	sub	x9, x19, x22
	add	x8, x9, x8
	str	x8, [x20, #16]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_svn_stringbuf_remove
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
