	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomb_utf8                      ## -- Begin function tomb_utf8
	.p2align	4, 0x90
_tomb_utf8:                             ## @tomb_utf8
	.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
	jg	LBB0_2
## %bb.1:
	andl	$127, %esi
	movl	%esi, (%rdi)
	movl	$0, 4(%rdi)
	movl	$1, %eax
	popq	%rbp
	retq
LBB0_2:
	cmpl	$2048, %esi                     ## imm = 0x800
	jae	LBB0_4
## %bb.3:
	movl	$2, %eax
	movl	$192, %r8d
	jmp	LBB0_8
LBB0_4:
	cmpl	$65536, %esi                    ## imm = 0x10000
	jae	LBB0_6
## %bb.5:
	movl	$3, %eax
	movl	$224, %r8d
	jmp	LBB0_8
LBB0_6:
	cmpl	$2097152, %esi                  ## imm = 0x200000
	jae	LBB0_13
## %bb.7:
	movl	$4, %eax
	movl	$240, %r8d
LBB0_8:
	movl	%eax, %edx
	movl	%esi, %ecx
	andl	$63, %ecx
	orl	$128, %ecx
	movl	%ecx, -4(%rdi,%rdx,4)
	movl	%esi, %ecx
	sarl	$6, %ecx
	cmpl	$2, %eax
	je	LBB0_11
## %bb.9:
	andl	$63, %ecx
	orl	$128, %ecx
	movl	%ecx, -8(%rdi,%rdx,4)
	movl	%esi, %ecx
	sarl	$12, %ecx
	cmpq	$3, %rdx
	je	LBB0_11
## %bb.10:
	andl	$63, %ecx
	orl	$128, %ecx
	movl	%ecx, -12(%rdi,%rdx,4)
	sarl	$18, %esi
	movl	%esi, %ecx
LBB0_11:
	orl	%r8d, %ecx
	movl	%ecx, (%rdi)
	movl	$0, (%rdi,%rdx,4)
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_werr
	movl	$-1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"illegal uf8 char (%x)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomb_utf8                      ; -- Begin function tomb_utf8
	.p2align	2
_tomb_utf8:                             ; @tomb_utf8
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	w1, #127
	b.gt	LBB0_2
; %bb.1:
	and	w8, w1, #0x7f
	stp	w8, wzr, [x0]
	mov	w8, #1
	b	LBB0_14
LBB0_2:
	cmp	w1, #2048
	b.hs	LBB0_4
; %bb.3:
	mov	w8, #2
	mov	w9, #192
	b	LBB0_8
LBB0_4:
	cmp	w1, #16, lsl #12                ; =65536
	b.hs	LBB0_6
; %bb.5:
	mov	w8, #3
	mov	w9, #224
	b	LBB0_8
LBB0_6:
	cmp	w1, #512, lsl #12               ; =2097152
	b.hs	LBB0_15
; %bb.7:
	mov	w8, #4
	mov	w9, #240
LBB0_8:
	mov	w10, w8
	mov	w11, #128
	mov	w12, #128
	bfxil	w12, w1, #0, #6
	add	x13, x0, w8, uxtw #2
	stur	w12, [x13, #-4]
	subs	x12, x10, #2
	b.eq	LBB0_11
; %bb.9:
	bfxil	w11, w1, #6, #6
	str	w11, [x0, x12, lsl #2]
	subs	x11, x10, #3
	b.eq	LBB0_12
; %bb.10:
	mov	w12, #128
	bfxil	w12, w1, #12, #6
	str	w12, [x0, x11, lsl #2]
	asr	w11, w1, #18
	b	LBB0_13
LBB0_11:
	asr	w11, w1, #6
	b	LBB0_13
LBB0_12:
	asr	w11, w1, #12
LBB0_13:
	orr	w9, w11, w9
	str	w9, [x0]
	str	wzr, [x0, x10, lsl #2]
LBB0_14:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_werr
	mov	w8, #-1
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"illegal uf8 char (%x)"

.subsections_via_symbols
