LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/labelcenter.cpp
// Function: LabelCenter::getAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int LabelCenter::getAddress(const string &kLabel)
{
	map<string, int>::iterator it = fLabels.find(kLabel);
	
	if(it == fLabels.end())
	{
		throw ExecutionError("label " + kLabel + " was not defined");
	}
	
	return fLabels[kLabel] - 1;	/* correction of "-1" because of the fact that the machine
						automatically increments the PC */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x18170
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x17dcd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1807c
movl (%rax), %eax
decl %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x60f0
movq %rax, %rbx
leaq 0x99fc(%rip), %rsi      # 0x217db
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x18006
leaq 0x99f0(%rip), %rdx      # 0x217e2
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x17fdd
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x17d10
xorl %r15d, %r15d
leaq 0x15c70(%rip), %rsi     # 0x2da88
leaq -0x105(%rip), %rdx      # 0x17d1a
movq %rbx, %rdi
callq 0x63c0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x60d0
jmp 0x17e3b
movq %rax, %r14
movb $0x1, %r15b
leaq -0x38(%rbp), %rdi
callq 0x60d0
testb %r15b, %r15b
jne 0x17e4e
jmp 0x17e56
movq %rax, %r14
movq %rbx, %rdi
callq 0x6150
movq %r14, %rdi
callq 0x63f0
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/labelcenter.cpp
// Function: LabelCenter::addAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void LabelCenter::addAddress(const string &kLabel, int location)
{
	map<string, int>::iterator it = fLabels.find(kLabel);
	
	if(it != fLabels.end())
	{
		throw CompileTimeError("Label " + kLabel + " is being redeclared");
	}
	
	fLabels.insert(map<string, int>::value_type(kLabel, location));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
callq 0x18170
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jne 0x17eb9
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x62f0
movl %r15d, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x185be
leaq -0x48(%rbp), %rdi
callq 0x60d0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x60f0
movq %rax, %rbx
leaq 0x9928(%rip), %rsi      # 0x217f3
leaq -0x68(%rbp), %rdi
movq %r14, %rdx
callq 0x18006
leaq 0x991c(%rip), %rdx      # 0x217fa
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x17fdd
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x17d3c
xorl %r15d, %r15d
leaq 0x16e7c(%rip), %rsi     # 0x2ed80
leaq -0x1c5(%rip), %rdx      # 0x17d46
movq %rbx, %rdi
callq 0x63c0
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x60d0
jmp 0x17f27
movq %rax, %r14
movb $0x1, %r15b
leaq -0x68(%rbp), %rdi
callq 0x60d0
testb %r15b, %r15b
jne 0x17f3a
jmp 0x17f50
movq %rax, %r14
movq %rbx, %rdi
callq 0x6150
jmp 0x17f50
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x60d0
movq %r14, %rdi
callq 0x63f0
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/timecounter.cpp
// Function: TimeCounter::count(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void TimeCounter::count(const string &kInstruction)
{
	map<string, int>::iterator it = fWeights.find(kInstruction);
	
	if(it == fWeights.end())
	{
		cerr << "illegal instruction entered for counting purposes" << endl;
	}

	fCounter += fWeights[kInstruction];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x18170
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jne 0x19294
movq 0x15d70(%rip), %rdi     # 0x2eff0
leaq 0x85a6(%rip), %rsi      # 0x2182d
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1807c
movl (%rax), %eax
addl %eax, 0x30(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/stackmachine.cpp
// Function: StackMachine::run()
void StackMachine::run()
{
	fPC = 0;
	while(fHaltrequested == false)
	{
		if(fPC >= fIC)
		{
			throw ExecutionError("PC has exceeded maximum number of instructions.");
			cerr << "End reached" << endl;
			return;
		}
		else
		{
			if(fStepping)
			{
				printCurrentInstruction();
			}
			fCode[fPC]->execute(this);
			if(fStepping)
			{
				showStack();
				showHeap();
				showParameters();
				continueStep();
			}
			++fPC;
			++fStepCounter;
		}
	}
	
	// print the execution-time
	cout << endl << "--> Execution time: " << fTime.getTime() << endl << endl;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
andl $0x0, 0xb0(%rdi)
xorl %eax, %eax
cmpb $0x0, 0xc4(%rbx)
jne 0x194fc
cmpl 0xc8(%rbx), %eax
jge 0x1954a
cmpb $0x1, 0xcc(%rbx)
jne 0x194ab
movq %rbx, %rdi
callq 0x195b8
movl 0xb0(%rbx), %eax
cltq
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
cmpb $0x1, 0xcc(%rbx)
jne 0x194e6
movq %rbx, %rdi
callq 0x195f8
movq %rbx, %rdi
callq 0x196de
movq %rbx, %rdi
callq 0x197bc
movq %rbx, %rdi
callq 0x198a6
movl 0xb0(%rbx), %eax
incl %eax
movl %eax, 0xb0(%rbx)
incl 0xd8(%rbx)
jmp 0x1947f
movq 0x15abd(%rip), %rdi     # 0x2efc0
callq 0x60e0
leaq 0x8380(%rip), %rsi      # 0x2188f
movq %rax, %rdi
callq 0x61b0
movq %rax, %r14
addq $0x78, %rbx
movq %rbx, %rdi
callq 0x192aa
movq %r14, %rdi
movl %eax, %esi
callq 0x63d0
movq %rax, %rdi
callq 0x60e0
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x60e0
pushq $0x20
popq %rdi
callq 0x60f0
movq %rax, %rbx
leaq 0x8303(%rip), %rsi      # 0x2185f
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x72a6
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x17d10
xorl %r15d, %r15d
leaq 0x14506(%rip), %rsi     # 0x2da88
leaq -0x186f(%rip), %rdx     # 0x17d1a
movq %rbx, %rdi
callq 0x63c0
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x60d0
testb %r15b, %r15b
jne 0x195a7
jmp 0x195af
movq %rax, %r14
movq %rbx, %rdi
callq 0x6150
movq %r14, %rdi
callq 0x63f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/stackmachine.cpp
// Function: StackMachine::showStack()
void StackMachine::showStack()
{
	int beginvalue;
	
	if(fStackSize == 0)
	{
		beginvalue = 0;
	}
	else
	{
		if(fStore.size() - fStackSize < 0)
		{
			beginvalue = 0;
		}
		else
		{
			beginvalue = fStore.size() - fStackSize;
		}
	}
	
	for(int i = beginvalue; i < fStore.size(); ++i)
	{
		cout << "\t[" << i << "]\t\t" << "[" << fStore[i]->getType() << "]\t" << *fStore[i] << endl;
	}
	cout << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xd4(%rdi), %eax
testl %eax, %eax
je 0x19626
movq 0x20(%rbx), %rcx
subq 0x18(%rbx), %rcx
shrq $0x3, %rcx
subl %eax, %ecx
movslq %ecx, %r14
jmp 0x19629
xorl %r14d, %r14d
leaq 0x82ad(%rip), %r15      # 0x218dd
leaq 0x82ac(%rip), %r12      # 0x218e3
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
sarq $0x3, %rax
movq 0x15976(%rip), %rdi     # 0x2efc0
cmpq %r14, %rax
jbe 0x196ca
leaq 0x8286(%rip), %rsi      # 0x218dc
callq 0x61b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x63d0
movq %rax, %rdi
leaq 0x826f(%rip), %rsi      # 0x218df
callq 0x61b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x61b0
movq %rax, %r13
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
movsbl %al, %esi
movq %r13, %rdi
callq 0x6240
movq %rax, %rdi
movq %r12, %rsi
callq 0x61b0
movq 0x18(%rbx), %rcx
movq (%rcx,%r14,8), %rsi
movq %rax, %rdi
callq 0x174cd
movq %rax, %rdi
callq 0x60e0
incq %r14
jmp 0x19637
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x60e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/stackmachine.cpp
// Function: StackMachine::showHeap()
void StackMachine::showHeap()
{
	if(fShowHeap)
	{
		for(int i = -1; i >= fNP; --i)
		{
			cout << "\t[" << i << "]\t\t" << "[" << fHeap[-i-1]->getType() << "]\t" << *fHeap[-i-1] << endl;
		}
		cout << endl;
	}
}

// Assembly:
cmpb $0x1, 0xcd(%rdi)
jne 0x197a1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x1
popq %r14
xorl %r15d, %r15d
leaq 0x81d9(%rip), %r12      # 0x218e3
cmpl 0xb8(%rbx), %r14d
jl 0x197a2
movq 0x158a2(%rip), %rdi     # 0x2efc0
leaq 0x81b7(%rip), %rsi      # 0x218dc
callq 0x61b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x63d0
movq %rax, %rdi
leaq 0x81a0(%rip), %rsi      # 0x218df
callq 0x61b0
movq %rax, %rdi
leaq 0x818f(%rip), %rsi      # 0x218dd
callq 0x61b0
movq %rax, %r13
movq 0x30(%rbx), %rax
movq (%rax,%r15), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
movsbl %al, %esi
movq %r13, %rdi
callq 0x6240
movq %rax, %rdi
movq %r12, %rsi
callq 0x61b0
movq 0x30(%rbx), %rcx
movq (%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x174cd
movq %rax, %rdi
callq 0x60e0
decl %r14d
addq $0x8, %r15
jmp 0x1970a
retq
movq 0x15817(%rip), %rdi     # 0x2efc0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x60e0
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/stackmachine.cpp
// Function: StackMachine::continueStep()
void StackMachine::continueStep()
{
	if(fStepCounter == fStepSize)
	{
		cout << "Press [c] + [Enter] to continue. Other key to end." << endl;
		char space;
		cin >> space;
		switch(space)
		{
			case 'c': 
			case 'C': break;
			default: exit(0);
		}
		fStepCounter = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl 0xd8(%rdi), %eax
cmpl 0xd0(%rdi), %eax
jne 0x19903
movq %rdi, %rbx
movq 0x156f7(%rip), %rdi     # 0x2efc0
leaq 0x7fd4(%rip), %rsi      # 0x218a4
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
movq 0x156f4(%rip), %rdi     # 0x2efd8
leaq -0x11(%rbp), %r14
movq %r14, %rsi
callq 0x62c0
movzbl (%r14), %eax
orl $0x20, %eax
cmpl $0x63, %eax
jne 0x1990c
andl $0x0, 0xd8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x6270
nop
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/stackmachine.cpp
// Function: StackMachine::base(int, int)
int StackMachine::base(int p, int a)
{
	if (p == 0)
		return a;
	else
	{
		if(a+1 > fSP)
		{
			strstream errormessage;
			errormessage << "base(" << p << "," << a << ") is trying to access a memorylocation above STORE[SP]";
			throw ExecutionError(errormessage.str());
		}
		else
		{
			return base(p - 1, fStore[a+1]->getValue());
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %r12d
subl $0x1, %r12d
jb 0x1999f
cmpl %ebx, 0xb4(%r15)
jle 0x199b1
movq 0x18(%r15), %rax
movslq %ebx, %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movl %eax, %ebx
movl %r12d, %r14d
jmp 0x19977
movl %ebx, %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1c0(%rbp), %rdi
callq 0x62e0
leaq -0x1b0(%rbp), %rdi
leaq 0x7f45(%rip), %rsi      # 0x21910
callq 0x61b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x63d0
leaq 0x7f18(%rip), %rsi      # 0x218fa
movq %rax, %rdi
callq 0x61b0
movq %rax, %rdi
movl %ebx, %esi
callq 0x63d0
leaq 0x7f1b(%rip), %rsi      # 0x21916
movq %rax, %rdi
callq 0x61b0
pushq $0x20
popq %rdi
callq 0x60f0
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x6330
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rax, %rsi
callq 0x72a6
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x17d10
xorl %r15d, %r15d
leaq 0x14045(%rip), %rsi     # 0x2da88
leaq -0x1d30(%rip), %rdx     # 0x17d1a
movq %rbx, %rdi
callq 0x63c0
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x60d0
testb %r15b, %r15b
jne 0x19a68
jmp 0x19a75
movq %rax, %r14
movq %rbx, %rdi
callq 0x6150
jmp 0x19a75
movq %rax, %r14
leaq -0x1c0(%rbp), %rdi
callq 0x6420
movq %r14, %rdi
callq 0x63f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/zerolfx[P]P-Machine/main.cpp
// Function: usage()
void usage()
{
	cout << "USAGE: Pmachine [filename] <-s [numeric value]> <-t [numeric value]> <-h>" << endl << endl;
	cout << "\t -s: stepsize" << endl;
	cout << "\t -t: number of stackplaces to show\t(by default all)" << endl;
	cout << "\t -h: show heap" << endl << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x15347(%rip), %rbx     # 0x2efc0
leaq 0x7ccd(%rip), %rsi      # 0x2194d
movq %rbx, %rdi
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
movq %rax, %rdi
callq 0x60e0
leaq 0x7cf8(%rip), %rsi      # 0x21997
movq %rbx, %rdi
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
leaq 0x7cf0(%rip), %rsi      # 0x219a6
movq %rbx, %rdi
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
leaq 0x7d0e(%rip), %rsi      # 0x219db
movq %rbx, %rdi
callq 0x61b0
movq %rax, %rdi
callq 0x60e0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x60e0
// File: /workspace/github_cpp_makefile_star2_O2/calebstewart[P]md5/./examples/iterative.cpp
// Function: main
int main(int argc, char** argv)
{
  char digest[33];
  unsigned char hash[16];
  char chunk[512];
  MD5 md5;
  std::fstream data_file;

  // Open the executable itself for reading
  data_file.open(argv[0], std::ios::in);

  // Read until there's no more data and add it to the hash
  do {
    data_file.read(chunk, 512);
    md5.update(chunk, data_file.gcount());
  } while ( ! data_file.eof() );

  // Retrieve the final hash
  md5.finalize(hash);

  // If you'd like to reuse the MD5 object to calculate new hashes,
  // you must call reset to ensure you don't continue calculating from
  // the previous data.
  // md5.reset();

  // Output a hex digest
  MD5::digest(hash, digest);
  std::cout << "md5sum " << argv[0] << " => \"" << digest << "\"\n";

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x540, %rsp            # imm = 0x540
movq %rsi, %rbx
leaq -0x360(%rbp), %rdi
callq 0x120c
leaq -0x270(%rbp), %r14
movq %r14, %rdi
callq 0x1090
movq (%rbx), %rsi
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x1070
leaq -0x560(%rbp), %r15
leaq -0x360(%rbp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %r15, %rsi
callq 0x10a0
movq -0x268(%rbp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x128c
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x250(%rbp,%rax)
je 0x2264
leaq -0x360(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1fa2
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21de
movq 0x2d19(%rip), %rdi      # 0x4fd8
leaq 0xd5b(%rip), %rsi       # 0x3021
callq 0x1080
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x1080
leaq 0xd4c(%rip), %rsi       # 0x3029
movq %rax, %rdi
callq 0x1080
leaq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x1080
leaq 0xd37(%rip), %rsi       # 0x302f
movq %rax, %rdi
callq 0x1080
leaq -0x270(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x540, %rsp            # imm = 0x540
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2320
movq %rax, %rbx
leaq -0x270(%rbp), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/position.cpp
// Function: root_start_element_handler(void*, char const*, char const**)
void root_start_element_handler(void* udata, const XML_Char* name, const XML_Char** atts)
{
    user_data* data = (user_data*)udata;
    data->stack.push_back(std::string(name));

    if (data->state == State::NOT_FOUND) {
        if (XML_GetCurrentLineNumber(data->parser->handle()) >= data->line
         && XML_GetCurrentColumnNumber(data->parser->handle()) >= data->col) {
            data->state = State::FOUND;
            print_stack(data->stack.begin(), data->stack.end());
            std::cout << "\n";
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x275c
movq %r14, %rdi
movq %r15, %rsi
callq 0x2c88
leaq 0x10(%rsp), %rdi
callq 0x20b0
cmpl $0x0, 0x30(%rbx)
jne 0x2474
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x20e0
movslq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jb 0x2474
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x2160
movslq 0x2c(%rbx), %rcx
cmpq %rcx, %rax
jb 0x2474
movl $0x1, 0x30(%rbx)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x2797
movq 0x2b60(%rip), %rdi      # 0x4fc8
leaq 0xbb1(%rip), %rsi       # 0x3020
callq 0x2170
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/position.cpp
// Function: root_end_element_handler(void*, char const*)
void root_end_element_handler(void* udata, const XML_Char* name)
{
    user_data* data = (user_data*)udata;
    if (data->state == State::NOT_FOUND) {
        if (XML_GetCurrentLineNumber(data->parser->handle()) >= data->line
         && XML_GetCurrentColumnNumber(data->parser->handle()) >= data->col) {
            data->state = State::FOUND;
            print_stack(data->stack.begin(), data->stack.end());
            std::cout << "\n";
        }
    }
    data->stack.pop_back();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x30(%rdi)
jne 0x24ee
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x20e0
movslq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jb 0x24ee
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x2160
movslq 0x2c(%rbx), %rcx
cmpq %rcx, %rax
jb 0x24ee
movl $0x1, 0x30(%rbx)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x2797
movq 0x2ae6(%rip), %rdi      # 0x4fc8
leaq 0xb37(%rip), %rsi       # 0x3020
callq 0x2170
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x27f8
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/position.cpp
// Function: character_data_handler(void*, char const*, int)
void character_data_handler(void* udata, const XML_Char* s, int len)
{
    user_data* data = (user_data*)udata;
    if (data->state == State::NOT_FOUND) {
        if (XML_GetCurrentLineNumber(data->parser->handle()) >= data->line
         && XML_GetCurrentColumnNumber(data->parser->handle()) >= data->col) {
            data->state = State::FOUND;
            print_stack(data->stack.begin(), data->stack.end());
            std::cout << "\n";
        }
    }
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x30(%rdi)
jne 0x252f
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq (%rax), %rdi
callq 0x20e0
movslq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jb 0x252f
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x2160
movslq 0x2c(%rbx), %rcx
cmpq %rcx, %rax
jae 0x2531
popq %rbx
retq
movl $0x1, 0x30(%rbx)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x2797
movq 0x2a7c(%rip), %rdi      # 0x4fc8
leaq 0xacd(%rip), %rsi       # 0x3020
popq %rbx
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/position.cpp
// Function: void print_stack<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>)
void print_stack(I p, I l)
{
    if (p != l) { std::cout << *p; ++p; }
    while (p != l) {
        std::cout << "/" << *p;
        ++p;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, %rdi
je 0x27bd
movq 0x2817(%rip), %rdi      # 0x4fc8
movq %r14, %rsi
callq 0x2140
addq $0x20, %r14
movq 0x2804(%rip), %r15      # 0x4fc8
leaq 0x8a0(%rip), %r12       # 0x306b
cmpq %rbx, %r14
je 0x27ec
movq %r15, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
addq $0x20, %r14
jmp 0x27cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/position.cpp
// Function: _gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> find_backward_if_not<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, int (*)(int) noexcept>(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, int (*)(int) noexcept)
I find_backward_if_not(I f, I l, P p)
{
    if (f == l) return l;
    while (f != l) {
        --l;
        if (!isspace(*l)) break;
    }
    return ++l;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rsi, %rdi
je 0x2b6d
movq %rdi, %r14
cmpq %r14, %rbx
je 0x2b67
movsbl -0x1(%rbx), %edi
decq %rbx
callq 0x2270
testl %eax, %eax
jne 0x2b50
jmp 0x2b6a
movq %r14, %rbx
incq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/channel.cpp
// Function: Channel::HandleEvent()
void Channel::HandleEvent()
{
    if(events_ & EPOLLRDHUP)
    {
        //对方异常关闭事件
        std::cout<< "Event EPOLLRDHUP!" << std::endl;
        closehandler_();
    } else if(events_ & (EPOLLIN | EPOLLPRI))
    {
        //读事件，对端有数据或者正常关闭
        std::cout<< "Event EPOLLIN!" << std::endl;
        readhandler_();
    } else if(events_ & EPOLLOUT)
    {
        //写事件
        std::cout << "Event EPOLLOUT!" << std::endl;
        writehandler_();
    } else
    {
        //连接错误
        std::cout << "Event EPOLLERR!" << std::endl;
        errorhandler_();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
btl $0xd, %eax
jb 0x49e1
testb $0x3, %al
je 0x49ee
pushq $0x8
popq %r14
leaq 0x9637(%rip), %rsi      # 0xe016
jmp 0x4a11
pushq $0x68
popq %r14
leaq 0x9618(%rip), %rsi      # 0xe004
jmp 0x4a11
xorl %r14d, %r14d
testb $0x4, %al
sete %r14b
leaq 0x9637(%rip), %rax      # 0xe035
leaq 0x9620(%rip), %rsi      # 0xe025
cmoveq %rax, %rsi
shll $0x5, %r14d
addq $0x28, %r14
movq 0x135a0(%rip), %rdi     # 0x17fb8
callq 0x4300
movq %rax, %rdi
callq 0x41a0
addq %r14, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4a7c
nop
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/echoserver.cpp
// Function: EchoServer::EchoServer(EventLoop*, int, int)
EchoServer::EchoServer(EventLoop* loop, const int port, const int threadnum)
    : tcpserver_(loop, port, threadnum)
{
    tcpserver_.SetNewConnCallback(std::bind(&EchoServer::HandleNewConnection, this, std::placeholders::_1));
    tcpserver_.SetMessageCallback(std::bind(&EchoServer::HandleMessage, this, std::placeholders::_1, std::placeholders::_2));
    tcpserver_.SetSendCompleteCallback(std::bind(&EchoServer::HandleSendComplete, this, std::placeholders::_1));
    tcpserver_.SetCloseCallback(std::bind(&EchoServer::HandleClose, this, std::placeholders::_1));
    tcpserver_.SetErrorCallback(std::bind(&EchoServer::HandleError, this, std::placeholders::_1));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
callq 0xbb50
leaq 0x144(%rip), %rax       # 0x4c86
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x4d5e
leaq 0x128(%rbx), %rdi
movq %rsp, %rsi
callq 0x4dee
movq %rsp, %rdi
callq 0x4a60
leaq 0x12b(%rip), %rax       # 0x4ca4
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x4da6
leaq 0x148(%rbx), %rdi
movq %rsp, %rsi
callq 0x4e82
movq %rsp, %rdi
callq 0x4a60
leaq 0x164(%rip), %rax       # 0x4d14
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x4d5e
leaq 0x168(%rbx), %rdi
movq %rsp, %rsi
callq 0x4dee
movq %rsp, %rdi
callq 0x4a60
leaq 0x12f(%rip), %rax       # 0x4d16
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x4d5e
leaq 0x188(%rbx), %rdi
movq %rsp, %rsi
callq 0x4dee
movq %rsp, %rdi
callq 0x4a60
leaq 0x116(%rip), %rax       # 0x4d34
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x4d5e
leaq 0x1a8(%rbx), %rdi
movq %rsp, %rsi
callq 0x4dee
movq %rsp, %rdi
callq 0x4a60
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0x4c66
jmp 0x4c73
jmp 0x4c66
jmp 0x4c73
jmp 0x4c66
jmp 0x4c73
jmp 0x4c66
jmp 0x4c73
movq %rax, %r14
movq %rsp, %rdi
callq 0x4a60
jmp 0x4c76
movq %rax, %r14
movq %rbx, %rdi
callq 0xbfd0
movq %r14, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/echoserver.cpp
// Function: EchoServer::HandleMessage(std::shared_ptr<TcpConnection> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void EchoServer::HandleMessage(const spTcpConnection& sptcpconn, std::string &s)
{
    //std::string msg("reply msg:");
    //msg += s;
    //s.clear();
    //swap优化
    std::string msg;
    msg.swap(s);
    msg.insert(0, "reply msg:");
    sptcpconn->Send(msg);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x4260
leaq 0x93a9(%rip), %rdx      # 0xe07f
movq %r14, %rdi
xorl %esi, %esi
callq 0x40a0
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xb03c
leaq 0x8(%rsp), %rdi
callq 0x4170
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloop.cpp
// Function: CreateEventFd()
int CreateEventFd()
{
    int evtfd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
    if(evtfd < 0)
    {
        std::cout<< "Failed in eventfd!" << std::endl;
        exit(1);
    }
    return evtfd;
}

// Assembly:
pushq %rax
xorl %edi, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x43d0
testl %eax, %eax
js 0x5157
popq %rcx
retq
movq 0x12e5a(%rip), %rdi     # 0x17fb8
leaq 0x920b(%rip), %rsi      # 0xe370
callq 0x4300
movq %rax, %rdi
callq 0x41a0
pushq $0x1
popq %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloop.cpp
// Function: EventLoop::EventLoop()
EventLoop::EventLoop() :
    functorlist_(), channellist_(), activechannellist_(), poller_(),
    quit_(true), tid_(std::this_thread::get_id()), mutex_(),
    wakeupfd_(CreateEventFd()), wakeupchannel_()
{
    wakeupchannel_.SetFd(wakeupfd_);
    wakeupchannel_.SetEvents(EPOLLIN | EPOLLET);
    wakeupchannel_.SetReadHandle(std::bind(&EventLoop::HandleRead, this));
    wakeupchannel_.SetErrorHandle(std::bind(&EventLoop::HandleError, this));
    AddChannelToPoller(&wakeupchannel_);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x40(%rdi)
movq %r14, %rdi
callq 0x99d4
movb $0x1, 0xc0(%rbx)
callq 0x42d0
movq %rax, 0xc8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
andq $0x0, 0xf0(%rbx)
callq 0x5144
movl %eax, 0xf8(%rbx)
leaq 0x100(%rbx), %r15
movq %r15, %rdi
callq 0x495c
movl 0xf8(%rbx), %esi
movq %r15, %rdi
callq 0x49b0
movq %r15, %rdi
movl $0x80000001, %esi       # imm = 0x80000001
callq 0x49b8
leaq 0xcb(%rip), %rax        # 0x52de
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x54ea
movq %rsp, %rsi
movq %r15, %rdi
callq 0x4a38
movq %rsp, %rdi
callq 0x4a60
leaq 0xb4(%rip), %rax        # 0x52fa
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rsp, %rdi
callq 0x54ea
movq %rsp, %rsi
movq %r15, %rdi
callq 0x4a4c
movq %rsp, %rdi
callq 0x4a60
movq %r14, %rdi
movq %r15, %rsi
callq 0x9c4c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x528d
jmp 0x52a6
movq %rax, %r12
movq %rsp, %rdi
callq 0x4a60
jmp 0x52a9
jmp 0x52a6
movq %rax, %r12
jmp 0x52b9
movq %rax, %r12
jmp 0x52b1
movq %rax, %r12
movq %r15, %rdi
callq 0x4984
movq %r14, %rdi
callq 0x9a96
leaq 0x30(%rbx), %rdi
leaq 0x18(%rbx), %r14
callq 0x55bc
movq %r14, %rdi
callq 0x55bc
movq %rbx, %rdi
callq 0x5532
movq %r12, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloop.cpp
// Function: EventLoop::loop()
void EventLoop::loop()
{
    quit_ = false;
    while(!quit_)
    {
        poller_.poll(activechannellist_);
        for(Channel* pchannel : activechannellist_)
        {
            //处理事件
            pchannel->HandleEvent();
        }
        activechannellist_.clear();
        ExecuteTask();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0xc0(%rdi)
leaq 0x48(%rdi), %r14
leaq 0x30(%rdi), %r15
xorl %eax, %eax
testb $0x1, %al
jne 0x53b4
movq %r14, %rdi
movq %r15, %rsi
callq 0x9ac0
movq 0x30(%rbx), %r12
movq 0x38(%rbx), %r13
cmpq %r13, %r12
je 0x5396
movq (%r12), %rdi
callq 0x49c0
addq $0x8, %r12
jmp 0x5382
movq 0x30(%rbx), %rax
cmpq %rax, 0x38(%rbx)
je 0x53a4
movq %rax, 0x38(%rbx)
movq %rbx, %rdi
callq 0x53be
movb 0xc0(%rbx), %al
jmp 0x536b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloop.cpp
// Function: EventLoop::ExecuteTask()
void EventLoop::ExecuteTask()
{
    std::vector<Functor> functorlist;
    {
        std::lock_guard<std::mutex> lock(mutex_);
        functorlist.swap(functorlist_);
    }
    for(Functor & functor : functorlist)
    {
        functor();
    }
    functorlist.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0xd0(%rdi), %r15
movq %r15, %rdi
callq 0x56bc
movq (%r14), %rbx
movq %rbx, (%rsp)
movq 0x8(%r14), %r12
movq %r12, 0x8(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %r15, %rdi
callq 0x4280
cmpq %r12, %rbx
je 0x5428
movq %rbx, %rdi
callq 0x4a7c
addq $0x20, %rbx
jmp 0x5415
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x5580
movq %rbx, %rdi
callq 0x5532
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x5449
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5532
movq %rbx, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloop.cpp
// Function: EventLoop::AddTask(std::function<void ()>)
void EventLoop::AddTask(Functor functor)
{
    {
        std::lock_guard<std::mutex> lock(mutex_);
        functorlist_.push_back(functor);
    }
    //跨线程唤醒，worker线程唤醒IO线程
    WakeUp();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xd0(%rdi), %rbx
movq %rbx, %rdi
callq 0x56bc
movq %r14, %rdi
movq %r15, %rsi
callq 0x5554
movq %rbx, %rdi
callq 0x4280
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5480
movq %rax, %r14
movq %rbx, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x4570
nop
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloopthread.cpp
// Function: EventLoopThread::~EventLoopThread()
EventLoopThread::~EventLoopThread()
{
    //线程结束时清理
    std::cout<< "Clean up the EventLoopThread id:" << std::this_thread::get_id() << std::endl;
    //停止IO线程运行
    loop_->Quit();
    //清理IO线程防止内存泄漏，因为pthread_create会calloc
    th_.join();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x12668(%rip), %rdi     # 0x17fb8
leaq 0x8ac9(%rip), %rsi      # 0xe420
callq 0x4300
movq %rax, %r14
callq 0x42d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x5b5f
movq %rax, %rdi
callq 0x41a0
movq 0x30(%rbx), %rdi
callq 0x5470
movq %rbx, %rdi
callq 0x4540
leaq 0x10(%rbx), %rdi
callq 0x4170
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5b52
movq %rax, %rdi
callq 0x4ada
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloopthread.cpp
// Function: EventLoopThread::ThreadFunc()
void EventLoopThread::ThreadFunc()
{
    EventLoop loop;
    loop_ = &loop;

    threadid_ = std::this_thread::get_id();
    std::stringstream sin;
    sin << threadid_;
    threadname_ += sin.str();
    std::cout<< "in the thread: " << threadname_ << std::endl;

    try
    {
        loop_->loop();
    } catch(std::bad_alloc& bad)
    {
        std::cerr << "Bad_alloc caught in EventLoopThread::ThreadFunc loop: " << bad.what() << std::endl;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %rdi, %rbx
leaq 0x1b0(%rsp), %r14
movq %r14, %rdi
callq 0x517a
movq %r14, 0x30(%rbx)
callq 0x42d0
movq %rax, 0x8(%rbx)
leaq 0x28(%rsp), %rdi
callq 0x4250
leaq 0x38(%rsp), %rdi
movq 0x8(%rbx), %rsi
callq 0x5b5f
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x44c0
leaq 0x10(%rbx), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x45d0
leaq 0x8(%rsp), %rdi
callq 0x4170
movq 0x12549(%rip), %rdi     # 0x17fb8
leaq 0x89cb(%rip), %rsi      # 0xe441
callq 0x4300
movq %rax, %rdi
movq %r14, %rsi
callq 0x42c0
movq %rax, %rdi
callq 0x41a0
movq 0x30(%rbx), %rdi
callq 0x534e
leaq 0x28(%rsp), %rdi
callq 0x4270
leaq 0x1b0(%rsp), %rdi
callq 0x5306
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r14
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x5b32
movq %rbx, %rdi
callq 0x4140
movq %rax, %rbx
movq 0x12515(%rip), %rdi     # 0x17fe8
leaq 0x8977(%rip), %rsi      # 0xe451
callq 0x4300
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4300
movq %rax, %rdi
callq 0x41a0
callq 0x4510
jmp 0x5a97
jmp 0x5b2f
movq %rax, %rbx
callq 0x4510
jmp 0x5b32
movq %rax, %rdi
callq 0x4ada
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4170
jmp 0x5b32
jmp 0x5b2f
movq %rax, %rbx
jmp 0x5b3c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4270
leaq 0x1b0(%rsp), %rdi
callq 0x5306
movq %rbx, %rdi
callq 0x4570
nop
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloopthreadpool.cpp
// Function: EventLoopThreadPool::~EventLoopThreadPool()
EventLoopThreadPool::~EventLoopThreadPool()
{
    std::cout << "Clean up the EventLoopThreadPool" << std::endl;
    for(int i = 0; i < threadnum_; ++i)
    {
        delete threadlist_[i];
    }
    threadlist_.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x122cc(%rip), %rdi     # 0x17fb8
leaq 0x880a(%rip), %rsi      # 0xe4fd
callq 0x4300
movq %rax, %rdi
callq 0x41a0
leaq 0x10(%rbx), %r14
xorl %r12d, %r12d
movslq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rcx, %r12
jge 0x5d32
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0x5d25
movq %r15, %rdi
callq 0x5942
movq %r15, %rdi
callq 0x42f0
incq %r12
jmp 0x5d07
cmpq %rax, 0x18(%rbx)
je 0x5d3c
movq %rax, 0x18(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5de0
movq %rax, %rdi
callq 0x4ada
nop
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/eventloopthreadpool.cpp
// Function: EventLoopThreadPool::GetNextLoop()
EventLoop* EventLoopThreadPool::GetNextLoop()
{
    if(threadnum_ > 0)
    {
        EventLoop *loop = threadlist_[index_]->GetLoop();
        index_ = (index_ + 1) % threadnum_;
        return loop;
        //LC策略,还没写
        //EventLoop *loop = threadlist_[index_]->GetLoop();
        //index_ = (index_ + 1) % threadnum_;
        //return loop;
    }
    else
    {
        return mainloop_;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x5dbd
movslq 0x28(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x59a8
movq %rax, %rcx
movl 0x28(%rbx), %eax
incl %eax
cltd
idivl 0x8(%rbx)
movl %edx, 0x28(%rbx)
movq %rcx, %rax
popq %rbx
retq
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/httpserver.cpp
// Function: HttpServer::HandleNewConnection(std::shared_ptr<TcpConnection> const&)
void HttpServer::HandleNewConnection(const spTcpConnection& sptcpconn)
{
    //std::string msg(s);
    std::shared_ptr<HttpSession> sphttpsession = std::make_shared<HttpSession>(); //创建应用层会话
    spTimer sptimer = std::make_shared<Timer>(5000, Timer::TimerType::TIMER_ONCE, std::bind(&TcpConnection::Shutdown, sptcpconn));
    sptimer->Start();
    //可以优化成无锁，放入conn里面就行
    {
        std::lock_guard <std::mutex> lock(mutex_);
        httpsessionnlist_[sptcpconn] = sphttpsession;
        timerlist_[sptcpconn] = sptimer;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rdi
callq 0x6a05
leaq 0x28(%rsp), %r15
andl $0x0, (%r15)
leaq 0x2c(%rsp), %r12
movl $0x1388, (%r12)         # imm = 0x1388
leaq 0x516c(%rip), %rax      # 0xb2f0
leaq 0x50(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rdx
callq 0x74ee
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x6a20
leaq 0x48(%rsp), %rdi
callq 0x6c7a
movq 0x8(%rsp), %rdi
callq 0xd840
leaq 0x60(%r14), %r15
movq %r15, %rdi
callq 0x56bc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6a44
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x6d70
addq $0x30, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6a94
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6dd6
movq %r15, %rdi
callq 0x4280
leaq 0x10(%rsp), %rdi
callq 0x6c7a
leaq 0x20(%rsp), %rdi
callq 0x6c7a
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6234
movq %rax, %rbx
jmp 0x624e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x6253
movq %rax, %rbx
movq %r15, %rdi
callq 0x4280
leaq 0x10(%rsp), %rdi
callq 0x6c7a
leaq 0x20(%rsp), %rdi
callq 0x6c7a
movq %rbx, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    signal(SIGUSR1, sighandler1);
    signal(SIGUSR2, sighandler2);
    signal(SIGINT, sighandler2);
    signal(SIGPIPE, SIG_IGN);  //SIG_IGN,系统函数，忽略信号的处理程序,客户端发送RST包后，服务器还调用write会触发

    int port = 80;
    int iothreadnum = 4;
    int workerthreadnum = 4;
    if(argc == 4)
    {
        port = atoi(argv[1]);
        iothreadnum = atoi(argv[2]);
        workerthreadnum = atoi(argv[3]);
    }

    EventLoop loop;
    lp = &loop;
    HttpServer httpserver(&loop, port, iothreadnum, workerthreadnum);
    httpserver.Start();

    try
    {
        loop.loop();
    }
    catch (std::bad_alloc& ba)
    {
        std::cerr << "bad_alloc caught in ThreadPool::ThreadFunc task: " << ba.what() << '\n';
    }
    //loop.loop();

    // EventLoop loop;
    // lp = &loop;
    // EchoServer echoserver(&loop, port, iothreadnum);
    // echoserver.Start();
    // loop.loop();
    // return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x157(%rip), %rsi       # 0x99c0
pushq $0xa
popq %rdi
callq 0x43a0
leaq 0x150(%rip), %r14       # 0x99c8
pushq $0xc
popq %rdi
movq %r14, %rsi
callq 0x43a0
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x43a0
pushq $0xd
popq %rdi
pushq $0x1
popq %rsi
callq 0x43a0
cmpl $0x4, %ebp
jne 0x98c2
movq 0x8(%rbx), %rdi
callq 0x44a0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x44a0
movl %eax, %r14d
movq 0x18(%rbx), %rdi
callq 0x44a0
movl %eax, %ebx
jmp 0x98cc
pushq $0x50
popq %rbp
pushq $0x4
popq %r14
movl %r14d, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x517a
movq %r15, 0xea68(%rip)      # 0x18348
leaq 0x190(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x5f30
leaq 0x190(%rsp), %rdi
callq 0x685c
leaq 0x8(%rsp), %rdi
callq 0x534e
leaq 0x190(%rsp), %rdi
callq 0x6808
leaq 0x8(%rsp), %rdi
callq 0x5306
xorl %eax, %eax
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x999c
movq %rbx, %rdi
callq 0x4140
movq %rax, %rbx
movq 0xe698(%rip), %rdi      # 0x17fe8
leaq 0x5582(%rip), %rsi      # 0xeed9
callq 0x4300
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4300
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x4380
callq 0x4510
jmp 0x990f
jmp 0x9999
movq %rax, %rbx
callq 0x4510
jmp 0x999c
movq %rax, %rdi
callq 0x4ada
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x6808
jmp 0x99ae
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5306
movq %rbx, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/poller.cpp
// Function: Poller::Poller()
Poller::Poller() :
    pollfd_(-1), eventlist_(EVENTNUM), channelmap_(), mutex_()
{
    pollfd_ = epoll_create(256);
    if(pollfd_ == -1)
    {
        perror("epoll_create error!");
        exit(1);
    }
    std::cout<< "epoll_create: " << pollfd_ << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
orl $-0x1, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0xf(%rsp), %rdx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x9e30
leaq 0x28(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
andq $0x0, 0x30(%r14)
movq %rax, 0x38(%r14)
movq %rax, 0x40(%r14)
movups %xmm0, 0x48(%r14)
movups %xmm0, 0x58(%r14)
movups %xmm0, 0x68(%r14)
movl $0x100, %edi            # imm = 0x100
callq 0x45a0
movl %eax, (%r14)
cmpl $-0x1, %eax
je 0x9a67
leaq 0x20(%r14), %r15
movq 0xe57a(%rip), %rdi      # 0x17fb8
leaq 0x54da(%rip), %rsi      # 0xef1f
callq 0x4300
movl (%r14), %esi
movq %rax, %rdi
callq 0x4560
movq %rax, %rdi
callq 0x41a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x549d(%rip), %rdi      # 0xef0b
callq 0x42a0
pushq $0x1
popq %rdi
callq 0x43b0
movq %rax, %r14
movq %r15, %rdi
callq 0x9f26
movq %rbx, %rdi
callq 0x9fa0
movq %r14, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/poller.cpp
// Function: Poller::poll(std::vector<Channel*, std::allocator<Channel*>>&)
void Poller::poll(ChannelList& activechannellist)
{
    int timeout = TIMEOUT;
    int nfds = epoll_wait(pollfd_, &*eventlist_.begin(), (int)eventlist_.capacity(), timeout);
    if(nfds == -1)
    {
        perror("epoll wait error!");
    }
    //std::cout<< "event num: " << nfds << std::endl;
    for(int i = 0; i < nfds; i++)
    {
        int events = eventlist_[i].events;
        Channel* pchannel = (Channel*)eventlist_[i].data.ptr;
        int fd = pchannel->GetFd();

        std::map<int, Channel*>::const_iterator iter;
        {
            std::lock_guard<std::mutex> lock(mutex_);
            iter = channelmap_.find(fd);
        }
        if(iter != channelmap_.end())
        {
            pchannel->SetEvents(events);
            activechannellist.push_back(pchannel);
        } else
        {
            std::cout<< "not find channel!" << std::endl;
        }
    }
    if(nfds == (int)eventlist_.capacity())
    {
        std::cout<< "resize:" << nfds << std::endl;
        eventlist_.resize(nfds * 2);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, %r14
movl (%rdi), %edi
movq 0x8(%r14), %rsi
movq 0x18(%r14), %rax
subq %rsi, %rax
pushq $0xc
popq %rcx
cqto
idivq %rcx
movl %eax, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
callq 0x4190
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x9c27
leaq 0x8(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x50(%r14), %r13
leaq 0x20(%r14), %rbp
movq %r14, 0x20(%rsp)
leaq 0x28(%r14), %rax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
testl %ebx, %ebx
movl $0x0, %eax
movl %ebx, 0x8(%rsp)
cmovgl %ebx, %eax
imulq $0xc, %rax, %rbx
cmpq %r14, %rbx
je 0x9bc7
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl (%rax,%r14), %r15d
movq 0x4(%rax,%r14), %rdi
movq %rdi, 0x18(%rsp)
callq 0x49b4
movl %eax, 0xc(%rsp)
movq %r13, %rdi
callq 0x56bc
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0xa074
movq %rax, %r12
movq %r13, %rdi
callq 0x4280
cmpq 0x30(%rsp), %r12
je 0x9ba3
movq 0x18(%rsp), %rdi
movl %r15d, %esi
callq 0x49b8
movq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x9e82
jmp 0x9bbe
movq 0xe40e(%rip), %rdi      # 0x17fb8
leaq 0x538f(%rip), %rsi      # 0xef40
callq 0x4300
movq %rax, %rdi
callq 0x41a0
addq $0xc, %r14
jmp 0x9b36
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rax
subq 0x8(%rcx), %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
movl 0x8(%rsp), %ebx
cmpl %eax, %ebx
jne 0x9c18
movq 0xe3cd(%rip), %rdi      # 0x17fb8
leaq 0x5360(%rip), %rsi      # 0xef52
callq 0x4300
movq %rax, %rdi
movl %ebx, %esi
callq 0x4560
movq %rax, %rdi
callq 0x41a0
addl %ebx, %ebx
movslq %ebx, %rsi
movq 0x10(%rsp), %rdi
callq 0x9ea0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5300(%rip), %rdi      # 0xef2e
callq 0x42a0
jmp 0x9b02
movq %rax, %rbx
movq %r13, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x4570
nop
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/poller.cpp
// Function: Poller::AddChannel(Channel*)
void Poller::AddChannel(Channel* pchannel)
{
    int fd = pchannel->GetFd();
    struct epoll_event ev;
    ev.events = pchannel->GetEvents();
    //data是联合体
    //ev.data.fd == fd
    ev.data.ptr = pchannel;
    {
        std::lock_guard<std::mutex> lock(mutex_);
        channelmap_[fd] = pchannel;
    }

    if(epoll_ctl(pollfd_, EPOLL_CTL_ADD, fd, &ev) == -1)
    {
        perror("epoll add error!");
        exit(1);
    }
    std::cout<< "Add Channel!" << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x49b4
leaq 0x8(%rsp), %r12
movl %eax, (%r12)
movq %r14, %rdi
callq 0x49bc
movl %eax, 0xc(%rsp)
movq %r14, 0x10(%rsp)
leaq 0x50(%rbx), %r15
movq %r15, %rdi
callq 0x56bc
leaq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x9ed8
movq %r14, (%rax)
movq %r15, %rdi
callq 0x4280
movl (%rbx), %edi
movl 0x8(%rsp), %edx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rcx
callq 0x4410
cmpl $-0x1, %eax
je 0x9ce1
movq 0xe2f7(%rip), %rdi      # 0x17fb8
leaq 0x52a3(%rip), %rsi      # 0xef6b
callq 0x4300
movq %rax, %rdi
callq 0x41a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x5272(%rip), %rdi      # 0xef5a
callq 0x42a0
pushq $0x1
popq %rdi
callq 0x43b0
movq %rax, %rbx
movq %r15, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x4570
// File: /workspace/github_cpp_makefile_star2_O2/guoxuanhan[P]NetServer/poller.cpp
// Function: Poller::RemoveChannel(Channel*)
void Poller::RemoveChannel(Channel* pchannel)
{
    int fd = pchannel->GetFd();
    struct epoll_event ev;
    ev.events = pchannel->GetEvents();
    ev.data.ptr = pchannel;
    {
        std::lock_guard<std::mutex> lock(mutex_);
        channelmap_.erase(fd);
    }

    if(epoll_ctl(pollfd_, EPOLL_CTL_DEL, fd, &ev) == -1)
    {
        perror("epoll del error!");
        exit(1);
    }
    std::cout<< "Remove Channel!" << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x49b4
movq %rsp, %r15
movl %eax, (%r15)
movq %r14, %rdi
callq 0x49bc
movl %eax, 0x4(%rsp)
movq %r14, 0x8(%rsp)
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x56bc
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0xa592
movq %r14, %rdi
callq 0x4280
movl (%rbx), %edi
movl (%rsp), %edx
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %rcx
callq 0x4410
cmpl $-0x1, %eax
je 0x9d92
movq 0xe244(%rip), %rdi      # 0x17fb8
leaq 0x520e(%rip), %rsi      # 0xef89
callq 0x4300
movq %rax, %rdi
callq 0x41a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x51df(%rip), %rdi      # 0xef78
callq 0x42a0
pushq $0x1
popq %rdi
callq 0x43b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x4570
nop