	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function _MSKanji_wcrtomb
LCPI0_0:
	.long	0                               ## 0x0
	.long	4294967295                      ## 0xffffffff
	.long	4294967294                      ## 0xfffffffe
	.long	4294967293                      ## 0xfffffffd
LCPI0_1:
	.quad	2                               ## 0x2
	.quad	3                               ## 0x3
LCPI0_2:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_3:
	.quad	-9223372034707292160            ## 0x8000000080000000
	.quad	-9223372034707292160            ## 0x8000000080000000
LCPI0_4:
	.long	4294967292                      ## 0xfffffffc
	.long	4294967292                      ## 0xfffffffc
	.long	4294967292                      ## 0xfffffffc
	.long	4294967292                      ## 0xfffffffc
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
__MSKanji_wcrtomb:                      ## @_MSKanji_wcrtomb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %rax
	popq	%rbp
	retq
LBB0_2:
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	cmpl	$257, %esi                      ## imm = 0x101
	setge	%al
	leal	1(%rax), %r8d
	movl	$4, %r9d
	movq	%rax, %xmm1
	movd	%r8d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	paddd	LCPI0_0(%rip), %xmm0
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	xorl	%eax, %eax
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [2,3]
	movdqa	LCPI0_2(%rip), %xmm9            ## xmm9 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	movdqa	LCPI0_3(%rip), %xmm4            ## xmm4 = [9223372039002259456,9223372039002259456]
	por	%xmm4, %xmm1
	pcmpeqd	%xmm5, %xmm5
	movdqa	LCPI0_4(%rip), %xmm10           ## xmm10 = [4294967292,4294967292,4294967292,4294967292]
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rax
	paddd	%xmm10, %xmm0
	cmpq	%rax, %r9
	je	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %xmm2
	pshufd	$68, %xmm2, %xmm2               ## xmm2 = xmm2[0,1,0,1]
	movdqa	%xmm2, %xmm3
	por	%xmm9, %xmm3
	pxor	%xmm4, %xmm3
	movdqa	%xmm3, %xmm7
	pcmpgtd	%xmm1, %xmm7
	pcmpeqd	%xmm1, %xmm3
	pshufd	$245, %xmm3, %xmm6              ## xmm6 = xmm3[1,1,3,3]
	pand	%xmm7, %xmm6
	pshufd	$245, %xmm7, %xmm3              ## xmm3 = xmm7[1,1,3,3]
	por	%xmm6, %xmm3
	movdqa	%xmm0, %xmm7
	paddd	%xmm5, %xmm7
	movd	%xmm3, %ecx
	notl	%ecx
	testb	$1, %cl
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movd	%xmm7, %ecx
	shll	$3, %ecx
	movl	%esi, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movb	%dl, (%rdi,%rax)
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	pxor	%xmm5, %xmm3
	pextrb	$8, %xmm3, %ecx
	testb	$1, %cl
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	pextrd	$1, %xmm7, %ecx
	shll	$3, %ecx
	movl	%esi, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movb	%dl, 1(%rdi,%rax)
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	por	%xmm8, %xmm2
	pxor	%xmm4, %xmm2
	movdqa	%xmm2, %xmm3
	pcmpgtd	%xmm1, %xmm3
	pcmpeqd	%xmm1, %xmm2
	pshufd	$245, %xmm2, %xmm6              ## xmm6 = xmm2[1,1,3,3]
	pand	%xmm3, %xmm6
	pshufd	$245, %xmm3, %xmm2              ## xmm2 = xmm3[1,1,3,3]
	por	%xmm6, %xmm2
	pxor	%xmm5, %xmm2
	pextrb	$0, %xmm2, %ecx
	testb	$1, %cl
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	pextrd	$2, %xmm7, %ecx
	shll	$3, %ecx
	movl	%esi, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movb	%dl, 2(%rdi,%rax)
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	pextrb	$8, %xmm2, %ecx
	testb	$1, %cl
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	pextrd	$3, %xmm7, %ecx
	shll	$3, %ecx
	movl	%esi, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movb	%dl, 3(%rdi,%rax)
	jmp	LBB0_13
LBB0_14:
	movl	%r8d, %eax
	popq	%rbp
	retq
LBB0_3:
	movl	$1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	__MSKanji_wcrtomb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _MSKanji_wcrtomb
__MSKanji_wcrtomb:                      ; @_MSKanji_wcrtomb
	.cfi_startproc
; %bb.0:
	ldr	x9, [x2]
	cbz	x9, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	mov	x0, #-1
	ret
LBB0_2:
	mov	x8, x0
	mov	w0, #1
	cbz	x8, LBB0_6
; %bb.3:
	cmp	w1, #256
	cinc	w0, w0, gt
	sub	w9, w0, #1
	lsl	w10, w9, #3
	asr	w10, w1, w10
	strb	w10, [x8]
	cmp	w1, #257
	b.lt	LBB0_6
; %bb.4:
	lsl	w10, w0, #3
	sub	w11, w10, #16
	asr	w11, w1, w11
	strb	w11, [x8, #1]
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.5:
	sub	w9, w10, #24
	asr	w9, w1, w9
	strb	w9, [x8, #2]
LBB0_6:
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	__MSKanji_wcrtomb
.subsections_via_symbols
