	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jvp_utf8_encode                ## -- Begin function jvp_utf8_encode
	.p2align	4, 0x90
_jvp_utf8_encode:                       ## @jvp_utf8_encode
	.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
	movq	%rsi, %r14
	movl	%edi, %r15d
	xorl	%edi, %edi
	cmpl	$1114112, %r15d                 ## imm = 0x110000
	setb	%dil
	callq	_assert
	cmpl	$127, %r15d
	jg	LBB0_2
## %bb.1:
	leaq	1(%r14), %rbx
	movb	%r15b, (%r14)
	jmp	LBB0_7
LBB0_2:
	movl	%r15d, %eax
	cmpl	$2047, %r15d                    ## imm = 0x7FF
	ja	LBB0_4
## %bb.3:
	shrl	$6, %eax
	orb	$-64, %al
	movb	%al, (%r14)
	movl	%r15d, %eax
	andb	$63, %al
	orb	$-128, %al
	leaq	2(%r14), %rbx
	movb	%al, 1(%r14)
	jmp	LBB0_7
LBB0_4:
	cmpl	$65535, %r15d                   ## imm = 0xFFFF
	ja	LBB0_6
## %bb.5:
	shrl	$12, %eax
	orb	$-32, %al
	movb	%al, (%r14)
	movl	%r15d, %eax
	shrl	$6, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 1(%r14)
	movl	%r15d, %eax
	andb	$63, %al
	orb	$-128, %al
	leaq	3(%r14), %rbx
	movb	%al, 2(%r14)
	jmp	LBB0_7
LBB0_6:
	shrl	$18, %eax
	andb	$7, %al
	orb	$-16, %al
	movb	%al, (%r14)
	movl	%r15d, %eax
	shrl	$12, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 1(%r14)
	movl	%r15d, %eax
	shrl	$6, %eax
	andb	$63, %al
	orb	$-128, %al
	movb	%al, 2(%r14)
	movl	%r15d, %eax
	andb	$63, %al
	orb	$-128, %al
	leaq	4(%r14), %rbx
	movb	%al, 3(%r14)
LBB0_7:
	subq	%r14, %rbx
	movl	%r15d, %edi
	callq	_jvp_utf8_encode_length
	cltq
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	movl	%ebx, %eax
	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	_jvp_utf8_encode                ; -- Begin function jvp_utf8_encode
	.p2align	2
_jvp_utf8_encode:                       ; @jvp_utf8_encode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	cmp	w0, #272, lsl #12               ; =1114112
	cset	w0, lo
	bl	_assert
	cmp	w19, #127
	b.gt	LBB0_2
; %bb.1:
	mov	x8, x20
	strb	w19, [x8], #1
	b	LBB0_7
LBB0_2:
	cmp	w19, #2047
	b.hi	LBB0_4
; %bb.3:
	lsr	w8, w19, #6
	orr	w8, w8, #0xc0
	strb	w8, [x20]
	mov	w9, #128
	bfxil	w9, w19, #0, #6
	add	x8, x20, #2
	strb	w9, [x20, #1]
	b	LBB0_7
LBB0_4:
	lsr	w8, w19, #16
	cbnz	w8, LBB0_6
; %bb.5:
	lsr	w8, w19, #12
	orr	w8, w8, #0xe0
	strb	w8, [x20]
	mov	w9, #128
	mov	w8, #128
	bfxil	w8, w19, #6, #6
	strb	w8, [x20, #1]
	bfxil	w9, w19, #0, #6
	add	x8, x20, #3
	strb	w9, [x20, #2]
	b	LBB0_7
LBB0_6:
	mov	w8, #240
	bfxil	w8, w19, #18, #3
	strb	w8, [x20]
	mov	w9, #128
	mov	w8, #128
	bfxil	w8, w19, #12, #6
	strb	w8, [x20, #1]
	mov	w8, #128
	bfxil	w8, w19, #6, #6
	strb	w8, [x20, #2]
	bfxil	w9, w19, #0, #6
	add	x8, x20, #4
	strb	w9, [x20, #3]
LBB0_7:
	sub	x20, x8, x20
	mov	x0, x19
	bl	_jvp_utf8_encode_length
	cmp	x20, w0, sxtw
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
