// File: /workspace/github_c_makefile_star2_O1/nurse[P]nkf/nkf.c
// Function: j_oconv
static void
j_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 (ms_ucs_map_f && 0xE000 <= c2 && c2 <= 0xE757) {
		/* CP5022x UDC */
		c1 &= 0xFFF;
		c2 = 0x7F + c1 / 94;
		c1 = 0x21 + c1 % 94;
	    } else {
		if (encode_fallback) (*encode_fallback)(c1);
		return;
	    }
	}
    }
#endif
    if (c2 == 0) {
	output_ascii_escape_sequence(ASCII);
	(*o_putc)(c1);
    }
    else if (c2 == EOF) {
	output_ascii_escape_sequence(ASCII);
	(*o_putc)(EOF);
    }
    else if (c2 == ISO_8859_1) {
	output_ascii_escape_sequence(ISO_8859_1);
	(*o_putc)(c1|0x80);
    }
    else if (c2 == JIS_X_0201_1976_K) {
	output_escape_sequence(JIS_X_0201_1976_K);
	(*o_putc)(c1);
#ifdef X0212_ENABLE
    } else if (is_eucg3(c2)){
	output_escape_sequence(x0213_f ? JIS_X_0213_2 : JIS_X_0212);
	(*o_putc)(c2 & 0x7f);
	(*o_putc)(c1);
#endif
    } else {
	if(ms_ucs_map_f
	   ? c2<0x20 || 0x92<c2 || c1<0x20 || 0x7e<c1
	   : c2<0x20 || 0x7e<c2 || c1<0x20 || 0x7e<c1) return;
	output_escape_sequence(x0213_f ? JIS_X_0213_1 : JIS_X_0208);
	(*o_putc)(c2);
	(*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 0xc99a
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x118b5
cmpl $0x0, (%rbx)
jne 0xc99a
movl 0x8(%rsp), %edi
movl %edi, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xc99a
movl %edi, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, 0xc(%rsp)
addl $0xffff2000, %eax       # imm = 0xFFFF2000
cmpl $0x757, %eax            # imm = 0x757
ja 0xcb1c
cmpl $0x0, 0x48a9a(%rip)     # 0x55408
je 0xcb1c
andl $0xfff, %edi            # imm = 0xFFF
imulq $0x2b93106, %rdi, %rax  # imm = 0x2B93106
shrq $0x20, %rax
leal 0x7f(%rax), %ecx
movl %ecx, 0xc(%rsp)
imull $0x5e, %eax, %eax
negl %eax
addl %edi, %eax
addl $0x21, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
testl %eax, %eax
jg 0xc9f2
cmpl $-0x1, %eax
je 0xca7b
testl %eax, %eax
jne 0xca42
cmpl $0x2, 0x48a62(%rip)     # 0x5541c
jb 0xcb62
movl $0x1b, %edi
callq *0x408fd(%rip)          # 0x4d2c8
movl $0x28, %edi
callq *0x408f2(%rip)          # 0x4d2c8
movzbl 0x408f3(%rip), %edi     # 0x4d2d0
callq *0x408e5(%rip)          # 0x4d2c8
movl $0x0, 0x48a2f(%rip)     # 0x5541c
jmp 0xcb62
cmpl $0x1, %eax
je 0xcabb
cmpl $0x1013, %eax           # imm = 0x1013
jne 0xca42
cmpl $0x1013, 0x48a10(%rip)  # imm = 0x1013
je 0xcb62
movl $0x1b, %edi
callq *0x408ab(%rip)          # 0x4d2c8
movl $0x28, %edi
callq *0x408a0(%rip)          # 0x4d2c8
movl $0x49, %edi
callq *0x40895(%rip)          # 0x4d2c8
movl $0x1013, 0x489df(%rip)  # imm = 0x1013
jmp 0xcb62
movl %eax, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
cmpl $0x8f00, %ecx           # imm = 0x8F00
jne 0xcafc
cmpb $0x0, 0x4095f(%rip)     # 0x4d3bc
movl $0x1229, %eax           # imm = 0x1229
movl $0x1159, %edi           # imm = 0x1159
cmovnel %eax, %edi
callq 0x119ee
movl 0xc(%rsp), %edi
andl $0x7f, %edi
jmp 0xcb5c
cmpl $0x2, 0x4899a(%rip)     # 0x5541c
jb 0xcab1
movl $0x1b, %edi
callq *0x40839(%rip)          # 0x4d2c8
movl $0x28, %edi
callq *0x4082e(%rip)          # 0x4d2c8
movzbl 0x4082f(%rip), %edi     # 0x4d2d0
callq *0x40821(%rip)          # 0x4d2c8
movl $0x0, 0x4896b(%rip)     # 0x5541c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0xcb66
cmpl $0x2, 0x4895a(%rip)     # 0x5541c
jb 0xcaf1
movl $0x1b, %edi
callq *0x407f9(%rip)          # 0x4d2c8
movl $0x28, %edi
callq *0x407ee(%rip)          # 0x4d2c8
movzbl 0x407ef(%rip), %edi     # 0x4d2d0
callq *0x407e1(%rip)          # 0x4d2c8
movl $0x1, 0x4892b(%rip)     # 0x5541c
movl $0x80, %edi
orl 0x8(%rsp), %edi
jmp 0xcb66
movl 0x8(%rsp), %ecx
addl $-0x7f, %ecx
cmpl $0x0, 0x488fe(%rip)     # 0x55408
je 0xcb2c
cmpl $-0x5f, %ecx
setb %cl
addl $0xffffff6d, %eax       # imm = 0xFFFFFF6D
cmpl $-0x73, %eax
jmp 0xcb38
movq 0x488ed(%rip), %rax     # 0x55410
testq %rax, %rax
je 0xcb6c
callq *%rax
jmp 0xcb6c
cmpl $-0x5f, %ecx
setb %cl
addl $-0x7f, %eax
cmpl $-0x5f, %eax
setb %al
orb %cl, %al
jne 0xcb6c
cmpb $0x0, 0x40876(%rip)     # 0x4d3bc
movl $0x1233, %eax           # imm = 0x1233
movl $0x1168, %edi           # imm = 0x1168
cmovnel %eax, %edi
callq 0x119ee
movl 0xc(%rsp), %edi
callq *0x40766(%rip)          # 0x4d2c8
movl 0x8(%rsp), %edi
callq *0x4075c(%rip)          # 0x4d2c8
addq $0x10, %rsp
popq %rbx
retq