// File: /workspace/github_c_makefile_star2_O1/nurse[P]nkf/nkf.c
// Function: e2w_conv
static nkf_char
e2w_conv(nkf_char c2, nkf_char c1)
{
    const unsigned short *p;

    if (c2 == JIS_X_0201_1976_K) {
	if (ms_ucs_map_f == UCS_MAP_CP10001) {
	    switch (c1) {
	    case 0x20:
		return 0xA0;
	    case 0x7D:
		return 0xA9;
	    }
	}
	p = euc_to_utf8_1byte;
#ifdef X0212_ENABLE
    } else if (is_eucg3(c2)){
	if(ms_ucs_map_f == UCS_MAP_ASCII&& c2 == NKF_INT32_C(0x8F22) && c1 == 0x43){
	    return 0xA6;
	}
	c2 = (c2&0x7f) - 0x21;
	if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
	    p =
		x0213_f ? x0212_to_utf8_2bytes_x0213[c2] :
		x0212_to_utf8_2bytes[c2];
	else
	    return 0;
#endif
    } else {
	c2 &= 0x7f;
	c2 = (c2&0x7f) - 0x21;
	if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
	    p =
		x0213_f ? euc_to_utf8_2bytes_x0213[c2] :
		ms_ucs_map_f == UCS_MAP_ASCII ? euc_to_utf8_2bytes[c2] :
		ms_ucs_map_f == UCS_MAP_CP10001 ? euc_to_utf8_2bytes_mac[c2] :
		euc_to_utf8_2bytes_ms[c2];
	else
	    return 0;
    }
    if (!p) return 0;
    c1 = (c1 & 0x7f) - 0x21;
    if (0<=c1 && c1<sizeof_euc_to_utf8_1byte) {
	nkf_char val = p[c1];
	if (x0213_f && 0xD800<=val && val<=0xDBFF) {
	    nkf_char euc = (c2+0x21)<<8 | (c1+0x21);
	    nkf_char low = 0;
	    if (p==x0212_to_utf8_2bytes_x0213[c2]) {
		X0213_SURROGATE_FIND(x0213_2_surrogate_table, sizeof_x0213_2_surrogate_table, euc);
	    } else {
		X0213_SURROGATE_FIND(x0213_1_surrogate_table, sizeof_x0213_1_surrogate_table, euc);
	    }
	    if (!low) return 0;
	    return UTF16_TO_UTF32(val, low);
	} else {
	    return val;
	}
    }
    return 0;
}

// Assembly:
cmpl $0x1013, %edi           # imm = 0x1013
jne 0x11cde
movl $0x1013, %edi           # imm = 0x1013
leaq 0x6bd7(%rip), %rcx      # 0x18890
cmpl $0x3, 0x43748(%rip)     # 0x55408
jne 0x11da4
cmpl $0x20, %esi
je 0x11d60
cmpl $0x7d, %esi
jne 0x11da4
movl $0xa9, %eax
retq
movl %edi, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0x11d2f
cmpl $0x43, %esi
jne 0x11d07
cmpl $0x8f22, %edi           # imm = 0x8F22
jne 0x11d07
movl $0xa6, %eax
cmpl $0x0, 0x43703(%rip)     # 0x55408
je 0x11cdd
andl $0x7f, %edi
cmpl $0x21, %edi
setb %al
cmpl $0x7f, %edi
sete %cl
orb %al, %cl
jne 0x11d5d
addl $-0x21, %edi
cmpb $0x0, 0x3b698(%rip)     # 0x4d3bc
je 0x11d84
leaq 0x36483(%rip), %rax     # 0x481b0
jmp 0x11d8b
andl $0x7f, %edi
cmpl $0x21, %edi
setb %al
cmpl $0x7f, %edi
sete %cl
orb %al, %cl
jne 0x11d5d
addl $-0x21, %edi
cmpb $0x1, 0x3b670(%rip)     # 0x4d3bc
jne 0x11d66
movl %edi, %eax
shlq $0x3, %rax
addq 0x3b26d(%rip), %rax     # 0x4cfc8
jmp 0x11da1
xorl %eax, %eax
retq
movl $0xa0, %eax
retq
movl 0x4369c(%rip), %ecx     # 0x55408
movl %edi, %eax
shlq $0x3, %rax
cmpl $0x3, %ecx
je 0x11d91
testl %ecx, %ecx
jne 0x11d9a
addq 0x3b20e(%rip), %rax     # 0x4cf90
jmp 0x11da1
leaq 0x36135(%rip), %rax     # 0x47ec0
leaq (%rax,%rdi,8), %rax
jmp 0x11da1
addq 0x3b210(%rip), %rax     # 0x4cfa8
jmp 0x11da1
addq 0x3b1cf(%rip), %rax     # 0x4cf70
movq (%rax), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x11cdd
andl $0x7f, %esi
cmpl $0x21, %esi
setb %dl
cmpl $0x7f, %esi
sete %r8b
orb %dl, %r8b
jne 0x11cdd
leal -0x21(%rsi), %eax
movzwl (%rcx,%rax,2), %eax
cmpb $0x1, 0x3b5e6(%rip)     # 0x4d3bc
jne 0x11cdd
movl %eax, %edx
andl $0xfc00, %edx           # imm = 0xFC00
movzwl %dx, %edx
cmpl $0xd800, %edx           # imm = 0xD800
jne 0x11cdd
movl %edi, %r8d
shll $0x8, %edi
leal (%rdi,%rsi), %edx
addl $0x2100, %edx           # imm = 0x2100
leaq 0x363a7(%rip), %rsi     # 0x481b0
cmpq (%rsi,%r8,8), %rcx
je 0x11e2f
xorl %ecx, %ecx
leaq 0x101e8(%rip), %rsi     # 0x22000
movzwl (%rsi,%rcx), %edi
cmpl %edi, %edx
je 0x11e51
addq $0x6, %rcx
cmpq $0x9c, %rcx
jne 0x11e18
jmp 0x11e4d
xorl %ecx, %ecx
leaq 0x10268(%rip), %rsi     # 0x220a0
movzwl (%rsi,%rcx), %edi
cmpl %edi, %edx
je 0x11e5a
addq $0x6, %rcx
cmpq $0x67e, %rcx            # imm = 0x67E
jne 0x11e38
xorl %ecx, %ecx
jmp 0x11e65
addq 0x3b180(%rip), %rcx     # 0x4cfd8
jmp 0x11e61
addq 0x3b14f(%rip), %rcx     # 0x4cfb0
movzwl 0x4(%rcx), %ecx
movzwl %cx, %ecx
shll $0xa, %eax
xorl %edx, %edx
testw %cx, %cx
leal -0x35fdc00(%rax,%rcx), %eax
cmovel %edx, %eax
retq