	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function win_to_utf8
LCPI0_0:
	.long	31                              ## 0x1f
	.long	33                              ## 0x21
	.long	34                              ## 0x22
	.long	36                              ## 0x24
LCPI0_1:
	.long	39                              ## 0x27
	.long	60                              ## 0x3c
	.long	62                              ## 0x3e
	.long	92                              ## 0x5c
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_win_to_utf8
	.p2align	4, 0x90
_win_to_utf8:                           ## @win_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
	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
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	jle	LBB0_25
## %bb.1:
	movl	%esi, %r15d
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_write_buff_set_pos
	xorl	%eax, %eax
	callq	_write_buff_get_pos
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	sete	%dil
	callq	_assert
	movl	%ebx, %edi
	callq	_write_char_utf8
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, -60(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %eax
	cmovnel	%eax, %r12d
	incq	%r13
	cmpq	%r13, %r15
	je	LBB0_25
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %r12d
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %r12d
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpb	$38, (%rax,%r13)
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_write_buff_get_pos
	xorl	%ecx, %ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$1, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpb	$35, (%rax,%r13)
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$2, %r12d
	xorl	%ecx, %ecx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movsbl	(%rax,%r13), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$2, %r12d
	cmpl	$131071, %ebx                   ## imm = 0x1FFFF
	jg	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	(%rbx,%rbx,4), %ecx
	leal	(%rax,%rcx,2), %ebx
	addl	$-48, %ebx
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$59, %al
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$3, %r12d
	movb	$1, %cl
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movd	%ebx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	%xmm0, %xmm1
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [31,33,34,36]
	pcmpgtd	%xmm3, %xmm1
	movdqa	%xmm0, %xmm2
	pcmpeqd	LCPI0_1(%rip), %xmm2
	pcmpeqd	%xmm4, %xmm4
	pxor	%xmm4, %xmm2
	pcmpeqd	%xmm3, %xmm0
	pxor	%xmm4, %xmm0
	packssdw	%xmm2, %xmm0
	pblendw	$1, %xmm1, %xmm0                ## xmm0 = xmm1[0],xmm0[1,2,3,4,5,6,7]
	psllw	$15, %xmm0
	packsswb	%xmm0, %xmm0
	pmovmskb	%xmm0, %eax
	cmpb	$-1, %al
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	jne	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	testb	%cl, %cl
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$8232, %ebx                     ## imm = 0x2028
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$8233, %ebx                     ## imm = 0x2029
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$131071, %ebx                   ## imm = 0x1FFFF
	jle	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$65536, %ebx                    ## imm = 0x10000
	movq	%r15, %r14
	setge	%r15b
	andb	%cl, %r15b
	movq	_win_to_utf8_convert@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movzbl	(%rcx,%r13), %ecx
	movl	(%rax,%rcx,4), %edi
	callq	_write_char_utf8
	cmpb	$1, %r15b
	movq	%r14, %r15
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$36, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_write_buff_char_pos
	jmp	LBB0_24
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_25:
	movq	_cur_buff_len@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_win_to_utf8_convert,8,3        ## @win_to_utf8_convert
	.comm	_cur_buff_len,4,2               ## @cur_buff_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function win_to_utf8
lCPI0_0:
	.long	31                              ; 0x1f
	.long	33                              ; 0x21
	.long	34                              ; 0x22
	.long	36                              ; 0x24
lCPI0_1:
	.long	39                              ; 0x27
	.long	60                              ; 0x3c
	.long	62                              ; 0x3e
	.long	92                              ; 0x5c
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_win_to_utf8
	.p2align	2
_win_to_utf8:                           ; @win_to_utf8
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w1, #1
	b.lt	LBB0_21
; %bb.1:
	mov	x19, x0
	mov	w21, #0
	mov	w8, #0
	mov	w20, #-1
Lloh0:
	adrp	x9, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	str	q0, [sp, #16]                   ; 16-byte Folded Spill
Lloh2:
	adrp	x9, lCPI0_1@PAGE
Lloh3:
	ldr	q0, [x9, lCPI0_1@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov	w23, #8232
	mov	w24, #8233
Lloh4:
	adrp	x25, _win_to_utf8_convert@GOTPAGE
Lloh5:
	ldr	x25, [x25, _win_to_utf8_convert@GOTPAGEOFF]
	mov	w26, w1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_write_buff_set_pos
	bl	_write_buff_get_pos
	cmp	w20, w0
	cset	w0, eq
	bl	_assert
	mov	x0, x21
	bl	_write_char_utf8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w28, #0
	csel	w8, wzr, w27, ne
	add	x19, x19, #1
	subs	x26, x26, #1
	b.eq	LBB0_21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #2
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w8, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x19]
	cmp	w8, #38
	b.ne	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #1
	bl	_write_buff_get_pos
	mov	x20, x0
	mov	w28, #0
	mov	w21, #0
	b	LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x19]
	cmp	w8, #35
	b.eq	LBB0_13
	b	LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsb	w8, [x19]
	sub	w9, w8, #48
	cmp	w9, #9
	b.hi	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w21, #32, lsl #12               ; =131072
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
	mov	w9, #10
	madd	w8, w21, w9, w8
	sub	w21, w8, #48
	mov	w27, #2
	b	LBB0_17
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
	mov	w27, #2
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #59
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #3
	mov	w28, #1
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
	mov	w27, #0
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	dup.4s	v0, w21
	ldp	q2, q3, [sp]                    ; 32-byte Folded Reload
	cmgt.4s	v1, v0, v3
	xtn.4h	v1, v1
	xtn.8b	v1, v1
	cmeq.4s	v2, v0, v2
	mvn.16b	v2, v2
	cmeq.4s	v0, v0, v3
	mvn.16b	v0, v0
	uzp1.8h	v0, v0, v2
	xtn.8b	v0, v0
	mov.b	v0[0], v1[0]
	umov.b	w8, v0[1]
	and	w8, w8, #0x1
	umov.b	w9, v0[0]
	and	w9, w9, #0x1
	bfi	w9, w8, #1, #1
	umov.b	w8, v0[2]
	and	w8, w8, #0x1
	umov.b	w10, v0[3]
	bfi	w9, w8, #2, #1
	and	w8, w10, #0x1
	bfi	w9, w8, #3, #1
	umov.b	w8, v0[4]
	and	w8, w8, #0x1
	bfi	w9, w8, #4, #1
	umov.b	w8, v0[5]
	and	w8, w8, #0x1
	umov.b	w10, v0[6]
	bfi	w9, w8, #5, #1
	and	w8, w10, #0x1
	orr	w8, w9, w8, lsl #6
	umov.b	w9, v0[7]
	orr	w8, w8, w9, lsl #7
	mvn	w8, w8
	and	w8, w8, #0xff
	cmp	w8, #0
	ccmp	w28, #0, #4, eq
	ccmp	w21, w23, #4, ne
	ccmp	w21, w24, #4, ne
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w21, #32, lsl #12               ; =131072
	b.lt	LBB0_2
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w21, #16, lsl #12               ; =65536
	cset	w8, ge
	and	w22, w28, w8
	ldr	x8, [x25]
	ldrb	w9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_write_char_utf8
	cmp	w22, #1
	b.ne	LBB0_3
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #36
	mov	x1, x20
	bl	_write_buff_char_pos
	b	LBB0_3
LBB0_21:
Lloh6:
	adrp	x8, _cur_buff_len@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cur_buff_len@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_win_to_utf8_convert,8,3        ; @win_to_utf8_convert
	.comm	_cur_buff_len,4,2               ; @cur_buff_len
.subsections_via_symbols
