	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sjis2mic
_sjis2mic:                              ## @sjis2mic
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	testl	%edx, %edx
	jle	LBB0_39
## %bb.1:
	movl	%edx, %r15d
	movq	%rdi, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_LC_JISX0201K@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	movb	%r13b, 1(%r14)
	addq	$2, %r14
LBB0_37:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$-1, %r8d
	movl	$1, %edx
LBB0_38:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%rdx, %rbx
	addl	%r8d, %r15d
	jle	LBB0_39
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_29 Depth 2
	movb	(%rbx), %r13b
	leal	95(%r13), %eax
	cmpb	$62, %al
	jbe	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%r13b, %edi
	movq	%rdi, %r12
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_IS_HIGHBIT_SET
	testq	%rax, %rax
	je	LBB0_34
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %r15d
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ISSJISHEAD
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%rbx), %edi
	callq	_ISSJISTAIL
	testl	%eax, %eax
	jne	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_SJIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_report_invalid_encoding
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%rbx), %eax
	movq	%r12, %rdi
	movl	%edi, %ecx
	shll	$8, %ecx
	leal	(%rcx,%rax), %edx
	addl	$-60736, %edx                   ## imm = 0xFFFF12C0
                                        ## kill: def $ecx killed $ecx killed $rcx def $rcx
	orl	%eax, %ecx
	cmpl	$767, %edx                      ## imm = 0x2FF
	ja	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ibmkanji@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx), %esi
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	$12, %rdx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	(%rdx), %esi
	addq	$12, %rdx
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_15
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ecx, %esi
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-8(%rdx), %ecx
	movzbl	%ch, %edi
	movzbl	%cl, %eax
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$60222, %ecx                    ## imm = 0xEB3E
	jg	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_LC_JISX0208@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%r14)
	andl	$63, %edi
	leal	96(%rax), %ecx
	leal	2(%rax), %edx
	xorl	%esi, %esi
	cmpl	$159, %eax
	setge	%sil
	leal	(%rsi,%rdi,2), %esi
	cmovll	%ecx, %edx
	addb	$-97, %sil
	movb	%sil, 1(%r14)
	xorl	%ecx, %ecx
	cmpl	$128, %eax
	setl	%cl
	addl	%edx, %ecx
	jmp	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$60223, %ecx                    ## imm = 0xEB3F
	setne	%sil
	cmpl	$61504, %ecx                    ## imm = 0xF040
	setb	%dl
	testb	%dl, %sil
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-64588(%rcx), %edx
	cmpl	$176, %edx
	jbe	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-61504(%rcx), %edx
	cmpl	$1279, %edx                     ## imm = 0x4FF
	ja	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_LC_JISX0208@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%r14)
	leal	(%rdi,%rdi), %ecx
	addl	$34, %ecx
	jmp	LBB0_23
LBB0_34:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	%r13b, %r13b
	jne	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_SJIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_report_invalid_encoding
LBB0_36:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	%r13b, (%r14)
	incq	%r14
	jmp	LBB0_37
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_LC_JISX0208@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	movq	_PGEUCALTCODE@GOTPCREL(%rip), %rcx
	movb	1(%rcx), %al
	movb	%al, 1(%r14)
	movl	(%rcx), %ecx
	jmp	LBB0_17
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	-62784(%rcx), %edx
	cmpl	$1279, %edx                     ## imm = 0x4FF
	ja	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_LC_JISX0212@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%r14)
	leal	(%rdi,%rdi), %ecx
	addl	$24, %ecx
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	andl	$126, %ecx
	leal	96(%rax), %edx
	leal	2(%rax), %esi
	xorl	%edi, %edi
	cmpl	$159, %eax
	cmovll	%edx, %esi
	setge	%dil
	orl	%ecx, %edi
	addb	$-13, %dil
	movb	%dil, 1(%r14)
	xorl	%ecx, %ecx
	cmpl	$128, %eax
	setl	%cl
	addl	%esi, %ecx
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	%cl, 2(%r14)
	addq	$3, %r14
	movl	$-2, %r8d
	movl	$2, %edx
	jmp	LBB0_38
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$-2, %r8d
	movl	$2, %edx
	cmpl	$64064, %ecx                    ## imm = 0xFA40
	jb	LBB0_38
## %bb.27:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ibmkanji@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	4(%rdi), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_38
## %bb.28:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=2
	movzbl	(%rax), %eax
	movb	%al, (%r14)
	movl	%ecx, %eax
	shrl	$8, %eax
	orb	$-128, %al
	movb	%al, 1(%r14)
	movl	%ecx, %eax
	orb	$-128, %al
	movb	%al, 2(%r14)
	addq	$3, %r14
LBB0_33:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	_ibmkanji@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	16(%rdi,%rsi), %eax
	addq	$12, %rsi
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_38
LBB0_29:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ecx, %eax
	jne	LBB0_33
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=2
	movl	8(%rdi,%rsi), %ecx
	movq	_LC_JISX0208@GOTPCREL(%rip), %rax
	cmpl	$9371648, %ecx                  ## imm = 0x8F0000
	jl	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	_LC_JISX0212@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_39:
	movb	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LC_JISX0201K,4,2               ## @LC_JISX0201K
	.comm	_PG_SJIS,4,2                    ## @PG_SJIS
	.comm	_ibmkanji,8,3                   ## @ibmkanji
	.comm	_LC_JISX0208,8,3                ## @LC_JISX0208
	.comm	_PGEUCALTCODE,4,2               ## @PGEUCALTCODE
	.comm	_LC_JISX0212,8,3                ## @LC_JISX0212
	.no_dead_strip	_sjis2mic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sjis2mic
_sjis2mic:                              ; @sjis2mic
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	cmp	w2, #1
	b.lt	LBB0_39
; %bb.1:
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x23, _LC_JISX0201K@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LC_JISX0201K@GOTPAGEOFF]
Lloh2:
	adrp	x24, _PG_SJIS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PG_SJIS@GOTPAGEOFF]
	mov	w25, #-60736
	mov	w26, #65535
Lloh4:
	adrp	x27, _ibmkanji@GOTPAGE
Lloh5:
	ldr	x27, [x27, _ibmkanji@GOTPAGEOFF]
Lloh6:
	adrp	x28, _LC_JISX0208@GOTPAGE
Lloh7:
	ldr	x28, [x28, _LC_JISX0208@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23]
	strb	w8, [x21]
	strb	w22, [x21, #1]
	add	x21, x21, #2
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #-1
	mov	w13, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, x13
	add	w19, w19, w10
	cmp	w19, #0
	b.le	LBB0_39
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
                                        ;     Child Loop BB0_37 Depth 2
	ldrb	w22, [x20]
	add	w8, w22, #95
	and	w8, w8, #0xff
	cmp	w8, #62
	b.ls	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_IS_HIGHBIT_SET
	cbz	x0, LBB0_23
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w19, #2
	b.lo	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_ISSJISHEAD
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w0, [x20, #1]
	bl	_ISSJISTAIL
	cbnz	w0, LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x24]
	mov	x1, x20
	mov	x2, x19
	bl	_report_invalid_encoding
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w9, [x20, #1]
	mov	x8, x9
	bfi	w8, w22, #8, #8
	add	w10, w8, w25
	cmp	w10, #767
	b.hi	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x27]
	ldr	w11, [x10]
	cmp	w11, w26
	b.eq	LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #12
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w11, [x10], #12
	cmp	w11, w26
	b.eq	LBB0_17
LBB0_15:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w11, w8
	b.ne	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldur	w8, [x10, #-8]
	ubfx	w22, w8, #8, #8
	and	w9, w8, #0xff
	b	LBB0_14
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #60222
	cmp	w8, w10
	b.gt	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x28]
	strb	w8, [x21]
	cmp	w9, #158
	mov	w8, #96
	mov	w10, #2
	csel	w8, w10, w8, gt
	cset	w10, gt
	bfi	w10, w22, #1, #6
	add	w10, w10, #159
	strb	w10, [x21, #1]
	add	w8, w8, w9
	b	LBB0_30
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	lsr	w10, w8, #6
	cmp	w10, #961
	mov	w11, #60223
	ccmp	w8, w11, #4, lo
	b.ne	LBB0_26
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w11, #-64588
	add	w11, w8, w11
	cmp	w11, #176
	b.ls	LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w11, #-61504
	add	w11, w8, w11
	cmp	w11, #1279
	b.hi	LBB0_27
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x28]
	strb	w8, [x21]
	lsl	w8, w22, #1
	add	w8, w8, #34
	b	LBB0_29
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w22, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x24]
	mov	x1, x20
	mov	x2, x19
	bl	_report_invalid_encoding
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	strb	w22, [x21], #1
	b	LBB0_3
LBB0_26:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x28]
	strb	w8, [x21]
Lloh8:
	adrp	x9, _PGEUCALTCODE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PGEUCALTCODE@GOTPAGEOFF]
	ldr	w8, [x9]
	lsr	w8, w8, #8
	strb	w8, [x21, #1]
	ldr	w8, [x9]
	b	LBB0_31
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w11, #-62784
	add	w11, w8, w11
	cmp	w11, #1279
	b.hi	LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh10:
	adrp	x8, _LC_JISX0212@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LC_JISX0212@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	strb	w8, [x21]
	lsl	w8, w22, #1
	add	w8, w8, #24
LBB0_29:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w8, w8, #0x7e
	cmp	w9, #158
	mov	w10, #96
	mov	w11, #2
	csel	w10, w11, w10, gt
	cset	w11, gt
	orr	w8, w8, w11
	add	w8, w8, #243
	strb	w8, [x21, #1]
	add	w8, w10, w9
LBB0_30:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, #128
	cinc	w8, w8, lt
LBB0_31:                                ;   in Loop: Header=BB0_5 Depth=1
	strb	w8, [x21, #2]
	add	x21, x21, #3
LBB0_32:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #-2
	mov	w13, #2
	b	LBB0_4
LBB0_33:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w10, #1001
	b.lo	LBB0_32
; %bb.34:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x27]
	ldr	w12, [x11, #4]
	cmp	w12, w26
	b.eq	LBB0_32
; %bb.35:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, #0
	b	LBB0_37
LBB0_36:                                ;   in Loop: Header=BB0_37 Depth=2
	ldr	x11, [x27]
	add	x10, x11, x9
	ldr	w12, [x10, #16]
	add	x9, x9, #12
	mov	w10, #-2
	mov	w13, #2
	cmp	w12, w26
	b.eq	LBB0_4
LBB0_37:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w12, w8
	b.ne	LBB0_36
; %bb.38:                               ;   in Loop: Header=BB0_37 Depth=2
	add	x8, x11, x9
	ldr	w8, [x8, #8]
	cmp	w8, #2288, lsl #12              ; =9371648
Lloh13:
	adrp	x10, _LC_JISX0212@GOTPAGE
Lloh14:
	ldr	x10, [x10, _LC_JISX0212@GOTPAGEOFF]
	csel	x10, x10, x28, ge
	ldr	x10, [x10]
	strb	w10, [x21]
	lsr	w10, w8, #8
	orr	w10, w10, #0x80
	strb	w10, [x21, #1]
	orr	w10, w8, #0x80
	strb	w10, [x21, #2]
	add	x21, x21, #3
	b	LBB0_36
LBB0_39:
	strb	wzr, [x21]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LC_JISX0201K,4,2               ; @LC_JISX0201K
	.comm	_PG_SJIS,4,2                    ; @PG_SJIS
	.comm	_ibmkanji,8,3                   ; @ibmkanji
	.comm	_LC_JISX0208,8,3                ; @LC_JISX0208
	.comm	_PGEUCALTCODE,4,2               ; @PGEUCALTCODE
	.comm	_LC_JISX0212,8,3                ; @LC_JISX0212
	.no_dead_strip	_sjis2mic
.subsections_via_symbols
