LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/Comparison.cc
// Function: CNF::Print()
void CNF :: Print () {

	for (int i = 0; i < numAnds; i++) {
		
		cout << "( ";
		for (int j = 0; j < orLens[i]; j++) {
			orList[i][j].Print ();
			if (j < orLens[i] - 1)
				cout << " OR ";
		}
		cout << ") ";
		if (i < numAnds - 1)
			cout << " AND\n";
		else
			cout << "\n";
	}
}

// Assembly:
cmpl $0x0, 0x25d0(%rdi)
jle 0x32a7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x8df1(%rip), %r14      # 0xbfc0
movq %rdi, %r13
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4f05(%rip), %rsi      # 0x80e6
callq 0x21c0
cmpl $0x0, 0x2580(%rbx,%r15,4)
jle 0x3237
movq %r13, %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
callq 0x2e1e
movslq 0x2580(%rbx,%r15,4), %rax
decq %rax
cmpq %rax, %r12
jge 0x3223
movl $0x4, %edx
movq %r14, %rdi
leaq 0x4ecb(%rip), %rsi      # 0x80e9
callq 0x21c0
incq %r12
movslq 0x2580(%rbx,%r15,4), %rax
addq $0x18, %rbp
cmpq %rax, %r12
jl 0x31f7
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4ea8(%rip), %rsi      # 0x80ee
callq 0x21c0
movslq 0x25d0(%rbx), %rax
decq %rax
cmpq %rax, %r15
jge 0x326b
movl $0x5, %edx
movq %r14, %rdi
leaq 0x4e88(%rip), %rsi      # 0x80f1
jmp 0x327a
movl $0x1, %edx
movq %r14, %rdi
leaq 0x58db(%rip), %rsi      # 0x8b55
callq 0x21c0
incq %r15
movslq 0x25d0(%rbx), %rax
addq $0x1e0, %r13            # imm = 0x1E0
cmpq %rax, %r15
jl 0x31d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/Comparison.cc
// Function: AddLitToFile(int&, _IO_FILE*, _IO_FILE*, char*, Type)
void AddLitToFile (int &numFieldsInLiteral, FILE *outRecFile, FILE *outSchemaFile, char *value, Type myType) {

        // first write out the new record field
        fprintf (outRecFile, "%s|", value);

        // now write out the new schema field
        if (myType == Int) {
                fprintf (outSchemaFile, "att%d Int\n", numFieldsInLiteral);
        } else if (myType == Double) {
                fprintf (outSchemaFile, "att%d Double\n", numFieldsInLiteral);
        } else if (myType == String) {
                fprintf (outSchemaFile, "att%d String\n", numFieldsInLiteral);
        } else {
                cerr << "I don't know that type!!\n";
                exit (1);
        }

        // and note that we have another field
        numFieldsInLiteral++;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x4e38(%rip), %rsi      # 0x80f7
movq %rax, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x2240
cmpl $0x3, %ebp
jae 0x32f4
movl %ebp, %eax
leaq 0x4d96(%rip), %rcx      # 0x8070
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movl (%rbx), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2240
incl (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8cf5(%rip), %rdi      # 0xbff0
leaq 0x4e20(%rip), %rsi      # 0x8122
callq 0x2170
movl $0x1, %edi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/ComparisonEngine.cc
// Function: ComparisonEngine::Compare(Record*, Record*, OrderMaker*)
int ComparisonEngine :: Compare(Record *left, Record *right, OrderMaker *orderUs) {

	char *val1, *val2;

	char *left_bits = left->GetBits();
	char *right_bits = right->GetBits();

	for (int i = 0; i < orderUs->numAtts; i++) {
		val1 = left_bits + ((int *) left_bits)[orderUs->whichAtts[i] + 1];
		val2 = right_bits + ((int *) right_bits)[orderUs->whichAtts[i] + 1];
	
		// these are used to store the two operands, depending on their type
		int val1Int, val2Int;
		double val1Double, val2Double;
		
		// now check the type and do the comparison
		switch (orderUs->whichTypes[i]) {
	
			// first case: we are dealing with integers
			case Int:
	
			// cast the two bit strings to ints
			val1Int = *((int *) val1);
			val2Int = *((int *) val2);
	
			// and do the comparison
			if (val1Int < val2Int) 
				return -1;
			else if (val1Int > val2Int)
				return 1;
	
			break;
	
	
			// second case: dealing with doubles
			case Double:
	
			// cast the two bit strings to doubles
			val1Double = *((double *) val1);
			val2Double = *((double *) val2);
	
			// and do the comparison
			if (val1Double < val2Double)
				return -1;
			else if (val1Double > val2Double)
				return 1;
	
			break;
	
	
			// last case: dealing with strings
			default:
			int sc = strcmp (val1, val2);
			if (sc != 0)
				return sc;

			break;
	
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rdi
callq 0x287c
movq %rax, %r14
movq %r15, %rdi
callq 0x287c
movslq (%rbx), %r12
testq %r12, %r12
jle 0x3e75
movq %rax, %r15
xorl %r13d, %r13d
movslq 0x4(%rbx,%r13,4), %rax
movslq 0x4(%r14,%rax,4), %rdi
addq %r14, %rdi
movslq 0x4(%r15,%rax,4), %rsi
addq %r15, %rsi
movl 0x54(%rbx,%r13,4), %eax
cmpl $0x1, %eax
je 0x3e35
testl %eax, %eax
jne 0x3e4a
movl (%rdi), %eax
movl (%rsi), %ecx
cmpl %ecx, %eax
jl 0x3e43
jg 0x3e5e
jmp 0x3e67
movsd (%rdi), %xmm0
movsd (%rsi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3e58
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3e63
callq 0x2230
testl %eax, %eax
cmovnel %eax, %ebp
jne 0x3e63
jmp 0x3e67
ucomisd %xmm1, %xmm0
jbe 0x3e67
movl $0x1, %ebp
xorl %eax, %eax
jmp 0x3e69
movb $0x1, %al
testb %al, %al
je 0x3e77
incq %r13
cmpq %r13, %r12
jne 0x3e06
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_O1/PrarabdhJoshi[P]DatabaseImplementation/ComparisonEngine.cc
// Function: ComparisonEngine::Compare(Record*, OrderMaker*, Record*, OrderMaker*)
int ComparisonEngine :: Compare (Record *left, OrderMaker *order_left, Record *right, OrderMaker *order_right) {

	char *val1, *val2;

	char *left_bits = left->GetBits();
	char *right_bits = right->GetBits();

	for (int i = 0; i < order_left->numAtts; i++) {
		val1 = left_bits + ((int *) left_bits)[order_left->whichAtts[i] + 1];
		val2 = right_bits + ((int *) right_bits)[order_right->whichAtts[i] + 1];
	
		// these are used to store the two operands, depending on their type
		int val1Int, val2Int;
		double val1Double, val2Double;
		
		// now check the type and do the comparison
		switch (order_left->whichTypes[i]) {
	
			// first case: we are dealing with integers
			case Int:
	
			// cast the two bit strings to ints
			val1Int = *((int *) val1);
			val2Int = *((int *) val2);
	
			// and do the comparison
			if (val1Int < val2Int) 
				return -1;
			else if (val1Int > val2Int)
				return 1;
	
			break;
	
	
			// second case: dealing with doubles
			case Double:
	
			// cast the two bit strings to doubles
			val1Double = *((double *) val1);
			val2Double = *((double *) val2);
	
			// and do the comparison
			if (val1Double < val2Double)
				return -1;
			else if (val1Double > val2Double)
				return 1;
	
			break;
	
	
			// last case: dealing with strings
			default:
			int sc = strcmp (val1, val2);
			if (sc != 0)
				return sc;

			break;
	
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rdi
callq 0x287c
movq %rax, %r15
movq %r12, %rdi
callq 0x287c
movslq (%r14), %r13
testq %r13, %r13
jle 0x3f43
movq %rax, %r12
xorl %ebx, %ebx
movq (%rsp), %rdx
movslq 0x4(%r14,%rbx,4), %rax
movslq 0x4(%r15,%rax,4), %rdi
addq %r15, %rdi
movslq 0x4(%rdx,%rbx,4), %rax
movslq 0x4(%r12,%rax,4), %rsi
addq %r12, %rsi
movl 0x54(%r14,%rbx,4), %eax
cmpl $0x1, %eax
je 0x3ef9
testl %eax, %eax
jne 0x3f0e
movl (%rdi), %eax
movl (%rsi), %ecx
cmpl %ecx, %eax
jl 0x3f07
jg 0x3f28
jmp 0x3f35
movsd (%rdi), %xmm0
movsd (%rsi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3f22
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3f2d
callq 0x2230
testl %eax, %eax
cmovnel %eax, %ebp
je 0x3f31
xorl %eax, %eax
movq (%rsp), %rdx
jmp 0x3f37
ucomisd %xmm1, %xmm0
jbe 0x3f35
movl $0x1, %ebp
xorl %eax, %eax
jmp 0x3f37
movq (%rsp), %rdx
movb $0x1, %al
testb %al, %al
je 0x3f45
incq %rbx
cmpq %rbx, %r13
jne 0x3ec5
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_O1/PrarabdhJoshi[P]DatabaseImplementation/ComparisonEngine.cc
// Function: ComparisonEngine::Compare(Record*, Record*, CNF*)
int ComparisonEngine :: Compare (Record *left, Record *literal, CNF *myComparison) {

	for (int i = 0; i < myComparison->numAnds; i++) {

		for (int j = 0; j < myComparison->orLens[i]; j++) {

			// this returns a 0 if the comparison did not eval to true
			int result = Run(left, literal, &myComparison->orList[i][j]);
			
			if (result != 0) {
				break;	
			}
			
			// if we made it through all of the comparisons without a hit, return a 0
			if (j == myComparison->orLens[i] - 1) {
				return 0;
			}
		}

		// this ends the for-loop for the OR-list... if we made it this far, then we'll go on to the
		// next disjunction in the overall CNF expression
	}

	// this ends the for-loop for the AND-list... if we made it this far, then we know that we
	// have satisfied the overall CNF expression
	return 1;	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x25d0(%rcx)
setle 0xf(%rsp)
jle 0x400d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
movq %rcx, %r12
cmpl $0x0, 0x2580(%rbx,%r13,4)
jle 0x3fee
movq %r12, 0x10(%rsp)
xorl %ebp, %ebp
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x4024
testl %eax, %eax
je 0x3fb2
movl $0x5, %eax
xorl %ecx, %ecx
jmp 0x3fc7
movl 0x2580(%rbx,%r13,4), %ecx
decl %ecx
xorl %eax, %eax
cmpq %rcx, %rbp
setne %cl
sete %al
testb %cl, %cl
je 0x3fe4
incq %rbp
movslq 0x2580(%rbx,%r13,4), %rax
addq $0x18, %r12
cmpq %rax, %rbp
jl 0x3f97
movl $0x5, %eax
cmpl $0x5, %eax
movq 0x10(%rsp), %r12
jne 0x400d
incq %r13
movslq 0x25d0(%rbx), %rax
addq $0x1e0, %r12            # imm = 0x1E0
cmpq %rax, %r13
setge 0xf(%rsp)
jl 0x3f85
movzbl 0xf(%rsp), %eax
andl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/Schema.cc
// Function: Schema::Find(char const*)
int Schema :: Find (const char *attName) {

	for (int i = 0; i < numAtts; i++) {
		if (!strcmp (attName, myAtts[i].name)) {
			return i;
		}
	}

	// if we made it here, the attribute was not found
	return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq (%rdi), %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
jle 0x4331
movq %rsi, %r14
movq 0x8(%rdi), %r13
xorl %r12d, %r12d
movq (%r13), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x432e
incq %r12
addq $0x10, %r13
cmpq %r12, %r15
jne 0x4310
jmp 0x4331
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/Schema.cc
// Function: Schema::FindType(char const*)
Type Schema :: FindType (const char *attName) {

	for (int i = 0; i < numAtts; i++) {
		if (!strcmp (attName, myAtts[i].name)) {
			return myAtts[i].myType;
		}
	}

	// if we made it here, the attribute was not found
	return Int;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq (%rdi), %r14
testq %r14, %r14
jle 0x4375
movq %rsi, %rbx
movq 0x8(%rdi), %r15
shlq $0x4, %r14
xorl %r12d, %r12d
movq (%r15,%r12), %rsi
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x4379
addq $0x10, %r12
cmpq %r12, %r14
jne 0x435c
xorl %eax, %eax
jmp 0x437e
movl 0x8(%r15,%r12), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::Page()
Page :: Page () {
	curSizeInBytes = sizeof (int);
	numRecs = 0;

	myRecs = new (std::nothrow) TwoWayList<Record>;
	if (myRecs == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x764e(%rip), %rax      # 0xbd40
movq %rax, (%rdi)
movabsq $0x400000000, %rax      # imm = 0x400000000
movq %rax, 0x10(%rdi)
movq 0x7896(%rip), %rsi      # 0xbfa0
movl $0x8, %edi
callq 0x23a0
testq %rax, %rax
je 0x4726
movq %rax, %r14
movq %rax, %rdi
callq 0x4db8
jmp 0x4729
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
testq %r14, %r14
je 0x473a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x787f(%rip), %rdi      # 0xbfc0
leaq 0x38bc(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
movq %rax, %rbx
movq 0x783f(%rip), %rsi      # 0xbfa0
movq %r14, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::EmptyItOut()
void Page :: EmptyItOut () {

	// get rid of all of the records
	while (1) {
		Record temp;
		if (!GetFirst (&temp))
			break;
	}	

	// reset the page size
	curSizeInBytes = sizeof (int);
	numRecs = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x25fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4814
movl %eax, %ebp
movq %r14, %rdi
callq 0x2604
testl %ebp, %ebp
jne 0x47c6
movabsq $0x400000000, %rax      # imm = 0x400000000
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2604
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::GetFirst(Record*)
int Page :: GetFirst (Record *firstOne) {

	// move to the first record
	myRecs->MoveToStart ();

	// make sure there is data 
	if (!myRecs->RightLength ()) {
		return 0;
	}

	// and remove it
	myRecs->Remove (firstOne);
	numRecs--;

	char *b = firstOne->GetBits();
	curSizeInBytes -= ((int *) b)[0];

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x18(%rax), %ecx
addl %ecx, 0x1c(%rax)
movl $0x0, 0x18(%rax)
je 0x4857
movq %rsi, %r14
callq 0x4f5a
decl 0x10(%rbx)
movq %r14, %rdi
callq 0x287c
movl (%rax), %eax
subl %eax, 0x14(%rbx)
movl $0x1, %eax
jmp 0x4859
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::Append(Record*)
int Page :: Append (Record *addMe) {
	char *b = addMe->GetBits();

	// first see if we can fit the record
	if (curSizeInBytes + ((int *) b)[0] > PAGE_SIZE) {
		return 0;
	}

	// move to the last record
	myRecs->MoveToFinish ();

	// and add it
	curSizeInBytes += ((int *) b)[0];
	myRecs->Insert(addMe);
	numRecs++;

	return 1;	
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x287c
movl 0x14(%rbx), %edx
movl (%rax), %esi
addl %edx, %esi
xorl %ecx, %ecx
cmpl $0x20000, %esi          # imm = 0x20000
jg 0x48ba
movq 0x8(%rbx), %rdi
movq (%rdi), %rcx
movq 0x8(%rcx), %rsi
movq 0x10(%rsi), %rsi
movq %rsi, 0x10(%rcx)
movl 0x1c(%rcx), %esi
addl %esi, 0x18(%rcx)
movl $0x0, 0x1c(%rcx)
addl (%rax), %edx
movl %edx, 0x14(%rbx)
movq %r14, %rsi
callq 0x4fae
incl 0x10(%rbx)
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::ToBinary(char*)
void Page :: ToBinary (char *bits) {

	// first write the number of records on the page
	((int *) bits)[0] = numRecs;

	char *curPos = bits + sizeof (int);

	// and copy the records one-by-one
	myRecs->MoveToStart ();
	for (int i = 0; i < numRecs; i++) {	
		char *b = myRecs->Current(0)->GetBits();
		
		// copy over the bits of the current record
		memcpy (curPos, b, ((int *) b)[0]);
		curPos += ((int *) b)[0];

		// and traverse the list
		myRecs->Advance ();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x10(%rdi), %eax
movl %eax, (%rsi)
movq 0x8(%rdi), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x18(%rax), %ecx
addl %ecx, 0x1c(%rax)
movl $0x0, 0x18(%rax)
cmpl $0x0, 0x10(%rdi)
jle 0x495c
movq %rsi, %rbx
movq %rdi, %r14
addq $0x4, %rbx
xorl %ebp, %ebp
movq 0x8(%r14), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x287c
movq %rax, %r15
movslq (%rax), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2130
movslq (%r15), %rax
addq %rax, %rbx
movq 0x8(%r14), %rax
movq (%rax), %rax
movq 0x18(%rax), %xmm0
paddd 0x39bd(%rip), %xmm0     # 0x8300
movq %xmm0, 0x18(%rax)
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
incl %ebp
cmpl 0x10(%r14), %ebp
jl 0x4901
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: Page::FromBinary(char*)
void Page :: FromBinary (char *bits) {

	// first read the number of records on the page
	numRecs = ((int *) bits)[0];

	// sanity check
	if (numRecs > 1000000 || numRecs < 0) {
		cerr << "This is probably an error.  Found " << numRecs << " records on a page.\n";
		exit (1);
	}

	// and now get the binary representations of each
	char *curPos = bits + sizeof (int);

	// first, empty out the list of current records
	myRecs->MoveToStart ();
	while (myRecs->RightLength ()) {
		Record temp;
		myRecs->Remove(&temp);
	}

	// now loop through and re-populate it
	Record *temp = new (std::nothrow) Record();
	if (temp == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	curSizeInBytes = sizeof (int);
	for (int i = 0; i < numRecs; i++) {

		// get the length of the current record
		int len = ((int *) curPos)[0];
		curSizeInBytes += len;

		// create the record
		temp->CopyBits(curPos, len);

		// add it
		myRecs->Insert(temp);

		// and move along
		myRecs->Advance ();
		curPos += len;
	}

	delete temp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, 0x10(%rdi)
cmpl $0xf4241, %eax          # imm = 0xF4241
jae 0x4a94
movq %rsi, %r14
movq 0x8(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x18(%rax), %ecx
addl %ecx, 0x1c(%rax)
movl $0x0, 0x18(%rax)
movq 0x8(%rbx), %rax
movq (%rax), %rax
cmpl $0x0, 0x1c(%rax)
je 0x49e0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x25fc
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x4f5a
movq %r15, %rdi
callq 0x2604
movq 0x8(%rbx), %rax
movq (%rax), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x49b7
movq 0x75b9(%rip), %rsi      # 0xbfa0
movl $0x8, %edi
callq 0x23a0
testq %rax, %rax
je 0x4a03
movq %rax, %r15
movq %rax, %rdi
callq 0x25fc
jmp 0x4a06
xorl %r15d, %r15d
testq %r15, %r15
je 0x4abe
movl $0x4, 0x14(%rbx)
cmpl $0x0, 0x10(%rbx)
jle 0x4a72
addq $0x4, %r14
xorl %ebp, %ebp
movslq (%r14), %r12
addl %r12d, 0x14(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2880
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x4fae
movq 0x8(%rbx), %rax
movq (%rax), %rax
movq 0x18(%rax), %xmm0
paddd 0x38a9(%rip), %xmm0     # 0x8300
movq %xmm0, 0x18(%rax)
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
addq %r12, %r14
incl %ebp
cmpl 0x10(%rbx), %ebp
jl 0x4a22
movq %r15, %rdi
callq 0x2604
movl $0x8, %esi
movq %r15, %rdi
callq 0x21a0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x7555(%rip), %rdi      # 0xbff0
leaq 0x386e(%rip), %rsi      # 0x8310
callq 0x2170
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x22f0
leaq 0x387a(%rip), %rsi      # 0x8333
movq %rax, %rdi
jmp 0x4acc
movq 0x74fb(%rip), %rdi      # 0xbfc0
leaq 0x3538(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
movq %rax, %rbx
movq 0x74bb(%rip), %rsi      # 0xbfa0
movq %r15, %rdi
callq 0x20f0
jmp 0x4afc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2604
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: File::GetPage(Page*, long)
void File :: GetPage (Page *putItHere, off_t whichPage) {

	// this is because the first page has no data
	whichPage++;

	if (whichPage >= curLength) {
		cerr << "whichPage " << whichPage << " length " << curLength << endl;
		cerr << "BAD: you tried to read past the end of the file\n";
		exit (1);
	}

	// read in the specified page
	char *bits = new (std::nothrow) char[PAGE_SIZE];
	if (bits == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	lseek (myFilDes, PAGE_SIZE * whichPage, SEEK_SET);
	read (myFilDes, bits, PAGE_SIZE);
	putItHere->FromBinary (bits);
	delete [] bits;
	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
incq %r15
cmpq 0x8(%rdi), %r15
jge 0x4b7c
movq %rsi, %r14
movq 0x7477(%rip), %rsi      # 0xbfa0
movl $0x20000, %edi          # imm = 0x20000
callq 0x22d0
testq %rax, %rax
je 0x4bcc
movq %rax, %r12
movl (%rbx), %edi
shlq $0x11, %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x2360
movl (%rbx), %edi
movl $0x20000, %edx          # imm = 0x20000
movq %r12, %rsi
callq 0x2250
movq %r14, %rdi
movq %r12, %rsi
callq 0x4968
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2210
movq 0x746d(%rip), %r14      # 0xbff0
leaq 0x37be(%rip), %rsi      # 0x8348
movq %r14, %rdi
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x2330
leaq 0x37af(%rip), %rsi      # 0x8353
movq %rax, %rdi
callq 0x2170
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x20e0
leaq 0x3795(%rip), %rsi      # 0x835c
movq %r14, %rdi
jmp 0x4bda
movq 0x73ed(%rip), %rdi      # 0xbfc0
leaq 0x342a(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: File::AddPage(Page*, long)
void File :: AddPage (Page *addMe, off_t whichPage) {

	// this is because the first page has no data
	whichPage++;

	// if we are trying to add past the end of the file, then
	// zero all of the pages out
	if (whichPage >= curLength) {
		
		// do the zeroing
		for (off_t i = curLength; i < whichPage; i++) {
			int foo = 0;
			lseek (myFilDes, PAGE_SIZE * i, SEEK_SET);
			write (myFilDes, &foo, sizeof (int));
		}

		// set the size
		curLength = whichPage + 1;	
	}

	// now write the page
	char *bits = new (std::nothrow) char[PAGE_SIZE];
	if (bits == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	addMe->ToBinary (bits);
	lseek (myFilDes, PAGE_SIZE * whichPage, SEEK_SET);
	write (myFilDes, bits, PAGE_SIZE);
	delete [] bits;
#ifdef F_DEBUG
	cerr << " File: curLength " << curLength << " whichPage " << whichPage << endl;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x1(%rdx), %r14
movq 0x8(%rdi), %r13
cmpq %r13, %r14
jl 0x4c66
movq %rdx, %r15
movq %rbp, 0x10(%rsp)
cmpq %rdx, %r13
jg 0x4c59
movq %r15, %r12
subq %r13, %r12
incq %r12
shlq $0x11, %r13
leaq 0xc(%rsp), %rbp
movl $0x0, 0xc(%rsp)
movl (%rbx), %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2360
movl (%rbx), %edi
movl $0x4, %edx
movq %rbp, %rsi
callq 0x20b0
addq $0x20000, %r13          # imm = 0x20000
decq %r12
jne 0x4c2a
addq $0x2, %r15
movq %r15, 0x8(%rbx)
movq 0x10(%rsp), %rbp
movq 0x7333(%rip), %rsi      # 0xbfa0
movl $0x20000, %edi          # imm = 0x20000
callq 0x22d0
testq %rax, %rax
je 0x4cbf
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
callq 0x48c8
movl (%rbx), %edi
shlq $0x11, %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x2360
movl (%rbx), %edi
movl $0x20000, %edx          # imm = 0x20000
movq %r12, %rsi
callq 0x20b0
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
movq 0x72fa(%rip), %rdi      # 0xbfc0
leaq 0x3337(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: File::Open(int, char*)
void File :: Open (int fileLen, char *fName) {

	// figure out the flags for the system open call
        int mode;
        if (fileLen == 0)
                mode = O_TRUNC | O_RDWR | O_CREAT;
        else
                mode = O_RDWR;

	// actually do the open
        myFilDes = open (fName, mode, S_IRUSR | S_IWUSR);

#ifdef verbose
	cout << "Opening file " << fName << " with "<< curLength << " pages.\n";
#endif

	// see if there was an error
	if (myFilDes < 0) {
		cerr << "BAD!  Open did not work for " << fName << "\n";
		exit (1);
	}

	// read in the buffer if needed
	if (fileLen != 0) {

		// read in the first few bits, which is the page size
		lseek (myFilDes, 0, SEEK_SET);
		read (myFilDes, &curLength, sizeof (off_t));

	} else {
		curLength = 0;
	}

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
movl $0x242, %eax            # imm = 0x242
movl $0x2, %esi
cmovel %eax, %esi
movq %rdx, %rdi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2120
movl %eax, (%rbx)
testl %eax, %eax
js 0x4d3f
testl %ebp, %ebp
je 0x4d32
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2360
movl (%rbx), %edi
addq $0x8, %rbx
movl $0x8, %edx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2250
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x72aa(%rip), %rdi      # 0xbff0
leaq 0x3640(%rip), %rsi      # 0x838d
callq 0x2170
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x3df1(%rip), %rsi      # 0x8b55
movq %rax, %rdi
callq 0x2170
movl $0x1, %edi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/File.cc
// Function: File::Close()
int File :: Close () {

	// write out the current length in pages
	lseek (myFilDes, 0, SEEK_SET);
	write (myFilDes, &curLength, sizeof (off_t));

	// close the file
	close (myFilDes);

	// and return the size
	return curLength;
	
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2360
movl (%rbx), %edi
leaq 0x8(%rbx), %rsi
movl $0x8, %edx
callq 0x20b0
movl (%rbx), %edi
callq 0x2390
movl 0x8(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/./TwoWayList.cc
// Function: TwoWayList<Record>::TwoWayList()
TwoWayList <Type> :: TwoWayList ()
{

	// allocate space for the header
	list = new (std::nothrow) Header;
	if (list == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}
	
	// set up the initial values for an empty list
	list->first = new (std::nothrow) Node;
	if (list->first == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	list->last = new (std::nothrow) Node;
	if (list->last == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	list->current = list->first;
	list->leftSize = 0;
	list->rightSize = 0;
	list->first->next = list->last;
	list->last->previous = list->first;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x71da(%rip), %rsi      # 0xbfa0
movl $0x20, %edi
callq 0x23a0
movq %rax, (%r14)
testq %rax, %rax
je 0x4e60
movq %rax, %rbx
movq 0x71ba(%rip), %rsi      # 0xbfa0
movl $0x18, %edi
callq 0x23a0
testq %rax, %rax
je 0x4e08
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x4e0b
xorl %r14d, %r14d
movq %r14, (%rbx)
testq %r14, %r14
je 0x4e60
movq 0x7186(%rip), %rsi      # 0xbfa0
movl $0x18, %edi
callq 0x23a0
testq %rax, %rax
je 0x4e39
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x4e3b
xorl %eax, %eax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4e60
movq %r14, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
movq %rax, 0x8(%r14)
movq %r14, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x7159(%rip), %rdi      # 0xbfc0
leaq 0x3196(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/./TwoWayList.cc
// Function: TwoWayList<Record>::~TwoWayList()
TwoWayList <Type> :: ~TwoWayList ()
{

	// remove everything
	MoveToStart ();
	while (RightLength ()>0) {
		Type temp;
		Remove (&temp);
	}

	// kill all the nodes
	for (int i = 0; i <= list->leftSize + list->rightSize; i++) {
		list->first = list->first->next;
		delete list->first->previous;
	} 
	delete list->first;
	
	// kill the header
	delete list;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x18(%rax), %ecx
addl %ecx, 0x1c(%rax)
movl $0x0, 0x18(%rax)
movq (%rdi), %rax
cmpl $0x0, 0x1c(%rax)
jle 0x4ed2
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x25fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f5a
movq %r14, %rdi
callq 0x2604
movq (%rbx), %rax
cmpl $0x0, 0x1c(%rax)
jg 0x4eae
movq (%rbx), %rax
movl 0x1c(%rax), %ecx
addl 0x18(%rax), %ecx
js 0x4f19
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movq 0x10(%rcx), %r14
testq %r14, %r14
je 0x4f0a
movq %r14, %rdi
callq 0x5094
movl $0x18, %esi
movq %r14, %rdi
callq 0x21a0
movq (%rbx), %rax
movl 0x1c(%rax), %ecx
addl 0x18(%rax), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0x4ee2
movq (%rax), %r14
testq %r14, %r14
je 0x4f36
movq %r14, %rdi
callq 0x5094
movl $0x18, %esi
movq %r14, %rdi
callq 0x21a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4f48
movl $0x20, %esi
callq 0x21a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x5089
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/./TwoWayList.cc
// Function: TwoWayList<Record>::Remove(Record*)
void
TwoWayList <Type> :: Remove (Type *Item)
{

	Node *temp = list->current->next;
	list->current->next = temp->next;
	temp->next->previous = list->current;
	
	Item->Consume(temp->data);

	delete temp;

	(list->rightSize)--;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %r14
movq 0x8(%r14), %rdx
movq %rdx, 0x8(%rcx)
movq 0x8(%r14), %rdx
movq %rcx, 0x10(%rdx)
movq (%r14), %rsi
movq %rax, %rdi
callq 0x28ec
movq %r14, %rdi
callq 0x5094
movl $0x18, %esi
movq %r14, %rdi
callq 0x21a0
movq (%rbx), %rax
decl 0x1c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/./TwoWayList.cc
// Function: TwoWayList<Record>::Insert(Record*)
void
TwoWayList <Type> :: Insert (Type *Item)
{

	Node *temp = new (std::nothrow) Node;
	if (temp == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	Node *left = list->current;
	Node *right = list->current->next;

	left->next = temp;
	temp->previous = left;
	temp->next = right;
	temp->data = new (std::nothrow) Type;
	if (temp->data == NULL)
	{
		cout << "ERROR : Not enough memory. EXIT !!!\n";
		exit(1);
	}

	right->previous = temp;

	temp->data->Consume (Item);

	list->rightSize += 1;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x6fdc(%rip), %rsi      # 0xbfa0
movl $0x18, %edi
callq 0x23a0
testq %rax, %rax
je 0x4fe6
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x4fe9
xorl %r15d, %r15d
testq %r15, %r15
je 0x5052
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r13
movq %r15, 0x8(%rax)
movq %rax, 0x10(%r15)
movq %r13, 0x8(%r15)
movq 0x6f94(%rip), %rsi      # 0xbfa0
movl $0x8, %edi
callq 0x23a0
testq %rax, %rax
je 0x5028
movq %rax, %r12
movq %rax, %rdi
callq 0x25fc
jmp 0x502b
xorl %r12d, %r12d
movq %r12, (%r15)
testq %r12, %r12
je 0x5052
movq %r15, 0x10(%r13)
movq %r12, %rdi
movq %r14, %rsi
callq 0x28ec
movq (%rbx), %rax
incl 0x1c(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x6f67(%rip), %rdi      # 0xbfc0
leaq 0x2fa4(%rip), %rsi      # 0x8004
callq 0x2170
movl $0x1, %edi
callq 0x21f0
movq %rax, %rbx
movq 0x6f27(%rip), %rsi      # 0xbfa0
movq %r12, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::DBFile()
DBFile::DBFile() {

	heapfile = new File;
	fpath = NULL;
	readbuffer = new Page;
	writebuffer = new Page;
	indicator = 0;
	verify = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
callq 0x4b04
movq %r14, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x18, %edi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
callq 0x46e4
movq %r14, 0x10(%rbx)
movl $0x18, %edi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
callq 0x46e4
movq %r14, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
movb $0x0, 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x5126
movq %rax, %rbx
movl $0x18, %esi
jmp 0x5138
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::Create(char const*, fType, void*)
int DBFile::Create(const char *f_path, fType f_type, void *startup) {

	if (verify)
		return 0;
	fpath = strdup(f_path);
	heapfile->Open(0, fpath);
	verify = true;
	return 1;
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, 0x24(%rdi)
jne 0x51c9
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2340
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x4cdc
movb $0x1, 0x24(%rbx)
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::Load(Schema&, char const*)
void DBFile::Load(Schema &f_schema, const char *loadpath) {
	Record temprecord;
	FILE *tempfile = new FILE;
	tempfile = fopen(loadpath, "r");
	if (!verify)
		return;
	while (temprecord.SuckNextRecord(&f_schema, tempfile))
	{
		Add(temprecord);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
callq 0x25fc
leaq 0x38b8(%rip), %rsi      # 0x8aa2
movq %r15, %rdi
callq 0x21d0
cmpb $0x1, 0x24(%r14)
jne 0x521e
movq %rax, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x261e
testl %eax, %eax
je 0x521e
movq %r14, %rdi
movq %r12, %rsi
callq 0x5246
jmp 0x51ff
movq %rsp, %rdi
callq 0x2604
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2604
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::Add(Record&)
void DBFile::Add(Record &rec) {
	int temp = readbuffer->Append(&rec);
	if (temp == 0)
	{
		heapfile->AddPage(readbuffer, heapfile->Getlast());
		readbuffer->EmptyItOut();
		readbuffer->Append(&rec);
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x4862
testl %eax, %eax
je 0x526d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %r15
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x4da8
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4bea
movq 0x10(%r14), %rdi
callq 0x47b6
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4862
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::Open(char const*)
int DBFile::Open(const char *f_path) {
	if (verify)
		return 0;
	fpath = strdup(f_path);
	heapfile->Open(1, fpath);
	verify = true;
	return 1;

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpb $0x0, 0x24(%rdi)
jne 0x52dd
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2340
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
movl $0x1, %ebp
movl $0x1, %esi
movq %rax, %rdx
callq 0x4cdc
movb $0x1, 0x24(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::MoveFirst()
void DBFile::MoveFirst() {
	if (readbuffer->totalrecords() != 0) {
		heapfile->AddPage(readbuffer, heapfile->Getlast());
		readbuffer->EmptyItOut();
	}
	writebuffer->EmptyItOut();
	heapfile->GetPage(writebuffer, indicator);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x48c4
testl %eax, %eax
je 0x5321
movq (%rbx), %r14
movq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x4da8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4bea
movq 0x10(%rbx), %rdi
callq 0x47b6
movq 0x18(%rbx), %rdi
callq 0x47b6
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movslq 0x20(%rbx), %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4b08
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::Close()
int DBFile::Close() {
	if (!verify)
		return 0;
	if (readbuffer->totalrecords() != 0)
	{
		heapfile->AddPage(readbuffer, heapfile->Getlast());
		readbuffer->EmptyItOut();
	}
	heapfile->Close();
	verify = false;
	return 1;

}

// Assembly:
xorl %eax, %eax
cmpb $0x1, 0x24(%rdi)
jne 0x5399
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x48c4
testl %eax, %eax
je 0x5383
movq (%rbx), %r14
movq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x4da8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4bea
movq 0x10(%rbx), %rdi
callq 0x47b6
movq (%rbx), %rdi
callq 0x4d7c
movb $0x0, 0x24(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::GetNext(Record&)
int DBFile::GetNext(Record &fetchme) {

	if (readbuffer->totalrecords() != 0) {
		heapfile->AddPage(readbuffer, heapfile->Getlast());
		readbuffer->EmptyItOut();
	}
	while (!writebuffer->GetFirst(&fetchme))
	{
		if (++indicator == heapfile->Getlast())
			return 0;
		heapfile->GetPage(writebuffer, indicator);


	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x48c4
testl %eax, %eax
je 0x53db
movq (%r14), %r15
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x4da8
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4bea
movq 0x10(%r14), %rdi
callq 0x47b6
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x4814
movl $0x1, %ebp
testl %eax, %eax
jne 0x5428
movslq 0x20(%r14), %r15
incq %r15
movl %r15d, 0x20(%r14)
movq (%r14), %rdi
callq 0x4da8
cmpq %r15, %rax
je 0x5426
movq (%r14), %rdi
movq 0x18(%r14), %rsi
movslq 0x20(%r14), %rdx
callq 0x4b08
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x4814
jmp 0x53ec
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/DBFile.cc
// Function: DBFile::GetNext(Record&, CNF&, Record&)
int DBFile::GetNext(Record &fetchme, CNF &cnf, Record &literal) {

	ComparisonEngine *compeng = new ComparisonEngine();
	while (GetNext(fetchme)) {
		if (compeng->Compare(&fetchme, &literal, &cnf) != 0)
			return 1;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %edi
callq 0x2190
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x539a
testl %eax, %eax
je 0x5481
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3f56
testl %eax, %eax
je 0x5456
movl $0x1, %eax
jmp 0x5483
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/test.cc
// Function: test2()
void test2 () {

	DBFile dbfile;
	dbfile.Open (rel->path());
	dbfile.MoveFirst ();

	Record temp;

	int counter = 0;
	while (dbfile.GetNext (temp) == 1) {
		counter += 1;
		temp.Print (rel->schema());
		if (counter % 10000 == 0) {
			cout << counter << "\n";
		}
	}
	cout << " scanned " << counter << " recs \n";
	dbfile.Close ();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x50b8
movq 0x504e(%rip), %rsi      # 0xc330
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x52aa
leaq 0x10(%rsp), %rdi
callq 0x52e6
leaq 0x8(%rsp), %rdi
callq 0x25fc
xorl %r13d, %r13d
movl $0x1, %r15d
movl $0xd1b71759, %r12d      # imm = 0xD1B71759
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x539a
cmpl $0x1, %eax
jne 0x7384
movq 0x4ffe(%rip), %rax      # 0xc330
movq 0x78(%rax), %rsi
movq %r14, %rdi
callq 0x2c76
movl %r15d, %eax
imulq %r12, %rax
shrq $0x2d, %rax
imull $0x2710, %eax, %eax     # imm = 0x2710
decl %eax
leal 0x1(%r13), %ebp
cmpl %r13d, %eax
jne 0x737c
movq 0x4c5f(%rip), %rdi      # 0xbfc0
movl %ebp, %esi
callq 0x22f0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x17de(%rip), %rsi      # 0x8b55
callq 0x21c0
incl %r15d
movl %ebp, %r13d
jmp 0x731b
movq 0x4c35(%rip), %rdi      # 0xbfc0
leaq 0x1834(%rip), %rsi      # 0x8bc6
movl $0x9, %edx
callq 0x21c0
movq 0x4c1d(%rip), %rdi      # 0xbfc0
movl %r13d, %esi
callq 0x22f0
leaq 0x181e(%rip), %rsi      # 0x8bd0
movl $0x7, %edx
movq %rax, %rdi
callq 0x21c0
leaq 0x10(%rsp), %rdi
callq 0x5340
leaq 0x8(%rsp), %rdi
callq 0x2604
leaq 0x10(%rsp), %rdi
callq 0x5148
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x73ee
movq %rax, %rbx
jmp 0x7402
jmp 0x73f5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2604
leaq 0x10(%rsp), %rdi
callq 0x5148
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/PrarabdhJoshi[P]DatabaseImplementation/./test.h
// Function: relation::get_cnf(CNF&, Record&)
void get_cnf (CNF &cnf_pred, Record &literal) {
		cout << " Enter CNF predicate (when done press ctrl-D):\n\t";
  		if (yyparse() != 0) {
			std::cout << "Can't parse your CNF.\n";
			exit (1);
		}
		cnf_pred.GrowFromParseTree (final, schema (), literal); // constructs CNF predicate
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x4727(%rip), %rdi      # 0xbfc0
leaq 0x1427(%rip), %rsi      # 0x8cc7
movl $0x30, %edx
callq 0x21c0
callq 0x5490
testl %eax, %eax
jne 0x78d1
leaq 0x49a6(%rip), %rax      # 0xc260
movq (%rax), %rsi
movq 0x78(%r15), %rdx
movq %r14, %rdi
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x38a2
movq 0x46e8(%rip), %rdi      # 0xbfc0
leaq 0x1419(%rip), %rsi      # 0x8cf8
callq 0x2170
movl $0x1, %edi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/yupyub[P]PathFinding_Visual/Dijkstra.cpp
// Function: Dijkstra::Init(int, int)
Visual Dijkstra::Init(int ts,int mnum){
    if(ts<10000) timeSet = 10000;
    timeSet = ts;
    dx[0] = dx[2] = dy[1] = dy[3] = 0;
    dx[1] = dy[0] = 1;
    dx[3] = dy[2] = -1;
    Visual vv;
    vv.read_map(mnum);
    for(int i = 0;i<vv.N;i++){
        for(int j = 0;j<vv.M;j++){
            vv.state[i][j] = 0;
            dist[i][j] = INF;
            if(vv.map[i][j] == 2){
                sx = i;
                sy = j;
            }
            else if(vv.map[i][j] == 3){
                ex = i;
                ey = j;
            }
        }
    }
    return vv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x270f, %edx           # imm = 0x270F
jg 0x14dc
movl $0x2710, 0x75318(%r14) # imm = 0x2710
movl %edx, 0x75318(%r14)
xorl %ebp, %ebp
movl %ebp, 0x75338(%r14)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x75330(%r14)
movl %ebp, 0x75324(%r14)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x7531c(%r14)
movabsq $0x1ffffffff, %rax      # imm = 0x1FFFFFFFF
movq %rax, 0x75328(%r14)
movq %rbx, %rdi
movl %ecx, %esi
callq 0x3078
cmpl %ebp, 0x4e200(%rbx)
jle 0x15d3
leaq 0x27100(%rbx), %rax
leaq 0x4e208(%r14), %rcx
leaq 0x75310(%r14), %rdx
leaq 0x75314(%r14), %rsi
leaq 0x75308(%r14), %rdi
addq $0x7530c, %r14          # imm = 0x7530C
xorl %r8d, %r8d
movl $0x320, %r9d            # imm = 0x320
cmpl $0x0, 0x4e204(%rbx)
jle 0x15be
xorl %r10d, %r10d
movl $0x0, (%rax,%r10,4)
movl $0x3ade68b1, (%rcx,%r10,4) # imm = 0x3ADE68B1
movl -0x27100(%rax,%r10,4), %ebp
movq %rdi, %r11
movq %r14, %r15
cmpl $0x2, %ebp
je 0x15a9
cmpl $0x3, %ebp
jne 0x15af
movq %rdx, %r11
movq %rsi, %r15
movl %r8d, (%r11)
movl %r10d, (%r15)
incq %r10
movslq 0x4e204(%rbx), %r11
cmpq %r11, %r10
jl 0x157b
incq %r8
movslq 0x4e200(%rbx), %r10
addq %r9, %rax
addq %r9, %rcx
cmpq %r10, %r8
jl 0x156f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yupyub[P]PathFinding_Visual/Dijkstra.cpp
// Function: Dijkstra::sol_path(int, int)
void Dijkstra::sol_path(int x,int y){
    if(dist[x][y] == 0) return;
    vv.state[x][y] = 1;
    for(int i = 0;i<4;i++){
        int nx = x+dx[i];
        int ny = y+dy[i];
        if(nx<0||ny<0||nx>=vv.N||ny>=vv.M) continue;
        if(dist[nx][ny] == dist[x][y] -1){
            sol_path(nx,ny);
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movslq %esi, %rcx
movslq %edx, %rax
imulq $0x320, %rcx, %rcx      # imm = 0x320
leaq (%rdi,%rcx), %rdx
addq $0x4e208, %rdx          # imm = 0x4E208
cmpl $0x0, (%rdx,%rax,4)
je 0x1697
movl %esi, %ebp
movq %rdi, %r14
leaq 0x4e208(%rdi), %r15
leaq (%rdx,%rax,4), %r12
addq %rdi, %rcx
movl $0x1, 0x27100(%rcx,%rax,4)
movl $0x1d4cb, %r13d         # imm = 0x1D4CB
movl -0x10(%r14,%r13,4), %esi
addl %ebp, %esi
movl $0x4, %eax
js 0x1687
movl (%r14,%r13,4), %edx
addl %ebx, %edx
js 0x1687
cmpl 0x4e200(%r14), %esi
jge 0x1687
cmpl 0x4e204(%r14), %edx
jge 0x1687
movl %esi, %eax
movl %edx, %ecx
imulq $0x320, %rax, %rdi      # imm = 0x320
addq %r15, %rdi
movl (%r12), %r8d
decl %r8d
xorl %eax, %eax
cmpl %r8d, (%rdi,%rcx,4)
jne 0x1687
movq %r14, %rdi
callq 0x15e2
movl $0x1, %eax
testb $0x3, %al
jne 0x1697
incq %r13
cmpq $0x1d4cf, %r13          # imm = 0x1D4CF
jne 0x1635
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yupyub[P]PathFinding_Visual/DFS.cpp
// Function: DFS::Init(int, int)
void DFS::Init(int ts,int mnum){
    if(ts<10000) timeSet = 10000;
    timeSet = ts;
    scnt = 0;
    itr = 0;
    dx[0] = dx[2] = dy[1] = dy[3] = 0;
    dx[1] = dy[0] = 1;
    dx[3] = dy[2] = -1;
    vv.read_map(mnum);
    for(int i = 0;i<vv.N;i++){
        for(int j = 0;j<vv.M;j++){
            dist[i][j] = INF;
            vv.state[i][j] = 0;
            if(vv.map[i][j] == 2){
                sx = i;
                sy = j;
            }
            else if(vv.map[i][j] == 3){
                ex = i;
                ey = j;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x270f, %esi           # imm = 0x270F
jg 0x2374
movl $0x2710, 0x75320(%rbx)  # imm = 0x2710
movl %esi, 0x75320(%rbx)
movq $0x0, 0x75318(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x75340(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x75338(%rbx)
movl %ebp, 0x7532c(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x75324(%rbx)
movabsq $0x1ffffffff, %rax      # imm = 0x1FFFFFFFF
movq %rax, 0x75330(%rbx)
movq %rbx, %rdi
movl %edx, %esi
callq 0x3078
cmpl %ebp, 0x4e200(%rbx)
jle 0x246a
leaq 0x4e208(%rbx), %rax
leaq 0x75310(%rbx), %rcx
leaq 0x75314(%rbx), %rdx
leaq 0x75308(%rbx), %rsi
leaq 0x7530c(%rbx), %rdi
xorl %r8d, %r8d
cmpl $0x0, 0x4e204(%rbx)
jle 0x2455
xorl %r9d, %r9d
movl $0x3ade68b1, (%rax,%r9,4) # imm = 0x3ADE68B1
movl $0x0, -0x27108(%rax,%r9,4)
movl -0x4e208(%rax,%r9,4), %ebp
movq %rsi, %r10
movq %rdi, %r11
cmpl $0x2, %ebp
je 0x2440
cmpl $0x3, %ebp
jne 0x2446
movq %rcx, %r10
movq %rdx, %r11
movl %r8d, (%r10)
movl %r9d, (%r11)
incq %r9
movslq 0x4e204(%rbx), %r10
cmpq %r10, %r9
jl 0x240e
incq %r8
movslq 0x4e200(%rbx), %r9
addq $0x320, %rax            # imm = 0x320
cmpq %r9, %r8
jl 0x2402
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop