// File: /workspace/github_c_makefile_star2_O1/nurse[P]nkf/nkf.c
// Function: e_oconv
static void
e_oconv(nkf_char c2, nkf_char c1)
{
    if (c2 == 0 && nkf_char_unicode_p(c1)){
	w16e_conv(c1, &c2, &c1);
	if (c2 == 0 && nkf_char_unicode_p(c1)){
	    c2 = c1 & VALUE_MASK;
	    if (x0212_f && 0xE000 <= c2 && c2 <= 0xE757) {
		/* eucJP-ms UDC */
		c1 &= 0xFFF;
		c2 = c1 / 94;
		c2 += c2 < 10 ? 0x75 : 0x8FEB;
		c1 = 0x21 + c1 % 94;
		if (is_eucg3(c2)){
		    (*o_putc)(0x8f);
		    (*o_putc)((c2 & 0x7f) | 0x080);
		    (*o_putc)(c1 | 0x080);
		}else{
		    (*o_putc)((c2 & 0x7f) | 0x080);
		    (*o_putc)(c1 | 0x080);
		}
		return;
	    } else {
		if (encode_fallback) (*encode_fallback)(c1);
		return;
	    }
	}
    }

    if (c2 == EOF) {
	(*o_putc)(EOF);
    } else if (c2 == 0) {
	output_mode = ASCII;
	(*o_putc)(c1);
    } else if (c2 == JIS_X_0201_1976_K) {
	output_mode = EUC_JP;
	(*o_putc)(SS2); (*o_putc)(c1|0x80);
    } else if (c2 == ISO_8859_1) {
	output_mode = ISO_8859_1;
	(*o_putc)(c1 | 0x080);
#ifdef X0212_ENABLE
    } else if (is_eucg3(c2)){
	output_mode = EUC_JP;
#ifdef SHIFTJIS_CP932
	if (!cp932inv_f){
	    nkf_char s2, s1;
	    if (e2s_conv(c2, c1, &s2, &s1) == 0){
		s2e_conv(s2, s1, &c2, &c1);
	    }
	}
#endif
	if (c2 == 0) {
	    output_mode = ASCII;
	    (*o_putc)(c1);
	}else if (is_eucg3(c2)){
	    if (x0212_f){
		(*o_putc)(0x8f);
		(*o_putc)((c2 & 0x7f) | 0x080);
		(*o_putc)(c1 | 0x080);
	    }
	}else{
	    (*o_putc)((c2 & 0x7f) | 0x080);
	    (*o_putc)(c1 | 0x080);
	}
#endif
    } else {
	if (!nkf_isgraph(c1) || !nkf_isgraph(c2)) {
	    set_iconv(FALSE, 0);
	    return; /* too late to rescue this char */
	}
	output_mode = EUC_JP;
	(*o_putc)(c2 | 0x080);
	(*o_putc)(c1 | 0x080);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, 0x4(%rsp)
movl %esi, (%rsp)
movl %esi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
xorl $0x1000000, %eax        # imm = 0x1000000
orl %edi, %eax
jne 0xc791
leaq 0x4(%rsp), %rbx
movq %rsp, %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x118b5
cmpl $0x0, (%rbx)
jne 0xc791
movl (%rsp), %edi
movl %edi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xc791
movl %edi, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, 0x4(%rsp)
addl $0xffff2000, %eax       # imm = 0xFFFF2000
cmpl $0x757, %eax            # imm = 0x757
ja 0xc8ba
testb $0x1, 0x40c88(%rip)     # 0x4d3b8
je 0xc8ba
andl $0xfff, %edi            # imm = 0xFFF
imulq $0x2b93106, %rdi, %rcx  # imm = 0x2B93106
shrq $0x20, %rcx
leal 0x8feb(%rcx), %edx
leal 0x75(%rcx), %eax
cmpl $0x3ac, %edi            # imm = 0x3AC
cmovael %edx, %eax
movl %eax, 0x4(%rsp)
imull $0x5e, %ecx, %ecx
negl %ecx
addl %edi, %ecx
addl $0x21, %ecx
movl %ecx, (%rsp)
movl %eax, %edx
andl $0x9f00, %edx           # imm = 0x9F00
movq 0x40b4f(%rip), %rcx     # 0x4d2c8
cmpl $0x8f00, %edx           # imm = 0x8F00
jne 0xc8f6
movl $0x8f, %edi
callq *%rcx
jmp 0xc86b
movl 0x4(%rsp), %edi
testl %edi, %edi
jg 0xc7b8
cmpl $-0x1, %edi
je 0xc879
testl %edi, %edi
jne 0xc7e3
movl $0x0, 0x48c6c(%rip)     # 0x5541c
movl (%rsp), %edi
jmp 0xc8ea
cmpl $0x1, %edi
je 0xc880
cmpl $0x1013, %edi           # imm = 0x1013
jne 0xc7e3
movl $0xc, 0x48c49(%rip)     # 0x5541c
movl $0x8e, %edi
callq *0x40aea(%rip)          # 0x4d2c8
jmp 0xc88a
movl %edi, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc894
movl $0xc, 0x48c1d(%rip)     # 0x5541c
cmpl $0x0, 0x40aba(%rip)     # 0x4d2c0
jne 0xc833
movl (%rsp), %esi
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x10f40
testl %eax, %eax
jne 0xc833
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
leaq 0x4(%rsp), %rdx
movq %rsp, %rcx
callq 0x110a3
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0xc7a6
movl %eax, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
cmpl $0x8f00, %ecx           # imm = 0x8F00
jne 0xc8d5
cmpb $0x1, 0x40b5e(%rip)     # 0x4d3b8
jne 0xc8f0
movl $0x8f, %edi
callq *0x40a5d(%rip)          # 0x4d2c8
movzbl 0x4(%rsp), %edi
movl $0x80, %ebx
orl %ebx, %edi
jmp 0xc8df
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0xc8ea
movl $0x1, 0x48b92(%rip)     # 0x5541c
movl $0x80, %edi
orl (%rsp), %edi
jmp 0xc8ea
leal -0x21(%rdi), %eax
cmpl $0x5d, %eax
ja 0xc8ca
movl (%rsp), %eax
addl $-0x21, %eax
cmpl $0x5e, %eax
jae 0xc8ca
movl $0xc, 0x48b6b(%rip)     # 0x5541c
movl $0x80, %ebx
orl %ebx, %edi
jmp 0xc8df
movq 0x48b4f(%rip), %rax     # 0x55410
testq %rax, %rax
je 0xc8f0
callq *%rax
jmp 0xc8f0
xorl %edi, %edi
xorl %esi, %esi
callq 0x11bad
jmp 0xc8f0
movl $0x80, %ebx
orl %ebx, %eax
movzbl %al, %edi
callq *0x409e3(%rip)          # 0x4d2c8
orl (%rsp), %ebx
movl %ebx, %edi
callq *0x409d8(%rip)          # 0x4d2c8
addq $0x10, %rsp
popq %rbx
retq
movl $0x80, %ebx
orl %ebx, %eax
movzbl %al, %edi
callq *%rcx
jmp 0xc8e5