// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
movl %edi, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movl %esi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
xorl $0x1000000, %eax        # imm = 0x1000000
orl %edi, %eax
jne 0xc53a
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x116b7
movl (%rbx), %ebx
testl %ebx, %ebx
je 0xc568
cmpl $0x1013, %ebx           # imm = 0x1013
je 0xc60d
testl %ebx, %ebx
je 0xc6c8
cmpl $0x1, %ebx
je 0xc601
cmpl $-0x1, %ebx
jne 0xc630
pushq $-0x1
popq %rdi
jmp 0xc743
movl 0x8(%rsp), %edi
movl %edi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xc6c8
movl %edi, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, 0xc(%rsp)
addl $0xffff2000, %eax       # imm = 0xFFFF2000
cmpl $0x757, %eax            # imm = 0x757
ja 0xc6fe
testb $0x1, 0x3fe08(%rip)     # 0x4c3a8
je 0xc6fe
andl $0xfff, %edi            # imm = 0xFFF
movw $0x5e, %cx
movl %edi, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %eax
leal 0x8feb(%rax), %ecx
addl $0x75, %eax
cmpl $0x3ac, %edi            # imm = 0x3AC
cmovael %ecx, %eax
movl %eax, 0xc(%rsp)
addl $0x21, %edx
movzwl %dx, %ecx
movl %ecx, 0x8(%rsp)
movl %eax, %edx
andl $0x9f00, %edx           # imm = 0x9F00
movq 0x3fccf(%rip), %rcx     # 0x4c2b8
cmpl $0x8f00, %edx           # imm = 0x8F00
jne 0xc731
movl $0x8f, %edi
callq *%rcx
jmp 0xc6b4
movl $0x1, 0x47e01(%rip)     # 0x5440c
jmp 0xc622
movl $0xc, 0x47df5(%rip)     # 0x5440c
movl $0x8e, %edi
callq *0x3fc96(%rip)          # 0x4c2b8
movl $0x80, %edi
orl 0x8(%rsp), %edi
jmp 0xc743
movl %ebx, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc6d5
movl $0xc, 0x47dc0(%rip)     # 0x5440c
cmpl $0x0, 0x3fc5d(%rip)     # 0x4c2b0
jne 0xc68e
movl 0x8(%rsp), %esi
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movl %ebx, %edi
callq 0x10d5b
testl %eax, %eax
jne 0xc68e
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x10ea6
movl (%rbx), %ebx
testl %ebx, %ebx
je 0xc6c8
movl %ebx, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc719
cmpb $0x1, 0x3fd05(%rip)     # 0x4c3a8
jne 0xc749
movl $0x8f, %edi
callq *0x3fc04(%rip)          # 0x4c2b8
movzbl 0xc(%rsp), %edi
movl $0x80, %ebx
orl %ebx, %edi
callq *0x3fbf2(%rip)          # 0x4c2b8
jmp 0xc73d
andl $0x0, 0x47d3d(%rip)     # 0x5440c
movl 0x8(%rsp), %edi
jmp 0xc743
leal -0x21(%rbx), %eax
cmpl $0x5d, %eax
ja 0xc70e
movl 0x8(%rsp), %eax
addl $-0x21, %eax
cmpl $0x5e, %eax
jae 0xc70e
movl $0xc, 0x47d19(%rip)     # 0x5440c
movl $0x80, %ebp
orl %ebp, %ebx
movl %ebx, %edi
jmp 0xc723
movq 0x47cfb(%rip), %rax     # 0x54400
testq %rax, %rax
je 0xc749
callq *%rax
jmp 0xc749
xorl %edi, %edi
xorl %esi, %esi
callq 0x11962
jmp 0xc749
movl $0x80, %ebp
orl %ebp, %ebx
movzbl %bl, %edi
callq *0x3fb8f(%rip)          # 0x4c2b8
orl 0x8(%rsp), %ebp
movl %ebp, %edi
jmp 0xc743
movl $0x80, %ebx
orl %ebx, %eax
movzbl %al, %edi
callq *%rcx
orl 0x8(%rsp), %ebx
movl %ebx, %edi
callq *0x3fb6f(%rip)          # 0x4c2b8
addq $0x18, %rsp
popq %rbx
popq %rbp
retq