	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_utf8
_encode_utf8:                           ## @encode_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	%rdi, %rax
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.1:
	leaq	(%rax,%rsi,8), %r8
	xorl	%r11d, %r11d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r9, %rsi
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rax,%rdi,8), %rax
	movq	%rsi, (%r10)
	incq	%r11
	cmpq	%r11, %rcx
	je	LBB0_21
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rdx,%r11,4), %rsi
	cmpq	$127, %rsi
	jg	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rdi
	subq	%rax, %rdi
	cmpq	$8, %rdi
	jl	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	movq	%rax, %r10
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%esi, %r9d
	cmpl	$2047, %r9d                     ## imm = 0x7FF
	ja	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rsi
	subq	%rax, %rsi
	cmpq	$16, %rsi
	jl	LBB0_22
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r9, %rsi
	shrq	$6, %rsi
	addq	$192, %rsi
	leaq	8(%rax), %r10
	movq	%rsi, (%rax)
	andl	$63, %r9d
	orq	$128, %r9
	movl	$2, %edi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$65535, %r9d                    ## imm = 0xFFFF
	ja	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rsi
	subq	%rax, %rsi
	cmpq	$24, %rsi
	jl	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r9, %rsi
	shrq	$12, %rsi
	addq	$224, %rsi
	movq	%rsi, (%rax)
	movl	%r9d, %esi
	shrl	$6, %esi
	andl	$63, %esi
	orq	$128, %rsi
	leaq	16(%rax), %r10
	movq	%rsi, 8(%rax)
	andl	$63, %r9d
	orq	$128, %r9
	movl	$3, %edi
	jmp	LBB0_2
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2097151, %r9d                  ## imm = 0x1FFFFF
	ja	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rsi
	subq	%rax, %rsi
	cmpq	$32, %rsi
	jl	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r9d, %esi
	shrl	$18, %esi
	addl	$240, %esi
	movq	%rsi, (%rax)
	movl	%r9d, %esi
	shrl	$12, %esi
	andl	$63, %esi
	orq	$128, %rsi
	movq	%rsi, 8(%rax)
	movl	%r9d, %esi
	shrl	$6, %esi
	andl	$63, %esi
	orq	$128, %rsi
	leaq	24(%rax), %r10
	movq	%rsi, 16(%rax)
	andl	$63, %r9d
	orq	$128, %r9
	movl	$4, %edi
	jmp	LBB0_2
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rdi
	subq	%rax, %rdi
	cmpl	$67108863, %r9d                 ## imm = 0x3FFFFFF
	ja	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$40, %rdi
	jl	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r9d, %esi
	shrl	$24, %esi
	addl	$248, %esi
	movq	%rsi, (%rax)
	movl	%r9d, %esi
	shrl	$18, %esi
	andl	$63, %esi
	orq	$128, %rsi
	movq	%rsi, 8(%rax)
	movl	%r9d, %esi
	shrl	$12, %esi
	andl	$63, %esi
	orq	$128, %rsi
	movq	%rsi, 16(%rax)
	movl	%r9d, %esi
	shrl	$6, %esi
	andl	$63, %esi
	orl	$128, %esi
	leaq	32(%rax), %r10
	movq	%rsi, 24(%rax)
	andl	$63, %r9d
	orl	$128, %r9d
	movl	$5, %edi
	jmp	LBB0_2
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$48, %rdi
	jl	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	shrl	$30, %esi
	orl	$252, %esi
	movq	%rsi, (%rax)
	movl	%r9d, %esi
	shrl	$24, %esi
	andl	$63, %esi
	orl	$128, %esi
	movq	%rsi, 8(%rax)
	movl	%r9d, %esi
	shrl	$18, %esi
	andl	$63, %esi
	orl	$128, %esi
	movq	%rsi, 16(%rax)
	movl	%r9d, %esi
	shrl	$12, %esi
	andl	$63, %esi
	orl	$128, %esi
	movq	%rsi, 24(%rax)
	movl	%r9d, %esi
	shrl	$6, %esi
	andl	$63, %esi
	orl	$128, %esi
	leaq	40(%rax), %r10
	movq	%rsi, 32(%rax)
	andl	$63, %r9d
	orl	$128, %r9d
	movl	$6, %edi
	jmp	LBB0_2
LBB0_21:
	popq	%rbp
	retq
LBB0_22:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_utf8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_utf8
_encode_utf8:                           ; @encode_utf8
	.cfi_startproc
; %bb.0:
	cbz	x3, LBB0_20
; %bb.1:
	add	x8, x0, x1, lsl #3
	mov	w9, #128
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x0, x10, lsl #3
	str	x11, [x12]
	add	x2, x2, #4
	subs	x3, x3, #1
	b.eq	LBB0_20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x2]
	cmp	w11, #127
	b.gt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x10, x8, x0
	cmp	x10, #8
	b.lt	LBB0_21
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w10, #1
	mov	x12, x0
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	and	x10, x11, #0xffffffff
	cmp	w10, #2047
	b.hi	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x11, x8, x0
	cmp	x11, #16
	b.lt	LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	lsr	x11, x10, #6
	add	x11, x11, #192
	mov	x12, x0
	str	x11, [x12], #8
	mov	w11, #128
	bfxil	x11, x10, #0, #6
	mov	w10, #2
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ubfx	x12, x10, #16, #16
	cbnz	w12, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	x11, x8, x0
	cmp	x11, #24
	b.lt	LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	lsr	x11, x10, #12
	add	x11, x11, #224
	mov	w13, #128
	bfxil	x13, x10, #6, #6
	add	x12, x0, #16
	stp	x11, x13, [x0]
	mov	w11, #128
	bfxil	x11, x10, #0, #6
	mov	w10, #3
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ubfx	x12, x10, #21, #11
	cbnz	w12, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	x11, x8, x0
	cmp	x11, #32
	b.lt	LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	ubfx	x11, x10, #18, #14
	add	w11, w11, #240
	mov	w12, #128
	bfxil	x12, x10, #12, #6
	stp	x11, x12, [x0]
	mov	w11, #128
	bfxil	x11, x10, #6, #6
	add	x12, x0, #24
	str	x11, [x0, #16]
	mov	w11, #128
	bfxil	x11, x10, #0, #6
	mov	w10, #4
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x12, x8, x0
	ubfx	x13, x10, #26, #6
	cbnz	w13, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	x12, #40
	b.lt	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	ubfx	x11, x10, #24, #8
	add	w11, w11, #248
	mov	w12, #128
	bfxil	x12, x10, #18, #6
	stp	x11, x12, [x0]
	mov	w11, #128
	bfxil	x11, x10, #12, #6
	mov	x13, x9
	bfxil	w13, w10, #6, #6
	add	x12, x0, #32
	stp	x11, x13, [x0, #16]
	mov	x11, x9
	bfxil	w11, w10, #0, #6
	mov	w10, #5
	b	LBB0_2
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x12, #48
	b.lt	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	ubfx	x11, x11, #30, #2
	orr	w11, w11, #0xfc
	mov	x12, x9
	bfxil	w12, w10, #24, #6
	stp	x11, x12, [x0]
	mov	x11, x9
	bfxil	w11, w10, #18, #6
	mov	x12, x9
	bfxil	w12, w10, #12, #6
	stp	x11, x12, [x0, #16]
	mov	x11, x9
	bfxil	w11, w10, #6, #6
	add	x12, x0, #40
	str	x11, [x0, #32]
	mov	x11, x9
	bfxil	w11, w10, #0, #6
	mov	w10, #6
	b	LBB0_2
LBB0_20:
	ret
LBB0_21:
	mov	x0, #0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_utf8
.subsections_via_symbols
