// File: /workspace/github_c_makefile_star2_O3/nurse[P]nkf/nkf.c
// Function: open_mime
static void
open_mime(nkf_char mode)
{
    const unsigned char *p;
    int i;
    int j;
    p  = mime_pattern[0];
    for(i=0;mime_pattern[i];i++) {
	if (mode == mime_encode[i]) {
	    p = mime_pattern[i];
	    break;
	}
    }
    mimeout_mode = mime_encode_method[i];
    i = 0;
    if (base64_count>45) {
	if (mimeout_state.count>0 && nkf_isblank(mimeout_state.buf[i])){
	    (*o_mputc)(mimeout_state.buf[i]);
	    i++;
	}
	put_newline(o_mputc);
	(*o_mputc)(SP);
	base64_count = 1;
	if (mimeout_state.count>0 && nkf_isspace(mimeout_state.buf[i])) {
	    i++;
	}
    }
    for (;i<mimeout_state.count;i++) {
	if (nkf_isspace(mimeout_state.buf[i])) {
	    (*o_mputc)(mimeout_state.buf[i]);
	    base64_count ++;
	} else {
	    break;
	}
    }
    while(*p) {
	(*o_mputc)(*p++);
	base64_count ++;
    }
    j = mimeout_state.count;
    mimeout_state.count = 0;
    for (;i<j;i++) {
	mime_putc(mimeout_state.buf[i]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x31ec7(%rip), %rcx     # 0x47220
leaq 0x2160(%rip), %rdx      # 0x174c0
xorl %eax, %eax
leaq 0x3356(%rip), %rbx      # 0x186bf
cmpl %edi, (%rdx)
je 0x15385
incq %rax
addq $0x8, %rcx
addq $0x4, %rdx
cmpq $0xa, %rax
jne 0x15369
movl $0xa, %eax
jmp 0x15388
movq (%rcx), %rbx
leaq 0x34e1(%rip), %rcx      # 0x18870
movl (%rcx,%rax,4), %eax
movl %eax, 0x401f0(%rip)     # 0x55588
xorl %r14d, %r14d
cmpl $0x2e, 0x4024a(%rip)    # 0x555ec
movl 0x4023f(%rip), %r15d    # 0x555e8
jl 0x15459
xorl %r14d, %r14d
testl %r15d, %r15d
jle 0x153d4
movzbl 0x401de(%rip), %edi     # 0x5559c
cmpl $0x20, %edi
je 0x153c8
cmpl $0x9, %edi
jne 0x153d4
callq *0x37f7a(%rip)          # 0x4d348
movl $0x1, %r14d
movq 0x37f6d(%rip), %r15     # 0x4d348
movl 0x401b3(%rip), %eax     # 0x55594
testl %eax, %eax
movl $0xa, %edi
cmovnel %eax, %edi
cmpl $0xa, %edi
je 0x1540a
cmpl $0xd, %edi
je 0x1540a
cmpl $0xd0a, %edi            # imm = 0xD0A
jne 0x15414
movl $0xd, %edi
callq *%r15
movl $0xa, %edi
callq *%r15
movq 0x37f34(%rip), %r15     # 0x4d348
movl $0x20, %edi
callq *%r15
movl $0x1, 0x401c6(%rip)     # 0x555ec
movl 0x401bb(%rip), %r15d    # 0x555e8
testl %r15d, %r15d
jle 0x15459
movl %r14d, %eax
leaq 0x40160(%rip), %rcx     # 0x5559c
movzbl (%rax,%rcx), %eax
cmpq $0x20, %rax
ja 0x15459
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jae 0x15459
incl %r14d
cmpl %r15d, %r14d
jge 0x1549e
movl %r14d, %r14d
leaq 0x40134(%rip), %r12     # 0x5559c
movabsq $0x100002600, %r13      # imm = 0x100002600
movzbl (%r14,%r12), %edi
cmpq $0x20, %rdi
ja 0x1549e
btq %rdi, %r13
jae 0x1549e
callq *0x37ebf(%rip)          # 0x4d348
incl 0x4015d(%rip)           # 0x555ec
incq %r14
movslq 0x4014f(%rip), %r15     # 0x555e8
cmpq %r15, %r14
jl 0x15472
movb (%rbx), %al
testb %al, %al
je 0x154c6
incq %rbx
movzbl %al, %edi
callq *0x37e98(%rip)          # 0x4d348
incl 0x40136(%rip)           # 0x555ec
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x154a7
movl 0x40122(%rip), %r15d    # 0x555e8
movl $0x0, 0x40118(%rip)     # 0x555e8
subl %r14d, %r15d
jle 0x154f8
movslq %r14d, %rbx
xorl %r14d, %r14d
leaq 0x400ba(%rip), %r12     # 0x5559c
leaq (%rbx,%r14), %rax
movzbl (%r12,%rax), %edi
callq 0x12ccc
incq %r14
cmpl %r14d, %r15d
jne 0x154e2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq