LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::find_cacheline(long long)
btb_cacheline * btb :: find_cacheline(ll address)
{
	ll tag = calcTag(address);
	ll index = calcIndex(address);

	for(int i = 0; i<(int)btb_assoc; i++)
	{
		if((cacheline[index][i].getTag() == tag) && (cacheline[index][i].getValidity() == "Valid"))
			return (&cacheline[index][i]);
	}	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movq -0x18(%rbp), %rsi
callq 0x4400
movq -0x70(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rsi
callq 0x4430
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x70(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x24(%rcx), %eax
jge 0x3cc1
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x4450
movq %rax, %rcx
movq -0x20(%rbp), %rdx
movb $0x0, -0x51(%rbp)
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x71(%rbp)
jne 0x3c4c
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x2c(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x44a0
movq -0x80(%rbp), %rdi
movb $0x1, -0x51(%rbp)
leaq 0x5476(%rip), %rsi      # 0x90b0
callq 0x4470
movb %al, -0x72(%rbp)
jmp 0x3c44
movb -0x72(%rbp), %al
movb %al, -0x71(%rbp)
jmp 0x3c4c
movb -0x71(%rbp), %al
movb %al, -0x81(%rbp)
testb $0x1, -0x51(%rbp)
jne 0x3c5d
jmp 0x3c66
leaq -0x50(%rbp), %rdi
callq 0x2110
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x3c72
jmp 0x3cb1
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x3cc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
testb $0x1, -0x51(%rbp)
jne 0x3ca6
jmp 0x3caf
leaq -0x50(%rbp), %rdi
callq 0x2110
jmp 0x3cd6
jmp 0x3cb3
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3bc0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2380
nop
// File: chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::replace_cacheline(long long)
void btb :: replace_cacheline(ll address)
{
	ll tag = calcTag(address);
	ll index = calcIndex(address);
	btb_cacheline *evicted_cacheline = cacheline_to_replace(index);

	evicted_cacheline->setAddress(address);
	evicted_cacheline->setTag(tag);
	evicted_cacheline->setSequence_num(branch_count);
	evicted_cacheline->setValidity("Valid");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq -0x10(%rbp), %rsi
callq 0x4400
movq -0x78(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x4430
movq -0x78(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x3de0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x44d0
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x44f0
movq -0x78(%rbp), %rax
movq -0x28(%rbp), %rdi
movq 0x30(%rax), %rsi
callq 0x43e0
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x2390
movq -0x68(%rbp), %rdx
leaq 0x533b(%rip), %rsi      # 0x90b0
leaq -0x48(%rbp), %rdi
callq 0x4540
jmp 0x3d80
movq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4510
jmp 0x3d8f
leaq -0x48(%rbp), %rdi
callq 0x2110
leaq -0x49(%rbp), %rdi
callq 0x2200
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3dcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2110
leaq -0x49(%rbp), %rdi
callq 0x2200
movq -0x58(%rbp), %rdi
callq 0x2380
nop
// File: chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::cacheline_to_replace(long long)
btb_cacheline * btb :: cacheline_to_replace(ll index)
{
	btb_cacheline * cacheline_invalid = invalid_cacheline(index);
	ll minimum = branch_count;
	int assoc_to_replace = 0;
	if(cacheline_invalid == NULL)
	{
		for(int i = 0; i<(int)btb_assoc; i++)
		{
			if(cacheline[index][i].getSequence_num() < minimum)
			{
				assoc_to_replace = i;
				minimum = cacheline[index][i].getSequence_num();
//				cacheline_invalid = &cacheline[index][i];
			}
		}
		return (&cacheline[index][assoc_to_replace]);
	}
	return cacheline_invalid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3ed0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3eb4
movl $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x24(%rcx), %eax
jge 0x3e94
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x30(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x45f0
cmpq -0x28(%rbp), %rax
jge 0x3e87
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x30(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x45f0
movq %rax, -0x28(%rbp)
jmp 0x3e89
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3e2d
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x3ebc
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::invalid_cacheline(long long)
btb_cacheline * btb :: invalid_cacheline(ll index)
{
	for(int i = 0; i<(int)btb_assoc; i++)
	{
		if(cacheline[index][i].getValidity() == "Invalid")
			return (&cacheline[index][i]);
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x58(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x24(%rcx), %eax
jge 0x3f94
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x44a0
movq -0x68(%rbp), %rdi
leaq 0x5185(%rip), %rsi      # 0x90b6
callq 0x4470
movb %al, -0x59(%rbp)
jmp 0x3f3b
leaq -0x40(%rbp), %rdi
callq 0x2110
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x3f4d
jmp 0x3f84
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x3f9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2110
jmp 0x3fa6
jmp 0x3f86
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3eef
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x2380
nop
// File: chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::mask(long long)
ll bimodal :: mask(ll N)
{
	ll mask = 0;
	for(ll i = 0; i<N; i++)
	{
		mask <<= 1;
		mask |= 1;
	} 
	return (mask);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x4a1b
movq -0x18(%rbp), %rax
shlq %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x49ec
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::bimodal(long long, btb*)
bimodal :: bimodal(ll index_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	index_mask = mask(index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, index_bits);
	for(ll i = 0; i<sets; i++)
		predictor_table.push_back(2);				// Initialize 'Weakly Taken' i.e 2

	this->branch_buffer = branch_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0x38, %rdi
movq %rdi, -0x50(%rbp)
callq 0x5200
movq -0x48(%rbp), %rdi
addq $0x50, %rdi
callq 0x5220
movq -0x48(%rbp), %rdi
movq $0x0, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
movq -0x10(%rbp), %rsi
addq $0x2, %rsi
callq 0x49d0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movsd 0x4603(%rip), %xmm0     # 0x90a8
callq 0x4310
movsd %xmm0, -0x40(%rbp)
jmp 0x4ab1
movq -0x48(%rbp), %rax
movsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x30(%rax)
movq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
cmpq 0x30(%rcx), %rax
jge 0x4b1a
movq -0x48(%rbp), %rdi
addq $0x38, %rdi
movl $0x2, -0x34(%rbp)
leaq -0x34(%rbp), %rsi
callq 0x5240
jmp 0x4af3
jmp 0x4af5
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x4acb
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x5270
jmp 0x4b2c
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x58(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::predict(long long, char)
int bimodal :: predict(ll address, char actual_branch)
{	
	ll index = calc_Index(address);
	if(predictor_table.at(index) >= 2)
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rsi
callq 0x52d0
movq -0x30(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x38, %rdi
movq -0x28(%rbp), %rsi
callq 0x52f0
cmpl $0x2, (%rax)
jl 0x4b89
movl $0x1, -0x4(%rbp)
jmp 0x4b90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::update_prediction_table(long long, int, char)
void bimodal :: update_prediction_table(ll address, int predicted_branch, char actual_branch)
{
	ll index = calc_Index(address);
	if(actual_branch == 't')
	{
		if(predictor_table.at(index) < 3)
			predictor_table.at(index) = predictor_table.at(index) + 1;
		if(predicted_branch == 0)
			mispredictions++;
		else
			true_predictions++;
	}		
	else if(actual_branch == 'n')
	{	
		if(predictor_table.at(index) > 0)
			predictor_table.at(index) = predictor_table.at(index) - 1;
		if(predicted_branch == 1)
			mispredictions++;
		else
			true_predictions++;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
callq 0x52d0
movq %rax, -0x20(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x74, %eax
jne 0x4c45
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
cmpl $0x3, (%rax)
jge 0x4c1b
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
movq -0x28(%rbp), %rdi
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x4c33
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x4c43
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x4cbf
movsbl -0x15(%rbp), %eax
cmpl $0x6e, %eax
jne 0x4cbd
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
cmpl $0x0, (%rax)
jle 0x4c93
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
movq -0x28(%rbp), %rdi
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x52f0
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x1, -0x14(%rbp)
jne 0x4cab
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x4cbb
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x4cbd
jmp 0x4cbf
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::display_table()
void bimodal :: display_table()
{
	if(branch_buffer != NULL)
		branch_buffer->display();
	
	cout << endl << "Final Bimodal Table Contents:" << endl;
	for(it = predictor_table.begin(); it != predictor_table.end(); it++)
	{
		int index = distance(predictor_table.begin(), it); 
		cout << "table[" << index << "]: " << predictor_table.at(index) << endl;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x58(%rax)
je 0x4d58
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x3fb0
movq 0x8279(%rip), %rdi      # 0xcfd8
movq 0x8262(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq %rax, %rdi
leaq 0x43bb(%rip), %rsi      # 0x9130
callq 0x21b0
movq %rax, %rdi
movq 0x8244(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, -0x48(%rbp)
addq $0x38, %rdi
callq 0x53a0
movq -0x48(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x5360
testb $0x1, %al
jne 0x4ddb
jmp 0x4e7f
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x53d0
movl %eax, -0x1c(%rbp)
movq 0x81c6(%rip), %rdi      # 0xcfd8
leaq 0x44ea(%rip), %rsi      # 0x9303
callq 0x21b0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x2360
movq %rax, %rdi
leaq 0x431b(%rip), %rsi      # 0x914e
callq 0x21b0
movq -0x40(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x38, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x52f0
movq -0x50(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, %rdi
movq 0x8166(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x40(%rbp), %rdi
addq $0x50, %rdi
xorl %esi, %esi
callq 0x5410
movq %rax, -0x38(%rbp)
jmp 0x4da9
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::gshare(long long, long long, btb*)
gshare :: gshare(ll index_bits, ll ghr_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	this->index_bits = index_bits;
	this->ghr_bits = ghr_bits;
	index_mask = mask(index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, index_bits);
	for(ll i = 0; i<sets; i++)
		predictor_table.push_back(2);				// Initialize 'Weakly Taken' i.e 2
	
	ghr_register = 0;

	this->branch_buffer = branch_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
addq $0x60, %rdi
movq %rdi, -0x58(%rbp)
callq 0x5200
movq -0x50(%rbp), %rdi
addq $0x78, %rdi
callq 0x5220
movq -0x50(%rbp), %rdi
movq $0x0, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x28(%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x30(%rdi)
movq -0x10(%rbp), %rsi
addq $0x2, %rsi
callq 0x6000
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movsd 0x2fbf(%rip), %xmm0     # 0x90a8
callq 0x4310
movsd %xmm0, -0x48(%rbp)
jmp 0x60f5
movq -0x50(%rbp), %rax
movsd -0x48(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x58(%rax)
movq $0x0, -0x38(%rbp)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
cmpq 0x58(%rcx), %rax
jge 0x615e
movq -0x50(%rbp), %rdi
addq $0x60, %rdi
movl $0x2, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x5240
jmp 0x6137
jmp 0x6139
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x610f
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x5270
jmp 0x617b
movq -0x50(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x80(%rax)
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::predict(long long, char)
int gshare :: predict(ll address, char actual_branch)
{	
	this->index = calc_Index(address);
	if(ghr_bits != 0)
	{
		ll temp = ghr_register << (index_bits - ghr_bits);
		this->index = index ^ temp;
	}
	if(predictor_table.at(index) >= 2)
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rsi
callq 0x69f0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x40(%rax)
cmpq $0x0, 0x30(%rax)
je 0x61ee
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdx
movq 0x28(%rax), %rcx
subq 0x30(%rax), %rcx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, -0x28(%rbp)
movq 0x40(%rax), %rcx
xorq -0x28(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
cmpl $0x2, (%rax)
jl 0x6210
movl $0x1, -0x4(%rbp)
jmp 0x6217
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::update_prediction_table(long long, int, char)
void gshare :: update_prediction_table(ll address, int predicted_branch, char actual_branch)
{
	if(actual_branch == 't')
	{
		if(predictor_table.at(index) < 3)
			predictor_table.at(index) = predictor_table.at(index) + 1;
		if(predicted_branch == 0)
			mispredictions++;
		else
			true_predictions++;
	}		
	else if(actual_branch == 'n')
	{	
		if(predictor_table.at(index) > 0)
			predictor_table.at(index) = predictor_table.at(index) - 1;
		if(predicted_branch == 1)
			mispredictions++;
		else
			true_predictions++;
	}
	
	update_ghr_register(actual_branch);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x74, %eax
jne 0x62c7
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
cmpl $0x3, (%rax)
jge 0x629a
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
movl -0x24(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x62b2
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x62c2
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x634d
movsbl -0x15(%rbp), %eax
cmpl $0x6e, %eax
jne 0x634b
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
cmpl $0x0, (%rax)
jle 0x6321
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movq %rax, %rdi
addq $0x60, %rdi
movq 0x40(%rax), %rsi
callq 0x52f0
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x1, -0x14(%rbp)
jne 0x6339
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x6349
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x634b
jmp 0x634d
movq -0x20(%rbp), %rdi
movsbl -0x15(%rbp), %esi
callq 0x6360
addq $0x30, %rsp
popq %rbp
retq
// File: chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::update_ghr_register(char)
void gshare :: update_ghr_register(char actual_branch)
{
	if(ghr_bits != 0)
	{
		ghr_register = ghr_register >> 1;
		if(actual_branch == 't')
			ghr_register |= (1U << (ghr_bits - 1));
		else if(actual_branch == 'n')
			ghr_register &= ~(1U << (ghr_bits - 1));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x30(%rax)
je 0x63e5
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rcx
sarq %rcx
movq %rcx, 0x38(%rax)
movsbl -0x9(%rbp), %eax
cmpl $0x74, %eax
jne 0x63b6
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, %ecx
orq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
jmp 0x63e3
movsbl -0x9(%rbp), %eax
cmpl $0x6e, %eax
jne 0x63e1
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
movl %ecx, %ecx
andq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
jmp 0x63e3
jmp 0x63e5
popq %rbp
retq
nopw (%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::display_table()
void gshare :: display_table()
{
	if(branch_buffer != NULL)
		branch_buffer->display();
	
	cout << endl << "Final GShare Table Contents:" << endl;
	for(it = predictor_table.begin(); it != predictor_table.end(); it++)
	{
		int index = distance(predictor_table.begin(), it); 
		cout << "table[" << index << "]: " << predictor_table.at(index) << endl;	
	}

	cout << showbase << internal << setfill(' ');
	cout << endl << "Final GHR Contents: " << hex << setw(10) << ghr_register << dec << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x80(%rax)
je 0x647e
movq -0x48(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x3fb0
movq 0x6b53(%rip), %rdi      # 0xcfd8
movq 0x6b3c(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq %rax, %rdi
leaq 0x2e11(%rip), %rsi      # 0x92ac
callq 0x21b0
movq %rax, %rdi
movq 0x6b1e(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x48(%rbp), %rdi
addq $0x60, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq -0x48(%rbp), %rdi
movq %rdi, %rax
addq $0x78, %rax
movq %rax, -0x50(%rbp)
addq $0x60, %rdi
callq 0x53a0
movq -0x50(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x5360
testb $0x1, %al
jne 0x6501
jmp 0x65a5
movq -0x48(%rbp), %rdi
addq $0x60, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x53d0
movl %eax, -0x1c(%rbp)
movq 0x6aa0(%rip), %rdi      # 0xcfd8
leaq 0x2dc4(%rip), %rsi      # 0x9303
callq 0x21b0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x2360
movq %rax, %rdi
leaq 0x2bf5(%rip), %rsi      # 0x914e
callq 0x21b0
movq -0x48(%rbp), %rdi
movq %rax, -0x58(%rbp)
addq $0x60, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x52f0
movq -0x58(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, %rdi
movq 0x6a40(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x48(%rbp), %rdi
addq $0x78, %rdi
xorl %esi, %esi
callq 0x5410
movq %rax, -0x38(%rbp)
jmp 0x64cf
movq 0x6a2c(%rip), %rdi      # 0xcfd8
leaq -0x1f63(%rip), %rsi     # 0x4650
callq 0x20a0
movq %rax, %rdi
leaq -0x1f42(%rip), %rsi     # 0x4680
callq 0x20a0
movq %rax, -0x68(%rbp)
movl $0x20, %edi
callq 0x4610
movq -0x68(%rbp), %rdi
movb %al, -0x39(%rbp)
movzbl -0x39(%rbp), %esi
callq 0x2310
movq 0x69ec(%rip), %rdi      # 0xcfd8
movq 0x69d5(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq %rax, %rdi
leaq 0x2cc7(%rip), %rsi      # 0x92c9
callq 0x21b0
movq %rax, %rdi
leaq -0x2ec1(%rip), %rsi     # 0x3750
callq 0x20a0
movq %rax, -0x60(%rbp)
movl $0xa, %edi
callq 0x4630
movq -0x60(%rbp), %rdi
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x2100
movq %rax, %rdi
leaq -0x1f7d(%rip), %rsi     # 0x46d0
callq 0x20a0
movq %rax, %rdi
movq 0x696c(%rip), %rsi      # 0xcfc8
callq 0x21e0
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/hybrid.cpp
// Function: hybrid::hybrid(long long, long long, long long, long long, btb*)
hybrid :: hybrid(ll bimodal_index_bits, ll ghr_index_bits, ll ghr_bits, ll chooser_table_index_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	index_mask = mask(chooser_table_index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, chooser_table_index_bits);
	for(ll i = 0; i<sets; i++)
		chooser_table.push_back(1);						// Initialize to choose GShare Prediction

	this->branch_buffer = branch_buffer;
	
	b = new bimodal(bimodal_index_bits, NULL);
	g = new gshare(ghr_index_bits, ghr_bits, NULL); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
addq $0x40, %rdi
movq %rdi, -0x68(%rbp)
callq 0x5200
movq -0x60(%rbp), %rdi
addq $0x58, %rdi
callq 0x5220
movq -0x60(%rbp), %rdi
movq $0x0, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
movq -0x28(%rbp), %rsi
addq $0x2, %rsi
callq 0x6a10
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
movsd 0x25b4(%rip), %xmm0     # 0x90a8
callq 0x4310
movsd %xmm0, -0x58(%rbp)
jmp 0x6b00
movq -0x60(%rbp), %rax
movsd -0x58(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x38(%rax)
movq $0x0, -0x48(%rbp)
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rax
cmpq 0x38(%rcx), %rax
jge 0x6b63
movq -0x60(%rbp), %rdi
addq $0x40, %rdi
movl $0x1, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x5240
jmp 0x6b42
jmp 0x6b44
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x6b1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6c10
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x60(%rax)
movl $0x60, %edi
callq 0x21c0
movq %rax, -0x70(%rbp)
jmp 0x6b7f
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4a30
jmp 0x6b92
movq -0x60(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x68(%rax)
movl $0x88, %edi
callq 0x21c0
movq %rax, -0x78(%rbp)
jmp 0x6bae
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x6060
jmp 0x6bc5
movq -0x60(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, 0x70(%rax)
addq $0x80, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x60, %esi
callq 0x21d0
jmp 0x6c10
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x88, %esi
callq 0x21d0
movq -0x68(%rbp), %rdi
callq 0x5270
movq -0x38(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/hybrid.cpp
// Function: hybrid::predict(long long, char)
int hybrid :: predict(ll address, char actual_branch)
{	
	this->chooser_table_index = calc_Index(address);
	if(chooser_table.at(chooser_table_index) >= 2)
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x18(%rbp), %rsi
callq 0x74a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movq %rax, %rdi
addq $0x40, %rdi
movslq 0x20(%rax), %rsi
callq 0x52f0
cmpl $0x2, (%rax)
jl 0x6c7e
movl $0x1, -0x4(%rbp)
jmp 0x6c85
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: chinmayachaudhry[P]Branch-Predictor/hybrid.cpp
// Function: hybrid::access(long long, char)
void hybrid :: access(ll address, char actual_branch)
{
	predictions++;
	this->choosen_predictor = predict(address, actual_branch);
	this->bimodal_prediction = b->predict(address, actual_branch);
	this->gshare_prediction = g->predict(address, actual_branch);
	if(choosen_predictor == 1)
	{
		g->update_prediction_table(address, gshare_prediction, actual_branch);	
		update_chooser_table(address, gshare_prediction, actual_branch);
	}
	else
	{
		update_chooser_table(address, bimodal_prediction, actual_branch);
		b->update_prediction_table(address, bimodal_prediction, actual_branch);
		g->update_ghr_register(actual_branch);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq (%rdi), %rax
addq $0x1, %rax
movq %rax, (%rdi)
movq -0x10(%rbp), %rsi
movsbl -0x11(%rbp), %edx
callq 0x6c30
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x24(%rax)
movq 0x68(%rax), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x11(%rbp), %edx
callq 0x4b40
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x28(%rax)
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x11(%rbp), %edx
callq 0x6190
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x2c(%rax)
cmpl $0x1, 0x24(%rax)
jne 0x6f75
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rsi
movl 0x2c(%rax), %edx
movsbl -0x11(%rbp), %ecx
callq 0x6220
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl 0x2c(%rdi), %edx
movsbl -0x11(%rbp), %ecx
callq 0x6c90
jmp 0x6fb2
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl 0x28(%rdi), %edx
movsbl -0x11(%rbp), %ecx
callq 0x6c90
movq -0x20(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x10(%rbp), %rsi
movl 0x28(%rax), %edx
movsbl -0x11(%rbp), %ecx
callq 0x4ba0
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rdi
movsbl -0x11(%rbp), %esi
callq 0x6360
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chinmayachaudhry[P]Branch-Predictor/hybrid.cpp
// Function: hybrid::display_table()
void hybrid :: display_table()
{
	if(branch_buffer != NULL)
		branch_buffer->display();
	
	b->display_table();
	g->display_table();

	cout << endl << "Final Chooser Table Contents:" << endl;
	for(it = chooser_table.begin(); it != chooser_table.end(); it++)
	{
		int index = distance(chooser_table.begin(), it); 
		cout << "Choice table[" << index << "]: " << chooser_table.at(index) << endl;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x60(%rax)
je 0x6fe8
movq -0x40(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x3fb0
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x4d30
movq -0x40(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x6450
movq 0x5fcf(%rip), %rdi      # 0xcfd8
movq 0x5fb8(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq %rax, %rdi
leaq 0x22bf(%rip), %rsi      # 0x92de
callq 0x21b0
movq %rax, %rdi
movq 0x5f9a(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x58(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x58, %rax
movq %rax, -0x48(%rbp)
addq $0x40, %rdi
callq 0x53a0
movq -0x48(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x5360
testb $0x1, %al
jne 0x7085
jmp 0x7129
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
callq 0x5330
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x53d0
movl %eax, -0x1c(%rbp)
movq 0x5f1c(%rip), %rdi      # 0xcfd8
leaq 0x2239(%rip), %rsi      # 0x92fc
callq 0x21b0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x2360
movq %rax, %rdi
leaq 0x2071(%rip), %rsi      # 0x914e
callq 0x21b0
movq -0x40(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x40, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x52f0
movq -0x50(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, %rdi
movq 0x5ebc(%rip), %rsi      # 0xcfc8
callq 0x21e0
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
xorl %esi, %esi
callq 0x5410
movq %rax, -0x38(%rbp)
jmp 0x7053
addq $0x50, %rsp
popq %rbp
retq
nop
// File: chinmayachaudhry[P]Branch-Predictor/yehpatt.cpp
// Function: yehpatt::yehpatt(long long, long long, btb*)
yehpatt :: yehpatt(ll history_index_bits, ll predictor_index_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	this->history_index_bits = history_index_bits;
	this->predictor_index_bits = predictor_index_bits;

	index_mask = mask(history_index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, predictor_index_bits);
	for(ll i = 0; i<sets; i++)
		predictor_table.push_back(2);				// Initialize 'Weakly Taken' i.e 2

	history_sets = pow(2.0, history_index_bits);
	for(ll i = 0; i<history_sets; i++)
		history_table.push_back(0);
	
	this->branch_buffer = branch_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
addq $0x58, %rdi
movq %rdi, -0x70(%rbp)
callq 0x5200
movq -0x60(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x68(%rbp)
callq 0x5200
movq -0x60(%rbp), %rdi
addq $0x88, %rdi
callq 0x5220
movq -0x60(%rbp), %rdi
movq $0x0, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x20(%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x28(%rdi)
movq -0x10(%rbp), %rsi
addq $0x2, %rsi
callq 0x74c0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rdi
movsd 0x1ae8(%rip), %xmm0     # 0x90a8
callq 0x4310
movsd %xmm0, -0x58(%rbp)
jmp 0x75cc
movq -0x60(%rbp), %rax
movsd -0x58(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x48(%rax)
movq $0x0, -0x38(%rbp)
movq -0x60(%rbp), %rcx
movq -0x38(%rbp), %rax
cmpq 0x48(%rcx), %rax
jge 0x7641
movq -0x60(%rbp), %rdi
addq $0x58, %rdi
movl $0x2, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x5240
jmp 0x760e
jmp 0x7610
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x75e6
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x5270
movq -0x70(%rbp), %rdi
callq 0x5270
jmp 0x76c3
movq -0x10(%rbp), %rdi
movsd 0x1a5b(%rip), %xmm0     # 0x90a8
callq 0x4310
movsd %xmm0, -0x78(%rbp)
jmp 0x7659
movq -0x60(%rbp), %rax
movsd -0x78(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x50(%rax)
movq $0x0, -0x48(%rbp)
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rax
cmpq 0x50(%rcx), %rax
jge 0x76ab
movq -0x60(%rbp), %rdi
addq $0x70, %rdi
movl $0x0, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x5240
jmp 0x769b
jmp 0x769d
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x7673
movq -0x60(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x90(%rax)
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nopl (%rax)
// File: chinmayachaudhry[P]Branch-Predictor/yehpatt.cpp
// Function: yehpatt::predict(long long, char)
int yehpatt :: predict(ll address, char actual_branch)
{	
	this->history_table_index = calc_Index(address);
	this->predictor_table_index = history_table.at(history_table_index);

	if(predictor_table.at(predictor_table_index) >= 2)
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x18(%rbp), %rsi
callq 0x80a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl %ecx, 0x38(%rax)
movq %rax, %rdi
addq $0x70, %rdi
movslq 0x38(%rax), %rsi
callq 0x52f0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x34(%rax)
movq %rax, %rdi
addq $0x58, %rdi
movslq 0x34(%rax), %rsi
callq 0x52f0
cmpl $0x2, (%rax)
jl 0x773a
movl $0x1, -0x4(%rbp)
jmp 0x7741
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: trigrass2[P]giveda_gobject_ansi_cpp/gObject.cpp
// Function: GObject::destructAsSender()
void GObject::destructAsSender()
{
    list<GObject*>::iterator it = m_priv->receiverLstInSender.begin();
    while(it != m_priv->receiverLstInSender.end() )
    {
        GObject* receiver = *it;
        receiver->m_priv->spLstInReceiver.remove_if( Sender_Is(this) );
        ++it;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rdi
addq $0x40, %rdi
callq 0x3260
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x40, %rdi
callq 0x32c0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3290
testb $0x1, %al
jne 0x247d
jmp 0x24c2
leaq -0x10(%rbp), %rdi
callq 0x32f0
movq -0x30(%rbp), %rsi
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x28, %rax
movq %rax, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3430
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3310
leaq -0x10(%rbp), %rdi
callq 0x3450
jmp 0x2455
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: trigrass2[P]giveda_gobject_ansi_cpp/gObject.cpp
// Function: GObject::destructAsReceiver()
void GObject::destructAsReceiver()
{
    list<SenderPair >::iterator it = m_priv->spLstInReceiver.begin();
    while(it != m_priv->spLstInReceiver.end() )
    {
        it->signal->remove_if( Receiver_Is(this) );
        it->sender->m_priv->receiverLstInSender.remove_if( Receiver_Is(this) );
        ++it;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rdi
addq $0x28, %rdi
callq 0x2f30
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x28, %rdi
callq 0x2f90
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2f60
testb $0x1, %al
jne 0x251d
jmp 0x2588
leaq -0x10(%rbp), %rdi
callq 0x2fc0
movq -0x30(%rbp), %rsi
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3100
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2fe0
leaq -0x10(%rbp), %rdi
callq 0x2fc0
movq -0x30(%rbp), %rsi
movq (%rax), %rax
movq 0x8(%rax), %rax
addq $0x40, %rax
movq %rax, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3100
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3120
leaq -0x10(%rbp), %rdi
callq 0x3240
jmp 0x24f5
addq $0x40, %rsp
popq %rbp
retq
nop
// File: trigrass2[P]giveda_gobject_ansi_cpp/gObject.cpp
// Function: GObject::privConnect(GObject*, std::__cxx11::list<Slot<void*>, std::allocator<Slot<void*>>>*, GObject*, void*)
int GObject::privConnect(GObject* sender, SIGNAL_POINTER(void*) signal, GObject* receiver, void* slot)
{
    if ( sender == 0 || receiver == 0 || signal == 0 || slot == 0 )
    {
        WARNING ( "can not connect %s::%p to %s::%p\n",
                  sender ? sender->name() : "(null)",
                  signal,
                  receiver ? receiver->name() : "(null)",
                  slot );
        return -1;
    }

    Slot<void*>  vslot(receiver, (void*)slot);
    SIGNAL_TYPE_ITERATOR(void*)  it = std::find(signal->begin(), signal->end(), vslot );
    if(it != signal->end() )
    {
        return 0;
    }

    signal->push_back( vslot );

    sender->saveReceiver(receiver);
    
    receiver->saveSenderPair( sender, signal );

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x269b
cmpq $0x0, -0x20(%rbp)
je 0x269b
cmpq $0x0, -0x18(%rbp)
je 0x269b
cmpq $0x0, -0x28(%rbp)
jne 0x271b
cmpq $0x0, -0x10(%rbp)
je 0x26b1
movq -0x10(%rbp), %rdi
callq 0x27d0
movq %rax, -0x60(%rbp)
jmp 0x26be
leaq 0x496e(%rip), %rax      # 0x7026
movq %rax, -0x60(%rbp)
jmp 0x26be
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x26e4
movq -0x20(%rbp), %rdi
callq 0x27d0
movq %rax, -0x78(%rbp)
jmp 0x26f1
leaq 0x493b(%rip), %rax      # 0x7026
movq %rax, -0x78(%rbp)
jmp 0x26f1
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq 0x48fc(%rip), %rdi      # 0x7004
movb $0x0, %al
callq 0x2030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27b6
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x2de0
movq -0x18(%rbp), %rdi
callq 0x2e60
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e90
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x2e10
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e90
movq %rax, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2ec0
testb $0x1, %al
jne 0x277b
jmp 0x2784
movl $0x0, -0x4(%rbp)
jmp 0x27b6
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2ef0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2800
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: trigrass2[P]giveda_gobject_ansi_cpp/gObject.cpp
// Function: GObject::deleteReceiver(GObject*)
void GObject::deleteReceiver(GObject *receiver)
{
    list<GObject*>::iterator it = std::find(m_priv->receiverLstInSender.begin(), m_priv->receiverLstInSender.end(), receiver );
    if(it == m_priv->receiverLstInSender.end() )
    {
        return ;
    }

    m_priv->receiverLstInSender.erase(it);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x8(%rax), %rdi
addq $0x40, %rdi
callq 0x3260
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rdi
addq $0x40, %rdi
callq 0x32c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x34b0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rdi
addq $0x40, %rdi
callq 0x32c0
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3500
testb $0x1, %al
jne 0x28b1
jmp 0x28b3
jmp 0x28e1
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x40, %rax
movq %rax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3580
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x3530
movq %rax, -0x40(%rbp)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: trigrass2[P]giveda_gobject_ansi_cpp/gObject.cpp
// Function: GObject::privDisconnect(GObject*, std::__cxx11::list<Slot<void*>, std::allocator<Slot<void*>>>*, GObject*, void*)
int GObject::privDisconnect(GObject* sender, SIGNAL_POINTER(void*) signal, GObject* receiver, void* slot)
{
    if ( sender == 0 || receiver == 0 || signal == 0 || slot == 0 )
    {
        WARNING ( "can not disconnect sender %s::%p from receiver %s::%p\n",
                  sender ? sender->name() : "(null)",
                  signal,
                  receiver ? receiver->name() : "(null)",
                  slot );
        return -1;
    }
    
    Slot<void*>  vslot(receiver, (void*)slot);
    SIGNAL_TYPE_ITERATOR(void*)  it = std::find(signal->begin(), signal->end(), vslot );
    if(it == signal->end() )
    {
        return 0;
    }

    signal->remove( vslot );

    sender->deleteReceiver(receiver);
    
    receiver->deleteSenderPair( sender, signal );

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x292b
cmpq $0x0, -0x20(%rbp)
je 0x292b
cmpq $0x0, -0x18(%rbp)
je 0x292b
cmpq $0x0, -0x28(%rbp)
jne 0x29ab
cmpq $0x0, -0x10(%rbp)
je 0x2941
movq -0x10(%rbp), %rdi
callq 0x27d0
movq %rax, -0x60(%rbp)
jmp 0x294e
leaq 0x46de(%rip), %rax      # 0x7026
movq %rax, -0x60(%rbp)
jmp 0x294e
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2974
movq -0x20(%rbp), %rdi
callq 0x27d0
movq %rax, -0x78(%rbp)
jmp 0x2981
leaq 0x46ab(%rip), %rax      # 0x7026
movq %rax, -0x78(%rbp)
jmp 0x2981
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq 0x4695(%rip), %rdi      # 0x702d
movb $0x0, %al
callq 0x2030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2a46
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x2de0
movq -0x18(%rbp), %rdi
callq 0x2e60
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e90
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x2e10
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e90
movq %rax, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x35a0
testb $0x1, %al
jne 0x2a0b
jmp 0x2a14
movl $0x0, -0x4(%rbp)
jmp 0x2a46
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x35d0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2830
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2610
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wichtounet[P]articles/src/threads/part2/Exception.cpp
// Function: main
int main(){
    ConcurrentCounter counter;

    std::vector<std::thread> threads;

    for(int i = 0; i < 5; ++i){
        threads.push_back(std::thread([&](){
            for(int i = 0; i < 100; ++i){
                counter.increment();
            }
        }));
    }

    for(auto& thread : threads){
        thread.join();
    }

    std::cout << counter.counter.value << std::endl;

    return 0;
}

// Assembly:
subq $0xa8, %rsp
movl $0x0, 0xa4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x17e0
leaq 0x58(%rsp), %rdi
callq 0x1810
movl $0x0, 0x54(%rsp)
cmpl $0x5, 0x54(%rsp)
jge 0x1348
leaq 0x70(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1420
jmp 0x12f0
leaq 0x58(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1820
jmp 0x1301
leaq 0x48(%rsp), %rdi
callq 0x1850
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x12ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x13ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1850
jmp 0x13ff
leaq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1870
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x18a0
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x18d0
testb $0x1, %al
jne 0x1385
jmp 0x13ae
leaq 0x20(%rsp), %rdi
callq 0x1910
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1130
jmp 0x13a0
jmp 0x13a2
leaq 0x20(%rsp), %rdi
callq 0x1920
jmp 0x1370
movl 0x98(%rsp), %esi
movq 0x4c1c(%rip), %rdi      # 0x5fd8
callq 0x1140
movq %rax, 0x8(%rsp)
jmp 0x13c8
movq 0x8(%rsp), %rdi
movq 0x4bec(%rip), %rsi      # 0x5fc0
callq 0x1100
jmp 0x13db
movl $0x0, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x1940
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
leaq 0x58(%rsp), %rdi
callq 0x1940
movq 0x38(%rsp), %rdi
callq 0x1150
nopw %cs:(%rax,%rax)
// File: burakbugrul[P]NginxLogParser/NginxParser.cpp
// Function: NginxParser::characterCount(char*, int, char)
inline int NginxParser::characterCount(char *line, int length, char character){
	
	int result = 0;
	
	for( int i=0 ; i<length ; i++ )
		result += (line[i] == character);
	
	return result;
}

// Assembly:
movb %cl, %al
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movb %al, -0x15(%rsp)
movl $0x0, -0x1c(%rsp)
movl $0x0, -0x20(%rsp)
movl -0x20(%rsp), %eax
cmpl -0x14(%rsp), %eax
jge 0x4f10
movq -0x10(%rsp), %rax
movslq -0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x15(%rsp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0x4ed4
movl -0x1c(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
nop