LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hey-yahei[P]ConvNet/src/Pooling.cpp
// Function: Pooling::Pooling(char const*, int, int, int, int*)
Pooling::Pooling(const char* type, int kernel, int stride, int pad, int ishape[])
		: type(type), kernel(kernel), stride(stride), pad(pad), in_channels(ishape[1]){
	for (int i = 0; i < 4; i++)
		in_shape[i] = ishape[i];
	in_w = ishape[3];
	in_hw = ishape[2] * in_w;
	in_chw = ishape[1] * in_hw;

	out_shape[0] = ishape[0];		// batch size
	out_shape[1] = in_channels;	// out_channels
	out_shape[2] = (ishape[2] + 2 * pad - kernel) / stride + 1;   // out_height
	out_shape[3] = (ishape[3] + 2 * pad - kernel) / stride + 1;   // out_width
	out_w = out_shape[3];
	out_hw = out_shape[2] * out_w;
	out_chw = out_shape[1] * out_hw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %ecx
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0xc(%rax)
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x50(%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x73bc
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movslq -0x2c(%rbp), %rcx
movl %edx, 0x10(%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7394
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, 0x38(%rax)
movq -0x28(%rbp), %rcx
movl 0x8(%rcx), %ecx
imull 0x38(%rax), %ecx
movl %ecx, 0x34(%rax)
movq -0x28(%rbp), %rcx
movl 0x4(%rcx), %ecx
imull 0x34(%rax), %ecx
movl %ecx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x20(%rax)
movl 0xc(%rax), %ecx
movl %ecx, 0x24(%rax)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
addl %ecx, %eax
subl -0x14(%rbp), %eax
cltd
idivl -0x18(%rbp)
movl %eax, %ecx
movq -0x38(%rbp), %rax
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
addl %ecx, %eax
subl -0x14(%rbp), %eax
cltd
idivl -0x18(%rbp)
movl %eax, %ecx
movq -0x38(%rbp), %rax
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movl 0x2c(%rax), %ecx
movl %ecx, 0x44(%rax)
movl 0x28(%rax), %ecx
imull 0x44(%rax), %ecx
movl %ecx, 0x40(%rax)
movl 0x24(%rax), %ecx
imull 0x40(%rax), %ecx
movl %ecx, 0x3c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hey-yahei[P]ConvNet/src/helper.cpp
// Function: DecodeHuffman(Bit&, TarFile*)
Tree* DecodeHuffman(Bit& accessor, TarFile* tarfile) {
	Tree* left, * right;
	unsigned char value = 0;

	switch (accessor.Next()) {
	case -1:
		return nullptr;
	case 0:
		left = DecodeHuffman(accessor, tarfile);
		right = DecodeHuffman(accessor, tarfile);
		return new Tree(-1, left, right);
	case 1:
		value = 0;
		for (int i = 0; i < 8; i++) {
			value <<= 1;
			value += accessor.Next();
		}
		return new Tree(value, nullptr, nullptr);
	default:
		cerr << "DecodeHuffman: unknown bit" << endl;
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x29(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8220
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
subl $-0x1, %eax
je 0x77d3
jmp 0x77b9
movl -0x44(%rbp), %eax
testl %eax, %eax
je 0x77e0
jmp 0x77c2
movl -0x44(%rbp), %eax
subl $0x1, %eax
je 0x7856
jmp 0x78db
movq $0x0, -0x8(%rbp)
jmp 0x7907
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7790
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7790
movq %rax, -0x28(%rbp)
movl $0x18, %edi
callq 0x21e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x82e0
jmp 0x782a
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7907
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x18, %esi
callq 0x21f0
jmp 0x7911
movb $0x0, -0x29(%rbp)
movl $0x0, -0x40(%rbp)
cmpl $0x8, -0x40(%rbp)
jge 0x788f
movzbl -0x29(%rbp), %eax
shll %eax
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8220
movl %eax, %ecx
movzbl -0x29(%rbp), %eax
addl %ecx, %eax
movb %al, -0x29(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x7861
movl $0x18, %edi
callq 0x21e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movzbl -0x29(%rbp), %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x82e0
jmp 0x78b5
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7907
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x18, %esi
callq 0x21f0
jmp 0x7911
movq 0xa70e(%rip), %rdi      # 0x11ff0
leaq 0x4a78(%rip), %rsi      # 0xc361
callq 0x21c0
movq %rax, %rdi
movq 0xa6c8(%rip), %rsi      # 0x11fc0
callq 0x2200
movl $0x1, %edi
callq 0x2290
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: hey-yahei[P]ConvNet/src/helper.cpp
// Function: LoadFromFile(char const*, char*, TarFile*)
unsigned long LoadFromFile(const char* path, char* dst, TarFile* tarfile) {
	unsigned long byte_cnt = 0;
	if (nullptr != tarfile) {
		tarfile->GetFileContents(path, dst);
		byte_cnt = tarfile->GetFileSize(path);
	} else {
		char temp;
		ifstream in_file(path, ios::in | ios::binary);

		if (!in_file) {
			cerr << "Open file failed: " << path << endl;
			return 0;
		}
		while (in_file.read((char*)& temp, sizeof(temp))) {
			dst[byte_cnt] = temp;
			byte_cnt++;
		}
	}

	return byte_cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x79de
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x94f0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x96a0
movq %rax, -0x28(%rbp)
jmp 0x7b4c
movq -0x10(%rbp), %rax
movq %rax, -0x258(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x8410
movq -0x258(%rbp), %rsi
movl %eax, %edx
leaq -0x238(%rbp), %rdi
callq 0x23a0
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x238(%rbp,%rax), %rdi
callq 0x20e0
movb %al, -0x249(%rbp)
jmp 0x7a2d
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x7a3c
jmp 0x7ac0
movq 0xa5ad(%rip), %rdi      # 0x11ff0
leaq 0x4932(%rip), %rsi      # 0xc37c
callq 0x21c0
movq %rax, -0x260(%rbp)
jmp 0x7a58
movq -0x260(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x21c0
movq %rax, -0x268(%rbp)
jmp 0x7a71
movq -0x268(%rbp), %rdi
movq 0xa541(%rip), %rsi      # 0x11fc0
callq 0x2200
jmp 0x7a86
movq $0x0, -0x8(%rbp)
movl $0x1, -0x248(%rbp)
jmp 0x7b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x2070
jmp 0x7b61
jmp 0x7ac2
leaq -0x238(%rbp), %rdi
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x22c0
movq %rax, -0x270(%rbp)
jmp 0x7ae0
movq -0x270(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x22b0
movb %al, -0x271(%rbp)
jmp 0x7afe
movb -0x271(%rbp), %al
testb $0x1, %al
jne 0x7b0a
jmp 0x7b26
movb -0x29(%rbp), %dl
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x7ac2
movl $0x0, -0x248(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x2070
movl -0x248(%rbp), %eax
testl %eax, %eax
je 0x7b4a
jmp 0x7b48
jmp 0x7b54
jmp 0x7b4c
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x240(%rbp), %rdi
callq 0x2370
nopl (%rax)
// File: hey-yahei[P]ConvNet/src/helper.cpp
// Function: GetFileLength(char const*)
unsigned long GetFileLength(const char* path) {
	FILE* fp;
	fp =fopen(path, "r");
	if (nullptr == fp) {
		cerr << "GetFileLength: open file fail" << endl;
		exit(1);
	}
	fseek(fp, 0L, SEEK_END);
	long size = ftell(fp);
	fclose(fp);
	return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x49c1(%rip), %rsi      # 0xc548
callq 0x2270
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x7bc4
movq 0xa451(%rip), %rdi      # 0x11ff0
leaq 0x47e9(%rip), %rsi      # 0xc38f
callq 0x21c0
movq %rax, %rdi
movq 0xa40b(%rip), %rsi      # 0x11fc0
callq 0x2200
movl $0x1, %edi
callq 0x2290
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2260
movq -0x10(%rbp), %rdi
callq 0x2030
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21d0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hey-yahei[P]ConvNet/src/helper.cpp
// Function: SaveToFile(char const*, char*, unsigned long)
unsigned long SaveToFile(const char* path, char* src, unsigned long bytes) {
	ofstream out_file(path, ios::out | ios::binary);
	if (!out_file) {
		cerr << "Open result file failed." << endl;
		return 0;
	}
	out_file.write(src, bytes);
	return bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x8410
movq -0x240(%rbp), %rsi
movl %eax, %edx
leaq -0x220(%rbp), %rdi
callq 0x2230
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x20e0
movb %al, -0x231(%rbp)
jmp 0x8156
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x8162
jmp 0x81c7
movq 0x9e87(%rip), %rdi      # 0x11ff0
leaq 0x42a7(%rip), %rsi      # 0xc417
callq 0x21c0
movq %rax, -0x248(%rbp)
jmp 0x817e
movq -0x248(%rbp), %rdi
movq 0x9e34(%rip), %rsi      # 0x11fc0
callq 0x2200
jmp 0x8193
movq $0x0, -0x8(%rbp)
movl $0x1, -0x230(%rbp)
jmp 0x81ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x2320
jmp 0x8208
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x220(%rbp), %rdi
callq 0x22d0
jmp 0x81dd
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x2320
movq -0x8(%rbp), %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)
nop
// File: hey-yahei[P]ConvNet/./include/helper.h
// Function: Bit::Next()
int Next() {
		if ( (ptr >= buffer + size) || (ptr == buffer + size - 1) && (idx + num_pad >= 8) )
			return -1;

		int ret = (*ptr & (1 << (7 - idx++))) ? 1 : 0;
		if (idx >= 8) {
			idx = 0;
			ptr++;
		}

		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movq %rdx, -0x20(%rbp)
movq 0x8(%rdx), %rax
movq (%rdx), %rcx
movslq 0x10(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x826d
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rax
movq (%rdx), %rcx
movslq 0x10(%rdx), %rdx
addq %rdx, %rcx
addq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x8276
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %eax
addl 0x18(%rcx), %eax
cmpl $0x8, %eax
jl 0x8276
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x82d1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movzbl (%rcx), %esi
movl 0x14(%rax), %edx
movl %edx, %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movl $0x7, %ecx
subl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x8, 0x14(%rax)
jl 0x82cb
movq -0x20(%rbp), %rax
movl $0x0, 0x14(%rax)
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hey-yahei[P]ConvNet/./include/helper.h
// Function: Bit::Bit(char const*, TarFile*)
Bit(const char* path, TarFile* tarfile = nullptr) {
		size = (nullptr != tarfile) ? tarfile->GetFileSize(path) : GetFileLength(path);
		buffer = new unsigned char[size];
		if (nullptr != tarfile)
			tarfile->GetFileContents(path, (char*)buffer);
		else
			LoadFromFile(path, (char*)buffer);
		num_pad = buffer[0];
		ptr = buffer + 1;
		idx = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, (%rax)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x834e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x96a0
movq %rax, -0x28(%rbp)
jmp 0x835b
movq -0x10(%rbp), %rdi
callq 0x7b70
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movl %ecx, 0x10(%rax)
movslq 0x10(%rax), %rdi
callq 0x2040
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x8397
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rax), %rdx
callq 0x94f0
jmp 0x83ab
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdi
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x7990
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movzbl (%rcx), %ecx
movl %ecx, 0x18(%rax)
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x14(%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: hey-yahei[P]ConvNet/src/TarFile.cpp
// Function: TarFile::TarFile(char const*)
TarFile::TarFile(const char* tar_name)
	: file(nullptr), size(0)
{
	file_names.clear();
	file_sizes.clear();
	file_data_start_addrs.clear();
	// fopen_s(&file, tar_name, "rb");
	file = fopen(tar_name, "rb");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
addq $0x10, %rdi
movq %rdi, -0x40(%rbp)
callq 0x9800
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
movq %rdi, -0x38(%rbp)
callq 0x9820
movq -0x48(%rbp), %rdi
addq $0x40, %rdi
movq %rdi, -0x30(%rbp)
callq 0x9820
movq -0x40(%rbp), %rdi
callq 0x9840
movq -0x38(%rbp), %rdi
callq 0x9860
movq -0x30(%rbp), %rdi
callq 0x9860
movq -0x10(%rbp), %rdi
leaq 0x3470(%rip), %rsi      # 0xc50c
callq 0x2270
movq %rax, -0x28(%rbp)
jmp 0x90a7
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x9880
movq -0x38(%rbp), %rdi
callq 0x9880
movq -0x40(%rbp), %rdi
callq 0x98e0
movq -0x18(%rbp), %rdi
callq 0x2370
nopl (%rax,%rax)
// File: hey-yahei[P]ConvNet/src/TarFile.cpp
// Function: TarFile::~TarFile()
TarFile::~TarFile()
{
	if (file) {
		fclose(file);
		file = nullptr;
	}
	file_names.clear();
	file_sizes.clear();
	file_data_start_addrs.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x9123
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x21d0
jmp 0x9118
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x9840
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x9860
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x9860
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x9880
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x9880
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x98e0
addq $0x10, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x3510
nop
// File: hey-yahei[P]ConvNet/src/TarFile.cpp
// Function: TarFile::GetFileContents(char const*, char*)
bool TarFile::GetFileContents(const char* file_name, char* contents)
{
	bool flag = false;
	for (int i = 0; i < file_names.size(); i++) {
		std::string name_(file_name);

		if (file_names[i].compare(name_) == 0) {
			int file_size = file_sizes[i];
			flag = true;
			fseek(file, file_data_start_addrs[i], SEEK_SET);
			fread(contents, file_size, 1, file);
			fseek(file, 0, SEEK_SET);

			break;
		}
	}

	return flag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, -0x19(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x68(%rbp), %rdi
movslq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x10, %rdi
callq 0x9b80
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x967b
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x2380
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x99e0
jmp 0x9567
leaq -0x41(%rbp), %rdi
callq 0x2220
movq -0x68(%rbp), %rdi
addq $0x10, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9ba0
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x2050
movl %eax, -0x84(%rbp)
jmp 0x9595
movl -0x84(%rbp), %eax
cmpl $0x0, %eax
jne 0x9650
movq -0x68(%rbp), %rdi
addq $0x28, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9bc0
movq -0x68(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movb $0x1, -0x19(%rbp)
movq (%rdi), %rax
movq %rax, -0x90(%rbp)
addq $0x40, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9bc0
movq -0x90(%rbp), %rdi
movq (%rax), %rsi
xorl %edx, %edx
callq 0x2260
jmp 0x95ec
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rdi
movslq -0x58(%rbp), %rsi
movq (%rax), %rcx
movl $0x1, %edx
callq 0x2330
jmp 0x9607
movq -0x68(%rbp), %rax
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x2260
jmp 0x9619
movl $0x2, -0x5c(%rbp)
jmp 0x9657
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x2220
jmp 0x9689
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2130
jmp 0x9689
movl $0x0, -0x5c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2130
movl -0x5c(%rbp), %eax
testl %eax, %eax
je 0x966b
jmp 0x9669
jmp 0x967b
jmp 0x966d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x951a
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)
// File: hey-yahei[P]ConvNet/src/TarFile.cpp
// Function: TarFile::GetFileSize(char const*)
size_t TarFile::GetFileSize(const char* file_name)
{
	size_t file_size{ 0 };

	for (int i = 0; i < file_names.size(); i++) {
		std::string name_(file_name);

		if (file_names[i].compare(name_) == 0) {
			file_size = file_sizes[i];
			break;
		}
	}

	return file_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x60(%rbp), %rdi
movslq -0x1c(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x10, %rdi
callq 0x9b80
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0x97c4
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x2380
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x99e0
jmp 0x9717
leaq -0x41(%rbp), %rdi
callq 0x2220
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9ba0
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x2050
movl %eax, -0x7c(%rbp)
jmp 0x9742
movl -0x7c(%rbp), %eax
cmpl $0x0, %eax
jne 0x9799
movq -0x60(%rbp), %rdi
addq $0x28, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9bc0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x2, -0x58(%rbp)
jmp 0x97a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x2220
jmp 0x97d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2130
jmp 0x97d1
movl $0x0, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2130
movl -0x58(%rbp), %eax
testl %eax, %eax
je 0x97b4
jmp 0x97b2
jmp 0x97c4
jmp 0x97b6
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x96ca
movq -0x18(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: ArashPartow[P]exprtk-extras/exprtk_game_of_life.cpp
// Function: rnd_01<double>::rnd_01()
rnd_01()
   : exprtk::ifunction<T>(0)
   {
      std::random_device device;
      std::array<unsigned int,std::mt19937::state_size> seed;
      std::generate_n(seed.data(), seed.size(), std::ref(device));
      std::seed_seq seq(std::begin(seed), std::end(seed));
      generator.seed(seq);
   }

// Assembly:
subq $0x1db8, %rsp           # imm = 0x1DB8
movq %rdi, 0x1db0(%rsp)
movq 0x1db0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq $0x0, 0x1da8(%rsp)
leaq 0x1da8(%rsp), %rsi
callq 0x11f630
movq 0x28(%rsp), %rdi
leaq 0x4c3ad7(%rip), %rax    # 0x5e0778
movq %rax, (%rdi)
addq $0x28, %rdi
callq 0x11f680
jmp 0x11ccaf
movq 0x28(%rsp), %rdi
addq $0x13b0, %rdi           # imm = 0x13B0
xorps %xmm0, %xmm0
movsd 0x346342(%rip), %xmm1   # 0x463008
callq 0x11f6a0
jmp 0x11cccd
leaq 0xa10(%rsp), %rdi
callq 0x11f6d0
jmp 0x11ccdc
leaq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x11f7e0
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0x11f7f0
movq %rax, 0x20(%rsp)
leaq 0xa10(%rsp), %rdi
callq 0x11f800
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdx
callq 0x11f770
jmp 0x11cd27
leaq 0x50(%rsp), %rdi
callq 0x11f830
movq %rax, 0x8(%rsp)
jmp 0x11cd38
leaq 0x50(%rsp), %rdi
callq 0x11f840
movq %rax, (%rsp)
jmp 0x11cd48
movq (%rsp), %rdx
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x11f850
jmp 0x11cd5d
movq 0x28(%rsp), %rdi
addq $0x28, %rdi
leaq 0x30(%rsp), %rsi
callq 0x11f930
jmp 0x11cd72
leaq 0x30(%rsp), %rdi
callq 0x11fab0
leaq 0xa10(%rsp), %rdi
callq 0x11fac0
addq $0x1db8, %rsp           # imm = 0x1DB8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1da0(%rsp)
movl %eax, 0x1d9c(%rsp)
jmp 0x11cde8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1da0(%rsp)
movl %eax, 0x1d9c(%rsp)
jmp 0x11cddb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1da0(%rsp)
movl %eax, 0x1d9c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x11fab0
leaq 0xa10(%rsp), %rdi
callq 0x11fac0
movq 0x28(%rsp), %rdi
callq 0x1201f0
movq 0x1da0(%rsp), %rdi
callq 0x114480
nop
// File: renzibei[P]TSProxy/loghelper.cpp
// Function: LogHelper::log(LogType, char const*, ...)
void LogHelper::log(LogType type, const char * format, ...) {
#ifdef LOG_TRACE
    if(type <= Trace)
#elif defined LOG_DEBUG
    if(type <= Debug)
#elif defined LOG_INFO
    if(type <= Info)
#elif defined LOG_WARN
    if(type <= Warn)
#endif
    {
        va_list args;
        if (type == Error) {
            fprintf(stderr, "\033[40;31m");
        }
        else if (type == Warn) {
            fprintf(stderr, "\033[40;33m");
        }
        va_start(args, format);
        vfprintf(stderr, format, args);
        va_end(args);
        if (type == Error || type == Warn) {
            fprintf(stderr, "\033[0m");
        }
        fprintf(stderr, "\n");
    }
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0x292c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %edi, 0xd4(%rsp)
movq %rsi, 0xc8(%rsp)
cmpl $0x2, 0xd4(%rsp)
jg 0x2a38
cmpl $0x0, 0xd4(%rsp)
jne 0x2981
movq 0x1466a(%rip), %rax     # 0x16fd8
movq (%rax), %rdi
leaq 0xd68c(%rip), %rsi      # 0x10004
movb $0x0, %al
callq 0x2310
jmp 0x29a5
cmpl $0x1, 0xd4(%rsp)
jne 0x29a3
movq 0x14646(%rip), %rax     # 0x16fd8
movq (%rax), %rdi
leaq 0xd671(%rip), %rsi      # 0x1000d
movb $0x0, %al
callq 0x2310
jmp 0x29a5
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq 0x14604(%rip), %rax     # 0x16fd8
movq (%rax), %rdi
movq 0xc8(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x22b0
leaq 0xb0(%rsp), %rax
cmpl $0x0, 0xd4(%rsp)
je 0x2a08
cmpl $0x1, 0xd4(%rsp)
jne 0x2a20
movq 0x145c9(%rip), %rax     # 0x16fd8
movq (%rax), %rdi
leaq 0xd5fd(%rip), %rsi      # 0x10016
movb $0x0, %al
callq 0x2310
movq 0x145b1(%rip), %rax     # 0x16fd8
movq (%rax), %rdi
leaq 0xdcb7(%rip), %rsi      # 0x106e8
movb $0x0, %al
callq 0x2310
addq $0xd8, %rsp
retq
// File: renzibei[P]TSProxy/proxyserver.cpp
// Function: sendData(int, unsigned char const*, unsigned long, std::unordered_map<int, ClientNode*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, ClientNode*>>>&, int)
int sendData(int sockFd, const uint8_t *data, size_t nbyte, ClientMap &cMap, int msgType = 5) {
    ClientNode *node = cMap[sockFd];
    static InnerMsg innerMsg;
    memset(&innerMsg, 0, sizeof(innerMsg));
    node->sSeq++;
    
    innerMsg.cSeq = node->cSeq;
    innerMsg.sSeq = node->sSeq;
    innerMsg.msgType = msgType;
    if (nbyte > sizeof(innerMsg.data)) {
        LogHelper::log(Error, "Failed to send data, nbyte too large, nbyte: %lu", nbyte);
        return -1;
    }
    innerMsg.dataLength = nbyte;
    memcpy(innerMsg.data, data, nbyte);
    ssize_t sendCode = sendTSPacket(sockFd, &innerMsg, constants::serverNonBlocking);
    if (sendCode < 0) {
        LogHelper::log(Error, "Fail to send data");
        return sendCode;
    }
    node->lastTime = time(NULL);
    return 0;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5650
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x24536(%rip), %rdi     # 0x27240
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x2140
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x2450a(%rip)     # 0x27240
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x24502(%rip)     # 0x27248
movl 0x14(%rsp), %eax
movw %ax, 0x244ff(%rip)      # 0x27250
cmpq $0xffec, 0x20(%rsp)     # imm = 0xFFEC
jbe 0x2d7b
movq 0x20(%rsp), %rdx
xorl %edi, %edi
leaq 0xd469(%rip), %rsi      # 0x101d3
movb $0x0, %al
callq 0x28f0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x2df8
movq 0x20(%rsp), %rax
movw %ax, 0x244cb(%rip)      # 0x27252
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x244a8(%rip), %rdi     # 0x27240
addq $0x14, %rdi
callq 0x2180
movl 0x30(%rsp), %edi
leaq 0x24494(%rip), %rsi     # 0x27240
movl $0x1, %edx
callq 0xd3b0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jge 0x2ddb
xorl %edi, %edi
leaq 0xd43a(%rip), %rsi      # 0x10204
movb $0x0, %al
callq 0x28f0
movq (%rsp), %rax
movl %eax, 0x34(%rsp)
jmp 0x2df8
xorl %eax, %eax
movl %eax, %edi
callq 0x21c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: renzibei[P]TSProxy/proxyserver.cpp
// Function: eraseClientFromFdSet(int, fd_set&, int&, int, int&)
void eraseClientFromFdSet(int clientFd, fd_set &readSet, int &max_read_sd, int max_write_sd, int &max_all_sd) {
    close(clientFd);
    FD_CLR(clientFd, &readSet);
    if (clientFd == max_read_sd) {
        while (FD_ISSET(max_read_sd, &readSet) == 0)
            max_read_sd -= 1;
    }
    max_all_sd = std::max(max_read_sd, max_write_sd);
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x44(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movl 0x44(%rsp), %edi
callq 0x23a0
movl 0x44(%rsp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
xorq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x44(%rsp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq 0x10(%rsp), %rdx
movl %eax, %ecx
movq 0x18(%rsp), %rax
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl 0x44(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x3d10
jmp 0x3ca1
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq 0x8(%rsp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3d0e
movq 0x30(%rsp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x3ca1
jmp 0x3d10
movq 0x30(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x57c0
movl (%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
addq $0x48, %rsp
retq
nopl (%rax)
// File: renzibei[P]TSProxy/proxyserver.cpp
// Function: cleanDeadLocalFds(int, std::unordered_map<int, HostNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, HostNode>>>&, std::unordered_map<int, SocketNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, SocketNode>>>&, fd_set&, fd_set&, int&, int&, int&, bool)
void cleanDeadLocalFds(int clientFd, HostMap &h2lMap, SocketMap &sMap, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd, bool forceClean = false) {
    time_t now = time(NULL);
    for (auto it = sMap.begin(); it != sMap.end();) {
        if (forceClean || now - it->second.lastTime > constants::SocketTimeOutSeconds) {
            int localFd = it->first, hostFd = it->second.sockFd;
            LogHelper::log(Debug, "Clean timeout localFd %d in clientFd: %d, forceClean: %d", localFd, clientFd, forceClean);
            eraseHostFromFdSets(hostFd, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd);
            h2lMap.erase(hostFd);
            it = sMap.erase(it);
            
        }
        else it++;
    }
}

// Assembly:
subq $0x78, %rsp
movb 0x90(%rsp), %al
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %r10
movl %edi, 0x74(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
andb $0x1, %al
movb %al, 0x47(%rsp)
xorl %eax, %eax
movl %eax, %edi
callq 0x21c0
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
callq 0x5900
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rdi
callq 0x5850
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5930
testb $0x1, %al
jne 0x3db2
jmp 0x3ea0
testb $0x1, 0x47(%rsp)
jne 0x3de3
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
callq 0x58e0
movq %rax, %rcx
movq (%rsp), %rax
subq 0x10(%rcx), %rax
cmpq $0xb4, %rax
jle 0x3e8a
leaq 0x30(%rsp), %rdi
callq 0x58e0
movl (%rax), %eax
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x58e0
movl 0x8(%rax), %eax
movl %eax, 0x20(%rsp)
movl 0x24(%rsp), %edx
movl 0x74(%rsp), %ecx
movb 0x47(%rsp), %al
andb $0x1, %al
movzbl %al, %r8d
movl $0x3, %edi
leaq 0xc7bb(%rip), %rsi      # 0x105dd
movb $0x0, %al
callq 0x28f0
movl 0x20(%rsp), %edi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x80(%rsp), %r8
movq 0x88(%rsp), %r9
callq 0x3900
movq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5950
movq 0x60(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x5980
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e9b
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x59c0
movq %rax, 0x8(%rsp)
jmp 0x3d8b
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: renzibei[P]TSProxy/proxyserver.cpp
// Function: cleanDeadHosts(std::unordered_map<int, ClientNode*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, ClientNode*>>>&, std::unordered_map<int, HostNode, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, HostNode>>>&, fd_set&, fd_set&, int&, int&, int&)
void cleanDeadHosts(ClientMap &cMap, HostMap &sMap, fd_set &readSet, fd_set &writeSet, int &max_read_sd, int &max_write_sd, int &max_all_sd) {
    time_t now = time(NULL);
    for (auto it = sMap.begin(); it != sMap.end();) {
        if (now - it->second.lastTime > constants::SocketTimeOutSeconds) {
            LogHelper::log(Debug, "Clean timeout host fd: %d, localFd: %d", it->first, it->second.localFd);
            eraseHostFromFdSets(it->first, readSet, writeSet, max_read_sd, max_write_sd, max_all_sd);
            cMap[it->second.clientFd]->sMap.erase(it->second.localFd);
            it = sMap.erase(it);
        }
        else it++;
    }
}

// Assembly:
subq $0x88, %rsp
movq 0x90(%rsp), %rax
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
xorl %eax, %eax
movl %eax, %edi
callq 0x21c0
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rdi
callq 0x59f0
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rdi
callq 0x5a40
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x5a20
testb $0x1, %al
jne 0x3f24
jmp 0x4044
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5a70
movq %rax, %rcx
movq 0x20(%rsp), %rax
subq 0x10(%rcx), %rax
cmpq $0xb4, %rax
jle 0x402e
leaq 0x48(%rsp), %rdi
callq 0x5a70
movl (%rax), %eax
movl %eax, 0xc(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5a70
movl 0xc(%rsp), %edx
movl 0xc(%rax), %ecx
movl $0x3, %edi
leaq 0xc699(%rip), %rsi      # 0x10616
movb $0x0, %al
callq 0x28f0
leaq 0x48(%rsp), %rdi
callq 0x5a70
movl (%rax), %edi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x90(%rsp), %r9
callq 0x3900
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5a70
movq 0x10(%rsp), %rdi
movq %rax, %rsi
addq $0x8, %rsi
callq 0x5650
movq (%rax), %rax
addq $0x18, %rax
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5a70
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq $0x8, %rsi
addq $0x4, %rsi
callq 0x5a90
movq 0x78(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
callq 0x5ac0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x403f
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x5b00
movq %rax, 0x28(%rsp)
jmp 0x3efd
addq $0x88, %rsp
retq
nopl (%rax)
// File: renzibei[P]TSProxy/proxyserver.cpp
// Function: HostNode::readFromBuffer(unsigned char*, unsigned long)
ssize_t readFromBuffer(uint8_t *dst, size_t nbyte) {
        size_t limit = std::min(writeBuf.size(), nbyte);
        for(size_t i = 0; i < limit; ++i) {
            dst[i] = writeBuf[i];
        }
        return limit;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x10, %rdi
callq 0x5d10
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6fa0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x5db7
movq (%rsp), %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rsi
callq 0x7c40
movb (%rax), %dl
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x5d7a
movq 0x18(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: renzibei[P]TSProxy/utils.cpp
// Function: make_socket(unsigned short, int, int)
int make_socket(uint16_t port, int on, int bindToLoopback)
{
    int sock;
    struct sockaddr_in6 name;

    /* Create the socket. */    
    sock = socket(AF_INET6, SOCK_STREAM, 0);
    if (sock < 0)
    {
        LogHelper::log(Error, "failed to create socket, %s", strerror(errno));
        return -1;
    }

    // set reuseable
    int rc = setsockopt(sock, SOL_SOCKET,  SO_REUSEADDR,
                   (char *)&on, sizeof(on));
    if (rc < 0)
    {
        LogHelper::log(Error, "setsockopt() failed, %s", strerror(errno));
        close(sock);
        return -2;
    }

    /* Give the socket a name. */
    memset(&name, 0, sizeof(name));
    name.sin6_family = AF_INET6;
    name.sin6_port = htons (port);
    //   name.sin6_addr.s_addr = htonl (INADDR_ANY);
    
    if (bindToLoopback)
        memcpy(&name.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
    else
        memcpy(&name.sin6_addr, &in6addr_any, sizeof(in6addr_any));

    if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
    {
        LogHelper::log(Error, "Failed to bind, %s", strerror(errno));
        return -3;
    }

    return sock;
}

// Assembly:
subq $0x38, %rsp
movw %di, %ax
movw %ax, 0x32(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movl $0xa, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jge 0xc8fc
callq 0x2040
movl (%rax), %edi
callq 0x20e0
movq %rax, %rdx
xorl %edi, %edi
leaq 0x4122(%rip), %rsi      # 0x10a0a
movb $0x0, %al
callq 0x28f0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xca03
movl 0x24(%rsp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq 0x2c(%rsp), %rcx
movl $0x4, %r8d
callq 0x2380
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jge 0xc95a
callq 0x2040
movl (%rax), %edi
callq 0x20e0
movq %rax, %rdx
xorl %edi, %edi
leaq 0x40e9(%rip), %rsi      # 0x10a26
movb $0x0, %al
callq 0x28f0
movl 0x24(%rsp), %edi
callq 0x23a0
movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE
jmp 0xca03
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2140
movw $0xa, 0x8(%rsp)
movzwl 0x32(%rsp), %edi
callq 0x2060
movw %ax, 0xa(%rsp)
cmpl $0x0, 0x28(%rsp)
je 0xc9a2
movq 0xa641(%rip), %rax      # 0x16fd0
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0xc9ba
movq 0xa637(%rip), %rax      # 0x16fe0
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %edi
leaq 0x8(%rsp), %rsi
movl $0x1c, %edx
callq 0x2070
cmpl $0x0, %eax
jge 0xc9fb
callq 0x2040
movl (%rax), %edi
callq 0x20e0
movq %rax, %rdx
xorl %edi, %edi
leaq 0x4054(%rip), %rsi      # 0x10a3e
movb $0x0, %al
callq 0x28f0
movl $0xfffffffd, 0x34(%rsp) # imm = 0xFFFFFFFD
jmp 0xca03
movl 0x24(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: renzibei[P]TSProxy/utils.cpp
// Function: readNBytes(int, void*, unsigned long, int)
ssize_t readNBytes(int fd, void *buf, size_t nbyte, int isNonBlocking) {
    size_t hasRead = 0;
    char* dest = (char*)buf;
    while(hasRead < nbyte) {
        ssize_t tempLen = recv(fd, dest + hasRead, nbyte - hasRead, 0);
        if(tempLen < 0) {
            if (isNonBlocking && errno == EAGAIN) {
                continue;
            }
            LogHelper::log(Error, "Error happens when read fd , errno: %d %s", errno, strerror(errno));
            return -1;
        }
        if(isNonBlocking && tempLen == 0) {
            LogHelper::log(Error, "Connection has been closed in sockFd %d when tried to recv", fd);
            return hasRead;
        }
        hasRead += tempLen;
        
    }
    
    return hasRead;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x3c(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0xcb04
movl 0x3c(%rsp), %edi
movq 0x10(%rsp), %rsi
addq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x20d0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jge 0xcac1
cmpl $0x0, 0x24(%rsp)
je 0xca88
callq 0x2040
cmpl $0xb, (%rax)
jne 0xca88
jmp 0xca39
callq 0x2040
movl (%rax), %eax
movl %eax, 0x4(%rsp)
callq 0x2040
movl (%rax), %edi
callq 0x20e0
movl 0x4(%rsp), %edx
movq %rax, %rcx
xorl %edi, %edi
leaq 0x3fa2(%rip), %rsi      # 0x10a51
movb $0x0, %al
callq 0x28f0
movq $-0x1, 0x40(%rsp)
jmp 0xcb0e
cmpl $0x0, 0x24(%rsp)
je 0xcaf0
cmpq $0x0, 0x8(%rsp)
jne 0xcaf0
movl 0x3c(%rsp), %edx
xorl %edi, %edi
leaq 0x3f9e(%rip), %rsi      # 0x10a7b
movb $0x0, %al
callq 0x28f0
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xcb0e
movq 0x8(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0xca39
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: renzibei[P]TSProxy/utils.cpp
// Function: writeNBytes(int, void const*, unsigned long, int)
ssize_t writeNBytes(int fd, const void *buf, size_t nbyte, int isNonBlocking) {
    size_t hasWritten = 0;
    const char* src = (const char*)buf;
    

    while(hasWritten < nbyte) {
        ssize_t tempLen = send(fd, src + hasWritten, nbyte - hasWritten, 0);
        if(tempLen < 0) {
            if (isNonBlocking && errno == EAGAIN) {
                continue;
            }
            LogHelper::log(Error, "Errors when write fd, fd: %d, %s", fd, strerror(errno));
            return -1;
        }
        if (isNonBlocking && tempLen == 0) {
            LogHelper::log(Error, "Connection has been closed in sockFd %d when tried to send", fd);
            return hasWritten;
        }
        hasWritten += tempLen;
    }
    return hasWritten;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x3c(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0xcc11
movl 0x3c(%rsp), %edi
movq 0x10(%rsp), %rsi
addq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2120
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jge 0xcbce
cmpl $0x0, 0x24(%rsp)
je 0xcb98
callq 0x2040
cmpl $0xb, (%rax)
jne 0xcb98
jmp 0xcb49
movl 0x3c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x2040
movl (%rax), %edi
callq 0x20e0
movl 0x4(%rsp), %edx
movq %rax, %rcx
xorl %edi, %edi
leaq 0x3efa(%rip), %rsi      # 0x10ab6
movb $0x0, %al
callq 0x28f0
movq $-0x1, 0x40(%rsp)
jmp 0xcc1b
cmpl $0x0, 0x24(%rsp)
je 0xcbfd
cmpq $0x0, 0x8(%rsp)
jne 0xcbfd
movl 0x3c(%rsp), %edx
xorl %edi, %edi
leaq 0x3eed(%rip), %rsi      # 0x10ad7
movb $0x0, %al
callq 0x28f0
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xcc1b
movq 0x8(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0xcb49
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: renzibei[P]TSProxy/utils.cpp
// Function: disAssembleInnerMsg(InnerMsg*, unsigned char const*, unsigned long)
int disAssembleInnerMsg(InnerMsg *msg ,const uint8_t *src_data, size_t nbyte) {
    // memset(msg, 0, sizeof(InnerMsg));
    if (nbyte < sizeof(msg->cSeq) + sizeof(msg->sSeq) + sizeof(msg->msgType) + sizeof(msg->dataLength) ) {
        LogHelper::log(Warn, "nbyte less than InnerMsg header, nbyte: %lu", nbyte); 
        return -1;
    }
    ntoh_copy8bytes(&(msg->cSeq), src_data); src_data += sizeof(msg->cSeq);
    ntoh_copy8bytes(&(msg->sSeq), src_data); src_data += sizeof(msg->sSeq);
    ntoh_copy2bytes(&(msg->msgType), src_data); src_data += sizeof(msg->msgType);
    ntoh_copy2bytes(&(msg->dataLength), src_data); src_data += sizeof(msg->dataLength);
    memcpy(msg->data, src_data, msg->dataLength);
    return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
cmpq $0x14, 0x8(%rsp)
jae 0xcc70
movq 0x8(%rsp), %rdx
movl $0x1, %edi
leaq 0x3eb6(%rip), %rsi      # 0x10b12
movb $0x0, %al
callq 0x28f0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0xcd31
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0xcd40
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0xcd40
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzwl (%rax), %edi
callq 0x2390
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, 0x10(%rax)
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzwl (%rax), %edi
callq 0x2390
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, 0x12(%rax)
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
addq $0x14, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
movzwl 0x12(%rax), %eax
movl %eax, %edx
callq 0x2180
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: renzibei[P]TSProxy/utils.cpp
// Function: assembleInnerMsg(unsigned char*, unsigned long, InnerMsg const*)
ssize_t assembleInnerMsg(uint8_t *dst, size_t buffer_size, const InnerMsg *src_msg) {
    uint8_t *old_dst = dst;
    if (buffer_size < sizeof(src_msg->cSeq) + sizeof(src_msg->sSeq) + sizeof(src_msg->msgType) + sizeof(src_msg->dataLength)) {
        LogHelper::log(Warn, "buffer size less than inner msg header, buffer_size: %lu");
        return -1;
    }
    hton_copy8bytes(dst, &(src_msg->cSeq)); dst += sizeof(src_msg->cSeq);
    hton_copy8bytes(dst, &(src_msg->sSeq)); dst += sizeof(src_msg->sSeq);
    hton_copy2bytes(dst, &(src_msg->msgType)); dst += sizeof(src_msg->msgType);
    hton_copy2bytes(dst, &(src_msg->dataLength)); dst += sizeof(src_msg->dataLength);
    buffer_size -= sizeof(src_msg->cSeq) + sizeof(src_msg->sSeq) + sizeof(src_msg->dataLength);
    if (buffer_size < src_msg->dataLength) {
        LogHelper::log(Warn, "buffer size less than InnerMsg dataLength, buffer_size: %lu, dataLength: %lu", buffer_size, src_msg->dataLength);
        return -2;
    }
    memcpy(dst, src_msg->data, src_msg->dataLength); dst += src_msg->dataLength;
    return dst - old_dst; 
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x14, 0x10(%rsp)
jae 0xd085
movl $0x1, %edi
leaq 0x3baa(%rip), %rsi      # 0x10c1a
movb $0x0, %al
callq 0x28f0
movq $-0x1, 0x20(%rsp)
jmp 0xd1b5
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xcd40
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xcd40
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x10(%rax), %edi
callq 0x2060
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, (%rax)
movq 0x18(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x12(%rax), %edi
callq 0x2060
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, (%rax)
movq 0x18(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
subq $0x12, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movzwl 0x12(%rcx), %ecx
cmpq %rcx, %rax
jae 0xd16d
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
movzwl 0x12(%rax), %ecx
movl $0x1, %edi
leaq 0x3af8(%rip), %rsi      # 0x10c53
movb $0x0, %al
callq 0x28f0
movq $-0x2, 0x20(%rsp)
jmp 0xd1b5
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x14, %rsi
movq 0x8(%rsp), %rax
movzwl 0x12(%rax), %eax
movl %eax, %edx
callq 0x2180
movq 0x8(%rsp), %rax
movzwl 0x12(%rax), %ecx
movq 0x18(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: renzibei[P]TSProxy/utils.cpp
// Function: getRand63()
uint64_t getRand63() {
    uint64_t ret = 0;
    for (int i = 0; i < 63; ++i) {
        ret = (ret << 1) + (rand() & 1);
    }
    ret &= 0x7fffffffffffffffULL;
    return ret;
}

// Assembly:
subq $0x18, %rsp
movq $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x3f, 0xc(%rsp)
jge 0xd89e
movq 0x10(%rsp), %rax
shlq %rax
movq %rax, (%rsp)
callq 0x20a0
movl %eax, %ecx
movq (%rsp), %rax
andl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xd865
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
andq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: renzibei[P]TSProxy/constants.cpp
// Function: constants::getKey(char (&) [16])
int getKey(char (&dst)[16]) {
    // uuid_t id;
    if (hasParsedKey == 0) {
        int code = uuid_parse(constants::uuidKey, storedId);
        if (code != 0)
            return code;
        hasParsedKey = 1;
    }
    memcpy(dst, storedId, 16);
    return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpl $0x0, 0xb9be0(%rip)     # 0xc74b0
jne 0xd904
leaq 0x3617(%rip), %rdi      # 0x10ef0
leaq 0xb9be0(%rip), %rsi     # 0xc74c0
callq 0x2330
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0xd8fa
movl 0x4(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0xd926
movl $0x1, 0xb9bac(%rip)     # 0xc74b0
movq 0x8(%rsp), %rax
movq 0xb9bb0(%rip), %rcx     # 0xc74c0
movq %rcx, (%rax)
movq 0xb9bae(%rip), %rcx     # 0xc74c8
movq %rcx, 0x8(%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop