LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: eol_conv
static void
eol_conv(nkf_char c2, nkf_char c1)
{
    if (guess_f && input_eol != EOF) {
	if (c2 == 0 && c1 == LF) {
	    if (!input_eol) input_eol = prev_cr ? CRLF : LF;
	    else if (input_eol != (prev_cr ? CRLF : LF)) input_eol = EOF;
	} else if (c2 == 0 && c1 == CR && input_eol == LF) input_eol = EOF;
	else if (!prev_cr);
	else if (!input_eol) input_eol = CR;
	else if (input_eol != CR) input_eol = EOF;
    }
    if (prev_cr || (c2 == 0 && c1 == LF)) {
	prev_cr = 0;
	if (eolmode_f != LF) (*o_eol_conv)(0, CR);
	if (eolmode_f != CR) (*o_eol_conv)(0, LF);
    }
    if (c2 == 0 && c1 == CR) prev_cr = CR;
    else if (c2 != 0 || c1 != LF) (*o_eol_conv)(c2, c1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
cmpl $0x0, 0x39127(%rip)     # 0x4c3a0
setne %cl
movl 0x4114e(%rip), %eax     # 0x543d0
cmpl $-0x1, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x132d3
movl %ebx, %ecx
xorl $0xa, %ecx
orl %ebp, %ecx
jne 0x132bc
pushq $0xa
popq %rsi
movb 0x4134b(%rip), %cl      # 0x545ec
testb %cl, %cl
movl $0xd0a, %edx            # imm = 0xD0A
cmovel %esi, %edx
testl %eax, %eax
je 0x132f8
cmpl %edx, %eax
je 0x132fe
orl $-0x1, 0x41116(%rip)    # 0x543d0
jmp 0x132fe
movl %ebx, %ecx
xorl $0xd, %ecx
orl %ebp, %ecx
movl %eax, %edx
xorl $0xa, %edx
orl %ecx, %edx
jne 0x132de
orl $-0x1, 0x410fd(%rip)    # 0x543d0
cmpb $0x0, 0x41312(%rip)     # 0x545ec
je 0x13302
jmp 0x1330b
cmpb $0x1, 0x41307(%rip)     # 0x545ec
jne 0x13302
testl %eax, %eax
je 0x1336f
cmpl $0xd, %eax
je 0x1330b
pushq $-0x1
jmp 0x13371
movl %edx, 0x410d2(%rip)     # 0x543d0
testb %cl, %cl
jne 0x1330b
movl %ebx, %eax
xorl $0xa, %eax
orl %ebp, %eax
jne 0x1333a
movb $0x0, 0x412da(%rip)     # 0x545ec
cmpl $0xa, 0x4126b(%rip)     # 0x54584
je 0x1332f
pushq $0xd
popq %rsi
xorl %edi, %edi
callq *0x38fca(%rip)          # 0x4c2f0
cmpl $0xd, 0x41257(%rip)     # 0x54584
je 0x1333a
pushq $0xa
popq %rsi
xorl %edi, %edi
callq *0x38fb6(%rip)          # 0x4c2f0
movl %ebx, %eax
xorl $0xd, %eax
orl %ebp, %eax
jne 0x1334c
movb $0x1, 0x412a2(%rip)     # 0x545ec
jmp 0x13368
movl %ebx, %eax
xorl $0xa, %eax
orl %ebp, %eax
je 0x13368
movq 0x38f94(%rip), %rax     # 0x4c2f0
movl %ebp, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0xd
popq %rax
movl %eax, 0x41058(%rip)     # 0x543d0
jmp 0x1330b
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: rot_conv
static void
rot_conv(nkf_char c2, nkf_char c1)
{
    if (c2 == 0 || c2 == JIS_X_0201_1976_K || c2 == ISO_8859_1) {
	c1 = rot13(c1);
    } else if (c2) {
	c1 = rot47(c1);
	c2 = rot47(c2);
    }
    (*o_rot_conv)(c2,c1);
}

// Assembly:
cmpl $0x2, %edi
jb 0x13387
cmpl $0x1013, %edi           # imm = 0x1013
jne 0x13396
cmpl $0x41, %esi
jl 0x133eb
cmpl $0x4d, %esi
ja 0x133a5
addl $0xd, %esi
jmp 0x133eb
cmpl $0x21, %esi
jl 0x133d1
cmpl $0x4f, %esi
ja 0x133c6
addl $0x2f, %esi
jmp 0x133d1
cmpl $0x5a, %esi
ja 0x133af
addl $-0xd, %esi
jmp 0x133eb
cmpl $0x61, %esi
jb 0x133eb
cmpl $0x6d, %esi
jbe 0x13391
leal -0xd(%rsi), %eax
cmpl $0x7b, %esi
cmovael %esi, %eax
movl %eax, %esi
jmp 0x133eb
leal -0x2f(%rsi), %eax
cmpl $0x7f, %esi
cmovael %esi, %eax
movl %eax, %esi
cmpl $0x21, %edi
jl 0x133eb
cmpl $0x4f, %edi
ja 0x133e0
addl $0x2f, %edi
jmp 0x133eb
leal -0x2f(%rdi), %eax
cmpl $0x7f, %edi
cmovael %edi, %eax
movl %eax, %edi
movq 0x38f06(%rip), %rax     # 0x4c2f8
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: hira_conv
static void
hira_conv(nkf_char c2, nkf_char c1)
{
    if (hira_f & 1) {
	if (c2 == 0x25) {
	    if (0x20 < c1 && c1 < 0x74) {
		c2 = 0x24;
		(*o_hira_conv)(c2,c1);
		return;
	    } else if (c1 == 0x74 && nkf_enc_unicode_p(output_encoding)) {
		c2 = 0;
		c1 = nkf_char_unicode_new(0x3094);
		(*o_hira_conv)(c2,c1);
		return;
	    }
	} else if (c2 == 0x21 && (c1 == 0x33 || c1 == 0x34)) {
	    c1 += 2;
	    (*o_hira_conv)(c2,c1);
	    return;
	}
    }
    if (hira_f & 2) {
	if (c2 == 0 && c1 == nkf_char_unicode_new(0x3094)) {
	    c2 = 0x25;
	    c1 = 0x74;
	} else if (c2 == 0x24 && 0x20 < c1 && c1 < 0x74) {
	    c2 = 0x25;
	} else if (c2 == 0x21 && (c1 == 0x35 || c1 == 0x36)) {
	    c1 -= 2;
	}
    }
    (*o_hira_conv)(c2,c1);
}

// Assembly:
movl 0x410e1(%rip), %eax     # 0x54558
testb $0x1, %al
je 0x134e3
cmpl $0x21, %edi
je 0x13498
cmpl $0x25, %edi
jne 0x134e3
leal -0x21(%rsi), %ecx
cmpl $0x52, %ecx
ja 0x134af
movq 0x38e6c(%rip), %rax     # 0x4c300
pushq $0x24
jmp 0x134ac
leal -0x33(%rsi), %ecx
cmpl $0x1, %ecx
ja 0x134e3
addl $0x2, %esi
movq 0x38e56(%rip), %rax     # 0x4c300
pushq $0x21
popq %rdi
jmpq *%rax
cmpl $0x74, %esi
jne 0x134e3
movq 0x4107d(%rip), %rcx     # 0x54538
movq 0x10(%rcx), %rcx
leaq 0x3234a(%rip), %rdx     # 0x45810
cmpq %rdx, %rcx
je 0x13533
leaq 0x3230e(%rip), %rdx     # 0x457e0
cmpq %rdx, %rcx
je 0x13533
leaq 0x3231a(%rip), %rdx     # 0x457f8
cmpq %rdx, %rcx
je 0x13533
testb $0x2, %al
jne 0x134eb
movl %edi, %eax
jmp 0x13528
movl %esi, %ecx
xorl $0x1003094, %ecx        # imm = 0x1003094
pushq $0x25
popq %rax
orl %edi, %ecx
jne 0x134ff
pushq $0x74
popq %rsi
jmp 0x13528
cmpl $0x24, %edi
sete %cl
leal -0x21(%rsi), %edx
cmpl $0x53, %edx
setb %dl
testb %dl, %cl
jne 0x13528
cmpl $0x21, %edi
jne 0x134e7
leal -0x35(%rsi), %eax
leal -0x2(%rsi), %ecx
cmpl $0x2, %eax
cmovael %esi, %ecx
pushq $0x21
popq %rax
movl %ecx, %esi
movq 0x38dd1(%rip), %rcx     # 0x4c300
movl %eax, %edi
jmpq *%rcx
movq 0x38dc6(%rip), %rax     # 0x4c300
xorl %edi, %edi
movl $0x1003094, %esi        # imm = 0x1003094
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: numchar_getc
static nkf_char
numchar_getc(FILE *f)
{
    nkf_char (*g)(FILE *) = i_ngetc;
    nkf_char (*u)(nkf_char c ,FILE *f) = i_nungetc;
    int i = 0, j;
    nkf_char buf[12];
    nkf_char c = -1;

    buf[i] = (*g)(f);
    if (buf[i] == '&'){
	buf[++i] = (*g)(f);
	if (buf[i] == '#'){
	    c = 0;
	    buf[++i] = (*g)(f);
	    if (buf[i] == 'x' || buf[i] == 'X'){
		for (j = 0; j < 7; j++){
		    buf[++i] = (*g)(f);
		    if (!nkf_isxdigit(buf[i])){
			if (buf[i] != ';'){
			    c = -1;
			}
			break;
		    }
		    c <<= 4;
		    c |= hex2bin(buf[i]);
		}
	    }else{
		for (j = 0; j < 8; j++){
		    if (j){
			buf[++i] = (*g)(f);
		    }
		    if (!nkf_isdigit(buf[i])){
			if (buf[i] != ';'){
			    c = -1;
			}
			break;
		    }
		    c *= 10;
		    c += hex2bin(buf[i]);
		}
	    }
	}
    }
    if (c != -1){
	return nkf_char_unicode_new(c);
    }
    while (i > 0){
	(*u)(buf[i], f);
	--i;
    }
    return buf[0];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x38736(%rip), %r15     # 0x4c370
movq 0x38737(%rip), %r14     # 0x4c378
callq *%r15
movl %eax, (%rsp)
xorl %r12d, %r12d
cmpl $0x26, %eax
jne 0x13d4c
movq %rbx, %rdi
callq *%r15
movl %eax, 0x4(%rsp)
cmpl $0x23, %eax
jne 0x13cde
movq %rbx, %rdi
callq *%r15
movl %eax, 0x8(%rsp)
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x13ce4
pushq $0x3
popq %r13
pushq $0x9
popq %r12
xorl %ebp, %ebp
cmpq $0xa, %r13
je 0x13d37
movq %rbx, %rdi
callq *%r15
movl %eax, (%rsp,%r13,4)
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x13cd4
leal -0x41(%rax), %ecx
cmpl $0x25, %ecx
ja 0x13d44
movabsq $0x3f0000003f, %rdx     # imm = 0x3F0000003F
btq %rcx, %rdx
jae 0x13d44
cmpl $0x46, %eax
ja 0x13cc6
addl $-0x37, %eax
movl %eax, %ecx
jmp 0x13cd4
leal -0x57(%rax), %ecx
cmpl $0x61, %eax
movl $0x0, %eax
cmovbl %eax, %ecx
shll $0x4, %ebp
orl %ecx, %ebp
incq %r13
jmp 0x13c7e
pushq $0x1
popq %r12
jmp 0x13d4c
xorl %r13d, %r13d
pushq $0x2
popq %rax
xorl %ebp, %ebp
movl %eax, %edx
movslq %eax, %r12
testl %r13d, %r13d
je 0x13d0e
cmpl $0x8, %r13d
je 0x13d34
movq %rbx, %rdi
callq *%r15
leal 0x1(%r12), %edx
movl %eax, 0x4(%rsp,%r12,4)
jmp 0x13d12
movl (%rsp,%r12,4), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x13d2a
imull $0xa, %ebp, %ecx
leal (%rcx,%rax), %ebp
addl $-0x30, %ebp
incl %r13d
movl %edx, %eax
jmp 0x13cec
cmpl $0x3b, %eax
movl %edx, %r12d
je 0x13d37
jmp 0x13d4c
movl %edx, %r12d
cmpl $-0x1, %ebp
je 0x13d4c
orl $0x1000000, %ebp        # imm = 0x1000000
jmp 0x13d66
movl %r13d, %r12d
cmpl $0x3b, %eax
je 0x13d37
movl %r12d, %r15d
testl %r15d, %r15d
jle 0x13d63
movl (%rsp,%r15,4), %edi
movq %rbx, %rsi
callq *%r14
decq %r15
jmp 0x13d4f
movl (%rsp), %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: broken_getc
static nkf_char
broken_getc(FILE *f)
{
    nkf_char c, c1;

    if (!nkf_buf_empty_p(nkf_state->broken_buf)) {
	return nkf_buf_pop(nkf_state->broken_buf);
    }
    c = (*i_bgetc)(f);
    if (c=='$' && nkf_state->broken_state != ESC
	&& (input_mode == ASCII || input_mode == JIS_X_0201_1976_K)) {
	c1= (*i_bgetc)(f);
	nkf_state->broken_state = 0;
	if (c1=='@'|| c1=='B') {
	    nkf_buf_push(nkf_state->broken_buf, c1);
	    nkf_buf_push(nkf_state->broken_buf, c);
	    return ESC;
	} else {
	    (*i_bungetc)(c1,f);
	    return c;
	}
    } else if (c=='(' && nkf_state->broken_state != ESC
	       && (input_mode == JIS_X_0208 || input_mode == JIS_X_0201_1976_K)) {
	c1= (*i_bgetc)(f);
	nkf_state->broken_state = 0;
	if (c1=='J'|| c1=='B') {
	    nkf_buf_push(nkf_state->broken_buf, c1);
	    nkf_buf_push(nkf_state->broken_buf, c);
	    return ESC;
	} else {
	    (*i_bungetc)(c1,f);
	    return c;
	}
    } else {
	nkf_state->broken_state = c;
	return c;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x3fed7(%rip), %rax     # 0x54528
movq 0x10(%rax), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x14662
popq %rbx
jmp 0x12340
movq %rbx, %rdi
callq *0x37cbd(%rip)          # 0x4c328
movq 0x3feb6(%rip), %rcx     # 0x54528
cmpl $0x28, %eax
je 0x146d8
cmpl $0x24, %eax
jne 0x14734
cmpl $0x1b, 0x8(%rcx)
je 0x14734
movl 0x3ff58(%rip), %edx     # 0x545e8
cmpl $0x1013, %edx           # imm = 0x1013
je 0x146a0
testl %edx, %edx
jne 0x14734
movq %rbx, %rdi
callq *0x37c7f(%rip)          # 0x4c328
movq 0x3fe78(%rip), %rcx     # 0x54528
andl $0x0, 0x8(%rcx)
movl %eax, %edx
andl $-0x3, %edx
cmpl $0x40, %edx
jne 0x14739
movq 0x10(%rcx), %rdi
movl %eax, %esi
callq 0x1237a
movq 0x3fe58(%rip), %rax     # 0x54528
movq 0x10(%rax), %rdi
pushq $0x24
jmp 0x1472a
cmpl $0x1b, 0x8(%rcx)
je 0x14734
movl 0x3ff04(%rip), %edx     # 0x545e8
cmpl $0x1168, %edx           # imm = 0x1168
je 0x146f4
cmpl $0x1013, %edx           # imm = 0x1013
jne 0x14734
movq %rbx, %rdi
callq *0x37c2b(%rip)          # 0x4c328
movq 0x3fe24(%rip), %rcx     # 0x54528
andl $0x0, 0x8(%rcx)
movl %eax, %edx
andl $-0x9, %edx
cmpl $0x42, %edx
jne 0x14748
movq 0x10(%rcx), %rdi
movl %eax, %esi
callq 0x1237a
movq 0x3fe04(%rip), %rax     # 0x54528
movq 0x10(%rax), %rdi
pushq $0x28
popq %rsi
callq 0x1237a
pushq $0x1b
jmp 0x14755
movl %eax, 0x8(%rcx)
jmp 0x14756
movl %eax, %edi
movq %rbx, %rsi
callq *0x37bec(%rip)          # 0x4c330
pushq $0x24
jmp 0x14755
movl %eax, %edi
movq %rbx, %rsi
callq *0x37bdd(%rip)          # 0x4c330
pushq $0x28
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: eof_mime
static void
eof_mime(void)
{
    switch(mimeout_mode) {
    case 'Q':
    case 'B':
	break;
    case 2:
	(*o_mputc)(basis_64[((nkf_state->mimeout_state & 0x3)<< 4)]);
	(*o_mputc)('=');
	(*o_mputc)('=');
	base64_count += 3;
	break;
    case 1:
	(*o_mputc)(basis_64[((nkf_state->mimeout_state & 0xF) << 2)]);
	(*o_mputc)('=');
	base64_count += 2;
	break;
    }
    if (mimeout_mode > 0) {
	if (mimeout_f!=FIXED_MIME) {
	    close_mime();
	} else if (mimeout_mode != 'Q')
	    mimeout_mode = 'B';
    }
}

// Assembly:
pushq %rbx
movl 0x3fdb1(%rip), %eax     # 0x54578
cmpl $0x1, %eax
je 0x147ff
cmpl $0x2, %eax
jne 0x14835
movq 0x3fd50(%rip), %rax     # 0x54528
movl 0x18(%rax), %eax
shll $0x4, %eax
andl $0x30, %eax
leaq 0x3038(%rip), %rcx      # 0x17820
movsbl (%rax,%rcx), %edi
callq *0x37b46(%rip)          # 0x4c338
pushq $0x3d
popq %rdi
callq *0x37b3d(%rip)          # 0x4c338
pushq $0x3
jmp 0x1481f
movq 0x3fd22(%rip), %rax     # 0x54528
movl 0x18(%rax), %eax
andl $0xf, %eax
leaq 0x300d(%rip), %rcx      # 0x17820
movsbl (%rcx,%rax,4), %edi
callq *0x37b1b(%rip)          # 0x4c338
pushq $0x2
popq %rbx
pushq $0x3d
popq %rdi
callq *0x37b0f(%rip)          # 0x4c338
addl %ebx, 0x3fdad(%rip)     # 0x545dc
movl 0x3fd43(%rip), %eax     # 0x54578
testl %eax, %eax
jle 0x14851
cmpl $0x7, 0x3fd3c(%rip)     # 0x5457c
jne 0x14853
cmpl $0x51, %eax
je 0x14851
movl $0x42, 0x3fd27(%rip)    # 0x54578
popq %rbx
retq
popq %rbx
jmp 0x14b10
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: mimeout_addchar
static void
mimeout_addchar(nkf_char c)
{
    switch(mimeout_mode) {
    case 'Q':
	if (c==CR||c==LF) {
	    (*o_mputc)(c);
	    base64_count = 0;
	} else if(!nkf_isalnum(c)) {
	    (*o_mputc)('=');
	    (*o_mputc)(bin2hex(((c>>4)&0xf)));
	    (*o_mputc)(bin2hex((c&0xf)));
	    base64_count += 3;
	} else {
	    (*o_mputc)(c);
	    base64_count++;
	}
	break;
    case 'B':
	nkf_state->mimeout_state=c;
	(*o_mputc)(basis_64[c>>2]);
	mimeout_mode=2;
	base64_count ++;
	break;
    case 2:
	(*o_mputc)(basis_64[((nkf_state->mimeout_state & 0x3)<< 4) | ((c & 0xF0) >> 4)]);
	nkf_state->mimeout_state=c;
	mimeout_mode=1;
	base64_count ++;
	break;
    case 1:
	(*o_mputc)(basis_64[((nkf_state->mimeout_state & 0xF) << 2) | ((c & 0xC0) >>6)]);
	(*o_mputc)(basis_64[c & 0x3F]);
	mimeout_mode='B';
	base64_count += 2;
	break;
    default:
	(*o_mputc)(c);
	base64_count++;
	break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0x3fd13(%rip), %eax     # 0x54578
cmpl $0x1, %eax
je 0x1490f
cmpl $0x2, %eax
je 0x1489e
cmpl $0x42, %eax
je 0x148e2
cmpl $0x51, %eax
jne 0x1495c
cmpl $0xd, %ebx
je 0x1488f
cmpl $0xa, %ebx
jne 0x1497a
movl %ebx, %edi
callq *0x37aa1(%rip)          # 0x4c338
xorl %eax, %eax
jmp 0x1496c
movq 0x3fc83(%rip), %rax     # 0x54528
movl 0x18(%rax), %eax
shll $0x4, %eax
andl $0x30, %eax
movl %ebx, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
orl %eax, %ecx
leaq 0x2f61(%rip), %rax      # 0x17820
movsbl (%rcx,%rax), %edi
callq *0x37a6f(%rip)          # 0x4c338
movq 0x3fc58(%rip), %rax     # 0x54528
movl %ebx, 0x18(%rax)
movl $0x1, 0x3fc9b(%rip)     # 0x54578
jmp 0x14964
movq 0x3fc3f(%rip), %rax     # 0x54528
movl %ebx, 0x18(%rax)
sarl $0x2, %ebx
movslq %ebx, %rax
leaq 0x2f27(%rip), %rcx      # 0x17820
movsbl (%rax,%rcx), %edi
callq *0x37a35(%rip)          # 0x4c338
movl $0x2, 0x3fc6b(%rip)     # 0x54578
jmp 0x14964
movq 0x3fc12(%rip), %rax     # 0x54528
movl 0x18(%rax), %eax
andl $0xf, %eax
movl %ebx, %ecx
shrl $0x6, %ecx
andl $0x3, %ecx
leal (%rcx,%rax,4), %eax
leaq 0x2ef2(%rip), %r14      # 0x17820
movsbl (%rax,%r14), %edi
callq *0x379ff(%rip)          # 0x4c338
andl $0x3f, %ebx
movsbl (%rbx,%r14), %edi
callq *0x379f1(%rip)          # 0x4c338
movl $0x42, 0x3fc27(%rip)    # 0x54578
movl 0x3fc85(%rip), %eax     # 0x545dc
addl $0x2, %eax
jmp 0x1496c
movl %ebx, %edi
callq *0x379d4(%rip)          # 0x4c338
movl 0x3fc72(%rip), %eax     # 0x545dc
incl %eax
movl %eax, 0x3fc6a(%rip)     # 0x545dc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leal -0x30(%rbx), %ecx
movq 0x379b4(%rip), %rax     # 0x4c338
cmpl $0xa, %ecx
jb 0x149ce
movl %ebx, %ecx
andl $-0x21, %ecx
addl $-0x41, %ecx
cmpl $0x1a, %ecx
jb 0x149ce
pushq $0x3d
popq %rdi
callq *%rax
movl %ebx, %eax
shrl $0x4, %eax
andl $0xf, %eax
leaq 0x2aea(%rip), %r14      # 0x17494
movsbl (%rax,%r14), %edi
callq *0x37983(%rip)          # 0x4c338
andl $0xf, %ebx
movsbl (%rbx,%r14), %edi
callq *0x37975(%rip)          # 0x4c338
movl 0x3fc13(%rip), %eax     # 0x545dc
addl $0x3, %eax
jmp 0x1496c
movl %ebx, %edi
callq *%rax
jmp 0x14964
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ecx, %ecx
leaq 0x2cda(%rip), %rbx      # 0x176bf
leaq 0x1ad4(%rip), %rdx      # 0x164c0
movq %rcx, %rax
cmpq $0x28, %rcx
je 0x14a0a
leaq 0x4(%rax), %rcx
cmpl %edi, (%rax,%rdx)
jne 0x149ec
leaq 0x3182b(%rip), %rdx     # 0x46230
movq -0x8(%rdx,%rcx,2), %rbx
leaq 0x2e5f(%rip), %rcx      # 0x17870
movl (%rax,%rcx), %eax
movl %eax, 0x3fb5e(%rip)     # 0x54578
xorl %ebp, %ebp
cmpl $0x2e, 0x3fbb9(%rip)    # 0x545dc
movabsq $0x100002600, %r14      # imm = 0x100002600
jl 0x14a97
xorl %ebp, %ebp
cmpl $0x0, 0x3fba0(%rip)     # 0x545d8
jle 0x14a54
movzbl 0x3fb4b(%rip), %edi     # 0x5458c
cmpl $0x20, %edi
je 0x14a4b
cmpl $0x9, %edi
jne 0x14a54
callq *0x378e7(%rip)          # 0x4c338
pushq $0x1
popq %rbp
movq 0x378dd(%rip), %rdi     # 0x4c338
callq 0x14778
pushq $0x20
popq %rdi
callq *0x378cf(%rip)          # 0x4c338
movl $0x1, 0x3fb69(%rip)     # 0x545dc
cmpl $0x0, 0x3fb5e(%rip)     # 0x545d8
jle 0x14a97
movl %ebp, %eax
leaq 0x3fb07(%rip), %rcx     # 0x5458c
movzbl (%rax,%rcx), %eax
cmpq $0x20, %rax
ja 0x14a97
btq %rax, %r14
jae 0x14a97
incl %ebp
movl %ebp, %r15d
leaq 0x3faeb(%rip), %r12     # 0x5458c
movslq 0x3fb30(%rip), %rax     # 0x545d8
cmpq %rax, %r15
jge 0x14ade
movzbl (%r15,%r12), %edi
cmpq $0x20, %rdi
ja 0x14ade
btq %rdi, %r14
jae 0x14ade
callq *0x37874(%rip)          # 0x4c338
incl 0x3fb12(%rip)           # 0x545dc
incq %r15
jmp 0x14aa1
incq %rbx
callq *0x37860(%rip)          # 0x4c338
incl 0x3fafe(%rip)           # 0x545dc
movzbl (%rbx), %edi
testl %edi, %edi
jne 0x14acf
movslq 0x3faec(%rip), %rbx     # 0x545d8
andl $0x0, 0x3fae5(%rip)     # 0x545d8
cmpq %rbx, %r15
jge 0x14b07
movzbl (%r15,%r12), %edi
callq 0x12934
incq %r15
jmp 0x14af3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: close_mime
static void
close_mime(void)
{
    (*o_mputc)('?');
    (*o_mputc)('=');
    base64_count += 2;
    mimeout_mode = 0;
}

// Assembly:
pushq %rax
pushq $0x3f
popq %rdi
callq *0x3781e(%rip)          # 0x4c338
pushq $0x3d
popq %rdi
callq *0x37815(%rip)          # 0x4c338
addl $0x2, 0x3fab2(%rip)     # 0x545dc
andl $0x0, 0x3fa47(%rip)     # 0x54578
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: hex_getc
static nkf_char
hex_getc(nkf_char ch, FILE *f, nkf_char (*g)(FILE *f), nkf_char (*u)(nkf_char c, FILE *f))
{
    nkf_char c1, c2, c3;
    c1 = (*g)(f);
    if (c1 != ch){
	return c1;
    }
    c2 = (*g)(f);
    if (!nkf_isxdigit(c2)){
	(*u)(c2, f);
	return c1;
    }
    c3 = (*g)(f);
    if (!nkf_isxdigit(c3)){
	(*u)(c2, f);
	(*u)(c3, f);
	return c1;
    }
    return (hex2bin(c2) << 4) | hex2bin(c3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
movq %rsi, %rdi
callq *%rdx
cmpl %ebp, %eax
jne 0x14c53
movq %r15, %rdi
callq *%rbx
movl %eax, %r12d
leal -0x30(%r12), %r13d
movabsq $0x3f0000003f, %rcx     # imm = 0x3F0000003F
cmpl $0xa, %r13d
jb 0x14bd7
leal -0x41(%r12), %eax
cmpl $0x25, %eax
ja 0x14c62
btq %rax, %rcx
jae 0x14c62
movq %r15, %rdi
callq *%rbx
movl %eax, %ebx
leal -0x30(%rbx), %eax
cmpl $0xa, %eax
jb 0x14bfe
leal -0x41(%rbx), %ecx
cmpl $0x25, %ecx
ja 0x14c67
movabsq $0x3f0000003f, %rdx     # imm = 0x3F0000003F
btq %rcx, %rdx
jae 0x14c67
cmpl $0xa, %r13d
jb 0x14c2a
leal -0x41(%r12), %ecx
cmpl $0x5, %ecx
ja 0x14c17
addl $-0x37, %r12d
movl %r12d, %r13d
jmp 0x14c2a
leal -0x61(%r12), %ecx
addl $-0x57, %r12d
xorl %r13d, %r13d
cmpl $0x6, %ecx
cmovbl %r12d, %r13d
shll $0x4, %r13d
cmpl $0xa, %eax
jb 0x14c50
leal -0x41(%rbx), %eax
cmpl $0x5, %eax
ja 0x14c42
addl $-0x37, %ebx
movl %ebx, %eax
jmp 0x14c50
leal -0x61(%rbx), %ecx
addl $-0x57, %ebx
xorl %eax, %eax
cmpl $0x6, %ecx
cmovbl %ebx, %eax
orl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %edi
jmp 0x14c72
movl %r12d, %edi
movq %r15, %rsi
callq *%r14
movl %ebx, %edi
movq %r15, %rsi
callq *%r14
movl %ebp, %eax
jmp 0x14c53
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: nkf_xrealloc
static void *
nkf_xrealloc(void *ptr, size_t size)
{
    if (size == 0) size = 1;

    ptr = realloc(ptr, size);
    if (ptr == NULL) {
	perror("can't realloc");
	exit(EXIT_FAILURE);
    }

    return ptr;
}

// Assembly:
pushq %rax
cmpq $0x1, %rsi
adcq $0x0, %rsi
callq 0xc1b0
testq %rax, %rax
je 0x14cc2
popq %rcx
retq
leaq 0x2ac6(%rip), %rdi      # 0x1778f
callq 0xc200
pushq $0x1
popq %rdi
callq 0xc230
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: base64decode
static nkf_char
base64decode(nkf_char c)
{
    int             i;
    if (c > '@') {
	if (c < '[') {
	    i = c - 'A';                        /* A..Z 0-25 */
	} else if (c == '_') {
	    i = '?'         /* 63 */ ;          /* _  63 */
	} else {
	    i = c - 'G'     /* - 'a' + 26 */ ;  /* a..z 26-51 */
	}
    } else if (c > '/') {
	i = c - '0' + '4'   /* - '0' + 52 */ ;  /* 0..9 52-61 */
    } else if (c == '+' || c == '-') {
	i = '>'             /* 62 */ ;          /* + and -  62 */
    } else {
	i = '?'             /* 63 */ ;          /* / 63 */
    }
    return (i);
}

// Assembly:
movl %edi, %eax
cmpl $0x41, %edi
jl 0x14ce6
cmpl $0x5a, %eax
ja 0x14cef
addl $-0x41, %eax
retq
cmpl $0x30, %eax
jl 0x14cfc
addl $0x4, %eax
retq
leal -0x47(%rax), %ecx
cmpl $0x5f, %eax
pushq $0x3f
popq %rax
cmovnel %ecx, %eax
retq
addl $-0x2b, %eax
andl $-0x3, %eax
cmpl $0x1, %eax
pushq $0x3f
popq %rax
sbbl $0x0, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: nkf_iconv_utf_16
static size_t
nkf_iconv_utf_16(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4)
{
    nkf_char wc;

    if (c1 == EOF) {
	(*oconv)(EOF, 0);
	return 0;
    }

    if (input_endian == ENDIAN_BIG) {
	if (0xD8 <= c1 && c1 <= 0xDB) {
	    if (0xDC <= c3 && c3 <= 0xDF) {
		wc = UTF16_TO_UTF32(c1 << 8 | c2, c3 << 8 | c4);
	    } else return NKF_ICONV_NEED_TWO_MORE_BYTES;
	} else {
	    wc = c1 << 8 | c2;
	}
    } else {
	if (0xD8 <= c2 && c2 <= 0xDB) {
	    if (0xDC <= c4 && c4 <= 0xDF) {
		wc = UTF16_TO_UTF32(c2 << 8 | c1, c4 << 8 | c3);
	    } else return NKF_ICONV_NEED_TWO_MORE_BYTES;
	} else {
	    wc = c2 << 8 | c1;
	}
    }

    return (*unicode_iconv)(wc, FALSE);
}

// Assembly:
cmpl $0x1, 0x375b0(%rip)     # 0x4c2d4
jne 0x14d56
movl %edi, %eax
andl $-0x4, %eax
cmpl $0xd8, %eax
jne 0x14d85
movl %edx, %eax
andl $-0x4, %eax
cmpl $0xdc, %eax
jne 0x14d9a
shll $0x12, %edi
shll $0xa, %esi
orl %edi, %esi
shll $0x8, %edx
orl %ecx, %edx
leal (%rsi,%rdx), %edi
addl $0xfca02400, %edi       # imm = 0xFCA02400
jmp 0x14d93
movl %esi, %eax
andl $-0x4, %eax
cmpl $0xd8, %eax
jne 0x14d8c
movl %ecx, %eax
andl $-0x4, %eax
cmpl $0xdc, %eax
jne 0x14d9a
shll $0x12, %esi
shll $0xa, %edi
orl %esi, %edi
shll $0x8, %ecx
orl %edx, %ecx
addl %ecx, %edi
addl $0xfca02400, %edi       # imm = 0xFCA02400
jmp 0x14d93
shll $0x8, %edi
orl %esi, %edi
jmp 0x14d93
shll $0x8, %esi
orl %edi, %esi
movl %esi, %edi
xorl %esi, %esi
jmp 0x14f28
pushq $-0x2
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: code_status
static void
code_status(nkf_char c)
{
    int action_flag = 1;
    struct input_code *result = 0;
    struct input_code *p = input_code_list;
    while (p->name){
	if (!p->status_func) {
	    ++p;
	    continue;
	}
	if (!p->status_func)
	    continue;
	(p->status_func)(p, c);
	if (p->stat > 0){
	    action_flag = 0;
	}else if(p->stat == 0){
	    if (result){
		action_flag = 0;
	    }else{
		result = p;
	    }
	}
	++p;
    }

    if (action_flag){
	if (result && !estab_f){
	    set_iconv(TRUE, result->iconv_func);
	}else if (c <= DEL){
	    struct input_code *ptr = input_code_list;
	    while (ptr->name){
		status_reset(ptr);
		++ptr;
	    }
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
leaq 0x37373(%rip), %r14     # 0x4c140
pushq $0x1
popq %rbp
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpq $0x0, (%r14)
je 0x14e0c
movq 0x20(%r14), %rax
testq %rax, %rax
jne 0x14deb
addq $0x38, %r14
jmp 0x14dd6
movq %r14, %rdi
movl %ebx, %esi
callq *%rax
cmpl $0x0, 0x8(%r14)
jle 0x14dfd
xorl %ebp, %ebp
jmp 0x14de5
jne 0x14de5
testq %r15, %r15
cmovnel %r12d, %ebp
cmoveq %r14, %r15
jmp 0x14de5
testl %ebp, %ebp
je 0x14e5c
testq %r15, %r15
je 0x14e32
cmpl $0x0, 0x3f5fc(%rip)     # 0x54418
jne 0x14e32
movq 0x28(%r15), %rsi
pushq $0x1
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11962
cmpl $0x7f, %ebx
jg 0x14e5c
leaq 0x37302(%rip), %rax     # 0x4c140
movabsq $0x8000000000, %rcx     # imm = 0x8000000000
cmpq $0x0, (%rax)
je 0x14e5c
movq %rcx, 0x8(%rax)
andl $0x0, 0x10(%rax)
addq $0x38, %rax
jmp 0x14e48
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: w_iconv_combine
static nkf_char
w_iconv_combine(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4, nkf_char c5, nkf_char c6)
{
    nkf_char wc, wc2;
    wc = nkf_utf8_to_unicode(c1, c2, c3, 0);
    wc2 = nkf_utf8_to_unicode(c4, c5, c6, 0);
    if (wc2 < 0)
	return wc2;
    return unicode_iconv_combine(wc, wc2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r15d
movl %ecx, %edi
movl %r8d, %esi
movl %r9d, %edx
xorl %ecx, %ecx
callq 0x110cd
movl %eax, %r14d
testl %eax, %eax
js 0x14eab
movl %r15d, %edi
movl %ebp, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x110cd
movl %eax, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x14fc4
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: w_iconv_nocombine
static nkf_char
w_iconv_nocombine(nkf_char c1, nkf_char c2, nkf_char c3)
{
    /* continue from the line below 'return -3;' in w_iconv() */
    nkf_char ret = w2e_conv(c1, c2, c3, &c1, &c2);
    if (ret == 0){
	(*oconv)(c1, c2);
    }
    return ret;
}

// Assembly:
pushq %rax
leaq 0x4(%rsp), %rcx
movl %edi, (%rcx)
movq %rsp, %r8
movl %esi, (%r8)
callq 0x11169
testl %eax, %eax
jne 0x14edd
movl 0x4(%rsp), %edi
movl (%rsp), %esi
callq *0x373cb(%rip)          # 0x4c2a8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: utf32_to_nkf_char
static nkf_char
utf32_to_nkf_char(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4)
{
    nkf_char wc;

    switch(input_endian){
    case ENDIAN_BIG:
	wc = c2 << 16 | c3 << 8 | c4;
	break;
    case ENDIAN_LITTLE:
	wc = c3 << 16 | c2 << 8 | c1;
	break;
    case ENDIAN_2143:
	wc = c1 << 16 | c4 << 8 | c3;
	break;
    case ENDIAN_3412:
	wc = c4 << 16 | c1 << 8 | c2;
	break;
    default:
	return NKF_ICONV_INVALID_CODE_RANGE;
    }
    return wc;
}

// Assembly:
movl %edx, %eax
movl 0x373ed(%rip), %edx     # 0x4c2d4
decl %edx
leaq 0x1430(%rip), %r8       # 0x16320
movslq (%r8,%rdx,4), %rdx
addq %r8, %rdx
jmpq *%rdx
shll $0x10, %esi
shll $0x8, %eax
orl %esi, %eax
jmp 0x14f0b
shll $0x10, %edi
shll $0x8, %ecx
orl %edi, %ecx
orl %ecx, %eax
retq
shll $0x10, %ecx
shll $0x8, %edi
orl %ecx, %edi
orl %esi, %edi
movl %edi, %eax
retq
shll $0x10, %eax
shll $0x8, %esi
orl %eax, %esi
orl %edi, %esi
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: unicode_iconv
static size_t
unicode_iconv(nkf_char wc, int nocombine)
{
    nkf_char c1, c2;
    int ret = 0;

    if (wc < 0x80) {
	c2 = 0;
	c1 = wc;
    }else if ((wc>>11) == 27) {
	/* unpaired surrogate */
	return NKF_ICONV_INVALID_CODE_RANGE;
    }else if (wc < 0xFFFF) {
	if (!nocombine && x0213_f && x0213_wait_combining_p(wc))
	    return NKF_ICONV_WAIT_COMBINING_CHAR;
	ret = w16e_conv(wc, &c2, &c1);
	if (ret) return ret;
    }else if (wc < 0x10FFFF) {
	c2 = 0;
	c1 = nkf_char_unicode_new(wc);
    } else {
	return NKF_ICONV_INVALID_CODE_RANGE;
    }
    (*oconv)(c2, c1);
    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
cmpl $0x7f, %edi
jg 0x14f4b
andl $0x0, 0x8(%rsp)
movl %ebx, 0xc(%rsp)
xorl %edi, %edi
movl %ebx, %esi
callq *0x37361(%rip)          # 0x4c2a8
xorl %eax, %eax
jmp 0x14f5e
movl %ebx, %ecx
andl $0x7ffff800, %ecx       # imm = 0x7FFFF800
pushq $-0xd
popq %rax
cmpl $0xd800, %ecx           # imm = 0xD800
jne 0x14f64
addq $0x10, %rsp
popq %rbx
retq
cmpl $0xfffe, %ebx           # imm = 0xFFFE
ja 0x14f89
testl %esi, %esi
jne 0x14f9e
testb $0x1, 0x37435(%rip)     # 0x4c3ac
je 0x14f9e
movl %ebx, %edi
callq 0x1113e
testl %eax, %eax
je 0x14f9e
pushq $-0xe
popq %rax
jmp 0x14f5e
cmpl $0x10fffe, %ebx         # imm = 0x10FFFE
ja 0x14f5e
andl $0x0, 0x8(%rsp)
orl $0x1000000, %ebx        # imm = 0x1000000
jmp 0x14f39
leaq 0x8(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movl %ebx, %edi
callq 0x116b7
testl %eax, %eax
je 0x14fb7
cltq
jmp 0x14f5e
movl 0x8(%rsp), %edi
movl 0xc(%rsp), %ebx
jmp 0x14f3f
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: unicode_iconv_combine
static nkf_char
unicode_iconv_combine(nkf_char wc, nkf_char wc2)
{
    nkf_char c1, c2;
    int i;

    if (wc2 < 0x80) {
	return NKF_ICONV_NOT_COMBINED;
    }else if ((wc2>>11) == 27) {
	/* unpaired surrogate */
	return NKF_ICONV_INVALID_CODE_RANGE;
    }else if (wc2 < 0xFFFF) {
	if (!x0213_combining_p(wc2))
	    return NKF_ICONV_NOT_COMBINED;
	for (i = 0; i < sizeof_x0213_combining_table; i++) {
	    if (x0213_combining_table[i][1] == wc &&
		x0213_combining_table[i][2] == wc2) {
		c2 = x0213_combining_table[i][0] >> 8;
		c1 = x0213_combining_table[i][0] & 0x7f;
		(*oconv)(c2, c1);
		return 0;
	    }
	}
    }else if (wc2 < 0x10FFFF) {
	return NKF_ICONV_NOT_COMBINED;
    } else {
	return NKF_ICONV_INVALID_CODE_RANGE;
    }
    return NKF_ICONV_NOT_COMBINED;
}

// Assembly:
pushq $-0xf
popq %rax
cmpl $0x80, %esi
jge 0x14fd0
retq
movl %esi, %ecx
andl $0x7ffff800, %ecx       # imm = 0x7FFFF800
cmpl $0xd800, %ecx           # imm = 0xD800
jne 0x14fe4
pushq $-0xd
popq %rax
retq
cmpl $0xfffe, %esi           # imm = 0xFFFE
ja 0x15037
pushq %rax
xorl %ecx, %ecx
leaq 0xbf66(%rip), %rdx      # 0x20f5c
cmpq $0x5, %rcx
je 0x1505d
movzwl (%rdx,%rcx,2), %r8d
incq %rcx
cmpl %esi, %r8d
jne 0x14ff6
pushq $0x4
popq %rcx
leaq 0xbf5d(%rip), %rdx      # 0x20f70
cmpq $0x9a, %rcx
je 0x1505d
movzwl -0x2(%rdx,%rcx), %r8d
cmpl %edi, %r8d
jne 0x15031
movzwl (%rdx,%rcx), %r8d
cmpl %esi, %r8d
je 0x15048
addq $0x6, %rcx
jmp 0x15013
xorl %eax, %eax
cmpl $0x10ffff, %esi         # imm = 0x10FFFF
setae %al
addl %eax, %eax
orl $-0xf, %eax
retq
movzwl -0x4(%rdx,%rcx), %esi
movl %esi, %edi
shrl $0x8, %edi
andl $0x7f, %esi
callq *0x3724d(%rip)          # 0x4c2a8
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: switch_mime_getc
static void
switch_mime_getc(void)
{
    if (i_getc!=mime_getc) {
	i_mgetc = i_getc; i_getc = mime_getc;
	i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
	if(mime_f==STRICT_MIME) {
	    i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf;
	    i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf;
	}
    }
}

// Assembly:
movq 0x3727d(%rip), %rax     # 0x4c318
leaq -0x1190(%rip), %rcx     # 0x13f12
cmpq %rcx, %rax
je 0x15104
movq %rax, 0x37292(%rip)     # 0x4c340
movq %rcx, 0x37263(%rip)     # 0x4c318
movq 0x37264(%rip), %rcx     # 0x4c320
movq %rcx, 0x37285(%rip)     # 0x4c348
leaq -0xaa5(%rip), %rdx      # 0x14625
movq %rdx, 0x3724f(%rip)     # 0x4c320
cmpl $0x8, 0x371b8(%rip)     # 0x4c290
jne 0x15104
movq %rax, 0x3726f(%rip)     # 0x4c350
leaq 0x1d(%rip), %rax        # 0x15105
movq %rax, 0x37251(%rip)     # 0x4c340
movq %rcx, 0x37262(%rip)     # 0x4c358
leaq 0x37(%rip), %rax        # 0x15134
movq %rax, 0x37244(%rip)     # 0x4c348
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: mime_getc_buf
static nkf_char
mime_getc_buf(FILE *f)
{
    /* we don't keep eof of mime_input_buf, because it contains ?= as
       a terminator. It was checked in mime_integrity. */
    return ((mimebuf_f)?
	    (*i_mgetc_buf)(f):mime_input_buf(mime_input_state.input++));
}

// Assembly:
cmpl $0x0, 0x3f468(%rip)     # 0x54574
je 0x15114
jmpq *0x3723c(%rip)          # 0x4c350
movl 0x3f8e6(%rip), %eax     # 0x54a00
leaq 0x3f4d7(%rip), %rcx     # 0x545f8
leal 0x1(%rax), %edx
movl %edx, 0x3f8d6(%rip)     # 0x54a00
andl $0x3ff, %eax            # imm = 0x3FF
movzbl (%rax,%rcx), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/nurse[P]nkf/nkf.c
// Function: mime_ungetc_buf
static nkf_char
mime_ungetc_buf(nkf_char c, FILE *f)
{
    if (mimebuf_f)
	(*i_mungetc_buf)(c,f);
    else
	mime_input_buf(--mime_input_state.input) = (unsigned char)c;
    return c;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0x3f436(%rip)     # 0x54574
je 0x1514a
movl %ebx, %edi
callq *0x37210(%rip)          # 0x4c358
jmp 0x15168
leaq 0x3f4a7(%rip), %rax     # 0x545f8
movl 0x3f8a9(%rip), %ecx     # 0x54a00
decl %ecx
movl %ecx, 0x3f8a1(%rip)     # 0x54a00
andl $0x3ff, %ecx            # imm = 0x3FF
movb %bl, (%rcx,%rax)
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: SayUsage
void SayUsage (char *programName) {
   static char *usage[] = {
      "Display a MIDITONES bytestream",
      "Usage: miditones_scroll <basefilename>",
      "   reads <basefilename>.bin",
      " -tn displays up to n tone generators",
      " -v expects and displays volume information",
      " -vi expects and ignores volume information",
      " -c  creates an annotated C source file as <basefile>.c",
      " -x  show notes in hex instead of octave/note",
      " -n  don't show the bytestream data",
      "" };
   int i = 0;
   while (usage[i][0] != '\0')
      fprintf (stderr, "%s\n", usage[i++]); }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1db9(%rip), %r14      # 0x4004
movq 0x4d9e(%rip), %r15      # 0x6ff0
leaq 0x2391(%rip), %rbx      # 0x45ea
xorl %r12d, %r12d
cmpq $0x24, %r12
je 0x227c
movslq (%r12,%r14), %rdx
addq %r14, %rdx
movq (%r15), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20b0
addq $0x4, %r12
jmp 0x225c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: HandleOptions
int HandleOptions (int argc, char *argv[]) {
   /* returns the index of the first argument that is not an option; i.e.
      does not start with a dash or a slash */

   int i, firstnonoption = 0;

   /* --- The following skeleton comes from C:\lcc\lib\wizard\textmode.tpl. */
   for (i = 1; i < argc; i++) {
      if (argv[i][0] == '/' || argv[i][0] == '-') {
         switch (toupper (argv[i][1])) {
         case 'H':
         case '?':
            SayUsage (argv[0]);
            exit (1);
         case 'C':
            codeoutput = true;
            break;
         case 'X':
            showhex = true;
            break;
         case 'N':
            showbytestream = false;
            break;
         case 'T':
            if (sscanf (&argv[i][2], "%d", &num_tonegens) != 1 || num_tonegens < 1
                  || num_tonegens > MAX_TONEGENS)
               goto opterror;
            break;
         case 'V':
            expect_volume = true;
            if (argv[i][2] == '\0')
               break;
            if (toupper (argv[i][2]) == 'I')
               ignore_volume = true;
            else
               goto opterror;
            break;

            /* add more  option switches here */
opterror:
         default:
            fprintf (stderr, "unknown option: %s\n", argv[i]);
            SayUsage (argv[0]);
            exit (4); } }
      else {
         firstnonoption = i;
         break; } }
   return firstnonoption; }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq %edi, %rbp
pushq $0x1
popq %r13
leaq 0x22f2(%rip), %r14      # 0x4596
leaq 0x4e05(%rip), %r15      # 0x70b0
cmpq %rbp, %r13
jge 0x2362
movq (%rbx,%r13,8), %r12
movzbl (%r12), %eax
orl $0x2, %eax
cmpl $0x2f, %eax
jne 0x2366
callq 0x2030
movq (%rax), %rax
movsbq 0x1(%r12), %rcx
movl (%rax,%rcx,4), %ecx
cmpl $0x43, %ecx
je 0x2321
cmpl $0x4e, %ecx
je 0x232a
cmpl $0x54, %ecx
je 0x2333
cmpl $0x56, %ecx
je 0x2300
cmpl $0x58, %ecx
jne 0x2378
movb $0x1, 0x4df5(%rip)      # 0x70f3
jmp 0x235a
movb $0x1, 0x4dea(%rip)      # 0x70f1
movsbq 0x2(%r12), %rcx
testq %rcx, %rcx
je 0x235a
cmpl $0x49, (%rax,%rcx,4)
jne 0x238f
movb $0x1, 0x4dd3(%rip)      # 0x70f2
jmp 0x235a
movb $0x1, 0x4dc8(%rip)      # 0x70f0
jmp 0x235a
movb $0x0, 0x4d83(%rip)      # 0x70b4
jmp 0x235a
addq $0x2, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20f0
cmpl $0x1, %eax
jne 0x238b
movl 0x4d5e(%rip), %eax      # 0x70b0
addl $-0x11, %eax
cmpl $-0x11, %eax
jbe 0x238b
incq %r13
jmp 0x22ab
xorl %eax, %eax
jmp 0x2369
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x48, %ecx
je 0x2382
cmpl $0x3f, %ecx
jne 0x238f
callq 0x223c
pushq $0x1
jmp 0x23b1
movq (%rbx,%r13,8), %r12
movq 0x4c5a(%rip), %rax      # 0x6ff0
movq (%rax), %rdi
leaq 0x21f9(%rip), %rsi      # 0x4599
movq %r12, %rdx
xorl %eax, %eax
callq 0x20b0
callq 0x223c
pushq $0x4
popq %rdi
callq 0x2120
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: strlcpy
unsigned int strlcpy (char *dst, const char *src, unsigned int siz) {
   char *d = dst;
   const char *s = src;
   unsigned int n = siz;
   if (n != 0) {  /* Copy as many bytes as will fit */
      while (--n != 0) {
         if ((*d++ = *s++) == '\0')
            break; } }
   /* Not enough room in dst, add NUL and traverse rest of src */
   if (n == 0) {
      if (siz != 0)
         *d = '\0';             /* NUL-terminate dst */
      while (*s++); }
   return (s - src - 1);        /* count does not include NUL */
}

// Assembly:
movq %rsi, %rcx
testl %edx, %edx
je 0x23f1
decl %edx
xorl %ecx, %ecx
cmpl %ecx, %edx
je 0x23ea
movb (%rsi,%rcx), %al
movb %al, (%rdi,%rcx)
incq %rcx
testb %al, %al
jne 0x23d1
addq %rsi, %rcx
movq %rcx, %rax
jmp 0x23fd
movb $0x0, (%rdi,%rcx)
addq %rsi, %rcx
leaq 0x1(%rcx), %rax
cmpb $0x0, (%rcx)
movq %rax, %rcx
jne 0x23f1
notl %esi
addl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: strlcat
unsigned int strlcat (char *dst, const char *src, unsigned int siz) {
   char *d = dst;
   const char *s = src;
   unsigned int n = siz;
   unsigned int dlen;
   /* Find the end of dst and adjust bytes left but don't go past end */
   while (n-- != 0 && *d != '\0') d++;
   dlen = d - dst;
   n = siz - dlen;
   if (n == 0) return (dlen + strlength (s));
   while (*s != '\0') {
      if (n != 1) {
         *d++ = *s;
         n--; }
      s++; }
   *d = '\0';
   return (dlen + (s - src));   /* count does not include NUL */
}

// Assembly:
pushq %rbx
movl %edx, %ecx
addq %rdi, %rcx
movq %rdi, %rax
movl %edx, %r8d
subl $0x1, %r8d
jb 0x2421
cmpb $0x0, (%rax)
je 0x241e
incq %rax
jmp 0x240e
movq %rax, %rcx
movl %ecx, %ebx
subl %edi, %ebx
subl %ebx, %edx
je 0x2455
movl %ecx, %eax
subl %edi, %eax
pushq $0x1
popq %rdi
movb (%rsi), %r8b
testb %r8b, %r8b
je 0x2450
cmpl $0x1, %edx
jne 0x2441
movl %edi, %edx
jmp 0x2449
movb %r8b, (%rcx)
incq %rcx
decl %edx
incq %rsi
incl %eax
jmp 0x2430
movb $0x0, (%rcx)
jmp 0x245f
movq %rsi, %rdi
callq 0x23b7
addl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: file_error
void file_error (char *msg, unsigned char *bufptr) {
   unsigned char *ptr;
   fprintf (outfile, "\n---> file format error at position %04X (%d), time %d.%03d: %s\n",
            (unsigned int) (bufptr - buffer), (unsigned int) (bufptr - buffer), timenow / 1000, timenow % 1000, msg);
   /* print some bytes surrounding the error */
   ptr = bufptr - 16;
   if (ptr < buffer) ptr = buffer;
   for (; ptr <= bufptr + 16 && ptr < buffer + buflen; ++ptr)
      fprintf (outfile, ptr == bufptr ? " [%02X]  " : "%02X ", *ptr);
   fprintf (outfile, "\n"); }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x4e88(%rip), %rcx      # 0x7300
movl 0x4e8a(%rip), %esi      # 0x7308
movq 0x4c63(%rip), %rax      # 0x70e8
movl $0x3e8, %r8d            # imm = 0x3E8
xorl %edx, %edx
divq %r8
movq %rdx, %r9
movl %ebx, %edx
subl %esi, %edx
movq %rdi, (%rsp)
leaq 0x210b(%rip), %rsi      # 0x45ad
movq %rcx, %rdi
movl %edx, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x20b0
leaq -0x10(%rbx), %r14
movq 0x4e4c(%rip), %rcx      # 0x7308
cmpq %rcx, %r14
cmovbq %rcx, %r14
leaq 0x10(%rbx), %r15
leaq 0x2120(%rip), %r12      # 0x45ee
leaq 0x2143(%rip), %r13      # 0x4618
movq 0x4e24(%rip), %rax      # 0x7300
cmpq %r15, %r14
ja 0x2511
addq 0x4e28(%rip), %rcx      # 0x7310
cmpq %rcx, %r14
jae 0x2511
cmpq %rbx, %r14
movq %r13, %rsi
cmoveq %r12, %rsi
movzbl (%r14), %edx
movq %rax, %rdi
xorl %eax, %eax
callq 0x20b0
incq %r14
movq 0x4df9(%rip), %rcx      # 0x7308
jmp 0x24d5
pushq $0xa
popq %rdi
movq %rax, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x20a0
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones_scroll.c
// Function: countbits
int countbits (unsigned int bitmap) {
   int count;
   for (count = 0; bitmap; bitmap >>= 1)
      count += bitmap & 1;
   return count; }

// Assembly:
xorl %eax, %eax
testl %edi, %edi
je 0x2881
movl %edi, %ecx
andl $0x1, %ecx
addl %ecx, %eax
shrl %edi
jmp 0x2872
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetResolve
int anetResolve(char *err, char *host, char *ipbuf)
{
    struct sockaddr_in sa;

    sa.sin_family = AF_INET;
    if (inet_aton(host, &sa.sin_addr) == 0) {
        struct hostent *he;

        he = gethostbyname(host);
        if (he == NULL) {
            anetSetError(err, "can't resolve: %s", host);
            return ANET_ERR;
        }
        memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
    }
    strcpy(ipbuf,inet_ntoa(sa.sin_addr));
    return ANET_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %rsi
movw $0x2, -0x4(%rsi)
movq %r14, %rdi
callq 0x4250
testl %eax, %eax
je 0x5278
movl 0x4(%rsp), %edi
jmp 0x5292
movq %r14, %rdi
callq 0x4210
testq %rax, %rax
je 0x52ae
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %edi
movl %edi, 0x4(%rsp)
callq 0x4110
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5dd6(%rip), %rsi      # 0xb08b
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x50ad
pushq $-0x1
popq %rax
jmp 0x52a4
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetTcpGenericConnect
static int anetTcpGenericConnect(char *err, char *addr, int port, int flags)
{
    int s;
    struct sockaddr_in sa;

    if ((s = anetCreateSocket(err,AF_INET)) == ANET_ERR)
        return ANET_ERR;

    sa.sin_family = AF_INET;
    sa.sin_port = htons(port);
    if (inet_aton(addr, &sa.sin_addr) == 0) {
        struct hostent *he;

        he = gethostbyname(addr);
        if (he == NULL) {
            anetSetError(err, "can't resolve: %s", addr);
            close(s);
            return ANET_ERR;
        }
        memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
    }
    if (flags & ANET_CONNECT_NONBLOCK) {
        if (anetNonBlock(err,s) != ANET_OK)
            return ANET_ERR;
    }
    if (connect(s, (struct sockaddr*)&sa, sizeof(sa)) == -1) {
        if (errno == EINPROGRESS &&
            flags & ANET_CONNECT_NONBLOCK)
            return s;

        anetSetError(err, "connect: %s", strerror(errno));
        close(s);
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x5466
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x53a3
movl %eax, %ebp
leaq 0xc(%rsp), %rsi
movw $0x2, -0x4(%rsi)
rolw $0x8, %r13w
movw %r13w, -0x2(%rsi)
movq %r12, %rdi
callq 0x4250
testl %eax, %eax
jne 0x5336
movq %r12, %rdi
callq 0x4210
testq %rax, %rax
je 0x5388
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
testb $0x1, %r15b
je 0x534a
movq %r14, %rdi
movl %ebp, %esi
callq 0x5040
testl %eax, %eax
jne 0x53a3
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
movl %ebp, %edi
callq 0x4390
cmpl $-0x1, %eax
jne 0x5384
callq 0x4080
movl (%rax), %edi
cmpl $0x73, %edi
sete %al
testb %al, %r15b
jne 0x5384
callq 0x43b0
leaq 0x5d21(%rip), %rsi      # 0xb09d
movq %r14, %rdi
movq %rax, %rdx
jmp 0x5395
movl %ebp, %ebx
jmp 0x53a3
leaq 0x5cfc(%rip), %rsi      # 0xb08b
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x50ad
movl %ebp, %edi
callq 0x41b0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetCreateSocket
static int anetCreateSocket(char *err, int domain) {
    int s, on = 1;
    if ((s = socket(domain, SOCK_STREAM, 0)) == -1) {
        anetSetError(err, "creating socket: %s", strerror(errno));
        return ANET_ERR;
    }

    /* Make sure connection-intensive things like the redis benckmark
     * will be able to close/open sockets a zillion of times */
    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
        anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno));
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %eax
movq %rdi, %rbx
movl $0x1, 0x4(%rsp)
pushq $0x1
popq %rsi
movl %eax, %edi
xorl %edx, %edx
callq 0x43f0
cmpl $-0x1, %eax
je 0x54b9
movl %eax, %ebp
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
leaq 0x4(%rsp), %rcx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x40e0
cmpl $-0x1, %eax
jne 0x54dc
callq 0x4080
movl (%rax), %edi
callq 0x43b0
leaq 0x5c1b(%rip), %rsi      # 0xb0d2
jmp 0x54cc
callq 0x4080
movl (%rax), %edi
callq 0x43b0
leaq 0x5bf2(%rip), %rsi      # 0xb0be
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x50ad
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetTcpServer
int anetTcpServer(char *err, int port, char *bindaddr)
{
    int s;
    struct sockaddr_in sa;

    if ((s = anetCreateSocket(err,AF_INET)) == ANET_ERR)
        return ANET_ERR;

    memset(&sa,0,sizeof(sa));
    sa.sin_family = AF_INET;
    sa.sin_port = htons(port);
    sa.sin_addr.s_addr = htonl(INADDR_ANY);
    if (bindaddr && inet_aton(bindaddr, &sa.sin_addr) == 0) {
        anetSetError(err, "invalid bind address");
        close(s);
        return ANET_ERR;
    }
    if (anetListen(err,s,(struct sockaddr*)&sa,sizeof(sa)) == ANET_ERR)
        return ANET_ERR;
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x5466
pushq $-0x1
popq %rbp
cmpl $-0x1, %eax
je 0x5613
movl %eax, %ebx
andq $0x0, 0x8(%rsp)
movw $0x2, (%rsp)
rolw $0x8, %r12w
movw %r12w, 0x2(%rsp)
andl $0x0, 0x4(%rsp)
testq %r15, %r15
je 0x55e1
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0x4250
testl %eax, %eax
je 0x55fb
movq %rsp, %rdx
pushq $0x10
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5622
cmpl $-0x1, %eax
cmovel %eax, %ebx
movl %ebx, %ebp
jmp 0x5613
leaq 0x5aa7(%rip), %rsi      # 0xb0a9
movq %r14, %rdi
xorl %eax, %eax
callq 0x50ad
movl %ebx, %edi
callq 0x41b0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq