	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_searchandreplace               ## -- Begin function searchandreplace
	.p2align	4, 0x90
_searchandreplace:                      ## @searchandreplace
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.2:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.3:
	movq	%rdi, %rbx
	callq	_strlen
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_strlen
	movq	%rax, %rsi
	movq	%r12, %rax
	mulq	%rsi
	seto	%dl
	testq	%r12, %r12
	je	LBB0_8
## %bb.4:
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpb	$0, (%r15)
	je	LBB0_15
## %bb.5:
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.6:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	sete	%al
	orb	%al, %dl
	je	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_9:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	incq	%rcx
	movq	%rcx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movb	$0, (%r12)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rax, %r13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edx
	subl	%ebx, %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_strncat
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_strcat
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %rbx
	addq	%r13, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strstr
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:
	movq	%r12, %rdi
	jmp	LBB0_14
LBB0_13:
	movq	%rbx, %rdi
LBB0_14:
	callq	_strdup
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_searchandreplace               ; -- Begin function searchandreplace
	.p2align	2
_searchandreplace:                      ; @searchandreplace
	.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
	sub	sp, sp, #16
	mov	x21, x0
	mov	x0, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cbz	x21, LBB0_14
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_14
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_14
; %bb.3:
	mov	x0, x21
	bl	_strlen
	mov	x22, x0
	mov	x0, x19
	bl	_strlen
	umulh	x9, x22, x0
	cmp	xzr, x9
	cset	w9, ne
	cbz	x22, LBB0_7
; %bb.4:
	mov	x8, x0
	mov	x0, #0
	ldrb	w10, [x20]
	cbz	w10, LBB0_14
; %bb.5:
	cbz	x8, LBB0_14
; %bb.6:
	mul	x8, x22, x8
Lloh3:
	adrp	x10, _SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	cset	w10, eq
	orr	w9, w9, w10
	tbz	w9, #0, LBB0_8
LBB0_7:
	mov	x0, #0
	b	LBB0_14
LBB0_8:
	mov	x24, sp
	add	x9, x8, #1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #16
	and	x8, x8, #0xfffffffffffffff0
	sub	x22, x9, x8
	mov	sp, x22
	strb	wzr, [x22]
	mov	x0, x21
	mov	x1, x20
	bl	_strstr
	cbz	x0, LBB0_12
; %bb.9:
	mov	x23, x0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w2, w23, w21
	mov	x0, x22
	mov	x1, x21
	bl	_strncat
	mov	x0, x22
	mov	x1, x19
	bl	_strcat
	mov	x0, x20
	bl	_strlen
	add	x21, x23, x0
	mov	x0, x21
	mov	x1, x20
	bl	_strstr
	mov	x23, x0
	cbnz	x0, LBB0_10
; %bb.11:
	mov	x0, x22
	b	LBB0_13
LBB0_12:
	mov	x0, x21
LBB0_13:
	bl	_strdup
	mov	sp, x24
LBB0_14:
	ldur	x8, [x29, #-56]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #48
	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_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
.subsections_via_symbols
