// File: /workspace/github_c_makefile_star2_O2/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 0xca84
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x116b7
movl (%rbx), %edi
testl %edi, %edi
je 0xcab2
cmpl $0x1013, %edi           # imm = 0x1013
je 0xcb46
testl %edi, %edi
je 0xcb31
cmpl $0x1, %edi
je 0xcb3a
cmpl $-0x1, %edi
jne 0xcb5b
pushq $-0x1
popq %rdi
jmp 0xcb96
movl 0x8(%rsp), %eax
movl %eax, %ecx
andl $0xff000000, %ecx       # imm = 0xFF000000
cmpl $0x1000000, %ecx        # imm = 0x1000000
jne 0xcb31
movl %eax, %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
movl %ecx, 0xc(%rsp)
addl $0xffff18a8, %ecx       # imm = 0xFFFF18A8
cmpl $0xfffff8a8, %ecx       # imm = 0xFFFFF8A8
jb 0xcc58
testb $0x1, 0x3f8c1(%rip)     # 0x4c3ac
jne 0xcc58
andl $0xfff, %eax            # imm = 0xFFF
movw $0xbc, %cx
xorl %edx, %edx
divw %cx
xorl %ecx, %ecx
cmpl $0x0, 0x3f7a8(%rip)     # 0x4c2b0
movzwl %ax, %eax
setne %cl
leal (%rcx,%rcx,4), %ecx
leal (%rax,%rcx), %edi
addl $0xeb, %edi
movl %edi, 0xc(%rsp)
movzwl %dx, %eax
cmpw $0x3f, %ax
sbbl $-0x1, %eax
addl $0x40, %eax
movl %eax, 0x8(%rsp)
jmp 0xcb8c
andl $0x0, 0x478d4(%rip)     # 0x5440c
jmp 0xcb92
movl $0x1, 0x478c8(%rip)     # 0x5440c
jmp 0xcb50
movl $0x9, 0x478bc(%rip)     # 0x5440c
movl $0x80, %edi
orl 0x8(%rsp), %edi
jmp 0xcb96
movl %edi, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xcba2
movl $0x9, 0x47899(%rip)     # 0x5440c
leaq 0x8(%rsp), %rcx
movl (%rcx), %esi
leaq 0xc(%rsp), %rdx
callq 0x10d5b
testl %eax, %eax
jne 0xcb9c
movl 0xc(%rsp), %edi
callq *0x3f726(%rip)          # 0x4c2b8
movl 0x8(%rsp), %edi
callq *0x3f71c(%rip)          # 0x4c2b8
addq $0x10, %rsp
popq %rbx
retq
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 0xcc71
movl $0x9, 0x47842(%rip)     # 0x5440c
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0x10d5b
cmpl $0x0, 0x3f6cd(%rip)     # 0x4c2b0
setne %cl
movl (%rbx), %edi
movl %edi, %eax
addl $0xffffff13, %eax       # imm = 0xFFFFFF13
cmpl $0x2, %eax
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xcc2a
movl %eax, %eax
movslq 0x8(%rsp), %rcx
imulq $0x17a, %rax, %rax      # imm = 0x17A
addq 0x3f3b7(%rip), %rax     # 0x4bfc8
movzwl -0x80(%rax,%rcx,2), %eax
testl %eax, %eax
je 0xcc2a
movl %eax, %edi
shrl $0x8, %edi
movl %edi, 0xc(%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq *0x3f688(%rip)          # 0x4c2b8
movl 0x8(%rsp), %edi
movzbl %dil, %eax
leaq 0x477e1(%rip), %rcx     # 0x54420
movzbl (%rax,%rcx), %eax
testl %eax, %eax
je 0xcc53
movl %eax, %edi
callq *0x3f669(%rip)          # 0x4c2b8
movl 0x8(%rsp), %edi
jmp 0xcb96
movq 0x477a1(%rip), %rcx     # 0x54400
testq %rcx, %rcx
je 0xcb9c
movl %eax, %edi
callq *%rcx
jmp 0xcb9c
xorl %edi, %edi
xorl %esi, %esi
callq 0x11962
jmp 0xcb9c