	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_utf8_to_ucs4              ## -- Begin function grub_utf8_to_ucs4
	.p2align	4, 0x90
_grub_utf8_to_ucs4:                     ## @grub_utf8_to_ucs4
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	%rdx, (%r8)
LBB0_2:
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%r9d, %r9d
	movq	%rdi, %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%rdx), %r10
	movl	(%rdx), %r11d
	leaq	-1(%rcx), %r15
	cmpq	$-1, %rcx
	cmoveq	%rcx, %r15
	testl	%r9d, %r9d
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ebx
	andl	$192, %ebx
	movl	$63, %r12d
	cmpl	$128, %ebx
	jne	LBB0_26
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	shll	$6, %r14d
	andl	$63, %r11d
	movl	%r11d, %r12d
	orl	%r14d, %r12d
	movq	%r10, %rdx
	movq	%r15, %rcx
	decl	%r9d
	je	LBB0_26
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rcx
	movq	%r10, %rdx
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%r11d, %r11d
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	testb	$-128, %r11b
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %r12d
LBB0_25:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r10, %rdx
	movq	%r15, %rcx
LBB0_26:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, (%rax)
	addq	$4, %rax
	decq	%rsi
	xorl	%r9d, %r9d
LBB0_27:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %r14d
	testq	%rcx, %rcx
	je	LBB0_30
LBB0_29:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%rsi, %rsi
	jne	LBB0_7
	jmp	LBB0_30
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ecx
	andl	$224, %ecx
	cmpl	$192, %ecx
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$31, %r11d
	movl	$1, %r9d
	jmp	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ecx
	andl	$240, %ecx
	cmpl	$224, %ecx
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$15, %r11d
	movl	$2, %r9d
	jmp	LBB0_17
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ecx
	andl	$248, %ecx
	cmpl	$240, %ecx
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$7, %r11d
	movl	$3, %r9d
	jmp	LBB0_17
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ecx
	andl	$252, %ecx
	cmpl	$248, %ecx
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$3, %r11d
	movl	$4, %r9d
	jmp	LBB0_17
LBB0_24:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r11d, %ecx
	andl	$254, %ecx
	movl	$63, %r12d
	cmpl	$252, %ecx
	jne	LBB0_25
## %bb.33:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$1, %r11d
	movl	$5, %r9d
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rcx
	movq	%r10, %rdx
	movl	%r11d, %r14d
	testq	%rcx, %rcx
	jne	LBB0_29
	jmp	LBB0_30
LBB0_3:
	movq	%rdi, %rax
	testq	%r8, %r8
	jne	LBB0_31
	jmp	LBB0_32
LBB0_5:
	movq	%rdi, %rax
LBB0_30:
	testq	%r8, %r8
	je	LBB0_32
LBB0_31:
	movq	%rdx, (%r8)
LBB0_32:
	subq	%rdi, %rax
	sarq	$2, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r10, %rdx
	testq	%r8, %r8
	jne	LBB0_31
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_utf8_to_ucs4              ; -- Begin function grub_utf8_to_ucs4
	.p2align	2
_grub_utf8_to_ucs4:                     ; @grub_utf8_to_ucs4
	.cfi_startproc
; %bb.0:
	cbz	x4, LBB0_2
; %bb.1:
	str	x2, [x4]
LBB0_2:
	cbz	x3, LBB0_27
; %bb.3:
	cbz	x1, LBB0_28
; %bb.4:
	mov	w9, #0
	mov	w10, #0
	mov	x8, x0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x2
	ldr	w13, [x11], #4
	sub	x12, x3, #1
	cmn	x3, #1
	csinv	x12, x12, xzr, ne
	cbz	w10, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w14, w13, #0xc0
	cmp	w14, #128
	b.ne	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	bfi	w13, w9, #6, #26
	mov	x9, x13
	subs	w10, w10, #1
	b.ne	LBB0_24
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	w13, LBB0_32
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w13, #7, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, x13
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x11
	mov	x3, x12
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w9, #63
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #0
	str	w9, [x8], #4
	sub	x1, x1, #1
	cbnz	x3, LBB0_25
	b	LBB0_29
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xe0
	cmp	w9, #192
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0x1f
	mov	w10, #1
	b	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xf0
	cmp	w9, #224
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xf
	mov	w10, #2
	b	LBB0_24
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xf8
	cmp	w9, #240
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0x7
	mov	w10, #3
	b	LBB0_24
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xfc
	cmp	w9, #248
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0x3
	mov	w10, #4
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0xfe
	cmp	w9, #252
	b.ne	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w13, #0x1
	mov	w10, #5
LBB0_24:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x3, x12
	mov	x2, x11
	cbz	x3, LBB0_29
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	x1, LBB0_5
	b	LBB0_29
LBB0_26:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w9, #63
	b	LBB0_11
LBB0_27:
	mov	x8, x0
	cbnz	x4, LBB0_30
	b	LBB0_31
LBB0_28:
	mov	x8, x0
LBB0_29:
	cbz	x4, LBB0_31
LBB0_30:
	str	x2, [x4]
LBB0_31:
	sub	x8, x8, x0
	asr	x0, x8, #2
	ret
LBB0_32:
	mov	x2, x11
	cbnz	x4, LBB0_30
	b	LBB0_31
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
