	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_naive_replace                  ## -- Begin function naive_replace
	.p2align	4, 0x90
_naive_replace:                         ## @naive_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_strlen
	testq	%rax, %rax
	je	LBB0_63
## %bb.1:
	cmpq	$8, %rax
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_60
LBB0_3:
	movzbl	%r14b, %edx
	cmpq	$16, %rax
	jae	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_41
LBB0_5:
	movq	%rax, %rcx
	andq	$-16, %rcx
	movd	%edx, %xmm0
	pxor	%xmm1, %xmm1
	pshufb	%xmm1, %xmm0
	xorl	%esi, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %rcx
	je	LBB0_39
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rsi), %xmm1
	pcmpeqb	%xmm0, %xmm1
	movd	%xmm1, %edi
	testb	$1, %dil
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, (%rbx,%rsi)
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$1, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 1(%rbx,%rsi)
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$2, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 2(%rbx,%rsi)
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$3, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 3(%rbx,%rsi)
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$4, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 4(%rbx,%rsi)
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$5, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 5(%rbx,%rsi)
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$6, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 6(%rbx,%rsi)
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$7, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 7(%rbx,%rsi)
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$8, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 8(%rbx,%rsi)
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$9, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 9(%rbx,%rsi)
LBB0_26:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$10, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 10(%rbx,%rsi)
LBB0_28:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$11, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 11(%rbx,%rsi)
LBB0_30:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$12, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 12(%rbx,%rsi)
LBB0_32:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$13, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 13(%rbx,%rsi)
LBB0_34:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$14, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 14(%rbx,%rsi)
LBB0_36:                                ##   in Loop: Header=BB0_6 Depth=1
	pextrb	$15, %xmm1, %edi
	testb	$1, %dil
	je	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%r15b, 15(%rbx,%rsi)
	jmp	LBB0_38
LBB0_39:
	cmpq	%rcx, %rax
	je	LBB0_63
## %bb.40:
	testb	$8, %al
	je	LBB0_60
LBB0_41:
	movq	%rcx, %rsi
	movq	%rax, %rcx
	andq	$-8, %rcx
	movd	%edx, %xmm0
	punpcklbw	%xmm0, %xmm0            ## xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
	pshuflw	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0,4,5,6,7]
	jmp	LBB0_42
	.p2align	4, 0x90
LBB0_58:                                ##   in Loop: Header=BB0_42 Depth=1
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	je	LBB0_59
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rsi), %xmm1              ## xmm1 = mem[0],zero
	pcmpeqb	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$1, %dl
	je	LBB0_44
## %bb.43:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, (%rbx,%rsi)
LBB0_44:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$1, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_46
## %bb.45:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 1(%rbx,%rsi)
LBB0_46:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$2, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_48
## %bb.47:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 2(%rbx,%rsi)
LBB0_48:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$3, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_50
## %bb.49:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 3(%rbx,%rsi)
LBB0_50:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$4, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_52
## %bb.51:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 4(%rbx,%rsi)
LBB0_52:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$5, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_54
## %bb.53:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 5(%rbx,%rsi)
LBB0_54:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$6, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_56
## %bb.55:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 6(%rbx,%rsi)
LBB0_56:                                ##   in Loop: Header=BB0_42 Depth=1
	pextrb	$7, %xmm1, %edx
	testb	$1, %dl
	je	LBB0_58
## %bb.57:                              ##   in Loop: Header=BB0_42 Depth=1
	movb	%r15b, 7(%rbx,%rsi)
	jmp	LBB0_58
LBB0_59:
	cmpq	%rcx, %rax
	je	LBB0_63
LBB0_60:
	cmpb	%r14b, (%rbx,%rcx)
	jne	LBB0_62
## %bb.61:
	movb	%r15b, (%rbx,%rcx)
LBB0_62:
	incq	%rcx
	jmp	LBB0_59
LBB0_63:
	addq	$8, %rsp
	popq	%rbx
	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	_naive_replace                  ; -- Begin function naive_replace
	.p2align	2
_naive_replace:                         ; @naive_replace
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_strlen
	cbz	x0, LBB0_60
; %bb.1:
	cmp	x0, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	b	LBB0_61
LBB0_3:
	cmp	x0, #16
	b.hs	LBB0_5
; %bb.4:
	mov	x8, #0
	b	LBB0_41
LBB0_5:
	and	x8, x0, #0xfffffffffffffff0
	dup.16b	v0, w20
	add	x9, x21, #7
	mov	x10, x8
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, #16
	subs	x10, x10, #16
	b.eq	LBB0_39
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	q1, [x9, #-7]
	cmeq.16b	v1, v1, v0
	umov.b	w11, v1[0]
	tbnz	w11, #0, LBB0_23
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[1]
	tbnz	w11, #0, LBB0_24
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[2]
	tbnz	w11, #0, LBB0_25
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[3]
	tbnz	w11, #0, LBB0_26
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[4]
	tbnz	w11, #0, LBB0_27
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[5]
	tbnz	w11, #0, LBB0_28
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[6]
	tbnz	w11, #0, LBB0_29
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[7]
	tbnz	w11, #0, LBB0_30
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[8]
	tbnz	w11, #0, LBB0_31
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[9]
	tbnz	w11, #0, LBB0_32
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[10]
	tbnz	w11, #0, LBB0_33
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[11]
	tbnz	w11, #0, LBB0_34
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[12]
	tbnz	w11, #0, LBB0_35
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[13]
	tbnz	w11, #0, LBB0_36
LBB0_21:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[14]
	tbnz	w11, #0, LBB0_37
LBB0_22:                                ;   in Loop: Header=BB0_7 Depth=1
	umov.b	w11, v1[15]
	tbz	w11, #0, LBB0_6
	b	LBB0_38
LBB0_23:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-7]
	umov.b	w11, v1[1]
	tbz	w11, #0, LBB0_9
LBB0_24:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-6]
	umov.b	w11, v1[2]
	tbz	w11, #0, LBB0_10
LBB0_25:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-5]
	umov.b	w11, v1[3]
	tbz	w11, #0, LBB0_11
LBB0_26:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-4]
	umov.b	w11, v1[4]
	tbz	w11, #0, LBB0_12
LBB0_27:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-3]
	umov.b	w11, v1[5]
	tbz	w11, #0, LBB0_13
LBB0_28:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-2]
	umov.b	w11, v1[6]
	tbz	w11, #0, LBB0_14
LBB0_29:                                ;   in Loop: Header=BB0_7 Depth=1
	sturb	w19, [x9, #-1]
	umov.b	w11, v1[7]
	tbz	w11, #0, LBB0_15
LBB0_30:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9]
	umov.b	w11, v1[8]
	tbz	w11, #0, LBB0_16
LBB0_31:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #1]
	umov.b	w11, v1[9]
	tbz	w11, #0, LBB0_17
LBB0_32:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #2]
	umov.b	w11, v1[10]
	tbz	w11, #0, LBB0_18
LBB0_33:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #3]
	umov.b	w11, v1[11]
	tbz	w11, #0, LBB0_19
LBB0_34:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #4]
	umov.b	w11, v1[12]
	tbz	w11, #0, LBB0_20
LBB0_35:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #5]
	umov.b	w11, v1[13]
	tbz	w11, #0, LBB0_21
LBB0_36:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #6]
	umov.b	w11, v1[14]
	tbz	w11, #0, LBB0_22
LBB0_37:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #7]
	umov.b	w11, v1[15]
	tbz	w11, #0, LBB0_6
LBB0_38:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	w19, [x9, #8]
	b	LBB0_6
LBB0_39:
	cmp	x0, x8
	b.eq	LBB0_60
; %bb.40:
	tbz	w0, #3, LBB0_61
LBB0_41:
	mov	x10, x8
	and	x8, x0, #0xfffffffffffffff8
	dup.8b	v0, w20
	sub	x9, x10, x8
	add	x10, x10, x21
	add	x10, x10, #3
	b	LBB0_43
LBB0_42:                                ;   in Loop: Header=BB0_43 Depth=1
	add	x10, x10, #8
	adds	x9, x9, #8
	b.eq	LBB0_59
LBB0_43:                                ; =>This Inner Loop Header: Depth=1
	ldur	d1, [x10, #-3]
	cmeq.8b	v1, v1, v0
	umov.b	w11, v1[0]
	tbnz	w11, #0, LBB0_51
; %bb.44:                               ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[1]
	tbnz	w11, #0, LBB0_52
LBB0_45:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[2]
	tbnz	w11, #0, LBB0_53
LBB0_46:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[3]
	tbnz	w11, #0, LBB0_54
LBB0_47:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[4]
	tbnz	w11, #0, LBB0_55
LBB0_48:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[5]
	tbnz	w11, #0, LBB0_56
LBB0_49:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[6]
	tbnz	w11, #0, LBB0_57
LBB0_50:                                ;   in Loop: Header=BB0_43 Depth=1
	umov.b	w11, v1[7]
	tbz	w11, #0, LBB0_42
	b	LBB0_58
LBB0_51:                                ;   in Loop: Header=BB0_43 Depth=1
	sturb	w19, [x10, #-3]
	umov.b	w11, v1[1]
	tbz	w11, #0, LBB0_45
LBB0_52:                                ;   in Loop: Header=BB0_43 Depth=1
	sturb	w19, [x10, #-2]
	umov.b	w11, v1[2]
	tbz	w11, #0, LBB0_46
LBB0_53:                                ;   in Loop: Header=BB0_43 Depth=1
	sturb	w19, [x10, #-1]
	umov.b	w11, v1[3]
	tbz	w11, #0, LBB0_47
LBB0_54:                                ;   in Loop: Header=BB0_43 Depth=1
	strb	w19, [x10]
	umov.b	w11, v1[4]
	tbz	w11, #0, LBB0_48
LBB0_55:                                ;   in Loop: Header=BB0_43 Depth=1
	strb	w19, [x10, #1]
	umov.b	w11, v1[5]
	tbz	w11, #0, LBB0_49
LBB0_56:                                ;   in Loop: Header=BB0_43 Depth=1
	strb	w19, [x10, #2]
	umov.b	w11, v1[6]
	tbz	w11, #0, LBB0_50
LBB0_57:                                ;   in Loop: Header=BB0_43 Depth=1
	strb	w19, [x10, #3]
	umov.b	w11, v1[7]
	tbz	w11, #0, LBB0_42
LBB0_58:                                ;   in Loop: Header=BB0_43 Depth=1
	strb	w19, [x10, #4]
	b	LBB0_42
LBB0_59:
	cmp	x0, x8
	b.ne	LBB0_61
LBB0_60:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_61:
	sub	x9, x0, x8
	add	x8, x21, x8
	b	LBB0_63
LBB0_62:                                ;   in Loop: Header=BB0_63 Depth=1
	add	x8, x8, #1
	subs	x9, x9, #1
	b.eq	LBB0_60
LBB0_63:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x8]
	cmp	w10, w20, uxtb
	b.ne	LBB0_62
; %bb.64:                               ;   in Loop: Header=BB0_63 Depth=1
	strb	w19, [x8]
	b	LBB0_62
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
