// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0xe1b5
movq -0x18(%rbp), %rax
leaq 0xe196(%rip), %rcx      # 0x1c078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13b70
jmp 0xe1b5
cmpl $0x7f, -0xc(%rbp)
jg 0xdf07
jmp 0xe1b5
movl -0xc(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0xdf1b
jmp 0xe1b5
movl $0xa1, %eax
cmpl -0xc(%rbp), %eax
jg 0xdf5f
cmpl $0xdf, -0xc(%rbp)
jg 0xdf5f
movq -0x8(%rbp), %rdi
movl $0x8e, %esi
callq 0x13ba0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
movq -0x8(%rbp), %rdi
callq 0x13bd0
movq -0x8(%rbp), %rdi
callq 0x13d70
jmp 0xe036
movl $0x81, %eax
cmpl -0xc(%rbp), %eax
jg 0xdf72
cmpl $0xa0, -0xc(%rbp)
jl 0xdf85
movl $0xe0, %eax
cmpl -0xc(%rbp), %eax
jg 0xdfa1
cmpl $0xea, -0xc(%rbp)
jg 0xdfa1
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
jmp 0xe034
movl $0xed, %eax
cmpl -0xc(%rbp), %eax
jg 0xdfcd
cmpl $0xee, -0xc(%rbp)
jg 0xdfcd
movq -0x8(%rbp), %rax
movl $0x3, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
jmp 0xe032
movl $0xfa, %eax
cmpl -0xc(%rbp), %eax
jg 0xdff9
cmpl $0xfc, -0xc(%rbp)
jg 0xdff9
movq -0x8(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
jmp 0xe030
movl $0xf0, %eax
cmpl -0xc(%rbp), %eax
jg 0xe025
cmpl $0xfc, -0xc(%rbp)
jg 0xe025
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
jmp 0xe02e
movq -0x8(%rbp), %rdi
callq 0x13d90
jmp 0xe030
jmp 0xe032
jmp 0xe034
jmp 0xe036
jmp 0xe038
jmp 0xe03a
jmp 0xe1b5
movl $0x40, %eax
cmpl -0xc(%rbp), %eax
jg 0xe04f
cmpl $0x7e, -0xc(%rbp)
jle 0xe062
movl $0x80, %eax
cmpl -0xc(%rbp), %eax
jg 0xe0a9
cmpl $0xfc, -0xc(%rbp)
jg 0xe0a9
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x8(%rbp), %rdx
addq $0x14, %rdx
movq -0x8(%rbp), %rcx
addq $0x14, %rcx
addq $0x4, %rcx
callq 0x121e0
movq -0x8(%rbp), %rdi
callq 0x13bd0
movq -0x8(%rbp), %rdi
callq 0x13d70
jmp 0xe0b2
movq -0x8(%rbp), %rdi
callq 0x13d90
jmp 0xe1b5
movl $0x40, %eax
cmpl -0xc(%rbp), %eax
jg 0xe0c7
cmpl $0x7e, -0xc(%rbp)
jle 0xe0da
movl $0x80, %eax
cmpl -0xc(%rbp), %eax
jg 0xe130
cmpl $0xfc, -0xc(%rbp)
jg 0xe130
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x8(%rbp), %rdx
addq $0x14, %rdx
movq -0x8(%rbp), %rcx
addq $0x14, %rcx
addq $0x4, %rcx
callq 0x121e0
cmpl $0x0, %eax
jne 0xe12e
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x13de0
movq -0x8(%rbp), %rdi
callq 0x13d70
jmp 0xe1b5
jmp 0xe130
movq -0x8(%rbp), %rdi
callq 0x13d90
jmp 0xe1b5
movl $0x40, %eax
cmpl -0xc(%rbp), %eax
jg 0xe14b
cmpl $0x7e, -0xc(%rbp)
jle 0xe15e
movl $0x80, %eax
cmpl -0xc(%rbp), %eax
jg 0xe1aa
cmpl $0xfc, -0xc(%rbp)
jg 0xe1aa
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13ba0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x8(%rbp), %rdx
addq $0x14, %rdx
movq -0x8(%rbp), %rcx
addq $0x14, %rcx
addq $0x4, %rcx
callq 0x121e0
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x13de0
movq -0x8(%rbp), %rdi
callq 0x13d70
jmp 0xe1b3
movq -0x8(%rbp), %rdi
callq 0x13d90
jmp 0xe1b5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)