// File: /workspace/github_c_makefile_star2_O3/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 0xc6e1
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x1191d
movl (%rbx), %ebx
testl %ebx, %ebx
je 0xc72a
testl %ebx, %ebx
jg 0xc6fb
cmpl $-0x1, %ebx
je 0xc870
testl %ebx, %ebx
je 0xc860
jmp 0xc7c5
cmpl $0x1, %ebx
je 0xc877
cmpl $0x1013, %ebx           # imm = 0x1013
jne 0xc7c5
movl $0xc, 0x48d02(%rip)     # 0x5541c
movl $0x8e, %edi
callq *0x40ba3(%rip)          # 0x4d2c8
jmp 0xc881
movl 0x8(%rsp), %edi
movl %edi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xc860
movl %edi, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, 0xc(%rsp)
addl $0xffff2000, %eax       # imm = 0xFFFF2000
cmpl $0x757, %eax            # imm = 0x757
ja 0xc8c0
testb $0x1, 0x40c56(%rip)     # 0x4d3b8
je 0xc8c0
andl $0xfff, %edi            # imm = 0xFFF
imull $0xae5, %edi, %ecx      # imm = 0xAE5
shrl $0x12, %ecx
leal 0x8feb(%rcx), %edx
leal 0x75(%rcx), %eax
cmpl $0x3ac, %edi            # imm = 0x3AC
cmovael %edx, %eax
movl %eax, 0xc(%rsp)
imull $0x5e, %ecx, %ecx
negl %ecx
addl %edi, %ecx
addl $0x21, %ecx
movzwl %cx, %ecx
movl %ecx, 0x8(%rsp)
movl %eax, %edx
andl $0x9f00, %edx           # imm = 0x9F00
movq 0x40b1b(%rip), %rcx     # 0x4d2c8
cmpl $0x8f00, %edx           # imm = 0x8F00
jne 0xc8f3
movl $0x8f, %edi
callq *%rcx
jmp 0xc849
movl %ebx, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc897
movl $0xc, 0x48c3b(%rip)     # 0x5541c
cmpl $0x0, 0x40ad8(%rip)     # 0x4d2c0
jne 0xc823
movl 0x8(%rsp), %esi
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movl %ebx, %edi
callq 0x10f30
testl %eax, %eax
jne 0xc823
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x1108d
movl (%rbx), %ebx
testl %ebx, %ebx
je 0xc860
movl %ebx, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc8db
cmpb $0x1, 0x40b7c(%rip)     # 0x4d3b8
jne 0xc890
movl $0x8f, %edi
callq *0x40a7f(%rip)          # 0x4d2c8
movzbl 0xc(%rsp), %edi
movl $0x80, %ebx
orl %ebx, %edi
callq *0x40a6d(%rip)          # 0x4d2c8
jmp 0xc8ff
movl $0x0, 0x48bb2(%rip)     # 0x5541c
movl 0x8(%rsp), %edi
jmp 0xc88a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0xc88a
movl $0x1, 0x48b9b(%rip)     # 0x5541c
movl $0x80, %edi
orl 0x8(%rsp), %edi
callq *0x40a38(%rip)          # 0x4d2c8
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leal -0x21(%rbx), %eax
cmpl $0x5d, %eax
ja 0xc8d0
movl 0x8(%rsp), %eax
addl $-0x21, %eax
cmpl $0x5e, %eax
jae 0xc8d0
movl $0xc, 0x48b67(%rip)     # 0x5541c
movl $0x80, %ebp
orl %ebp, %ebx
movl %ebx, %edi
jmp 0xc8e5
movq 0x48b49(%rip), %rax     # 0x55410
testq %rax, %rax
je 0xc890
callq *%rax
jmp 0xc890
xorl %edi, %edi
xorl %esi, %esi
callq 0x11c09
jmp 0xc890
movl $0x80, %ebp
orl %ebp, %ebx
movzbl %bl, %edi
callq *0x409dd(%rip)          # 0x4d2c8
orl 0x8(%rsp), %ebp
movl %ebp, %edi
jmp 0xc88a
movl $0x80, %ebx
orl %ebx, %eax
movzbl %al, %edi
callq *%rcx
orl 0x8(%rsp), %ebx
movl %ebx, %edi
jmp 0xc88a