LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x647(%rip), %xmm0      # 0x30b0
movl $0x384, %esi            # imm = 0x384
movl $0x384, %edx            # imm = 0x384
movq %r14, %rdi
callq 0x2cd4
movq %rbx, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27d0
leaq -0x68(%rbp), %r15
leaq 0x63b(%rip), %r12       # 0x30d0
movq %r15, %rdi
callq 0x20d0
testl %eax, %eax
je 0x2a95
xorl %r13d, %r13d
movl -0x68(%rbp), %eax
cmpl $0x300, %eax            # imm = 0x300
je 0x2ab7
cmpl $0x100, %eax            # imm = 0x100
jne 0x2b15
jmp 0x2b25
movl -0x54(%rbp), %eax
leal -0x4000004f(%rax), %ecx
cmpl $0x3, %ecx
ja 0x2ad8
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x2df6
jmp 0x2b12
cmpl $0x78, %eax
je 0x2aec
cmpl $0x7a, %eax
jne 0x2b15
movq %r14, %rdi
callq 0x2d44
jmp 0x2b12
movq %r14, %rdi
callq 0x2d90
jmp 0x2b12
movq %r14, %rdi
callq 0x2e0e
jmp 0x2b12
movq %r14, %rdi
callq 0x2e02
jmp 0x2b12
movq %r14, %rdi
callq 0x2dea
movb $0x1, %r13b
movq %r15, %rdi
callq 0x20d0
testl %eax, %eax
jne 0x2aa4
xorl %ebx, %ebx
jmp 0x2b27
movb $0x1, %bl
testb $0x1, %r13b
je 0x2b39
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x27d0
testb %bl, %bl
je 0x2a95
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ea7
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 0x30e(%rip), %xmm0      # 0x3178
ja 0x2ea4
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movl $0x2, %edi
callq 0x2eb4
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 0x2e4b
jmp 0x2ea7
movl %r15d, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbcc(%rip), %rsi       # 0x41be
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 0x3775
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 0x2b24
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x2120
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0xb3f(%rip), %rsi       # 0x41cc
callq 0x2120
addq $0x20, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x38aa
movq %r12, %rdi
movq %rax, %rsi
callq 0x2090
movq %rax, %r12
movl $0x6, %edx
movq %rax, %rdi
leaq 0xb17(%rip), %rsi       # 0x41d5
callq 0x2120
movl $0x10, %edx
movq %r12, %rdi
leaq 0xb0a(%rip), %rsi       # 0x41dc
callq 0x2120
movq (%r15), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x38aa
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 0x373d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x3775
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 0x3749
movq %r13, %r15
cmpq %rbx, %r13
jne 0x364a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37a0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O3/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 0x383d
movq %rdi, %r14
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x20(%r15), %r12
movq %r15, %rbx
addq $0x20, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x38aa
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x39b0
addsd -0x30(%rbp), %xmm0
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x3841
movsd %xmm0, -0x30(%rbp)
movq %r13, %r15
leaq 0x20(%r12), %rsi
movq %rbx, %rdi
callq *(%r14)
testb %al, %al
cmovneq %r12, %r15
xorb $0x1, %al
movzbl %al, %eax
movq 0x10(%r12,%rax,8), %r12
testq %r12, %r12
jne 0x3811
cmpq %r13, %r15
movsd -0x30(%rbp), %xmm0
jne 0x37d1
jmp 0x3841
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x9a0(%rip), %rsi       # 0x41ed
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
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x828(%rip), %rsi       # 0x4208
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 0x2b24
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x2120
movq %rax, %r14
leaq 0x7e9(%rip), %rsi       # 0x420f
movl $0x9, %edx
movq %rax, %rdi
callq 0x2120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2090
movq %rax, %rbx
leaq 0x7d1(%rip), %rsi       # 0x4219
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 0x3aa1
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 0x3acb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4d9(%rip), %xmm1      # 0x4010
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x4dd(%rip), %xmm2      # 0x4020
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movsd 0x6a5(%rip), %xmm0      # 0x4200
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_O3/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 0x2d6c1(%rip), %rbp     # 0x33fd8
movq (%rbp), %r15
callq 0x63c0
movq %rax, %r14
leaq 0x1b8a6(%rip), %rsi     # 0x221d0
leaq 0x1b8bf(%rip), %rcx     # 0x221f0
leaq 0x1ba48(%rip), %r8      # 0x22380
pushq $0x54
popq %r9
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6560
movq (%rbp), %rdi
movl 0x120(%rbx), %edx
movl 0x124(%rbx), %ecx
leaq 0x1ba3b(%rip), %rsi     # 0x2239b
xorl %eax, %eax
callq 0x6560
movq (%rbp), %rsi
pushq $0xa
popq %rdi
callq 0x64c0
cmpl $0x0, 0x124(%rbx)
je 0x6a02
pushq $0xa
popq %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movq (%rbp), %rdi
leaq 0x1b83b(%rip), %rsi     # 0x221d0
movq %r14, %rdx
leaq 0x1b851(%rip), %rcx     # 0x221f0
leaq 0x1b9da(%rip), %r8      # 0x22380
pushq $0x59
popq %r9
xorl %eax, %eax
callq 0x6560
movq (%rbp), %rdi
movq 0x128(%rbx), %rax
leaq (%rax,%r15), %rcx
movl 0x100(%rax,%r15), %r8d
movl 0x104(%rax,%r15), %r9d
leaq 0x1ba2b(%rip), %rsi     # 0x22402
movl %r13d, %edx
xorl %eax, %eax
callq 0x6560
movq (%rbp), %rsi
movl %r12d, %edi
callq 0x64c0
incq %r13
movl 0x124(%rbx), %eax
addq $0x108, %r15            # imm = 0x108
cmpq %rax, %r13
jb 0x698a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2d5b4(%rip), %r12     # 0x33fd8
movq (%r12), %r14
callq 0x63c0
leaq 0x1b79c(%rip), %rsi     # 0x221d0
leaq 0x1b807(%rip), %rcx     # 0x22242
leaq 0x1b93e(%rip), %r8      # 0x22380
xorl %ebx, %ebx
pushq $0x61
popq %r9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6560
movq (%r12), %r14
movq %r15, %rdi
callq 0xcccc
movl %eax, %ebp
movq 0x158(%r15), %rdi
testq %rdi, %rdi
je 0x6a76
callq 0xe4c0
movl %eax, %ebx
leaq 0x1b9c4(%rip), %rsi     # 0x22441
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x6560
movq (%r12), %rsi
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x64c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cd35(%rip), %r13     # 0x33fd8
movq (%r13), %r14
callq 0x63c0
leaq 0x1af1d(%rip), %rsi     # 0x221d0
leaq 0x1af88(%rip), %rcx     # 0x22242
leaq 0x1b784(%rip), %r8      # 0x22a45
xorl %ebx, %ebx
movq %r14, %rdi
movq %rax, %rdx
movl $0x86, %r9d
xorl %eax, %eax
callq 0x6560
movq (%r13), %r15
movl 0x18(%r12), %ebp
movq 0x20(%r12), %r14
movq 0x98(%r12), %rdi
testq %rdi, %rdi
je 0x72f8
callq 0xe4c0
movl %eax, %ebx
leaq 0x1b75a(%rip), %rsi     # 0x22a59
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x6560
movq (%r13), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x64c0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2b52b(%rip), %r13     # 0x33fd8
movq (%r13), %r15
callq 0x63c0
movq %rax, %r14
leaq 0x19710(%rip), %rsi     # 0x221d0
leaq 0x19729(%rip), %rcx     # 0x221f0
leaq 0x1b8ea(%rip), %r8      # 0x243b8
movq %r15, %rdi
movq %rax, %rdx
movl $0x25e, %r9d            # imm = 0x25E
xorl %eax, %eax
callq 0x6560
movq (%r13), %rdi
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x1b9dd(%rip), %rsi     # 0x244cf
xorl %eax, %eax
callq 0x6560
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x64c0
cmpl $0x0, 0x40(%rbx)
je 0x8b88
pushq $0xa
popq %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r13), %rdi
leaq 0x196b1(%rip), %rsi     # 0x221d0
movq %r14, %rdx
leaq 0x196c7(%rip), %rcx     # 0x221f0
leaq 0x1b888(%rip), %r8      # 0x243b8
movl $0x264, %r9d            # imm = 0x264
xorl %eax, %eax
callq 0x6560
movq (%r13), %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%rbp), %rcx
movl 0x100(%rax,%rbp), %r8d
movl 0x104(%rax,%rbp), %r9d
leaq 0x1b9d4(%rip), %rsi     # 0x24534
movl %r12d, %edx
xorl %eax, %eax
callq 0x6560
movq (%r13), %rsi
movl %r15d, %edi
callq 0x64c0
incq %r12
movl 0x40(%rbx), %eax
addq $0x108, %rbp            # imm = 0x108
cmpq %rax, %r12
jb 0x8b14
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x173dc
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 0x13708
testq %rax, %rax
je 0x9a7b
movq (%rax), %rcx
movq %rax, %rdi
callq *0x8(%rcx)
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa7cc
leaq 0x88(%rsp), %rdi
callq 0x9a2c
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xa668
callq 0x63f0
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xa7cc
leaq 0x68(%rsp), %rdi
callq 0x9a86
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xa6a1
callq 0x63f0
movq 0x29928(%rip), %rbx     # 0x33fd0
leaq 0x17acf(%rip), %rsi     # 0x2217e
movl $0x15, %edx
movq %rbx, %rdi
callq 0x6450
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x6400
movsbl %al, %esi
movq 0x298f6(%rip), %rdi     # 0x33fd0
callq 0x6050
movq %rax, %rdi
callq 0x62c0
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xa7cc
leaq 0x48(%rsp), %rdi
callq 0x9a2c
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0xa720
callq 0x63f0
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa7cc
leaq 0x28(%rsp), %rdi
callq 0x9a86
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0xa759
callq 0x63f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa76c
callq 0x63f0
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0xa7a2
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0xa7a2
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0xa7a2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xa7b1
callq 0x63f0
jmp 0xa7b1
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7c4
callq 0x63f0
movq %rbx, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbc50
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 0xbc30
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 0xbc97
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xa90a
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 0xa90a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbeb2
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1eeda
jmp 0xbebe
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f9ec
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbf49
movq %rsi, %rbx
movq %rdi, %r14
movl $0xfc3, %edx            # imm = 0xFC3
movq %rsi, %rdi
xorl %esi, %esi
callq 0x6250
movq 0x28(%r14), %rax
movq %rax, (%rbx)
addq $0x8, %rbx
movq 0x30(%r14), %rdi
movl 0x28(%r14), %edx
movq %rbx, %rsi
callq 0x1efb8
testb %al, %al
je 0xbf49
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 0x1fafa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbfa2
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 0x1f006
testb %al, %al
je 0xbfa2
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 0x1fbe4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc020
movq 0x40(%r14), %rdi
callq 0x209a4
movq 0x40(%r14), %rdi
callq 0x20998
movq %rax, (%rbx)
addq $0x8, %rbx
movq 0x30(%r14), %rdi
callq 0x1f394
movq %rax, %r15
movq 0x30(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1f02e
testb %al, %al
je 0xc020
addq %r15, %rbx
movq 0x38(%r14), %rdi
callq 0x2030a
movq 0x38(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1fcac
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc093
movq (%rbx), %rsi
movq 0x40(%r14), %rdi
callq 0x2098c
addq $0x8, %rbx
movq 0x30(%r14), %rdi
callq 0x1f394
movq %rax, %r15
movq 0x30(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1f03a
testb %al, %al
je 0xc093
addq %r15, %rbx
movq 0x38(%r14), %rdi
callq 0x2030a
movq 0x38(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1fd2a
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1fda8
testb %al, %al
je 0xc0f2
movq 0x38(%rbx), %rax
movl 0x3c(%rax), %ecx
movq 0x10(%rbx), %rsi
movq 0x30(%rbx), %rdi
movq %r14, %rdx
callq 0x1f046
testb %al, %al
je 0xc0f2
movl $0x10c, 0x28(%rbx)      # imm = 0x10C
movq 0x38(%rbx), %rax
movl 0x40(%rax), %eax
movl %eax, %ecx
shll $0x8, %ecx
leal (%rcx,%rax,8), %eax
addl $0x8, %eax
movl %eax, 0x2c(%rbx)
movb $0x1, %al
jmp 0xc0f4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1f1d0
testb %al, %al
je 0xc128
movq 0x10(%rbx), %rsi
movq 0x38(%rbx), %rdi
callq 0x20000
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0xc12f
popq %rbx
retq
callq 0x6854
jmp 0xc134
callq 0x68ab
movq 0x27e9d(%rip), %rax     # 0x33fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x64c0
xorl %eax, %eax
jmp 0xc126
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc1a2
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f410
jmp 0xc1ae
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x2039a
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc1d0
movq 0x30(%rsi), %rsi
movq %rbx, %rdi
callq 0x1f4ca
jmp 0xc1dc
movq 0x38(%rsi), %rsi
movq %rbx, %rdi
callq 0x20470
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x66a0
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_O3/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 0x66a0
movslq %eax, %r12
cvtsi2sd %r13, %xmm0
callq 0x6680
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 0xc242
movl %esi, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::deleteAllSegments()
void DS_MultiVolume_Impl::deleteAllSegments() {
    std::unique_lock<std::mutex> lck_seg_map(segMapMtx_);
    for (int i = 0; i< shardsNum_; i++) {
        SegForReq* seg = segMap_[i];
        delete seg;
        std::mutex *seg_mtx = segMtxVec_[i];
        delete seg_mtx;
    }
    segMap_.clear();
    segMtxVec_.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0xe58e
movb $0x1, 0x8(%r14)
movl $0x0, 0x4(%rsp)
cmpl $0x0, 0x58(%rbx)
jle 0xc553
leaq 0x88(%rbx), %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe528
movq (%rax), %r12
testq %r12, %r12
je 0xc527
movq %r12, %rdi
callq 0x1c3e8
movq %r12, %rdi
callq 0x63f0
movslq 0x4(%rsp), %rax
movq 0xb8(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x63f0
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
cmpl 0x58(%rbx), %eax
jl 0xc50c
leaq 0x88(%rbx), %rdi
callq 0xfdfe
movq 0xb8(%rbx), %rax
cmpq %rax, 0xc0(%rbx)
je 0xc576
movq %rax, 0xc0(%rbx)
leaq 0x8(%rsp), %rdi
callq 0xe10e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe10e
movq %rbx, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::InitSegmentBuffer()
void DS_MultiVolume_Impl::InitSegmentBuffer() {
    std::unique_lock<std::mutex> lck_seg_map(segMapMtx_);
    for (int i = 0; i < shardsNum_; i++) {
        int vol_id = pickVol();
        SegForReq * seg = new SegForReq(volMap_[vol_id], idxMgr_, options_.expired_time);
        segMap_.insert(make_pair(i, seg));

        std::mutex *seg_mtx = new mutex();
        segMtxVec_.push_back(seg_mtx);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %rax
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0xe58e
movb $0x1, 0x8(%r14)
cmpl $0x0, 0x58(%rbx)
jle 0xc715
leaq 0x28(%rbx), %r14
leaq 0x88(%rbx), %r15
leaq 0xb8(%rbx), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
leaq 0x18(%rsp), %rbp
movq %rbx, %rdi
callq 0xc756
movl %eax, 0xc(%rsp)
movl $0xd8, %edi
callq 0x6410
movq %rax, %r12
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0xe0a8
movq (%rax), %rsi
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rdx
movl 0x10(%rax), %ecx
movq %r12, %rdi
callq 0x1c58e
movl %r13d, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xed58
movl $0x28, %edi
callq 0x6410
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x18(%rsp)
movq 0xc0(%rbx), %rsi
cmpq 0xc8(%rbx), %rsi
je 0xc6fb
movq %rax, (%rsi)
addq $0x8, 0xc0(%rbx)
jmp 0xc708
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0xee94
incl %r13d
cmpl 0x58(%rbx), %r13d
jl 0xc66c
leaq 0x28(%rsp), %rdi
callq 0xe10e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc734
jmp 0xc734
jmp 0xc734
movq %rax, %rbx
jmp 0xc744
movq %rax, %rbx
movq %r12, %rdi
callq 0x63f0
leaq 0x28(%rsp), %rdi
callq 0xe10e
movq %rbx, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::pickVol()
int DS_MultiVolume_Impl::pickVol() {
    std::lock_guard <std::mutex> l(volIdMtx_);
    if ( pickVolId_ == (int)(volNum_ - 1) ){
        pickVolId_ = 0;
    }
    else {
        pickVolId_++;
    }
    return pickVolId_;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xf8(%rdi), %rbx
movq %rbx, %rdi
callq 0x6580
testl %eax, %eax
jne 0xc7a0
movl 0xe0(%r14), %eax
movl 0xf0(%r14), %ecx
decl %eax
leal 0x1(%rcx), %edx
xorl %ebp, %ebp
cmpl %eax, %ecx
cmovnel %edx, %ebp
movl %ebp, 0xf0(%r14)
movq %rbx, %rdi
callq 0x6350
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x62b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::StopThds()
void DS_MultiVolume_Impl::StopThds() {
    for (uint32_t i = 0; i < volNum_; i++) {
        volMap_[i]->StopThds();
    }

    segTimeoutT_stop_.store(true);
    segTimeoutT_.join();

    for (int i = 0; i < shardsNum_; i++) {
        ReqsMergeWQ *req_wq = reqWQVec_[i];
        req_wq->Stop();
        delete req_wq;
    }
    reqWQVec_.clear();

    if (segWteWQ_) {
        segWteWQ_->Stop();
        delete segWteWQ_;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xe0(%rdi)
je 0xcc41
leaq 0x28(%rbx), %r14
xorl %ebp, %ebp
leaq 0x4(%rsp), %r15
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe2e4
movq (%rax), %rdi
callq 0x20c84
incl %ebp
cmpl 0xe0(%rbx), %ebp
jb 0xcc20
movb $0x1, %al
xchgb %al, 0x168(%rbx)
leaq 0x160(%rbx), %rdi
callq 0x6650
cmpl $0x0, 0x58(%rbx)
jle 0xcc86
xorl %r15d, %r15d
movq 0x140(%rbx), %rax
movq (%rax,%r15,8), %r14
movq %r14, %rdi
callq 0xe34a
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
incq %r15
movslq 0x58(%rbx), %rax
cmpq %rax, %r15
jl 0xcc5e
movq 0x140(%rbx), %rax
cmpq %rax, 0x148(%rbx)
je 0xcc9d
movq %rax, 0x148(%rbx)
movq 0x158(%rbx), %rdi
testq %rdi, %rdi
je 0xccc0
callq 0xe38e
movq 0x158(%rbx), %rdi
testq %rdi, %rdi
je 0xccc0
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::WriteData(hlkvds::KVSlice&, bool)
Status DS_MultiVolume_Impl::WriteData(KVSlice& slice, bool immediately) {
    if (slice.GetDataLen() > maxValueLen_) {
        return Status::NotSupported("Data length cann't be longer than max segment size");
    }

    if (options_.aggregate_request == 1 && !immediately) {
        return writeDataAggregate(slice);
    }
    else {
        return writeDataImmediately(slice);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x18(%rdx), %eax
cmpl %eax, 0xdc(%rsi)
jae 0xcd50
leaq 0x15773(%rip), %rdx     # 0x224b4
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1de28
jmp 0xcd6c
movq 0x8(%rsi), %rax
movb 0x38(%rax), %al
xorb $0x1, %al
movq %rbx, %rdi
orb %cl, %al
je 0xcd67
callq 0xce0e
jmp 0xcd6c
callq 0xcd72
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::writeDataAggregate(hlkvds::KVSlice&)
Status DS_MultiVolume_Impl::writeDataAggregate(KVSlice& slice) {

    Request *req = new Request(slice);

    int shards_id = calcShardId(slice);
    req->SetShardsWQId(shards_id);
    ReqsMergeWQ *req_wq = reqWQVec_[shards_id];
    req_wq->Add_task(req);

    req->Wait();
    Status s = updateMeta(req);
    delete req;
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x78, %edi
callq 0x6410
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x1bc0a
movq 0x20(%r12), %rdi
callq 0x12e82
xorl %edx, %edx
divl 0x58(%r15)
movl %edx, 0x70(%r14)
movslq %edx, %rax
movq 0x140(%r15), %rcx
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0xe3d2
movq %r14, %rdi
callq 0x1bc7c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xdd70
movq %r14, %rdi
callq 0x1bb9a
movq %r14, %rdi
callq 0x63f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x63f0
movq %rbx, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::writeDataImmediately(hlkvds::KVSlice&)
Status DS_MultiVolume_Impl::writeDataImmediately(KVSlice& slice) {
    uint32_t seg_id = 0;
    bool ret = false;

    int vol_id = pickVol();
    Volume *vol = volMap_[vol_id];

    //TODO: use GcSegment first, need abstract segment.
    while (!vol->Alloc(seg_id)) {
        ret = vol->ForeGC();
        if (!ret) {
            __ERROR("Cann't get a new Empty Segment.\n");
            return Status::Aborted("Can't allocate a Empty Segment.");
        }
    }

    SegLatencyFriendly *seg = new SegLatencyFriendly(vol, idxMgr_);
    seg->Put(&slice);
    seg->SegSegId(seg_id);
    ret = seg->WriteSegToDevice();
    if(!ret) {
        __ERROR("Write batch segment to device failed");
        vol->FreeForFailed(seg_id);
        delete seg;
        return Status::IOError("could not write batch segment to device ");
    }
    uint32_t free_size = seg->GetFreeSize();
    vol->Use(seg_id, free_size);
    seg->UpdateToIndex();
    delete seg;
    return Status::OK();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movl $0x0, (%r12)
movq %rsi, %rdi
callq 0xc756
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x28(%r13), %rdi
callq 0xe0a8
movq (%rax), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x20c92
testb %al, %al
jne 0xce71
movq %r14, %rdi
callq 0x20d8a
testb %al, %al
jne 0xce4c
movq %rbx, %rdi
callq 0x6b41
jmp 0xceec
movl $0x48, %edi
callq 0x6410
movq %rax, %r12
movq 0x20(%r13), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1cb9a
movq %r12, %rdi
movq %r15, %rsi
callq 0x1cbec
movl 0x8(%rsp), %eax
movl %eax, 0x10(%r12)
movq %r12, %rdi
callq 0x1ccae
testb %al, %al
je 0xcefd
movl 0x14(%r12), %edx
subl 0x20(%r12), %edx
addl $-0x20, %edx
movl 0x8(%rsp), %esi
movq %r14, %rdi
callq 0x20d80
movq %r12, %rdi
callq 0x1cf92
movq %r12, %rdi
callq 0x1cb16
movq %r12, %rdi
callq 0x63f0
movl $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x6bb8
jmp 0xceec
movq %rax, %rbx
movq %r12, %rdi
callq 0x63f0
movq %rbx, %rdi
callq 0x6670
nop