	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efi_utf16_to_utf8
_efi_utf16_to_utf8:                     ## @efi_utf16_to_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
	testl	%edx, %edx
	jne	LBB0_2
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, (%rax)
	addq	$4, %rax
	testl	%edx, %edx
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%rsi), %r8
	movl	%edx, %ecx
	movl	(%rsi), %r10d
	decl	%ecx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$55296, %r10d                   ## imm = 0xD800
	jb	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$56319, %r10d                   ## imm = 0xDBFF
	ja	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r8), %r9d
	movl	%r9d, %edi
	andl	$-1024, %edi                    ## imm = 0xFC00
	cmpl	$56320, %edi                    ## imm = 0xDC00
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	shll	$10, %r10d
	andl	$1047552, %r10d                 ## imm = 0xFFC00
	andl	$1023, %r9d                     ## imm = 0x3FF
	addl	%r9d, %r10d
	addl	$65536, %r10d                   ## imm = 0x10000
	addq	$8, %rsi
	addl	$-2, %edx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r8, %rsi
	movl	%ecx, %edx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r10d, %edi
	andl	$-2048, %edi                    ## imm = 0xF800
	movl	$65533, %ecx                    ## imm = 0xFFFD
	cmpl	$55296, %edi                    ## imm = 0xD800
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r10d, %ecx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$127, %ecx
	jbe	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edi
	cmpl	$2047, %ecx                     ## imm = 0x7FF
	ja	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	shrl	$6, %edi
	addl	$192, %edi
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	ja	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	shrl	$12, %edi
	addl	$224, %edi
	movl	%edi, (%rax)
	addq	$4, %rax
	jmp	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	shrl	$18, %edi
	addl	$240, %edi
	movl	%edi, (%rax)
	movl	%ecx, %edi
	shrl	$12, %edi
	andl	$63, %edi
	orl	$128, %edi
	movl	%edi, 4(%rax)
	addq	$8, %rax
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edi
	shrl	$6, %edi
	andl	$63, %edi
	orl	$128, %edi
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%edi, (%rax)
	andl	$63, %ecx
	orl	$128, %ecx
	movl	%ecx, 4(%rax)
	addq	$8, %rax
	testl	%edx, %edx
	jne	LBB0_2
LBB0_12:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_efi_utf16_to_utf8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efi_utf16_to_utf8
_efi_utf16_to_utf8:                     ; @efi_utf16_to_utf8
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_17
; %bb.1:
	mov	w9, #65533
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	w8, [x0], #4
	mov	x8, x0
	cbz	w2, LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x1
	ldr	w8, [x11], #4
	subs	w10, w2, #1
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	lsr	w12, w8, #11
	cmp	w12, #27
	b.lo	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	lsr	w12, w8, #10
	cmp	w12, #54
	b.hi	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [x11]
	lsr	w13, w12, #10
	and	w12, w12, #0x3ff
	bfi	w12, w8, #10, #10
	add	w12, w12, #16, lsl #12          ; =65536
	add	x14, x1, #8
	sub	w15, w2, #2
	cmp	w13, #55
	csel	w2, w10, w15, ne
	csel	x1, x11, x14, ne
	csel	w8, w8, w12, ne
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x11
	mov	x2, x10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsr	w10, w8, #11
	cmp	w10, #27
	csel	w8, w9, w8, eq
	cmp	w8, #127
	b.ls	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #2047
	b.hi	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	lsr	w10, w8, #6
	add	w10, w10, #192
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	lsr	w10, w8, #16
	cbnz	w10, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	lsr	w10, w8, #12
	add	w10, w10, #224
	str	w10, [x0], #4
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	lsr	w10, w8, #18
	add	w10, w10, #240
	mov	w11, #128
	bfxil	w11, w8, #12, #6
	stp	w10, w11, [x0], #8
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w10, #128
	bfxil	w10, w8, #6, #6
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w10, [x0]
	mov	w10, #128
	bfxil	w10, w8, #0, #6
	add	x8, x0, #8
	str	w10, [x0, #4]
	mov	x0, x8
	cbnz	w2, LBB0_3
LBB0_16:
	mov	x0, x8
LBB0_17:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_efi_utf16_to_utf8
.subsections_via_symbols
