// File: /workspace/github_c_makefile_star2_O1/nurse[P]nkf/nkf.c
// Function: s_status
static void
s_status(struct input_code *ptr, nkf_char c)
{
    switch(ptr->stat){
    case -1:
	status_check(ptr, c);
	break;
    case 0:
	if (c <= DEL){
	    break;
	}else if (nkf_char_unicode_p(c)){
	    break;
	}else if (0xa1 <= c && c <= 0xdf){
	    status_push_ch(ptr, SS2);
	    status_push_ch(ptr, c);
	    code_score(ptr);
	    status_clear(ptr);
	}else if ((0x81 <= c && c < 0xa0) || (0xe0 <= c && c <= 0xea)){
	    ptr->stat = 1;
	    status_push_ch(ptr, c);
	}else if (0xed <= c && c <= 0xee){
	    ptr->stat = 3;
	    status_push_ch(ptr, c);
#ifdef SHIFTJIS_CP932
	}else if (is_ibmext_in_sjis(c)){
	    ptr->stat = 2;
	    status_push_ch(ptr, c);
#endif /* SHIFTJIS_CP932 */
#ifdef X0212_ENABLE
	}else if (0xf0 <= c && c <= 0xfc){
	    ptr->stat = 1;
	    status_push_ch(ptr, c);
#endif /* X0212_ENABLE */
	}else{
	    status_disable(ptr);
	}
	break;
    case 1:
	if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){
	    status_push_ch(ptr, c);
	    s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]);
	    code_score(ptr);
	    status_clear(ptr);
	}else{
	    status_disable(ptr);
	}
	break;
    case 2:
#ifdef SHIFTJIS_CP932
	if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)) {
	    status_push_ch(ptr, c);
	    if (s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]) == 0) {
		set_code_score(ptr, SCORE_CP932);
		status_clear(ptr);
		break;
	    }
	}
#endif /* SHIFTJIS_CP932 */
	status_disable(ptr);
	break;
    case 3:
	if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){
	    status_push_ch(ptr, c);
	    s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]);
	    set_code_score(ptr, SCORE_CP932);
	    status_clear(ptr);
	}else{
	    status_disable(ptr);
	}
	break;
    }
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %eax
incl %eax
cmpl $0x4, %eax
ja 0xd8ca
movq %rdi, %rbx
leaq 0x98e7(%rip), %rcx      # 0x17054
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x7f, %esi
jg 0xd8ca
cmpl $0x0, 0x47ca2(%rip)     # 0x55428
je 0xd8ca
movabsq $0x8000000000, %rax     # imm = 0x8000000000
movq %rax, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
jmp 0xd8ca
leal -0x40(%rsi), %eax
cmpl $0x3f, %eax
setae %al
leal -0x80(%rsi), %ecx
cmpl $0x7d, %ecx
setae %cl
testb %cl, %al
jne 0xd85d
leaq 0x14(%rbx), %rdx
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx,%rax,4)
leaq 0x18(%rbx), %rcx
movl 0x14(%rbx), %edi
movl 0x18(%rbx), %esi
callq 0x110a3
jmp 0xd8b9
leal -0x40(%rsi), %eax
cmpl $0x3f, %eax
setae %al
leal -0x80(%rsi), %ecx
cmpl $0x7d, %ecx
setae %cl
testb %cl, %al
jne 0xd85d
leaq 0x14(%rbx), %rdx
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx,%rax,4)
leaq 0x18(%rbx), %rcx
movl 0x14(%rbx), %edi
movl 0x18(%rbx), %esi
callq 0x110a3
jmp 0xd8af
leal -0x40(%rsi), %eax
cmpl $0x3f, %eax
setae %al
leal -0x80(%rsi), %ecx
cmpl $0x7d, %ecx
setae %cl
testb %cl, %al
jne 0xd85d
leaq 0x14(%rbx), %rdx
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx,%rax,4)
leaq 0x18(%rbx), %rcx
movl 0x14(%rbx), %edi
movl 0x18(%rbx), %esi
callq 0x110a3
testl %eax, %eax
je 0xd8b9
movq %rbx, %rdi
popq %rbx
jmp 0x11fbc
cmpl $0x80, %esi
setl %al
movl %esi, %ecx
andl $0x7f000000, %ecx       # imm = 0x7F000000
cmpl $0x1000000, %ecx        # imm = 0x1000000
sete %cl
orb %al, %cl
jne 0xd8ca
leal -0xa1(%rsi), %eax
cmpl $0x3e, %eax
ja 0xd8cc
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl $0x8e, 0x14(%rbx,%rax,4)
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx,%rax,4)
movq %rbx, %rdi
callq 0x11ed6
jmp 0xd8c2
testq %rbx, %rbx
je 0xd8c2
orb $0x8, 0xc(%rbx)
xorl %eax, %eax
movl %eax, 0x8(%rbx)
movl %eax, 0x10(%rbx)
popq %rbx
retq
cmpl $0x80, %esi
setne %al
cmpl $0xa0, %esi
setl %cl
andb %al, %cl
leal -0xe0(%rsi), %eax
cmpl $0xb, %eax
setb %al
orb %cl, %al
cmpb $0x1, %al
jne 0xd8fb
movl $0x1, 0x8(%rbx)
jmp 0xd921
leal -0xed(%rsi), %eax
cmpl $0x1, %eax
ja 0xd90f
movl $0x3, 0x8(%rbx)
jmp 0xd921
leal -0xfa(%rsi), %eax
cmpl $0x2, %eax
ja 0xd931
movl $0x2, 0x8(%rbx)
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx,%rax,4)
jmp 0xd8ca
leal -0xf0(%rsi), %eax
cmpl $0xc, %eax
ja 0xd85d
jmp 0xd8f2