LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genPromotions(int, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::Color, nnchesslib::BitBoard)
void nnchesslib::genPromotions(int pawnIndex, MoveList& moveList, Color color, BitBoard pawns)
{
    // counting the amount of attacked pawns.
    int count = __builtin_popcountll(pawns.board);

    for(int _ = 0; _ < count; _++)
    {
        int index = popLsb(pawns.board);
        
        Move queen = createMove(pawnIndex, index, QUEEN);
        Move knight = createMove(pawnIndex, index, KNIGHT);
        Move bishop = createMove(pawnIndex, index, BISHOP);
        Move rook = createMove(pawnIndex, index, ROOK);
        moveList.push_back(queen);
        moveList.push_back(knight);
        moveList.push_back(bishop);
        moveList.push_back(rook);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, -0x3c(%rbp)
testq %rcx, %rcx
je 0x844c
movq %rcx, %rbx
movq %rsi, %r14
movq %rcx, %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq %rax, %rcx
movq %rbx, %rax
subq %rcx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %r13 # imm = 0x101010101010101
imulq %rax, %r13
shrq $0x38, %r13
cmpl $0x2, %r13d
movl $0x1, %eax
cmovbl %eax, %r13d
movl -0x3c(%rbp), %r15d
bsfq %rbx, %r12
movq %rbx, %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbl %eax, %r12d
movl %r15d, %edi
movl %r12d, %esi
movl $0x4, %edx
callq 0x6a96
movl %eax, -0x38(%rbp)
movl %r15d, %edi
movl %r12d, %esi
movl $0x1, %edx
callq 0x6a96
movl %eax, -0x34(%rbp)
movl %r15d, %edi
movl %r12d, %esi
movl $0x2, %edx
callq 0x6a96
movl %eax, -0x30(%rbp)
movl %r15d, %edi
movl %r12d, %esi
movl $0x3, %edx
callq 0x6a96
movl %eax, -0x2c(%rbp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x83c4
movl -0x38(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x83d0
movq %r14, %rdi
leaq -0x38(%rbp), %rdx
callq 0x845c
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x83e9
movl -0x34(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x83f5
movq %r14, %rdi
leaq -0x34(%rbp), %rdx
callq 0x845c
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x840e
movl -0x30(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x841a
movq %r14, %rdi
leaq -0x30(%rbp), %rdx
callq 0x845c
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x8433
movl -0x2c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x843f
movq %r14, %rdi
leaq -0x2c(%rbp), %rdx
callq 0x845c
andq -0x48(%rbp), %rbx
decl %r13d
jne 0x8347
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/rays.cpp
// Function: nnchesslib::Rays::initRays()
void Rays::initRays()
{
    for(int sq = 0; sq < 64; sq++)
    {
        rays[NORTH][sq] = 0x0101010101010100ULL << sq;

        rays[EAST][sq] = 2 * (((U64)1 << (sq | 7)) - ((U64)1 << sq));

        rays[SOUTH][sq] = 0x0080808080808080ULL >> (63 - sq);

        rays[WEST][sq] = ((U64)1 << sq) - ((U64)1 << (sq & 56)) ;

        rays[NORTH_WEST][sq] = northWest(0x102040810204000ULL, 7 - file(sq)) << (rank(sq) * 8);

        rays[NORTH_EAST][sq] = northEast(0x8040201008040200ULL, file(sq)) << (rank(sq) * 8);

        rays[SOUTH_WEST][sq] = northWest(0x40201008040201ULL, 7 - file(sq)) >> ((7 - rank(sq)) * 8);

        rays[SOUTH_EAST][sq] = northEast(0x2040810204080ULL, file(sq)) >> ((7 - rank(sq)) * 8);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movabsq $-0x7fbfdfeff7fbfe00, %rdx # imm = 0x8040201008040200
movabsq $0x40201008040201, %rbx # imm = 0x40201008040201
movb $0x7, %r8b
movabsq $0x2040810204080, %r9   # imm = 0x2040810204080
xorl %eax, %eax
leaq 0x2868c7(%rip), %r11    # 0x28eec0
movabsq $0xfcf8f0e0c08000, %r14 # imm = 0xFCF8F0E0C08000
movabsq $0x3f1f0f07030100, %r15 # imm = 0x3F1F0F07030100
movabsq $0x80c0e0f0f8fc00, %r12 # imm = 0x80C0E0F0F8FC00
movabsq $0x103070f1f3f00, %r13  # imm = 0x103070F1F3F00
movl %eax, %esi
andl $0x7, %esi
movabsq $0x101010101010100, %rdi # imm = 0x101010101010100
movl %eax, %ecx
shlq %cl, %rdi
movq %rdi, (%r11,%rax,8)
andb $-0x8, %cl
movl $0x80, %edi
shlq %cl, %rdi
movl $0x1, %r10d
movl %eax, %ecx
shlq %cl, %r10
movzbl %r8b, %r8d
andl $0x7, %r8d
subq %r10, %rdi
addq %rdi, %rdi
movq %rdi, 0x200(%r11,%rax,8)
notb %cl
movabsq $0x80808080808080, %rdi # imm = 0x80808080808080
shrq %cl, %rdi
movq %rdi, 0x400(%r11,%rax,8)
movl %eax, %ecx
andb $0x38, %cl
movq $-0x1, %rdi
shlq %cl, %rdi
addq %r10, %rdi
movq %rdi, 0x600(%r11,%rax,8)
movabsq $0x102040810204000, %rdi # imm = 0x102040810204000
cmpl $0x7, %esi
je 0x86b2
movl %r8d, %ecx
shrq %rdi
andq %r13, %rdi
decl %ecx
jne 0x86a8
movl %eax, %ecx
andl $0x38, %ecx
shlq %cl, %rdi
movq %rdi, 0xa00(%r11,%rax,8)
movq %rdx, %rdi
testl %esi, %esi
je 0x86da
movl %esi, %r10d
movq %rdx, %rdi
addq %rdi, %rdi
andq %r12, %rdi
decl %r10d
jne 0x86cf
shlq %cl, %rdi
movq %rdi, 0x800(%r11,%rax,8)
movq %rbx, %rdi
cmpl $0x7, %esi
je 0x86fd
movl %r8d, %ecx
movq %rbx, %rdi
shrq %rdi
andq %r15, %rdi
decl %ecx
jne 0x86f3
movl %eax, %ecx
notl %ecx
andl $0x38, %ecx
shrq %cl, %rdi
movq %rdi, 0xe00(%r11,%rax,8)
movq %r9, %rdi
testl %esi, %esi
je 0x8723
movq %r9, %rdi
addq %rdi, %rdi
andq %r14, %rdi
decl %esi
jne 0x8719
shrq %cl, %rdi
movq %rdi, 0xc00(%r11,%rax,8)
incq %rax
addb $0x7, %r8b
cmpq $0x40, %rax
jne 0x8621
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/utils.cpp
// Function: nnchesslib::countBits(unsigned long long)
int nnchesslib::countBits(U64 n)
{
    int output = 0;
    while (n != 0)
    {
        n &= (n - 1);
        output++;
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testq %rdi, %rdi
je 0x87ca
leaq -0x1(%rdi), %rcx
incl %eax
andq %rcx, %rdi
jne 0x87bf
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/utils.cpp
// Function: nnchesslib::getSquareString[abi:cxx11](int)
std::string nnchesslib::getSquareString(int square)
{
    assert(square >= 0 && square <= 63);
    int file = square % 8;
    int rank = square / 8 + 1;

    const char* files = "abcdefgh";

    return files[file] + std::to_string(rank);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x40, %esi
jae 0x890e
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %eax
andl $0x7, %eax
shrl $0x3, %r14d
incl %r14d
leaq 0x124d(%rip), %rcx      # 0x9aaf
movsbl (%rax,%rcx), %r15d
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %r12
movl $0x1, %esi
movq %r12, %rdi
movl $0x2d, %edx
callq 0x2190
movq (%r12), %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x6615
movl $0x1, %edx
movq %r12, %rdi
xorl %esi, %esi
movl %r15d, %ecx
callq 0x22b0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x88ca
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x88d0
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x88fc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1147(%rip), %rdi      # 0x9a5c
leaq 0x115c(%rip), %rsi      # 0x9a78
leaq 0x115f(%rip), %rcx      # 0x9a82
movl $0x29, %edx
callq 0x20c0
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8945
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/ipasir-check-conflict/ipasir-check-conflict.cc
// Function: learnhook(void*, int*)
void learnhook(void * state, int * clause) {
  if(!clause) return;
  int len = 0;
  while( clause[len] != 0 ) ++len;
  std::cout << "c learned clause of size " << len << std::endl;
}

// Assembly:
testq %rsi, %rsi
je 0x285b
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
incl %ebx
cmpl $0x0, (%rsi)
leaq 0x4(%rsi), %rsi
jne 0x27fa
movq 0x157bc(%rip), %r14     # 0x17fc8
leaq 0xe7f1(%rip), %rsi      # 0x11004
movl $0x19, %edx
movq %r14, %rdi
callq 0x21b0
movq %r14, %rdi
movl %ebx, %esi
callq 0x2290
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20f0
retq
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/ipasir-check-conflict/./SATSolver.h
// Function: SATSolver::SATSolver()
SATSolver() : ipasirSolver(0), maxVar(0) {
    IPASIR( ipasirSolver = ipasir_init(); );
    IPASIR( std::cerr << "initialized IPASIR solver: " << std::string(ipasir_signature()) << std::endl; );
#ifndef HAVE_IPASIR
    std::cerr << "error: trying to use IPASIR solver without being compiled for ipasir, abort" << std::endl;
    exit (1);
#endif
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq $0x0, (%rdi)
movl $0x0, 0x8(%rdi)
callq 0x3738
movq %rax, (%rbx)
movq 0x14feb(%rip), %rbx     # 0x17ff0
leaq 0xe186(%rip), %rsi      # 0x11192
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x21b0
callq 0x3730
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3304
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3087
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30ad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/ipasir-check-conflict/./SATSolver.h
// Function: SATSolver::addClause(std::vector<int, std::allocator<int>>&)
void addClause(std::vector<int>& lits) {
    for( int i = 0 ; i<lits.size(); ++ i ) {
      IPASIR( ipasir_add(ipasirSolver, lits[i]); );
      maxVar = lits[i] > maxVar ? lits[i] : maxVar;
      maxVar = -lits[i] > maxVar ? -lits[i] : maxVar;
    }
    IPASIR( ipasir_add(ipasirSolver, 0); );
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x310f
movq %rsi, %r14
xorl %r15d, %r15d
movq (%rbx), %rdi
movl (%rax,%r15,4), %esi
callq 0x37a9
movq (%r14), %rax
movl (%rax,%r15,4), %ecx
movl 0x8(%rbx), %edx
cmpl %edx, %ecx
cmovgl %ecx, %edx
movl %edx, 0x8(%rbx)
xorl %ecx, %ecx
subl (%rax,%r15,4), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, 0x8(%rbx)
incq %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
ja 0x30cd
movq (%rbx), %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x37a9
// File: /workspace/github_cpp_makefile_star2_O1/henrixh[P]shittydsa/examples/../src/primesieve.h
// Function: primesieve::primesieve(unsigned long)
primesieve(ul size) {
    p.flip();
    p[0] = false;
    ul increment = 3;

    ul limit = (ul)sqrt((double)size);
    while(increment < limit) {
      for(ul i = increment*increment; i < size; i += increment*2) {
        p[i/2] = false;
      }

      do {
        increment += 2;
      } while(increment < limit && !p[increment/2]);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movl $0x1e848, %edx          # imm = 0x1E848
xorl %esi, %esi
callq 0x1030
notq (%r14,%r15,8)
incq %r15
cmpq $0x3d09, %r15           # imm = 0x3D09
jne 0x125e
andb $-0x2, (%r14)
movq %rbx, %xmm1
punpckldq 0xd91(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xd99(%rip), %xmm1      # 0x2020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x12a3
sqrtsd %xmm0, %xmm0
jmp 0x12a8
callq 0x1050
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0xd78(%rip), %xmm0      # 0x2030
cvttsd2si %xmm0, %rax
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rcx, %rax
cmpq $0x4, %rax
jb 0x1333
movl $0x3, %edx
movq %rdx, %rsi
imulq %rdx, %rsi
cmpq %rbx, %rsi
jae 0x1303
leaq (%rdx,%rdx), %rdi
movq %rsi, %r8
movl %esi, %ecx
shrb %cl
movq $-0x2, %r9
rolq %cl, %r9
shrq $0x7, %r8
andq %r9, (%r14,%r8,8)
addq %rdi, %rsi
cmpq %rbx, %rsi
jb 0x12e2
addq $0x2, %rdx
movq %rdx, %rcx
movq %rcx, %rdx
cmpq %rax, %rcx
jae 0x132e
movq %rdx, %rcx
shrq $0x7, %rcx
movq (%r14,%rcx,8), %rsi
movl %edx, %ecx
shrb %cl
movzbl %cl, %edi
leaq 0x2(%rdx), %rcx
btq %rdi, %rsi
jae 0x130a
cmpq %rax, %rdx
jb 0x12d2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/tclap-1.2.0/examples/test16.cpp
// Function: void TCLAP::SetString<std::vector<double, std::allocator<double>>>(std::vector<double, std::allocator<double>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SetString< std::vector<double> >(std::vector<double> &v,
                                          const std::string &s)
    {
        std::istringstream iss(s);
        while (iss) {
            double tmp;
            iss >> tmp;
            v.push_back(tmp);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x32d0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0x3599
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3120
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x357e
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3589
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa99c
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
je 0x3555
movq 0xba28(%rip), %rsi      # 0xefc8
leaq 0x10(%rsp), %rdi
callq 0x3250
leaq 0x88(%rsp), %rdi
callq 0x3090
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xb9fa(%rip), %rsi      # 0xefc8
leaq 0x10(%rsp), %rdi
callq 0x3250
leaq 0x88(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/fec_star.cpp
// Function: main
int main()
{

    printf("starting");

    const int NUM = 9;
    int *err = new int[NUM];
//    star *starItem = new star();
    star *starItem = new star(6,257,1024);

    starItem->setData();
    starItem->encoding();
    starItem->outputData();

    // 1 means fault data
    for(int i=0; i<NUM; i++)
    {
        err[i] = 0;
    }

//    err[0]=1;
//   err[1]=1;
    err[2]=1;
//    err[3]=1;

    starItem->setErrData(err);
    starItem->decoding();
    starItem->outputOrigin();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2d8a(%rip), %rdi      # 0x4014
xorl %eax, %eax
callq 0x1040
movl $0x24, %edi
callq 0x1030
movq %rax, %r14
movl $0x38, %edi
callq 0x1090
movq %rax, %rbx
movq %rax, %rdi
movl $0x6, %esi
movl $0x101, %edx            # imm = 0x101
movl $0x400, %ecx            # imm = 0x400
callq 0x1336
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movl $0x0, 0x20(%r14)
movl $0x1, 0x8(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x38, %esi
movq %rbx, %rdi
callq 0x10a0
movq %r14, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::star(int, int, int)
star(int disk, int prime, int dataLength )
    {
        p = prime;
        data_disk_nbr = disk;
        stripe_unit_size = dataLength;
        check_data_size = stripe_unit_size * sizeof(char) / sizeof(int);
        block_nbr = p - 1;
        block_size = check_data_size / block_nbr;
        allNum = data_disk_nbr + TOLERENCE;

        check_data = (int **)malloc(sizeof(int *) * (allNum));
        for(int i = 0; i < allNum; i++)
        {
            check_data[i] = (int *) malloc(sizeof(int )*check_data_size);
            memset(check_data[i],0,stripe_unit_size);
        }

        restarts = new int[allNum];
        for(int i = 0; i < allNum; i++)
        {
            restarts[i] = 0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %eax
movl %edx, %ecx
movq %rdi, %rbx
leaq 0x4a12(%rip), %rdx      # 0x5d60
movq %rdx, (%rdi)
movl %ecx, 0x10(%rdi)
movl %esi, 0x28(%rdi)
movl %eax, 0x30(%rdi)
sarl $0x2, %eax
movl %eax, 0x8(%rdi)
decl %ecx
movl %ecx, 0x14(%rdi)
cltd
idivl %ecx
movl %eax, 0xc(%rdi)
leal 0x3(%rsi), %r15d
movl %r15d, 0x2c(%rdi)
movslq %esi, %r14
leaq 0x18(,%r14,8), %rdi
callq 0x10d0
movq %rax, 0x18(%rbx)
cmpl $-0x2, %r14d
jl 0x13c4
xorl %r14d, %r14d
movslq 0x8(%rbx), %rdi
shlq $0x2, %rdi
callq 0x10d0
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movslq 0x30(%rbx), %rdx
xorl %esi, %esi
callq 0x1050
incq %r14
movslq 0x2c(%rbx), %r15
cmpq %r15, %r14
jl 0x1390
movslq %r15d, %rax
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x1030
movq %rax, 0x20(%rbx)
cmpl $0x0, 0x2c(%rbx)
jle 0x1411
movl 0x2c(%rbx), %ecx
cmpl $0x2, %ecx
movl $0x1, %edx
cmovgel %ecx, %edx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::encoding()
void encoding()
    {
        if( check_data_size % block_nbr != 0)
        {
            printf(" Cannot  striping. wrong DATA_LENGTH!\n");
            exit(1);
        }

        STAR_encoding_row  ();
        STAR_encoding_diag1();
        STAR_encoding_diag2();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
cltd
idivl 0x14(%rdi)
testl %edx, %edx
jne 0x14d7
movq %rdi, %rbx
callq 0x27b2
movq %rbx, %rdi
callq 0x27f8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x297c
leaq 0x2bac(%rip), %rdi      # 0x408a
callq 0x1100
movl $0x1, %edi
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::outputOrigin()
void outputOrigin()
    {

        printf("After decoding:");
        for(int i=0; i < data_disk_nbr; i++)
        {
            printf("data:%d:  ",i);
            for(int j = 0; j < check_data_size; j++)
            {
                printf("%d ",check_data[i][j]);
            }
            printf("\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a26(%rip), %rdi      # 0x404c
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x28(%rbx)
jle 0x2692
leaq 0x1a22(%rip), %r14      # 0x405c
leaq 0x1a26(%rip), %r15      # 0x4067
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x8(%rbx)
jle 0x267c
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movl (%rax,%r13,4), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
incq %r13
movslq 0x8(%rbx), %rax
cmpq %rax, %r13
jl 0x265a
movl $0xa, %edi
callq 0x10e0
incq %r12
movslq 0x28(%rbx), %rax
cmpq %rax, %r12
jl 0x2644
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::outputData()
void outputData()
    {

        printf("The res:");
        for(int i = 0; i < allNum; i++)
        {
            for(int j = 0; j < check_data_size; j++)
            {
                printf("%d ",check_data[i][j]);
            }

            printf("\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x19b4(%rip), %rdi      # 0x406b
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x2c(%rbx)
jle 0x270f
leaq 0x199c(%rip), %r14      # 0x4067
xorl %r15d, %r15d
cmpl $0x0, 0x8(%rbx)
jle 0x26f9
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incq %r12
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jl 0x26d7
movl $0xa, %edi
callq 0x10e0
incq %r15
movslq 0x2c(%rbx), %rax
cmpq %rax, %r15
jl 0x26ce
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::STAR_encoding_row()
void STAR_encoding_row()
    {
        int i,j;
        for( i = 0; i < check_data_size; i++)
        {
            for( j = 0; j < data_disk_nbr; j++)
            {
                check_data[data_disk_nbr][i] ^= check_data[j][i] ;
            }

        }
    }

// Assembly:
cmpl $0x0, 0x8(%rdi)
jle 0x27f7
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
xorl %ecx, %ecx
movl 0x28(%rdi), %edx
testl %edx, %edx
jle 0x27ea
xorl %esi, %esi
movq (%rax,%rsi,8), %r8
movl (%r8,%rcx,4), %r8d
movslq %edx, %rdx
movq (%rax,%rdx,8), %rdx
xorl %r8d, (%rdx,%rcx,4)
incq %rsi
movslq 0x28(%rdi), %rdx
cmpq %rdx, %rsi
jl 0x27cb
incq %rcx
movslq 0x8(%rdi), %rdx
cmpq %rdx, %rcx
jl 0x27c2
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::STAR_encoding_diag2()
void STAR_encoding_diag2()
    {
        int i,j,stripe,k;
        int *tmp;
        tmp = (int*)malloc(sizeof(int) * (p * block_size));
        memset(tmp, 0, p*block_size*sizeof(int));

        for(stripe = 0; stripe < block_nbr+1; stripe++)
        {
            for(i = 0; i < data_disk_nbr; i++)
            {
                for(j = 0; j<block_size; j++)
                {
                    k = (stripe + i + p) % p;
                    if( k < block_nbr)
                        tmp[stripe * block_size + j] ^= check_data[i][ k * block_size + j];
                }
            }
        }
        for( i = 0; i< block_nbr; i++)
        {
            for( j = 0; j< block_size; j++)
            {
                tmp[ i * block_size + j] ^= tmp[block_nbr * block_size + j];
            }
        }

        memmove( check_data[data_disk_nbr + 2], tmp, check_data_size * sizeof(int));

        free(tmp);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x10(%rdi), %r13d
movslq 0xc(%rdi), %r14
movl %r14d, %r12d
movl %r14d, %eax
imull %r13d, %eax
movslq %eax, %r15
shlq $0x2, %r15
movq %r15, %rdi
callq 0x10d0
movq %rax, -0x30(%rbp)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1050
movq %rbx, -0x38(%rbp)
movl 0x14(%rbx), %ecx
testl %ecx, %ecx
js 0x2a49
movq -0x38(%rbp), %rax
movl 0x28(%rax), %esi
movq 0x18(%rax), %rdi
leaq 0x1(%rcx), %rax
movq %rax, -0x48(%rbp)
leaq (,%r14,4), %rax
movq %rax, -0x40(%rbp)
xorl %r10d, %r10d
movq -0x30(%rbp), %r11
testl %esi, %esi
jle 0x2a3c
leal (%r10,%r13), %r15d
xorl %ebx, %ebx
testl %r14d, %r14d
jle 0x2a34
leal (%r15,%rbx), %eax
cltd
idivl %r13d
movl %edx, %eax
imull %r14d, %eax
cltq
shlq $0x2, %rax
xorl %r8d, %r8d
cmpl %ecx, %edx
jge 0x2a2c
movq (%rdi,%rbx,8), %r9
addq %rax, %r9
movl (%r9,%r8,4), %r9d
xorl %r9d, (%r11,%r8,4)
incq %r8
cmpq %r8, %r12
jne 0x2a19
incq %rbx
cmpq %rsi, %rbx
jne 0x29fd
incq %r10
addq -0x40(%rbp), %r11
cmpq -0x48(%rbp), %r10
jne 0x29f3
testl %ecx, %ecx
jle 0x2a88
movl %ecx, %eax
imull %r12d, %eax
movq -0x30(%rbp), %rdi
leaq (%rdi,%rax,4), %rax
leaq (,%r12,4), %rdx
xorl %esi, %esi
testl %r12d, %r12d
jle 0x2a7d
xorl %r8d, %r8d
movl (%rax,%r8,4), %r9d
xorl %r9d, (%rdi,%r8,4)
incq %r8
cmpq %r8, %r12
jne 0x2a6d
incq %rsi
addq %rdx, %rdi
cmpq %rcx, %rsi
jne 0x2a65
movq -0x38(%rbp), %rdx
movq 0x18(%rdx), %rax
movslq 0x28(%rdx), %rcx
movq 0x10(%rax,%rcx,8), %rdi
movslq 0x8(%rdx), %rdx
shlq $0x2, %rdx
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x1070
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/carellano8[P]Proyecto-Redes-I-2017/crc16.cpp
// Function: crc16::msjTobin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
binario crc16::msjTobin(string mensaje){
            binario bin="";
            size_t i;
            for (i = 0; i < mensaje.size(); i++)
            {
                //cout<<bitset<8>(mensaje.c_str()[i]).to_string()<<endl;
                bin+=bitset<8>(mensaje[i]).to_string();
            }


            return bin;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x478c(%rip), %rdx      # 0x8159
movq %rdx, %rsi
callq 0x315a
cmpq $0x0, 0x8(%r14)
je 0x3a30
xorl %r13d, %r13d
leaq -0x50(%rbp), %r15
leaq -0x58(%rbp), %r12
movq (%r14), %rax
movzbl (%rax,%r13), %eax
movq %rax, -0x58(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x50ea
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3a27
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
incq %r13
cmpq 0x8(%r14), %r13
jb 0x39e7
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3a63
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3a63
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x3a7b
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O1/carellano8[P]Proyecto-Redes-I-2017/crc16.cpp
// Function: crc16::relleno_Bit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
binario crc16::relleno_Bit(binario bin_in){
            int contador=0;
            size_t i;
            binario bin_out="";
            for (i = 0; i < bin_in.size(); i++){
                if(bin_in[i]=='1'){
                    contador++;
                    }else{
                        contador=0;
                        }
                    bin_out+=bin_in[i];
                    if(contador==5){
                        bin_out+="0";
                        contador=0;
                    }
            }
            return bin_out;

        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x3e3f(%rip), %rdx      # 0x8159
movq %rdx, %rsi
callq 0x315a
cmpq $0x0, 0x8(%r14)
je 0x4373
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%r14), %rax
movb (%rax,%r12), %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x2120
incl %r15d
cmpb $0x31, %r13b
movl $0x0, %eax
cmovnel %eax, %r15d
cmpl $0x5, %r15d
jne 0x436a
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x3de2(%rip), %rsi      # 0x8147
callq 0x2280
incq %r12
cmpq 0x8(%r14), %r12
jb 0x432f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x43a0
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/carellano8[P]Proyecto-Redes-I-2017/crc16.cpp
// Function: crc16::BitStringToInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int crc16::BitStringToInt(string bin){
	size_t i,n=bin.size(),acum=0;
	for (i = 0; i < n; ++i)
	{
		if(bin[i]=='1'){
			acum+=pow(2,n-(i+1)) ;
		}
	}
	return acum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x5049
movq %rdi, %rbx
decq %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%rbx), %rax
cmpb $0x31, (%rax,%r12)
jne 0x503a
movq %r15, %xmm1
movq 0x313b(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x313f(%rip), %xmm0     # 0x8120
subpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2140
movq %r14, %xmm1
punpckldq 0x310d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3115(%rip), %xmm1     # 0x8120
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
addsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3101(%rip), %xmm2     # 0x8130
cvttsd2si %xmm2, %r14
andq %rcx, %r14
orq %rax, %r14
incq %r12
addq $-0x1, %r15
jb 0x4fbe
jmp 0x504c
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/carellano8[P]Proyecto-Redes-I-2017/hamming.cpp
// Function: hamming::potencia2(int)
bool hamming::potencia2(int n){
    int i=0;bool r=false;int p;
    p=pow(2,i);

    while(!r&&p<=n){
        if(n==p){r=true;}
        i++;p=pow(2,i);
        }
    return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edi, %edi
jle 0x71ab
movl %edi, %r14d
movl $0x1, %r15d
xorl %ebx, %ebx
movl $0x1, %r12d
movl $0x1, %eax
cmpl %r14d, %eax
movzbl %bl, %ebx
cmovel %r15d, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
callq 0x2140
testb $0x1, %bl
jne 0x71ad
cvttsd2si %xmm0, %eax
incl %r12d
cmpl %r14d, %eax
jle 0x7181
jmp 0x71ad
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/drop.h
// Function: drop()
void drop(){
	char *tab;
	char *temp;
	char *temp1;
	temp1=(char*)malloc(sizeof(char)*MAX_NAME);
	temp=(char*)malloc(sizeof(char)*MAX_NAME);
	tab=(char*)malloc(sizeof(char)*MAX_NAME);
	cout<<"\nenter table name to delete: ";
	cin>>tab;
	strcpy(temp1,tab);
	int check=search_table(tab);
	if(check==0) printf("\n%s doesn't exist\n\n",tab);
	else if(check==1){
		sprintf(temp, "rm -R ./table/%s", tab);
		system(temp);
		//copy all the table names to new temp excluding given table to delete;
		sprintf(temp, "grep -v \"%s\" ./table/table_list > ./table/temp ; mv ./table/temp ./table/table_list", tab);
        system(temp);
        printf("\n%s deleted\n\n",temp1);
		printf("-------------------------------");
	}
	else{
		printf("\nerror\nexiting...\n\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x32
popq %r13
movq %r13, %rdi
callq 0x2250
movq %rax, %rbx
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %r13, %rdi
callq 0x2250
movq %rax, %r15
movq 0x61f8(%rip), %rdi      # 0x8fd0
leaq 0x35b8(%rip), %rsi      # 0x6397
pushq $0x1d
popq %rdx
callq 0x21e0
movq 0x61f2(%rip), %r12      # 0x8fe0
movq (%r12), %rax
movq -0x18(%rax), %rax
movq 0x10(%r12,%rax), %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2320
movq (%r12), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r12,%rax)
jne 0x2e39
addq $-0x33, %rbp
cmpq $-0x33, %rbp
ja 0x2e39
movq 0xe8(%r12,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x2ed4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2180
movq %r15, %rdi
callq 0x4079
testl %eax, %eax
je 0x2eb5
leaq 0x3572(%rip), %rsi      # 0x63c9
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x2140
leaq 0x3567(%rip), %rsi      # 0x63da
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x2140
leaq 0x359f(%rip), %rdi      # 0x642e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
leaq 0x3cf8(%rip), %rdi      # 0x6b98
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
leaq 0x34f9(%rip), %rdi      # 0x63b5
movq %r15, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x2e39
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x2, %esi
callq 0x2310
jmp 0x2e39
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/BPtree.h
// Function: BPtree::search_leaf(int)
Btreenode
BPtree::search_leaf(int primary_key)
{
    Btreenode n(true);
    int q, curr_node = root_num;
    read_node(curr_node, n);

    //Traversing the Tree from root till leaf
    while (!n.isleaf())
    {
        q = n.num_pointers();
        if (primary_key <= n.get_key(1))
        {
            curr_node = n.get_pointer(1);
        }
        else if (primary_key > n.get_key(q - 1))
        {
            curr_node = n.get_pointer(q);
        }
        else
        {
            curr_node = n.get_pointer(n.get_next_key(primary_key) + 1);
        }
        read_node(curr_node, n);
    }

    return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movb $0x1, (%rdi)
movl $0xffffffff, 0x38(%rdi) # imm = 0xFFFFFFFF
movl 0x4(%rsi), %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4b7e
leaq 0x8(%rbx), %r15
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
cmpb $0x0, (%rbx)
jne 0x3160
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rdx
cmpl %ebp, (%rdx)
jge 0x3151
movq 0x10(%rbx), %rcx
subq %rax, %rcx
movq %rcx, %rsi
shlq $0x1e, %rsi
addq %r12, %rsi
sarq $0x20, %rsi
cmpl %ebp, -0x4(%rdx,%rsi,4)
jge 0x313e
shrq $0x2, %rcx
movslq %ecx, %rcx
leaq (%rax,%rcx,4), %rax
addq $-0x4, %rax
jmp 0x3151
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4c12
cltq
shlq $0x2, %rax
addq (%r15), %rax
movl (%rax), %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4b7e
jmp 0x3101
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x316e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4c5e
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/BPtree.h
// Function: BPtree::get_record(int)
int
BPtree::get_record(int primary_key)
{
	clock_t start=clock();
    Btreenode n = search_leaf(primary_key);
    int pos = n.get_next_key(primary_key) + 1;
    clock_t stop=clock();
    double elapsed=(double)(stop-start)*1000.0/CLOCKS_PER_SEC;
    printf("\nTime elapsed for search is %f ms",elapsed);
    if (pos <= n.num_keys() && n.get_key(pos) == primary_key)
    {
        return n.get_pointer(pos);
    }
    else
    {
        return BPTREE_SEARCH_NOT_FOUND;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r15
callq 0x2110
movq %rax, %r14
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x30bc
movq 0x20(%r12), %rax
movq 0x28(%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq %rax, %r15
testq %rcx, %rcx
jle 0x31f1
movq %rax, %r15
movq %rcx, %rdx
shrq %rdx
movq %rdx, %rsi
notq %rsi
addq %rcx, %rsi
leaq (%r15,%rdx,4), %rcx
addq $0x4, %rcx
cmpl %ebx, -0x4(%rcx)
cmovlq %rcx, %r15
cmovgeq %rdx, %rsi
movq %rsi, %rcx
testq %rsi, %rsi
jg 0x31c7
subq %rax, %r15
movq %r15, %r12
shrq $0x2, %r12
callq 0x2110
subq %r14, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x2df8(%rip), %xmm0     # 0x6008
divsd 0x2df8(%rip), %xmm0     # 0x6010
leaq 0x2e19(%rip), %rdi      # 0x6038
movb $0x1, %al
callq 0x2030
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl %ecx, %r12d
jge 0x3265
shlq $0x1e, %r15
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %r15, %rcx
sarq $0x20, %rcx
cmpl %ebx, -0x4(%rax,%rcx,4)
jne 0x3265
movq 0x8(%rsp), %rax
movl -0x4(%rax,%rcx,4), %ebp
movq %rsp, %rdi
callq 0x4c5e
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/file_handler.h
// Function: open_file(char*, char*)
FILE *open_file(char t_name[] ,char perm[]){

    FILE *fp;
    struct stat st = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    char *name = (char *)malloc(sizeof(char) * (2 * MAX_NAME + 15));
       strcpy(name, "./table/");

    if (stat(name, &st) == -1)
        mkdir(name, 0775);

    strcat(name, t_name);
    strcat(name, "/");

    if (stat(name, &st) == -1)
        mkdir(name, 0775);
    strcat(name, "met");
    fp = fopen(name, perm);
    if (!fp){
        printf("\nError in opening file\n");
    }
    free(name);
    return fp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x20e0
movl $0x73, %edi
callq 0x2250
movq %rax, %rbx
movabsq $0x2f656c6261742f2e, %rax # imm = 0x2F656C6261742F2E
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2170
cmpl $-0x1, %eax
jne 0x3cbd
movq %rbx, %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x20c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2350
movq %rbx, %rdi
callq 0x20b0
movw $0x2f, (%rbx,%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2170
cmpl $-0x1, %eax
jne 0x3cf5
movq %rbx, %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x20c0
movq %rbx, %rdi
callq 0x20b0
movl $0x74656d, (%rbx,%rax)  # imm = 0x74656D
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, %r14
testq %rax, %rax
jne 0x3d23
leaq 0x2c72(%rip), %rdi      # 0x6990
callq 0x22d0
movq %rbx, %rdi
callq 0x2210
movq %r14, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/file_handler.h
// Function: store_meta_data(table*)
int store_meta_data(struct table *t_ptr)
{
    FILE *fp = open_file(t_ptr->name, const_cast<char*>("w"));
    fwrite(t_ptr, sizeof(struct table), 1, fp);
    fclose(fp);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x3e4, %rdi            # imm = 0x3E4
leaq 0x2311(%rip), %rsi      # 0x6063
callq 0x3c5a
movq %rax, %r14
movl $0x420, %esi            # imm = 0x420
movl $0x1, %edx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2380
movq %r14, %rdi
callq 0x2190
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/create.h
// Function: record_size(table*)
int record_size(table *temp){
	int size=0;
	temp->prefix[0]=0;
	for(int i=0;i<temp->count;i++){
		switch(temp->col[i].type){
		case INT:
			temp->prefix[i+1]=sizeof(int)+temp->prefix[i];
			size+=sizeof(int);
			break;
		case VARCHAR:
			temp->prefix[i+1]=sizeof(char)*(MAX_VARCHAR +1) +temp->prefix[i];
			size+=sizeof(char)*(MAX_VARCHAR +1);
			break;
		}
	}
	return size;
}

// Assembly:
movl $0x0, (%rdi)
cmpl $0x0, 0x3e0(%rdi)
jle 0x3dd0
leaq 0x90(%rdi), %rcx
xorl %edx, %edx
xorl %eax, %eax
movl (%rcx), %esi
cmpl $0x1, %esi
je 0x3dae
cmpl $0x2, %esi
jne 0x3dbc
movl $0x33, %esi
jmp 0x3db3
movl $0x4, %esi
addl %esi, %eax
addl (%rdi,%rdx,4), %esi
movl %esi, 0x4(%rdi,%rdx,4)
incq %rdx
movslq 0x3e0(%rdi), %rsi
addq $0x1c, %rcx
cmpq %rsi, %rdx
jl 0x3d9b
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/insert.h
// Function: search_table(char*)
int search_table(char tab_name[]){
	
	//check if new table already exists in table list or not 
		//use grep to search table_name string inside table_list
		// -F -> --fixed-strings ;intepret pattern as a list of fixed strings
		// -x -> --line-regexp ;select only those matches that exactly match the whole line
		// -q -> quite, --silent ;write anything to standard output, exit immediately with zero status if any match is found
		char str[MAX_NAME+1];
		strcpy(str,"grep -Fxq");
		strcat(str,tab_name);
		strcat(str," ./table/table_list");
		int x = system(str);
		if(x==0)return 1;
		else return 0;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rsi
movabsq $0x78462d2070657267, %rax # imm = 0x78462D2070657267
movq %rsp, %rbx
movq %rax, (%rbx)
movw $0x71, 0x8(%rbx)
movq %rbx, %rdi
callq 0x2350
movq %rbx, %rdi
callq 0x20b0
movups 0x236c(%rip), %xmm0     # 0x641a
movups %xmm0, (%rsp,%rax)
movl $0x747369, 0x10(%rsp,%rax) # imm = 0x747369
movq %rbx, %rdi
callq 0x2140
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/display.h
// Function: show_tables()
void show_tables(){
	char *name;
	printf("\n\nLIST OF TABLES\n\n");
	printf("---------------------------\n");
	int tabcount=0;
	name=(char*)malloc(sizeof(char)*MAX_NAME);
	FILE *fp=fopen("./table/table_list","r+");
	while(fscanf(fp,"%s",name)!=EOF){
		tabcount++;
		cout<<name<<"\n";
	}
	if(tabcount==0) printf("Database empty!!!\n");
	printf("---------------------------\n");
	free(name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2894(%rip), %rdi      # 0x6b47
callq 0x22d0
leaq 0x28dd(%rip), %rdi      # 0x6b9c
callq 0x22d0
movl $0x32, %edi
callq 0x2250
movq %rax, %rbx
leaq 0x2143(%rip), %rdi      # 0x641b
leaq 0x1df9(%rip), %rsi      # 0x60d8
callq 0x2200
movq %rax, %r14
leaq 0x20e9(%rip), %rsi      # 0x63d7
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2370
cmpl $-0x1, %eax
je 0x4376
movl %eax, %ebp
movq 0x4cc7(%rip), %r15      # 0x8fd0
leaq 0x2012(%rip), %r12      # 0x6322
leaq 0x20c0(%rip), %r13      # 0x63d7
testq %rbx, %rbx
je 0x4334
movq %rbx, %rdi
callq 0x20b0
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21e0
jmp 0x434c
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x2310
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2370
cmpl $-0x1, %eax
jne 0x4317
cmpl $-0x1, %ebp
jne 0x4382
leaq 0x27dc(%rip), %rdi      # 0x6b59
callq 0x22d0
leaq 0x2813(%rip), %rdi      # 0x6b9c
callq 0x22d0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/src/main.cpp
// Function: input()
void input(){
	int c = take_input_option();
	while(c<9 && c>0){
		switch(c){
			case 1:
				show_tables();
				break;
			case 2:
				create();
				break;
			case 3:
				insert();
				break;
			case 4:
				drop();
				break;
			case 5:
				display();
				break;
			case 6:
				search();
				break;
			case 8:
				printf("\nexiting...\n");
				printf("\n\t\t good bye!!!\n\n");
				exit(0);
				break;
			case 7:
				help();
				break;
			default:
				printf("\nplease choose a correct option\n");
				break;
		}
		c = take_input_option();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x49e5
leal -0x1(%rax), %ecx
cmpl $0x7, %ecx
ja 0x4b21
leaq 0x154d(%rip), %r14      # 0x6018
leaq 0x196a(%rip), %rbx      # 0x643c
decl %eax
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
callq 0x42a1
jmp 0x4af5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
jmp 0x4af5
callq 0x43a4
callq 0x49e5
movl %eax, %ecx
decl %ecx
cmpl $0x8, %ecx
jb 0x4ad2
jmp 0x4b21
callq 0x2aac
jmp 0x4af5
callq 0x2da1
jmp 0x4af5
callq 0x23a0
jmp 0x4af5
callq 0x25be
jmp 0x4af5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f14(%rip), %rdi      # 0x6a44
callq 0x22d0
leaq 0x2152(%rip), %rdi      # 0x6c8e
callq 0x22d0
xorl %edi, %edi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/src/main.cpp
// Function: start_system()
void start_system(){
	system("clear");
	printf("\n\t\t\tWELCOME\n\n");
	printf("\t\tWelcome to myDB monitor \n\n");
	//cout<<"\t\tType h for help and q for quit\n\n";
	input();
}

// Assembly:
pushq %rax
leaq 0x1d2d(%rip), %rdi      # 0x687d
callq 0x2140
leaq 0x2143(%rip), %rdi      # 0x6c9f
callq 0x22d0
leaq 0x2144(%rip), %rdi      # 0x6cac
callq 0x22d0
popq %rax
jmp 0x4ab3
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/BPtree.h
// Function: BPtree::read_node(int, Btreenode&)
void read_node(int filenum, Btreenode & n)
    {
        char *str;
        str = (char *) malloc(sizeof(char) * BPTREE_MAX_FILE_PATH_SIZE);
        sprintf(str, "table/%s/tree/tree%d.dat", tablename, filenum);
        std::ifstream in_file(str, std::ifstream::in | std::ifstream::binary);
        free(str);
        in_file >> n;
        in_file.close();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2250
movq %rax, %r15
addq $0x8, %r14
leaq 0x1cd8(%rip), %rsi      # 0x6883
movq %rax, %rdi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2040
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
movl $0xc, %edx
callq 0x2360
movq %r15, %rdi
callq 0x2210
movq %r14, %rdi
movq %rbx, %rsi
callq 0x53ba
movq %rsp, %rdi
callq 0x2050
movq %rsp, %rdi
callq 0x2060
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/BPtree.h
// Function: Btreenode::insert_key(int, int)
void insert_key(int key, int point)
    {
        int pos = get_next_key(key);
        keys.insert(keys.begin() + pos, key);
        if (leaf)
            pointers.insert(pointers.begin() + pos, point);
        else
            pointers.insert(pointers.begin() + pos + 1, point);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movl %esi, (%r15)
movl %edx, 0x8(%rsp)
callq 0x4c12
leaq 0x20(%r14), %rdi
movslq %eax, %rbx
shlq $0x2, %rbx
movq 0x20(%r14), %rsi
addq %rbx, %rsi
movq %r15, %rdx
callq 0x5630
leaq 0x8(%r14), %rdi
addq 0x8(%r14), %rbx
cmpb $0x1, (%r14)
je 0x4d43
addq $0x4, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x5630
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/pawan231[P]MiniDataBase/include/BPtree.h
// Function: BPtree::write_node(int, Btreenode)
void write_node(int filenum, Btreenode n)
    {
        char *str;
          str = (char *) malloc(sizeof(char) * BPTREE_MAX_FILE_PATH_SIZE);
          sprintf(str, "table/%s/tree/tree%d.dat", tablename,filenum);
          std::ofstream out_file(str, std::ofstream::binary |  std::ofstream::out | std::ofstream::trunc);
          free(str);
          out_file << n;
          out_file.close();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2250
movq %rax, %r15
addq $0x8, %r14
leaq 0x1afc(%rip), %rsi      # 0x6883
movq %rax, %rdi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2040
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movl $0x34, %edx
callq 0x21c0
movq %r15, %rdi
callq 0x2210
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5785
leaq 0x8(%rsp), %rdi
callq 0x2270
movq 0x41f1(%rip), %rax      # 0x8fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x2130
leaq 0x100(%rsp), %rdi
callq 0x2080
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2340
nop