	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unicode_to_utf8                ## -- Begin function unicode_to_utf8
	.p2align	4, 0x90
_unicode_to_utf8:                       ## @unicode_to_utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rsi, %rax
	cmpl	$127, %edi
	jg	LBB0_2
## %bb.1:
	movb	%dil, (%rax)
	popq	%rbp
	retq
LBB0_2:
	movl	%edi, %ecx
	cmpl	$2047, %edi                     ## imm = 0x7FF
	ja	LBB0_4
## %bb.3:
	shrl	$6, %ecx
	orb	$-64, %cl
	movb	%cl, (%rax)
	andb	$63, %dil
	orb	$-128, %dil
	movb	%dil, 1(%rax)
	popq	%rbp
	retq
LBB0_4:
	cmpl	$65535, %edi                    ## imm = 0xFFFF
	ja	LBB0_6
## %bb.5:
	shrl	$12, %ecx
	orb	$-32, %cl
	movb	%cl, (%rax)
	movl	%edi, %ecx
	shrl	$6, %ecx
	andb	$63, %cl
	orb	$-128, %cl
	movb	%cl, 1(%rax)
	andb	$63, %dil
	orb	$-128, %dil
	movb	%dil, 2(%rax)
	popq	%rbp
	retq
LBB0_6:
	shrl	$18, %ecx
	andb	$7, %cl
	orb	$-16, %cl
	movb	%cl, (%rax)
	movl	%edi, %ecx
	shrl	$12, %ecx
	andb	$63, %cl
	orb	$-128, %cl
	movb	%cl, 1(%rax)
	movl	%edi, %ecx
	shrl	$6, %ecx
	andb	$63, %cl
	orb	$-128, %cl
	movb	%cl, 2(%rax)
	andb	$63, %dil
	orb	$-128, %dil
	movb	%dil, 3(%rax)
	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	_unicode_to_utf8                ; -- Begin function unicode_to_utf8
	.p2align	2
_unicode_to_utf8:                       ; @unicode_to_utf8
	.cfi_startproc
; %bb.0:
	cmp	w0, #127
	b.gt	LBB0_2
; %bb.1:
	strb	w0, [x1]
	mov	x0, x1
	ret
LBB0_2:
	cmp	w0, #2047
	b.hi	LBB0_4
; %bb.3:
	lsr	w8, w0, #6
	orr	w8, w8, #0xc0
	strb	w8, [x1]
	mov	w8, #128
	bfxil	w8, w0, #0, #6
	strb	w8, [x1, #1]
	mov	x0, x1
	ret
LBB0_4:
	lsr	w8, w0, #16
	cbnz	w8, LBB0_6
; %bb.5:
	lsr	w8, w0, #12
	orr	w8, w8, #0xe0
	strb	w8, [x1]
	mov	w8, #128
	mov	w9, #128
	bfxil	w9, w0, #6, #6
	strb	w9, [x1, #1]
	bfxil	w8, w0, #0, #6
	strb	w8, [x1, #2]
	mov	x0, x1
	ret
LBB0_6:
	mov	w8, #240
	bfxil	w8, w0, #18, #3
	strb	w8, [x1]
	mov	w8, #128
	mov	w9, #128
	bfxil	w9, w0, #12, #6
	strb	w9, [x1, #1]
	mov	w9, #128
	bfxil	w9, w0, #6, #6
	strb	w9, [x1, #2]
	bfxil	w8, w0, #0, #6
	strb	w8, [x1, #3]
	mov	x0, x1
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
