// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x1013, -0x8(%rbp)     # imm = 0x1013
jne 0x137cd
cmpl $0x3, 0x46cde(%rip)     # 0x5a468
jne 0x137bd
movl -0xc(%rbp), %eax
movl %eax, -0x30(%rbp)
subl $0x20, %eax
je 0x137a3
jmp 0x13799
movl -0x30(%rbp), %eax
subl $0x7d, %eax
je 0x137af
jmp 0x137bb
movl $0xa0, -0x4(%rbp)
jmp 0x13aa4
movl $0xa9, -0x4(%rbp)
jmp 0x13aa4
jmp 0x137bd
leaq 0xa46c(%rip), %rax      # 0x1dc30
movq %rax, -0x18(%rbp)
jmp 0x1392b
movl -0x8(%rbp), %eax
movzwl %ax, %eax
sarl $0x8, %eax
cmpl $0x8f, %eax
jne 0x1386a
cmpl $0x0, 0x46c80(%rip)     # 0x5a468
jne 0x13805
cmpl $0x8f22, -0x8(%rbp)     # imm = 0x8F22
jne 0x13805
cmpl $0x43, -0xc(%rbp)
jne 0x13805
movl $0xa6, -0x4(%rbp)
jmp 0x13aa4
movl -0x8(%rbp), %eax
andl $0x7f, %eax
subl $0x21, %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
jg 0x13859
cmpl $0x5e, -0x8(%rbp)
jge 0x13859
cmpl $0x0, 0x3ebf7(%rip)     # 0x5241c
je 0x1383c
movslq -0x8(%rbp), %rcx
leaq 0x399ce(%rip), %rax     # 0x4d200
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x1384f
movslq -0x8(%rbp), %rcx
leaq 0x396c9(%rip), %rax     # 0x4cf10
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x13865
movl $0x0, -0x4(%rbp)
jmp 0x13aa4
jmp 0x13929
movl -0x8(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x7f, %eax
subl $0x21, %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
jg 0x1391b
cmpl $0x5e, -0x8(%rbp)
jge 0x1391b
cmpl $0x0, 0x3eb81(%rip)     # 0x5241c
je 0x138b2
movslq -0x8(%rbp), %rcx
leaq 0x39378(%rip), %rax     # 0x4cc20
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x13911
cmpl $0x0, 0x46baf(%rip)     # 0x5a468
jne 0x138d0
movslq -0x8(%rbp), %rcx
leaq 0x38a8a(%rip), %rax     # 0x4c350
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x13909
cmpl $0x3, 0x46b91(%rip)     # 0x5a468
jne 0x138ee
movslq -0x8(%rbp), %rcx
leaq 0x3904c(%rip), %rax     # 0x4c930
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x13901
movslq -0x8(%rbp), %rcx
leaq 0x38d47(%rip), %rax     # 0x4c640
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x13927
movl $0x0, -0x4(%rbp)
jmp 0x13aa4
jmp 0x13929
jmp 0x1392b
cmpq $0x0, -0x18(%rbp)
jne 0x1393e
movl $0x0, -0x4(%rbp)
jmp 0x13aa4
movl -0xc(%rbp), %eax
andl $0x7f, %eax
subl $0x21, %eax
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jg 0x13a9d
cmpl $0x5e, -0xc(%rbp)
jge 0x13a9d
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, 0x3eaa7(%rip)     # 0x5241c
je 0x13a95
movl $0xd800, %eax           # imm = 0xD800
cmpl -0x1c(%rbp), %eax
jg 0x13a95
cmpl $0xdbff, -0x1c(%rbp)    # imm = 0xDBFF
jg 0x13a95
movl -0x8(%rbp), %eax
addl $0x21, %eax
shll $0x8, %eax
movl -0xc(%rbp), %ecx
addl $0x21, %ecx
orl %ecx, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movslq -0x8(%rbp), %rdx
leaq 0x39840(%rip), %rcx     # 0x4d200
cmpq (%rcx,%rdx,8), %rax
jne 0x13a1e
jmp 0x139c8
movl $0x0, -0x28(%rbp)
cmpl $0x115, -0x28(%rbp)     # imm = 0x115
jge 0x13a1a
movslq -0x28(%rbp), %rcx
leaq 0x13a5d(%rip), %rax     # 0x27440
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x13a0d
movslq -0x28(%rbp), %rcx
leaq 0x13a43(%rip), %rax     # 0x27440
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x13a1a
jmp 0x13a0f
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x139cf
jmp 0x13a1c
jmp 0x13a73
jmp 0x13a20
movl $0x0, -0x2c(%rbp)
cmpl $0x1a, -0x2c(%rbp)
jge 0x13a6f
movslq -0x2c(%rbp), %rcx
leaq 0x13968(%rip), %rax     # 0x273a0
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x13a62
movslq -0x2c(%rbp), %rcx
leaq 0x1394e(%rip), %rax     # 0x273a0
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x13a6f
jmp 0x13a64
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x13a27
jmp 0x13a71
jmp 0x13a73
cmpl $0x0, -0x24(%rbp)
jne 0x13a82
movl $0x0, -0x4(%rbp)
jmp 0x13aa4
movl -0x1c(%rbp), %eax
shll $0xa, %eax
addl -0x24(%rbp), %eax
subl $0x35fdc00, %eax        # imm = 0x35FDC00
movl %eax, -0x4(%rbp)
jmp 0x13aa4
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x13aa4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)