// File: /workspace/github_c_makefile_star2_O0/nurse[P]nkf/nkf.c
// Function: mime_integrity
static nkf_char
mime_integrity(FILE *f, const unsigned char *p)
{
    nkf_char c,d;
    unsigned int q;
    /* In buffered mode, read until =? or NL or buffer full
     */
    mime_input_state.input = mime_input_state.top;
    mime_input_state.last = mime_input_state.top;

    while(*p) mime_input_buf(mime_input_state.input++) = *p++;
    d = 0;
    q = mime_input_state.input;
    while((c=(*i_getc)(f))!=EOF) {
	if (((mime_input_state.input-mime_input_state.top)&MIME_BUF_MASK)==0) {
	    break;   /* buffer full */
	}
	if (c=='=' && d=='?') {
	    /* checked. skip header, start decode */
	    mime_input_buf(mime_input_state.input++) = (unsigned char)c;
	    /* mime_last_input = mime_input_state.input; */
	    mime_input_state.input = q;
	    switch_mime_getc();
	    return 1;
	}
	if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c))))
	    break;
	/* Should we check length mod 4? */
	mime_input_buf(mime_input_state.input++) = (unsigned char)c;
	d=c;
    }
    /* In case of Incomplete MIME, no MIME decode  */
    mime_input_buf(mime_input_state.input++) = (unsigned char)c;
    mime_input_state.last = mime_input_state.input;     /* point undecoded buffer */
    mime_decode_mode = 1;              /* no decode on mime_input_buf last in mime_getc */
    switch_mime_getc();         /* anyway we need buffered getc */
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl 0x3fe36(%rip), %eax     # 0x5aa6c
movl %eax, 0x3fe38(%rip)     # 0x5aa74
movl 0x3fe2a(%rip), %eax     # 0x5aa6c
movl %eax, 0x3fe28(%rip)     # 0x5aa70
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1ac88
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %dl
movl 0x3fe0c(%rip), %eax     # 0x5aa74
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x3fe01(%rip)     # 0x5aa74
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, %eax
movl %eax, %ecx
leaq 0x3f9e9(%rip), %rax     # 0x5a66c
movb %dl, (%rax,%rcx)
jmp 0x1ac48
movl $0x0, -0x20(%rbp)
movl 0x3fddf(%rip), %eax     # 0x5aa74
movl %eax, -0x24(%rbp)
movq 0x37669(%rip), %rax     # 0x52308
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
je 0x1ad99
movl 0x3fdbd(%rip), %eax     # 0x5aa74
subl 0x3fdaf(%rip), %eax     # 0x5aa6c
andl $0x3ff, %eax            # imm = 0x3FF
cmpl $0x0, %eax
jne 0x1accc
jmp 0x1ad99
cmpl $0x3d, -0x1c(%rbp)
jne 0x1ad1b
cmpl $0x3f, -0x20(%rbp)
jne 0x1ad1b
movl -0x1c(%rbp), %eax
movb %al, %dl
movl 0x3fd91(%rip), %eax     # 0x5aa74
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x3fd86(%rip)     # 0x5aa74
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, %eax
movl %eax, %ecx
leaq 0x3f96e(%rip), %rax     # 0x5a66c
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
movl %eax, 0x3fd6a(%rip)     # 0x5aa74
callq 0x1adf0
movl $0x1, -0x4(%rbp)
jmp 0x1ade4
cmpl $0x2b, -0x1c(%rbp)
je 0x1ad65
cmpl $0x2f, -0x1c(%rbp)
je 0x1ad65
cmpl $0x3d, -0x1c(%rbp)
je 0x1ad65
cmpl $0x3f, -0x1c(%rbp)
je 0x1ad65
movl $0x61, %eax
cmpl -0x1c(%rbp), %eax
jg 0x1ad43
cmpl $0x7a, -0x1c(%rbp)
jle 0x1ad65
movl $0x41, %eax
cmpl -0x1c(%rbp), %eax
jg 0x1ad53
cmpl $0x5a, -0x1c(%rbp)
jle 0x1ad65
movl $0x30, %eax
cmpl -0x1c(%rbp), %eax
jg 0x1ad63
cmpl $0x39, -0x1c(%rbp)
jle 0x1ad65
jmp 0x1ad99
movl -0x1c(%rbp), %eax
movb %al, %dl
movl 0x3fd04(%rip), %eax     # 0x5aa74
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x3fcf9(%rip)     # 0x5aa74
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, %eax
movl %eax, %ecx
leaq 0x3f8e1(%rip), %rax     # 0x5a66c
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x1ac98
movl -0x1c(%rbp), %eax
movb %al, %dl
movl 0x3fcd0(%rip), %eax     # 0x5aa74
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x3fcc5(%rip)     # 0x5aa74
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, %eax
movl %eax, %ecx
leaq 0x3f8ad(%rip), %rax     # 0x5a66c
movb %dl, (%rax,%rcx)
movl 0x3fcac(%rip), %eax     # 0x5aa74
movl %eax, 0x3fca2(%rip)     # 0x5aa70
movl $0x1, 0x3f808(%rip)     # 0x5a5e0
callq 0x1adf0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)