LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/PRDeving[P]CheckMyTags/src/checkmytags.cpp
// Function: getLookFor(char*)
void getLookFor(char file[]){
    if(file != NULL)
        lookforfile = file;

    cout << lookforfile << endl;

    string line;
    ifstream is(lookforfile.c_str());

    while(getline(is, line)){
        Tag item;
        item.name = line;
        item.cname = line.insert( 1, "/");
        item.count = 0;
        tags.push_back(item);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
testq %rdi, %rdi
je 0x242e
movq %rdi, %rbx
movq 0x3d19(%rip), %r14      # 0x6128
leaq 0x3d0a(%rip), %r15      # 0x6120
callq 0x2080
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2170
movq 0x3ceb(%rip), %rsi      # 0x6120
movq 0x3cec(%rip), %rdx      # 0x6128
movq 0x3b95(%rip), %rdi      # 0x5fd8
callq 0x2140
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x3c94(%rip), %rsi      # 0x6120
leaq -0x298(%rbp), %rdi
movl $0x8, %edx
callq 0x21d0
leaq -0x60(%rbp), %r14
leaq -0x48(%rbp), %r15
xorl %ebx, %ebx
leaq -0x90(%rbp), %r12
movq -0x298(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x298(%rbp), %r13
addq %r13, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x21e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2590
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %rbx, -0x88(%rbp)
movb %bl, -0x80(%rbp)
movq %r14, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
movb %bl, -0x60(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x20a0
movl $0x1, %esi
movl $0x1, %r8d
movq %r15, %rdi
xorl %edx, %edx
leaq 0x1af3(%rip), %rcx      # 0x4022
callq 0x2130
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x20a0
movl $0x0, -0x50(%rbp)
leaq 0x3bf2(%rip), %rdi      # 0x6140
movq %r12, %rsi
callq 0x2c20
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x256b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x24ae
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2120
jmp 0x24ae
leaq -0x298(%rbp), %rdi
callq 0x2040
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x25b5
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2120
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x25ec
movq %rax, %rbx
jmp 0x25e0
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2c58
leaq -0x298(%rbp), %rdi
callq 0x2040
leaq -0x38(%rbp), %rax
movq -0x48(%rbp), %rdi
cmpq %rax, %rdi
je 0x2605
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/PRDeving[P]CheckMyTags/src/checkmytags.cpp
// Function: countSubstring(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int countSubstring(const string* str, const string sub){
    if (sub.length() == 0) return 0;
    int count = 0;
    for (size_t offset = str->find(sub); offset != std::string::npos;
    offset = str->find(sub, offset + sub.length())){
        ++count;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x265c
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x21a0
cmpq $-0x1, %rax
je 0x265f
xorl %r15d, %r15d
incl %r15d
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
addq %rcx, %rax
movq %r14, %rdi
movq %rax, %rdx
callq 0x21a0
cmpq $-0x1, %rax
jne 0x263c
jmp 0x265f
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/main.cpp
// Function: main
int main()
{
	try
	{
		Window appWindow("SK's Mandelbrot Set Viewer", SDL_WINDOW_SHOWN);
		appWindow.startEventLoop();
	}
	catch(std::string errMsg)
	{
		std::cerr << errMsg << std::endl;
		exit(-1);
	}
	catch(...)
	{
		std::cerr << "An unknown error occured!" << std::endl;
		exit(-1);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xc1f(%rip), %rsi       # 0x3039
leaq 0xc32(%rip), %rdx       # 0x3053
leaq -0x58(%rbp), %rdi
callq 0x25f0
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x4, %edx
callq 0x296c
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x2451
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x38(%rbp), %rdi
callq 0x2a26
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2486
movq %rdx, %r14
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x248c
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x248c
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x2, %r14d
jne 0x24db
movq %rbx, %rdi
callq 0x21b0
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x2556
movq %rbx, %rdi
callq 0x2090
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x2b24(%rip), %rdi      # 0x4ff0
callq 0x2180
movq %rax, %rdi
callq 0x20b0
jmp 0x2507
movq %rbx, %rdi
callq 0x2090
movq 0x2b06(%rip), %rdi      # 0x4ff0
leaq 0xb63(%rip), %rsi       # 0x3054
movl $0x19, %edx
callq 0x2180
movq 0x2aee(%rip), %rdi      # 0x4ff0
callq 0x20b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21a0
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2529
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2170
callq 0x21f0
jmp 0x2538
movq %rax, %rbx
callq 0x21f0
movq %rbx, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2548
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/Window.cpp
// Function: Window::drawAxes(Cartesian2DPlane*)
void Window::drawAxes( Cartesian2DPlane *plane )
{
	Cartesian2DPoint leftExtreme	(double(0),	-1000,	plane);
	Cartesian2DPoint rightExtreme	(double(0),	1000,	plane);
	Cartesian2DPoint topExtreme		(double(1000), 0,		plane);
	Cartesian2DPoint bottomExtreme	(double(-1000),0, 	plane);

	SDL_SetRenderDrawColor(screenRenderer, 120,120,120,SDL_ALPHA_OPAQUE);
	//The X axis
	SDL_RenderDrawLine(screenRenderer, leftExtreme.getOnScreenX(), leftExtreme.getOnScreenY(),	
										rightExtreme.getOnScreenX(), rightExtreme.getOnScreenY());
	//The Y axis
	SDL_RenderDrawLine(screenRenderer, topExtreme.getOnScreenX(), topExtreme.getOnScreenY(),
										bottomExtreme.getOnScreenX(), bottomExtreme.getOnScreenY());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x90(%rbp), %r13
movsd 0x9e6(%rip), %xmm1      # 0x3098
xorps %xmm0, %xmm0
movq %r13, %rdi
callq 0x2b38
leaq -0x78(%rbp), %rdi
movsd 0x9d7(%rip), %xmm1      # 0x30a0
xorps %xmm0, %xmm0
movq %rdi, %r12
movq %r14, %rsi
callq 0x2b38
leaq -0x60(%rbp), %rdi
xorps %xmm1, %xmm1
movsd 0x9ba(%rip), %xmm0      # 0x30a0
movq %r14, %rsi
callq 0x2b38
leaq -0x48(%rbp), %rdi
xorps %xmm1, %xmm1
movsd 0x99b(%rip), %xmm0      # 0x3098
movq %r14, %rsi
callq 0x2b38
movq %rbx, -0x30(%rbp)
movq 0x10(%rbx), %rdi
movl $0x78, %esi
movl $0x78, %edx
movl $0x78, %ecx
movl $0xff, %r8d
callq 0x21c0
movq 0x10(%rbx), %r14
movq %r13, %rdi
callq 0x2bee
movq %rax, %r15
movq %r13, %rdi
callq 0x2c50
movq %rax, %r13
movq %r12, %rbx
movq %r12, %rdi
callq 0x2bee
movq %rax, %r12
movq %rbx, %rdi
callq 0x2c50
movq %r14, %rdi
movl %r15d, %esi
movl %r13d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq 0x2080
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rbx
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x2bee
movq %rax, %r14
movq %r15, %rdi
callq 0x2c50
movq %rax, %r15
leaq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x2bee
movq %rax, %r12
movq %r13, %rdi
callq 0x2c50
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq 0x2080
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/Window.cpp
// Function: Window::Window(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
Window::Window(std::string windowTitle, uint64_t flags)
{	
		if(SDL_Init(SDL_INIT_VIDEO) < 0) throw "Couldn't initialize SDL Video!";

		if((window = SDL_CreateWindow(windowTitle.c_str(), WINDOW_X, WINDOW_Y, SCREEN_W, SCREEN_H, flags)) == NULL)
			throw "Couldn't create SDL window!";

		//windowSurface = SDL_GetWindowSurface(window);

		if((screenRenderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED)) == NULL)
			throw "Couldn't create SDL Renderer!";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %edi
callq 0x2130
testl %eax, %eax
js 0x29db
movq (%r15), %rdi
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl $0x384, %ecx            # imm = 0x384
movl $0x384, %r8d            # imm = 0x384
movl %r14d, %r9d
callq 0x2040
movq %rax, (%rbx)
testq %rax, %rax
je 0x29ee
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x2, %edx
callq 0x2030
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x2a01
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20c0
leaq 0x702(%rip), %rcx       # 0x30ee
jmp 0x2a12
movl $0x8, %edi
callq 0x20c0
leaq 0x70e(%rip), %rcx       # 0x310d
jmp 0x2a12
movl $0x8, %edi
callq 0x20c0
leaq 0x717(%rip), %rcx       # 0x3129
movq %rcx, (%rax)
movq 0x25a4(%rip), %rsi      # 0x4fc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/Window.cpp
// Function: Window::startEventLoop()
void Window::startEventLoop()
{
		SDL_Event e;
		bool appQuit = false;
		bool changed = false;
		srand(42);
		
		Cartesian2DPlane plane(SCREEN_W, SCREEN_H, 150);
		drawScreen(&plane);
		while(!appQuit)
		{
			changed = false;
			while(SDL_PollEvent(&e))
			{
				if(e.type == SDL_QUIT)
				{
					appQuit = true;
					break;
				}
				else if(e.type == SDL_KEYDOWN)
				{
					switch(e.key.keysym.sym)
					{
						case SDLK_UP: 		plane.translateUp();	changed = true;break;
						case SDLK_DOWN: 	plane.translateDown();	changed = true;break;
						case SDLK_LEFT: 	plane.translateLeft();	changed = true;break;
						case SDLK_RIGHT: 	plane.translateRight();	changed = true;break;
						case SDLK_z: 	plane.zoomIn();			changed = true;break;
						case SDLK_x:	plane.zoomOut();		changed = true;break;
					}
				}
			}
			if(changed) drawScreen(&plane);
		}
		//event loop ends.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movl $0x2a, %edi
callq 0x2160
leaq -0x98(%rbp), %r14
movsd 0x65d(%rip), %xmm0      # 0x30b0
movl $0x384, %esi            # imm = 0x384
movl $0x384, %edx            # imm = 0x384
movq %r14, %rdi
callq 0x2cbc
movq %rbx, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27c8
xorl %r12d, %r12d
leaq -0x68(%rbp), %r15
leaq 0x64e(%rip), %r13       # 0x30d0
movq %r15, %rdi
callq 0x20d0
xorl %ebx, %ebx
testl %eax, %eax
je 0x2b0e
movl -0x68(%rbp), %eax
cmpl $0x300, %eax            # imm = 0x300
je 0x2aa3
cmpl $0x100, %eax            # imm = 0x100
jne 0x2b01
jmp 0x2b0b
movl -0x54(%rbp), %eax
leal -0x4000004f(%rax), %ecx
cmpl $0x3, %ecx
ja 0x2ac5
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x2dde
jmp 0x2aff
cmpl $0x78, %eax
je 0x2ad9
cmpl $0x7a, %eax
jne 0x2b01
movq %r14, %rdi
callq 0x2d2c
jmp 0x2aff
movq %r14, %rdi
callq 0x2d78
jmp 0x2aff
movq %r14, %rdi
callq 0x2df6
jmp 0x2aff
movq %r14, %rdi
callq 0x2dea
jmp 0x2aff
movq %r14, %rdi
callq 0x2dd2
movb $0x1, %bl
movq %r15, %rdi
callq 0x20d0
jmp 0x2a8c
movb $0x1, %r12b
testb $0x1, %bl
je 0x2b1f
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x27c8
testb $0x1, %r12b
je 0x2a82
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/Cartesian2D.cpp
// Function: Cartesian2DPlane::Cartesian2DPlane(unsigned long, unsigned long, double)
Cartesian2DPlane::Cartesian2DPlane(uint64_t w, uint64_t h, double zoom)
{
	width = w;
	height = h;
	originX = width/2;
	originY = height/2;
	XScaleFactor = zoom;
	YScaleFactor = (height/double(width)) * XScaleFactor;
	// The above calculation makes sure that X and Y are
	// "stretched" to equal lengths, so that even if the
	// height and width are not same, we can have a grid
	// of squares.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rdx, %xmm1
movq 0x47c(%rip), %xmm2      # 0x3150
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x480(%rip), %xmm3      # 0x3160
subpd %xmm3, %xmm1
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
addsd %xmm1, %xmm4
movq %rsi, %xmm1
shrq %rsi
movq %rsi, 0x10(%rdi)
shrq %rdx
movq %rdx, 0x18(%rdi)
movsd %xmm0, 0x20(%rdi)
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm4
mulsd %xmm0, %xmm4
movsd %xmm4, 0x28(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/bsaikiran618[P]mandelbrot-set-viewer/Mandelbrot.cpp
// Function: inMandelbrotSet(std::complex<double>, unsigned long)
int inMandelbrotSet(std::complex<double> point, uint64_t max_iters)
{
	std::complex<double> initial = point;
	int count = 0;
	for(uint64_t i=0;i<max_iters;i++)
	{
		if(std::abs(point) > 2) return count;
		point = std::pow(point, 2) + initial;
		count++;
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2e8f
movq %rdi, %r14
xorl %r15d, %r15d
movapd %xmm1, %xmm2
movapd %xmm0, %xmm3
movsd %xmm1, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm3, -0x30(%rbp)
movapd %xmm3, %xmm0
movsd %xmm2, -0x38(%rbp)
movapd %xmm2, %xmm1
callq 0x2230
ucomisd 0x326(%rip), %xmm0      # 0x3178
ja 0x2e8c
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movl $0x2, %edi
callq 0x2e9c
movapd %xmm0, %xmm3
movapd %xmm1, %xmm2
movsd -0x20(%rbp), %xmm0
addsd %xmm0, %xmm3
movsd -0x28(%rbp), %xmm1
addsd %xmm1, %xmm2
incq %r15
cmpq %r15, %r14
jne 0x2e33
jmp 0x2e8f
movl %r15d, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/Basket.cc
// Function: Basket::display(std::ostream&) const
void Basket::display(ostream &os) const
{
    os << "Basket size: " << items.size() << endl;

    // print each distinct ISBN in the Basket along with
    // count of how many copies are ordered and what their price will be
    // upper_bound returns an iterator to the next item in the set
    for (auto next_item = items.cbegin();
              next_item != items.cend();
              next_item = items.upper_bound(*next_item))
    {
        // we know there's at least one element with this key in the Basket
        os << (*next_item)->isbn() << " occurs " 
           << items.count(*next_item) << " times" 
           << " for a price of " 
           << (*next_item)->net_price(items.count(*next_item)) 
           << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbb8(%rip), %rsi       # 0x41c6
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2120
movq 0x28(%r14), %rsi
movq %rbx, -0x50(%rbp)
movq %rbx, %rdi
callq 0x2090
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq 0x18(%r14), %r15
leaq 0x8(%r14), %rbx
cmpq %rbx, %r15
je 0x3794
movq 0x20(%r15), %rax
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2b18
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x2120
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0xb2b(%rip), %rsi       # 0x41d4
callq 0x2120
addq $0x20, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x38d0
movq %r12, %rdi
movq %rax, %rsi
callq 0x2090
movq %rax, %r12
movl $0x6, %edx
movq %rax, %rdi
leaq 0xb03(%rip), %rsi       # 0x41dd
callq 0x2120
movl $0x10, %edx
movq %r12, %rdi
leaq 0xaf6(%rip), %rsi       # 0x41e4
callq 0x2120
movq (%r15), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x38d0
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movq %r12, %rdi
callq 0x2170
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3759
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq 0x10(%r14), %r12
movq %rbx, %r13
testq %r12, %r12
je 0x3788
movq %rbx, %r13
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq *(%r14)
testb %al, %al
cmovneq %r12, %r13
xorb $0x1, %al
movzbl %al, %eax
movq 0x10(%r12,%rax,8), %r12
testq %r12, %r12
jne 0x3768
movq %r13, %r15
cmpq %rbx, %r13
jne 0x3666
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37bf
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %r14, %rdi
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/Basket.cc
// Function: Basket::total_receipt(std::ostream&) const
double Basket::total_receipt(ostream &os) const
{
    double sum = 0.0;    // holds the running total 


    // iter refers to the first element in a batch of elements with the same ISBN
    // upper_bound returns an iterator to the element just past the end of that batch
    for (auto iter = items.cbegin(); 
              iter != items.cend();
              iter = items.upper_bound(*iter)) {
        // we know there's at least one element with this key in the Basket
		// print the line item for this book
        sum += print_total(os, **iter, items.count(*iter));  
    } 
	os << "Total Sale: " << sum << endl; // print the final overall total
    return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
movq 0x18(%rdi), %r15
leaq 0x8(%rdi), %r13
cmpq %r13, %r15
je 0x3864
movq %rdi, %r14
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x20(%r15), %r12
addq $0x20, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x38d0
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x39cc
movsd %xmm0, -0x40(%rbp)
movq 0x10(%r14), %rbx
movq %r13, %r12
testq %rbx, %rbx
je 0x384b
movq %r13, %r12
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq *(%r14)
testb %al, %al
cmovneq %rbx, %r12
xorb $0x1, %al
movzbl %al, %eax
movq 0x10(%rbx,%rax,8), %rbx
testq %rbx, %rbx
jne 0x382c
movsd -0x30(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r12, %r15
cmpq %r13, %r12
jne 0x37f6
jmp 0x386d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x981(%rip), %rsi       # 0x41f5
movl $0xc, %edx
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x2120
movq %rbx, %rdi
movsd -0x30(%rbp), %xmm0
callq 0x2170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movsd -0x30(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/Quote.cc
// Function: print_total(std::ostream&, Quote const&, unsigned long)
double print_total(ostream &os, 
                   const Quote &item, size_t n)
{
	// depending on the type of the object bound to the item parameter
	// calls either Quote::net_price or Bulk_quote::net_price
	double ret = item.net_price(n); 
    os << "ISBN: " << item.isbn() // calls Quote::isbn
       << " # sold: " << n << " total due: " << ret << endl;
 	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
movq %rdx, %rsi
callq *0x10(%rax)
movsd %xmm0, -0x28(%rbp)
leaq 0x814(%rip), %rsi       # 0x4210
movl $0x6, %edx
movq %r14, %rdi
callq 0x2120
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x2b18
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x2120
movq %rax, %r14
leaq 0x7d5(%rip), %rsi       # 0x4217
movl $0x9, %edx
movq %rax, %rdi
callq 0x2120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2090
movq %rax, %rbx
leaq 0x7bd(%rip), %rsi       # 0x4221
movl $0xc, %edx
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
movsd -0x28(%rbp), %xmm0
callq 0x2170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x3abd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movsd -0x28(%rbp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x3ae7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH15_ObjectOrientedProgramming/examples/Quote.cc
// Function: Lim_quote::net_price(unsigned long) const
double Lim_quote::net_price(size_t cnt) const
{
    size_t discounted = min(cnt, quantity);
    size_t undiscounted = cnt - discounted;
    return discounted * (1 - discount) * price 
           + undiscounted * price;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rax
cmpq %rsi, %rax
cmovaeq %rsi, %rax
subq %rax, %rsi
movq %rax, %xmm0
movq 0x4bd(%rip), %xmm1      # 0x4010
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x4c1(%rip), %xmm2      # 0x4020
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movsd 0x691(%rip), %xmm0      # 0x4208
subsd 0x38(%rdi), %xmm0
mulsd %xmm3, %xmm0
movsd 0x28(%rdi), %xmm3
movq %rsi, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
subpd %xmm2, %xmm4
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
addsd %xmm4, %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::printDeviceTopologyInfo()
void DS_MultiVolume_Impl::printDeviceTopologyInfo() {
    __INFO("\nDB Device Topology information:\n"
            "\t Segment size                : %d\n"
            "\t Volumes number              : %d",
            sbResHeader_.segment_size, sbResHeader_.volume_num);
    for (uint32_t i = 0 ; i < sbResHeader_.volume_num; i++) {
        __INFO("\nVolume[%d] : dev_path = %s, segment_num = %d, cur_seg_id = %d",
                i, sbResVolVec_[i].dev_path,
                sbResVolVec_[i].segment_num,
                sbResVolVec_[i].cur_seg_id);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2d6b1(%rip), %rbp     # 0x33fd8
movq (%rbp), %r15
callq 0x63d0
movq %rax, %r14
leaq 0x1b896(%rip), %rsi     # 0x221d0
leaq 0x1b8af(%rip), %rcx     # 0x221f0
leaq 0x1ba38(%rip), %r8      # 0x22380
pushq $0x54
popq %r9
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6570
movq (%rbp), %rdi
movl 0x120(%rbx), %edx
movl 0x124(%rbx), %ecx
leaq 0x1ba2b(%rip), %rsi     # 0x2239b
xorl %eax, %eax
callq 0x6570
movq (%rbp), %rsi
pushq $0xa
popq %rdi
callq 0x64d0
cmpl $0x0, 0x124(%rbx)
je 0x6a12
pushq $0xa
popq %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movq (%rbp), %rdi
leaq 0x1b82b(%rip), %rsi     # 0x221d0
movq %r14, %rdx
leaq 0x1b841(%rip), %rcx     # 0x221f0
leaq 0x1b9ca(%rip), %r8      # 0x22380
pushq $0x59
popq %r9
xorl %eax, %eax
callq 0x6570
movq (%rbp), %rdi
movq 0x128(%rbx), %rax
leaq (%rax,%r15), %rcx
movl 0x100(%rax,%r15), %r8d
movl 0x104(%rax,%r15), %r9d
leaq 0x1ba1b(%rip), %rsi     # 0x22402
movl %r13d, %edx
xorl %eax, %eax
callq 0x6570
movq (%rbp), %rsi
movl %r12d, %edi
callq 0x64d0
incq %r13
movl 0x124(%rbx), %eax
addq $0x108, %r15            # imm = 0x108
cmpq %rax, %r13
jb 0x699a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::printDynamicInfo()
void DS_MultiVolume_Impl::printDynamicInfo() {
    __INFO("\n DS_MultiVolume_Impl Dynamic information: \n"
            "\t Request Queue Size          : %d\n"
            "\t Segment Write Queue Size    : %d\n",
            getReqQueSize(), getSegWriteQueSize());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movq 0x2d5a4(%rip), %r12     # 0x33fd8
movq (%r12), %r14
callq 0x63d0
leaq 0x1b78c(%rip), %rsi     # 0x221d0
leaq 0x1b7f7(%rip), %rcx     # 0x22242
leaq 0x1b92e(%rip), %r8      # 0x22380
xorl %ebx, %ebx
pushq $0x61
popq %r9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6570
movq (%r12), %r14
movq %r15, %rdi
callq 0xcb30
movl %eax, %ebp
movq 0x158(%r15), %rdi
testq %rdi, %rdi
je 0x6a86
callq 0xe33e
movl %eax, %ebx
leaq 0x1b9b4(%rip), %rsi     # 0x22441
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x6570
movq (%r12), %rsi
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x64d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::printDynamicInfo()
void IndexManager::printDynamicInfo() {
    __INFO("\n DB Dynamic information: \n"
            "\t number of entries           : %d\n"
            "\t Entry Theory Data Size      : %ld Bytes\n"
            "\t Segment Reaper Queue Size   : %d",
            keyCounter_, dataTheorySize_,
            GetSegReaperQueSize());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq 0x2ccf1(%rip), %r13     # 0x33fd8
movq (%r13), %r14
callq 0x63d0
leaq 0x1aed9(%rip), %rsi     # 0x221d0
leaq 0x1af44(%rip), %rcx     # 0x22242
leaq 0x1b740(%rip), %r8      # 0x22a45
xorl %ebx, %ebx
movq %r14, %rdi
movq %rax, %rdx
movl $0x86, %r9d
xorl %eax, %eax
callq 0x6570
movq (%r13), %r15
movl 0x18(%r12), %ebp
movq 0x20(%r12), %r14
movq 0x98(%r12), %rdi
testq %rdi, %rdi
je 0x733c
callq 0xe33e
movl %eax, %ebx
leaq 0x1b716(%rip), %rsi     # 0x22a59
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x6570
movq (%r13), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x64d0
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Tier.cc
// Function: hlkvds::MediumTier::printDeviceTopologyInfo()
void MediumTier::printDeviceTopologyInfo() {
    __INFO( "\n\t Medium Tier Infomation:\n"
            "\t Medium Tier Seg Size          : %d\n"
            "\t Medium Tier Vol Num           : %d",
            sbResMediumTierHeader_.segment_size, sbResMediumTierHeader_.volume_num);

    for (uint32_t i = 0 ; i < volNum_; i++) {
        __INFO("\n\t Medium Tier Volume[%d] : dev_path = %s, segment_num = %d, cur_seg_id = %d",
                i, sbResMediumTierVolVec_[i].dev_path,
                sbResMediumTierVolVec_[i].segment_num,
                sbResMediumTierVolVec_[i].cur_seg_id);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b691(%rip), %r13     # 0x33fd8
movq (%r13), %r15
callq 0x63d0
movq %rax, %r14
leaq 0x19876(%rip), %rsi     # 0x221d0
leaq 0x1988f(%rip), %rcx     # 0x221f0
leaq 0x1ba70(%rip), %r8      # 0x243d8
movq %r15, %rdi
movq %rax, %rdx
movl $0x25e, %r9d            # imm = 0x25E
xorl %eax, %eax
callq 0x6570
movq (%r13), %rdi
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x1bb63(%rip), %rsi     # 0x244ef
xorl %eax, %eax
callq 0x6570
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x64d0
cmpl $0x0, 0x40(%rbx)
je 0x8a22
pushq $0xa
popq %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r13), %rdi
leaq 0x19817(%rip), %rsi     # 0x221d0
movq %r14, %rdx
leaq 0x1982d(%rip), %rcx     # 0x221f0
leaq 0x1ba0e(%rip), %r8      # 0x243d8
movl $0x264, %r9d            # imm = 0x264
xorl %eax, %eax
callq 0x6570
movq (%r13), %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%rbp), %rcx
movl 0x100(%rax,%rbp), %r8d
movl 0x104(%rax,%rbp), %r9d
leaq 0x1bb5a(%rip), %rsi     # 0x24554
movl %r12d, %edx
xorl %eax, %eax
callq 0x6570
movq (%r13), %rsi
movl %r15d, %edi
callq 0x64d0
incq %r12
movl 0x40(%rbx), %eax
addq $0x108, %rbp            # imm = 0x108
cmpq %rax, %r12
jb 0x89ae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/tools/DbTest.cc
// Function: Create_DB_Test(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Create_DB_Test(string filename) {

    int record_num = 10;
    int ht_size = record_num * 2;

    Options opts;
    opts.segment_size = 256 * 1024;
    opts.hashtable_size = ht_size;

    KVDS *db = KVDS::Create_KVDS(filename.c_str(), opts);

    delete db;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x172ec
movabsq $0x4000000000014, %rax  # imm = 0x4000000000014
movq %rax, 0x40(%r14)
movq (%rbx), %rax
movl $0xa, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x135f0
testq %rax, %rax
je 0x98fb
movq (%rax), %rcx
movq %rax, %rdi
callq *0x8(%rcx)
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/tools/DbTest.cc
// Function: main
int main(int argc, char** argv) {
    string filename = argv[1];

    Create_DB_Test(filename);
    Open_DB_Test(filename);
    std::cout << "first process success" << std::endl;
    Create_DB_Test(filename);
    Open_DB_Test(filename);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x6170
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xa64c
leaq 0x88(%rsp), %rdi
callq 0x98ac
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xa4e8
callq 0x6400
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xa64c
leaq 0x68(%rsp), %rdi
callq 0x9906
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xa521
callq 0x6400
movq 0x29aa8(%rip), %rbx     # 0x33fd0
leaq 0x17c4f(%rip), %rsi     # 0x2217e
movl $0x15, %edx
movq %rbx, %rdi
callq 0x6460
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x6410
movsbl %al, %esi
movq 0x29a76(%rip), %rdi     # 0x33fd0
callq 0x6050
movq %rax, %rdi
callq 0x62d0
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xa64c
leaq 0x48(%rsp), %rdi
callq 0x98ac
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0xa5a0
callq 0x6400
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa64c
leaq 0x28(%rsp), %rdi
callq 0x9906
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0xa5d9
callq 0x6400
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5ec
callq 0x6400
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0xa622
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0xa622
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0xa622
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xa631
callq 0x6400
jmp 0xa631
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa644
callq 0x6400
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/rmd160.c
// Function: MDfinish
void MDfinish(dword *MDbuf, byte *strptr, dword lswlen, dword mswlen) {
    dword i; /* counter       */
    dword X[16]; /* message words */

    memset(X, 0, 16 * sizeof(dword));

    /* put bytes from strptr into X */
    for (i = 0; i < (lswlen & 63); i++) {
        /* byte i goes into word X[i div 4] at pos.  8*(i mod 4)  */
        X[i >> 2] ^= (dword) *strptr++ << (8 * (i & 3));
    }

    /* append the bit m_n == 1 */
    X[(lswlen >> 2) & 15] ^= (dword) 1 << (8 * (lswlen & 3) + 7);

    if ((lswlen & 63) > 55) {
        /* length goes to next block */
        compress_(MDbuf, X);
        memset(X, 0, 16 * sizeof(dword));
    }

    /* append length in bits*/
    X[14] = lswlen << 3;
    X[15] = (lswlen >> 29) | (mswlen << 3);
    compress_(MDbuf, X);

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edx, %eax
andl $0x3f, %eax
je 0xbac4
xorl %edx, %edx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movl %edx, %ecx
andb $0x18, %cl
shll %cl, %r8d
movl %edi, %ecx
andl $-0x4, %ecx
xorl %r8d, (%rsp,%rcx)
incq %rdi
addl $0x8, %edx
cmpl %edi, %eax
jne 0xbaa4
leal (,%r15,8), %ebp
movl $0x80, %edx
movl %ebp, %ecx
shll %cl, %edx
movl %r15d, %ecx
andl $0x3c, %ecx
xorl %edx, (%rsp,%rcx)
cmpl $0x38, %eax
jb 0xbb0b
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xa77e
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %rsp, %rsi
movl %ebp, 0x38(%rsi)
shldl $0x3, %r15d, %ebx
movl %ebx, 0x3c(%rsi)
movq %r14, %rdi
callq 0xa77e
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::ReadData(hlkvds::KVSlice&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Status DS_MultiTier_Impl::ReadData(KVSlice &slice, std::string &data) {
    HashEntry *entry;
    entry = &slice.GetHashEntry();

    TierType tier_type = locateTierFromEntry(entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->ReadData(slice, data);
    }
    return mt_->ReadData(slice, data);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdx), %rax
movq (%rax), %rax
cmpw $0x64, 0x20(%rax)
jne 0xbd2e
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1eed2
jmp 0xbd3a
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f9ee
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetSBReservedContent(char*, unsigned long)
bool DS_MultiTier_Impl::GetSBReservedContent(char* buf, uint64_t length) {
    if (length != SuperBlockManager::ReservedRegionLength()) {
        return false;
    }
    memset((void*)buf, 0, length);

    char* buf_ptr = buf;
    //Get sbResHeader_
    uint64_t header_size = sizeof(MultiTierDS_SB_Reserved_Header);
    memcpy((void*)buf_ptr, (const void*)&sbResHeader_, header_size);
    buf_ptr += header_size;
    __DEBUG("SB_RESERVED_HEADER: sb_reserved_fast_tier_size = %d, sb_reserved_medium_tier_size = %d ",
            sbResHeader_.sb_reserved_fast_tier_size, sbResHeader_.sb_reserved_medium_tier_size);

    //Get FastTier
    if (!ft_->GetSBReservedContent(buf_ptr, sbResHeader_.sb_reserved_fast_tier_size)) {
        return false;
    }
    buf_ptr += sbResHeader_.sb_reserved_fast_tier_size;

    //Get MediumTier
    if (!mt_->GetSBReservedContent(buf_ptr, sbResHeader_.sb_reserved_medium_tier_size)) {
        return false;
    }

    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0xfc3, %rdx            # imm = 0xFC3
jne 0xbdc0
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x6260
movq 0x28(%r14), %rax
movq %rax, (%rbx)
addq $0x8, %rbx
movq 0x30(%r14), %rdi
movl 0x28(%r14), %edx
movq %rbx, %rsi
callq 0x1efb0
testb %al, %al
je 0xbdc0
movl 0x28(%r14), %eax
movl 0x2c(%r14), %edx
addq %rax, %rbx
movq 0x38(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1fb08
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::SetSBReservedContent(char*, unsigned long)
bool DS_MultiTier_Impl::SetSBReservedContent(char* buf, uint64_t length) {
    if (length != SuperBlockManager::ReservedRegionLength()) {
        return false;
    }

    char* buf_ptr = buf;
    //Set sbResHeader_
    uint64_t header_size = sizeof(MultiTierDS_SB_Reserved_Header);
    memcpy((void*)&sbResHeader_, (const void*)buf_ptr, header_size);
    buf_ptr += header_size;
    __DEBUG("SB_RESERVED_HEADER: sb_reserved_fast_tier_size = %d, sb_reserved_medium_tier_size = %d ",
            sbResHeader_.sb_reserved_fast_tier_size, sbResHeader_.sb_reserved_medium_tier_size);

    //Set FastTier
    if (!ft_->SetSBReservedContent(buf_ptr, sbResHeader_.sb_reserved_fast_tier_size)) {
        return false;
    }
    buf_ptr += sbResHeader_.sb_reserved_fast_tier_size;

    //Set MediumTier
    if (!mt_->SetSBReservedContent(buf_ptr, sbResHeader_.sb_reserved_medium_tier_size)) {
        return false;
    }

    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0xfc3, %rdx            # imm = 0xFC3
jne 0xbe18
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rax, 0x28(%rdi)
addq $0x8, %rbx
movq 0x30(%rdi), %rdi
movl %eax, %edx
movq %rbx, %rsi
callq 0x1effe
testb %al, %al
je 0xbe18
movl 0x28(%r14), %eax
movl 0x2c(%r14), %edx
addq %rax, %rbx
movq 0x38(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1fbf2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetAllSSTs(char*, unsigned long)
bool DS_MultiTier_Impl::GetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

    //Copy TS
    int64_t time_len = KVTime::SizeOf();
    lastTime_->Update();
    time_t t = lastTime_->GetTime();
    memcpy((void *)buf_ptr, (const void *)&t, time_len);
    buf_ptr += time_len;
    __DEBUG("memcpy timestamp: %s at %p, at %ld", KVTime::ToChar(*lastTime_), (void *)buf_ptr, (int64_t)(buf_ptr-buf));

    //Copy First Tier SST
    uint64_t fast_tier_sst_length = ft_->GetSSTLength();
    if ( !ft_->GetSST(buf_ptr, fast_tier_sst_length) ) {
        return false;
    }
    buf_ptr += fast_tier_sst_length;

    //Copy Second Tier SST
    uint64_t med_tier_sst_length = mt_->GetSSTLength();
    if ( !mt_->GetSST(buf_ptr, med_tier_sst_length) ) {
        return false;
    }

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x98(%rax)
cmpq %r15, %rax
jne 0xbe96
movq 0x40(%r14), %rdi
callq 0x209ec
movq 0x40(%r14), %rdi
callq 0x209e0
movq %rax, (%rbx)
addq $0x8, %rbx
movq 0x30(%r14), %rdi
callq 0x1f390
movq %rax, %r15
movq 0x30(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1f026
testb %al, %al
je 0xbe96
addq %r15, %rbx
movq 0x38(%r14), %rdi
callq 0x2033e
movq 0x38(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1fcbe
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::SetAllSSTs(char*, unsigned long)
bool DS_MultiTier_Impl::SetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

    //Set TS
    int64_t time_len = KVTime::SizeOf();
    time_t t;
    memcpy((void *)&t, (const void *)buf_ptr, time_len);
    lastTime_->SetTime(t);
    buf_ptr += time_len;
    __DEBUG("memcpy timestamp: %s at %p, at %ld", KVTime::ToChar(*lastTime_), (void *)buf_ptr, (int64_t)(buf_ptr-buf));

    //Set First Tier SST
    uint64_t fast_tier_sst_length = ft_->GetSSTLength();
    if (!ft_->SetSST(buf_ptr, fast_tier_sst_length) ) {
        return false;
    }
    buf_ptr += fast_tier_sst_length;

    //Set Second Tier SST
    uint64_t med_tier_sst_length = mt_->GetSSTLength();
    if ( !mt_->SetSST(buf_ptr, med_tier_sst_length) ) {
        return false;
    }

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x98(%rax)
cmpq %r15, %rax
jne 0xbf09
movq (%rbx), %rsi
movq 0x40(%r14), %rdi
callq 0x209d4
addq $0x8, %rbx
movq 0x30(%r14), %rdi
callq 0x1f390
movq %rax, %r15
movq 0x30(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1f032
testb %al, %al
je 0xbf09
addq %r15, %rbx
movq 0x38(%r14), %rdi
callq 0x2033e
movq 0x38(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1fd44
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CreateAllComponents(unsigned long)
bool DS_MultiTier_Impl::CreateAllComponents(uint64_t sst_offset) {
    bool ret;
    ret = mt_->CreateVolume(bdVec_);
    if (!ret) {
        return false;
    }

    uint32_t mt_seg_num = mt_->GetTotalSegNum();
    ret = ft_->CreateVolume(bdVec_, sst_offset, mt_seg_num);
    if (!ret) {
        return false;
    }

    // init SB Reserved Header For Create
    sbResHeader_.sb_reserved_fast_tier_size = ft_->GetSbReservedSize();
    sbResHeader_.sb_reserved_medium_tier_size = mt_->GetSbReservedSize();

    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x38(%rdi), %rdi
callq 0x1fdca
testb %al, %al
je 0xbf66
movq 0x38(%rbx), %rax
movl 0x3c(%rax), %ecx
movq 0x10(%rbx), %rsi
movq 0x30(%rbx), %rdi
movq %r14, %rdx
callq 0x1f03e
testb %al, %al
je 0xbf68
movl $0x10c, 0x28(%rbx)      # imm = 0x10C
movq 0x38(%rbx), %rcx
movl 0x40(%rcx), %ecx
movl %ecx, %edx
shll $0x8, %edx
leal (%rdx,%rcx,8), %ecx
addl $0x8, %ecx
movl %ecx, 0x2c(%rbx)
jmp 0xbf68
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::OpenAllComponents()
bool DS_MultiTier_Impl::OpenAllComponents() {
    bool ret;

    ret = ft_->OpenVolume(bdVec_);

    if (!ret) {
        __ERROR("Fast Tier Open Volume Failed!");
        return false;
    }

    ret = mt_->OpenVolume(bdVec_);
    if (!ret) {
        __ERROR("Medium Tier Open Volume Failed!");
        return false;
    }

    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x30(%rdi), %rdi
callq 0x1f1c8
testb %al, %al
je 0xbf9c
movq 0x10(%rbx), %rsi
movq 0x38(%rbx), %rdi
callq 0x20022
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0xbfa3
popq %rbx
retq
callq 0x6864
jmp 0xbfa8
callq 0x68bb
movq 0x28029(%rip), %rax     # 0x33fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x64d0
xorl %eax, %eax
jmp 0xbf9a
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetKeyByHashEntry[abi:cxx11](hlkvds::HashEntry*)
std::string DS_MultiTier_Impl::GetKeyByHashEntry(HashEntry *entry) {
    TierType tier_type = locateTierFromEntry(entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->GetKeyByHashEntry(entry);
    }
    return mt_->GetKeyByHashEntry(entry);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %rax
cmpw $0x64, 0x20(%rax)
jne 0xc016
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f40c
jmp 0xc022
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x203ce
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetValueByHashEntry[abi:cxx11](hlkvds::HashEntry*)
std::string DS_MultiTier_Impl::GetValueByHashEntry(HashEntry *entry) {
    //TODO: find location
    TierType tier_type = locateTierFromEntry(entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->GetValueByHashEntry(entry);
    }
    return mt_->GetValueByHashEntry(entry);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %rax
cmpw $0x64, 0x20(%rax)
jne 0xc044
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f4c6
jmp 0xc050
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x204a4
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum(unsigned int)
uint64_t DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum(uint32_t seg_num) {
    uint64_t sst_pure_length = sizeof(SegmentStat) * seg_num;
    uint64_t sst_length = sst_pure_length + sizeof(time_t);
    uint64_t sst_pages = sst_length / getpagesize();
    sst_length = (sst_pages + 1) * getpagesize();
    return sst_length;
}

// Assembly:
pushq %rbx
movl %edi, %eax
leaq (%rax,%rax,2), %rax
leaq 0x8(,%rax,4), %rbx
callq 0x66b0
movslq %eax, %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
incq %rax
imulq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CalcSegNumForFastTierVolume(unsigned long, unsigned long, unsigned int, unsigned int)
uint32_t DS_MultiTier_Impl::CalcSegNumForFastTierVolume(uint64_t capacity, uint64_t sst_offset, uint32_t fast_tier_seg_size, uint32_t med_tier_seg_num) {
    uint64_t valid_capacity = capacity - sst_offset;
    uint32_t seg_num_candidate = valid_capacity / fast_tier_seg_size;

    uint32_t seg_num_total = seg_num_candidate + med_tier_seg_num;
    uint64_t sst_length = DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum( seg_num_total );

    uint32_t seg_size_bit = log2(fast_tier_seg_size);

    while( sst_length + ((uint64_t) seg_num_candidate << seg_size_bit) > valid_capacity) {
         seg_num_candidate--;
         seg_num_total = seg_num_candidate + med_tier_seg_num;
         sst_length = DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum( seg_num_total );
    }
    return seg_num_candidate;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdi, %r14
subq %rsi, %r14
movl %edx, %r13d
movq %r14, %rax
xorl %edx, %edx
divq %r13
movq %rax, %r15
callq 0x66b0
movslq %eax, %r12
cvtsi2sd %r13, %xmm0
callq 0x6690
cvttsd2si %xmm0, %rax
movl %eax, %ecx
movl %r15d, %esi
leal (%rsi,%rbx), %eax
leaq (%rax,%rax,2), %rax
leaq 0x8(,%rax,4), %rax
xorl %edx, %edx
divq %r12
incq %rax
movl %r15d, %edx
shlq %cl, %rdx
imulq %r12, %rax
addq %rax, %rdx
leal -0x1(%rsi), %r15d
cmpq %r14, %rdx
ja 0xc0b6
movl %esi, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq