LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDA(unsigned short)
void mos6502::Op_LDA(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDX(unsigned short)
void mos6502::Op_LDX(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rbx)
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDY(unsigned short)
void mos6502::Op_LDY(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	Y = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rbx)
movb %al, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LSR(unsigned short)
void mos6502::Op_LSR(uint16_t src)
{
	uint8_t m = Read(src);
	SET_CARRY(m & 0x01);
	m >>= 1;
	SET_NEGATIVE(0);
	SET_ZERO(!m);
	Write(src, m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
movl %eax, %ecx
andb $0x1, %cl
movb 0x12(%rbx), %dl
andb $0x7c, %dl
orb %cl, %dl
leal 0x2(%rdx), %ecx
cmpb $0x2, %al
movzbl %dl, %edx
movzbl %cl, %ecx
cmovael %edx, %ecx
movb %cl, 0x12(%rbx)
shrb %al
movzbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LSR_ACC(unsigned short)
void mos6502::Op_LSR_ACC(uint16_t src)
{
	uint8_t m = A;
	SET_CARRY(m & 0x01);
	m >>= 1;
	SET_NEGATIVE(0);
	SET_ZERO(!m);
	A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb 0x12(%rdi), %cl
movl %eax, %edx
andb $0x1, %dl
andb $0x7c, %cl
orb %dl, %cl
leal 0x2(%rcx), %edx
cmpb $0x2, %al
movzbl %cl, %ecx
movzbl %dl, %edx
cmovael %ecx, %edx
movb %dl, 0x12(%rdi)
shrb %al
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_PLA(unsigned short)
void mos6502::Op_PLA(uint16_t src)
{
	A = StackPop();
	SET_NEGATIVE(A & 0x80);
    SET_ZERO(!A);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
xorl %esi, %esi
cmpq $0xff, %rax
cmovneq %rcx, %rsi
movq %rsi, 0x8(%rdi)
addq $0x100, %rsi            # imm = 0x100
callq 0x2d78
movb %al, (%rbx)
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %al
addb %al, %al
orb %dl, %al
movb %al, 0x12(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROL(unsigned short)
void mos6502::Op_ROL(uint16_t src)
{
	uint16_t m = Read(src);
    m <<= 1;
    if (IF_CARRY()) m |= 0x01;
    SET_CARRY(m > 0xFF);
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
leal (%rax,%rax), %ecx
movb 0x12(%rbx), %dl
movl %edx, %esi
andb $0x1, %sil
andb $0x7c, %dl
shrb $0x7, %al
orb %dl, %al
orb %cl, %sil
andb $-0x80, %cl
orb %al, %cl
testb %sil, %sil
sete %al
addb %al, %al
orb %cl, %al
movb %al, 0x12(%rbx)
movzbl %sil, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROL_ACC(unsigned short)
void mos6502::Op_ROL_ACC(uint16_t src)
{
	uint16_t m = A;
    m <<= 1;
    if (IF_CARRY()) m |= 0x01;
    SET_CARRY(m > 0xFF);
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
movzbl 0x12(%rdi), %ecx
movl %ecx, %edx
andl $0x1, %edx
leal (%rdx,%rax,2), %edx
leal (%rax,%rax), %esi
andb $0x7c, %cl
shrb $0x7, %al
orb %cl, %al
andb $-0x80, %sil
orb %al, %sil
testb %dl, %dl
sete %al
addb %al, %al
orb %sil, %al
movb %al, 0x12(%rdi)
movb %dl, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROR(unsigned short)
void mos6502::Op_ROR(uint16_t src)
{
	uint16_t m = Read(src);
    if (IF_CARRY()) m |= 0x100;
    SET_CARRY(m & 0x01);
    m >>= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
movzbl %al, %eax
movzbl 0x12(%rbx), %ecx
movl %ecx, %esi
andl $0x1, %esi
shll $0x8, %esi
orl %eax, %esi
andb $0x1, %al
movl %ecx, %edi
andb $0x7c, %dil
orb %al, %dil
movl %esi, %edx
shrl %edx
shlb $0x7, %cl
orb %dil, %cl
cmpw $0x2, %si
setb %al
addb %al, %al
orb %cl, %al
movb %al, 0x12(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROR_ACC(unsigned short)
void mos6502::Op_ROR_ACC(uint16_t src)
{
	uint16_t m = A;
    if (IF_CARRY()) m |= 0x100;
    SET_CARRY(m & 0x01);
    m >>= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
movzbl 0x12(%rdi), %ecx
movl %ecx, %edx
andl $0x1, %edx
shll $0x8, %edx
orl %eax, %edx
andb $0x1, %al
movl %ecx, %esi
andb $0x7c, %sil
orb %al, %sil
shlb $0x7, %cl
orb %sil, %cl
cmpl $0x2, %edx
setb %al
addb %al, %al
orb %cl, %al
movb %al, 0x12(%rdi)
shrl %edx
movb %dl, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_RTI(unsigned short)
void mos6502::Op_RTI(uint16_t src)
{
	uint8_t lo, hi;
	
	status = StackPop();
	
	lo = StackPop();
	hi = StackPop();
	
	pc = (hi << 8) | lo;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rsi
xorl %r15d, %r15d
movl $0xff, %r12d
cmpq %r12, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%rdi)
movl $0x100, %r13d           # imm = 0x100
addq %r13, %rsi
callq 0x2d78
movb %al, 0x12(%rbx)
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %r12, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%rbx)
addq %r13, %rsi
movq %rbx, %rdi
callq 0x2d78
movl %eax, %r14d
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %r12, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%rbx)
addq %r13, %rsi
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
shll $0x8, %eax
movzbl %r14b, %ecx
orl %eax, %ecx
movw %cx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_RTS(unsigned short)
void mos6502::Op_RTS(uint16_t src)
{
	uint8_t lo, hi;
	
	lo = StackPop();
	hi = StackPop();
	
	pc = ((hi << 8) | lo) + 1;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rsi
xorl %r15d, %r15d
movl $0xff, %r12d
cmpq %r12, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%rdi)
movl $0x100, %r13d           # imm = 0x100
addq %r13, %rsi
callq 0x2d78
movl %eax, %r14d
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %r12, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%rbx)
addq %r13, %rsi
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
shll $0x8, %eax
movzbl %r14b, %ecx
addl %ecx, %eax
incl %eax
movw %ax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_SBC(unsigned short)
void mos6502::Op_SBC(uint16_t src)
{
	uint8_t m = Read(src);
	unsigned int tmp = A - m - (IF_CARRY() ? 0 : 1);
	SET_NEGATIVE(tmp & 0x80);
	SET_ZERO(!(tmp & 0xFF));
    SET_OVERFLOW(((A ^ tmp) & 0x80) && ((A ^ m) & 0x80));
	
    if (IF_DECIMAL())
    {
    	if ( ((A & 0x0F) - (IF_CARRY() ? 0 : 1)) < (m & 0x0F)) tmp -= 6;
        if (tmp > 0x99)
        {
        	tmp -= 0x60;
        }
    }
    SET_CARRY(tmp < 0x100);
    A = (tmp & 0xFF);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movzbl (%rbx), %ecx
movzbl %al, %edx
movzbl 0x12(%rbx), %esi
movl %esi, %edi
notl %edi
andl $0x1, %edi
addl %edx, %edi
movl %ecx, %eax
subl %edi, %eax
andb $0x3d, %sil
movl %eax, %edi
andb $-0x80, %dil
orb %sil, %dil
testb %al, %al
sete %r8b
addb %r8b, %r8b
orb %dil, %r8b
movl %eax, %esi
xorl %ecx, %esi
movl %ecx, %edi
xorl %edx, %edi
shrb %sil
andb $0x40, %sil
xorl %r9d, %r9d
cmpl $0x80, %edi
movzbl %sil, %esi
cmovbl %r9d, %esi
orb %r8b, %sil
movb %sil, 0x12(%rbx)
testb $0x8, %sil
je 0x5640
movzbl %sil, %edi
andl $0xf, %ecx
notl %edi
andl $0x1, %edi
subl %edi, %ecx
andl $0xf, %edx
leal -0x6(%rax), %edi
cmpl %edx, %ecx
cmovgel %eax, %edi
leal -0x60(%rdi), %eax
cmpl $0x9a, %edi
cmovbl %edi, %eax
cmpl $0x100, %eax            # imm = 0x100
setb %cl
andb $-0x2, %sil
orb %cl, %sil
movb %sil, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TAX(unsigned short)
void mos6502::Op_TAX(uint16_t src)
{
	uint8_t m = A;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb 0x12(%rdi), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TSX(unsigned short)
void mos6502::Op_TSX(uint16_t src)
{
	uint8_t m = sp;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x8(%rdi), %al
movb 0x12(%rdi), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TXA(unsigned short)
void mos6502::Op_TXA(uint16_t src)
{
	uint8_t m = X;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
movb 0x12(%rdi), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rdi)
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Reset()
void mos6502::Reset()
{
	A = 0x00;
	Y = 0x00;
	X = 0x00;
	
	pc = (Read(rstVectorH) << 8) + Read(rstVectorL); // load PC from reset vector
		
    sp = 0xFD;
    
    status |= CONSTANT;
    
	cycles = 6; // according to the datasheet, the reset routine takes 6 clock cycles

	illegalOpcode = false;
	
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movw $0x0, (%rdi)
xorl %r14d, %r14d
movb %r14b, 0x2(%rdi)
movl $0xfffd, %esi           # imm = 0xFFFD
callq 0x2d78
movzbl %al, %r15d
shll $0x8, %r15d
movl $0xfffc, %esi           # imm = 0xFFFC
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
orl %r15d, %eax
movw %ax, 0x10(%rbx)
movq $0xfd, 0x8(%rbx)
orb $0x20, 0x12(%rbx)
movl $0x6, 0x14(%rbx)
movb %r14b, 0x2018(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::IRQ()
void mos6502::IRQ()
{
	if(!IF_INTERRUPT())
	{
		SET_BREAK(0);
		StackPush((pc >> 8) & 0xFF);
		StackPush(pc & 0xFF);
		StackPush(status);
		SET_INTERRUPT(1);
		pc = (Read(irqVectorH) << 8) + Read(irqVectorL);
	}
	return;
}

// Assembly:
movb 0x12(%rdi), %al
testb $0x4, %al
jne 0x5897
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andb $-0x15, %al
movb %al, 0x12(%rdi)
movzbl 0x11(%rdi), %edx
movl $0x100, %r14d           # imm = 0x100
movq 0x8(%rdi), %rsi
addq %r14, %rsi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
movl $0xff, %r15d
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x10(%rbx), %edx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x12(%rbx), %edx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rax
subq $0x1, %rax
cmovbq %r15, %rax
movq %rax, 0x8(%rbx)
orb $0x4, 0x12(%rbx)
movl $0xffff, %esi           # imm = 0xFFFF
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r14d
shll $0x8, %r14d
movl $0xfffe, %esi           # imm = 0xFFFE
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
orl %r14d, %eax
movw %ax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::NMI()
void mos6502::NMI()
{
	SET_BREAK(0);
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	StackPush(status);
	SET_INTERRUPT(1);
	pc = (Read(nmiVectorH) << 8) + Read(nmiVectorL);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andb $-0x11, 0x12(%rdi)
movzbl 0x11(%rdi), %edx
movl $0x100, %r14d           # imm = 0x100
movq 0x8(%rdi), %rsi
addq %r14, %rsi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
movl $0xff, %r15d
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x10(%rbx), %edx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x12(%rbx), %edx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rax
subq $0x1, %rax
cmovbq %r15, %rax
movq %rax, 0x8(%rbx)
orb $0x4, 0x12(%rbx)
movl $0xfffb, %esi           # imm = 0xFFFB
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r14d
shll $0x8, %r14d
movl $0xfffa, %esi           # imm = 0xFFFA
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
orl %r14d, %eax
movw %ax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Run(unsigned int)
void mos6502::Run(uint32_t n)
{
	uint32_t start = cycles;
	uint8_t opcode;
	Instr instr;

	//while(start + n > cycles && !illegalOpcode)
	while(start + 1000000 > cycles && !illegalOpcode)
	{

		// fetch
		if (!DebuggingFirst) {
		  DebugCommandline(pc);
		  DebuggingFirst = true;
		}

		DebugPC = pc;

		for (auto bp : bps) {
		  if (bp == DebugPC) {
			DebugCommandline(DebugPC);
		  }
		}


		opcode = Read(pc++);
		
		// decode
		instr = InstrTable[opcode];
		
		// execute
		Exec(instr);
		
		cycles++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x14(%rdi), %r15d
subl $0xfff0bdc0, %r15d      # imm = 0xFFF0BDC0
jae 0x5a41
movq %rdi, %rbx
leaq 0x18(%rdi), %r12
cmpb $0x0, 0x2018(%rbx)
jne 0x5a41
cmpb $0x0, 0x2032(%rbx)
jne 0x599d
movzwl 0x10(%rbx), %esi
movq %rbx, %rdi
callq 0x265c
movb $0x1, 0x2032(%rbx)
movzwl 0x10(%rbx), %eax
movw %ax, 0x2030(%rbx)
movq 0x2038(%rbx), %r14
movq 0x2040(%rbx), %r13
cmpq %r13, %r14
je 0x59d9
movzwl 0x2030(%rbx), %eax
cmpw %ax, (%r14)
jne 0x59d3
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x265c
addq $0x2, %r14
jmp 0x59b6
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %ecx
shll $0x5, %ecx
movq (%r12,%rcx), %rax
movq 0x10(%r12,%rcx), %r13
movq 0x18(%r12,%rcx), %r14
movq 0x8(%r12,%rcx), %rdi
addq %rbx, %rdi
testb $0x1, %al
je 0x5a14
movq (%rdi), %rcx
movq -0x1(%rcx,%rax), %rax
callq *%rax
addq %rbx, %r14
testb $0x1, %r13b
je 0x5a27
movq (%r14), %rcx
movq -0x1(%rcx,%r13), %r13
movzwl %ax, %esi
movq %r14, %rdi
callq *%r13
movl 0x14(%rbx), %eax
incl %eax
movl %eax, 0x14(%rbx)
cmpl %eax, %r15d
ja 0x5974
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanoleinik[P]archiver/src/huffman.cpp
// Function: HuffEncode::_serialize(std::ostream&, bool)
void HuffEncode::_serialize(std::ostream &out, bool bit) {
    _buff ^= bit * (1 << _buff_fill);
    _buff_fill++;
    if (_buff_fill == 8) {
        out.write(reinterpret_cast<char*>(&_buff), sizeof(int8_t));
        _encoded_data_size++;
        _buff_fill = 0;
        _buff = 0;
    }
}

// Assembly:
movq 0x50(%rdi), %rcx
shll %cl, %edx
xorb %dl, 0x58(%rdi)
incq %rcx
movq %rcx, 0x50(%rdi)
cmpq $0x8, %rcx
jne 0x2db5
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %rax
movl $0x1, %edx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2200
incq 0x48(%rbx)
movq $0x0, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanoleinik[P]archiver/src/huffman.cpp
// Function: HuffEncode::_clear_buff(std::ostream&)
void HuffEncode::_clear_buff(std::ostream &out) {
    if (_buff_fill) {
        out.write(reinterpret_cast<char*>(&_buff), sizeof(int8_t));
        _encoded_data_size++;
        _buff_fill = 0;
        _buff = 0;
    }
}

// Assembly:
cmpq $0x0, 0x50(%rdi)
je 0x2de6
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %rax
movl $0x1, %edx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2200
incq 0x48(%rbx)
movq $0x0, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanoleinik[P]archiver/src/huffman.cpp
// Function: HuffEncode::HuffEncode(std::istream&)
HuffEncode::HuffEncode(std::istream &in) {
    in.seekg(0, std::ios::end);
    _data.reserve(in.tellg());
    in.seekg(0, std::ios::beg);
    _data.assign((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());

    std::vector<std::size_t> frequencies(256, 0);
    for (unsigned char c : _data)
        frequencies[c]++;
    _tree = std::make_shared<HuffTree>(frequencies);
    _codes = _tree->get_codes();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x30(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x49(%rdi)
movq %rsi, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2210
movq %r15, %rdi
callq 0x22c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2270
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rax
movq 0xe8(%r15,%rax), %rcx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq $0x0, 0x20(%rsp)
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x4a90
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x800, %edi            # imm = 0x800
callq 0x21b0
movq %rax, %r15
movq %rax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, %r13
addq $0x800, %r13            # imm = 0x800
movq %r13, 0x30(%rsp)
movl $0x800, %edx            # imm = 0x800
movq %rax, %rdi
xorl %esi, %esi
callq 0x20f0
movq %r13, 0x28(%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2efd
movq (%rbx), %rcx
xorl %edx, %edx
movzbl (%rcx,%rdx), %esi
incq (%r15,%rsi,8)
incq %rdx
cmpq %rdx, %rax
jne 0x2eed
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x40(%rsp), %rsi
leaq 0x1f(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x4e80
movaps 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x40(%rsp)
movq 0x28(%rbx), %rdi
movups %xmm0, 0x20(%rbx)
testq %rdi, %rdi
je 0x2f3d
callq 0x3bc4
leaq 0x20(%rbx), %r15
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2f50
callq 0x3bc4
movq (%r15), %rsi
addq $0x38, %rsi
movq %r14, %rdi
callq 0x3a2c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2f76
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2f86
movq %rax, %r15
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2fa9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0x2fa9
jmp 0x2fa6
jmp 0x2fa6
movq %rax, %r15
movq %r14, %rdi
callq 0x397e
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x2fbf
callq 0x3bc4
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2fd3
movq (%r12), %rsi
incq %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanoleinik[P]archiver/src/huffman.cpp
// Function: HuffEncode::write(std::ostream&)
void HuffEncode::write(std::ostream &out) {
    for (size_t freq : _tree->get_frequencies())
        out.write(reinterpret_cast<char*>(&freq), sizeof(size_t));

    for (unsigned char c : _data) {
        for (bool bit : _codes[c]) {
            _serialize(out, bit);
        }
    }
    _clear_buff(out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0x3027
leaq 0x10(%rsp), %r15
movq (%r12), %rax
movq %rax, 0x10(%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2200
addq $0x8, %r12
cmpq %r13, %r12
jne 0x3005
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x30bf
movq (%rbx), %rax
addq %rax, (%rsp)
movq %rax, 0x8(%rsp)
movzbl (%rax), %eax
movq 0x30(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movq (%rcx,%rax,8), %r13
movq 0x10(%rcx,%rax,8), %r15
movl 0x18(%rcx,%rax,8), %r12d
cmpq %r15, %r13
setne %al
testl %r12d, %r12d
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x30b1
xorl %ebp, %ebp
movq (%r13), %rax
xorl %edx, %edx
btq %rbp, %rax
setb %dl
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d76
xorl %edx, %edx
xorl %eax, %eax
cmpl $0x3f, %ebp
leal 0x1(%rbp), %ecx
sete %al
leaq (%r13,%rax,8), %r13
cmovel %edx, %ecx
cmpq %r15, %r13
setne %al
cmpl %r12d, %ecx
setne %dl
orb %al, %dl
movl %ecx, %ebp
jne 0x3072
movq 0x8(%rsp), %rax
incq %rax
cmpq (%rsp), %rax
jne 0x303f
cmpq $0x0, 0x50(%rbx)
je 0x30e7
leaq 0x58(%rbx), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2200
incq 0x48(%rbx)
movq $0x0, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ruankotovich[P]B-Tree/src/findrec.cpp
// Function: main
int main(int argc, char* argv[])
{
  FILE* blockFile = fopen("files/data.block", "rb+");
  if (blockFile != NULL) {

    fseek(blockFile, sizeof(Block_t), SEEK_END);
    int numberOfArticles = ftell(blockFile) / sizeof(Block_t) - 1;
    rewind(blockFile);
    
    
    int id;

    if(argc > 1){
      id = atoi(argv[1]);
    }else{
      std::cin >> id;
    }

    Article_t article;

    if (getArticleFromHash(id, &article, blockFile)) { // recover an article from the hash
      std::cout << article.toString();
      std::cout << "\n\n> Number of records: " << numberOfArticles << "\n" << "> Number of blocks read: 1 \n"; // since it's a perfect hash
    } else {
      std::cout << "Record not found\n";
    }

  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x978, %rsp            # imm = 0x978
movq %rsi, %r15
movl %edi, %ebp
leaq 0x800(%rip), %rdi       # 0x2021
leaq 0x80a(%rip), %rsi       # 0x2032
callq 0x10f0
testq %rax, %rax
je 0x1952
movq %rax, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movl $0x2, %edx
callq 0x10d0
movq %r14, %rdi
callq 0x1030
movq %rax, %rbx
movq %r14, %rdi
callq 0x1040
cmpl $0x2, %ebp
jl 0x1872
movq 0x8(%r15), %rdi
callq 0x1120
movl %eax, 0x4(%rsp)
jmp 0x1883
movq 0x2767(%rip), %rdi      # 0x3fe0
leaq 0x4(%rsp), %rsi
callq 0x1070
leaq 0x2c(%rsp), %r15
movq %r15, %rdi
callq 0x1988
movl 0x4(%rsp), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d20
testb %al, %al
je 0x193a
leaq 0x8(%rsp), %r14
leaq 0x2c(%rsp), %rsi
movq %r14, %rdi
callq 0x1a14
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x2709(%rip), %rdi      # 0x3fd0
callq 0x10e0
shrq $0xc, %rbx
decl %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18ed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10c0
movq 0x26dc(%rip), %r14      # 0x3fd0
leaq 0x73b(%rip), %rsi       # 0x2036
movl $0x17, %edx
movq %r14, %rdi
callq 0x10e0
movq %r14, %rdi
movl %ebx, %esi
callq 0x1150
movq %rax, %rbx
leaq 0x769(%rip), %rsi       # 0x2085
movl $0x1, %edx
movq %rax, %rdi
callq 0x10e0
leaq 0x71e(%rip), %rsi       # 0x204e
movl $0x1c, %edx
movq %rbx, %rdi
jmp 0x194d
movq 0x268f(%rip), %rdi      # 0x3fd0
leaq 0x723(%rip), %rsi       # 0x206b
movl $0x11, %edx
callq 0x10e0
xorl %eax, %eax
addq $0x978, %rsp            # imm = 0x978
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1980
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O1/ticky[P]ps2iconsys/src/ps2icon_to_obj.cpp
// Function: ParseCommandLine(int, char**)
void ParseCommandLine(int argc, char* argv[])
{
	for(int i=1; i<argc; i++) {
		//Flag parameters:
		if( (strcmp( argv[i], "-h" ) == 0) || (strcmp( argv[i], "--help" ) == 0) ) {
			PrintHelp(argv[0]);
			exit(0);
		} else if( (strcmp( argv[i], "-v" ) == 0) || (strcmp( argv[i], "--verbose" ) == 0) ) {
			verbose_output = true;
		} else if(i < argc-1) {
		//Parameters with 1 argument
			if( (strcmp( argv[i], "-f" ) == 0) || (strcmp( argv[i], "--input-file" ) == 0) ) {
				ps2_input_file = argv[++i];
			} else if( (strcmp( argv[i], "-o" ) == 0) || (strcmp( argv[i], "--output-file" ) == 0) ) {
				obj_output_file = argv[++i];
			} else if( (strcmp( argv[i], "-ot" ) == 0) || (strcmp( argv[i], "--output-texture" ) == 0) ) {
				texture_output_file = argv[++i];
			} else {
				std::cout << "Invalid argument.\n" << std::endl;
				PrintHelp(argv[0]);
				exit(1);
			}
		} else {
			std::cout << "Invalid argument.\n" << std::endl;
			PrintHelp(argv[0]);
			exit(1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x8c61
movq %rsi, %rbx
movl %edi, %r14d
leal -0x1(%r14), %eax
movl %eax, 0x4(%rsp)
movl $0x1, %r15d
leaq 0x1e50(%rip), %r13      # 0xa98f
movslq %r15d, %r12
movq (%rbx,%r12,8), %rbp
movq %rbp, %rdi
leaq 0x1e35(%rip), %rsi      # 0xa985
callq 0x2270
testl %eax, %eax
je 0x8c70
movq %rbp, %rdi
leaq 0x1e21(%rip), %rsi      # 0xa988
callq 0x2270
testl %eax, %eax
je 0x8c70
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2270
testl %eax, %eax
je 0x8c2c
movq %rbp, %rdi
leaq 0x1e01(%rip), %rsi      # 0xa992
callq 0x2270
testl %eax, %eax
je 0x8c2c
cmpl 0x4(%rsp), %r15d
jge 0x8c7f
movq %rbp, %rdi
leaq 0x1de9(%rip), %rsi      # 0xa99c
callq 0x2270
testl %eax, %eax
je 0x8c35
movq %rbp, %rdi
leaq 0x1dd9(%rip), %rsi      # 0xa99f
callq 0x2270
testl %eax, %eax
je 0x8c35
movq %rbp, %rdi
leaq 0x1dd3(%rip), %rsi      # 0xa9ac
callq 0x2270
testl %eax, %eax
je 0x8c46
movq %rbp, %rdi
leaq 0x1dc3(%rip), %rsi      # 0xa9af
callq 0x2270
testl %eax, %eax
je 0x8c46
movq %rbp, %rdi
leaq 0x1dbe(%rip), %rsi      # 0xa9bd
callq 0x2270
testl %eax, %eax
je 0x8c1b
movq %rbp, %rdi
leaq 0x1daf(%rip), %rsi      # 0xa9c1
callq 0x2270
testl %eax, %eax
jne 0x8c7f
incl %r15d
movq 0x8(%rbx,%r12,8), %rax
movq %rax, 0x663e(%rip)      # 0xf268
jmp 0x8c55
movb $0x1, 0x663d(%rip)      # 0xf270
jmp 0x8c55
incl %r15d
movq 0x8(%rbx,%r12,8), %rax
movq %rax, 0x6614(%rip)      # 0xf258
jmp 0x8c55
incl %r15d
movq 0x8(%rbx,%r12,8), %rax
movq %rax, 0x660b(%rip)      # 0xf260
incl %r15d
cmpl %r14d, %r15d
jl 0x8b3f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
callq 0x86fc
xorl %edi, %edi
callq 0x2210
movq 0x6352(%rip), %rdi      # 0xefd8
leaq 0x1d45(%rip), %rsi      # 0xa9d2
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rdi
callq 0x86fc
movl $0x1, %edi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O1/ticky[P]ps2iconsys/src/ps2icon_to_obj.cpp
// Function: main
int main(int argc, char* argv[])
{
	ParseCommandLine(argc, argv);

	if(!ps2_input_file) {
		std::cout << "No input file specified.\n" << std::endl;
		PrintHelp(argv[0]);
		exit(1);
	}
	std::cout << "PS2Icon to OBJ Converter  V-1.0\n by Ghulbus Inc.  (http://www.ghulbus-inc.de/)\n" << std::endl;
	if(!obj_output_file)     { obj_output_file = "default.obj"; }
	if(!texture_output_file) { texture_output_file = "default.tga"; }

	PS2Icon* ps2_icon = LoadPS2Icon();

	WriteOBJFile(ps2_icon);

	WriteTextureFile(ps2_icon);
	
	std::cout << "Success :)" << std::endl;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x8b10
cmpq $0x0, 0x5d4c(%rip)      # 0xf258
je 0x95e1
movq 0x5abf(%rip), %rbx      # 0xefd8
leaq 0x1609(%rip), %rsi      # 0xab29
movl $0x4f, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
cmpq $0x0, 0x5d04(%rip)      # 0xf260
jne 0x956c
leaq 0x1614(%rip), %rax      # 0xab79
movq %rax, 0x5cf4(%rip)      # 0xf260
cmpq $0x0, 0x5cf4(%rip)      # 0xf268
jne 0x9584
leaq 0x1608(%rip), %rax      # 0xab85
movq %rax, 0x5ce4(%rip)      # 0xf268
callq 0x8cac
movq %rax, %r14
movq %rax, %rdi
callq 0x8f78
movq %r14, %rdi
callq 0x9242
leaq 0x15ee(%rip), %rsi      # 0xab91
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x59f0(%rip), %rdi      # 0xefd8
leaq 0x1520(%rip), %rsi      # 0xab0f
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rdi
callq 0x86fc
movl $0x1, %edi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: template_generator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, unsigned int)
fnames_t
template_generator(const fname_t& tmpl, const suint_t imin, const suint_t imax) {
  fnames_t names;
  char *filepath;
  for (size_t i = imin; i < imax; ++i) {
    asprintf(&filepath, tmpl.c_str(), i);
    names.emplace_back(filepath);
    free(filepath);
  }
  return names;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpl %ecx, %edx
jae 0x26e9
movq %rsi, %r14
movl %ecx, %r13d
movl %edx, %r15d
leaq 0x8(%rsp), %r12
movq (%r14), %rsi
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2080
movq %rbx, %rdi
movq %r12, %rsi
callq 0x575e
movq 0x8(%rsp), %rdi
callq 0x22b0
incq %r15
cmpq %r15, %r13
jne 0x26bc
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x57a4
movq %r14, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: copy_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void copy_file(const fname_t& from, const fname_t& to) {
  const std::size_t buf_sz = 32768;
  char* buf = new char[buf_sz];

  int infile = ::open(from.c_str(), O_RDONLY, 0);
  int outfile = ::open(to.c_str(), O_CREAT | O_WRONLY | O_TRUNC, 0666);

  ssize_t sz, sz_read=1, sz_write;
  while ((sz_read > 0) &&
         (sz_read = ::read(infile, buf, buf_sz)) > 0) {
    sz_write = 0;
    do {
      if ((sz = ::write(outfile, buf + sz_write,
                        static_cast<size_t>(sz_read - sz_write))) < 0) {
        sz_read = sz; // cause read loop termination
        break;        //  and error reported after closes
      }
      sz_write += sz;
    } while (sz_write < sz_read);
  }

  delete [] buf;
  ::close(infile);
  ::close(outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x8000, %edi           # imm = 0x8000
callq 0x2030
movq %rax, %rbx
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x21a0
movl %eax, %ebp
movq (%r14), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x21a0
movl %eax, %r14d
movl $0x8000, %edx           # imm = 0x8000
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2300
testq %rax, %rax
jle 0x278d
movq %rax, %r15
xorl %r12d, %r12d
leaq (%rbx,%r12), %rsi
movq %r15, %rdx
subq %r12, %rdx
movl %r14d, %edi
callq 0x2090
testq %rax, %rax
js 0x2788
addq %rax, %r12
cmpq %r15, %r12
jl 0x2769
testq %rax, %rax
jns 0x274f
movq %rbx, %rdi
callq 0x22c0
movl %ebp, %edi
callq 0x2430
movl %r14d, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2430
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: update_LCP(mmap_swriter_t<unsigned char, 4194304ul>&, unsigned char, unsigned long, unsigned long const*)
void update_LCP(
  lcp_writer_t& LCP,
  const strlen_t p,
  const luint_t base_pos,
  const luint_t* Lcount
) {
  LCP.seek(base_pos);
  for (enc_nucl_t sigma = 1; sigma<ALPHSIZE; ++sigma) {
    if (Lcount[sigma]==0) continue;
    LCP.skip();
    for (luint_t rh = 1; rh < Lcount[sigma]; ++rh) {
      LCP.write(p);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x5a36
movl $0x1, %r15d
movzbl %bpl, %ebp
cmpq $0x0, (%rbx,%r15,8)
je 0x2d9b
movq 0x10(%r14), %rsi
incq %rsi
movq %rsi, 0x10(%r14)
cmpq $0x400000, %rsi         # imm = 0x400000
jb 0x2d7b
addq 0x8(%r14), %rsi
movq %r14, %rdi
callq 0x5a36
cmpq $0x2, (%rbx,%r15,8)
jb 0x2d9b
movl $0x1, %r12d
movq %r14, %rdi
movl %ebp, %esi
callq 0x5acc
incq %r12
cmpq (%rbx,%r15,8), %r12
jb 0x2d88
incq %r15
cmpq $0x6, %r15
jne 0x2d54
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: compute_Q1_l(unsigned char, std::vector<std::array<unsigned long, 6ul>, std::allocator<std::array<unsigned long, 6ul>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void compute_Q1_l(
    const strlen_t k,
    const occ_countv_t& occv,
    const fnames_t& Q_tpls
) {
  for (strlen_t l = 1; l <= k; ++l) {
    plain_fasta_writer_t Ql(Q_tpls[l]);
    for (enc_nucl_t sigma = 0; sigma < ALPHSIZE; ++sigma) {
      for (luint_t i = 0; i < occv[l][sigma]; ++i) {
        Ql.write(sigma);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movl %edi, 0xc(%rsp)
testl %edi, %edi
je 0x2e45
movq %rsi, %r14
movb $0x1, %al
movzbl %al, %r15d
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %r15d, %ecx
shll $0x5, %ecx
movq (%rax,%rcx), %rdi
leaq 0x6262(%rip), %rsi      # 0x904c
callq 0x22a0
movq %rax, %r12
leaq (%r15,%r15,2), %rbx
shll $0x4, %ebx
xorl %r13d, %r13d
movq (%r14), %rax
addq %rbx, %rax
cmpq $0x0, (%rax,%r13,8)
je 0x2e25
xorl %ebp, %ebp
movl %r13d, %edi
movq %r12, %rsi
callq 0x20b0
incq %rbp
movq (%r14), %rax
addq %rbx, %rax
cmpq (%rax,%r13,8), %rbp
jb 0x2e0b
incq %r13
cmpq $0x6, %r13
jne 0x2dfc
testq %r12, %r12
je 0x2e3b
movq %r12, %rdi
callq 0x2240
leal 0x1(%r15), %eax
cmpb 0xc(%rsp), %al
jbe 0x2dcd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: worker_IX(unsigned int, base_env_t&, bfv_env_t&, std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<std::vector<unsigned int, std::allocator<unsigned int>>, std::allocator<std::vector<unsigned int, std::allocator<unsigned int>>>> const&)
void worker_IX(const unsigned idx,
               base_env_t& base_env,
               bfv_env_t& bfv_env,
               const std::vector<luint_t>& this_end_pos,
               const std::vector<std::vector<strnum_t>>& this_end_pos_Qp
               ) {
  const luint_t segm_b = this_end_pos[idx-1];
  const luint_t segm_e = this_end_pos[idx];
  compute_interleave_LCP_segment(base_env, bfv_env, segm_b, segm_e, base_env.p,
                                 this_end_pos_Qp[idx-1], idx);
}

// Assembly:
pushq %rax
leal -0x1(%rdi), %r9d
movq (%rcx), %rcx
movq (%rcx,%r9,8), %rax
movl %edi, %r10d
movq (%rcx,%r10,8), %rcx
movzbl 0x30(%rsi), %r10d
leaq (%r9,%r9,2), %r9
shlq $0x3, %r9
addq (%r8), %r9
movl %edi, (%rsp)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movl %r10d, %r8d
callq 0x2e54
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: compute_BWT(unsigned char, unsigned int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void compute_BWT(
    const strlen_t k, const strnum_t m,
    const fnames_t& B_tpl,
    const fname_t& IXk_name
) {
  const strlen_t k1 = k+1;
  const luint_t tot = static_cast<luint_t>(m)*k1;
  strlen_reader_t IXk(IXk_name);
  std::vector<enc_fasta_reader_t> Bl;
  for (const fname_t& fname: B_tpl) {
    Bl.emplace_back(fname);
  }
  enc_fasta_writer_t B("outfile-BWT.bin");

  for (luint_t i = 0; i < tot; ++i) {
    const strlen_t l = IXk.read();
    const enc_nucl_t c = Bl[(l+1)%k1].read();
    B.write(c);
  }
  remove_files(B_tpl);
  remove_file(IXk_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebp
leaq 0x4a53(%rip), %rdx      # 0x904f
leaq 0x10(%rsp), %rdi
movq %rcx, 0x40(%rsp)
movq %rcx, %rsi
callq 0x608a
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq (%r14), %r12
movq 0x8(%r14), %rbx
cmpq %rbx, %r12
je 0x4644
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x68d8
addq $0x20, %r12
cmpq %rbx, %r12
jne 0x4630
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4aa9(%rip), %rsi      # 0x90fd
leaq 0x4ab1(%rip), %rdx      # 0x910c
leaq 0x48(%rsp), %rdi
callq 0x6ed6
incb %bpl
movl %r15d, %eax
movzbl %bpl, %r15d
movq %r15, %r12
imulq %rax, %r12
movq 0x48(%rsp), %rdi
leaq 0x49ca(%rip), %rsi      # 0x904c
callq 0x22a0
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movb $0x0, 0xc(%rsp)
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x46af
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2260
testq %r12, %r12
je 0x4724
movzbl 0x18(%rsp), %ebp
movq 0x10(%rsp), %rdi
callq 0x2420
movb %al, 0x18(%rsp)
incl %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %r15d
movq 0x20(%rsp), %rax
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movzbl 0x15(%rdi), %ebx
callq 0x7356
movb 0xc(%rsp), %al
shlb $0x4, %al
andl $0xf, %ebx
movzbl %al, %edi
orl %ebx, %edi
movb %dil, 0xc(%rsp)
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
cmpl $0x2, %eax
jne 0x471f
movq (%rsp), %rsi
callq 0x20b0
movl $0x0, 0x8(%rsp)
movb $0x0, 0xc(%rsp)
decq %r12
jne 0x46b4
movq (%r14), %rbx
movq 0x8(%r14), %r14
cmpq %r14, %rbx
je 0x473e
movq (%rbx), %rdi
callq 0x2400
addq $0x20, %rbx
jmp 0x472b
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x2400
movq %rsp, %rdi
callq 0x59d0
leaq 0x20(%rsp), %rdi
callq 0x6918
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x476c
callq 0x2240
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x478a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x59d0
jmp 0x478d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6918
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x47a6
callq 0x2240
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: optifasta_writer_t<unsigned char, 2u>::write(unsigned char const&)
void write(const enc_nucl_t& el) {
    to_write = static_cast<io_nucl_t>((to_write << SHIFT) | (el & MASK));
    ++nel;
    if (nel == NEL) {
      writer.write(to_write);
      nel = 0;
      to_write = static_cast<io_nucl_t>(0);
    }
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0xc(%rdi), %al
shlb $0x4, %al
movzbl (%rsi), %ecx
andl $0xf, %ecx
movzbl %al, %edi
orl %ecx, %edi
movb %dil, 0xc(%rbx)
movl 0x8(%rbx), %eax
incl %eax
movl %eax, 0x8(%rbx)
cmpl $0x2, %eax
jne 0x59cd
movq (%rbx), %rsi
callq 0x20b0
movl $0x0, 0x8(%rbx)
movb $0x0, 0xc(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: optifasta_writer_t<unsigned char, 2u>::~optifasta_writer_t()
~optifasta_writer_t() {
    if (nel > 0) {
      while (nel < NEL) {
        to_write = static_cast<io_nucl_t>((to_write << SHIFT) | MASK);
        ++nel;
      }
      writer.write(to_write);
    }
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x5a04
movl 0x8(%rbx), %eax
cmpl $0x1, %eax
ja 0x59f8
movb 0xc(%rbx), %cl
shlb $0x4, %cl
orb $0xf, %cl
incl %eax
cmpl $0x1, %eax
je 0x59e5
movb %cl, 0xc(%rbx)
movl %eax, 0x8(%rbx)
movzbl 0xc(%rbx), %edi
movq (%rbx), %rsi
callq 0x20b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5a12
popq %rbx
jmp 0x2240
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_swriter_t<unsigned char, 4194304ul>::seek(unsigned long)
void seek(const luint_t new_pos) {
    if ((base == nullptr) | (new_pos < pos) | (new_pos >= pos+L)) {
      if (base != nullptr) munmap(base, L);
      pos = new_pos - (new_pos % L);
      base = static_cast<T*>(
          mmap(nullptr, sizeof(T)*L, PROT_READ | PROT_WRITE, MAP_SHARED, fno,
               static_cast<__off_t>(pos))
      );
      assert(base != MAP_FAILED);
    }
    off = new_pos - pos;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x5a5d
movq 0x8(%r14), %rax
cmpq %rbx, %rax
ja 0x5a5d
addq $0x400000, %rax         # imm = 0x400000
cmpq %rbx, %rax
ja 0x5a9d
testq %rdi, %rdi
je 0x5a6c
movl $0x400000, %esi         # imm = 0x400000
callq 0x2110
movq %rbx, %r9
andq $-0x400000, %r9         # imm = 0xFFC00000
movq %r9, 0x8(%r14)
movl (%r14), %r8d
movl $0x400000, %esi         # imm = 0x400000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
callq 0x23e0
movq %rax, 0x18(%r14)
cmpq $-0x1, %rax
je 0x5aad
subq 0x8(%r14), %rbx
movq %rbx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x386b(%rip), %rdi      # 0x931f
leaq 0x3800(%rip), %rsi      # 0x92bb
leaq 0x3870(%rip), %rcx      # 0x9332
movl $0xd8, %edx
callq 0x2130
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_swriter_t<unsigned char, 4194304ul>::write(unsigned char)
void write(const T el) {
    assert(base != nullptr);
    assert(off < L);
    if (base[off] != el) base[off] = el;
    ++off;
    if (off>=L) seek(pos+off);
  }

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x5b0d
movq 0x10(%rdi), %rcx
cmpq $0x400000, %rcx         # imm = 0x400000
jae 0x5b2c
cmpb %sil, (%rax,%rcx)
je 0x5aed
movb %sil, (%rax,%rcx)
movq 0x10(%rdi), %rsi
incq %rsi
movq %rsi, 0x10(%rdi)
cmpq $0x400000, %rsi         # imm = 0x400000
jb 0x5b0b
addq 0x8(%rdi), %rsi
popq %rax
jmp 0x5a36
popq %rax
retq
leaq 0x3877(%rip), %rdi      # 0x938b
leaq 0x37a0(%rip), %rsi      # 0x92bb
leaq 0x3879(%rip), %rcx      # 0x939b
movl $0xde, %edx
callq 0x2130
leaq 0x38bc(%rip), %rdi      # 0x93ef
leaq 0x3781(%rip), %rsi      # 0x92bb
leaq 0x385a(%rip), %rcx      # 0x939b
movl $0xdf, %edx
callq 0x2130
nop
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_writer_t<unsigned char, 6u, 4194304ul>::mmap_writer_t(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long const*)
mmap_writer_t(const fname_t& fname, const luint_t* new_pos = nullptr) {
    fno = open(fname.c_str(), O_RDWR, 0);
    std::fill_n(pos, N, 0);
    std::fill_n(off, N, 0);
    std::fill_n(bases, N, nullptr);
    seek(new_pos != nullptr ? new_pos : pos);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
xorl %r14d, %r14d
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x21a0
movl %eax, (%rbx)
leaq 0x8(%rbx), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
testq %r15, %r15
cmovneq %r15, %r12
movq (%r12,%r14,8), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5e06
incq %r14
cmpq $0x6, %r14
jne 0x5c69
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_reader_t<unsigned char, 4194304ul>::seek(unsigned long)
void seek(const luint_t new_pos) {
    if (base == nullptr || new_pos < pos || new_pos >= pos+L) {
      if (base != nullptr) {
        munmap(base, L);
      }
      pos = new_pos - (new_pos % L);
      base = static_cast<t*>(
        mmap(nullptr, sizeof(t)*L, PROT_READ, MAP_PRIVATE, fno, static_cast<__off_t>(pos))
      );
      assert(base != MAP_FAILED);
    }
    off = new_pos - pos;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x5da6
movq 0x8(%r14), %rax
cmpq %rbx, %rax
setbe %cl
addq $0x400000, %rax         # imm = 0x400000
cmpq %rbx, %rax
seta %al
testb %al, %cl
jne 0x5dd7
testq %rdi, %rdi
je 0x5da6
movl $0x400000, %esi         # imm = 0x400000
callq 0x2110
movq %rbx, %r9
andq $-0x400000, %r9         # imm = 0xFFC00000
movq %r9, 0x8(%r14)
movl (%r14), %r8d
movl $0x400000, %esi         # imm = 0x400000
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x23e0
movq %rax, 0x18(%r14)
cmpq $-0x1, %rax
je 0x5de7
subq 0x8(%r14), %rbx
movq %rbx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3531(%rip), %rdi      # 0x931f
leaq 0x34c6(%rip), %rsi      # 0x92bb
leaq 0x36d6(%rip), %rcx      # 0x94d2
movl $0x133, %edx            # imm = 0x133
callq 0x2130