	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xutftowcsn                     ## -- Begin function xutftowcsn
	.p2align	4, 0x90
_xutftowcsn:                            ## @xutftowcsn
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.2:
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.3:
	testl	%ecx, %ecx
	movq	_INT_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	cmovsl	%ebx, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.4:
	movb	(%rsi), %r11b
	cmpl	%ebx, %ecx
	jne	LBB0_10
## %bb.5:
	testb	%r11b, %r11b
	jne	LBB0_10
LBB0_6:
	movslq	%eax, %rcx
	movb	$0, (%rdi,%rcx)
	jmp	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	decq	%rdx
	xorl	%r13d, %r13d
	movl	$1, %r15d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %r10
	cmpq	%r10, %rdx
	jbe	LBB0_50
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %r14d
	testb	%r11b, %r11b
	js	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	addl	%r14d, %eax
	movb	%r11b, (%rdi,%r10)
	movl	%r15d, %r13d
	cmpl	%ecx, %r13d
	jge	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%r13), %r15d
	movslq	%r13d, %rbx
	movzbl	(%rsi,%rbx), %r11d
	cmpl	(%r12), %ecx
	jne	LBB0_11
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	testb	%r11b, %r11b
	jne	LBB0_11
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	62(%r11), %ebx
	cmpb	$29, %bl
	ja	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	%ecx, %r15d
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	%r15d, %rbx
	movzbl	(%rsi,%rbx), %r9d
	movl	%r9d, %ebx
	andb	$-64, %bl
	cmpb	$-128, %bl
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_11 Depth=1
	shlb	$6, %r11b
	addl	$2, %r13d
	andb	$63, %r9b
	orb	%r11b, %r9b
	movl	%r9d, %r11d
	movl	%r13d, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r11d, %ebx
	andb	$-16, %bl
	cmpb	$-32, %bl
	jne	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	%r13d, %r12
	addq	$2, %r12
	cmpl	%ecx, %r12d
	jge	LBB0_33
## %bb.22:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$-32, %r11b
	setne	%r8b
	movslq	%r15d, %rbx
	movzbl	(%rsi,%rbx), %r9d
	cmpb	$-96, %r9b
	setae	%bl
	orb	%r8b, %bl
	cmpb	$1, %bl
	jne	LBB0_33
## %bb.23:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r9d, %ebx
	andb	$-64, %bl
	cmpb	$-128, %bl
	jne	LBB0_33
## %bb.24:                              ##   in Loop: Header=BB0_11 Depth=1
	movzbl	(%rsi,%r12), %r8d
	movl	%r8d, %ebx
	andb	$-64, %bl
	cmpb	$-128, %bl
	jne	LBB0_33
## %bb.25:                              ##   in Loop: Header=BB0_11 Depth=1
	shlb	$6, %r9b
	addl	$3, %r13d
	andb	$63, %r8b
	orb	%r9b, %r8b
	movl	%r8d, %r11d
	movl	%r13d, %r15d
	movq	_INT_MAX@GOTPCREL(%rip), %r12
	jmp	LBB0_13
LBB0_26:                                ##   in Loop: Header=BB0_11 Depth=1
	leal	16(%r11), %ebx
	cmpb	$4, %bl
	ja	LBB0_34
## %bb.27:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	%r13d, %r9
	leaq	3(%r9), %r8
	cmpl	%ecx, %r8d
	jge	LBB0_13
## %bb.28:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%rax), %ebx
	movslq	%ebx, %rbx
	cmpq	%rbx, %rdx
	jbe	LBB0_13
## %bb.29:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$-16, %r11b
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movslq	%r15d, %rbx
	je	LBB0_41
## %bb.30:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$-12, %r11b
	jne	LBB0_43
## %bb.31:                              ##   in Loop: Header=BB0_11 Depth=1
	movzbl	(%rsi,%rbx), %r12d
	cmpb	$-113, %r12b
	jbe	LBB0_44
	jmp	LBB0_33
LBB0_34:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$-97, %r11b
	ja	LBB0_13
## %bb.35:                              ##   in Loop: Header=BB0_11 Depth=1
	movzbl	%r11b, %r8d
	movl	%r8d, %ebx
	shrq	$4, %rbx
	leaq	L_.str(%rip), %r11
	movzbl	(%rbx,%r11), %ebx
	leal	1(%r10), %r9d
	movb	%bl, (%rdi,%r10)
	movslq	%r9d, %r10
	cmpq	%r10, %rdx
	jbe	LBB0_40
## %bb.36:                              ##   in Loop: Header=BB0_11 Depth=1
	andl	$15, %r8d
	movzbl	(%r8,%r11), %r11d
	movl	$2, %r14d
	jmp	LBB0_13
LBB0_40:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r15d, %r13d
	movl	%r9d, %eax
	cmpl	%ecx, %r13d
	jl	LBB0_14
	jmp	LBB0_6
LBB0_41:                                ##   in Loop: Header=BB0_11 Depth=1
	movzbl	(%rsi,%rbx), %r12d
	cmpb	$-112, %r12b
	jb	LBB0_33
	jmp	LBB0_44
LBB0_43:                                ##   in Loop: Header=BB0_11 Depth=1
	movzbl	(%rsi,%rbx), %r12d
LBB0_44:                                ##   in Loop: Header=BB0_11 Depth=1
	movzbl	%r12b, %r12d
	movl	%r12d, %ebx
	andl	$-64, %ebx
	cmpl	$128, %ebx
	jne	LBB0_33
## %bb.45:                              ##   in Loop: Header=BB0_11 Depth=1
	movzbl	2(%r9,%rsi), %r9d
	movl	%r9d, %ebx
	andl	$-64, %ebx
	cmpl	$128, %ebx
	jne	LBB0_33
## %bb.46:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movzbl	(%rsi,%r8), %r8d
	movl	%r8d, %ebx
	andb	$-64, %bl
	cmpb	$-128, %bl
	movq	_INT_MAX@GOTPCREL(%rip), %r12
	jne	LBB0_13
## %bb.47:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	andl	$63, %ebx
	shll	$12, %ebx
	andl	$63, %r9d
	shll	$6, %r9d
	orl	%ebx, %r9d
	addl	$4, %r13d
	andl	$63, %r8d
	leal	(%r9,%r8), %r11d
	leal	(%r8,%r9), %ebx
	addl	$196608, %ebx                   ## imm = 0x30000
	shrl	$10, %ebx
	movb	%bl, (%rdi,%r10)
	movl	$2, %r14d
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movl	%r13d, %r15d
	jmp	LBB0_13
LBB0_33:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_INT_MAX@GOTPCREL(%rip), %r12
	jmp	LBB0_13
LBB0_50:
	movb	$0, (%rdi,%r10)
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ERANGE,4,2                     ## @ERANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0123456789abcdef"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xutftowcsn                     ; -- Begin function xutftowcsn
	.p2align	2
_xutftowcsn:                            ; @xutftowcsn
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_39
; %bb.1:
	cbz	x1, LBB0_39
; %bb.2:
	cbz	x2, LBB0_39
; %bb.3:
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w3, #0
	csel	w10, w8, w3, lt
	cmp	w10, #1
	b.lt	LBB0_41
; %bb.4:
	ldrb	w15, [x1]
	cmp	w10, w8
	ccmp	w15, #0, #0, eq
	b.eq	LBB0_41
; %bb.5:
	mov	w17, #0
	mov	w8, #0
	sub	x11, x2, #1
	mov	w14, #1
	mov	w12, #224
Lloh2:
	adrp	x13, l_.str@PAGE
Lloh3:
	add	x13, x13, l_.str@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x16, w8
	cmp	x11, x16
	b.ls	LBB0_43
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	tbnz	w15, #7, LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x2, x16
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w16, w8
	strb	w15, [x0, x2]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x17, x14
	cmp	w14, w10
	b.ge	LBB0_42
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w16, [x9]
	add	w14, w17, #1
	ldrb	w15, [x1, w17, sxtw]
	cmp	w10, w16
	ccmp	w15, #0, #0, eq
	b.ne	LBB0_6
	b	LBB0_42
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w15, #62
	and	w8, w8, #0xff
	cmp	w8, #29
	b.hi	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w14, w10
	b.ge	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w3, [x1, w14, sxtw]
	and	w8, w3, #0xc0
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w14, w17, #2
	bfi	w3, w15, #6, #26
	mov	w8, #1
	mov	x2, x16
	mov	x15, x3
	b	LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w15, #0xf0
	cmp	w8, #224
	b.ne	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x8, w17
	add	x3, x8, #2
	cmp	w3, w10
	b.ge	LBB0_8
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w15, #0xff
	ldrb	w2, [x1, w14, sxtw]
	cmp	w2, #159
	ccmp	w8, w12, #0, ls
	mov	w8, #1
	b.eq	LBB0_9
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=1
	and	w4, w2, #0xc0
	cmp	w4, #128
	b.ne	LBB0_9
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x1, x3]
	and	w3, w8, #0xc0
	cmp	w3, #128
	b.ne	LBB0_8
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w14, w17, #3
	and	w15, w8, #0x3f
	bfi	w15, w2, #6, #8
	b	LBB0_8
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w15, #16
	and	w8, w8, #0xff
	cmp	w8, #4
	b.hi	LBB0_29
; %bb.24:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x8, x17
	sxtw	x3, w8
	add	x8, x3, #3
	cmp	w8, w10
	b.ge	LBB0_8
; %bb.25:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w2, w16, #1
	sxtw	x2, w2
	cmp	x11, x2
	b.ls	LBB0_8
; %bb.26:                               ;   in Loop: Header=BB0_6 Depth=1
	and	w4, w15, #0xff
	cmp	w4, #240
	b.eq	LBB0_33
; %bb.27:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w4, #244
	b.ne	LBB0_34
; %bb.28:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w4, [x1, w14, sxtw]
	cmp	w4, #143
	b.hi	LBB0_8
	b	LBB0_35
LBB0_29:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w15, #0xff
	cmp	w8, #159
	b.hi	LBB0_8
; %bb.30:                               ;   in Loop: Header=BB0_6 Depth=1
	and	w15, w15, #0xff
	lsr	x8, x15, #4
	ldrb	w17, [x13, x8]
	add	w8, w16, #1
	strb	w17, [x0, x16]
	mov	x17, x8
	sxtw	x2, w17
	cmp	x11, x2
	b.ls	LBB0_11
; %bb.31:                               ;   in Loop: Header=BB0_6 Depth=1
                                        ; kill: def $w15 killed $w15 killed $x15 def $x15
	and	x8, x15, #0xf
	ldrb	w15, [x13, x8]
LBB0_32:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #2
	b	LBB0_10
LBB0_33:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w4, [x1, w14, sxtw]
	cmp	w4, #144
	b.lo	LBB0_8
	b	LBB0_35
LBB0_34:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w4, [x1, w14, sxtw]
LBB0_35:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w5, w4, #0xc0
	cmp	w5, #128
	b.ne	LBB0_8
; %bb.36:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x3, x3, x1
	ldrb	w3, [x3, #2]
	and	w5, w3, #0xc0
	cmp	w5, #128
	b.ne	LBB0_8
; %bb.37:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x1, x8]
	and	w5, w8, #0xc0
	cmp	w5, #128
	b.ne	LBB0_8
; %bb.38:                               ;   in Loop: Header=BB0_6 Depth=1
	ubfiz	w15, w3, #6, #6
	bfi	w15, w4, #12, #6
	add	w14, w17, #4
	bfxil	w15, w8, #0, #6
	add	w8, w15, #48, lsl #12           ; =196608
	lsr	w8, w8, #10
	strb	w8, [x0, x16]
	b	LBB0_32
LBB0_39:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_40:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	mov	w8, #-1
	mov	x0, x8
	ret
LBB0_41:
	mov	w8, #0
LBB0_42:
	strb	wzr, [x0, w8, sxtw]
	mov	x0, x8
	ret
LBB0_43:
	strb	wzr, [x0, x16]
Lloh9:
	adrp	x8, _ERANGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_40
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ERANGE,4,2                     ; @ERANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0123456789abcdef"

.subsections_via_symbols
