LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/Record.cc
// Function: Record::Print(Schema*)
void Record :: Print (Schema *mySchema) {

	int n = mySchema->GetNumAtts();
	Attribute *atts = mySchema->GetAtts();

	// loop through all of the attributes
	for (int i = 0; i < n; i++) {

		// print the attribute name
		cout << atts[i].name << ": ";

		// use the i^th slot at the head of the record to get the
		// offset to the correct attribute in the record
		int pointer = ((int *) bits)[i + 1];

		// here we determine the type, which given in the schema;
		// depending on the type we then print out the contents
		cout << "[";

		// first is integer
		if (atts[i].myType == Int) {
			int *myInt = (int *) &(bits[pointer]);
			cout << *myInt;	

		// then is a double
		} else if (atts[i].myType == Double) {
			double *myDouble = (double *) &(bits[pointer]);
			cout << *myDouble;	

		// then is a character string
		} else if (atts[i].myType == String) {
			char *myString = (char *) &(bits[pointer]);
			cout << myString;	
		} 

		cout << "]";

		// print out a comma as needed to make things pretty
		if (i != n - 1) {
			cout << ", ";
		}
	}

	cout << "\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3f54
movl %eax, %r14d
movq %r15, %rdi
callq 0x3f58
leal -0x1(%r14), %ecx
xorl %r13d, %r13d
testl %r14d, %r14d
cmovlel %r13d, %r14d
movq %rax, %r15
shlq $0x2, %r14
shlq $0x2, %rcx
movq %rcx, (%rsp)
movq 0x83ce(%rip), %r12      # 0xafc0
cmpq %r13, %r14
je 0x2c9d
movq (%r15,%r13,4), %rsi
movq %r12, %rdi
callq 0x2140
movq %rax, %rdi
leaq 0x4fec(%rip), %rsi      # 0x7bfd
callq 0x2140
movq (%rbx), %rax
movslq 0x4(%rax,%r13), %rbp
movq %r12, %rdi
leaq 0x4401(%rip), %rsi      # 0x7029
callq 0x2140
movl 0x8(%r15,%r13,4), %eax
cmpl $0x2, %eax
je 0x2c62
cmpl $0x1, %eax
je 0x2c50
testl %eax, %eax
jne 0x2c70
movq (%rbx), %rax
movl (%rax,%rbp), %esi
movq %r12, %rdi
callq 0x22b0
jmp 0x2c70
movq (%rbx), %rax
movsd (%rax,%rbp), %xmm0
movq %r12, %rdi
callq 0x2270
jmp 0x2c70
addq (%rbx), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2140
movq %r12, %rdi
leaq 0x43b1(%rip), %rsi      # 0x702b
callq 0x2140
cmpq %r13, (%rsp)
je 0x2c94
movq %r12, %rdi
leaq 0x439e(%rip), %rsi      # 0x702d
callq 0x2140
addq $0x4, %r13
jmp 0x2bf2
movq 0x831c(%rip), %rdi      # 0xafc0
leaq 0x4eba(%rip), %rsi      # 0x7b65
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
nop
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/Comparison.cc
// Function: Comparison::Print()
void Comparison :: Print () {

	cout << "Att " << whichAtt1 << " from ";

	if (operand1 == Left)
		cout << "left record ";
	else if (operand1 == Right)
		cout << "right record ";
	else 
		cout << "literal record ";


	if (op == LessThan)
		cout << "< ";
	else if (op == GreaterThan)
		cout << "> ";
	else
		cout << "= ";


	cout << "Att " << whichAtt2 << " from ";

	if (operand2 == Left)
		cout << "left record ";
	else if (operand2 == Right)
		cout << "right record ";
	else
		cout << "literal record ";
 

	if (attType == Int)
		cout << "(Int)";
	else if (attType == Double)
		cout << "(Double)";
	else
		cout << "(String)";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x82d9(%rip), %rbx      # 0xafc0
leaq 0x438e(%rip), %rsi      # 0x707c
movq %rbx, %rdi
callq 0x2140
movl 0x4(%r14), %esi
movq %rax, %rdi
callq 0x22b0
leaq 0x4ec6(%rip), %r13      # 0x7bcf
movq %rax, %rdi
movq %r13, %rsi
callq 0x2140
movl (%r14), %eax
cmpl $0x1, %eax
leaq 0x436d(%rip), %rbp      # 0x708e
leaq 0x4374(%rip), %r15      # 0x709c
movq %r15, %rsi
cmoveq %rbp, %rsi
testl %eax, %eax
leaq 0x4349(%rip), %r12      # 0x7081
cmoveq %r12, %rsi
movq %rbx, %rdi
callq 0x2140
movl 0x14(%r14), %eax
cmpl $0x1, %eax
leaq 0x435d(%rip), %rcx      # 0x70af
leaq 0x4359(%rip), %rdx      # 0x70b2
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x4346(%rip), %rsi      # 0x70ac
cmovneq %rdx, %rsi
movq %rbx, %rdi
callq 0x2140
movq %rbx, %rdi
leaq 0x4300(%rip), %rsi      # 0x707c
callq 0x2140
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x22b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x2140
movl 0x8(%r14), %eax
cmpl $0x1, %eax
cmoveq %rbp, %r15
testl %eax, %eax
cmoveq %r12, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
movl 0x10(%r14), %eax
cmpl $0x1, %eax
leaq 0x42f9(%rip), %rcx      # 0x70bb
leaq 0x42fb(%rip), %rdx      # 0x70c4
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x42df(%rip), %rsi      # 0x70b5
cmovneq %rdx, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/Comparison.cc
// Function: OrderMaker::OrderMaker(Schema*)
OrderMaker :: OrderMaker(Schema *schema) {
	numAtts = 0;

	int n = schema->GetNumAtts();
	Attribute *atts = schema->GetAtts();

	for (int i = 0; i < n; i++) {
		if (atts[i].myType == Int) {
			whichAtts[numAtts] = i;
			whichTypes[numAtts] = Int;
			numAtts++;
		}
	}

	// now add in the doubles
	for (int i = 0; i < n; i++) {
                if (atts[i].myType == Double) {
                        whichAtts[numAtts] = i;
                        whichTypes[numAtts] = Double;
                        numAtts++;
                }
        }

	// and finally the strings
        for (int i = 0; i < n; i++) {
                if (atts[i].myType == String) {
                        whichAtts[numAtts] = i;
                        whichTypes[numAtts] = String;
                        numAtts++;
                }
        }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
andl $0x0, (%rdi)
movq %rsi, %rdi
callq 0x3f54
movl %eax, %r14d
movq %r15, %rdi
callq 0x3f58
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
leaq 0x8(%rax), %rdx
cmpq %rcx, %r14
je 0x2e48
cmpl $0x0, (%rdx)
jne 0x2e3f
movslq (%rbx), %rsi
movl %ecx, 0x4(%rbx,%rsi,4)
movslq (%rbx), %rsi
andl $0x0, 0x54(%rbx,%rsi,4)
incl %esi
movl %esi, (%rbx)
incq %rcx
addq $0x10, %rdx
jmp 0x2e22
leaq 0x8(%rax), %rcx
xorl %edx, %edx
cmpq %rdx, %r14
je 0x2e77
cmpl $0x1, (%rcx)
jne 0x2e6e
movslq (%rbx), %rsi
movl %edx, 0x4(%rbx,%rsi,4)
movslq (%rbx), %rsi
movl $0x1, 0x54(%rbx,%rsi,4)
incl %esi
movl %esi, (%rbx)
incq %rdx
addq $0x10, %rcx
jmp 0x2e4e
addq $0x8, %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x2ea6
cmpl $0x2, (%rax)
jne 0x2e9d
movslq (%rbx), %rdx
movl %ecx, 0x4(%rbx,%rdx,4)
movslq (%rbx), %rdx
movl $0x2, 0x54(%rbx,%rdx,4)
incl %edx
movl %edx, (%rbx)
incq %rcx
addq $0x10, %rax
jmp 0x2e7d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/Comparison.cc
// Function: OrderMaker::Print()
void OrderMaker :: Print () {
	printf("NumAtts = %5d\n", numAtts);
	for (int i = 0; i < numAtts; i++)
	{
		printf("%3d: %5d ", i, whichAtts[i]);
		if (whichTypes[i] == Int)
			printf("Int\n");
		else if (whichTypes[i] == Double)
			printf("Double\n");
		else
			printf("String\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %esi
leaq 0x420a(%rip), %rdi      # 0x70cd
xorl %eax, %eax
callq 0x2050
leaq 0x420b(%rip), %r14      # 0x70dc
leaq 0x438b(%rip), %r12      # 0x7263
leaq 0x437d(%rip), %r13      # 0x725c
leaq 0x4384(%rip), %rbp      # 0x726a
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x2f22
movl 0x4(%rbx,%r15,4), %edx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2050
movl 0x54(%rbx,%r15,4), %eax
cmpl $0x1, %eax
movq %r13, %rdi
cmoveq %r12, %rdi
testl %eax, %eax
cmoveq %rbp, %rdi
callq 0x2250
incq %r15
jmp 0x2ee9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x7fd2(%rip), %r14      # 0xafc0
leaq 0x40f4(%rip), %r12      # 0x70e9
movq %rdi, %rbp
movslq 0x25d0(%rbx), %rax
cmpq %rax, %r15
jge 0x30a0
movq %r14, %rdi
leaq 0x40d4(%rip), %rsi      # 0x70e6
callq 0x2140
movq %rbp, (%rsp)
xorl %r13d, %r13d
movslq 0x2580(%rbx,%r15,4), %rax
cmpq %rax, %r13
jge 0x3057
movq %rbp, %rdi
callq 0x2cd2
movslq 0x2580(%rbx,%r15,4), %rax
decq %rax
cmpq %rax, %r13
jge 0x304e
movq %r14, %rdi
movq %r12, %rsi
callq 0x2140
incq %r13
addq $0x18, %rbp
jmp 0x301e
movq %r14, %rdi
leaq 0x408d(%rip), %rsi      # 0x70ee
callq 0x2140
movslq 0x25d0(%rbx), %rax
decq %rax
cmpq %rax, %r15
leaq 0x4aeb(%rip), %rsi      # 0x7b65
leaq 0x4070(%rip), %rax      # 0x70f1
cmovlq %rax, %rsi
movq %r14, %rdi
callq 0x2140
incq %r15
movq (%rsp), %rbp
addq $0x1e0, %rbp            # imm = 0x1E0
jmp 0x2ff8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4031(%rip), %rsi      # 0x70f7
movq %rax, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x2210
cmpl $0x3, %ebp
jae 0x30fb
movl %ebp, %eax
leaq 0x3f8f(%rip), %rcx      # 0x7070
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movl (%rbx), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2210
incl (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x7eee(%rip), %rdi      # 0xaff0
leaq 0x4019(%rip), %rsi      # 0x7122
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rdi
callq 0x27f4
movq %rax, %r12
movq %r15, %rdi
callq 0x27f4
movq %rax, %r13
movslq (%r14), %rbp
xorl %r15d, %r15d
cmpq %rbp, %r15
jge 0x3b6f
movslq 0x4(%r14,%r15,4), %rax
movslq 0x4(%r12,%rax,4), %rdi
addq %r12, %rdi
movslq 0x4(%rbx,%r15,4), %rax
movslq 0x4(%r13,%rax,4), %rsi
addq %r13, %rsi
movl 0x54(%r14,%r15,4), %eax
cmpl $0x1, %eax
je 0x3b4b
testl %eax, %eax
jne 0x3b61
movl (%rsi), %eax
cmpl %eax, (%rdi)
jl 0x3b73
jle 0x3b6a
jmp 0x3b77
movsd (%rdi), %xmm0
movsd (%rsi), %xmm1
ucomisd %xmm0, %xmm1
ja 0x3b73
ucomisd %xmm1, %xmm0
jbe 0x3b6a
jmp 0x3b77
callq 0x2200
testl %eax, %eax
jne 0x3b7a
incq %r15
jmp 0x3b14
xorl %eax, %eax
jmp 0x3b7a
pushq $-0x1
jmp 0x3b79
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
movq %rcx, 0x8(%rsp)
movslq 0x25d0(%rbx), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r13
jge 0x3c0a
movl 0x2580(%rbx,%r13,4), %eax
pushq $-0x1
popq %rbp
movq 0x8(%rsp), %r12
incq %rbp
cltq
cmpq %rax, %rbp
jge 0x3bfc
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x3c24
testl %eax, %eax
jne 0x3bfc
movl 0x2580(%rbx,%r13,4), %eax
leal -0x1(%rax), %ecx
addq $0x18, %r12
cmpq %rcx, %rbp
jne 0x3bca
jmp 0x3c0a
incq %r13
addq $0x1e0, 0x8(%rsp)       # imm = 0x1E0
jmp 0x3ba9
xorl %eax, %eax
cmpq 0x10(%rsp), %r13
setge %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl (%rdi), %r15d
movq 0x8(%rdi), %r12
xorl %r14d, %r14d
testl %r15d, %r15d
cmovlel %r14d, %r15d
pushq $-0x1
popq %rbp
cmpq %r14, %r15
je 0x3ef4
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x2200
testl %eax, %eax
je 0x3ef1
incq %r14
addq $0x10, %r12
jmp 0x3ed3
movl %r14d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movl (%rdi), %r15d
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
movq 0x8(%rdi), %r12
shlq $0x4, %r15
addq $0x10, %r15
xorl %ecx, %ecx
leaq 0x10(%rcx), %r13
cmpq %r13, %r15
je 0x3f47
movq (%r12,%rcx), %rsi
movq %r14, %rdi
callq 0x2200
movq %r13, %rcx
testl %eax, %eax
jne 0x3f26
movl -0x8(%r12,%r13), %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6af6(%rip), %rax      # 0xad40
movq %rax, (%rdi)
movabsq $0x400000000, %rax      # imm = 0x400000000
movq %rax, 0x10(%rdi)
movq 0x6d3e(%rip), %rsi      # 0xafa0
pushq $0x8
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x4286
movq %rax, %r14
movq %rax, %rdi
callq 0x4858
movq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andq $0x0, 0x8(%rbx)
movq 0x6d2e(%rip), %rdi      # 0xafc0
leaq 0x2d6b(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
movq %rax, %rbx
movq 0x6cf0(%rip), %rsi      # 0xafa0
movq %r14, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x25bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x435c
movl %eax, %ebp
movq %r14, %rdi
callq 0x25c2
testl %ebp, %ebp
jne 0x430e
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 0x25c2
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x49a8
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
cmpl $0x0, 0x1c(%rax)
je 0x4399
movq %r14, %rsi
callq 0x49be
decl 0x10(%rbx)
movq %r14, %rdi
callq 0x27f4
movl (%rax), %eax
subl %eax, 0x14(%rbx)
pushq $0x1
popq %rax
jmp 0x439b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x27f4
movq %rax, %r15
movl (%rax), %ecx
addl 0x14(%rbx), %ecx
xorl %eax, %eax
cmpl $0x20000, %ecx          # imm = 0x20000
jg 0x43ea
movq 0x8(%rbx), %rdi
callq 0x4a0c
movl (%r15), %eax
addl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x4a26
incl 0x10(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %eax
movl %eax, (%rsi)
addq $0x4, %rbx
movq 0x8(%rdi), %rdi
callq 0x49a8
xorl %ebp, %ebp
cmpl 0x10(%r14), %ebp
jge 0x4452
movq 0x8(%r14), %rdi
xorl %esi, %esi
callq 0x4ae2
movq %rax, %rdi
callq 0x27f4
movq %rax, %r15
movslq (%rax), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2110
movslq (%r15), %rax
addq %rax, %rbx
movq 0x8(%r14), %rdi
callq 0x4afe
incl %ebp
jmp 0x4415
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x453f
movq %rsi, %r14
addq $0x4, %r14
movq 0x8(%rbx), %rdi
callq 0x49a8
leaq 0x8(%rsp), %r15
movq 0x8(%rbx), %rax
movq (%rax), %rax
cmpl $0x0, 0x1c(%rax)
je 0x44bd
movq %r15, %rdi
callq 0x25bc
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x49be
movq %r15, %rdi
callq 0x25c2
jmp 0x4492
movq 0x6adc(%rip), %rsi      # 0xafa0
pushq $0x8
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x4569
movq %rax, %r15
movq %rax, %rdi
callq 0x25bc
movl $0x4, 0x14(%rbx)
xorl %ebp, %ebp
cmpl 0x10(%rbx), %ebp
jge 0x451f
movslq (%r14), %r12
addl %r12d, 0x14(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x27f8
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x4a26
movq 0x8(%rbx), %rdi
callq 0x4afe
addq %r12, %r14
incl %ebp
jmp 0x44e9
movq %r15, %rdi
callq 0x25c2
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x2170
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6aaa(%rip), %rdi      # 0xaff0
leaq 0x2dd3(%rip), %rsi      # 0x7320
callq 0x2140
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x22b0
leaq 0x2ddf(%rip), %rsi      # 0x7343
movq %rax, %rdi
jmp 0x4577
movq 0x6a50(%rip), %rdi      # 0xafc0
leaq 0x2a8d(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
movq %rax, %rbx
movq 0x6a12(%rip), %rsi      # 0xafa0
movq %r15, %rdi
callq 0x20e0
jmp 0x45a5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25c2
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4626
movq %rsi, %r14
movq 0x69cd(%rip), %rsi      # 0xafa0
movl $0x20000, %edi          # imm = 0x20000
callq 0x22a0
testq %rax, %rax
je 0x4676
movq %rax, %r12
movl (%rbx), %edi
shlq $0x11, %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x2320
movl (%rbx), %edi
movl $0x20000, %edx          # imm = 0x20000
movq %r12, %rsi
callq 0x2220
movq %r14, %rdi
movq %r12, %rsi
callq 0x445e
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21e0
movq 0x69c3(%rip), %r14      # 0xaff0
leaq 0x2d24(%rip), %rsi      # 0x7358
movq %r14, %rdi
callq 0x2140
movq %rax, %rdi
movq %r15, %rsi
callq 0x22f0
leaq 0x2d15(%rip), %rsi      # 0x7363
movq %rax, %rdi
callq 0x2140
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x20d0
leaq 0x2cfb(%rip), %rsi      # 0x736c
movq %r14, %rdi
jmp 0x4684
movq 0x6943(%rip), %rdi      # 0xafc0
leaq 0x2980(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %r13
movq 0x8(%rdi), %r14
cmpq %r14, %r13
jl 0x4711
movq %rdx, %r12
movq %rbp, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r14, %r13
shlq $0x11, %r13
leaq 0x4(%rsp), %rbp
pushq $0x4
popq %r15
cmpq %r12, %r14
jg 0x46ff
andl $0x0, 0x4(%rsp)
movl (%rbx), %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2320
movl (%rbx), %edi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x20a0
incq %r14
addq $0x20000, %r13          # imm = 0x20000
jmp 0x46d0
addq $0x2, %r12
movq %r12, 0x8(%rbx)
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rbp
movq 0x6888(%rip), %rsi      # 0xafa0
movl $0x20000, %edi          # imm = 0x20000
callq 0x22a0
testq %rax, %rax
je 0x476a
movq %rax, %r15
movq %rbp, %rdi
movq %rax, %rsi
callq 0x43f4
movl (%rbx), %edi
shlq $0x11, %r13
movq %r13, %rsi
xorl %edx, %edx
callq 0x2320
movl (%rbx), %edi
movl $0x20000, %edx          # imm = 0x20000
movq %r15, %rsi
callq 0x20a0
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
movq 0x684f(%rip), %rdi      # 0xafc0
leaq 0x288c(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x2
popq %rsi
cmovel %eax, %esi
movq %rdx, %rdi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2100
movl %eax, (%rbx)
testl %eax, %eax
js 0x47e2
testl %ebp, %ebp
je 0x47d8
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2320
movl (%rbx), %edi
addq $0x8, %rbx
pushq $0x8
popq %rdx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2220
andq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x6807(%rip), %rdi      # 0xaff0
leaq 0x2bad(%rip), %rsi      # 0x739d
callq 0x2140
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x335e(%rip), %rsi      # 0x7b65
movq %rax, %rdi
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2320
movl (%rbx), %edi
leaq 0x8(%rbx), %rsi
pushq $0x8
popq %rdx
callq 0x20a0
movl (%rbx), %edi
callq 0x2350
movl 0x8(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x673a(%rip), %rsi      # 0xafa0
pushq $0x20
popq %rdi
callq 0x2360
movq %rax, (%r14)
testq %rax, %rax
je 0x48e0
movq %rax, %rbx
movq 0x6720(%rip), %rsi      # 0xafa0
pushq $0x18
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x48d5
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, (%rbx)
movq 0x66fb(%rip), %rsi      # 0xafa0
pushq $0x18
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x48db
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
andq $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movq %r14, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andq $0x0, (%rbx)
jmp 0x48e0
andq $0x0, 0x8(%rbx)
movq 0x66d9(%rip), %rdi      # 0xafc0
leaq 0x2716(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x49a8
movq %rsp, %r14
movq (%rbx), %rax
movl 0x1c(%rax), %ecx
testl %ecx, %ecx
jle 0x4935
movq %r14, %rdi
callq 0x25bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x49be
movq %r14, %rdi
callq 0x25c2
jmp 0x490e
xorl %ebp, %ebp
pushq $0x18
popq %r14
addl 0x18(%rax), %ecx
movq (%rax), %r15
cmpl %ecx, %ebp
jg 0x4972
movq 0x8(%r15), %rcx
movq %rcx, (%rax)
movq 0x10(%rcx), %r15
testq %r15, %r15
je 0x495d
movq %r15, %rdi
callq 0x4b2c
movq %r15, %rdi
movq %r14, %rsi
callq 0x2170
incl %ebp
movq (%rbx), %rax
movl 0x1c(%rax), %ecx
jmp 0x493b
testq %r15, %r15
je 0x497f
movq %r15, %rdi
callq 0x4b2c
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x2170
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x2170
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x4b20
// File: /workspace/github_cpp_makefile_star2_O2/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 %rcx, 0x10(%rdx)
movq (%r14), %rsi
movq %rax, %rdi
callq 0x2862
movq %r14, %rdi
callq 0x4b2c
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2170
movq (%rbx), %rax
decl 0x1c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6564(%rip), %rsi      # 0xafa0
pushq $0x18
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x4aac
movq %rax, %r15
andq $0x0, (%rax)
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r13
movq %r15, 0x8(%rax)
movq %rax, 0x10(%r15)
movq %r13, 0x8(%r15)
movq 0x6532(%rip), %rsi      # 0xafa0
pushq $0x8
popq %rdi
callq 0x2360
testq %rax, %rax
je 0x4aa8
movq %rax, %r12
movq %rax, %rdi
callq 0x25bc
movq %r12, (%r15)
movq %r15, 0x10(%r13)
movq %r12, %rdi
movq %r14, %rsi
callq 0x2862
movq (%rbx), %rax
incl 0x1c(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
andq $0x0, (%r15)
movq 0x650d(%rip), %rdi      # 0xafc0
leaq 0x254a(%rip), %rsi      # 0x7004
callq 0x2140
pushq $0x1
popq %rdi
callq 0x21c0
movq %rax, %rbx
movq 0x64cf(%rip), %rsi      # 0xafa0
movq %r12, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/./TwoWayList.cc
// Function: TwoWayList<Record>::Current(int)
Type* 
TwoWayList <Type> ::  Current (int offset)
{
	Node *temp = list->current->next;
	for (int i = 0; i < offset; i++) {
		temp = temp->next;
	}
	return temp->data;
}

// Assembly:
movq (%rdi), %rax
movq 0x10(%rax), %rax
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
incl %ecx
movq 0x8(%rax), %rax
decl %ecx
jne 0x4af2
movq (%rax), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x10
popq %rdi
callq 0x2160
movq %rax, %r14
movq %rax, %rdi
callq 0x45ae
movq %r14, (%rbx)
andq $0x0, 0x8(%rbx)
pushq $0x18
popq %rdi
callq 0x2160
movq %rax, %r14
movq %rax, %rdi
callq 0x423c
movq %r14, 0x10(%rbx)
pushq $0x18
popq %rdi
callq 0x2160
movq %rax, %r14
movq %rax, %rdi
callq 0x423c
movq %r14, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
movb $0x0, 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x4bae
movq %rax, %rbx
pushq $0x18
jmp 0x4bba
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4c49
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2300
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x4786
movb $0x1, 0x24(%rbx)
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x25bc
leaq 0x2e48(%rip), %rsi      # 0x7ab2
movq %r15, %rdi
callq 0x21a0
cmpb $0x1, 0x24(%r14)
jne 0x4c9e
movq %rax, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x25da
testl %eax, %eax
je 0x4c9e
movq %r14, %rdi
movq %r12, %rsi
callq 0x4cc6
jmp 0x4c7f
movq %rsp, %rdi
callq 0x25c2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x25c2
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43a4
testl %eax, %eax
je 0x4ced
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %r15
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x4848
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4692
movq 0x10(%r14), %rdi
callq 0x42fe
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x43a4
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4d58
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2300
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rax, %rdx
callq 0x4786
movb $0x1, 0x24(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43f0
testl %eax, %eax
je 0x4d9d
movq (%rbx), %r14
movq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x4848
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4692
movq 0x10(%rbx), %rdi
callq 0x42fe
movq 0x18(%rbx), %rdi
callq 0x42fe
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movslq 0x20(%rbx), %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x45b2
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4e13
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x43f0
testl %eax, %eax
je 0x4dff
movq (%rbx), %r14
movq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x4848
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4692
movq 0x10(%rbx), %rdi
callq 0x42fe
movq (%rbx), %rdi
callq 0x481e
movb $0x0, 0x24(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43f0
testl %eax, %eax
je 0x4e55
movq (%r14), %r15
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x4848
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4692
movq 0x10(%r14), %rdi
callq 0x42fe
pushq $0x1
popq %rbp
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x435c
testl %eax, %eax
jne 0x4e94
movslq 0x20(%r14), %r15
incq %r15
movl %r15d, 0x20(%r14)
movq (%r14), %rdi
callq 0x4848
cmpq %r15, %rax
je 0x4e92
movq (%r14), %rdi
movq 0x18(%r14), %rsi
movslq 0x20(%r14), %rdx
callq 0x45b2
jmp 0x4e58
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x1
popq %rdi
callq 0x2160
movq %rax, %r13
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x4e14
testl %eax, %eax
je 0x4eeb
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3b8a
testl %eax, %eax
je 0x4ec5
jmp 0x4eed
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/PrarabdhJoshi[P]DatabaseImplementation/test.cc
// Function: test1()
void test1 () {
cout<<"here";
	DBFile dbfile;
	cout << " DBFile will be created at " << rel->path () << endl;
	dbfile.Create (rel->path(), heap, NULL);

	char tbl_path[100]; // construct path of the tpch flat text file
	sprintf (tbl_path, "%s%s.tbl", tpch_dir, rel->name()); 
	cout << " tpch file will be loaded from " << tbl_path << endl;
      	dbfile.Load (*(rel->schema ()), tbl_path);
	dbfile.Close ();
	
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq 0x48c9(%rip), %rbx      # 0xafc0
leaq 0x148e(%rip), %rsi      # 0x7b8c
movq %rbx, %rdi
callq 0x2140
leaq 0x8(%rsp), %rdi
callq 0x4b4c
leaq 0x147a(%rip), %rsi      # 0x7b91
movq %rbx, %rdi
callq 0x2140
movq 0x4bea(%rip), %rsi      # 0xb310
addq $0x10, %rsi
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20d0
movq 0x4bcf(%rip), %rsi      # 0xb310
addq $0x10, %rsi
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4c1c
movq 0x4ac6(%rip), %rdx      # 0xb220
movq 0x4baf(%rip), %rax      # 0xb310
movq (%rax), %rcx
leaq 0x1442(%rip), %rsi      # 0x7bad
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x2070
movq 0x4842(%rip), %rdi      # 0xafc0
leaq 0x1431(%rip), %rsi      # 0x7bb6
callq 0x2140
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20d0
movq 0x4b6a(%rip), %rax      # 0xb310
movq 0x78(%rax), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x4c4a
leaq 0x8(%rsp), %rdi
callq 0x4dbc
leaq 0x8(%rsp), %rdi
callq 0x4bcc
addq $0xa0, %rsp
popq %rbx
retq
jmp 0x67d8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4bcc
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b4c
movq 0x4b01(%rip), %rsi      # 0xb310
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x4d2a
leaq 0x10(%rsp), %rdi
callq 0x4d62
leaq 0x8(%rsp), %rdi
callq 0x25bc
xorl %ebp, %ebp
pushq $0x1
popq %rbx
movl $0x2710, %r13d          # imm = 0x2710
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
movl %ebx, %eax
xorl %edx, %edx
divl %r13d
movl %eax, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x4e14
cmpl $0x1, %eax
jne 0x68a7
movq 0x4aab(%rip), %rax      # 0xb310
movq 0x78(%rax), %rsi
movq %r15, %rdi
callq 0x2baa
imull $0x2710, %r12d, %eax    # imm = 0x2710
decl %eax
leal 0x1(%rbp), %r12d
cmpl %ebp, %eax
jne 0x68a0
movq 0x4737(%rip), %rdi      # 0xafc0
movl %r12d, %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x12ca(%rip), %rsi      # 0x7b65
callq 0x2140
incl %ebx
movl %r12d, %ebp
jmp 0x6844
movq 0x4712(%rip), %rdi      # 0xafc0
leaq 0x1321(%rip), %rsi      # 0x7bd6
callq 0x2140
movq %rax, %rdi
movl %ebp, %esi
callq 0x22b0
leaq 0x1315(%rip), %rsi      # 0x7be0
movq %rax, %rdi
callq 0x2140
leaq 0x10(%rsp), %rdi
callq 0x4dbc
leaq 0x8(%rsp), %rdi
callq 0x25c2
leaq 0x10(%rsp), %rdi
callq 0x4bcc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6902
movq %rax, %rbx
jmp 0x6916
jmp 0x6909
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25c2
leaq 0x10(%rsp), %rdi
callq 0x4bcc
movq %rbx, %rdi
callq 0x22d0