LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: exercises()
void exercises() {
	A *pa = new C;
    if (B *pb = dynamic_cast< B* >(pa))
         cout << "cast from C to B* ok" << endl;
    else
         cout << "cast from C to B* not ok" << endl;
	B *pb = new B;
    if (C *pc = dynamic_cast< C* >(pb))
         cout << "cast from B to C* ok" << endl;
    else
         cout << "cast from B to C* not ok" << endl;

	A *pc = new C;
    if (B *pb = dynamic_cast< B* >(pc))
         cout << "cast C to B* ok" << endl;
    else
         cout << "cast C to B* not ok" << endl;

	A *pd = new D;
    if (B *pb = dynamic_cast< B* >(pd))
         cout << "cast D to B* ok" << endl;
    else
         cout << "cast D to B* not ok" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x8
popq %rbx
movq %rbx, %rdi
callq 0x1080
leaq 0x2a5c(%rip), %rcx      # 0x3cc8
movq %rcx, (%rax)
leaq 0x29ba(%rip), %r14      # 0x3c30
leaq 0x29c3(%rip), %r15      # 0x3c40
pushq $-0x1
popq %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x10a0
testq %rax, %rax
leaq 0xd83(%rip), %rax       # 0x201f
leaq 0xd67(%rip), %rsi       # 0x200a
cmoveq %rax, %rsi
movq 0x2d2a(%rip), %r13      # 0x3fd8
movq %r13, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1080
leaq 0x2a2b(%rip), %rcx      # 0x3cf8
movq %rcx, (%rax)
leaq 0x2991(%rip), %rdx      # 0x3c68
movq %rax, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x10a0
testq %rax, %rax
leaq 0xd5f(%rip), %rax       # 0x204d
leaq 0xd43(%rip), %rsi       # 0x2038
cmoveq %rax, %rsi
movq %r13, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1080
leaq 0x29b0(%rip), %rcx      # 0x3cc8
movq %rcx, (%rax)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x10a0
testq %rax, %rax
leaq 0xd40(%rip), %rax       # 0x2076
leaq 0xd29(%rip), %rsi       # 0x2066
cmoveq %rax, %rsi
movq %r13, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1080
leaq 0x29c8(%rip), %rcx      # 0x3d28
movq %rcx, (%rax)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x10a0
testq %rax, %rax
leaq 0xd1c(%rip), %rax       # 0x209a
leaq 0xd05(%rip), %rsi       # 0x208a
cmoveq %rax, %rsi
movq %r13, %rdi
callq 0x1070
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1050
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: cast_to_ref(Base const&)
void cast_to_ref(const Base &b)
{
    try {
        const Derived &d = dynamic_cast<const Derived&>(b);
	// use the Derived object to which b referred
    } catch (bad_cast) {
        cout << "called f with an object that is not a Derived" << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x28cc(%rip), %rsi      # 0x3c80
leaq 0x28d5(%rip), %rdx      # 0x3c90
xorl %ecx, %ecx
callq 0x10a0
testq %rax, %rax
je 0x13ce
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1100
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x1436
movq %rbx, %rdi
callq 0x10b0
movq 0x2bde(%rip), %rax      # 0x3fc8
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq %rbx, %rdi
callq 0x1040
movq 0x2bd7(%rip), %rdi      # 0x3fd8
leaq 0xca6(%rip), %rsi       # 0x20ae
callq 0x1070
movq %rax, %rdi
callq 0x1050
leaq -0x10(%rbp), %rdi
callq 0x10f0
callq 0x10d0
jmp 0x13c7
movq %rax, %rbx
leaq -0x10(%rbp), %rdi
callq 0x10f0
callq 0x10d0
movq %rbx, %rdi
callq 0x10e0
movq %rax, %rdi
callq 0x148a
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: main
int main()
{
	Base *bp; 
	bp = new Derived;  // bp actually points to a Derived object
	if (Derived *dp = dynamic_cast<Derived*>(bp)) 
	{
	    // use the Derived object to which dp points
	} else {  // bp points at a Base object
    	// use the Base object to which bp points
	}

	exercises();
	
	cast_to_ref(*bp);
	cast_to_ref(Base());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
pushq $0x8
popq %rdi
callq 0x1080
movq %rax, %rbx
leaq 0x2922(%rip), %rax      # 0x3d80
movq %rax, (%rbx)
callq 0x124c
movq %rbx, %rdi
callq 0x13a7
leaq 0x292b(%rip), %rax      # 0x3da0
leaq -0x10(%rbp), %rdi
movq %rax, (%rdi)
callq 0x13a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MarkOates[P]file-downloader/ex_file_downloader.cpp
// Function: main
int main(int, char**)
{
   std::string file_url = "https://www.allegro.cc/theme/default/image/logo.png";
   FileDownloader::FileHandle handle = FileDownloader::download_file(file_url, "logo.png");

   if (handle.get_status() == FileDownloader::DOWNLOADED)
      std::cout << "File Downloaded Successfully!" << std::endl;
   else
      std::cout << "Download Error: " << handle.get_error() << std::endl;

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xf8, %rsp
leaq 0xc65(%rip), %rsi       # 0x3004
leaq -0x88(%rbp), %rbx
leaq -0x100(%rbp), %rdx
movq %rbx, %rdi
callq 0x24e4
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x2100
leaq 0xc67(%rip), %rsi       # 0x302f
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x24e4
leaq -0x100(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x273e
leaq -0x48(%rbp), %rdi
callq 0x2160
leaq -0x68(%rbp), %rdi
callq 0x2160
leaq -0x100(%rbp), %rdi
callq 0x26bc
cmpl $0x2, %eax
jne 0x2429
movq 0x2bcd(%rip), %rdi      # 0x4fe0
leaq 0xc1e(%rip), %rsi       # 0x3038
callq 0x2110
movq %rax, %rdi
callq 0x21c0
jmp 0x246c
movq 0x2bb0(%rip), %rdi      # 0x4fe0
leaq 0xc1f(%rip), %rsi       # 0x3056
callq 0x2110
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x2706
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x20a0
movq %rax, %rdi
callq 0x21c0
leaq -0x28(%rbp), %rdi
callq 0x2160
leaq -0x100(%rbp), %rdi
callq 0x2650
leaq -0x88(%rbp), %rdi
callq 0x2160
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %rbp
retq
jmp 0x24c1
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2160
jmp 0x24c4
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2160
jmp 0x24b1
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2160
jmp 0x24d0
movq %rax, %rbx
jmp 0x24d0
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x2650
leaq -0x88(%rbp), %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2130
// File: /workspace/github_cpp_makefile_star2_O2/DCTewi[P]Truthtable-Calculator/functions.cpp
// Function: isLegal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isLegal(const std::string &expr)
{
    // Start error
    if (expr[0] != '!' && expr[0] != '(' && !isalpha(expr[0])) return false;
    // Tail error
    if (expr[expr.size() - 1] != ')' && !isalpha(expr[expr.size() - 1])) return false;
    
    for (int i = 1; i < static_cast<int>(expr.size()); i++)
    {
        if (expr[i - 1] == '!' || expr[i] == '!') continue;
        // Consequent operators
        if (operators.count(expr[i]) && operators.count(expr[i - 1])) return false;
        // Consequent variables
        if (isalpha(expr[i]) && isalpha(expr[i - 1])) return false;
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movzbl (%r14), %eax
cmpl $0x21, %eax
je 0x264e
cmpl $0x28, %eax
je 0x264e
movsbl %al, %edi
callq 0x21f0
testl %eax, %eax
je 0x26df
movq 0x8(%rbx), %r13
movsbl -0x1(%r14,%r13), %edi
cmpl $0x29, %edi
je 0x2666
callq 0x21f0
testl %eax, %eax
je 0x26df
pushq $0x1
popq %r12
leaq 0x5af7(%rip), %r15      # 0x8168
movslq %r13d, %rax
cmpq %rax, %r12
setge %bpl
jge 0x26e1
cmpb $0x21, -0x1(%r14,%r12)
je 0x26d6
cmpb $0x21, (%r14,%r12)
je 0x26d6
addq %r12, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x379a
testq %rax, %rax
je 0x26b6
movq (%rbx), %rax
leaq (%rax,%r12), %rsi
decq %rsi
movq %r15, %rdi
callq 0x379a
testq %rax, %rax
jne 0x26e1
movq (%rbx), %r14
movsbl (%r14,%r12), %edi
callq 0x21f0
testl %eax, %eax
je 0x26d6
movsbl -0x1(%r14,%r12), %edi
callq 0x21f0
testl %eax, %eax
jne 0x26e1
incq %r12
movq 0x8(%rbx), %r13
jmp 0x2671
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: usage()
static int usage()
{
    cout << "Usage: cat FASTQ | fastq-scan [options]" << endl;
    cout << "Version: " << VERSION << endl;
    cout << endl;
    cout << "Optional arguments:" << endl;
    cout << "    -g INT   Genome size for calculating estimated sequencing coverage. (Default 1)" << endl;
    cout << "    -p INT   ASCII offset for input quality scores, can be 33 or 64. (Default 33)" << endl;
    cout << "    -q       Print only the QC stats, do not print read lengths or per-base quality scores" << endl;
    cout << "    -v       Print version information and exit" << endl;
    cout << "    -h       Show this message and exit" << endl;
    cout << endl;
    return 0;
}

// Assembly:
pushq %rbx
movq 0x5739(%rip), %rbx      # 0x7fd0
leaq 0x28b1(%rip), %rsi      # 0x514f
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x28c2(%rip), %rsi      # 0x5177
movq %rbx, %rdi
callq 0x2140
leaq 0x5894(%rip), %rsi      # 0x8158
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20a0
leaq 0x289e(%rip), %rsi      # 0x5181
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x289b(%rip), %rsi      # 0x5195
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x28d8(%rip), %rsi      # 0x51e9
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x2913(%rip), %rsi      # 0x523b
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x2957(%rip), %rsi      # 0x5296
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
leaq 0x2970(%rip), %rsi      # 0x52c6
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
popq %rbx
jmp 0x20a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::init()
void init(void) {
            read_total = 0;
            total_bp = 0;
            qual_sum = 0;
            read_length_count.resize(MAX_READ_LENGTH,0);
            per_base_qual.resize(MAX_READ_LENGTH,0);
            per_base_count.resize(MAX_READ_LENGTH,0);
            phred = 33;
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x38(%rdi)
andq $0x0, (%rdi)
andq $0x0, 0xc8(%rdi)
addq $0x20, %rdi
movq %rsp, %r14
andl $0x0, (%r14)
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %r14, %rdx
callq 0x3656
leaq 0x88(%rbx), %rdi
andq $0x0, (%r14)
movq %rsp, %r14
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %r14, %rdx
callq 0x368a
leaq 0xa0(%rbx), %rdi
andq $0x0, (%r14)
movq %rsp, %rdx
movl $0x2faf080, %esi        # imm = 0x2FAF080
callq 0x368a
movl $0x21, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::read_stats()
void read_stats(void) {
            sort(read_length.begin(), read_length.end());
            read_min = read_length.front();
            read_mean = total_bp / float(read_total);
            read_std = get_std(read_length, read_mean);
            read_max = read_length.back();
            read_25th = get_percentile(read_length, read_length.size(), 0.25);
            read_median = get_percentile(read_length, read_length.size(), 0.50);
            read_75th = get_percentile(read_length, read_length.size(), 0.75);
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rsi
callq 0x3e5d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movl (%rcx), %ecx
movl %ecx, 0x40(%rbx)
testq %rax, %rax
js 0x2adb
cvtsi2ss %rax, %xmm0
jmp 0x2af0
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
leaq 0x8(%rbx), %r14
movq 0x38(%rbx), %rax
testq %rax, %rax
js 0x2b04
cvtsi2ss %rax, %xmm1
jmp 0x2b19
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rbx)
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae
movsd 0x48(%rbx), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d62
movsd %xmm0, 0x50(%rbx)
movq %rsp, %rdi
callq 0x425e
movq 0x10(%rbx), %rax
movl -0x4(%rax), %eax
movl %eax, 0x44(%rbx)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae
movq 0x10(%rbx), %rdx
subq 0x8(%rbx), %rdx
sarq $0x2, %rdx
movss 0x2489(%rip), %xmm0     # 0x5008
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3dfc
movsd %xmm0, 0x60(%rbx)
movq %r15, %rdi
callq 0x425e
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae
movq 0x10(%rbx), %rdx
subq 0x8(%rbx), %rdx
sarq $0x2, %rdx
movss 0x2451(%rip), %xmm0     # 0x500c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3dfc
movsd %xmm0, 0x58(%rbx)
movq %r15, %rdi
callq 0x425e
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae
movq 0x10(%rbx), %rdx
subq 0x8(%rbx), %rdx
sarq $0x2, %rdx
movss 0x2419(%rip), %xmm0     # 0x5010
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3dfc
movsd %xmm0, 0x68(%rbx)
movq %r15, %rdi
callq 0x425e
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x425e
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::qual_stats()
void qual_stats(void) {
            sort(per_read_qual.begin(), per_read_qual.end());
            qual_min = per_read_qual.front() - phred;
            qual_mean = (qual_sum / read_total) - phred;
            qual_std = get_std(per_read_qual, qual_mean);
            qual_max = per_read_qual.back() - phred;
            qual_25th = get_percentile(per_read_qual, per_read_qual.size(), 0.25) - phred;
            qual_median = get_percentile(per_read_qual, per_read_qual.size(), 0.50) - phred;
            qual_75th = get_percentile(per_read_qual, per_read_qual.size(), 0.75) - phred;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
movq 0x70(%rdi), %rdi
movq 0x78(%rbx), %rsi
callq 0x43a3
movq 0x70(%rbx), %rax
movsd (%rax), %xmm0
cvtsi2sdl 0xb8(%rbx), %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0xbc(%rbx)
movsd 0xc8(%rbx), %xmm0
movsd 0x38(%rbx), %xmm2
unpcklps 0x23a4(%rip), %xmm2     # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x23ac(%rip), %xmm2     # 0x5030
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
divsd %xmm3, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rbx)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x42f8
movsd 0xd0(%rbx), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42a2
movsd %xmm0, 0xf0(%rbx)
movq %r15, %rdi
callq 0x4810
movq 0x78(%rbx), %rax
movsd -0x8(%rax), %xmm0
cvtsi2sdl 0xb8(%rbx), %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0xc0(%rbx)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x42f8
movq 0x78(%rbx), %rdx
subq 0x70(%rbx), %rdx
sarq $0x3, %rdx
movss 0x22f1(%rip), %xmm0     # 0x5008
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4346
cvtsi2sdl 0xb8(%rbx), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0xe0(%rbx)
movq %r15, %rdi
callq 0x4810
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x42f8
movq 0x78(%rbx), %rdx
subq 0x70(%rbx), %rdx
sarq $0x3, %rdx
movss 0x22aa(%rip), %xmm0     # 0x500c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4346
cvtsi2sdl 0xb8(%rbx), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0xd8(%rbx)
movq %r15, %rdi
callq 0x4810
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x42f8
movq 0x78(%rbx), %rdx
subq 0x70(%rbx), %rdx
sarq $0x3, %rdx
movss 0x2265(%rip), %xmm0     # 0x5010
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4346
cvtsi2sdl 0xb8(%rbx), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0xe8(%rbx)
movq %r15, %rdi
callq 0x4810
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::get_std(std::vector<unsigned int, std::allocator<unsigned int>>, double)
double get_std(vector<unsigned int> array, double mean) {
            double temp = 0;
            for (unsigned int i = 0; i < read_total; i++) {
                temp += pow((array[i] - mean), 2);
            }
            return sqrt(temp / read_total);
        }

// Assembly:
movapd %xmm0, %xmm1
movq 0x38(%rdi), %rax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x3d92
movq (%rsi), %rdx
movl (%rdx,%rcx,4), %edx
cvtsi2sd %rdx, %xmm2
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incl %ecx
jmp 0x3d70
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2100
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::get_percentile(std::vector<unsigned int, std::allocator<unsigned int>>, unsigned long, float)
double get_percentile(vector<unsigned int> array, size_t size, float percentile) {
            if (size % 2 == 0) {
                int p = int(size * percentile - 1);
                return (array[p] + array[p]) / 2.0;
            } else {
                int p = int(size * percentile);
                return array[p];
            }
        }

// Assembly:
testq %rdx, %rdx
js 0x3e08
cvtsi2ss %rdx, %xmm1
jmp 0x3e1f
movq %rdx, %rax
shrq %rax
movl %edx, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm1
addss %xmm1, %xmm1
movq (%rsi), %rax
mulss %xmm0, %xmm1
testb $0x1, %dl
jne 0x3e4d
addss 0x11e1(%rip), %xmm1     # 0x5014
cvttss2si %xmm1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl %eax, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x11f4(%rip), %xmm0     # 0x5040
retq
cvttss2si %xmm1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cvtsi2sd %rax, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::get_std(std::vector<double, std::allocator<double>>, double)
double get_std(vector<double> array, double mean) {
            double temp = 0;
            for (unsigned int i = 0; i < read_total; i++) {
                temp += pow(((array[i]-phred) - mean), 2);
            }
            return sqrt(temp / read_total);
        }

// Assembly:
movapd %xmm0, %xmm1
movq 0x38(%rdi), %rax
cvtsi2sdl 0xb8(%rdi), %xmm2
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x42db
movq (%rsi), %rdx
movsd (%rdx,%rcx,8), %xmm3
subsd %xmm2, %xmm3
subsd %xmm1, %xmm3
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
incl %ecx
jmp 0x42b8
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2100
sqrtsd %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/smuething[P]dune-cxx11/16-shared_from_this.cc
// Function: main
int main()
{
  std::shared_ptr<A> p1(new A());
  std::shared_ptr<A> p2 = p1->shared_from_this();
  assert(p1 == p2);
  return 0;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
pushq $0x10
popq %rdi
callq 0x1070
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x12da
movq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1466
movq (%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x1221
leaq 0x18(%rsp), %rdi
callq 0x1254
leaq 0x8(%rsp), %rdi
callq 0x1254
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0xddc(%rip), %rdi       # 0x2004
leaq 0xdde(%rip), %rsi       # 0x200d
leaq 0xdee(%rip), %rcx       # 0x2024
pushq $0xc
popq %rdx
callq 0x1060
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1254
movq %rbx, %rdi
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/EarleyParser.cpp
// Function: EarleyParser::~EarleyParser()
EarleyParser::~EarleyParser()
{
	for( unsigned int i = 0; i <= this->inputVector.size(); i++ )
	{
		//int j = 0;
		//cout << i << "  *****************************************************" << endl << "*****************************************************" << endl;
		for( vector<State*>::iterator it = this->earleyParserChart.at(i).begin(); it != this->earleyParserChart.at(i).end(); it++ )
		{
			//j++;
			delete *it;

		}
		//cout << endl << endl << "DELETED STATEs: " << j << endl << endl;

	}

	for( vector<Node*>::iterator it = this->returnVector.begin(); it != this->returnVector.end(); it++ )
	{
		delete *(it);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa780(%rip), %rax      # 0xcd08
movq %rax, (%rdi)
leaq 0x98(%rdi), %r15
leaq 0x80(%rdi), %r14
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0xa0(%rbx), %rax
subq 0x98(%rbx), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jb 0x25ef
movq %r14, %rdi
movq %r12, %rsi
callq 0x4b76
movq (%rax), %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x4b76
cmpq 0x8(%rax), %r13
je 0x25ea
movq (%r13), %rdi
testq %rdi, %rdi
je 0x25e4
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r13
jmp 0x25c4
incl %r12d
jmp 0x259c
leaq 0xb0(%rbx), %r12
movq 0xb0(%rbx), %r13
cmpq 0xb8(%rbx), %r13
je 0x261b
movq (%r13), %rdi
testq %rdi, %rdi
je 0x2615
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r13
jmp 0x25fd
movq %r12, %rdi
callq 0x528e
movq %r15, %rdi
callq 0x4ba2
movq %r14, %rdi
callq 0x4bce
leaq 0x48(%rbx), %rdi
callq 0x4eb6
addq $0x10, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f9a
jmp 0x2658
movq %rax, %rdi
callq 0x4b94
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/EarleyParser.cpp
// Function: EarleyParser::splitToVector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void EarleyParser::splitToVector
	(
		const std::string& inputString,
        std::vector<std::string>* outputVector,
        const std::string& separatorString,
        bool skipNullStrings
    )
{
    unsigned int pos = 0;
    outputVector->clear();

    while( pos < inputString.length() )
    {
        std::string next = inputString.substr( pos );
        unsigned int next_pos = next.find( separatorString );

        if( next_pos == static_cast<unsigned int> (std::string::npos) )
            next_pos = next.length();

        if( !skipNullStrings || next_pos > 0 )
        {
            std::string to_insert = next.substr( 0, next_pos );
            outputVector->push_back( to_insert );
        }

        pos += next_pos + separatorString.size();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, -0x2c(%rbp)
movq %rcx, %r15
movq %rdx, %rdi
movq %rsi, %r12
movq %rdx, -0x40(%rbp)
callq 0x4e6c
xorl %r13d, %r13d
leaq -0x60(%rbp), %r14
movq %r12, -0x38(%rbp)
movl %r13d, %r13d
cmpq 0x8(%r12), %r13
jae 0x2df8
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
pushq $-0x1
popq %rcx
callq 0x21e0
xorl %ebx, %ebx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x22f0
cmpl $-0x1, %eax
jne 0x2da6
movl -0x58(%rbp), %eax
testl %eax, %eax
sete %cl
testb %cl, -0x2c(%rbp)
jne 0x2de4
movq %r14, %rsi
movq %r15, %r12
movl %eax, %ebx
leaq -0x80(%rbp), %r15
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x21e0
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x4e7a
movq %r15, %rdi
callq 0x20f0
movq %r12, %r15
movq -0x38(%rbp), %r12
addq %rbx, %r13
addq 0x8(%r15), %r13
movq %r14, %rdi
callq 0x20f0
jmp 0x2d74
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20f0
jmp 0x2e18
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/EarleyParser.cpp
// Function: EarleyParser::stateExists(int, State*)
int EarleyParser::stateExists( int chartPosition, State* stateToCheck )
{
	for( vector<State*>::iterator it = this->earleyParserChart[ chartPosition ].begin(); it != this->earleyParserChart[ chartPosition ].end(); it++ )
	{
		if( (*it)->getNonTerminal() == stateToCheck->getNonTerminal() &&
			(*it)->getInputStringProgress() == stateToCheck->getInputStringProgress() &&
			(*it)->getProductionPointer() == stateToCheck->getProductionPointer() &&
			(*it)->getProductionProgress() == stateToCheck->getProductionProgress() )
		{
			cout << "[DEBUG]: found same state at position " << it - this->earleyParserChart[ chartPosition ].begin() << " of chart[" << chartPosition << "]" << endl;
			return ( it - this->earleyParserChart[ chartPosition ].begin());
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movslq %esi, %rcx
movq %rdi, -0x40(%rbp)
movq 0x80(%rdi), %rax
imulq $0x18, %rcx, %rcx
movq %rcx, -0x48(%rbp)
movq (%rax,%rcx), %r13
movq %r13, %r12
negq %r12
leaq -0x88(%rbp), %rbx
leaq -0x68(%rbp), %r14
movq -0x48(%rbp), %rcx
cmpq 0x8(%rax,%rcx), %r13
je 0x43c9
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x780c
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x780c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e25
testb %al, %al
je 0x42e3
movq %r12, %r15
movq %rbx, %r14
movq (%r13), %rdi
callq 0x7802
movl %eax, %r12d
movq -0x30(%rbp), %rdi
callq 0x7802
cmpl %eax, %r12d
movq %r14, %rbx
movq %r15, %r12
jne 0x42e3
movq (%r13), %rdi
callq 0x7828
movq %rax, %r12
movq -0x30(%rbp), %rdi
callq 0x7828
cmpq %rax, %r12
movq %r14, %rbx
movq %r15, %r12
je 0x430f
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
addq $0x8, %r13
movq -0x40(%rbp), %rax
movq 0x80(%rax), %rax
addq $-0x8, %r12
jmp 0x4267
movq (%r13), %rdi
callq 0x785a
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x785a
movl %eax, %ebx
leaq -0x68(%rbp), %rdi
callq 0x20f0
movq %r14, %r12
leaq -0x68(%rbp), %r14
movq %r12, %rdi
callq 0x20f0
cmpl %ebx, -0x38(%rbp)
movq %r12, %rbx
movq %r15, %r12
jne 0x42f7
movq 0x8c88(%rip), %rdi      # 0xcfd8
leaq 0x407b(%rip), %rsi      # 0x83d2
callq 0x21c0
movq -0x40(%rbp), %rbx
movq 0x80(%rbx), %rcx
movq -0x48(%rbp), %r15
movq (%rcx,%r15), %rsi
addq %r12, %rsi
negq %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x21b0
leaq 0x4071(%rip), %rsi      # 0x83f9
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
movl -0x34(%rbp), %esi
callq 0x22b0
leaq 0x3c9b(%rip), %rsi      # 0x803d
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x2100
movq 0x80(%rbx), %rax
addq (%rax,%r15), %r12
negq %r12
shrq $0x3, %r12
movl %r12d, %eax
jmp 0x43cc
pushq $-0x1
popq %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x43ec
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x20f0
leaq -0x88(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/Node.cpp
// Function: Node::Node(Node*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>>>, Production*, float)
Node::Node( Node* father, string grammarElement, vector<string> nodeProduction, Production* productionPointer, float productionProbability )
{
	this->father = father;

	this->grammarElement = grammarElement;
	this->production = nodeProduction;
	this->productionProbability = productionProbability;

	this->productionPointer = productionPointer;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movss %xmm0, -0x2c(%rbp)
movq %r8, %r14
movq %rcx, %r13
movq %rdi, %r15
leaq 0x681e(%rip), %rax      # 0xcd38
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x28(%rdi), %r12
andq $0x0, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
leaq 0x48(%rdi), %rax
movq %rax, -0x38(%rbp)
movups %xmm0, 0x48(%rdi)
andq $0x0, 0x58(%rdi)
movq %rsi, 0x40(%rdi)
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x2120
movq %r12, %rdi
movq %r13, %rsi
callq 0x734a
movss -0x2c(%rbp), %xmm0
movss %xmm0, 0x60(%r15)
movq %r14, 0x68(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rdi
callq 0x528e
movq %r12, %rdi
callq 0x4ba2
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/Node.cpp
// Function: Node::print(bool)
float Node::print( bool printProbabilities )
{
	float prob = -1;

	cout << "Node [" << this->grammarElement << "]{";

	if( printProbabilities == true ){

		if( this->children.size() == 0 )
		{
			/*
			 * we are in a leaf node
			 */
			prob = this->productionProbability;

		}else{

			prob = this->productionProbability;
			for( vector<Node*>::iterator it = this->children.begin(); it != this->children.end(); it++ )
			{
				prob = prob * (*it)->print( printProbabilities );
			}
		}
	}else{

		for( vector<Node*>::iterator it = this->children.begin(); it != this->children.end(); it++ )
		{
			prob = (*it)->print( printProbabilities );
		}
	}
	cout << "prob [" << prob << "]}";

	return prob;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x5d69(%rip), %rdi      # 0xcfd8
leaq 0x1513(%rip), %rsi      # 0x8789
callq 0x21c0
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2190
leaq 0x1502(%rip), %rsi      # 0x8790
movq %rax, %rdi
callq 0x21c0
testl %r14d, %r14d
je 0x72de
movq 0x48(%rbx), %r15
movq 0x50(%rbx), %rax
movss 0x60(%rbx), %xmm0
cmpq %r15, %rax
je 0x7305
movss %xmm0, -0x1c(%rbp)
pushq $0x1
popq %r14
cmpq %rax, %r15
je 0x7300
movq (%r15), %rdi
movl %r14d, %esi
callq 0x7258
movss -0x1c(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x1c(%rbp)
addq $0x8, %r15
movq 0x50(%rbx), %rax
jmp 0x72b6
movq 0x48(%rbx), %r14
movss 0xd1e(%rip), %xmm0      # 0x8008
cmpq 0x50(%rbx), %r14
je 0x7305
movq (%r14), %rdi
xorl %esi, %esi
callq 0x7258
addq $0x8, %r14
jmp 0x72ea
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movq 0x5cc7(%rip), %rdi      # 0xcfd8
leaq 0x147b(%rip), %rsi      # 0x8793
callq 0x21c0
movq %rax, %rdi
movss -0x1c(%rbp), %xmm0
callq 0x2160
leaq 0x1469(%rip), %rsi      # 0x879a
movq %rax, %rdi
callq 0x21c0
movss -0x1c(%rbp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/State.cpp
// Function: State::State(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Production*, State*, int, int)
State::State( string nonTerminal, Production* productionPointer, State* backtraceState, int inputStringProgress, int productionProgress )
: productionProgress(0), printed(false)
{

	//cout << endl << endl << "!!!!!!!!!!!![DEBUG]: OTHER CONSTRUCTOR CALLED!!!!!!!!!!!!!" << endl << endl << endl;

	this->nonTerminal = nonTerminal;
	this->productionPointer = productionPointer;

	this->backtraceStateVector.push_back( backtraceState );

	this->inputStringProgress = inputStringProgress;
	this->productionProgress = productionProgress;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, -0x2c(%rbp)
movl %r8d, %r14d
movq %rdx, %rbx
movq %rdi, %r15
movq %rcx, -0x38(%rbp)
leaq 0x5663(%rip), %rax      # 0xcd98
movq %rax, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdi), %r12
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x30(%rdi), %r13
movb %al, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x3c(%rdi)
movq %r12, %rdi
callq 0x2120
movq %rbx, 0x28(%r15)
leaq -0x38(%rbp), %rsi
movq %r13, %rdi
callq 0x4de0
movl %r14d, 0x4c(%r15)
movl -0x2c(%rbp), %eax
movl %eax, 0x48(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0x52dc
movq %r12, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/State.cpp
// Function: State::getProductionPointer() const
Production* State::getProductionPointer() const
{
	if( this->productionPointer == NULL ){
		cout << "[ERROR]: production pointer is null" << endl;
		exit(1);
	}

	return this->productionPointer;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x7832
retq
pushq %rbp
movq %rsp, %rbp
movq 0x579b(%rip), %rdi      # 0xcfd8
leaq 0xf6c(%rip), %rsi       # 0x87b0
callq 0x21c0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteorr[P]EarleyParser/State.cpp
// Function: State::isComplete()
bool State::isComplete()
{
	if( this->getProductionProgress() == this->getProductionPointer()->getProductionContent().size() )
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movslq 0x48(%rdi), %r14
callq 0x7828
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x76d8
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
cmpq %r14, %rax
sete %r14b
movq %rbx, %rdi
callq 0x4ba2
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: printTokens(int)
void printTokens(int ntoken)
{
    //todo
		  switch (ntoken) {
                  
              case LBRACE:
                  printf("lb ");break;
              case RBRACE:
                  printf("rb ");break;
              case IDENTIFIER:
                  printf("x ");
                  break;
              case PRINT:
                  printf("p ");break;
                  break;
              case LOOP:
                  printf("l ");break;
                  break;
              case FUNCTION:
                  printf("f ");
                  break;
              case ASSIGN:
                  printf("= ");
                  break;
              case NUMBER:
                  printf("n ");
                  break;
              default:
                  printf("Syntax error in line %d\n",yylineno);
          }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decl %edi
cmpl $0x7, %edi
ja 0x24e5
leaq 0x2b76(%rip), %rax      # 0x5004
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x2b86(%rip), %rdi      # 0x5024
jmp 0x24dd
leaq 0x2b91(%rip), %rdi      # 0x5038
jmp 0x24dd
leaq 0x2b82(%rip), %rdi      # 0x5032
jmp 0x24dd
leaq 0x2b76(%rip), %rdi      # 0x502f
jmp 0x24dd
leaq 0x2b6a(%rip), %rdi      # 0x502c
jmp 0x24dd
leaq 0x2b5d(%rip), %rdi      # 0x5028
jmp 0x24dd
leaq 0x2b61(%rip), %rdi      # 0x5035
jmp 0x24dd
leaq 0x2b5e(%rip), %rdi      # 0x503b
xorl %eax, %eax
popq %rbp
jmp 0x2040
leaq 0x5ccc(%rip), %rax      # 0x81b8
movl (%rax), %esi
leaq 0x2b49(%rip), %rdi      # 0x503e
xorl %eax, %eax
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: read_table(_IO_FILE*, char (*) [16])
void read_table(FILE* fp, char x[row][col]){
    
    char buf[300];
    
    int i = 0;
    size_t n;
    fgets(buf,sizeof(buf),fp);
    printf("\t\t\t\t\t\t------------TABLE----------\n\n");
    puts(buf);
         printf("\n");
    
    while(fgets(buf,sizeof(buf),fp))
    {
        char *p = strtok(buf,"\t");
        while( p != NULL)
        {
            n = strlen(p);
            if(i>= row && n> col)
                break;
            strcpy(x[i],p);
            i++;
            p = strtok(NULL,"\t");
        }
    }

    
   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, -0x30(%rbp)
movq %rdi, %rdx
leaq -0x170(%rbp), %rbx
movq %rbx, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq %rdx, -0x38(%rbp)
callq 0x2270
leaq 0x2b20(%rip), %rdi      # 0x50b0
callq 0x2250
movq %rbx, %rdi
callq 0x2250
pushq $0xa
popq %rdi
callq 0x21f0
xorl %r15d, %r15d
leaq 0x2ab5(%rip), %r12      # 0x5064
movq %rbx, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq -0x38(%rbp), %rdx
callq 0x2270
testq %rax, %rax
je 0x2626
movq %rbx, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2260
movq %rax, %rbx
movslq %r15d, %r15
movq %r15, %r13
shlq $0x4, %r13
addq -0x30(%rbp), %r13
testq %rbx, %rbx
je 0x2621
movq %rbx, %rdi
callq 0x20e0
cmpq $0x1f4, %r15            # imm = 0x1F4
jl 0x2600
cmpq $0x10, %rax
ja 0x2621
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2140
incq %r15
xorl %edi, %edi
movq %r12, %rsi
callq 0x2260
movq %rax, %rbx
addq $0x10, %r13
jmp 0x25e4
movq %r14, %rbx
jmp 0x25af
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: getSym(char)
int getSym(char sym){
    for (int i = 0; i<=MAX_SYMBOLS; i++)
        if(tokens[i] == sym)
            return i;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x5b4c(%rip), %rdx      # 0x81a0
cmpq $0xf, %rcx
je 0x2667
cmpb %dil, (%rcx,%rdx)
je 0x2665
incq %rcx
jmp 0x2654
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: states(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int states(string fname) {
    int number_of_lines = 0;
    string line;
    ifstream myfile(fname);
    
    while (std::getline(myfile, line))
        ++number_of_lines;
    
    return number_of_lines;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rsi
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x240(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2290
xorl %ebx, %ebx
leaq -0x240(%rbp), %r14
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2a0b
incl %ebx
jmp 0x29ee
leaq -0x240(%rbp), %rdi
callq 0x2070
leaq -0x38(%rbp), %rdi
callq 0x20f0
movl %ebx, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2a44
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x2070
leaq -0x38(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: print_table_to_console(char (*) [16])
void print_table_to_console(char x[row][col]){
    
    
    
    printf("\t");
    for (int st=1; st<=MAX_STATES; st++) {
        for (int sy = 1; sy<=MAX_SYMBOLS; sy++) {
            printf("%s\t",x[getValueFromMatrix(st, sy)]);
        }
        printf("\n");
        printf("\t");

    }


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x9
popq %rdi
callq 0x21f0
pushq $0x1
popq %r14
leaq 0x25bd(%rip), %r12      # 0x5062
movslq 0x5778(%rip), %rax      # 0x8224
cmpq %rax, %r14
jg 0x2b0c
movq %r14, %r13
movabsq $0xf00000000, %rax      # imm = 0xF00000000
imulq %rax, %r13
movabsq $-0xf00000000, %rax     # imm = 0xFFFFFFF100000000
addq %rax, %r13
sarq $0x1c, %r13
addq %rbx, %r13
pushq $0x10
popq %r15
cmpq $0xf0, %r15
je 0x2af7
leaq (%r15,%r13), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2040
addq $0x10, %r15
jmp 0x2ada
pushq $0xa
popq %rdi
callq 0x21f0
pushq $0x9
popq %rdi
callq 0x21f0
incq %r14
jmp 0x2aa5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ronakshah725[P]SLR1Parser_C/parser1.cpp
// Function: main
int main(int argc, char *argv[] )
{
    if ( argc != 2 ) /* argc should be 2 for correct execution */
    {
        
        printf( "usage: %s filename", argv[0] );
    }
    else
    {
        char x[row][col];
        FILE *file = fopen( argv[1], "r" );
        MAX_STATES = states(argv[1]);
        MAX_STATES -= 2;

        if ( file == 0 )
        {
            printf( "Could not open file\n" );
        }
        else
        {
            //start_parser();
            run(x, file);
        }
    }
 return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1f70, %rsp           # imm = 0x1F70
movq %rsi, %r14
cmpl $0x2, %edi
jne 0x2bc2
movq 0x8(%r14), %rdi
leaq 0x2507(%rip), %rsi      # 0x5079
callq 0x2190
movq %rax, %rbx
movq 0x8(%r14), %rsi
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x29af
movl %eax, 0x5688(%rip)      # 0x8224
leaq -0x38(%rbp), %rdi
callq 0x20f0
addl $-0x2, 0x5678(%rip)     # 0x8224
testq %rbx, %rbx
je 0x2bd5
leaq -0x1f80(%rbp), %rdi
movq %rbx, %rsi
callq 0x2b1b
jmp 0x2be1
movq (%r14), %rsi
leaq 0x249a(%rip), %rdi      # 0x5066
xorl %eax, %eax
callq 0x2040
jmp 0x2be1
leaq 0x2517(%rip), %rdi      # 0x50f3
callq 0x2250
xorl %eax, %eax
addq $0x1f70, %rsp           # imm = 0x1F70
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sangwoojun[P]rv32emulator/cachesim.cpp
// Function: cache_peek(unsigned int, int)
int cache_peek(uint32_t addr, int bytes) {
	uint32_t idx = cache_calc_idx(addr);
	uint32_t tag = cache_calc_tag(addr);

	if ( cache_calc_idx(addr) != cache_calc_idx(addr+bytes-1) ) {
		printf( "ERROR: request spans line boundary\n" );
	}

	for ( int i = 0; i < CACHE_WAYS; i++ ) {
		if ( g_tags[idx][i] == tag && is_flag_valid(g_flags[idx][i]) ) return i;
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
leal (%rdi,%rsi), %eax
decl %eax
movl %edi, %ebx
shrl $0x2, %ebx
movl $0xff, %ecx
andl %ecx, %ebx
shrl $0xa, %r14d
shrl $0x2, %eax
andl %ecx, %eax
cmpl %eax, %ebx
je 0x25db
leaq 0x4a2e(%rip), %rdi      # 0x7004
callq 0x2300
leaq 0xb02e(%rip), %rax      # 0xd610
cmpl %r14d, (%rax,%rbx,4)
jne 0x25f7
leaq 0xb421(%rip), %rcx      # 0xda10
xorl %eax, %eax
testb $0x1, (%rbx,%rcx)
jne 0x25fa
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sangwoojun[P]rv32emulator/cachesim.cpp
// Function: cache_write(unsigned int, unsigned int, int)
void cache_write(uint32_t addr, uint32_t data, int bytes) {
	uint32_t idx = cache_calc_idx(addr);
	uint32_t tag = cache_calc_tag(addr);
	uint32_t wid = cache_calc_word_idx(addr);
	int boff = (addr&(0x3));
	int way = cache_peek(addr,bytes);
	if ( way < 0 ) {
		return;
	}
	

	switch ( bytes ) {
		case 1: {
			uint8_t* cl = (((uint8_t*)&(g_cache[idx][way][wid]))+boff);
			*cl = (data&(0xff));
			break;
		}
		case 2: {
			uint8_t* cl = (((uint8_t*)&(g_cache[idx][way][wid]))+boff);
			*(uint16_t*)cl = (data&(0xffff));
			break;
		}
		case 4: {
			g_cache[idx][way][wid] = data;
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %r14d
movl %edx, %esi
callq 0x25a7
testl %eax, %eax
js 0x2680
movl %r14d, %ecx
shrl $0x2, %ecx
movzbl %cl, %ecx
cmpl $0x4, %r15d
je 0x266e
andl $0x3, %r14d
cmpl $0x2, %r15d
je 0x2654
cmpl $0x1, %r15d
jne 0x2680
movl %eax, %eax
movl %ecx, %ecx
leaq 0xabca(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%rax,4), %rax
movb %bl, (%r14,%rax)
jmp 0x2680
movl %eax, %eax
movl %ecx, %ecx
leaq 0xabb1(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%rax,4), %rax
movw %bx, (%r14,%rax)
jmp 0x2680
movl %eax, %eax
movl %ecx, %ecx
leaq 0xab97(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
movl %ebx, (%rcx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sangwoojun[P]rv32emulator/cachesim.cpp
// Function: cache_read(unsigned int, int)
uint32_t cache_read(uint32_t addr, int bytes) {
	uint32_t idx = cache_calc_idx(addr);
	uint32_t tag = cache_calc_tag(addr);
	uint32_t wid = cache_calc_word_idx(addr);
	int boff = (addr&(0x3));
	int way = cache_peek(addr,bytes);
	if ( way < 0 ) {
		return 0xffffffff;
	}
	
	uint32_t ret = 0xffffffff;
	switch ( bytes ) {
		case 1: {
			uint8_t* cl = (((uint8_t*)&(g_cache[idx][way][wid]))+boff);
			ret = *cl;
			break;
		}
		case 2: {
			uint8_t* cl = (((uint8_t*)&(g_cache[idx][way][wid]))+boff);
			ret = *(uint16_t*)cl;
			break;
		}
		case 4: {
			ret = g_cache[idx][way][wid];
			break;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
callq 0x25a7
movl %eax, %ecx
pushq $-0x1
popq %rax
testl %ecx, %ecx
js 0x2706
movl %ebx, %edx
shrl $0x2, %edx
movzbl %dl, %edx
cmpl $0x4, %r14d
je 0x26f4
andl $0x3, %ebx
cmpl $0x2, %r14d
je 0x26db
cmpl $0x1, %r14d
jne 0x2706
movl %ecx, %eax
movl %edx, %ecx
leaq 0xab43(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%rax,4), %rax
movzbl (%rbx,%rax), %eax
jmp 0x2706
movl %ecx, %eax
movl %edx, %ecx
leaq 0xab2a(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%rax,4), %rax
movzwl (%rbx,%rax), %eax
jmp 0x2706
movl %ecx, %eax
movl %edx, %ecx
leaq 0xab11(%rip), %rdx      # 0xd210
leaq (%rdx,%rcx,4), %rcx
movl (%rcx,%rax,4), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sangwoojun[P]rv32emulator/cachesim.cpp
// Function: cache_update(unsigned int, unsigned int)
void cache_update(uint32_t addr, uint32_t data) {
	uint32_t idx = cache_calc_idx(addr);
	uint32_t tag = cache_calc_tag(addr);
	uint32_t wid = cache_calc_word_idx(addr);
	int way = cache_peek(addr,4);
	if ( way < 0 ) {
		for ( int i = 0; i < CACHE_WAYS; i++ ) {
			if ( !is_flag_valid(g_flags[idx][i]) ) {
				way = i;
				break;
			}
		}
	}

	g_cache[idx][way][wid] = data;
	g_tags[idx][way] = tag;
	g_flags[idx][way] = set_flag_valid(g_flags[idx][way]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movl %edi, %ebx
movl %edi, %eax
shrl $0x2, %eax
movzbl %al, %r15d
pushq $0x4
popq %rsi
callq 0x25a7
leaq 0xb2de(%rip), %rcx      # 0xda10
testl %eax, %eax
jns 0x2740
xorl %edx, %edx
testb $0x1, (%r15,%rcx)
cmovel %edx, %eax
shrl $0xa, %ebx
cltq
leal (,%r15,4), %edx
leaq 0xaabc(%rip), %rsi      # 0xd210
addq %rdx, %rsi
movl %r14d, (%rsi,%rax,4)
leaq 0xaeae(%rip), %rsi      # 0xd610
addq %rdx, %rsi
movl %ebx, (%rsi,%rax,4)
addq %r15, %rcx
orb $0x1, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sangwoojun[P]rv32emulator/cachesim.cpp
// Function: cache_flush(unsigned int, unsigned char*)
void cache_flush(uint32_t addr, uint8_t* mem) {
	uint32_t idx = cache_calc_idx(addr);
	//uint32_t wid = cache_calc_word_idx(addr);

	//choose way
	//int way = rand()%CACHE_WAYS;
	int way = 0;

	if (!is_flag_valid(g_flags[idx][way])) return;
	uint32_t tag = g_tags[idx][way];

	//write to mem
	//set flag to empty
	for ( int i = 0; i < CACHE_LINE_WORD; i++ ) {
		uint32_t data = g_cache[idx][way][i];
		uint32_t maddr = cache_reassemble_addr(idx, tag) + (i*4);
		*(uint32_t*)(mem+maddr) = data;
		g_flags[idx][way] = set_flag_invalid(g_flags[idx][way]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
shrl $0x2, %edi
movzbl %dil, %eax
leaq 0xb284(%rip), %rcx      # 0xda10
testb $0x1, (%rax,%rcx)
je 0x27bb
leal (,%rax,4), %edx
leaq 0xae70(%rip), %rdi      # 0xd610
movl (%rdx,%rdi), %edi
leaq 0xaa66(%rip), %r8       # 0xd210
movl (%rdx,%r8), %edx
shll $0xa, %edi
leal (%rdi,%rax,4), %edi
movl %edx, (%rsi,%rdi)
andb $-0x2, (%rax,%rcx)
popq %rbp
retq
nopl (%rax)