	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_str                    ## -- Begin function prepare_str
	.p2align	4, 0x90
_prepare_str:                           ## @prepare_str
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_strlen
	movq	_MAX_NAME_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	cmpl	%edx, %eax
	jge	LBB0_7
## %bb.1:
	movq	_prep_ibuf@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_string_to_utf8
	movl	(%r14), %edi
	callq	_prepare_str_UTF8
	movq	_prep_buf@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.2:
	movq	%rax, %rbx
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rsi
	callq	_put_char_utf8
	cltq
	addq	%rax, %r14
	movl	(%rbx), %edi
	addq	$4, %rbx
	testl	%edi, %edi
	jne	LBB0_3
LBB0_4:
	movb	$0, (%r14)
	incq	%r14
	movq	%r14, %rax
	subq	(%r12), %rax
	movslq	(%r15), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setl	%dil
	callq	_assert
	movl	(%r12), %eax
	movl	%r14d, %edi
	subl	%eax, %edi
	callq	_dl_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %rbx
	movq	(%r12), %rsi
	subl	%esi, %r14d
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	jmp	LBB0_8
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NAME_SIZE,4,2              ## @MAX_NAME_SIZE
	.comm	_prep_ibuf,4,2                  ## @prep_ibuf
	.comm	_prep_buf,8,3                   ## @prep_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_str                    ; -- Begin function prepare_str
	.p2align	2
_prepare_str:                           ; @prepare_str
	.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, x0
	bl	_strlen
Lloh0:
	adrp	x20, _MAX_NAME_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_NAME_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w0, w8, asr #2
	b.ge	LBB0_6
; %bb.1:
Lloh2:
	adrp	x21, _prep_ibuf@GOTPAGE
Lloh3:
	ldr	x21, [x21, _prep_ibuf@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_string_to_utf8
	ldr	w0, [x21]
	bl	_prepare_str_UTF8
	mov	x8, x0
Lloh4:
	adrp	x21, _prep_buf@GOTPAGE
Lloh5:
	ldr	x21, [x21, _prep_buf@GOTPAGEOFF]
	ldr	x19, [x21]
	ldr	w0, [x0]
	cbz	w0, LBB0_4
; %bb.2:
	add	x22, x8, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x19
	bl	_put_char_utf8
	add	x19, x19, w0, sxtw
	ldr	w0, [x22], #4
	cbnz	w0, LBB0_3
LBB0_4:
	strb	wzr, [x19], #1
	ldr	x8, [x21]
	ldrsw	x9, [x20]
	sub	x8, x19, x8
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	w8, [x21]
	sub	w0, w19, w8
	bl	_dl_malloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x1, [x21]
	sub	w2, w19, w1
	mov	x0, x20
	bl	_memcpy
	b	LBB0_7
LBB0_6:
	mov	x20, #0
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NAME_SIZE,4,2              ; @MAX_NAME_SIZE
	.comm	_prep_ibuf,4,2                  ; @prep_ibuf
	.comm	_prep_buf,8,3                   ; @prep_buf
.subsections_via_symbols
