// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
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 0xccf3
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x118b5
cmpl $0x0, (%rbx)
jne 0xccf3
movl 0x8(%rsp), %edi
movl %edi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xccf3
movl %edi, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, 0xc(%rsp)
addl $0xffff18a8, %eax       # imm = 0xFFFF18A8
cmpl $0xfffff8a8, %eax       # imm = 0xFFFFF8A8
jb 0xce42
testb $0x1, 0x40716(%rip)     # 0x4d3bc
jne 0xce42
andl $0xfff, %edi            # imm = 0xFFF
xorl %eax, %eax
cmpl $0x0, 0x40605(%rip)     # 0x4d2c0
setne %al
leal (%rax,%rax,4), %eax
imulq $0x15c9883, %rdi, %rcx  # imm = 0x15C9883
shrq $0x20, %rcx
addl %ecx, %eax
addl $0xeb, %eax
movl %eax, 0xc(%rsp)
imull $0xbc, %ecx, %ecx
subl %ecx, %edi
cmpl $0x3f, %edi
sbbl $-0x1, %edi
addl $0x40, %edi
movl %edi, 0x8(%rsp)
movl %eax, %edi
jmp 0xce2c
movl 0xc(%rsp), %edi
testl %edi, %edi
jg 0xcd13
cmpl $-0x1, %edi
je 0xcd66
testl %edi, %edi
jne 0xcd2c
movl $0x0, 0x4870e(%rip)     # 0x5541c
jmp 0xce32
cmpl $0x1, %edi
je 0xcd70
cmpl $0x1013, %edi           # imm = 0x1013
jne 0xcd2c
movl $0x9, 0x486f2(%rip)     # 0x5541c
jmp 0xcd7a
movl %edi, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xcd88
movl $0x9, 0x486d8(%rip)     # 0x5541c
leaq 0x8(%rsp), %rcx
movl (%rcx), %esi
leaq 0xc(%rsp), %rdx
callq 0x10f40
testl %eax, %eax
jne 0xce3c
movl 0xc(%rsp), %edi
jmp 0xce2c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0xce36
movl $0x1, 0x486a2(%rip)     # 0x5541c
movl $0x80, %edi
orl 0x8(%rsp), %edi
jmp 0xce36
movl 0x8(%rsp), %esi
leal -0x20(%rsi), %eax
cmpl $0x5f, %eax
setb %al
leal -0x20(%rdi), %ecx
cmpl $0x5f, %ecx
setb %cl
testb %al, %cl
je 0xce52
movl $0x9, 0x4866c(%rip)     # 0x5541c
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x10f40
cmpl $0x0, 0x404f7(%rip)     # 0x4d2c0
setne %cl
movl (%rbx), %eax
addl $0xffffff13, %eax       # imm = 0xFFFFFF13
cmpl $0x2, %eax
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xce0e
movl %eax, %eax
movslq 0x8(%rsp), %rcx
imulq $0x17a, %rax, %rax      # imm = 0x17A
addq 0x401cb(%rip), %rax     # 0x4cfc0
movzwl -0x80(%rax,%rcx,2), %eax
testl %eax, %eax
je 0xce0e
movl %eax, %ecx
shrl $0x8, %ecx
movl %ecx, 0xc(%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %edi
callq *0x404b0(%rip)          # 0x4d2c8
movzbl 0x8(%rsp), %eax
leaq 0x4860c(%rip), %rcx     # 0x55430
movzbl (%rax,%rcx), %edi
testl %edi, %edi
je 0xce32
callq *0x40496(%rip)          # 0x4d2c8
movl 0x8(%rsp), %edi
callq *0x4048c(%rip)          # 0x4d2c8
addq $0x10, %rsp
popq %rbx
retq
movq 0x485c7(%rip), %rax     # 0x55410
testq %rax, %rax
je 0xce3c
callq *%rax
jmp 0xce3c
xorl %edi, %edi
xorl %esi, %esi
callq 0x11bad
jmp 0xce3c