	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf16_to_unicode
_utf16_to_unicode:                      ## @utf16_to_unicode
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r12
	cmpq	$1, %rdx
	jne	LBB0_4
## %bb.3:
	movq	_UNICODE_R_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movl	$-1, %ebx
	jmp	LBB0_21
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_4:
	movl	%ecx, %r13d
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.5:
	callq	_archive_be16dec
	jmp	LBB0_7
LBB0_6:
	callq	_archive_le16dec
LBB0_7:
	movl	%eax, %r15d
	leaq	2(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_IS_HIGH_SURROGATE_LA
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	cmpq	$4, %r14
	jb	LBB0_14
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_archive_be16dec
	jmp	LBB0_13
LBB0_8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_archive_le16dec
LBB0_13:
	movl	%eax, %r12d
LBB0_14:
	movl	%r12d, %edi
	callq	_IS_LOW_SURROGATE_LA
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_combine_surrogate_pair
	movl	%eax, %r15d
	leaq	4(%rbx), %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_17:
	movl	%r15d, %edi
	callq	_IS_SURROGATE_PAIR_LA
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	movq	_UNICODE_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	ja	LBB0_19
## %bb.20:
	movl	%r15d, (%r12)
	subl	%ebx, %r14d
	movl	%r14d, %ebx
	jmp	LBB0_21
LBB0_19:
	movq	_UNICODE_R_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	subl	%r14d, %ebx
	jmp	LBB0_21
LBB0_15:
	movq	_UNICODE_R_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	$-2, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UNICODE_R_CHAR,4,2             ## @UNICODE_R_CHAR
	.comm	_UNICODE_MAX,4,2                ## @UNICODE_MAX
	.no_dead_strip	_utf16_to_unicode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf16_to_unicode
_utf16_to_unicode:                      ; @utf16_to_unicode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x2, LBB0_3
; %bb.1:
	mov	x24, x2
	mov	x20, x0
	cmp	x2, #1
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _UNICODE_R_CHAR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UNICODE_R_CHAR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	w0, #-1
	b	LBB0_21
LBB0_3:
	mov	w0, #0
	b	LBB0_21
LBB0_4:
	mov	x23, x3
	mov	x19, x1
	mov	x0, x1
	cbz	w3, LBB0_6
; %bb.5:
	bl	_archive_be16dec
	b	LBB0_7
LBB0_6:
	bl	_archive_le16dec
LBB0_7:
	mov	x21, x0
	add	x22, x19, #2
	bl	_IS_HIGH_SURROGATE_LA
	cbz	x0, LBB0_16
; %bb.8:
	cmp	x24, #4
	b.lo	LBB0_11
; %bb.9:
	mov	x0, x22
	cbz	w23, LBB0_12
; %bb.10:
	bl	_archive_be16dec
	b	LBB0_13
LBB0_11:
	mov	w22, #0
	b	LBB0_14
LBB0_12:
	bl	_archive_le16dec
LBB0_13:
	mov	x22, x0
LBB0_14:
	mov	x0, x22
	bl	_IS_LOW_SURROGATE_LA
	cbz	x0, LBB0_20
; %bb.15:
	mov	x0, x21
	mov	x1, x22
	bl	_combine_surrogate_pair
	mov	x21, x0
	add	x22, x19, #4
LBB0_16:
	mov	x0, x21
	bl	_IS_SURROGATE_PAIR_LA
	cbnz	x0, LBB0_19
; %bb.17:
Lloh3:
	adrp	x8, _UNICODE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UNICODE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, w8
	b.hi	LBB0_19
; %bb.18:
	str	w21, [x20]
	sub	w0, w22, w19
	b	LBB0_21
LBB0_19:
Lloh6:
	adrp	x8, _UNICODE_R_CHAR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UNICODE_R_CHAR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20]
	sub	w0, w19, w22
	b	LBB0_21
LBB0_20:
Lloh9:
	adrp	x8, _UNICODE_R_CHAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UNICODE_R_CHAR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	w0, #-2
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_UNICODE_R_CHAR,4,2             ; @UNICODE_R_CHAR
	.comm	_UNICODE_MAX,4,2                ; @UNICODE_MAX
	.no_dead_strip	_utf16_to_unicode
.subsections_via_symbols
