// File: /workspace/github_c_makefile_star2_O0/nurse[P]nkf/nkf.c
// Function: s_oconv
static void
s_oconv(nkf_char c2, nkf_char c1)
{
#ifdef NUMCHAR_OPTION
    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 (!x0213_f && 0xE000 <= c2 && c2 <= 0xE757) {
		/* CP932 UDC */
		c1 &= 0xFFF;
		c2 = c1 / 188 + (cp932inv_f ? 0xF0 : 0xEB);
		c1 = c1 % 188;
		c1 += 0x40 + (c1 > 0x3e);
		(*o_putc)(c2);
		(*o_putc)(c1);
		return;
	    } else {
		if(encode_fallback)(*encode_fallback)(c1);
		return;
	    }
	}
    }
#endif
    if (c2 == EOF) {
	(*o_putc)(EOF);
	return;
    } else if (c2 == 0) {
	output_mode = ASCII;
	(*o_putc)(c1);
    } else if (c2 == JIS_X_0201_1976_K) {
	output_mode = SHIFT_JIS;
	(*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 = SHIFT_JIS;
	if (e2s_conv(c2, c1, &c2, &c1) == 0){
	    (*o_putc)(c2);
	    (*o_putc)(c1);
	}
#endif
    } else {
	if (!nkf_isprint(c1) || !nkf_isprint(c2)) {
	    set_iconv(FALSE, 0);
	    return; /* too late to rescue this char */
	}
	output_mode = SHIFT_JIS;
	e2s_conv(c2, c1, &c2, &c1);

#ifdef SHIFTJIS_CP932
	if (cp932inv_f
	    && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){
	    nkf_char c = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40];
	    if (c){
		c2 = c >> 8;
		c1 = c & 0xff;
	    }
	}
#endif /* SHIFTJIS_CP932 */

	(*o_putc)(c2);
	if (prefix_table[(unsigned char)c1]){
	    (*o_putc)(prefix_table[(unsigned char)c1]);
	}
	(*o_putc)(c1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0xce41
movl -0x8(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xce41
movl -0x8(%rbp), %edi
leaq -0x4(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0x13020
cmpl $0x0, -0x4(%rbp)
jne 0xce3f
movl -0x8(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xce3f
movl -0x8(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x4(%rbp)
cmpl $0x0, 0x45682(%rip)     # 0x5241c
jne 0xce24
movl $0xe000, %eax           # imm = 0xE000
cmpl -0x4(%rbp), %eax
jg 0xce24
cmpl $0xe757, -0x4(%rbp)     # imm = 0xE757
jg 0xce24
movl -0x8(%rbp), %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl $0xbc, %ecx
cltd
idivl %ecx
movl 0x454d1(%rip), %esi     # 0x522a0
movl $0xeb, %ecx
movl $0xf0, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %eax
movl $0xbc, %ecx
cltd
idivl %ecx
movl %edx, -0x8(%rbp)
cmpl $0x3e, -0x8(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
addl $0x40, %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movq 0x4549a(%rip), %rax     # 0x522a8
movl -0x4(%rbp), %edi
callq *%rax
movq 0x4548e(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
callq *%rax
jmp 0xd01a
cmpq $0x0, 0x4d644(%rip)     # 0x5a470
je 0xce3a
movq 0x4d63b(%rip), %rax     # 0x5a470
movl -0x8(%rbp), %edi
callq *%rax
jmp 0xd01a
jmp 0xce41
cmpl $-0x1, -0x4(%rbp)
jne 0xce57
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq *0x45456(%rip)          # 0x522a8
jmp 0xd01a
cmpl $0x0, -0x4(%rbp)
jne 0xce78
movl $0x0, 0x4d615(%rip)     # 0x5a47c
movq 0x4543a(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
callq *%rax
jmp 0xd018
cmpl $0x1013, -0x4(%rbp)     # imm = 0x1013
jne 0xcea2
movl $0x9, 0x4d5f1(%rip)     # 0x5a47c
movq 0x45416(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
orl $0x80, %edi
callq *%rax
jmp 0xd016
cmpl $0x1, -0x4(%rbp)
jne 0xcec9
movl $0x1, 0x4d5ca(%rip)     # 0x5a47c
movq 0x453ef(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
orl $0x80, %edi
callq *%rax
jmp 0xd014
movl -0x4(%rbp), %eax
movzwl %ax, %eax
sarl $0x8, %eax
cmpl $0x8f, %eax
jne 0xcf18
movl $0x9, 0x4d599(%rip)     # 0x5a47c
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x4(%rbp), %rdx
leaq -0x8(%rbp), %rcx
callq 0x11f30
cmpl $0x0, %eax
jne 0xcf13
movq 0x453a6(%rip), %rax     # 0x522a8
movl -0x4(%rbp), %edi
callq *%rax
movq 0x4539a(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
callq *%rax
jmp 0xd012
movl $0x20, %eax
cmpl -0x8(%rbp), %eax
jg 0xcf38
cmpl $0x7e, -0x8(%rbp)
jg 0xcf38
movl $0x20, %eax
cmpl -0x4(%rbp), %eax
jg 0xcf38
cmpl $0x7e, -0x4(%rbp)
jle 0xcf48
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x135a0
jmp 0xd01a
movl $0x9, 0x4d52a(%rip)     # 0x5a47c
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x4(%rbp), %rdx
leaq -0x8(%rbp), %rcx
callq 0x11f30
cmpl $0x0, 0x45334(%rip)     # 0x522a0
je 0xcfc9
movl $0xed, %eax
cmpl -0x4(%rbp), %eax
jg 0xcfc9
cmpl $0xee, -0x4(%rbp)
jg 0xcfc9
movl -0x4(%rbp), %eax
subl $0xed, %eax
movslq %eax, %rcx
leaq 0x1e44d(%rip), %rax     # 0x2b3e0
imulq $0x17a, %rcx, %rcx      # imm = 0x17A
addq %rcx, %rax
movl -0x8(%rbp), %ecx
subl $0x40, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xcfc7
movl -0xc(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x4(%rbp)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x8(%rbp)
jmp 0xcfc9
movq 0x452d8(%rip), %rax     # 0x522a8
movl -0x4(%rbp), %edi
callq *%rax
movl -0x8(%rbp), %eax
movzbl %al, %eax
movl %eax, %ecx
leaq 0x4d4ac(%rip), %rax     # 0x5a490
cmpb $0x0, (%rax,%rcx)
je 0xd006
movq 0x452b7(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %ecx
movzbl %cl, %ecx
movl %ecx, %edx
leaq 0x4d490(%rip), %rcx     # 0x5a490
movzbl (%rcx,%rdx), %edi
callq *%rax
movq 0x4529b(%rip), %rax     # 0x522a8
movl -0x8(%rbp), %edi
callq *%rax
jmp 0xd014
jmp 0xd016
jmp 0xd018
jmp 0xd01a
addq $0x10, %rsp
popq %rbp
retq