	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function euc_jp2sjis
_euc_jp2sjis:                           ## @euc_jp2sjis
	.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
	testl	%edx, %edx
	jle	LBB0_7
## %bb.1:
	movl	%edx, %r14d
	movq	%rdi, %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	1(%r12), %al
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%al, (%rsi)
	incq	%rsi
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r15d, %rax
	addq	%rax, %r12
	subl	%r15d, %r14d
	testl	%r14d, %r14d
	jle	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movb	(%r12), %bl
	movzbl	%bl, %r13d
	movl	%r13d, %edi
	callq	_IS_HIGHBIT_SET
	testl	%eax, %eax
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_EUC_JP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_pg_encoding_verifymb
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_EUC_JP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_report_invalid_encoding
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_SS2@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%r12), %eax
	movq	_SS3@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	jne	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movzbl	2(%r12), %edx
	movl	%eax, %ecx
	shll	$8, %ecx
	orl	%edx, %ecx
	cmpl	$62880, %ecx                    ## imm = 0xF5A0
	jbe	LBB0_14
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	267(%rax), %ecx
	shrl	%ecx
	addb	$-11, %cl
	cmpb	$-32, %dl
	movb	$-96, %bl
	sbbb	$0, %bl
	testb	$1, %al
	movzbl	%bl, %eax
	movl	$254, %esi
	cmovel	%esi, %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%cl, (%rsi)
	addb	%dl, %al
	movb	%al, 1(%rsi)
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	testb	%bl, %bl
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_EUC_JP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_report_invalid_encoding
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%bl, (%rsi)
	incq	%rsi
	incq	%r12
	decl	%r14d
	testl	%r14d, %r14d
	jg	LBB0_2
	jmp	LBB0_7
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	cmpl	$62881, %ecx                    ## imm = 0xF5A1
	jb	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-84(%r13), %edx
	addl	$-245, %r13d
	sarl	%r13d
	addl	$240, %r13d
	movl	%r13d, %ecx
	movl	%edx, %r13d
	jmp	LBB0_25
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_ibmkanji@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzwl	(%rax), %esi
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ecx, %esi
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	movzwl	8(%rax,%rdx,8), %esi
	incq	%rdx
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	jne	LBB0_16
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_PGSJISALTCODE@GOTPCREL(%rip), %rcx
	movb	1(%rcx), %al
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%al, (%rsi)
	movl	(%rcx), %eax
	movb	%al, 1(%rsi)
	jmp	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	351(%r13), %ecx
	shrl	%ecx
	xorl	%edx, %edx
	cmpb	$-33, %r13b
	setae	%dl
	shll	$6, %edx
	addl	%edx, %ecx
	addl	$129, %ecx
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$-32, %al
	movb	$-96, %dl
	sbbb	$0, %dl
	testb	$1, %r13b
	movzbl	%dl, %edx
	movl	$254, %esi
	cmovel	%esi, %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%cl, (%rsi)
	addb	%al, %dl
	movb	%dl, 1(%rsi)
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %rsi
	jmp	LBB0_27
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
	movl	4(%rax,%rcx,8), %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	%ah, (%rsi)
	movb	%al, 1(%rsi)
	jmp	LBB0_26
LBB0_7:
	movb	$0, (%rsi)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_EUC_JP,4,2                  ## @PG_EUC_JP
	.comm	_SS2,4,2                        ## @SS2
	.comm	_SS3,4,2                        ## @SS3
	.comm	_ibmkanji,8,3                   ## @ibmkanji
	.comm	_PGSJISALTCODE,4,2              ## @PGSJISALTCODE
	.no_dead_strip	_euc_jp2sjis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function euc_jp2sjis
_euc_jp2sjis:                           ; @euc_jp2sjis
	.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_22
; %bb.1:
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x24, _PG_EUC_JP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PG_EUC_JP@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SS2@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SS2@GOTPAGEOFF]
Lloh4:
	adrp	x28, _SS3@GOTPAGE
Lloh5:
	ldr	x28, [x28, _SS3@GOTPAGEOFF]
	mov	w26, #-2
	mov	w27, #65535
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x21, #1]
	strb	w8, [x19], #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, w22, sxtw
	sub	w20, w20, w22
	cmp	w20, #0
	b.le	LBB0_22
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldrb	w23, [x21]
	mov	x0, x23
	bl	_IS_HIGHBIT_SET
	cbz	w0, LBB0_11
; %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
	ldr	w8, [x25]
	cmp	w8, w23
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	ldrb	w9, [x21, #1]
	cmp	w8, w23
	b.ne	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w10, [x21, #2]
	mov	x8, x10
	bfi	w8, w9, #8, #8
	mov	w11, #62880
	cmp	w8, w11
	b.ls	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w9, #267
	lsr	w8, w8, #1
	sub	w8, w8, #11
	strb	w8, [x19]
	cmp	w10, #224
	mov	w8, #-97
	cinc	w8, w8, hs
	tst	w9, #0x1
	csel	w8, w26, w8, eq
	add	w8, w8, w10
	b	LBB0_21
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w23, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x20
	bl	_report_invalid_encoding
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w23, [x19], #1
	add	x21, x21, #1
	sub	w20, w20, #1
	cmp	w20, #0
	b.gt	LBB0_4
	b	LBB0_22
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x9
	bfi	w8, w23, #8, #8
	add	w10, w23, #351
	cmp	w23, #223
	mov	w11, #193
	mov	w12, #129
	csel	w11, w12, w11, lo
	add	w10, w11, w10, lsr #1
	sub	w11, w23, #84
	sub	w12, w23, #245
	asr	w12, w12, #1
	add	w12, w12, #240
	mov	w13, #62881
	cmp	w8, w13
	csel	w8, w10, w12, lo
	csel	w10, w23, w11, lo
	strb	w8, [x19]
	cmp	w9, #224
	mov	w8, #-97
	cinc	w8, w8, hs
	tst	w10, #0x1
	csel	w8, w26, w8, eq
	add	w8, w8, w9
	b	LBB0_21
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x9, _ibmkanji@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ibmkanji@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldrh	w12, [x9]
	cmp	w12, w27
	b.eq	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, #0
	add	x11, x9, #8
LBB0_17:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w12, w8
	b.eq	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	add	x10, x10, #1
	ldrh	w12, [x11], #8
	cmp	w12, w27
	b.ne	LBB0_17
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh9:
	adrp	x9, _PGSJISALTCODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PGSJISALTCODE@GOTPAGEOFF]
	ldr	w8, [x9]
	lsr	w8, w8, #8
	strb	w8, [x19]
	ldr	w8, [x9]
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x9, w10, uxtw #3
	ldr	w8, [x8, #4]
	lsr	w9, w8, #8
	strb	w9, [x19]
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w8, [x19, #1]
	add	x19, x19, #2
	b	LBB0_3
LBB0_22:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_EUC_JP,4,2                  ; @PG_EUC_JP
	.comm	_SS2,4,2                        ; @SS2
	.comm	_SS3,4,2                        ; @SS3
	.comm	_ibmkanji,8,3                   ; @ibmkanji
	.comm	_PGSJISALTCODE,4,2              ; @PGSJISALTCODE
	.no_dead_strip	_euc_jp2sjis
.subsections_via_symbols
