	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ConvertUTF16toUTF8             ## -- Begin function ConvertUTF16toUTF8
	.p2align	4, 0x90
_ConvertUTF16toUTF8:                    ## @ConvertUTF16toUTF8
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_conversionOK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %r11
	movq	(%rdx), %r13
	cmpq	%rsi, %r11
	jae	LBB0_30
## %bb.1:
	movq	%rcx, %r9
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_UNI_SUR_HIGH_START@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_UNI_SUR_LOW_START@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_halfShift@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_halfBase@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_strictConversion@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_firstByteMark@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ebx
	andl	$63, %ebx
	orl	$128, %ebx
	movl	%ebx, -4(%rdi)
	addq	$-4, %rdi
	sarq	$6, %r15
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ebx
	andl	$63, %ebx
	orl	$128, %ebx
	movl	%ebx, -4(%rdi)
	addq	$-4, %rdi
	sarq	$6, %r15
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	orl	(%rax,%rdx,8), %r15d
	movl	%r15d, -4(%rdi)
	addq	$-4, %rdi
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rdi,%rdx,4), %r13
	movq	%r12, %r11
	cmpq	%rsi, %r12
	jae	LBB0_29
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	8(%r11), %r12
	movq	(%r11), %r15
	movq	%r15, %rdx
	subq	%r10, %rdx
	jl	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_UNI_SUR_HIGH_END@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %r15
	jg	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rsi, %r12
	jae	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %r14
	movq	%r14, %rdi
	subq	-88(%rbp), %rdi                 ## 8-byte Folded Reload
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_UNI_SUR_LOW_END@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %r14
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	shlq	%cl, %rdx
	addq	%rdx, %rdi
	addq	-80(%rbp), %rdi                 ## 8-byte Folded Reload
	leaq	16(%r11), %r12
	movq	%rdi, %r15
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r8, -72(%rbp)                  ## 8-byte Folded Reload
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_UNI_SUR_LOW_START@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r15
	jl	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_UNI_SUR_LOW_END@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r15
	jg	LBB0_15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r8, -72(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_9
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movw	$1, %dx
	cmpq	$128, %r15
	jl	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movw	$2, %dx
	cmpq	$2048, %r15                     ## imm = 0x800
	jb	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movw	$3, %dx
	cmpq	$65536, %r15                    ## imm = 0x10000
	jb	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$1114112, %r15                  ## imm = 0x110000
	movl	$0, %edx
	adcw	$3, %dx
	cmpq	$1114112, %r15                  ## imm = 0x110000
	jb	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_UNI_REPLACEMENT_CHAR@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movzwl	%dx, %edx
	leaq	(,%rdx,4), %rdi
	addq	%r13, %rdi
	cmpq	%r9, %rdi
	ja	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rdx), %ebx
	cmpl	$3, %ebx
	ja	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rbx
	addq	%rax, %rbx
	jmpq	*%rbx
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ebx
	andl	$63, %ebx
	orl	$128, %ebx
	movl	%ebx, -4(%rdi)
	addq	$-4, %rdi
	sarq	$6, %r15
	jmp	LBB0_25
LBB0_21:
	movq	_targetExhausted@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_29:
	movq	%r12, %r11
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_30
LBB0_9:
	movq	_sourceIllegal@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_11:
	movq	_sourceExhausted@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_30:
	movq	%r11, (%rdi)
	movq	%r13, (%rdx)
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
LJTI0_0:
	.long	L0_0_set_27
	.long	L0_0_set_26
	.long	L0_0_set_25
	.long	L0_0_set_24
	.end_data_region
                                        ## -- End function
	.comm	_conversionOK,4,2               ## @conversionOK
	.comm	_UNI_SUR_HIGH_START,8,3         ## @UNI_SUR_HIGH_START
	.comm	_UNI_SUR_HIGH_END,8,3           ## @UNI_SUR_HIGH_END
	.comm	_UNI_SUR_LOW_START,8,3          ## @UNI_SUR_LOW_START
	.comm	_UNI_SUR_LOW_END,8,3            ## @UNI_SUR_LOW_END
	.comm	_halfShift,8,3                  ## @halfShift
	.comm	_halfBase,8,3                   ## @halfBase
	.comm	_strictConversion,8,3           ## @strictConversion
	.comm	_sourceIllegal,4,2              ## @sourceIllegal
	.comm	_sourceExhausted,4,2            ## @sourceExhausted
	.comm	_UNI_REPLACEMENT_CHAR,8,3       ## @UNI_REPLACEMENT_CHAR
	.comm	_targetExhausted,4,2            ## @targetExhausted
	.comm	_firstByteMark,8,3              ## @firstByteMark
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ConvertUTF16toUTF8             ; -- Begin function ConvertUTF16toUTF8
	.p2align	2
_ConvertUTF16toUTF8:                    ; @ConvertUTF16toUTF8
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	.cfi_offset w25, -56
	.cfi_offset w26, -64
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _conversionOK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _conversionOK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x19, [x2]
	cmp	x20, x1
	b.hs	LBB0_29
; %bb.1:
Lloh3:
	adrp	x10, _UNI_SUR_HIGH_START@GOTPAGE
Lloh4:
	ldr	x10, [x10, _UNI_SUR_HIGH_START@GOTPAGEOFF]
Lloh5:
	adrp	x9, _UNI_SUR_LOW_START@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UNI_SUR_LOW_START@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldr	x11, [x9]
Lloh8:
	adrp	x12, _halfShift@GOTPAGE
Lloh9:
	ldr	x12, [x12, _halfShift@GOTPAGEOFF]
Lloh10:
	adrp	x13, _halfBase@GOTPAGE
Lloh11:
	ldr	x13, [x13, _halfBase@GOTPAGEOFF]
Lloh12:
	ldr	x12, [x12]
Lloh13:
	ldr	x13, [x13]
Lloh14:
	adrp	x14, _strictConversion@GOTPAGE
Lloh15:
	ldr	x14, [x14, _strictConversion@GOTPAGEOFF]
Lloh16:
	adrp	x15, _firstByteMark@GOTPAGE
Lloh17:
	ldr	x15, [x15, _firstByteMark@GOTPAGEOFF]
Lloh18:
	ldr	x14, [x14]
Lloh19:
	ldr	x15, [x15]
Lloh20:
	adrp	x16, lJTI0_0@PAGE
Lloh21:
	add	x16, x16, lJTI0_0@PAGEOFF
Lloh22:
	adrp	x17, _UNI_SUR_HIGH_END@GOTPAGE
Lloh23:
	ldr	x17, [x17, _UNI_SUR_HIGH_END@GOTPAGEOFF]
Lloh24:
	adrp	x5, _UNI_SUR_LOW_END@GOTPAGE
Lloh25:
	ldr	x5, [x5, _UNI_SUR_LOW_END@GOTPAGEOFF]
	mov	w6, #3
	mov	x21, x20
Lloh26:
	adrp	x7, _UNI_REPLACEMENT_CHAR@GOTPAGE
Lloh27:
	ldr	x7, [x7, _UNI_REPLACEMENT_CHAR@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w20, #128
	bfxil	w20, w22, #0, #6
	str	w20, [x23, #-4]!
	asr	x22, x22, #6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w20, #128
	bfxil	w20, w22, #0, #6
	str	w20, [x23, #-4]!
	asr	x22, x22, #6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x20, [x15, x19, lsl #3]
	orr	w20, w20, w22
	str	w20, [x23, #-4]!
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x19, x23, x19, lsl #2
	mov	x20, x21
	cmp	x21, x1
	b.hs	LBB0_25
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x21], #8
	ldr	x24, [x17]
	subs	x23, x22, x10
	ccmp	x22, x24, #0, ge
	b.le	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x14, x4
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x23, [x9]
	ldr	x24, [x5]
	cmp	x22, x23
	ccmp	x22, x24, #0, ge
	b.gt	LBB0_12
	b	LBB0_26
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	x21, x1
	b.hs	LBB0_27
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x25, [x21]
	ldr	x26, [x5]
	subs	x24, x25, x11
	ccmp	x25, x26, #0, ge
	b.le	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	x14, x4
	b.eq	LBB0_26
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x22, #128
	b.ge	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w24, #1
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	lsl	x21, x23, x12
	add	x21, x24, x21
	add	x22, x21, x13
	add	x21, x20, #16
	cmp	x22, #128
	b.lt	LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x22, #2048
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w24, #2
	b	LBB0_20
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x22, #16, lsl #12               ; =65536
	b.hs	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w24, #3
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x23, [x7]
	cmp	x22, #272, lsl #12              ; =1114112
	csel	x22, x22, x23, lo
	cinc	w24, w6, lo
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x19, w24, uxth #2
	cmp	x23, x3
	b.hi	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	and	x19, x24, #0xffff
	sub	w20, w19, #1
	cmp	w20, #3
	b.hi	LBB0_5
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=1
	adr	x24, LBB0_2
	ldrb	w25, [x16, x20]
	add	x24, x24, x25, lsl #2
	br	x24
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w20, #128
	bfxil	w20, w22, #0, #6
	str	w20, [x23, #-4]!
	asr	x22, x22, #6
	b	LBB0_2
LBB0_24:
Lloh28:
	adrp	x8, _targetExhausted@GOTPAGE
Lloh29:
	ldr	x8, [x8, _targetExhausted@GOTPAGEOFF]
	b	LBB0_28
LBB0_25:
	mov	x20, x21
	b	LBB0_29
LBB0_26:
Lloh30:
	adrp	x8, _sourceIllegal@GOTPAGE
Lloh31:
	ldr	x8, [x8, _sourceIllegal@GOTPAGEOFF]
	b	LBB0_28
LBB0_27:
Lloh32:
	adrp	x8, _sourceExhausted@GOTPAGE
Lloh33:
	ldr	x8, [x8, _sourceExhausted@GOTPAGEOFF]
LBB0_28:
	ldr	w8, [x8]
LBB0_29:
	str	x20, [x0]
	str	x19, [x2]
	mov	x0, x8
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_23-LBB0_2)>>2
                                        ; -- End function
	.comm	_conversionOK,4,2               ; @conversionOK
	.comm	_UNI_SUR_HIGH_START,8,3         ; @UNI_SUR_HIGH_START
	.comm	_UNI_SUR_HIGH_END,8,3           ; @UNI_SUR_HIGH_END
	.comm	_UNI_SUR_LOW_START,8,3          ; @UNI_SUR_LOW_START
	.comm	_UNI_SUR_LOW_END,8,3            ; @UNI_SUR_LOW_END
	.comm	_halfShift,8,3                  ; @halfShift
	.comm	_halfBase,8,3                   ; @halfBase
	.comm	_strictConversion,8,3           ; @strictConversion
	.comm	_sourceIllegal,4,2              ; @sourceIllegal
	.comm	_sourceExhausted,4,2            ; @sourceExhausted
	.comm	_UNI_REPLACEMENT_CHAR,8,3       ; @UNI_REPLACEMENT_CHAR
	.comm	_targetExhausted,4,2            ; @targetExhausted
	.comm	_firstByteMark,8,3              ; @firstByteMark
.subsections_via_symbols
