// File: /workspace/github_c_makefile_star2_O2/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 0xc787
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq 0x116b7
movl (%rbx), %edi
testl %edi, %edi
je 0xc7e4
cmpl $-0x1, %edi
je 0xc8d6
cmpl $0x1013, %edi           # imm = 0x1013
je 0xc887
cmpl $0x1, %edi
je 0xc896
testl %edi, %edi
je 0xc84f
movl %edi, %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x8f00, %eax           # imm = 0x8F00
jne 0xc90a
cmpb $0x0, 0x3fbe6(%rip)     # 0x4c3ac
movl $0x1229, %eax           # imm = 0x1229
movl $0x1159, %edi           # imm = 0x1159
cmovnel %eax, %edi
callq 0x117de
movl 0xc(%rsp), %edi
andl $0x7f, %edi
jmp 0xc96d
movl 0x8(%rsp), %eax
movl %eax, %ecx
andl $0xff000000, %ecx       # imm = 0xFF000000
cmpl $0x1000000, %ecx        # imm = 0x1000000
jne 0xc84f
movl %eax, %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
movl %ecx, 0xc(%rsp)
addl $0xffff2000, %ecx       # imm = 0xFFFF2000
cmpl $0x757, %ecx            # imm = 0x757
ja 0xc92b
cmpl $0x0, 0x47bdb(%rip)     # 0x543f8
je 0xc92b
andl $0xfff, %eax            # imm = 0xFFF
movw $0x5e, %cx
xorl %edx, %edx
divw %cx
movl %eax, %edi
addl $0x7f, %edi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %edi
movl %edi, 0xc(%rsp)
addl $0x21, %edx
andl %eax, %edx
movl %edx, 0x8(%rsp)
jmp 0xc787
cmpl $0x2, 0x47bb6(%rip)     # 0x5440c
jb 0xc973
pushq $0x1b
popq %rdi
callq *0x3fa53(%rip)          # 0x4c2b8
pushq $0x28
popq %rdi
callq *0x3fa4a(%rip)          # 0x4c2b8
movzbl 0x3fa4b(%rip), %edi     # 0x4c2c0
callq *0x3fa3d(%rip)          # 0x4c2b8
andl $0x0, 0x47b8a(%rip)     # 0x5440c
jmp 0xc973
movl $0x1013, %edi           # imm = 0x1013
callq 0x117de
jmp 0xc973
cmpl $0x2, 0x47b6f(%rip)     # 0x5440c
jb 0xc8c8
pushq $0x1b
popq %rdi
callq *0x3fa10(%rip)          # 0x4c2b8
pushq $0x28
popq %rdi
callq *0x3fa07(%rip)          # 0x4c2b8
movzbl 0x3fa08(%rip), %edi     # 0x4c2c0
callq *0x3f9fa(%rip)          # 0x4c2b8
movl $0x1, 0x47b44(%rip)     # 0x5440c
movl $0x80, %edi
orl 0x8(%rsp), %edi
jmp 0xc977
cmpl $0x2, 0x47b2f(%rip)     # 0x5440c
jb 0xc905
pushq $0x1b
popq %rdi
callq *0x3f9d0(%rip)          # 0x4c2b8
pushq $0x28
popq %rdi
callq *0x3f9c7(%rip)          # 0x4c2b8
movzbl 0x3f9c8(%rip), %edi     # 0x4c2c0
callq *0x3f9ba(%rip)          # 0x4c2b8
andl $0x0, 0x47b07(%rip)     # 0x5440c
pushq $-0x1
popq %rdi
jmp 0xc977
movl 0x8(%rsp), %eax
addl $-0x7f, %eax
cmpl $0x0, 0x47ae0(%rip)     # 0x543f8
je 0xc93d
cmpl $-0x5f, %eax
setb %al
addl $0xffffff6d, %edi       # imm = 0xFFFFFF6D
cmpl $-0x73, %edi
jmp 0xc949
movq 0x47ace(%rip), %rcx     # 0x54400
testq %rcx, %rcx
je 0xc97d
movl %eax, %edi
callq *%rcx
jmp 0xc97d
cmpl $-0x5f, %eax
setb %al
addl $-0x7f, %edi
cmpl $-0x5f, %edi
setb %cl
orb %al, %cl
jne 0xc97d
cmpb $0x0, 0x3fa55(%rip)     # 0x4c3ac
movl $0x1233, %eax           # imm = 0x1233
movl $0x1168, %edi           # imm = 0x1168
cmovnel %eax, %edi
callq 0x117de
movl 0xc(%rsp), %edi
callq *0x3f945(%rip)          # 0x4c2b8
movl 0x8(%rsp), %edi
callq *0x3f93b(%rip)          # 0x4c2b8
addq $0x10, %rsp
popq %rbx
retq