	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encodeUTF8
_encodeUTF8:                            ## @encodeUTF8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$127, %esi
	ja	LBB0_2
## %bb.1:
	movb	%sil, (%rdi)
	movl	$1, %eax
	popq	%rbp
	retq
LBB0_2:
	cmpl	$2047, %esi                     ## imm = 0x7FF
	ja	LBB0_4
## %bb.3:
	movl	%esi, %eax
	shrl	$6, %eax
	orb	$-64, %al
	movb	%al, (%rdi)
	andb	$63, %sil
	orb	$-128, %sil
	movb	%sil, 1(%rdi)
	movl	$2, %eax
	popq	%rbp
	retq
LBB0_4:
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	ja	LBB0_6
## %bb.5:
	movl	%esi, %eax
	shrl	$12, %eax
	orb	$-32, %al
	movb	%al, (%rdi)
	movl	%esi, %eax
	shrl	$6, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 1(%rdi)
	andb	$63, %sil
	orb	$-128, %sil
	movb	%sil, 2(%rdi)
	movl	$3, %eax
	popq	%rbp
	retq
LBB0_6:
	cmpl	$1114111, %esi                  ## imm = 0x10FFFF
	ja	LBB0_7
## %bb.8:
	movl	%esi, %eax
	shrl	$18, %eax
	orb	$-16, %al
	movb	%al, (%rdi)
	movl	%esi, %eax
	shrl	$12, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 1(%rdi)
	movl	%esi, %eax
	shrl	$6, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 2(%rdi)
	andb	$63, %sil
	orb	$-128, %sil
	movb	%sil, 3(%rdi)
	movl	$4, %eax
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encodeUTF8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encodeUTF8
_encodeUTF8:                            ; @encodeUTF8
	.cfi_startproc
; %bb.0:
	cmp	w1, #127
	b.hi	LBB0_2
; %bb.1:
	strb	w1, [x0]
	mov	w0, #1
	ret
LBB0_2:
	cmp	w1, #2047
	b.hi	LBB0_4
; %bb.3:
	lsr	w8, w1, #6
	orr	w8, w8, #0xc0
	strb	w8, [x0]
	mov	w8, #128
	bfxil	w8, w1, #0, #6
	strb	w8, [x0, #1]
	mov	w0, #2
	ret
LBB0_4:
	lsr	w8, w1, #16
	cbnz	w8, LBB0_6
; %bb.5:
	lsr	w8, w1, #12
	orr	w8, w8, #0xe0
	strb	w8, [x0]
	mov	w8, #128
	mov	w9, #128
	bfxil	w9, w1, #6, #6
	strb	w9, [x0, #1]
	bfxil	w8, w1, #0, #6
	strb	w8, [x0, #2]
	mov	w0, #3
	ret
LBB0_6:
	cmp	w8, #16
	b.hi	LBB0_8
; %bb.7:
	lsr	w8, w1, #18
	orr	w8, w8, #0xf0
	strb	w8, [x0]
	mov	w8, #128
	mov	w9, #128
	bfxil	w9, w1, #12, #6
	strb	w9, [x0, #1]
	mov	w9, #128
	bfxil	w9, w1, #6, #6
	strb	w9, [x0, #2]
	bfxil	w8, w1, #0, #6
	strb	w8, [x0, #3]
	mov	w0, #4
	ret
LBB0_8:
	mov	x0, #0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encodeUTF8
.subsections_via_symbols
