// File: /workspace/github_c_makefile_star2_O0/nurse[P]nkf/nkf.c
// Function: e_iconv
static nkf_char
e_iconv(nkf_char c2, nkf_char c1, nkf_char c0)
{
    if (c2 == JIS_X_0201_1976_K || c2 == SS2){
	if (iso2022jp_f && !x0201_f) {
	    c2 = GETA1; c1 = GETA2;
	} else {
	    c2 = JIS_X_0201_1976_K;
	    c1 &= 0x7f;
	}
#ifdef X0212_ENABLE
    }else if (c2 == 0x8f){
	if (c0 == 0){
	    return -1;
	}
	if (!cp51932_f && !x0213_f && 0xF5 <= c1 && c1 <= 0xFE && 0xA1 <= c0 && c0 <= 0xFE) {
	    /* encoding is eucJP-ms, so invert to Unicode Private User Area */
	    c1 = nkf_char_unicode_new((c1 - 0xF5) * 94 + c0 - 0xA1 + 0xE3AC);
	    c2 = 0;
	} else {
	    c2 = (c2 << 8) | (c1 & 0x7f);
	    c1 = c0 & 0x7f;
#ifdef SHIFTJIS_CP932
	    if (cp51932_f){
		nkf_char s2, s1;
		if (e2s_conv(c2, c1, &s2, &s1) == 0){
		    s2e_conv(s2, s1, &c2, &c1);
		    if (c2 < 0x100){
			c1 &= 0x7f;
			c2 &= 0x7f;
		    }
		}
	    }
#endif /* SHIFTJIS_CP932 */
	}
#endif /* X0212_ENABLE */
    } else if ((c2 == EOF) || (c2 == 0) || c2 < SP || c2 == ISO_8859_1) {
	/* NOP */
    } else {
	if (!cp51932_f && ms_ucs_map_f && 0xF5 <= c2 && c2 <= 0xFE && 0xA1 <= c1 && c1 <= 0xFE) {
	    /* encoding is eucJP-ms, so invert to Unicode Private User Area */
	    c1 = nkf_char_unicode_new((c2 - 0xF5) * 94 + c1 - 0xA1 + 0xE000);
	    c2 = 0;
	} else {
	    c1 &= 0x7f;
	    c2 &= 0x7f;
#ifdef SHIFTJIS_CP932
	    if (cp51932_f && 0x79 <= c2 && c2 <= 0x7c){
		nkf_char s2, s1;
		if (e2s_conv(c2, c1, &s2, &s1) == 0){
		    s2e_conv(s2, s1, &c2, &c1);
		    if (c2 < 0x100){
			c1 &= 0x7f;
			c2 &= 0x7f;
		    }
		}
	    }
#endif /* SHIFTJIS_CP932 */
	}
    }
    (*oconv)(c2, c1);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x1013, -0x8(%rbp)     # imm = 0x1013
je 0xc363
cmpl $0x8e, -0x8(%rbp)
jne 0xc39a
cmpl $0x0, 0x4e0f6(%rip)     # 0x5a460
je 0xc385
cmpl $0x0, 0x45f1d(%rip)     # 0x52290
jne 0xc385
movl $0x22, -0x8(%rbp)
movl $0x2e, -0xc(%rbp)
jmp 0xc395
movl $0x1013, -0x8(%rbp)     # imm = 0x1013
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
jmp 0xc589
cmpl $0x8f, -0x8(%rbp)
jne 0xc48e
cmpl $0x0, -0x10(%rbp)
jne 0xc3b9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc59f
cmpl $0x0, 0x4e0a4(%rip)     # 0x5a464
jne 0xc41a
cmpl $0x0, 0x46053(%rip)     # 0x5241c
jne 0xc41a
movl $0xf5, %eax
cmpl -0xc(%rbp), %eax
jg 0xc41a
cmpl $0xfe, -0xc(%rbp)
jg 0xc41a
movl $0xa1, %eax
cmpl -0x10(%rbp), %eax
jg 0xc41a
cmpl $0xfe, -0x10(%rbp)
jg 0xc41a
movl -0xc(%rbp), %eax
subl $0xf5, %eax
imull $0x5e, %eax, %eax
addl -0x10(%rbp), %eax
subl $0xa1, %eax
addl $0xe3ac, %eax           # imm = 0xE3AC
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
jmp 0xc489
movl -0x8(%rbp), %eax
shll $0x8, %eax
movl -0xc(%rbp), %ecx
andl $0x7f, %ecx
orl %ecx, %eax
movl %eax, -0x8(%rbp)
movl -0x10(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, 0x4e029(%rip)     # 0x5a464
je 0xc487
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
leaq -0x14(%rbp), %rdx
leaq -0x18(%rbp), %rcx
callq 0x11f30
cmpl $0x0, %eax
jne 0xc485
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
leaq -0x8(%rbp), %rdx
leaq -0xc(%rbp), %rcx
callq 0x121e0
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0xc483
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x8(%rbp)
jmp 0xc485
jmp 0xc487
jmp 0xc489
jmp 0xc587
cmpl $-0x1, -0x8(%rbp)
je 0xc4a6
cmpl $0x0, -0x8(%rbp)
je 0xc4a6
cmpl $0x20, -0x8(%rbp)
jl 0xc4a6
cmpl $0x1, -0x8(%rbp)
jne 0xc4ab
jmp 0xc585
cmpl $0x0, 0x4dfb2(%rip)     # 0x5a464
jne 0xc50c
cmpl $0x0, 0x4dfad(%rip)     # 0x5a468
je 0xc50c
movl $0xf5, %eax
cmpl -0x8(%rbp), %eax
jg 0xc50c
cmpl $0xfe, -0x8(%rbp)
jg 0xc50c
movl $0xa1, %eax
cmpl -0xc(%rbp), %eax
jg 0xc50c
cmpl $0xfe, -0xc(%rbp)
jg 0xc50c
movl -0x8(%rbp), %eax
subl $0xf5, %eax
imull $0x5e, %eax, %eax
addl -0xc(%rbp), %eax
subl $0xa1, %eax
addl $0xe000, %eax           # imm = 0xE000
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
jmp 0xc583
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, 0x4df3f(%rip)     # 0x5a464
je 0xc581
movl $0x79, %eax
cmpl -0x8(%rbp), %eax
jg 0xc581
cmpl $0x7c, -0x8(%rbp)
jg 0xc581
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x11f30
cmpl $0x0, %eax
jne 0xc57f
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
leaq -0x8(%rbp), %rdx
leaq -0xc(%rbp), %rcx
callq 0x121e0
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0xc57d
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x8(%rbp)
jmp 0xc57f
jmp 0xc581
jmp 0xc583
jmp 0xc585
jmp 0xc587
jmp 0xc589
movq 0x45d08(%rip), %rax     # 0x52298
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)