	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sjis2euc_jp
_sjis2euc_jp:                           ## @sjis2euc_jp
	.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_37
## %bb.1:
	movl	%edx, %r15d
	movq	%rdi, %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	%r12b, %r12b
	je	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movb	%r12b, (%r14)
	incq	%r14
	incq	%r13
	decl	%r15d
	testl	%r15d, %r15d
	jle	LBB0_37
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_34 Depth 2
	movb	(%r13), %r12b
	movzbl	%r12b, %ebx
	movl	%ebx, %edi
	callq	_IS_HIGHBIT_SET
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_SJIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_pg_encoding_verifymb
	movl	%eax, %r8d
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_SJIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, %r13d
	movq	%r14, %r15
	movl	%r8d, %r14d
	callq	_report_invalid_encoding
	movl	%r14d, %r8d
	movq	%r15, %r14
	movl	%r13d, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	leal	95(%r12), %eax
	cmpb	$62, %al
	ja	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_SS2@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	movb	%r12b, 1(%r14)
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movzbl	1(%r13), %ecx
	movl	%ebx, %eax
	shll	$8, %eax
	leal	(%rax,%rcx), %edx
	addl	$-60736, %edx                   ## imm = 0xFFFF12C0
                                        ## kill: def $eax killed $eax killed $rax def $rax
	orl	%ecx, %eax
	cmpl	$767, %edx                      ## imm = 0x2FF
	ja	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_ibmkanji@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx), %esi
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	addq	$12, %rdx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rdx), %esi
	addq	$12, %rdx
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%eax, %esi
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	-8(%rdx), %eax
	movzbl	%ah, %ebx
	movzbl	%al, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$60222, %eax                    ## imm = 0xEB3E
	jg	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	andl	$63, %ebx
	leal	96(%rcx), %eax
	leal	2(%rcx), %edx
	xorl	%esi, %esi
	cmpl	$159, %ecx
	setge	%sil
	leal	(%rsi,%rbx,2), %esi
	cmovll	%eax, %edx
	addb	$-97, %sil
	movb	%sil, (%r14)
	xorl	%eax, %eax
	cmpl	$128, %ecx
	setl	%al
	addl	%edx, %eax
	jmp	LBB0_24
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$60223, %eax                    ## imm = 0xEB3F
	setne	%sil
	cmpl	$61504, %eax                    ## imm = 0xF040
	setb	%dl
	testb	%dl, %sil
	jne	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	-64588(%rax), %edx
	cmpl	$176, %edx
	jbe	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	-61504(%rax), %edx
	cmpl	$1279, %edx                     ## imm = 0x4FF
	ja	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	(%rbx,%rbx), %eax
	addl	$34, %eax
	andl	$126, %eax
	leal	96(%rcx), %edx
	leal	2(%rcx), %esi
	xorl	%edi, %edi
	cmpl	$159, %ecx
	setge	%dil
	cmovll	%edx, %esi
	orl	%eax, %edi
	addb	$-13, %dil
	movb	%dil, (%r14)
	xorl	%eax, %eax
	cmpl	$128, %ecx
	setl	%al
	addl	%esi, %eax
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	movb	%al, 1(%r14)
	jmp	LBB0_3
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_SJIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_report_invalid_encoding
	jmp	LBB0_17
LBB0_25:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_PGEUCALTCODE@GOTPCREL(%rip), %rcx
	movb	1(%rcx), %al
	movb	%al, (%r14)
	movb	(%rcx), %al
	movb	%al, 1(%r14)
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$2, %r14
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r8d, %rax
	addq	%rax, %r13
	subl	%r8d, %r15d
	testl	%r15d, %r15d
	jg	LBB0_5
	jmp	LBB0_37
LBB0_26:                                ##   in Loop: Header=BB0_5 Depth=1
	leal	-62784(%rax), %edx
	cmpl	$1279, %edx                     ## imm = 0x4FF
	ja	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_SS3@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	leal	(%rbx,%rbx), %eax
	addl	$24, %eax
	andl	$126, %eax
	leal	96(%rcx), %edx
	leal	2(%rcx), %esi
	xorl	%edi, %edi
	cmpl	$159, %ecx
	setge	%dil
	cmovll	%edx, %esi
	orl	%eax, %edi
	addb	$-13, %dil
	movb	%dil, 1(%r14)
	xorl	%eax, %eax
	cmpl	$128, %ecx
	setl	%al
	addl	%esi, %eax
	movb	%al, 2(%r14)
	addq	$3, %r14
	jmp	LBB0_4
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$64064, %eax                    ## imm = 0xFA40
	jb	LBB0_4
## %bb.29:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_ibmkanji@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	4(%rdx), %esi
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_4
## %bb.30:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_34
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_34 Depth=2
	movq	_SS3@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	leaq	1(%r14), %rdi
	movb	%dl, (%r14)
	movl	$3, %edx
	movl	$2, %esi
LBB0_32:                                ##   in Loop: Header=BB0_34 Depth=2
	movl	%eax, %ebx
	shrl	$8, %ebx
	orb	$-128, %bl
	movb	%bl, (%rdi)
	movl	%eax, %ebx
	orb	$-128, %bl
	addq	%r14, %rdx
	movb	%bl, (%r14,%rsi)
	movq	%rdx, %r14
LBB0_33:                                ##   in Loop: Header=BB0_34 Depth=2
	movq	_ibmkanji@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	16(%rdx,%rcx), %esi
	addq	$12, %rcx
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_4
LBB0_34:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%eax, %esi
	jne	LBB0_33
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=2
	movl	8(%rdx,%rcx), %eax
	cmpl	$9371648, %eax                  ## imm = 0x8F0000
	jge	LBB0_31
## %bb.36:                              ##   in Loop: Header=BB0_34 Depth=2
	movl	$2, %edx
	movl	$1, %esi
	movq	%r14, %rdi
	jmp	LBB0_32
LBB0_37:
	movb	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_SJIS,4,2                    ## @PG_SJIS
	.comm	_SS2,4,2                        ## @SS2
	.comm	_ibmkanji,8,3                   ## @ibmkanji
	.comm	_PGEUCALTCODE,4,2               ## @PGEUCALTCODE
	.comm	_SS3,8,3                        ## @SS3
	.no_dead_strip	_sjis2euc_jp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sjis2euc_jp
_sjis2euc_jp:                           ; @sjis2euc_jp
	.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	x19, x1
	cmp	w2, #1
	b.lt	LBB0_38
; %bb.1:
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x24, _PG_SJIS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PG_SJIS@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SS2@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SS2@GOTPAGEOFF]
	mov	w26, #-60736
Lloh4:
	adrp	x27, _ibmkanji@GOTPAGE
Lloh5:
	ldr	x27, [x27, _ibmkanji@GOTPAGEOFF]
	mov	w28, #65535
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w23, LBB0_22
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	strb	w23, [x19], #1
	add	x21, x21, #1
	sub	w20, w20, #1
	cmp	w20, #0
	b.le	LBB0_38
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_35 Depth 2
	ldrb	w23, [x21]
	mov	x0, x23
	bl	_IS_HIGHBIT_SET
	cbz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x20
	bl	_pg_encoding_verifymb
	mov	x22, x0
	tbz	w0, #31, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x20
	bl	_report_invalid_encoding
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w23, #95
	and	w8, w8, #0xff
	cmp	w8, #62
	b.hi	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	strb	w8, [x19]
	strb	w23, [x19, #1]
	b	LBB0_25
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x21, #1]
	mov	x8, x9
	bfi	w8, w23, #8, #8
	add	w10, w8, w26
	cmp	w10, #767
	b.hi	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x27]
	ldr	w11, [x10]
	cmp	w11, w28
	b.eq	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #12
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	w11, [x10], #12
	cmp	w11, w28
	b.eq	LBB0_15
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w11, w8
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldur	w8, [x10, #-8]
	ubfx	w23, w8, #8, #8
	and	w9, w8, #0xff
	b	LBB0_12
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w10, #60222
	cmp	w8, w10
	b.gt	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #158
	mov	w8, #96
	mov	w10, #2
	csel	w8, w10, w8, gt
	cset	w10, gt
	bfi	w10, w23, #1, #6
	add	w10, w10, #159
	strb	w10, [x19]
	add	w8, w8, w9
	b	LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	lsr	w10, w8, #6
	cmp	w10, #961
	mov	w11, #60223
	ccmp	w8, w11, #4, lo
	b.ne	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-64588
	add	w11, w8, w11
	cmp	w11, #176
	b.ls	LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-61504
	add	w11, w8, w11
	cmp	w11, #1279
	b.hi	LBB0_27
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	lsl	w8, w23, #1
	add	w8, w8, #34
	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, [x19]
	add	w8, w10, w9
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #128
	cinc	w8, w8, lt
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x20
	bl	_report_invalid_encoding
	b	LBB0_3
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x9, _PGEUCALTCODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PGEUCALTCODE@GOTPAGEOFF]
	ldr	w8, [x9]
	lsr	w8, w8, #8
	strb	w8, [x19]
	ldr	w8, [x9]
LBB0_24:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w8, [x19, #1]
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #2
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, w22, sxtw
	sub	w20, w20, w22
	cmp	w20, #0
	b.gt	LBB0_4
	b	LBB0_38
LBB0_27:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #-62784
	add	w11, w8, w11
	cmp	w11, #1279
	b.hi	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x8, _SS3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SS3@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	strb	w8, [x19]
	lsl	w8, w23, #1
	add	w8, w8, #24
	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, [x19, #1]
	add	w8, w10, w9
	cmp	w9, #128
	cinc	w8, w8, lt
	strb	w8, [x19, #2]
	add	x19, x19, #3
	b	LBB0_26
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w10, #1001
	b.lo	LBB0_26
; %bb.30:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x27]
	ldr	w11, [x10, #4]
	cmp	w11, w28
	b.eq	LBB0_26
; %bb.31:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, #0
	b	LBB0_35
LBB0_32:                                ;   in Loop: Header=BB0_35 Depth=2
Lloh11:
	adrp	x10, _SS3@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SS3@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	mov	x11, x19
	strb	w10, [x11], #1
	mov	w10, #2
	mov	w12, #3
LBB0_33:                                ;   in Loop: Header=BB0_35 Depth=2
	lsr	w13, w8, #8
	orr	w13, w13, #0x80
	strb	w13, [x11]
	orr	w11, w8, #0x80
	strb	w11, [x19, x10]
	add	x19, x19, x12
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=2
	ldr	x10, [x27]
	add	x11, x10, x9
	ldr	w11, [x11, #16]
	add	x9, x9, #12
	cmp	w11, w28
	b.eq	LBB0_26
LBB0_35:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w11, w8
	b.ne	LBB0_34
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=2
	add	x8, x10, x9
	ldr	w8, [x8, #8]
	cmp	w8, #2288, lsl #12              ; =9371648
	b.ge	LBB0_32
; %bb.37:                               ;   in Loop: Header=BB0_35 Depth=2
	mov	w10, #1
	mov	x11, x19
	mov	w12, #2
	b	LBB0_33
LBB0_38:
	strb	wzr, [x19]
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_SJIS,4,2                    ; @PG_SJIS
	.comm	_SS2,4,2                        ; @SS2
	.comm	_ibmkanji,8,3                   ; @ibmkanji
	.comm	_PGEUCALTCODE,4,2               ; @PGEUCALTCODE
	.comm	_SS3,8,3                        ; @SS3
	.no_dead_strip	_sjis2euc_jp
.subsections_via_symbols
