// File: /workspace/github_c_makefile_star2_O0/nurse[P]nkf/nkf.c
// Function: check_bom
static void
check_bom(FILE *f)
{
    int c2;
    input_bom_f = FALSE;
    switch(c2 = (*i_getc)(f)){
    case 0x00:
	if((c2 = (*i_getc)(f)) == 0x00){
	    if((c2 = (*i_getc)(f)) == 0xFE){
		if((c2 = (*i_getc)(f)) == 0xFF){
		    if(!input_encoding){
			set_iconv(TRUE, w_iconv32);
		    }
		    if (iconv == w_iconv32) {
			input_bom_f = TRUE;
			input_endian = ENDIAN_BIG;
			return;
		    }
		    (*i_ungetc)(0xFF,f);
		}else (*i_ungetc)(c2,f);
		(*i_ungetc)(0xFE,f);
	    }else if(c2 == 0xFF){
		if((c2 = (*i_getc)(f)) == 0xFE){
		    if(!input_encoding){
			set_iconv(TRUE, w_iconv32);
		    }
		    if (iconv == w_iconv32) {
			input_endian = ENDIAN_2143;
			return;
		    }
		    (*i_ungetc)(0xFF,f);
		}else (*i_ungetc)(c2,f);
		(*i_ungetc)(0xFF,f);
	    }else (*i_ungetc)(c2,f);
	    (*i_ungetc)(0x00,f);
	}else (*i_ungetc)(c2,f);
	(*i_ungetc)(0x00,f);
	break;
    case 0xEF:
	if((c2 = (*i_getc)(f)) == 0xBB){
	    if((c2 = (*i_getc)(f)) == 0xBF){
		if(!input_encoding){
		    set_iconv(TRUE, w_iconv);
		}
		if (iconv == w_iconv) {
		    input_bom_f = TRUE;
		    return;
		}
		(*i_ungetc)(0xBF,f);
	    }else (*i_ungetc)(c2,f);
	    (*i_ungetc)(0xBB,f);
	}else (*i_ungetc)(c2,f);
	(*i_ungetc)(0xEF,f);
	break;
    case 0xFE:
	if((c2 = (*i_getc)(f)) == 0xFF){
	    if((c2 = (*i_getc)(f)) == 0x00){
		if((c2 = (*i_getc)(f)) == 0x00){
		    if(!input_encoding){
			set_iconv(TRUE, w_iconv32);
		    }
		    if (iconv == w_iconv32) {
			input_endian = ENDIAN_3412;
			return;
		    }
		    (*i_ungetc)(0x00,f);
		}else (*i_ungetc)(c2,f);
		(*i_ungetc)(0x00,f);
	    }else (*i_ungetc)(c2,f);
	    if(!input_encoding){
		set_iconv(TRUE, w_iconv16);
	    }
	    if (iconv == w_iconv16) {
		input_endian = ENDIAN_BIG;
		input_bom_f = TRUE;
		return;
	    }
	    (*i_ungetc)(0xFF,f);
	}else (*i_ungetc)(c2,f);
	(*i_ungetc)(0xFE,f);
	break;
    case 0xFF:
	if((c2 = (*i_getc)(f)) == 0xFE){
	    if((c2 = (*i_getc)(f)) == 0x00){
		if((c2 = (*i_getc)(f)) == 0x00){
		    if(!input_encoding){
			set_iconv(TRUE, w_iconv32);
		    }
		    if (iconv == w_iconv32) {
			input_endian = ENDIAN_LITTLE;
			input_bom_f = TRUE;
			return;
		    }
		    (*i_ungetc)(0x00,f);
		}else (*i_ungetc)(c2,f);
		(*i_ungetc)(0x00,f);
	    }else (*i_ungetc)(c2,f);
	    if(!input_encoding){
		set_iconv(TRUE, w_iconv16);
	    }
	    if (iconv == w_iconv16) {
		input_endian = ENDIAN_LITTLE;
		input_bom_f = TRUE;
		return;
	    }
	    (*i_ungetc)(0xFE,f);
	}else (*i_ungetc)(c2,f);
	(*i_ungetc)(0xFF,f);
	break;
    default:
	(*i_ungetc)(c2,f);
	break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, 0x4193a(%rip)     # 0x5aa80
movq 0x391bb(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
movl %eax, %ecx
movl %ecx, -0x10(%rbp)
testl %eax, %eax
je 0x19194
jmp 0x19161
movl -0x10(%rbp), %eax
subl $0xef, %eax
je 0x1933b
jmp 0x19171
movl -0x10(%rbp), %eax
subl $0xfe, %eax
je 0x19406
jmp 0x19181
movl -0x10(%rbp), %eax
subl $0xff, %eax
je 0x1954a
jmp 0x19692
movq 0x3916d(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x19317
movq 0x39154(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xfe, %eax
jne 0x1925e
movq 0x39139(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xff, %eax
jne 0x19237
cmpq $0x0, 0x41299(%rip)     # 0x5a480
jne 0x191fa
movl $0x1, %edi
leaq -0xb715(%rip), %rsi     # 0xdae0
callq 0x135a0
leaq -0xb721(%rip), %rax     # 0xdae0
cmpq %rax, 0x390b0(%rip)     # 0x522b8
jne 0x19223
movl $0x1, 0x4186c(%rip)     # 0x5aa80
movl $0x1, 0x390aa(%rip)     # 0x522c8
jmp 0x196a2
movq 0x390e6(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xff, %edi
callq *%rax
jmp 0x19247
movq 0x390d2(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x390c2(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xfe, %edi
callq *%rax
jmp 0x19306
cmpl $0xff, -0xc(%rbp)
jne 0x192f4
movq 0x39096(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xfe, %eax
jne 0x192d0
cmpq $0x0, 0x411f6(%rip)     # 0x5a480
jne 0x1929d
movl $0x1, %edi
leaq -0xb7b8(%rip), %rsi     # 0xdae0
callq 0x135a0
leaq -0xb7c4(%rip), %rax     # 0xdae0
cmpq %rax, 0x3900d(%rip)     # 0x522b8
jne 0x192bc
movl $0x3, 0x39011(%rip)     # 0x522c8
jmp 0x196a2
movq 0x3904d(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xff, %edi
callq *%rax
jmp 0x192e0
movq 0x39039(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x39029(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xff, %edi
callq *%rax
jmp 0x19304
movq 0x39015(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
jmp 0x19306
movq 0x39003(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x19327
movq 0x38ff2(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38fe2(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x196a2
movq 0x38fc6(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xbb, %eax
jne 0x193df
movq 0x38fab(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xbf, %eax
jne 0x193bb
cmpq $0x0, 0x4110b(%rip)     # 0x5a480
jne 0x19388
movl $0x1, %edi
leaq -0xc363(%rip), %rsi     # 0xd020
callq 0x135a0
leaq -0xc36f(%rip), %rax     # 0xd020
cmpq %rax, 0x38f22(%rip)     # 0x522b8
jne 0x193a7
movl $0x1, 0x416de(%rip)     # 0x5aa80
jmp 0x196a2
movq 0x38f62(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xbf, %edi
callq *%rax
jmp 0x193cb
movq 0x38f4e(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38f3e(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xbb, %edi
callq *%rax
jmp 0x193ef
movq 0x38f2a(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38f1a(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xef, %edi
callq *%rax
jmp 0x196a2
movq 0x38efb(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xff, %eax
jne 0x19523
movq 0x38ee0(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x194bb
movq 0x38ec7(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x1949a
cmpq $0x0, 0x41029(%rip)     # 0x5a480
jne 0x1946a
movl $0x1, %edi
leaq -0xb985(%rip), %rsi     # 0xdae0
callq 0x135a0
leaq -0xb991(%rip), %rax     # 0xdae0
cmpq %rax, 0x38e40(%rip)     # 0x522b8
jne 0x19489
movl $0x4, 0x38e44(%rip)     # 0x522c8
jmp 0x196a2
movq 0x38e80(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x194aa
movq 0x38e6f(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38e5f(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x194cb
movq 0x38e4e(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
cmpq $0x0, 0x40fad(%rip)     # 0x5a480
jne 0x194e6
movl $0x1, %edi
leaq -0xbf71(%rip), %rsi     # 0xd570
callq 0x135a0
leaq -0xbf7d(%rip), %rax     # 0xd570
cmpq %rax, 0x38dc4(%rip)     # 0x522b8
jne 0x1950f
movl $0x1, 0x38dc8(%rip)     # 0x522c8
movl $0x1, 0x41576(%rip)     # 0x5aa80
jmp 0x196a2
movq 0x38dfa(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xff, %edi
callq *%rax
jmp 0x19533
movq 0x38de6(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38dd6(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xfe, %edi
callq *%rax
jmp 0x196a2
movq 0x38db7(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0xfe, %eax
jne 0x1966e
movq 0x38d9c(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x19609
movq 0x38d83(%rip), %rax     # 0x52308
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x195e8
cmpq $0x0, 0x40ee5(%rip)     # 0x5a480
jne 0x195ae
movl $0x1, %edi
leaq -0xbac9(%rip), %rsi     # 0xdae0
callq 0x135a0
leaq -0xbad5(%rip), %rax     # 0xdae0
cmpq %rax, 0x38cfc(%rip)     # 0x522b8
jne 0x195d7
movl $0x2, 0x38d00(%rip)     # 0x522c8
movl $0x1, 0x414ae(%rip)     # 0x5aa80
jmp 0x196a2
movq 0x38d32(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x195f8
movq 0x38d21(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38d11(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq *%rax
jmp 0x19619
movq 0x38d00(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
cmpq $0x0, 0x40e5f(%rip)     # 0x5a480
jne 0x19634
movl $0x1, %edi
leaq -0xc0bf(%rip), %rsi     # 0xd570
callq 0x135a0
leaq -0xc0cb(%rip), %rax     # 0xd570
cmpq %rax, 0x38c76(%rip)     # 0x522b8
jne 0x1965a
movl $0x2, 0x38c7a(%rip)     # 0x522c8
movl $0x1, 0x41428(%rip)     # 0x5aa80
jmp 0x196a2
movq 0x38caf(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xfe, %edi
callq *%rax
jmp 0x1967e
movq 0x38c9b(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
movq 0x38c8b(%rip), %rax     # 0x52310
movq -0x8(%rbp), %rsi
movl $0xff, %edi
callq *%rax
jmp 0x196a2
movq 0x38c77(%rip), %rax     # 0x52310
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)