	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_and_replace
_find_and_replace:                      ## @find_and_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, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_ends_with
	movq	(%r12), %r14
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movslq	8(%r12), %rbx
	addq	%r14, %rbx
	movslq	%r15d, %rax
	subq	%rax, %rbx
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_strstr
	movq	%rax, %rbx
LBB0_3:
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.4:
	cmpq	%r14, %rbx
	jbe	LBB0_6
## %bb.5:
	cmpb	$47, -1(%rbx)
	jne	LBB0_9
LBB0_6:
	movq	%rbx, %rdi
	callq	_strlen
	cmpl	%r15d, %eax
	jle	LBB0_8
## %bb.7:
	movslq	%r15d, %rax
	cmpb	$47, (%rbx,%rax)
	jne	LBB0_9
LBB0_8:
	subl	(%r12), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_strlen
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_strbuf_splice
	movl	$1, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_find_and_replace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_and_replace
_find_and_replace:                      ; @find_and_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	x19, x2
	mov	x22, x1
	mov	x20, x0
	mov	x0, x1
	bl	_strlen
	mov	x21, x0
	ldr	x0, [x20]
	mov	x1, x22
	bl	_ends_with
	ldr	x23, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	ldrsw	x8, [x20, #8]
	add	x8, x23, x8
	sub	x22, x8, w21, sxtw
	cbnz	x22, LBB0_3
	b	LBB0_8
LBB0_2:
	mov	x0, x23
	mov	x1, x22
	bl	_strstr
	mov	x22, x0
	cbz	x22, LBB0_8
LBB0_3:
	cmp	x22, x23
	b.ls	LBB0_5
; %bb.4:
	ldurb	w8, [x22, #-1]
	cmp	w8, #47
	b.ne	LBB0_8
LBB0_5:
	mov	x0, x22
	bl	_strlen
	cmp	w0, w21
	b.le	LBB0_7
; %bb.6:
	ldrb	w8, [x22, w21, sxtw]
	cmp	w8, #47
	b.ne	LBB0_8
LBB0_7:
	ldr	w8, [x20]
	sub	w22, w22, w8
	mov	x0, x19
	bl	_strlen
	mov	x4, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_strbuf_splice
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_find_and_replace
.subsections_via_symbols
