	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_utf16_conv_utf8                ## -- Begin function utf16_conv_utf8
	.p2align	4, 0x90
_utf16_conv_utf8:                       ## @utf16_conv_utf8
	.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
	movl	$1, %eax
	testq	%rcx, %rcx
	je	LBB0_37
## %bb.1:
	movq	%rcx, %r8
	xorl	%ecx, %ecx
	leaq	_utf16_conv_utf8.kUtf8Limits(%rip), %r10
	xorl	%r9d, %r9d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r9
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r11, %rcx
	cmpq	%r8, %r11
	je	LBB0_41
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rcx), %r11
	movl	(%rdx,%rcx,4), %r15d
	cmpl	$127, %r15d
	jg	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movsbl	%r15b, %ecx
	movl	%ecx, (%rdi,%r9,4)
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %ebx
	andl	$-2048, %ebx                    ## imm = 0xF800
	cmpl	$55296, %ebx                    ## imm = 0xD800
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$56319, %r15d                   ## imm = 0xDBFF
	ja	LBB0_40
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r8, %r11
	je	LBB0_40
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rdx,%rcx,4), %r14d
	leal	-57344(%r14), %ebx
	cmpl	$-1024, %ebx                    ## imm = 0xFC00
	jb	LBB0_40
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rcx
	shll	$10, %r15d
	addl	$-56623104, %r15d               ## imm = 0xFCA00000
	addl	$-56320, %r14d                  ## imm = 0xFFFF2400
	orl	%r15d, %r14d
	addl	$65536, %r14d                   ## imm = 0x10000
	movq	%rcx, %r11
	movl	%r14d, %r15d
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r14d
	cmpl	$2048, %r15d                    ## imm = 0x800
	jl	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$2, %r14d
	cmpl	$65536, %r15d                   ## imm = 0x10000
	jb	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$3, %r14d
	cmpl	$2097152, %r15d                 ## imm = 0x200000
	jb	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$67108864, %r15d                ## imm = 0x4000000
	movl	$5, %r14d
	sbbl	$0, %r14d
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	-1(%r14), %r12d
	leal	(%r14,%r14), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	addl	(%r10,%r12,4), %ebx
	movsbl	%bl, %ecx
	movl	%ecx, (%rdi,%r9,4)
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	leal	-1(%r14), %r12d
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	(%r12,%r12), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	andl	$63, %ebx
	orl	$-128, %ebx
	movl	%ebx, 4(%rdi,%r9,4)
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	je	LBB0_33
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	-2(%r14), %r12d
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	(%r12,%r12), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	andl	$63, %ebx
	orl	$-128, %ebx
	movl	%ebx, 8(%rdi,%r9,4)
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	je	LBB0_34
## %bb.24:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	-3(%r14), %r12d
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	(%r12,%r12), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	andl	$63, %ebx
	orl	$-128, %ebx
	movl	%ebx, 12(%rdi,%r9,4)
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	je	LBB0_35
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	-4(%r14), %r12d
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	(%r12,%r12), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	andl	$63, %ebx
	orl	$-128, %ebx
	movl	%ebx, 16(%rdi,%r9,4)
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	je	LBB0_36
## %bb.30:                              ##   in Loop: Header=BB0_4 Depth=1
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	addl	%r14d, %r14d
	leal	(%r14,%r14,2), %ecx
	addb	$-30, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r15d
	andl	$63, %r15d
	orl	$-128, %r15d
	movl	%r15d, 20(%rdi,%r9,4)
LBB0_32:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$6, %r9
	jmp	LBB0_3
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %r9
	jmp	LBB0_3
LBB0_34:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$3, %r9
	jmp	LBB0_3
LBB0_35:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %r9
	jmp	LBB0_3
LBB0_36:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$5, %r9
	jmp	LBB0_3
LBB0_37:
	xorl	%r9d, %r9d
	jmp	LBB0_41
LBB0_40:
	xorl	%eax, %eax
LBB0_41:
	movq	%r9, (%rsi)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @utf16_conv_utf8.kUtf8Limits
_utf16_conv_utf8.kUtf8Limits:
	.long	192                             ## 0xc0
	.long	224                             ## 0xe0
	.long	240                             ## 0xf0
	.long	248                             ## 0xf8
	.long	252                             ## 0xfc

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_utf16_conv_utf8                ; -- Begin function utf16_conv_utf8
	.p2align	2
_utf16_conv_utf8:                       ; @utf16_conv_utf8
	.cfi_startproc
; %bb.0:
	cbz	x3, LBB0_34
; %bb.1:
	mov	x17, #0
	mov	x8, #0
	mov	w9, #-56623104
	mov	w10, #-56320
	mov	w11, #6
	mov	w12, #3
	mov	w13, #4
Lloh0:
	adrp	x14, _utf16_conv_utf8.kUtf8Limits@PAGE
Lloh1:
	add	x14, x14, _utf16_conv_utf8.kUtf8Limits@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x17, x15
	cmp	x15, x3
	b.eq	LBB0_35
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x15, x17, #1
	ldr	w16, [x2, x17, lsl #2]
	cmp	w16, #127
	b.gt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w16, w16
	str	w16, [x0, x8, lsl #2]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsr	w4, w16, #11
	cmp	w4, #27
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	lsr	w4, w16, #10
	cmp	w4, #54
	ccmp	x15, x3, #4, ls
	b.eq	LBB0_36
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w4, [x2, x15, lsl #2]
	sub	w15, w4, #14, lsl #12           ; =57344
	cmn	w15, #1024
	b.lo	LBB0_36
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x15, x17, #2
	add	w16, w9, w16, lsl #10
	add	w17, w4, w10
	orr	w16, w17, w16
	add	w16, w16, #16, lsl #12          ; =65536
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w16, #2048
	b.ge	LBB0_30
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w17, #1
	cbz	x0, LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w4, w17, #1
	ldr	w4, [x14, w4, uxtw #2]
	add	w5, w17, w17, lsl #1
	lsl	w5, w5, #1
	asr	w5, w16, w5
	add	w4, w4, w5
	sxtb	w4, w4
	str	w4, [x0, x8, lsl #2]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w4, w17, #1
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x5, x8, #1
	add	w6, w4, w4, lsl #1
	lsl	w6, w6, #1
	asr	w6, w16, w6
	mov	w7, #-128
	bfxil	w7, w6, #0, #6
	str	w7, [x0, x5, lsl #2]
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x5, x8, #2
	cbz	w4, LBB0_32
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w6, w17, #2
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w4, w6, w6, lsl #1
	lsl	w4, w4, #1
	asr	w4, w16, w4
	mov	w7, #-128
	bfxil	w7, w4, #0, #6
	str	w7, [x0, x5, lsl #2]
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x4, x8, #3
	cbz	w6, LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w5, w17, #3
	cbz	x0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w6, w5, w5, lsl #1
	lsl	w6, w6, #1
	asr	w6, w16, w6
	mov	w7, #-128
	bfxil	w7, w6, #0, #6
	str	w7, [x0, x4, lsl #2]
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x4, x8, #4
	cbz	w5, LBB0_2
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w5, w17, #4
	cbz	x0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w6, w5, w5, lsl #1
	lsl	w6, w6, #1
	asr	w6, w16, w6
	mov	w7, #-128
	bfxil	w7, w6, #0, #6
	str	w7, [x0, x4, lsl #2]
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x4, x8, #5
	cbz	w5, LBB0_2
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_4 Depth=1
	mul	w17, w17, w11
	sub	w17, w17, #30
	asr	w16, w16, w17
	mov	w17, #-128
	bfxil	w17, w16, #0, #6
	str	w17, [x0, x4, lsl #2]
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #6
	b	LBB0_3
LBB0_30:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w16, #16, lsl #12               ; =65536
	b.hs	LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w17, #2
	cbnz	x0, LBB0_14
	b	LBB0_15
LBB0_32:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x5
	b	LBB0_3
LBB0_33:                                ;   in Loop: Header=BB0_4 Depth=1
	lsr	w17, w16, #26
	cmp	w17, #0
	cinc	w17, w13, ne
	cmp	w16, #512, lsl #12              ; =2097152
	csel	w17, w12, w17, lo
	cbnz	x0, LBB0_14
	b	LBB0_15
LBB0_34:
	mov	x8, #0
LBB0_35:
	mov	w0, #1
	str	x8, [x1]
	ret
LBB0_36:
	mov	w0, #0
	str	x8, [x1]
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @utf16_conv_utf8.kUtf8Limits
_utf16_conv_utf8.kUtf8Limits:
	.long	192                             ; 0xc0
	.long	224                             ; 0xe0
	.long	240                             ; 0xf0
	.long	248                             ; 0xf8
	.long	252                             ; 0xfc

.subsections_via_symbols
