LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Teris45[P]Maze-Game/HighScore.cpp
// Function: HighScore::toStr()
char* HighScore::toStr() {
    string str;
    for(int i=0;i<5;i++){
        if(score[i]==-1) {
            continue;
        }
        else {
            if (str.empty()) {
                str = name[i].name + to_string(score[i]) + "\n";
                cout<<str;
            }
            else {
                string str2;
                str2 = name[i].name + to_string(score[i]) + "\n";
                str.append(str2);
            }
        }
    }

    cout<<str;

    char *writeable = new char[str.size() + 1];
    copy(str.begin(),str.end(),writeable);
    writeable[str.size()] = '\0';
    return writeable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %r12
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq -0x98(%rbp), %r15
movq %rdi, -0x58(%rbp)
cmpq $0x5, %r14
je 0x5426
movq -0x58(%rbp), %rax
movl 0x34(%rax,%r14,4), %esi
cmpl $-0x1, %esi
je 0x541a
cmpq $0x0, -0x48(%rbp)
je 0x53aa
movq %r12, -0x30(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
andq $0x0, -0x70(%rbp)
movb $0x0, -0x68(%rbp)
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
callq 0x54fb
leaq -0x98(%rbp), %r15
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %rbx, %rdx
callq 0x5584
leaq -0xd8(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
leaq 0xd42(%rip), %rdx       # 0x60a2
callq 0x555b
leaq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x2280
movq %r13, %rdi
callq 0x2120
movq %r15, %rdi
callq 0x2120
leaq -0xb8(%rbp), %rdi
callq 0x2120
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x23e0
movq %r12, %rdi
callq 0x2120
movq -0x30(%rbp), %r12
jmp 0x541a
movq %r15, %rdi
callq 0x54fb
leaq -0xd8(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x5584
leaq -0x78(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0xcca(%rip), %rdx       # 0x60a2
callq 0x555b
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2280
movq %r15, %rdi
callq 0x2120
movq %r13, %rdi
callq 0x2120
leaq -0x98(%rbp), %r15
movq %r15, %rdi
callq 0x2120
movq 0x4bc6(%rip), %rdi      # 0x9fd8
movq %rbx, %rsi
callq 0x21c0
incq %r14
addq $0xa, %r12
jmp 0x52eb
movq 0x4bab(%rip), %rdi      # 0x9fd8
leaq -0x50(%rbp), %rsi
callq 0x21c0
movq -0x48(%rbp), %rbx
leaq 0x1(%rbx), %rdi
callq 0x2030
movq %rax, %r14
testq %rbx, %rbx
je 0x545a
movq -0x50(%rbp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21a0
movb $0x0, (%r14,%rbx)
leaq -0x50(%rbp), %rdi
callq 0x2120
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54a0
jmp 0x54a0
jmp 0x54a0
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x2120
jmp 0x5497
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x54d0
movq %rax, %rbx
jmp 0x54d5
movq %rax, %rbx
jmp 0x54c0
jmp 0x54ac
movq %rax, %rbx
jmp 0x54cc
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x2120
leaq -0xb8(%rbp), %rdi
callq 0x2120
leaq -0x78(%rbp), %rdi
callq 0x2120
leaq -0x50(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/tests/test_mymodel.cpp
// Function: test_mymodel()
void test_mymodel() {
	float* input = (float*)malloc(sizeof(float) * 1 * 3 * 224 * 224);
	LoadFromFile("../models/my_testmodel/input.dat", (char*)input);

	Model model;
	float* output;
	output = model.Run(input);

	int out_shape[4];
	unsigned long size;
	model.GetOutputShape(out_shape);
	// size = out_shape[0] * out_shape[1] * out_shape[2] * out_shape[3];
	size = out_shape[0] * out_shape[1];
	SaveToFile("../outputs/my_testmodel/output.dat", (char*)output, size * sizeof(float));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl $0x93000, %edi          # imm = 0x93000
callq 0x2210
movq %rax, %rbx
leaq 0x3a99(%rip), %rdi      # 0x6004
movq %rax, %rsi
xorl %edx, %edx
callq 0x443a
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x25ea
movq %r14, %rdi
movq %rbx, %rsi
callq 0x288e
movq -0x30(%rbp), %rcx
movq 0xc(%rcx), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
imull %ecx, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
leaq 0x3a79(%rip), %rdi      # 0x6025
movq %rax, %rsi
callq 0x489c
leaq -0x50(%rbp), %rdi
callq 0x2a8e
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x25c8
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2a8e
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/tests/test_mymodel.cpp
// Function: Model::~Model()
~Model() {
		delete conv1, conv2, conv3;
		delete fc1, fc2;
		delete elt;
		delete cat;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x2aa8
movq %r14, %rdi
callq 0x2afe
movl $0x80, %esi
movq %r14, %rdi
callq 0x2170
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x2ac6
movq %r14, %rdi
callq 0x2b20
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x2170
movq 0x30(%rbx), %rdi
pushq $0x48
popq %rsi
callq 0x2170
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x2aee
movq %rbx, %rdi
callq 0x2b42
pushq $0x60
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/./include/Convolution.h
// Function: Convolution::~Convolution()
~Convolution() { 
		if (weight_data != nullptr) 
			free(weight_data); 
		if (bias_data != nullptr)
			free(bias_data);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
callq 0x21c0
movq 0x70(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/./include/FullyConnection.h
// Function: FullyConnection::~FullyConnection()
~FullyConnection(){
		if (weight_data != nullptr)
			free(weight_data);
		if (bias_data != nullptr)
			free(bias_data);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x21c0
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/./include/Concat.h
// Function: Concat::~Concat()
~Concat(){
		// Free in_shape
		while (!in_shape.empty()) {
			free(in_shape.back());
			in_shape.pop_back();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq %rax, (%rbx)
je 0x2b6b
movq -0x8(%rax), %rdi
callq 0x21c0
movq 0x8(%rbx), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rbx)
jmp 0x2b4f
leaq 0x28(%rbx), %rdi
callq 0x2b82
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2bde
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/Concat.cpp
// Function: Concat::Concat(int*, ...)
Concat::Concat(int ishape[], ...) {
	va_list ap;
	int cnt = 0;
	int *temp;

	// First arg
	va_start(ap, ishape);
	temp = (int*)malloc(sizeof(int) * 4);
	memcpy(temp, ishape, sizeof(int) * 4);
	in_shape.push_back(temp);
	memcpy(out_shape, ishape, sizeof(int) * 4);
	cnt++;

	// Other args
	while(nullptr != (ishape=va_arg(ap, int*))){
		// Push into vector
		temp = (int*)malloc(sizeof(int) * 4);
		memcpy(temp, ishape, sizeof(int) * 4);
		in_shape.push_back(temp);

		// Check if shapes match
		if ((temp[0] != out_shape[0]) || (temp[2] != out_shape[2]) || (temp[3] != out_shape[3])) {
			cerr << "Concat: shapes of input not match." << endl;
			exit(1);
		}

		// Update out_channels and counter
		out_shape[1] += temp[1];
		cnt++;
	}
	va_end(ap);

	out_chw = out_shape[1] * out_shape[2] * out_shape[3];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq -0x100(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2c7d
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
andq $0x0, 0x28(%rbx)
andl $0x0, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
andl $0x0, 0x40(%rbx)
movq %rsi, %r14
andq $0x0, 0x48(%rbx)
andq $0x0, 0x58(%rbx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
pushq $0x10
popq %rdi
callq 0x2210
leaq -0x30(%rbp), %rsi
movq %rax, (%rsi)
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq %rbx, %rdi
callq 0x3062
leaq 0x18(%rbx), %r12
movups (%r14), %xmm0
movups %xmm0, 0x18(%rbx)
pushq $0x10
popq %r14
leaq -0x30(%rbp), %r15
movl -0x50(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x2d0b
movq %rcx, %rax
addq -0x40(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x2d17
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %r13
testq %r13, %r13
je 0x2d62
movq %r14, %rdi
callq 0x2210
movq %rax, -0x30(%rbp)
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3062
movq -0x30(%rbp), %rax
movl (%rax), %ecx
cmpl (%r12), %ecx
jne 0x2d82
movl 0x8(%rax), %ecx
cmpl 0x20(%rbx), %ecx
jne 0x2d82
movl 0xc(%rax), %ecx
cmpl 0x24(%rbx), %ecx
jne 0x2d82
movl 0x4(%rax), %eax
addl %eax, 0x1c(%rbx)
jmp 0x2cf3
movl 0x20(%rbx), %eax
imull 0x1c(%rbx), %eax
imull 0x24(%rbx), %eax
movl %eax, 0x50(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6267(%rip), %rdi      # 0x8ff0
leaq 0x3500(%rip), %rsi      # 0x6290
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
jmp 0x2da7
movq %rax, %r14
leaq 0x28(%rbx), %rdi
callq 0x2b82
movq %rbx, %rdi
callq 0x2bde
movq %r14, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/Concat.cpp
// Function: Concat::Run(float*, ...)
float* Concat::Run(float* in_data, ...) {
	va_list ap;
	
	int offset = 0;
	int *ishape;
	int input_size;
	int idx_input = 0;
	int cnt = 0;

	out_data = (float*)malloc(sizeof(float) * out_shape[0] * out_chw);

	va_start(ap, in_data);
	while (cnt++ < in_shape.size()) {
		for (int idx_bs = 0; idx_bs < out_shape[0]; idx_bs++) {
			ishape = in_shape[idx_input];
			input_size = ishape[1] * ishape[2] * ishape[3];
			memcpy(out_data + idx_bs * out_chw + offset, in_data, sizeof(float) * input_size);
			offset += input_size;

			if (!keep_in[idx_input])
				free(in_data);
		}
		idx_input++;

		// Next input
		in_data = va_arg(ap, float*);
	}
	va_end(ap);

	if (idx_input != in_shape.size()) {
		cerr << "Concat: run failed" << endl;
		exit(1);
	}

	return out_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
leaq -0x110(%rbp), %r14
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x2e2c
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movslq 0x18(%rdi), %rax
movslq 0x50(%rdi), %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x2210
movq %rax, 0x58(%rbx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r14, -0x40(%rbp)
leaq 0x28(%rbx), %rax
movq %rax, -0x60(%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x2f32
leaq 0x1(%r12), %rax
movq %rax, -0x58(%rbp)
xorl %r15d, %r15d
cmpl 0x18(%rbx), %r15d
jge 0x2efe
movq (%rbx), %rax
movq (%rax,%r12,8), %rax
movslq 0x4(%rax), %rcx
movslq 0x8(%rax), %rdx
imulq %rcx, %rdx
movslq 0x50(%rbx), %rcx
movslq %r15d, %rsi
imulq %rcx, %rsi
movslq 0xc(%rax), %r14
shlq $0x2, %rsi
addq 0x58(%rbx), %rsi
imulq %rdx, %r14
movslq %r13d, %rax
leaq (%rsi,%rax,4), %rdi
leaq (,%r14,4), %rdx
movq -0x30(%rbp), %rsi
callq 0x2110
movq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x3086
testq %rdx, (%rax)
jne 0x2ef3
movq -0x30(%rbp), %rdi
callq 0x21c0
addl %r13d, %r14d
incl %r15d
movl %r14d, %r13d
jmp 0x2e8d
movl -0x50(%rbp), %ecx
cmpq $0x29, %rcx
jae 0x2f16
movq %rcx, %rax
addq -0x40(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x2f22
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x58(%rbp), %r12
jmp 0x2e6d
movl %r12d, %eax
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jne 0x2f5b
movq 0x58(%rbx), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x608e(%rip), %rdi      # 0x8ff0
leaq 0x334a(%rip), %rsi      # 0x62b3
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/Concat.cpp
// Function: Concat::SetKeepOrNot(bool, ...)
int Concat::SetKeepOrNot(bool keep, ...) {
	va_list ap;

	keep_in.clear();
	va_start(ap, keep);
	for (int i = 0; i < in_shape.size(); i++) {
		keep_in.push_back(keep);
		// ‘bool’ is promoted to ‘int’ when passed through ‘...’
		// so you should pass ‘int’ not ‘bool’ to ‘va_arg’
		keep = va_arg(ap, int);
	}
	va_end(ap);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2fd5
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq 0x28(%rbx), %rax
movq %rax, 0x38(%rbx)
andl $0x0, 0x40(%rbx)
leaq 0x28(%rbx), %r14
movq %rdi, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x3051
movzbl %sil, %esi
andl $0x1, %esi
movq %r14, %rdi
callq 0x30a8
movl -0x30(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x3039
movq %rcx, %rax
addq -0x20(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x30(%rbp)
jmp 0x3045
movq -0x28(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
cmpl $0x0, (%rax)
setne %sil
incq %r15
jmp 0x3002
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/Eltwise.cpp
// Function: Eltwise::Eltwise(char const*, int*, bool)
Eltwise::Eltwise(const char* t, int ishape[], bool with_relu) : with_relu(with_relu) {
	elt_t = t;

	memcpy(in_shape, ishape, sizeof(int) * 4);
	memcpy(out_shape, ishape, sizeof(int) * 4);

	out_w = ishape[3];
	out_hw = ishape[2] * out_w;
	out_chw = ishape[1] * out_hw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $0x0, 0x38(%rdi)
movb %cl, 0x40(%rdi)
movq %rsi, (%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x8(%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rdi)
movl 0xc(%rdx), %eax
movl %eax, 0x28(%rdi)
imull 0x8(%rdx), %eax
movl %eax, 0x2c(%rdi)
imull 0x4(%rdx), %eax
movl %eax, 0x30(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/FullyConnection.cpp
// Function: FullyConnection::FullyConnection(int, int*, bool, bool, bool)
FullyConnection::FullyConnection(int out_num, int ishape[], bool with_relu, bool wiht_bias, bool flatten) 
		: out_num(out_num), with_relu(with_relu), with_bias(with_bias){
	if (flatten) {
		in_shape[0] = ishape[0];
		in_shape[1] = ishape[1] * ishape[2] * ishape[3];
	} else {
		in_shape[0] = ishape[0];
		in_shape[1] = ishape[1];
	}

	out_shape[0] = ishape[0];
	out_shape[1] = out_num;

	weight_data = (float*)malloc(sizeof(float) * in_shape[1] * out_shape[1]);
	if (wiht_bias)
		bias_data = (float*)malloc(sizeof(float) * out_num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %r14d
movq %rdi, %rbx
movl %esi, (%rdi)
movb %cl, 0x14(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
andq $0x0, 0x28(%rdi)
movl (%rdx), %eax
movl %eax, 0x4(%rdi)
movl 0x4(%rdx), %eax
testl %r9d, %r9d
je 0x3d3e
imull 0x8(%rdx), %eax
imull 0xc(%rdx), %eax
movl %eax, 0x8(%rbx)
movl (%rdx), %ecx
movl %ecx, 0xc(%rbx)
movl %esi, 0x10(%rbx)
movslq %eax, %rdi
movslq %esi, %r15
shlq $0x2, %r15
imulq %r15, %rdi
callq 0x2210
movq %rax, 0x18(%rbx)
testb %r14b, %r14b
je 0x3d71
movq %r15, %rdi
callq 0x2210
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/FullyConnection.cpp
// Function: FullyConnection::Run(float*, bool)
float* FullyConnection::Run(float* in_data, bool keep_in) {
	float dat, wt, result;

	out_data = (float*)malloc(sizeof(float) * out_shape[0] * out_shape[1]);

	for (int idx_bs = 0; idx_bs < out_shape[0]; idx_bs++) {
		for (int idx_out = 0; idx_out < out_shape[1]; idx_out++) {
			result = 0.;
			for (int idx_in = 0; idx_in < in_shape[1]; idx_in++) {
				dat = in_data[idx_bs * in_shape[0] + idx_in];
				wt = weight_data[idx_out * in_shape[1] + idx_in];
				result += dat * wt;
			}
			if (with_bias)
				result += bias_data[idx_out];
			if (with_relu && result < 0)
				result = 0;
			out_data[idx_bs * out_shape[1] + idx_out] = result;
		}
	}

	if (!keep_in)
		free(in_data);

	return out_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x34(%rbp)
movq %rsi, %r12
movq %rdi, %r14
movslq 0xc(%rdi), %rbx
movslq 0x10(%rdi), %r15
movq %rbx, %rdi
imulq %r15, %rdi
shlq $0x2, %rdi
callq 0x2210
movq %rax, -0x30(%rbp)
movq %rax, 0x28(%r14)
movslq 0x8(%r14), %rcx
movslq 0x4(%r14), %rdx
movq 0x18(%r14), %rax
movq %rax, -0x50(%rbp)
movb 0x14(%r14), %dil
movb 0x15(%r14), %r8b
xorl %r9d, %r9d
testl %ecx, %ecx
movl $0x0, %r10d
cmovgl %ecx, %r10d
testl %r15d, %r15d
movl $0x0, %r11d
movq %r15, -0x58(%rbp)
cmovgl %r15d, %r11d
testl %ebx, %ebx
movl $0x0, %r13d
cmovgl %ebx, %r13d
movq %r14, -0x48(%rbp)
movq 0x20(%r14), %r15
shlq $0x2, %rcx
shlq $0x2, %rdx
movq %r12, -0x40(%rbp)
movq %r12, %r14
cmpq %r13, %r9
je 0x3e82
movq %r9, %rax
imulq -0x58(%rbp), %rax
movq -0x30(%rbp), %rsi
leaq (%rsi,%rax,4), %rbx
movq -0x50(%rbp), %rsi
xorl %r12d, %r12d
cmpq %r11, %r12
je 0x3e7a
xorps %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %r10
je 0x3e50
movss (%r14,%rax,4), %xmm1
mulss (%rsi,%rax,4), %xmm1
addss %xmm1, %xmm0
incq %rax
jmp 0x3e37
testb $0x1, %r8b
je 0x3e5c
addss (%r15,%r12,4), %xmm0
testb $0x1, %dil
je 0x3e6c
xorps %xmm1, %xmm1
maxss %xmm0, %xmm1
movaps %xmm1, %xmm0
movss %xmm0, (%rbx,%r12,4)
incq %r12
addq %rcx, %rsi
jmp 0x3e2d
incq %r9
addq %rdx, %r14
jmp 0x3e11
cmpb $0x0, -0x34(%rbp)
jne 0x3e9d
movq -0x40(%rbp), %rdi
callq 0x21c0
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, (%rdi)
movl %ecx, 0x4(%rdi)
movl %r8d, 0x8(%rdi)
movl 0x4(%r9), %r10d
movl %r10d, 0xc(%rdi)
andq $0x0, 0x48(%rdi)
movq %rsi, 0x50(%rdi)
xorl %eax, %eax
cmpq $0x4, %rax
je 0x3f4f
movl (%r9,%rax,4), %esi
movl %esi, 0x10(%rdi,%rax,4)
incq %rax
jmp 0x3f3c
movl 0xc(%r9), %eax
movl %eax, 0x38(%rdi)
imull 0x8(%r9), %eax
movl %eax, 0x34(%rdi)
imull 0x4(%r9), %eax
movl %eax, 0x30(%rdi)
movl (%r9), %eax
movl %eax, 0x20(%rdi)
movl %r10d, 0x24(%rdi)
addl %r8d, %r8d
subl %edx, %r8d
movl 0x8(%r9), %eax
addl %r8d, %eax
cltd
idivl %ecx
movl %eax, %esi
incl %esi
movl %esi, 0x28(%rdi)
addl 0xc(%r9), %r8d
movl %r8d, %eax
cltd
idivl %ecx
incl %eax
movl %eax, 0x2c(%rdi)
movl %eax, 0x44(%rdi)
imull %esi, %eax
movl %eax, 0x40(%rdi)
imull %r10d, %eax
movl %eax, 0x3c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x493e
cmpl $-0x1, %eax
je 0x439c
testl %eax, %eax
je 0x436b
cmpl $0x1, %eax
jne 0x43c0
pushq $0x8
popq %r15
xorl %r14d, %r14d
subl $0x1, %r15d
jb 0x43a0
addb %r14b, %r14b
movq %rbx, %rdi
callq 0x493e
addb %r14b, %al
movl %eax, %r14d
jmp 0x4352
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4328
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4328
movq %rax, %rbx
pushq $0x18
popq %rdi
callq 0x2160
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
orl $-0x1, 0x10(%rax)
jmp 0x43b5
xorl %eax, %eax
jmp 0x43b5
pushq $0x18
popq %rdi
callq 0x2160
movzbl %r14b, %ecx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl %ecx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4c29(%rip), %rdi      # 0x8ff0
leaq 0x1f93(%rip), %rsi      # 0x6361
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4486
movq %rdx, %r15
movq %rdx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4f1c
movq %r15, %rdi
movq %r14, %rsi
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ff6
leaq -0x238(%rbp), %r15
pushq $0xc
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x22d0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x218(%rbp,%rax)
je 0x44f6
movq 0x4b3d(%rip), %rdi      # 0x8ff0
leaq 0x1ec2(%rip), %rsi      # 0x637c
callq 0x2140
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
movq %rax, %rdi
callq 0x20c0
xorl %r14d, %r14d
leaq -0x238(%rbp), %rdi
callq 0x2060
movq %r14, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
leaq -0x29(%rbp), %r12
pushq $0x1
popq %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x44d5
movb -0x29(%rbp), %al
movb %al, (%rbx,%r14)
incq %r14
jmp 0x4501
jmp 0x452b
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
leaq 0x1f1c(%rip), %rsi      # 0x646c
callq 0x21b0
testq %rax, %rax
je 0x4585
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x21a0
movq %rbx, %rdi
callq 0x2030
movq %rax, %r14
movq %rbx, %rdi
callq 0x2150
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x4a64(%rip), %rdi      # 0x8ff0
leaq 0x1dfc(%rip), %rsi      # 0x638f
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/helper.cpp
// Function: LoadFromHuffmanFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<unsigned char, std::allocator<unsigned char>>&, TarFile*)
unsigned long LoadFromHuffmanFile(string prefix, vector<unsigned char> &dst, TarFile* tarfile) {
	string data = prefix + ".hf.dat";
	string codebook = prefix + ".hfcb.dat";
	int cnt = 0;

	Tree* huffman_tree = DecodeHuffmanCodebook(codebook.c_str(), tarfile);
	Tree* ptr = huffman_tree;
	Bit accessor(data.c_str(), tarfile);
	int bit;
	while ((bit = accessor.Next()) != -1) {
		if (0 == bit) {
			ptr = ptr->left;
		} else if (1 == bit) {
			ptr = ptr->right;
		} else {
			cerr << "LoadFromHuffmanFile: unknown bit" << endl;
			exit(1);
		}

		if (-1 != ptr->value) {
			dst.push_back(ptr->value);
			cnt++;
			ptr = huffman_tree;
		}
	}

	delete huffman_tree;
	return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1de4(%rip), %rdx      # 0x63ad
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x4a2f
leaq 0x1dd6(%rip), %rdx      # 0x63b5
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x4a2f
movq -0x70(%rbp), %rdi
movq %r15, %rsi
callq 0x43e3
movq %rax, %r12
movq -0x90(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %r15, %rdx
callq 0x4998
xorl %r13d, %r13d
leaq -0x50(%rbp), %r15
movq %r12, %r14
movq %r15, %rdi
callq 0x493e
testl %eax, %eax
je 0x462c
cmpl $0x1, %eax
jne 0x464c
addq $0x8, %r14
movq (%r14), %r14
movl 0x10(%r14), %eax
cmpl $-0x1, %eax
je 0x4617
movb %al, -0x29(%rbp)
movq %rbx, %rdi
leaq -0x29(%rbp), %rsi
callq 0x4aae
incl %r13d
jmp 0x4614
cmpl $-0x1, %eax
jne 0x469c
testq %r12, %r12
je 0x465e
movq %r12, %rdi
callq 0x4a68
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x2170
movl %r13d, %ebx
leaq -0x50(%rbp), %rdi
callq 0x4a18
leaq -0x70(%rbp), %rdi
callq 0x20b0
leaq -0x90(%rbp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x494d(%rip), %rdi      # 0x8ff0
leaq 0x1d15(%rip), %rsi      # 0x63bf
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
jmp 0x46c1
movq %rax, %rbx
jmp 0x46d9
movq %rax, %rbx
jmp 0x46e2
jmp 0x46cd
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4a18
leaq -0x70(%rbp), %rdi
callq 0x20b0
leaq -0x90(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/hey-yahei[P]ConvNet/src/helper.cpp
// Function: LoadFromSparseHuffmanFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char*, TarFile*)
unsigned long LoadFromSparseHuffmanFile(string prefix, char* dst, TarFile* tarfile) {
	string data_path = prefix + ".data";
	string index_path = prefix + ".index";

	vector<unsigned char> index, data;
	LoadFromHuffmanFile(index_path, index, tarfile);
	LoadFromHuffmanFile(data_path, data, tarfile);
	unsigned long size = index.size();
	if (size != data.size()) {
		cerr << "LoadFromSparseHuffmanFile: size not match" << endl;
		exit(1);
	}

	index[0]--;
	for (int i = 0; i < size; i++) {
		dst += index[i];
		*dst = data[i];
	}
	return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1cca(%rip), %rdx      # 0x63e0
leaq -0xd0(%rbp), %rdi
movq %r15, %rsi
callq 0x4a2f
leaq 0x1cba(%rip), %rdx      # 0x63e6
leaq -0xb0(%rbp), %rdi
movq %r15, %rsi
callq 0x4a2f
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movaps %xmm0, -0x30(%rbp)
andq $0x0, -0x20(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x2220
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x45a8
leaq -0x90(%rbp), %rdi
callq 0x20b0
leaq -0x70(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2220
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0x45a8
leaq -0x70(%rbp), %rdi
callq 0x20b0
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %r14
subq %rax, %r14
movq -0x28(%rbp), %rcx
subq -0x30(%rbp), %rcx
cmpq %rcx, %r14
jne 0x4823
decb (%rax)
movq -0x50(%rbp), %rax
xorl %ecx, %ecx
movq -0x30(%rbp), %rdx
cmpq %rcx, %r14
je 0x47e8
movzbl (%rax,%rcx), %esi
movb (%rdx,%rcx), %dil
movb %dil, (%rbx,%rsi)
addq %rsi, %rbx
incq %rcx
jmp 0x47cf
leaq -0x30(%rbp), %rdi
callq 0x4c3e
leaq -0x50(%rbp), %rdi
callq 0x4c3e
leaq -0xb0(%rbp), %rdi
callq 0x20b0
leaq -0xd0(%rbp), %rdi
callq 0x20b0
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x47c6(%rip), %rdi      # 0x8ff0
leaq 0x1bbc(%rip), %rsi      # 0x63ed
callq 0x2140
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rdi
callq 0x21d0
jmp 0x4867
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
jmp 0x485b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x20b0
jmp 0x486a
movq %rax, %rbx
jmp 0x4888
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4c3e
leaq -0x50(%rbp), %rdi
callq 0x4c3e
leaq -0xb0(%rbp), %rdi
callq 0x20b0
leaq -0xd0(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq -0x218(%rbp), %r15
pushq $0x14
popq %rdx
movq %r15, %rdi
callq 0x2190
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f8(%rbp,%rax)
je 0x48f7
movq 0x4711(%rip), %rdi      # 0x8ff0
leaq 0x1b31(%rip), %rsi      # 0x6417
callq 0x2140
movq %rax, %rdi
callq 0x20c0
xorl %ebx, %ebx
jmp 0x4909
leaq -0x218(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2200
leaq -0x218(%rbp), %rdi
callq 0x2260
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x2260
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x8(%rdi), %rcx
movslq 0x10(%rdi), %rsi
addq (%rdi), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rsi, %rcx
jae 0x4997
decq %rsi
movl 0x14(%rdi), %edx
cmpq %rsi, %rcx
jne 0x4968
movl 0x18(%rdi), %esi
addl %edx, %esi
cmpl $0x7, %esi
jg 0x4997
pushq %rbp
movq %rsp, %rbp
movzbl (%rcx), %esi
leal 0x1(%rdx), %eax
movl %eax, 0x14(%rdi)
movb $0x7, %al
subb %dl, %al
movzbl %al, %r8d
xorl %eax, %eax
btl %r8d, %esi
setb %al
cmpl $0x7, %edx
jl 0x4996
andl $0x0, 0x14(%rdi)
incq %rcx
movq %rcx, 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, (%rdi)
testq %rdx, %rdx
je 0x49c1
movq %r15, %rdi
movq %r14, %rsi
callq 0x4ff6
jmp 0x49c9
movq %r14, %rdi
callq 0x4542
movl %eax, 0x10(%rbx)
movslq %eax, %rdi
callq 0x2040
movq %rax, (%rbx)
testq %r15, %r15
je 0x49ec
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4f1c
jmp 0x49f9
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x443a
movq (%rbx), %rax
movzbl (%rax), %ecx
movl %ecx, 0x18(%rbx)
incq %rax
movq %rax, 0x8(%rbx)
andl $0x0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
andq $0x0, 0x50(%rbx)
callq 0x50a8
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x4c9b
movq %rax, 0x30(%rbx)
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x4ca9
movq %rax, 0x48(%rbx)
leaq 0x1780(%rip), %rsi      # 0x6430
movq %r14, %rdi
callq 0x21b0
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4cde
callq 0x2150
andq $0x0, (%rbx)
leaq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x50a8
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x4cf8
movq %rax, 0x30(%rbx)
leaq 0x28(%rbx), %r15
leaq 0x40(%rbx), %rdi
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x4d0e
movq %rax, 0x48(%rbx)
callq 0x51fe
movq %r15, %rdi
callq 0x51fe
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50b6
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdi, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x18(%r15), %rax
subq 0x10(%r15), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x4fce
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq -0x40(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x510a
movq 0x10(%r15), %rdi
addq %r14, %rdi
movq %r13, %rsi
callq 0x2050
movl %eax, %r13d
testl %eax, %eax
jne 0x4fb5
movq (%r15), %rdi
movq 0x28(%r15), %rax
movslq (%rax,%r12,8), %rbx
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
xorl %edx, %edx
callq 0x21a0
movq (%r15), %rcx
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
pushq $0x1
popq %rdx
callq 0x2270
movq (%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
movb $0x1, %bl
leaq -0x60(%rbp), %rdi
callq 0x20b0
incq %r12
addq $0x20, %r14
testl %r13d, %r13d
jne 0x4f40
andb $0x1, %bl
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
xorl %r12d, %r12d
leaq -0x60(%rbp), %r15
xorl %ebx, %ebx
movq $0x0, -0x38(%rbp)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x5076
movq %r15, %rdi
movq -0x40(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x510a
movq 0x10(%r14), %rdi
addq %r12, %rdi
movq %r15, %rsi
callq 0x2050
movl %eax, %r13d
testl %eax, %eax
jne 0x5062
movq 0x28(%r14), %rax
movq (%rax,%rbx,8), %rax
movq %rax, -0x38(%rbp)
movq %r15, %rdi
callq 0x20b0
incq %rbx
addq $0x20, %r12
testl %r13d, %r13d
jne 0x501f
movq -0x38(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
subq $0x1d68, %rsp           # imm = 0x1D68
movq %rdi, %r14
movw $0x100, 0x8(%rdi)       # imm = 0x100
andq $0x0, 0x10(%rdi)
orq $-0x1, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
leaq 0x25d939(%rip), %rax    # 0x371518
movq %rax, (%rdi)
leaq 0x28(%rdi), %rbx
movq %rbx, %rdi
callq 0x1150e4
xorps %xmm0, %xmm0
movhps 0x12d410(%rip), %xmm0   # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, 0x13b0(%r14)
leaq 0x9e0(%rsp), %r14
movq %r14, %rdi
callq 0x1150ee
leaq 0x20(%rsp), %rdi
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdx
callq 0x115143
leaq 0x9e0(%rsp), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x115172
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1151e0
leaq 0x8(%rsp), %rdi
callq 0x1155b4
leaq 0x9e0(%rsp), %rdi
callq 0x11525a
addq $0x1d68, %rsp           # imm = 0x1D68
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1155b4
jmp 0x113c7c
jmp 0x113c79
movq %rax, %rbx
leaq 0x9e0(%rsp), %rdi
callq 0x11525a
movq %rbx, %rdi
callq 0x111340
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2687
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x2, %edi
jle 0x2699
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %r14
movl %edi, %ebx
testl %edi, %edi
je 0x26b0
cmpl $0x1, %ebx
jne 0x26cc
leaq 0x495f(%rip), %rdi      # 0x700d
jmp 0x26b7
leaq 0x494d(%rip), %rdi      # 0x7004
movq 0x991a(%rip), %rax      # 0xbfd8
movq (%rax), %rcx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x98e0(%rip), %r15      # 0xbfd8
movq (%r15), %rdi
movq %r14, %rsi
callq 0x2280
cmpl $0x1, %ebx
jbe 0x2718
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2230
jmp 0x268c
movq (%r15), %rcx
leaq 0x48f4(%rip), %rdi      # 0x7016
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
jmp 0x2708
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0xc(%rsp), %rsi
movl %edi, (%rsi)
movq %rcx, %rdi
callq 0x473a
movq (%rax), %r12
leaq 0x198e8(%rip), %rdi     # 0x1c220
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x2130
movq (%r12), %rax
movq 0x8(%r12), %rcx
incq %rcx
movq %rcx, 0x8(%r12)
movq %rax, 0x198c4(%rip)     # 0x1c220
movq %rcx, 0x198c5(%rip)     # 0x1c228
movw %bp, 0x198c6(%rip)      # 0x1c230
cmpq $0xffed, %rbx           # imm = 0xFFED
jb 0x298b
leaq 0x4854(%rip), %rsi      # 0x71ce
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x262c
pushq $-0x1
popq %rbx
jmp 0x29e2
movw %bx, 0x198a0(%rip)      # 0x1c232
leaq 0x19887(%rip), %r15     # 0x1c220
leaq 0x19894(%rip), %rdi     # 0x1c234
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2160
movl 0xc(%rsp), %edi
pushq $0x1
popq %rdx
movq %r15, %rsi
callq 0x5d93
testq %rax, %rax
js 0x29cf
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x21a0
movq %rax, 0x10(%r12)
jmp 0x29e2
movq %rax, %rbx
leaq 0x4826(%rip), %rsi      # 0x71ff
xorl %edi, %edi
xorl %eax, %eax
callq 0x262c
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/renzibei[P]TSProxy/proxyserver.cpp
// Function: recvData(int, unsigned char*, unsigned long, std::unordered_map<int, ClientNode*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, ClientNode*>>>&, unsigned char*)
int recvData(int sockFd, uint8_t *dst, size_t bufferSize, ClientMap &cMap, uint8_t *msgTypePtr = NULL) {
    static InnerMsg innerMsg;
    memset(&innerMsg, 0, sizeof(innerMsg));
    ClientNode *node = cMap[sockFd];
    ssize_t recvCode = recvTSPacket(sockFd, &innerMsg, constants::serverNonBlocking);
    if (recvCode < 0) {
        LogHelper::log(Error, "Fail to recv data");
        return recvCode;
    }
    
    if (innerMsg.cSeq != node->cSeq + 1 ) {
        LogHelper::log(Error, "Fail to recv data, seq error, cSeq: %llu, expected: %llu", innerMsg.cSeq, node->cSeq + 1);
        return -2;
    }
    if (innerMsg.msgType != 4 && innerMsg.msgType != 6 && innerMsg.msgType != 8) {
        LogHelper::log(Error, "Fail to recv data, msgType error, recv type :%d, expected: 4", innerMsg.msgType);
        return -3;
    }
    if (msgTypePtr != NULL) {
        *msgTypePtr = innerMsg.msgType;
    }
    if (innerMsg.dataLength > bufferSize) {
        LogHelper::log(Error, "Fail to recv data, bufferSize not enought, bufferSize :%lu, expected: %lu", bufferSize, innerMsg.dataLength);
        return -4;
    }
    memcpy(dst, innerMsg.data, innerMsg.dataLength);
    node->cSeq = innerMsg.cSeq;
    node->lastTime = time(NULL);
    return innerMsg.dataLength;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
leaq 0x14(%rsp), %r13
movl %edi, (%r13)
leaq 0x29803(%rip), %rbp     # 0x2c220
movl $0x10000, %edx          # imm = 0x10000
movq %rbp, %rdi
xorl %esi, %esi
callq 0x2130
movq %r12, %rdi
movq %r13, %rsi
callq 0x473a
movq (%rax), %r14
movl (%r13), %edi
pushq $0x1
popq %rdx
movq %rbp, %rsi
callq 0x5f11
testq %rax, %rax
js 0x2aa9
movq 0x297cb(%rip), %rdx     # 0x2c220
movq (%r14), %rcx
incq %rcx
cmpq %rcx, %rdx
jne 0x2abe
movzwl 0x297c9(%rip), %edx     # 0x2c230
cmpl $0x8, %edx
ja 0x2b17
movl $0x150, %eax            # imm = 0x150
btl %edx, %eax
jae 0x2b17
testq %r15, %r15
je 0x2a86
movb %dl, (%r15)
movzwl 0x297a5(%rip), %ecx     # 0x2c232
cmpq %rbx, %rcx
jbe 0x2ae4
leaq 0x4800(%rip), %rsi      # 0x7299
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x262c
pushq $-0x4
jmp 0x2ad0
movq %rax, %r12
leaq 0x475e(%rip), %rsi      # 0x7211
xorl %edi, %edi
xorl %eax, %eax
callq 0x262c
jmp 0x2ad2
leaq 0x475e(%rip), %rsi      # 0x7223
xorl %edi, %edi
xorl %eax, %eax
callq 0x262c
pushq $-0x2
popq %r12
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29749(%rip), %rsi     # 0x2c234
movq 0x8(%rsp), %rdi
movq %rcx, %rdx
callq 0x2160
movq 0x29721(%rip), %rax     # 0x2c220
movq %rax, (%r14)
xorl %edi, %edi
callq 0x21a0
movq %rax, 0x10(%r14)
movzwl 0x2971d(%rip), %r12d    # 0x2c232
jmp 0x2ad2
leaq 0x473e(%rip), %rsi      # 0x725c
xorl %edi, %edi
xorl %eax, %eax
callq 0x262c
pushq $-0x3
jmp 0x2ad0