LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::deleteName(char const*)
void Products::deleteName(const char* name)
{
		vector<Product*>::iterator it;
		changeFlag=1;
		char buf[50];
		char t;
		for(it=begin();it!=end();it++)
		{
				if(strcmp((*it)->getName(),name)==0)
				{
						getchar();
						cout << "\t\t\t\t\tthe product data is:" ;
						(*it)->show() ;
						cout << "\t\t\t\t\tdo you want to delete it?(y/n)" ;
						t=getchar();
						if(t=='y')
						{
						  sprintf(buf,"rm %d.png",(*it)->getId());
						  system(buf);
						  (*it)->deleteId();
					//	 delete(*it);
						   erase(it);
						 cout << "\t\t\t\t\tdelete success!" << endl;
						 return ;
						}
						if(t='n')
						{
								continue;
						}
				}
		}
		cout << "\t\t\t\t\tdelete error!" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x9d10
movq -0x88(%rbp), %rdi
leaq 0xc763(%rip), %rax      # 0x151e8
movl $0x1, (%rax)
callq 0x9d30
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x88(%rbp), %rdi
callq 0x9da0
movq %rax, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x8ac2
jmp 0x8bf1
leaq -0x18(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x85d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x22b0
cmpl $0x0, %eax
jne 0x8bdb
callq 0x22a0
movq 0xc4dc(%rip), %rdi      # 0x14fd0
leaq 0x5afd(%rip), %rsi      # 0xe5f8
callq 0x21e0
leaq -0x18(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x8410
movq 0xc4b8(%rip), %rdi      # 0x14fd0
leaq 0x5737(%rip), %rsi      # 0xe256
callq 0x21e0
callq 0x22a0
movb %al, -0x51(%rbp)
movsbl -0x51(%rbp), %eax
cmpl $0x79, %eax
jne 0x8bcb
leaq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x8510
movq -0x90(%rbp), %rdi
movl %eax, %edx
leaq 0x5a89(%rip), %rsi      # 0xe5ee
movb $0x0, %al
callq 0x2040
leaq -0x50(%rbp), %rdi
callq 0x2190
leaq -0x18(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x8620
leaq -0x70(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x9e60
movq -0x88(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x9df0
movq %rax, -0x78(%rbp)
movq 0xc422(%rip), %rdi      # 0x14fd0
leaq 0x56c5(%rip), %rsi      # 0xe27a
callq 0x21e0
movq %rax, %rdi
movq 0xc3fc(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0x8c13
movb $0x6e, -0x51(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x8bd7
jmp 0x8bd9
jmp 0x8bdd
jmp 0x8bdb
jmp 0x8bdd
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x80(%rbp)
jmp 0x8a9c
movq 0xc3d8(%rip), %rdi      # 0x14fd0
leaq 0x54f1(%rip), %rsi      # 0xe0f0
callq 0x21e0
movq %rax, %rdi
movq 0xc3b2(%rip), %rsi      # 0x14fc0
callq 0x2210
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::searchId(int const&)
Product* Products::searchId(const int &id)
{
		vector<Product*>::iterator it;
		for(it=begin();it!=end();it++)
		{
				if((*it)->getId()==id)
				{
						return (*it);
				}
		}
		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9d10
movq -0x40(%rbp), %rdi
callq 0x9d30
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9da0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x8ed6
jmp 0x8f14
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x8510
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x8f01
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8f1c
jmp 0x8f03
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x38(%rbp)
jmp 0x8eb6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::searchName(char const*)
Product* Products::searchName(const char* name)
{
		vector<Product*>::iterator it;
		for(it=begin();it!=end();it++)
		{
				if(strcmp((*it)->getName(),name)==0)
				{
						return (*it);
				}
		}
		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9d10
movq -0x40(%rbp), %rdi
callq 0x9d30
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9da0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x8f86
jmp 0x8fcd
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x85d0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x22b0
cmpl $0x0, %eax
jne 0x8fba
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8fd5
jmp 0x8fbc
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x38(%rbp)
jmp 0x8f66
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::searchType(char const*)
Products Products::searchType(const char* Type)
{
		vector<Product*>::iterator it;
		Products pts;
		for(it=begin();it!=end();it++)
		{
				if(strcmp((*it)->getType(),Type)==0)
				{
					pts.push_back(*it);	
				}
		}
		return pts;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9d10
movq -0x60(%rbp), %rdi
movb $0x0, -0x21(%rbp)
callq 0x8710
movq -0x58(%rbp), %rdi
callq 0x9d30
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x58(%rbp), %rdi
callq 0x9da0
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x9052
jmp 0x90ba
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x85e0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x22b0
cmpl $0x0, %eax
jne 0x90a4
leaq -0x20(%rbp), %rdi
callq 0x9dd0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x9ca0
jmp 0x908b
jmp 0x90a4
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x9ee0
jmp 0x90d7
jmp 0x90a6
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x50(%rbp)
jmp 0x9032
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x90cd
movq -0x60(%rbp), %rdi
callq 0x9ee0
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2350
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::commonSearch()
void  Products::commonSearch()
{
		int id;
		Products s;
		Product *p;
		cout << "\t\t\t\t\tplease input the number:" ;
		cin >> id;
		p=searchId(id);
		if(p!=NULL)
		{	
				p->show();
	   }
		else
		{
				cout << "\t\t\t\t\tit is not in the warehouse!" << endl;
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8710
movq 0xbecc(%rip), %rdi      # 0x14fd0
leaq 0x51cd(%rip), %rsi      # 0xe2d8
callq 0x21e0
jmp 0x9112
movq 0xbec7(%rip), %rdi      # 0x14fe0
leaq -0xc(%rbp), %rsi
callq 0x20f0
jmp 0x9124
movq -0x48(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x8e80
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x9160
movq -0x30(%rbp), %rdi
callq 0x8410
jmp 0x9147
jmp 0x918d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9ee0
jmp 0x919c
movq 0xbe69(%rip), %rdi      # 0x14fd0
leaq 0x5511(%rip), %rsi      # 0xe67f
callq 0x21e0
movq %rax, -0x50(%rbp)
jmp 0x9179
movq -0x50(%rbp), %rdi
movq 0xbe3c(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0x918b
jmp 0x918d
leaq -0x28(%rbp), %rdi
callq 0x9ee0
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::showAll()
void Products::showAll()
{
		vector<Product*>::iterator it;
		if(this->size()==0)
		{
				cout << "\t\t\t\t\tno product!" << endl;
				return ;
		}
		else
				for(it=begin();it!=end();it++)
						(*it)->show();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x9d10
movq -0x30(%rbp), %rdi
callq 0x9f30
cmpq $0x0, %rax
jne 0x97b0
movq 0xb83d(%rip), %rdi      # 0x14fd0
leaq 0x4f89(%rip), %rsi      # 0xe723
callq 0x21e0
movq %rax, %rdi
movq 0xb817(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0x9809
movq -0x30(%rbp), %rdi
callq 0x9d30
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9da0
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x97e5
jmp 0x9807
leaq -0x10(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rdi
callq 0x8410
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x28(%rbp)
jmp 0x97c5
jmp 0x9809
addq $0x30, %rsp
popq %rbp
retq
nop
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::readProduct()
void Products::readProduct()
{
		ifstream in("product",ios::binary);
		if(!in)
		{
				cout << "\t\t\t\t\topen failed" << endl ;
				return ;
		}
		else
		{
		    delAll();
			Product *p;
			vector<Product*>::iterator it;
			it=begin();
			while(1)
			{
					p=new Product;
					in.read((char*)(p),sizeof(Product));
					if(!in.eof())
					{
							this->push_back(p);
							p->number.push_back(p->getId());
					}
					else
					{
							delete(p);
							break;
					}
			}
			(*it)->productMax=this->size();
		}
		in.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x4ee3(%rip), %rsi      # 0xe734
leaq -0x210(%rbp), %rdi
movl $0x4, %edx
callq 0x2360
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x20d0
movb %al, -0x23d(%rbp)
jmp 0x9882
movb -0x23d(%rbp), %al
testb $0x1, %al
jne 0x988e
jmp 0x98e5
movq 0xb73b(%rip), %rdi      # 0x14fd0
leaq 0x4ea0(%rip), %rsi      # 0xe73c
callq 0x21e0
movq %rax, -0x250(%rbp)
jmp 0x98aa
movq -0x250(%rbp), %rdi
movq 0xb708(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0x98bf
movl $0x1, -0x220(%rbp)
jmp 0x9a75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x9a8a
movq -0x248(%rbp), %rdi
callq 0x9810
leaq -0x230(%rbp), %rdi
callq 0x9d10
movq -0x248(%rbp), %rdi
callq 0x9d30
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x9920
movl $0x7c, %edi
callq 0x21f0
movq %rax, -0x258(%rbp)
jmp 0x9933
movq -0x258(%rbp), %rdi
callq 0x8000
jmp 0x9941
movq -0x258(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movl $0x7c, %edx
callq 0x2260
jmp 0x9969
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x2370
movb %al, -0x259(%rbp)
jmp 0x9989
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x99fb
jmp 0x9995
movq -0x248(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x9ca0
jmp 0x99aa
movq -0x228(%rbp), %rdi
callq 0x8510
movl %eax, -0x23c(%rbp)
leaq 0xb84d(%rip), %rdi      # 0x15210
leaq -0x23c(%rbp), %rsi
callq 0x57e0
jmp 0x99d1
jmp 0x9a2e
movq -0x258(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
movl $0x7c, %esi
callq 0x2200
jmp 0x9a8a
movq -0x228(%rbp), %rax
movq %rax, -0x268(%rbp)
cmpq $0x0, %rax
je 0x9a2c
movq -0x268(%rbp), %rdi
callq 0x80a0
movq -0x268(%rbp), %rdi
movl $0x7c, %esi
callq 0x2200
jmp 0x9a33
jmp 0x991e
movq -0x248(%rbp), %rdi
callq 0x9f30
movl %eax, -0x26c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x9dd0
movl -0x26c(%rbp), %eax
movl %eax, 0xb7af(%rip)      # 0x1520c
leaq -0x210(%rbp), %rdi
callq 0x2060
jmp 0x9a6b
movl $0x0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x2070
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
leaq -0x210(%rbp), %rdi
callq 0x2070
movq -0x218(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/product.cpp
// Function: Products::writeProduct()
void Products::writeProduct()
{
		ofstream out("product",ios::binary);
		if(!out)
		{
				cout << "\t\t\t\t\topen failed" << endl;
				return ;
		}
		else
		{
				vector<Product*>::iterator it;
				for(it=begin();it!=end();it++)
				{
						out.write((char*)(*it),sizeof(Product));
				}
		}
		out.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x4c63(%rip), %rsi      # 0xe734
leaq -0x208(%rbp), %rdi
movl $0x4, %edx
callq 0x2220
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x208(%rbp,%rax), %rdi
callq 0x20d0
movb %al, -0x239(%rbp)
jmp 0x9b02
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0x9b0e
jmp 0x9b71
movq 0xb4bb(%rip), %rdi      # 0x14fd0
leaq 0x4c20(%rip), %rsi      # 0xe73c
callq 0x21e0
movq %rax, -0x250(%rbp)
jmp 0x9b2a
movq -0x250(%rbp), %rdi
movq 0xb488(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0x9b3f
movl $0x1, -0x218(%rbp)
jmp 0x9c1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x22d0
jmp 0x9c34
leaq -0x220(%rbp), %rdi
callq 0x9d10
movq -0x248(%rbp), %rdi
callq 0x9d30
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x248(%rbp), %rdi
callq 0x9da0
movq %rax, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x9d60
testb $0x1, %al
jne 0x9bca
jmp 0x9c05
leaq -0x220(%rbp), %rdi
callq 0x9dd0
movq (%rax), %rsi
leaq -0x208(%rbp), %rdi
movl $0x7c, %edx
callq 0x2280
jmp 0x9bec
jmp 0x9bee
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
callq 0x9ea0
movq %rax, -0x238(%rbp)
jmp 0x9b9e
jmp 0x9c07
leaq -0x208(%rbp), %rdi
callq 0x22c0
jmp 0x9c15
movl $0x0, -0x218(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x22d0
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x210(%rbp), %rdi
callq 0x2350
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: askForSave()
int askForSave()
{
		char t;
		if(changeFlag==1)
		{
				while(1)
				{
					getchar();
					cout << "\t\t\t\t\tdo you want to save?(y/n)" ;
					t=getchar();
					if(t=='n')
					{
							return 0;
					}
					else if(t=='y')
					{
							return 1;
					}
					else 
					{
							cout << "\t\t\t\t\tinput error!" << endl;
					}
				}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa219(%rip), %rax      # 0x151e8
cmpl $0x1, (%rax)
jne 0xb040
jmp 0xafd6
callq 0x22a0
movq 0x9fee(%rip), %rdi      # 0x14fd0
leaq 0x3818(%rip), %rsi      # 0xe801
callq 0x21e0
callq 0x22a0
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x6e, %eax
jne 0xb008
movl $0x0, -0x4(%rbp)
jmp 0xb042
movsbl -0x5(%rbp), %eax
cmpl $0x79, %eax
jne 0xb01a
movl $0x1, -0x4(%rbp)
jmp 0xb042
movq 0x9faf(%rip), %rdi      # 0x14fd0
leaq 0x3181(%rip), %rsi      # 0xe1a9
callq 0x21e0
movq %rax, %rdi
movq 0x9f89(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0xb03e
jmp 0xafd6
ud2
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: Menu::writeStop()
void Menu::writeStop()
{
		ofstream st;
		st.open("stop",ios::out);
		if(st.is_open())
		{
				st << stop;
		}
		else
				cout << "open failed!" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x208(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x2320
movq -0x220(%rbp), %rdi
leaq 0x3197(%rip), %rsi      # 0xe232
movl $0x10, %edx
callq 0x2030
jmp 0xb0a7
leaq -0x208(%rbp), %rdi
callq 0x2150
movb %al, -0x229(%rbp)
jmp 0xb0bb
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0xb0c7
jmp 0xb101
movq -0x228(%rbp), %rax
movl 0x8(%rax), %esi
leaq -0x208(%rbp), %rdi
callq 0x2340
jmp 0xb0df
jmp 0xb134
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x22d0
jmp 0xb149
movq 0x9ec8(%rip), %rdi      # 0x14fd0
leaq 0x31f6(%rip), %rsi      # 0xe305
callq 0x21e0
movq %rax, -0x238(%rbp)
jmp 0xb11d
movq -0x238(%rbp), %rdi
movq 0x9e95(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0xb132
jmp 0xb134
leaq -0x208(%rbp), %rdi
callq 0x22d0
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x210(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: Menu::showTime()
void Menu::showTime()
{
		char showtime[50];
		time_t t;
		struct tm *timeinfo;
		time(&t);
		timeinfo=localtime(&t);
		strftime(showtime,50,"%Y年%m月%d日-%H:%M:%S",timeinfo);
		cout << "\t\t\t\t\t   " << showtime << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x21b0
leaq -0x48(%rbp), %rdi
callq 0x2120
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rcx
movl $0x32, %esi
leaq 0x27a9(%rip), %rdx      # 0xe11f
callq 0x2170
movq 0x964e(%rip), %rdi      # 0x14fd0
leaq 0x312a(%rip), %rsi      # 0xeab3
callq 0x21e0
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x21e0
movq %rax, %rdi
movq 0x961c(%rip), %rsi      # 0x14fc0
callq 0x2210
addq $0x50, %rsp
popq %rbp
retq
nop
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: MenuAdmin::menuShow()
void MenuAdmin::menuShow()
{
		int flag;
		system("clear");
		showTime();
		admin->writePeopleInfo();
		while(1)
		{system("clear");
		cout << "\t\t\t\t\t  ↖↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↗\n"           
			 <<	"\t\t\t\t\t  ←       1:add        →\n" 
			 << "\t\t\t\t\t  ←       2:delete     →\n" 
			 << "\t\t\t\t\t  ←       3:search     →\n"
			 << "\t\t\t\t\t  ←       4:show       →\n"
			 << "\t\t\t\t\t  ←       5:save       →\n" 
			 << "\t\t\t\t\t  ←       6:exit       →\n"
			 << "\t\t\t\t\t  ↙↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↘\n"
			 << "\t\t\t\t\tplease input your choice(1-6):" ;
		cin >> flag;
		switch(flag)
		{
				case 1:admin->addPerson();
					   sleep(1);
					   break;
				case 2:admin->deletePerson();
					   sleep(1);
					   break;
				case 3://admin->searchPerson();
					   search();
					   break;
				case 4:show();
					   break;
				case 5:admin->writePeopleInfo();
					   changeFlag=0;
					   break;
				case 6:if(askForSave())
							   admin->writePeopleInfo();
					   changeFlag=0;
					   return;
		}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x25e5(%rip), %rdi      # 0xe820
callq 0x2190
movq -0x18(%rbp), %rdi
callq 0xb940
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4250
leaq 0x25c3(%rip), %rdi      # 0xe820
callq 0x2190
movq 0x8d67(%rip), %rdi      # 0x14fd0
leaq 0x284c(%rip), %rsi      # 0xeabc
callq 0x21e0
movq %rax, %rdi
leaq 0x2888(%rip), %rsi      # 0xeb07
callq 0x21e0
movq %rax, %rdi
leaq 0x289c(%rip), %rsi      # 0xeb2a
callq 0x21e0
movq %rax, %rdi
leaq 0x28b0(%rip), %rsi      # 0xeb4d
callq 0x21e0
movq %rax, %rdi
leaq 0x28c4(%rip), %rsi      # 0xeb70
callq 0x21e0
movq %rax, %rdi
leaq 0x28d8(%rip), %rsi      # 0xeb93
callq 0x21e0
movq %rax, %rdi
leaq 0x28ec(%rip), %rsi      # 0xebb6
callq 0x21e0
movq %rax, %rdi
leaq 0x2900(%rip), %rsi      # 0xebd9
callq 0x21e0
movq %rax, %rdi
leaq 0x293c(%rip), %rsi      # 0xec24
callq 0x21e0
movq 0x8cec(%rip), %rdi      # 0x14fe0
leaq -0xc(%rbp), %rsi
callq 0x20f0
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x5, %eax
ja 0xc3b3
movq -0x20(%rbp), %rax
leaq 0x2448(%rip), %rcx      # 0xe764
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4f10
movl $0x1, %edi
callq 0x2140
jmp 0xc3b3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4f40
movl $0x1, %edi
callq 0x2140
jmp 0xc3b3
movq -0x18(%rbp), %rdi
callq 0xd320
jmp 0xc3b3
movq -0x18(%rbp), %rdi
callq 0xd3f0
jmp 0xc3b3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4250
leaq 0x8e67(%rip), %rax      # 0x151e8
movl $0x0, (%rax)
jmp 0xc3b3
callq 0xafc0
cmpl $0x0, %eax
je 0xc3a0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4250
leaq 0x8e41(%rip), %rax      # 0x151e8
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
jmp 0xc256
nopl (%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: MenuAdmin::search()
void MenuAdmin::search()
{
		int flag;
		while(1)
		{
				system("clear");
				cout << "\t\t\t\t\t1:search people\n"
					 << "\t\t\t\t\t2:search product\n"
					 << "\t\t\t\t\t3:exit\n"
					 << "\t\t\t\t\tplease input your choice(1-3):";
				cin >> flag;
				switch(flag)
				{
						case 1:admin->searchPerson();
							   system_pause();
							   break;
						case 2:admin->searchProduct();
							   system_pause();
							   break;
						case 3:return ;
					    deafault:cout << "\t\t\t\t\tinput error!" << endl;
							     break;
				}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x14e5(%rip), %rdi      # 0xe820
callq 0x2190
movq 0x7c89(%rip), %rdi      # 0x14fd0
leaq 0x18fa(%rip), %rsi      # 0xec48
callq 0x21e0
movq %rax, %rdi
leaq 0x1901(%rip), %rsi      # 0xec5e
callq 0x21e0
movq %rax, %rdi
leaq 0x1909(%rip), %rsi      # 0xec75
callq 0x21e0
movq %rax, %rdi
leaq 0x1907(%rip), %rsi      # 0xec82
callq 0x21e0
movq 0x7c59(%rip), %rdi      # 0x14fe0
leaq -0xc(%rbp), %rsi
callq 0x20f0
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0x1, %eax
je 0xd3b1
jmp 0xd39d
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0xd3c9
jmp 0xd3a7
movl -0x1c(%rbp), %eax
subl $0x3, %eax
je 0xd3e1
jmp 0xd3e7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4f70
movq -0x18(%rbp), %rdi
callq 0xd530
jmp 0xd3e7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5140
movq -0x18(%rbp), %rdi
callq 0xd530
jmp 0xd3e7
addq $0x20, %rsp
popq %rbp
retq
jmp 0xd334
nopl (%rax)
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: MenuAdmin::show()
void MenuAdmin::show()
{
		int flag;
		while(1)
		{
				system("clear");
		cout << "\t\t\t\t\t◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n"
			 <<	"\t\t\t\t\t◇1:show the people   ◇\n"  
			 << "\t\t\t\t\t◇2:show the product  ◇\n" 
			 << "\t\t\t\t\t◇3:show the record   ◇\n" 
			 << "\t\t\t\t\t◇4:exit              ◇\n"
			 << "\t\t\t\t\t◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n"
			 << "\t\t\t\t\tplease input the choice(1-4):" ;
		cin >> flag;
		switch(flag)
		{
				case 1:admin->showPerson();
					   system_pause();
					   break;
				case 2:admin->showProduct();
					   system_pause();
					 //  admin->temp->showAll();
					   break;
				case 3:admin->readRecord();
					   system_pause();
					   break;
				case 4:return ;
				default:cout << "\t\t\t\t\tinput error!" << endl;
						break;
		
		}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x1415(%rip), %rdi      # 0xe820
callq 0x2190
movq 0x7bb9(%rip), %rdi      # 0x14fd0
leaq 0x1888(%rip), %rsi      # 0xeca6
movq %rsi, -0x28(%rbp)
callq 0x21e0
movq %rax, %rdi
leaq 0x18be(%rip), %rsi      # 0xecef
callq 0x21e0
movq %rax, %rdi
leaq 0x18d0(%rip), %rsi      # 0xed10
callq 0x21e0
movq %rax, %rdi
leaq 0x18e2(%rip), %rsi      # 0xed31
callq 0x21e0
movq %rax, %rdi
leaq 0x18f4(%rip), %rsi      # 0xed52
callq 0x21e0
movq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
leaq 0x18fa(%rip), %rsi      # 0xed73
callq 0x21e0
movq 0x7b5b(%rip), %rdi      # 0x14fe0
leaq -0xc(%rbp), %rsi
callq 0x20f0
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0xd500
movq -0x20(%rbp), %rax
leaq 0x130f(%rip), %rcx      # 0xe7b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4fa0
movq -0x18(%rbp), %rdi
callq 0xd530
jmp 0xd522
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4ee0
movq -0x18(%rbp), %rdi
callq 0xd530
jmp 0xd522
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x40f0
movq -0x18(%rbp), %rdi
callq 0xd530
jmp 0xd522
addq $0x30, %rsp
popq %rbp
retq
movq 0x7ac9(%rip), %rdi      # 0x14fd0
leaq 0xc9b(%rip), %rsi       # 0xe1a9
callq 0x21e0
movq %rax, %rdi
movq 0x7aa3(%rip), %rsi      # 0x14fc0
callq 0x2210
jmp 0xd404
nopw (%rax,%rax)
// File: hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: Menu::system_pause()
void Menu::system_pause()
{
		getchar();
		puts("Press any key to continue...");
		system("stty raw");
		getchar();
		system("stty cooked");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x22a0
leaq 0x1da2(%rip), %rdi      # 0xf2ea
callq 0x22f0
leaq 0x1db3(%rip), %rdi      # 0xf307
callq 0x2190
callq 0x22a0
leaq 0x1dab(%rip), %rdi      # 0xf310
callq 0x2190
addq $0x10, %rsp
popq %rbp
retq
// File: roberty65[P]bServer/frame/testClient/testForward.cpp
// Function: main
int main(int argc, char **argv)
{
	if (argc < 2) {
		fprintf(stderr, "Usage: %s host [cmd]\n", argv[0]);
		exit(0);
	}

	srandom(time(NULL));	
	setbuf(stdout, NULL);

	host = argv[1];
	if (argc >= 3) cmd = atoi(argv[2]);

	test001_sync_req_rsp();

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x13e2
movq 0x3c1d(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x1c30(%rip), %rsi      # 0x3004
movb $0x0, %al
callq 0x1210
xorl %edi, %edi
callq 0x11b0
xorl %eax, %eax
movl %eax, %edi
callq 0x1160
movl %eax, %edi
callq 0x1060
movq 0x3bcf(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1200
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x3d4c(%rip)      # 0x5160
cmpl $0x3, -0x8(%rbp)
jl 0x142d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1240
movl %eax, 0x3d3b(%rip)      # 0x5168
callq 0x1440
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: roberty65[P]bServer/frame/testClient/testForward.cpp
// Function: test001_sync_req_rsp()
static void test001_sync_req_rsp()
{
	static const char *tag = "test001: sync-req-rsp";
	fprintf(stdout, "%s start...\n", tag);
	int fd = -1;
	
	for (int i = 0; /* ** */; ++i) {
		int j = i % scnt;
		if (fd < 0) {
			if ((fd = beyondy::XbsClient(host, O_NONBLOCK, 30000)) < 0) {
				fprintf(stdout, "%s connect failed: %m\n", tag);	
				sleep(1);
				continue;
			}
			else {
				fprintf(stdout, "connect OK\n");
			}
		}

		if (__test001_sync_req_rsp(fd, sizes[j]) < 0) {
			close(fd); fd = -1;
			sleep(1);
		}
	}

	close(fd);
	fprintf(stdout, "%s done\n", tag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x3b79(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
movq 0x3d17(%rip), %rdx      # 0x5170
leaq 0x1be8(%rip), %rsi      # 0x3048
movb $0x0, %al
callq 0x1210
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cltd
idivl 0x3cf9(%rip)            # 0x5178
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x14eb
movq 0x3cd1(%rip), %rdi      # 0x5160
movl $0x800, %esi            # imm = 0x800
movl $0x7530, %edx           # imm = 0x7530
callq 0x2730
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jge 0x14d1
movq 0x3b1b(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
movq 0x3cb9(%rip), %rdx      # 0x5170
leaq 0x1b97(%rip), %rsi      # 0x3055
movb $0x0, %al
callq 0x1210
movl $0x1, %edi
callq 0x1120
jmp 0x1521
movq 0x3af0(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
leaq 0x1b8a(%rip), %rsi      # 0x306c
movb $0x0, %al
callq 0x1210
jmp 0x14eb
movl -0x4(%rbp), %edi
movslq -0xc(%rbp), %rcx
leaq 0x3c87(%rip), %rax      # 0x5180
movl (%rax,%rcx,4), %esi
callq 0x1530
cmpl $0x0, %eax
jge 0x151f
movl -0x4(%rbp), %edi
callq 0x1290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, %edi
callq 0x1120
jmp 0x1521
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1475
nop
// File: roberty65[P]bServer/frame/testClient/testForward.cpp
// Function: _test001_sync_req_rsp(int, int)
static int __test001_sync_req_rsp(int fd, int size)
{
	static const char *tag = "test001: sync-req-rsp";
	struct timeval t1, t2, t3;

	gettimeofday(&t1, NULL);
	if (__send_req(fd, cmd, size, tag) < 0) return -1;

	gettimeofday(&t2, NULL);
	if (__read_rsp(fd, size, tag) < 0) return -1;

	gettimeofday(&t3, NULL);
	fprintf(stdout, "OK: %s pkg-size=%d, write-time=%ldms read-rsp=%ldms\n",
		tag, size, DIFF_TV(&t1, &t2), DIFF_TV(&t2, &t3));
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1260
movl -0x8(%rbp), %edi
movl 0x3c14(%rip), %esi      # 0x5168
movl -0xc(%rbp), %edx
movq 0x3c32(%rip), %rcx      # 0x5190
callq 0x1640
cmpl $0x0, %eax
jge 0x1574
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x162a
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1260
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq 0x3c02(%rip), %rdx      # 0x5190
callq 0x1750
cmpl $0x0, %eax
jge 0x15a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x162a
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1260
movq 0x3a10(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
movq 0x3bce(%rip), %rax      # 0x5190
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
subq -0x20(%rbp), %rax
imulq $0x3e8, %rax, %r8       # imm = 0x3E8
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
addq %rax, %r8
movq -0x40(%rbp), %rax
subq -0x30(%rbp), %rax
imulq $0x3e8, %rax, %r9       # imm = 0x3E8
movq -0x38(%rbp), %rax
subq -0x28(%rbp), %rax
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
movq -0x48(%rbp), %rdx
addq %rax, %r9
leaq 0x1a5c(%rip), %rsi      # 0x3078
movb $0x0, %al
callq 0x1210
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: roberty65[P]bServer/frame/testClient/testForward.cpp
// Function: _send_req(int, int, int, char const*)
static int __send_req(int fd, int cmd, int size, const char *tag)
{
	struct proto_h16_head *h; 
	int msize = size + sizeof(*h);

	char *reqbuf = new char[msize];	
	h = (struct proto_h16_head *)reqbuf;

	h->len = msize;
	h->cmd = cmd;
	h->ver = 1;
	h->syn = 2;
	h->ack = 3;

	if (size >= (int)sizeof(int)) {
		*(int *)(reqbuf + sizeof *h) = random() % 3000;
	}	

	ssize_t wlen = beyondy::XbsWriteN(fd, reqbuf, msize, timeout);
	if (wlen != msize) {
		fprintf(stdout, "FAIL: %s pkg-size=%d, write req failed: %m\n", tag, size);
		return -1;	
	}

	delete[] reqbuf;	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movslq -0x10(%rbp), %rax
addq $0x10, %rax
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rdi
callq 0x1030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x20(%rbp), %rax
movw $0x1, 0x6(%rax)
movq -0x20(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x3, 0xc(%rax)
cmpl $0x4, -0x10(%rbp)
jl 0x16ca
callq 0x10c0
movl $0xbb8, %ecx            # imm = 0xBB8
cqto
idivq %rcx
movl %edx, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x8(%rbp), %edi
movq -0x30(%rbp), %rsi
movslq -0x24(%rbp), %rdx
movslq 0x3abc(%rip), %rcx      # 0x5198
callq 0x1950
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpq %rcx, %rax
je 0x171a
movq 0x38cf(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0x10(%rbp), %ecx
leaq 0x19a3(%rip), %rsi      # 0x30ad
movb $0x0, %al
callq 0x1210
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1738
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x1731
movq -0x40(%rbp), %rdi
callq 0x11d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: roberty65[P]bServer/frame/testClient/testForward.cpp
// Function: _read_rsp(int, int, char const*)
static int __read_rsp(int fd, int size, const char *tag)
{
	int msize = size + sizeof(struct proto_h16_head);
	char *rspbuf = new char[msize];

	ssize_t rlen = beyondy::XbsReadN(fd, rspbuf, msize, timeout);
	if (rlen != msize) {
		fprintf(stdout, "FAIL: %s pkg-size=%d, read rsp failed: %m\n", tag, msize);
		return -1;	
	}

	// TODO: cksum rspbuf
	delete[] rspbuf;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movslq -0xc(%rbp), %rax
addq $0x10, %rax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rdi
callq 0x1030
movq %rax, -0x28(%rbp)
movl -0x8(%rbp), %edi
movq -0x28(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
movslq 0x3a0c(%rip), %rcx      # 0x5198
callq 0x1cb0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
je 0x17ca
movq 0x381f(%rip), %rax      # 0x4fc8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x191f(%rip), %rsi      # 0x30d9
movb $0x0, %al
callq 0x1210
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17e8
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x17e1
movq -0x38(%rbp), %rdi
callq 0x11d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: ndsol[P]git-mine/./hashapi.h
// Function: CommitMessage::hash(Sha1Hash&, Blake2Hash&)
int hash(Sha1Hash& sha, Blake2Hash& b2h) {
    // header.data() contains a \x00 character, so leave it out of string s.
    sha.update(header.data(), header.size());
    std::string s = toRawString();
    sha.update(s.c_str(), s.size());
    sha.flush();
    b2h.update(header.data(), header.size());
    b2h.update(s.c_str(), s.size());
    b2h.flush();
    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
addq $0x8, %rdi
movq %rdi, -0x80(%rbp)
callq 0x8100
movq -0x80(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x7d40
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x80a0
movq -0x68(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x8120
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x4110
movq -0x60(%rbp), %rdi
movq %rax, -0x50(%rbp)
callq 0x4230
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
callq 0x80a0
jmp 0x5112
movq -0x10(%rbp), %rdi
callq 0x8340
jmp 0x511d
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
addq $0x8, %rdi
movq %rdi, -0x98(%rbp)
callq 0x8100
movq -0x98(%rbp), %rdi
movq %rax, -0x88(%rbp)
callq 0x7d40
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x8370
jmp 0x5167
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4110
movq -0xb0(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0x4230
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x8370
jmp 0x51ad
movq -0x18(%rbp), %rdi
callq 0x83d0
jmp 0x51b8
leaq -0x38(%rbp), %rdi
callq 0x4200
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4200
movq -0x40(%rbp), %rdi
callq 0x4600
nopw (%rax,%rax)
// File: ndsol[P]git-mine/git-mine.cpp
// Function: MineBoss::commitMatch()
void commitMatch() {
    for (size_t i = 0; i < pool.size(); i++) {
      if (pool.at(i)->matchFound) {
        commitMatchWith(*pool.at(i));
        return;
      }
    }
    fprintf(stderr, "A thread set searchDone but didn't set matchFound.\n");
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x1b0, %rdi            # imm = 0x1B0
callq 0x8500
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x5c63
movq -0x18(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
movq -0x10(%rbp), %rsi
callq 0xb980
movq %rax, %rdi
callq 0xb9c0
cmpq $0x0, 0x160(%rax)
je 0x5c50
movq -0x18(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
movq -0x10(%rbp), %rsi
callq 0xb980
movq %rax, %rdi
callq 0xc650
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0xc600
jmp 0x5c7b
jmp 0x5c52
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5bdc
movq 0x1a36e(%rip), %rax     # 0x1ffd8
movq (%rax), %rdi
leaq 0x1285a(%rip), %rsi     # 0x184ce
movb $0x0, %al
callq 0x44c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: ndsol[P]git-mine/git-mine.cpp
// Function: MineBoss::stop()
void stop() {
    { // Signal all threads to quit.
      std::unique_lock<std::mutex> lock(bossMutex);
      stopRequested = true;
      cond.notify_all();
    }
    // Wait for threads to quit.
    for (size_t patience = 5; ; patience--) {
      if (!patience) {
        fprintf(stderr,
                "Out of patience! Use ctrl+C to kill me.\n"
                "Threads seem to be deadlocked.\n");
        break;
      }
      if (patience != 5) {
        fprintf(stderr, "stop: wait %zus:", patience);
      }
      if (printProgressAt1Hz()) {
        break;
      }
    }
    // Print something if thread cleanup hangs process.
    if (0) fprintf(stderr, "Cleaning up threads.\n");
    // Join (reap) threads in ThreadLocal::~ThreadLocal().
    pool.clear();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x28(%rbp)
addq $0x150, %rsi            # imm = 0x150
leaq -0x18(%rbp), %rdi
callq 0x8560
movq -0x28(%rbp), %rdi
movb $0x1, 0x1a8(%rdi)
addq $0x178, %rdi            # imm = 0x178
callq 0x45d0
leaq -0x18(%rbp), %rdi
callq 0x8790
movq $0x5, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5cfd
movq 0x1a2ee(%rip), %rax     # 0x1ffd8
movq (%rax), %rdi
leaq 0x1280e(%rip), %rsi     # 0x18502
movb $0x0, %al
callq 0x44c0
jmp 0x5d40
cmpq $0x5, -0x20(%rbp)
je 0x5d20
movq 0x1a2cd(%rip), %rax     # 0x1ffd8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x12831(%rip), %rsi     # 0x1854a
movb $0x0, %al
callq 0x44c0
movq -0x28(%rbp), %rdi
callq 0x5740
cmpl $0x0, %eax
je 0x5d30
jmp 0x5d40
jmp 0x5d32
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5cdc
movq -0x28(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
callq 0xc680
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ndsol[P]git-mine/./hashapi.h
// Function: Sha1Hash::update(char const*, unsigned long)
void update(const char* data, size_t len) {
    if (!init_done) {
      SHA1_Init(&ctx);
      init_done = true;
    }
    SHA1_Update(&ctx, reinterpret_cast<const void*>(data), len);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x74(%rax)
jne 0x80d7
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
callq 0x4290
movq -0x20(%rbp), %rax
movb $0x1, 0x74(%rax)
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4090
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: ndsol[P]git-mine/./hashapi.h
// Function: Blake2Hash::update(char const*, unsigned long)
void update(const char* data, size_t len) {
    if (!init_done) {
      init_done = true;
      blake2b_init(&ctx, sizeof(result));
    }
    blake2b_update(&ctx, reinterpret_cast<const void*>(data), len);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x40(%rax)
jne 0x83a8
movq -0x20(%rbp), %rdi
movb $0x1, 0x40(%rdi)
addq $0x48, %rdi
movl $0x40, %esi
callq 0xc990
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xcc10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: ndsol[P]git-mine/git-mine.cpp
// Function: MineBoss::ThreadLocal::worker()
void worker() {
      doWork();
      std::unique_lock<std::mutex> lock(parent->bossMutex);
      go = false;
      parent->cond.notify_all();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xa2b0
movq -0x20(%rbp), %rax
movq (%rax), %rsi
addq $0x150, %rsi            # imm = 0x150
leaq -0x18(%rbp), %rdi
callq 0x8560
movq -0x20(%rbp), %rax
movb $0x0, 0x148(%rax)
movq (%rax), %rdi
addq $0x178, %rdi            # imm = 0x178
callq 0x45d0
leaq -0x18(%rbp), %rdi
callq 0x8790
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: ndsol[P]git-mine/git-mine.cpp
// Function: MineBoss::ThreadLocal::doWork()
void doWork() {
      noodle.set_ctime(parent->ctime_hint);
      for (;;) {
        if (search(parent->atime_hint)) {
          return;
        }

        // Increment ctime and try again.
        commit_delta++;
        noodle.set_ctime(noodle.ctime() + 1);
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq %rax, %rdi
addq $0x18, %rdi
movq (%rax), %rax
movq 0x138(%rax), %rsi
callq 0xa330
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq 0x130(%rax), %rsi
callq 0xa390
cmpl $0x0, %eax
je 0xa2f8
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
movq 0x10(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x10(%rdi)
movq %rdi, %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
addq $0x18, %rdi
callq 0x8540
movq -0x18(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
callq 0xa330
jmp 0xa2da
nop
// File: ndsol[P]git-mine/./hashapi.h
// Function: Blake2Hash::instr(unsigned char*, unsigned long, unsigned long*)
int instr(uint8_t* want, size_t wantlen, size_t* matchlen) {
    int best = -1;
    *matchlen = 0;
    if (!wantlen) {
      return best;
    }
    for (size_t n = 0; n < sizeof(result); ) {
      size_t i = 0;
      void* p = memchr(&result[n], want[i], sizeof(result) - n);
      if (!p) {
        return best;
      }
      // memchr matched one byte.
      n = (reinterpret_cast<uint8_t*>(p) - result) + 1;
      i++;
      // Check how many bytes long this match is.
      while (n < sizeof(result) && i < wantlen && want[i] == result[n]) {
        i++;
        n++;
      }
      if (i > *matchlen) {
        best = n - i;
        *matchlen = i;
      }
    }
    return best;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x20(%rbp)
jne 0xab64
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xac62
movq $0x0, -0x38(%rbp)
cmpq $0x40, -0x38(%rbp)
jae 0xac5c
movq -0x50(%rbp), %rdi
movq $0x0, -0x40(%rbp)
addq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %esi
movl $0x40, %edx
subq -0x38(%rbp), %rdx
callq 0x4380
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xabb7
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xac62
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
cmpq $0x40, -0x38(%rbp)
movb %al, -0x51(%rbp)
jae 0xac11
movq -0x40(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0xac11
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rdx
movzbl (%rax,%rdx), %eax
movq -0x38(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xac1a
jmp 0xac34
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xabd6
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xac57
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xab6c
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ndsol[P]git-mine/blake2b-ref.c
// Function: blake2b_init_param
int blake2b_init_param( blake2b_state *S, const blake2b_param *P )
{
  const uint8_t *p = ( const uint8_t * )( P );
  size_t i;

  blake2b_init0( S );

  /* IV XOR ParamBlock */
  for( i = 0; i < 8; ++i )
    S->h[i] ^= load64( p + sizeof( S->h[i] ) * i );

  S->outlen = P->digest_length;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc8a0
movq $0x0, -0x20(%rbp)
cmpq $0x8, -0x20(%rbp)
jae 0xc875
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0xc900
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xc839
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0xe8(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ndsol[P]git-mine/./blake2-impl.h
// Function: load64(void const*)
static BLAKE2_INLINE uint64_t load64( const void *src )
{
#if defined(NATIVE_LITTLE_ENDIAN)
  uint64_t w;
  memcpy(&w, src, sizeof w);
  return w;
#else
  const uint8_t *p = ( const uint8_t * )src;
  return (( uint64_t )( p[0] ) <<  0) |
         (( uint64_t )( p[1] ) <<  8) |
         (( uint64_t )( p[2] ) << 16) |
         (( uint64_t )( p[3] ) << 24) |
         (( uint64_t )( p[4] ) << 32) |
         (( uint64_t )( p[5] ) << 40) |
         (( uint64_t )( p[6] ) << 48) |
         (( uint64_t )( p[7] ) << 56) ;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shlq $0x0, %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x18, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shlq $0x28, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shlq $0x30, %rcx
orq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
shlq $0x38, %rcx
orq %rcx, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ndsol[P]git-mine/blake2b-ref.c
// Function: blake2b_init
int blake2b_init( blake2b_state *S, size_t outlen )
{
  blake2b_param P[1];

  if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1;

  P->digest_length = (uint8_t)outlen;
  P->key_length    = 0;
  P->fanout        = 1;
  P->depth         = 1;
  store32( &P->leaf_length, 0 );
  store32( &P->node_offset, 0 );
  store32( &P->xof_length, 0 );
  P->node_depth    = 0;
  P->inner_length  = 0;
  memset( P->reserved, 0, sizeof( P->reserved ) );
  memset( P->salt,     0, sizeof( P->salt ) );
  memset( P->personal, 0, sizeof( P->personal ) );
  return blake2b_init_param( S, P );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xc9ae
cmpq $0x40, -0x18(%rbp)
jbe 0xc9ba
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xca4e
movq -0x18(%rbp), %rax
movb %al, -0x60(%rbp)
movb $0x0, -0x5f(%rbp)
movb $0x1, -0x5e(%rbp)
movb $0x1, -0x5d(%rbp)
leaq -0x60(%rbp), %rdi
addq $0x4, %rdi
xorl %esi, %esi
callq 0xca60
leaq -0x60(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0xca60
leaq -0x60(%rbp), %rdi
addq $0xc, %rdi
xorl %esi, %esi
callq 0xca60
movb $0x0, -0x50(%rbp)
movb $0x0, -0x4f(%rbp)
leaq -0x60(%rbp), %rdi
addq $0x12, %rdi
xorl %esi, %esi
movl $0xe, %edx
callq 0x41b0
leaq -0x60(%rbp), %rdi
addq $0x20, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x41b0
leaq -0x60(%rbp), %rdi
addq $0x30, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x41b0
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xc810
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)