LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::SetLinebreak(int)
void IconSys::SetLinebreak(int lb) {
	if(lb > 32) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER,
									 "Linebreak exceeds character limit" ) );
	}
	File.offset_2nd_line = static_cast<unsigned short>(lb * 2);
	GetTitleString(decoded_title, File.offset_2nd_line, title_str);
	strcpy(title_str_single_line, title_str);
	char* tmp = strchr(title_str_single_line, '\n');
	if(tmp) { *tmp = ' '; }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x21, %esi
jge 0x5180
movq %rdi, %rbx
addl %esi, %esi
movw %si, 0x6(%rdi)
addq $0x3c4, %rdi            # imm = 0x3C4
movzwl %si, %esi
leaq 0x3e6(%rbx), %r14
movq %r14, %rdx
callq 0x4cda
addq $0x409, %rbx            # imm = 0x409
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20a0
testq %rax, %rax
je 0x5178
movb $0x20, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
leaq 0x50ec(%rip), %rdx      # 0xa280
movq %rax, %rdi
movl $0x3, %esi
callq 0x8330
leaq 0x9be8(%rip), %rsi      # 0xed90
leaq 0x31ad(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::WriteFile(char const*)
void IconSys::WriteFile(const char * fname) {
	std::ofstream fout(fname, std::ios_base::out | std::ios_base::binary);
	if(fout.fail()) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED,
			                         "Error opening output file for icon.sys") );
	}
	fout.seekp(std::ios::beg);

	//write data:
	fout.write( reinterpret_cast<char*>(&File), sizeof(File) );
	if(fout.fail()) {
		fout.close();
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED,
			                         "Error writing output file for icon.sys") );
	}
	fout.close();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x14, %edx
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x55e0
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2200
leaq 0x8(%rsp), %rdi
movl $0x3c4, %edx            # imm = 0x3C4
movq %rbx, %rsi
callq 0x2260
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x55e9
leaq 0x8(%rsp), %rdi
callq 0x2290
movq 0x9a1e(%rip), %rax      # 0xefc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x2150
leaq 0x100(%rsp), %rdi
callq 0x2080
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
leaq 0x4cbb(%rip), %rbx      # 0xa2a2
jmp 0x55fa
leaq 0x8(%rsp), %rdi
callq 0x2290
leaq 0x4ccf(%rip), %rbx      # 0xa2c9
movl $0x18, %edi
callq 0x20e0
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x8330
leaq 0x9772(%rip), %rsi      # 0xed90
leaq 0x2d37(%rip), %rdx      # 0x835c
movq %r14, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22b0
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::CheckRanges()
void IconSys::IconSys_Color::CheckRanges() {
	if(R < 0)   { R = 0; }
	if(R > 255) { R = 255; }
	if(G < 0)   { G = 0; }
	if(G > 255) { G = 255; }
	if(B < 0)   { B = 0; }
	if(B > 255) { B = 255; }
	if(X < 0)   { X = 0; }
	if(X > 255) { X = 255; }
}

// Assembly:
movl (%rdi), %ecx
testl %ecx, %ecx
js 0x5673
movl $0xff, %eax
cmpl $0x100, %ecx            # imm = 0x100
jae 0x5675
jmp 0x5677
xorl %eax, %eax
movl %eax, (%rdi)
movl 0x4(%rdi), %ecx
testl %ecx, %ecx
js 0x568d
movl $0xff, %eax
cmpl $0x100, %ecx            # imm = 0x100
jae 0x568f
jmp 0x5692
xorl %eax, %eax
movl %eax, 0x4(%rdi)
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
js 0x56a8
movl $0xff, %eax
cmpl $0x100, %ecx            # imm = 0x100
jae 0x56aa
jmp 0x56ad
xorl %eax, %eax
movl %eax, 0x8(%rdi)
movl 0xc(%rdi), %ecx
testl %ecx, %ecx
js 0x56c2
movl $0xff, %eax
cmpl $0x100, %ecx            # imm = 0x100
jae 0x56c4
retq
xorl %eax, %eax
movl %eax, 0xc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::CheckRanges()
void IconSys::IconSys_LightColor::CheckRanges() {
	if(R < 0.0f) { R = 0.0f; }
	if(R > 1.0f) { R = 1.0f; }
	if(G < 0.0f) { G = 0.0f; }
	if(G > 1.0f) { G = 1.0f; }
	if(B < 0.0f) { B = 0.0f; }
	if(B > 1.0f) { B = 1.0f; }
	if(X < 0.0f) { X = 0.0f; }
	if(X > 1.0f) { X = 1.0f; }
}

// Assembly:
movss (%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x57ff
movss 0x4a16(%rip), %xmm0     # 0xa210
ucomiss %xmm0, %xmm1
jbe 0x5803
movss %xmm0, (%rdi)
movss 0x4(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x581d
movss 0x49f8(%rip), %xmm0     # 0xa210
ucomiss %xmm0, %xmm1
jbe 0x5822
movss %xmm0, 0x4(%rdi)
movss 0x8(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x583c
movss 0x49d9(%rip), %xmm0     # 0xa210
ucomiss %xmm0, %xmm1
jbe 0x5841
movss %xmm0, 0x8(%rdi)
movss 0xc(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x585b
movss 0x49ba(%rip), %xmm0     # 0xa210
ucomiss %xmm0, %xmm1
jbe 0x5860
movss %xmm0, 0xc(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::PS2Icon(char const*)
PS2Icon::PS2Icon(const char *fname): vertices(NULL), normals(NULL), vert_texture(NULL),
fvertices(NULL), fnormals(NULL), animation(NULL), anim_keys(NULL)
{
	std::ifstream fin(fname, std::ios_base::in | std::ios_base::binary);
	if(fin.fail()) { throw( Ghulbus::gbException(Ghulbus::gbException::GB_FAILED,
	                                             "Could not open icon file for read") ); }
	//read icon data from file:
	try {
		ReadFile(fin);
	} catch(std::exception) {
		fin.close();
		throw;
	}
	fin.close();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x38(%rdi)
movups %xmm0, 0x58(%rdi)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0xc, %edx
callq 0x2370
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0x5ab0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5b52
leaq 0x10(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x2060
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
leaq 0x4754(%rip), %rdx      # 0xa218
movq %rax, %rdi
movl $0x1, %esi
callq 0x8330
leaq 0x92b8(%rip), %rsi      # 0xed90
leaq 0x287d(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
jmp 0x5b20
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x5b3f
movq %rbx, %rdi
callq 0x2230
movq 0x94d0(%rip), %rax      # 0xefd0
addq $0x10, %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x20b0
leaq 0x10(%rsp), %rdi
callq 0x2050
callq 0x22a0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x23a0
callq 0x2300
jmp 0x5b3f
movq %rax, %rdi
callq 0x7088
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::PS2Icon()
PS2Icon::PS2Icon(): vertices(NULL), normals(NULL), vert_texture(NULL), 
fvertices(NULL), fnormals(NULL), animation(NULL), anim_keys(NULL)
{
	header.file_id          = 0x010000;
	header.animation_shapes = 1;
	header.texture_type     = 0x07;
	header.reserved         = 0x3F800000;
	header.n_vertices       = 0;
	
	anim_header.id_tag       = 1;
	anim_header.frame_length = 31;
	anim_header.anim_speed   = 1.0f;
	anim_header.play_offset  = 0;
	anim_header.n_frames     = 0;
	
	memset(texture, 0, sizeof(unsigned int)*16384);
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x38(%rdi)
movups %xmm0, 0x58(%rdi)
movaps 0x4338(%rip), %xmm0     # 0xa300
movups %xmm0, (%rdi)
xorl %eax, %eax
movl %eax, 0x10(%rdi)
movaps 0x4339(%rip), %xmm0     # 0xa310
movups %xmm0, 0x40(%rdi)
movl %eax, 0x50(%rdi)
addq $0x68, %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
jmp 0x2100
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::AllocateVertexMemory()
void PS2Icon::AllocateVertexMemory() 
{
	//helper function that reallocates all per-vertex storage fields based 
	//on the information stored in the header struct
	if(vertices)     { delete[] vertices;          vertices = NULL; }
	if(fvertices)    { delete[] fvertices;        fvertices = NULL; }
	if(normals)      { delete[] normals;            normals = NULL; }
	if(fnormals)     { delete[] fnormals;          fnormals = NULL; }
	if(vert_texture) { delete[] vert_texture;  vert_texture = NULL; }
	vertices     = new Vertex_Coord[header.n_vertices * header.animation_shapes];
	fvertices    = new        float[header.n_vertices * header.animation_shapes * 3];
	normals      = new Vertex_Coord[header.n_vertices];
	fnormals     = new        float[header.n_vertices * 3];
	vert_texture = new Texture_Data[header.n_vertices];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x600c
callq 0x2250
movq $0x0, 0x18(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x6022
callq 0x2250
movq $0x0, 0x30(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x6038
callq 0x2250
movq $0x0, 0x20(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x604e
callq 0x2250
movq $0x0, 0x38(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x6064
callq 0x2250
movq $0x0, 0x28(%rbx)
movl 0x10(%rbx), %r15d
movl 0x4(%rbx), %r14d
imull %r15d, %r14d
leaq (,%r14,8), %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
leal (%r14,%r14,2), %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
movq %r15, %r14
shlq $0x3, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
leal (%r15,%r15,2), %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, 0x38(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x28(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::BuildMesh(OBJ_Mesh*)
void PS2Icon::BuildMesh(OBJ_Mesh* mesh) {
	float* tf = new float[header.n_vertices*3];
	this->GetVertexData(tf, 0);
	mesh->SetGeometry(tf, header.n_vertices*3);
	delete[] tf;
	mesh->SetNormals(fnormals, header.n_vertices*3);
	
	mesh->ClearTextureData();
	float tmp;
	for(unsigned int i=0; i<header.n_vertices; i++) {
		//texture data has to be converted by hand (2D -> 3D)
		tmp = convert_f16_to_f32(vert_texture[i].f16_u);
		mesh->AddTextureData(&tmp, 1);
		tmp = convert_f16_to_f32(vert_texture[i].f16_v);
		mesh->AddTextureData(&tmp, 1);
		tmp = 0.0f;
		mesh->AddTextureData(&tmp, 1);
	}

	mesh->ClearFaceData();
	OBJ_Mesh::Face face;
	for(unsigned int i=0; i<header.n_vertices/3; i++) {
		//face indices are calculated straightforward
		///@todo: vertex recycling?
		face.vert1 = face.normal1 = face.texture1 = i*3;
		face.vert2 = face.normal2 = face.texture2 = i*3 + 1;
		face.vert3 = face.normal3 = face.texture3 = i*3 + 2;

		face.smoothing_group = 1;
		mesh->AddFaceData(&face, 1);
	}		
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %eax
leal (%rax,%rax,2), %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x66e0
movl 0x10(%r14), %eax
leal (%rax,%rax,2), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7232
movq %r15, %rdi
callq 0x2250
movq 0x38(%r14), %rsi
movl 0x10(%r14), %eax
leal (%rax,%rax,2), %edx
movq %rbx, %rdi
callq 0x72aa
movq %rbx, %rdi
callq 0x4316
cmpl $0x0, 0x10(%r14)
je 0x6650
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
movq 0x28(%r14), %rax
movswl (%rax,%r12,8), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0x3d11(%rip), %xmm1     # 0xa2f0
mulss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x7320
movq 0x28(%r14), %rax
movswl 0x2(%rax,%r12,8), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x3cde(%rip), %xmm0     # 0xa2f0
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x7320
movl $0x0, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x7320
incq %r12
movl 0x10(%r14), %eax
cmpq %rax, %r12
jb 0x65c7
movq %rbx, %rdi
callq 0x4326
cmpl $0x3, 0x10(%r14)
jb 0x66d1
xorl %ebp, %ebp
movl $0x2, %r12d
leaq 0x10(%rsp), %r15
movl $0xaaaaaaab, %r13d      # imm = 0xAAAAAAAB
leal -0x2(%r12), %eax
movl %eax, 0x28(%rsp)
movl %eax, 0x1c(%rsp)
movl %eax, 0x10(%rsp)
leal -0x1(%r12), %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0x20(%rsp)
movl %eax, 0x14(%rsp)
movl %r12d, 0x30(%rsp)
movl %r12d, 0x24(%rsp)
movl %r12d, 0x18(%rsp)
movl $0x1, 0x34(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x3e8c
incl %ebp
movl 0x10(%r14), %eax
imulq %r13, %rax
shrq $0x21, %rax
addl $0x3, %r12d
cmpl %eax, %ebp
jb 0x6672
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetVertexData(float*, int) const
void PS2Icon::GetVertexData(float* data, int shape) const {
	if(shape >= static_cast<int>(header.animation_shapes)) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) ); 
	}
	if(shape >= 0) {	//copy specified shape
		for(unsigned int i=0; i<header.n_vertices; i++) {
			data[i*3]     = fvertices[(i*header.animation_shapes + shape) * 3];
			data[i*3 + 1] = fvertices[(i*header.animation_shapes + shape) * 3 + 1];
			data[i*3 + 2] = fvertices[(i*header.animation_shapes + shape) * 3 + 2];
		}
	} else {			//copy *all* shapes one after the other
		for(unsigned int j=0; j<header.animation_shapes; j++) {
			for(unsigned int i=0; i<header.n_vertices; i++) {
				data[j*header.n_vertices*3 + i*3]     = fvertices[(i*header.animation_shapes + j) * 3];
				data[j*header.n_vertices*3 + i*3 + 1] = fvertices[(i*header.animation_shapes + j) * 3 + 1];
				data[j*header.n_vertices*3 + i*3 + 2] = fvertices[(i*header.animation_shapes + j) * 3 + 2];
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rdi), %eax
cmpl %edx, %eax
jle 0x67f3
testl %edx, %edx
js 0x675f
movl 0x10(%rdi), %r8d
testq %r8, %r8
je 0x67e7
movq 0x30(%rdi), %rcx
leal (%rdx,%rdx,2), %edx
leal (%rax,%rax,2), %eax
leaq (%r8,%r8,2), %rdi
xorl %r8d, %r8d
movl %edx, %r9d
movss (%rcx,%r9,4), %xmm0
movl %r8d, %r9d
movss %xmm0, (%rsi,%r9,4)
leal 0x1(%rdx), %r9d
movss (%rcx,%r9,4), %xmm0
leal 0x1(%r8), %r9d
movss %xmm0, (%rsi,%r9,4)
leal 0x2(%rdx), %r9d
movss (%rcx,%r9,4), %xmm0
leal 0x2(%r8), %r9d
movss %xmm0, (%rsi,%r9,4)
addq $0x3, %r8
addl %eax, %edx
cmpq %r8, %rdi
jne 0x6715
jmp 0x67e7
testl %eax, %eax
je 0x67e7
movl 0x10(%rdi), %ecx
movq 0x30(%rdi), %rdx
leal (%rcx,%rcx,2), %edi
leal (%rax,%rax,2), %r8d
xorl %r9d, %r9d
movl $0x2, %r10d
movl $0x2, %r11d
movq %rcx, %rbx
movl %r10d, %r14d
movl %r11d, %r15d
testq %rcx, %rcx
je 0x67d8
leal -0x2(%r14), %r12d
movss (%rdx,%r12,4), %xmm0
leal -0x2(%r15), %r12d
movss %xmm0, (%rsi,%r12,4)
leal -0x1(%r14), %r12d
movss (%rdx,%r12,4), %xmm0
leal -0x1(%r15), %r12d
movss %xmm0, (%rsi,%r12,4)
movl %r14d, %r12d
movss (%rdx,%r12,4), %xmm0
movl %r15d, %r12d
movss %xmm0, (%rsi,%r12,4)
addl $0x3, %r15d
addl %r8d, %r14d
decq %rbx
jne 0x6792
incl %r9d
addl %edi, %r11d
addl $0x3, %r10d
cmpl %eax, %r9d
jne 0x6784
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
callq 0x831a
leaq 0x857c(%rip), %rsi      # 0xed90
leaq 0x1b41(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::~PS2Icon()
PS2Icon::~PS2Icon() 
{
	if(vertices)     { delete[] vertices;          vertices = NULL; }
	if(fvertices)    { delete[] fvertices;        fvertices = NULL; }
	if(normals)      { delete[] normals;            normals = NULL; }
	if(fnormals)     { delete[] fnormals;          fnormals = NULL; }
	if(vert_texture) { delete[] vert_texture;  vert_texture = NULL; }
	if(animation)    { delete[] animation;        animation = NULL; }
	if(anim_keys)    {
		for(unsigned int i=0; i<anim_header.n_frames; i++) {
			if(anim_keys[i]) {
				delete[] anim_keys[i];
				anim_keys[i] = NULL;
			}
		}
		delete[] anim_keys;
		anim_keys = NULL;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x6841
callq 0x2250
movq $0x0, 0x18(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x6857
callq 0x2250
movq $0x0, 0x30(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x686d
callq 0x2250
movq $0x0, 0x20(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x6883
callq 0x2250
movq $0x0, 0x38(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x6899
callq 0x2250
movq $0x0, 0x28(%rbx)
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x68af
callq 0x2250
movq $0x0, 0x58(%rbx)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x6903
movl 0x50(%rbx), %eax
testl %eax, %eax
je 0x68f6
xorl %r14d, %r14d
movq 0x60(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x68e3
callq 0x2250
movq 0x60(%rbx), %rax
movq $0x0, (%rax,%r14,8)
movl 0x50(%rbx), %eax
incq %r14
movl %eax, %ecx
cmpq %rcx, %r14
jb 0x68c2
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x68fb
callq 0x2250
movq $0x0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetFrameShape(int) const
int PS2Icon::GetFrameShape(int frame) const {
	if(static_cast<unsigned int>(frame) >= anim_header.n_frames) { 
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) ); 
	}
	if(animation[frame].shape_id > INT_MAX) { throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED ) ); }
	return static_cast<int>(animation[frame].shape_id);
}

// Assembly:
pushq %rbx
cmpl %esi, 0x50(%rdi)
jbe 0x69d0
movq 0x58(%rdi), %rax
movslq %esi, %rcx
movl (%rax,%rcx,8), %eax
testl %eax, %eax
js 0x69e7
popq %rbx
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
jmp 0x69fc
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
callq 0x831a
leaq 0x8388(%rip), %rsi      # 0xed90
leaq 0x194d(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetNFrameKeys(int) const
int PS2Icon::GetNFrameKeys(int frame) const {
	if(static_cast<unsigned int>(frame) >= anim_header.n_frames) { 
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) ); 
	}
	if(animation[frame].n_keys > INT_MAX) { throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED ) ); }
	return static_cast<int>(animation[frame].n_keys);
}

// Assembly:
pushq %rbx
cmpl %esi, 0x50(%rdi)
jbe 0x6a2f
movq 0x58(%rdi), %rax
movslq %esi, %rcx
movl 0x4(%rax,%rcx,8), %eax
testl %eax, %eax
js 0x6a46
popq %rbx
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
jmp 0x6a5b
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
callq 0x831a
leaq 0x8329(%rip), %rsi      # 0xed90
leaq 0x18ee(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetFrameKeyTime(int, int) const
float PS2Icon::GetFrameKeyTime(int frame, int key) const {
	if((static_cast<unsigned int>(frame) >= anim_header.n_frames) ||
	   (static_cast<unsigned int>(key) >= animation[frame].n_keys) ) {
		   throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );;
	}
	return anim_keys[frame][key].time;
}

// Assembly:
cmpl %esi, 0x50(%rdi)
jbe 0x6a99
movq 0x58(%rdi), %rcx
movslq %esi, %rax
cmpl %edx, 0x4(%rcx,%rax,8)
jbe 0x6a99
movq 0x60(%rdi), %rcx
movq (%rcx,%rax,8), %rax
movslq %edx, %rcx
movss (%rax,%rcx,8), %xmm0
retq
pushq %rbx
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
callq 0x831a
leaq 0x82d5(%rip), %rsi      # 0xed90
leaq 0x189a(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetFrameKeyValue(int, int) const
float PS2Icon::GetFrameKeyValue(int frame, int key) const {
	if((static_cast<unsigned int>(frame) >= anim_header.n_frames) ||
	   (static_cast<unsigned int>(key) >= animation[frame].n_keys) ) {
		   throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );
	}
	return anim_keys[frame][key].value;
}

// Assembly:
cmpl %esi, 0x50(%rdi)
jbe 0x6aee
movq 0x58(%rdi), %rcx
movslq %esi, %rax
cmpl %edx, 0x4(%rcx,%rax,8)
jbe 0x6aee
movq 0x60(%rdi), %rcx
movq (%rcx,%rax,8), %rax
movslq %edx, %rcx
movss 0x4(%rax,%rcx,8), %xmm0
retq
pushq %rbx
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
callq 0x831a
leaq 0x8280(%rip), %rsi      # 0xed90
leaq 0x1845(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::GetTextureData(unsigned int*, int) const
void PS2Icon::GetTextureData(unsigned int* data, int pitch) const {
	if((pitch < 512) || (pitch % 4 != 0)) { 
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );
	}
	for(int i=0; i<128; i++) {
		memcpy(&(data[i*(pitch>>2)]), &(texture[i*128]), sizeof(unsigned int)*128);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x200, %edx            # imm = 0x200
jl 0x6c3f
movl %edx, %eax
andl $0x3, %eax
jne 0x6c3f
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movl %edx, %r15d
xorl %r12d, %r12d
leaq (%r14,%r12), %rsi
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
callq 0x2140
addq %r15, %rbx
addq $0x200, %r12            # imm = 0x200
cmpq $0x10000, %r12          # imm = 0x10000
jne 0x6c0f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
callq 0x831a
leaq 0x8130(%rip), %rsi      # 0xed90
leaq 0x16f5(%rip), %rdx      # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/gbLib/src/gbImageLoader.cpp
// Function: GhulbusUtil::gbImageLoader::gbImageLoader(char const*, GhulbusUtil::gbImageLoader::gbImageType*)
gbImageLoader::gbImageLoader(char const* fname, gbImageType* img_type)
		:m_data(NULL), m_palette(NULL), m_width(0), m_height(0), m_bpp(0)
	{
		std::ifstream file( fname, std::ios_base::binary| std::ios_base::in );
		if( file.fail() ) {
			throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED,
				                         "Image file could not be opened" ) );
		}		
		if( !img_type->CheckFile(file) ) {
			throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED,
				                         "Image file seems to be corrupted" ) );
		}

		img_type->ReadFile(file, &m_width, &m_height, &m_bpp, &m_data, &m_palette);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0xc, %edx
callq 0x2370
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x7415
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *0x8(%rax)
testb %al, %al
je 0x741e
leaq 0x8(%rbx), %rax
leaq 0x10(%rbx), %rdx
leaq 0x14(%rbx), %rcx
leaq 0x18(%rbx), %r8
movq (%r14), %rsi
movq (%rsi), %r10
movq %rax, (%rsp)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %r9
callq *%r10
leaq 0x8(%rsp), %rdi
callq 0x2060
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2fc1(%rip), %rbx      # 0xa3dd
jmp 0x7425
leaq 0x2fd7(%rip), %rbx      # 0xa3fc
movl $0x18, %edi
callq 0x20e0
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x8330
leaq 0x7947(%rip), %rsi      # 0xed90
leaq 0xf0c(%rip), %rdx       # 0x835c
movq %r14, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/gbLib/src/gbImageLoader.cpp
// Function: GhulbusUtil::gbImageLoader::GetPaletteData(unsigned int*) const
void gbImageLoader::GetPaletteData(unsigned int* pPal) const {
		switch(m_bpp) {
			case 1:
				memcpy(pPal, m_palette, 2 * 4);
				break;
			case 4:
				memcpy(pPal, m_palette, 16 * 4);
				break;
			case 8:
				memcpy(pPal, m_palette, 256 * 4);
				break;
			default:
				throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED,
					                         "Unable to acquire palette data" ) );
				break;
		}
	}

// Assembly:
movl 0x18(%rdi), %eax
cmpl $0x8, %eax
je 0x7516
cmpl $0x4, %eax
je 0x74f3
cmpl $0x1, %eax
jne 0x752a
movq 0x8(%rdi), %rax
movq (%rax), %rax
movq %rax, (%rsi)
retq
movq 0x8(%rdi), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movups %xmm3, 0x30(%rsi)
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
retq
movq 0x8(%rdi), %rax
movl $0x400, %edx            # imm = 0x400
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x2140
pushq %rbx
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
leaq 0x2ede(%rip), %rdx      # 0xa41d
movq %rax, %rdi
movl $0x1, %esi
callq 0x8330
leaq 0x783d(%rip), %rsi      # 0xed90
leaq 0xe02(%rip), %rdx       # 0x835c
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/gbLib/src/gbImageLoader.cpp
// Function: GhulbusUtil::gbImageLoader::FlipV()
void gbImageLoader::FlipV() {
		int pitch;		//fields per row
		switch(m_bpp) {
			case 32: case 24: case 16: case 8: 
				pitch = (m_bpp / 8) * m_width;
				break;
			case 4: case 1:
				pitch = m_width;
				break;
			default:
				throw( Ghulbus::gbException( Ghulbus::gbException::GB_FAILED ) );
				break;
		}
		for(int row=0; row<(m_height/2); row++) {
			for(int i=0; i<pitch; i++) {
				m_data[row * pitch + i] ^= m_data[((m_height-1) - row) * pitch + i]
					^= m_data[row * pitch + i] ^= m_data[((m_height-1) - row) * pitch + i];
			}
		}
	}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl 0x18(%rdi), %eax
cmpq $0x20, %rax
ja 0x79b3
movabsq $0x101010100, %rcx      # imm = 0x101010100
btq %rax, %rcx
jae 0x7911
shrl $0x3, %eax
imull 0x10(%rdi), %eax
jmp 0x7923
movl $0x12, %ecx
btq %rax, %rcx
jae 0x79b3
movl 0x10(%rdi), %eax
movl 0x14(%rdi), %r9d
cmpl $0x2, %r9d
jl 0x79ac
movl %eax, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %esi, %esi
xorl %r8d, %r8d
testl %eax, %eax
jle 0x798f
movq %rsi, %r9
xorl %r10d, %r10d
movq (%rdi), %r11
movl 0x14(%rdi), %ebx
addl %edx, %ebx
imull %eax, %ebx
movslq %ebx, %rbx
addq %r11, %rbx
movb (%r11,%r9), %bpl
xorb (%r10,%rbx), %bpl
movb %bpl, (%r11,%r9)
movl 0x14(%rdi), %r11d
addl %edx, %r11d
imull %eax, %r11d
movslq %r11d, %r11
addq (%rdi), %r11
xorb (%r10,%r11), %bpl
movb %bpl, (%r10,%r11)
movq (%rdi), %r11
xorb %bpl, (%r11,%r9)
incq %r10
incq %r9
cmpq %r10, %rcx
jne 0x7943
movl 0x14(%rdi), %r9d
incq %r8
movl %r9d, %r10d
shrl $0x1f, %r10d
addl %r9d, %r10d
sarl %r10d
movslq %r10d, %r10
addq %rcx, %rsi
decl %edx
cmpq %r10, %r8
jl 0x7939
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x18, %edi
callq 0x20e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
callq 0x831a
leaq 0x73bc(%rip), %rsi      # 0xed90
leaq 0x981(%rip), %rdx       # 0x835c
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/gbLib/src/gbException.cpp
// Function: Ghulbus::gbException::operator=(Ghulbus::gbException const&)
gbException& gbException::operator=(gbException const& e) throw() {
		if(this != &e) {
			this->m_errorcode = e.m_errorcode;
			this->m_errorstring = e.m_errorstring;
		}
		return (*this);
	}

// Assembly:
movq %rdi, %rax
cmpq %rsi, %rdi
je 0x83bc
movl 0x8(%rsi), %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/obj_to_ps2icon.cpp
// Function: IsBMP(char const*)
bool IsBMP(char const* f)
{
	//check for .bmp ending:
	int len = static_cast<int>(strlen(f));
	if( (f[len-3] == 'B' || f[len-3] == 'b') && 
		(f[len-2] == 'M' || f[len-2] == 'm') && 
		(f[len-1] == 'P' || f[len-1] == 'p') ) {
			GhulbusUtil::gbImageType_BMP_T checker;
			std::ifstream tmp(f, std::ios_base::in | std::ios_base::binary);
			return checker.CheckFile(tmp);
	}
	return false;
}

// Assembly:
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rdi, %rbx
callq 0x20c0
shlq $0x20, %rax
movabsq $-0x300000000, %rcx     # imm = 0xFFFFFFFD00000000
addq %rax, %rcx
sarq $0x20, %rcx
movzbl (%rbx,%rcx), %ecx
orl $0x20, %ecx
cmpl $0x62, %ecx
jne 0x9203
movabsq $-0x200000000, %rcx     # imm = 0xFFFFFFFE00000000
addq %rax, %rcx
sarq $0x20, %rcx
movzbl (%rbx,%rcx), %ecx
orl $0x20, %ecx
cmpl $0x6d, %ecx
jne 0x9203
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rax
sarq $0x20, %rax
movzbl (%rbx,%rax), %eax
orl $0x20, %eax
cmpl $0x70, %eax
jne 0x9203
leaq 0x8(%rsp), %rdi
callq 0x7c9e
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
movl $0xc, %edx
callq 0x2370
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x7ce2
movl %eax, %ebx
leaq 0x18(%rsp), %rdi
callq 0x2060
leaq 0x8(%rsp), %rdi
callq 0x7cb0
jmp 0x9205
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x220, %rsp            # imm = 0x220
popq %rbx
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2060
jmp 0x9222
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7cb0
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/ticky[P]ps2iconsys/src/obj_to_ps2icon.cpp
// Function: main
int main(int argc, char* argv[])
{
	ParseCommandLine(argc, argv);

	if(!obj_input_file) {
		std::cout << "No input file specified." << std::endl << std::endl;
		PrintHelp(argv[0]);
		exit(1);
	}
	std::cout << "OBJ to PS2Icon Converter  V-1.0\n by Ghulbus Inc.  (http://www.ghulbus-inc.de/)\n" << std::endl;
	if((!list_obj_file) && (!ps2_output_file)) { ps2_output_file = "default.icn"; }

	OBJ_FileLoader* obj_file = LoadOBJFile();

	if(list_obj_file) {
		ListOBJFile(obj_file);
	}

	GhulbusUtil::gbImageLoader* img_loader = NULL;
	if(texture_input_file) {
		img_loader = LoadTexture();
	}
	
	if(ps2_output_file) {
		WriteOutputFile(obj_file, img_loader);
	}

	delete img_loader;
	delete obj_file;

	std::cout << "Success :)" << std::endl;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x89ab
cmpq $0x0, 0x58ab(%rip)      # 0xf260
je 0x9ad5
movq 0x5616(%rip), %rbx      # 0xefd8
leaq 0x13f5(%rip), %rsi      # 0xadbe
movl $0x4f, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
cmpb $0x0, 0x587d(%rip)      # 0xf281
jne 0x9a1e
cmpq $0x0, 0x5862(%rip)      # 0xf270
jne 0x9a1e
leaq 0xfda(%rip), %rax       # 0xa9f1
movq %rax, 0x5852(%rip)      # 0xf270
callq 0x8cdd
movq %rax, %r14
cmpb $0x1, 0x5854(%rip)      # 0xf281
jne 0x9a37
movq %r14, %rdi
callq 0x8f0a
cmpq $0x0, 0x5839(%rip)      # 0xf278
je 0x9a4b
callq 0x9234
movq %rax, %r15
jmp 0x9a4e
xorl %r15d, %r15d
cmpq $0x0, 0x581a(%rip)      # 0xf270
je 0x9a63
movq %r14, %rdi
movq %r15, %rsi
callq 0x949e
testq %r15, %r15
je 0x9a70
movq %r15, %rdi
callq 0x746e
movl $0x20, %esi
movq %r15, %rdi
callq 0x21d0
movq %r14, %rdi
callq 0x2d54
movl $0x18, %esi
movq %r14, %rdi
callq 0x21d0
leaq 0x1375(%rip), %rsi      # 0xae0e
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x54fc(%rip), %rdi      # 0xefd8
leaq 0x12c2(%rip), %rsi      # 0xada5
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rdi
callq 0x8454
movl $0x1, %edi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_client.cpp
// Function: chat_client<boost::asio::ip::tcp>::handle_connect(boost::system::error_code const&)
void handle_connect(const boost::system::error_code& error)
  {
    if (!error)
    {
      this->async_receive(&read_msg_,
          boost::bind(&chat_client::handle_read,
              this, boost::asio::placeholders::error));
    }
  }

// Assembly:
cmpb $0x0, 0x4(%rsi)
jne 0xd561
subq $0x78, %rsp
leaq 0x58(%rdi), %rcx
leaq 0x8(%rdi), %rdx
leaq 0x306f(%rip), %rsi      # 0x10564
leaq 0x18(%rsp), %rax
movq %rsi, 0x38(%rax)
xorl %r8d, %r8d
movq %r8, 0x40(%rax)
movq %rdi, 0x48(%rax)
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
movq $0x4, 0x10(%rax)
movq %r8, 0x18(%rax)
movl %r8d, 0x20(%rax)
leaq 0x311f(%rip), %rdx      # 0x10646
movq %rdx, 0x28(%rax)
movq %r8, 0x30(%rax)
movq %rcx, 0x50(%rax)
movq %rdi, 0x58(%rax)
leaq 0x8(%rsp), %rsi
movl %r8d, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0xe976(%rip), %rcx      # 0x1bec0
movq %rcx, 0x8(%rsi)
movq %rax, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x1072a
addq $0x78, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_client.cpp
// Function: chat_client<boost::asio::ip::tcp>::handle_read(boost::system::error_code const&)
void handle_read(const boost::system::error_code& error)
  {
    if (!error)
    {
      std::cout << ">> ";
      std::cout.write(read_msg_.body(), read_msg_.body_length());
      std::cout << "\n";
      this->async_receive(&read_msg_,
          boost::bind(&chat_client::handle_read,
              this, boost::asio::placeholders::error));
    }
    else
    {
      do_close();
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x4(%rsi)
je 0x1058b
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x117ac
movq 0xca26(%rip), %r14      # 0x1cfb8
leaq 0x30c7(%rip), %rsi      # 0x13660
movl $0x3, %edx
movq %r14, %rdi
callq 0x6380
leaq 0x58(%rbx), %r15
leaq 0x5c(%rbx), %rsi
movq 0x260(%rbx), %rdx
movq %r14, %rdi
callq 0x6410
leaq 0x2ad8(%rip), %rsi      # 0x1309c
movl $0x1, %edx
movq %r14, %rdi
callq 0x6380
leaq 0x8(%rbx), %rax
leaq -0x78(%rip), %rcx       # 0x10564
leaq 0x10(%rsp), %rdi
movq %rcx, 0x38(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x40(%rdi)
movq %rbx, 0x48(%rdi)
movq %rax, (%rdi)
movq %r15, 0x8(%rdi)
movq $0x4, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movl %ecx, 0x20(%rdi)
leaq 0x3a(%rip), %rax        # 0x10646
movq %rax, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movq %r15, 0x50(%rdi)
movq %rbx, 0x58(%rdi)
movq %rsp, %rsi
movl %ecx, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0xb894(%rip), %rax      # 0x1bec0
movq %rax, 0x8(%rsi)
xorl %edx, %edx
movl $0x1, %ecx
callq 0x1072a
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/./stream_msg_client.hpp
// Function: void stream_msg_client<chat_message, boost::asio::ip::tcp>::handle_read_header<boost::_bi::bind_t<void, boost::_mfi::mf1<void, chat_client<boost::asio::ip::tcp>, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<chat_client<boost::asio::ip::tcp>*>, boost::arg<1> (*)()>>>(chat_message*, boost::_bi::bind_t<void, boost::_mfi::mf1<void, chat_client<boost::asio::ip::tcp>, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<chat_client<boost::asio::ip::tcp>*>, boost::arg<1> (*)()>>, boost::system::error_code const&, unsigned long)
void handle_read_header(Message * msg, ReadHandler handler, const boost::system::error_code& error, std::size_t bytes_transferred)
  {
    if (!error && msg->decode_header())
    {
      boost::asio::async_read(socket_,
          boost::asio::buffer(msg->body(), msg->body_length()),
          handler);
    }
    else
    {
      handler(error);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
leaq 0x90(%rsp), %r13
cmpb $0x0, 0x4(%rdx)
jne 0x106fe
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
leaq 0x18(%rsp), %r12
movl %ebp, (%r12)
movb $0x0, 0x4(%r12)
movl $0x4, %edx
movq %r12, %rdi
callq 0x61f0
movq %r12, %rdi
callq 0x6500
cmpl $0x201, %eax            # imm = 0x201
cmovael %ebp, %eax
movq %rax, 0x208(%r14)
jae 0x106fe
addq $0x8, %r15
addq $0x4, %r14
movq 0x10(%r13), %rcx
leaq 0x18(%rsp), %rdi
movq %rcx, 0x38(%rdi)
movups (%r13), %xmm0
movups %xmm0, 0x28(%rdi)
movq %r15, (%rdi)
movq %r14, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movl %ebp, 0x20(%rdi)
leaq 0x8(%rsp), %rsi
movl %ebp, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0xb7d4(%rip), %rax      # 0x1bec0
movq %rax, 0x8(%rsi)
xorl %edx, %edx
movl $0x1, %ecx
callq 0x11102
jmp 0x1071b
movq (%r13), %rax
movq 0x10(%r13), %rdi
addq 0x8(%r13), %rdi
testb $0x1, %al
je 0x10716
movq (%rdi), %rcx
movq -0x1(%rcx,%rax), %rax
movq %rbx, %rsi
callq *%rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_client.cpp
// Function: chat_client<boost::asio::ip::tcp>::do_write(chat_message)
void do_write(chat_message msg)
  {
    bool write_in_progress = !write_msgs_.empty();
    write_msgs_.push_back(msg);
    if (!write_in_progress)
    {
      boost::asio::async_write(this->socket_,
          boost::asio::buffer(write_msgs_.front().data(),
            write_msgs_.front().length()),
          boost::bind(&chat_client::handle_write, this,
            boost::asio::placeholders::error));
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x70(%rsp), %rsi
movq 0x278(%rdi), %r15
movq 0x298(%rdi), %r14
movq $-0x210, %rax           # imm = 0xFDF0
addq 0x2a8(%rdi), %rax
cmpq %rax, %r14
je 0x11fca
movl $0x210, %edx            # imm = 0x210
movq %r14, %rdi
callq 0x6270
addq $0x210, 0x298(%rbx) # imm = 0x210
jmp 0x11fd6
leaq 0x268(%rbx), %rdi
callq 0x1228a
cmpq %r15, %r14
jne 0x1203d
leaq 0x8(%rbx), %rax
movq 0x278(%rbx), %rcx
movq 0x208(%rcx), %rdx
addq $0x4, %rdx
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movl %eax, 0x20(%rdi)
leaq 0x1dd(%rip), %rcx       # 0x121ee
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rbx, 0x38(%rdi)
movq %rsp, %rsi
movl %eax, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0x9e93(%rip), %rax      # 0x1bec0
movq %rax, 0x8(%rsi)
xorl %edx, %edx
movl $0x1, %ecx
callq 0x124b4
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_client.cpp
// Function: chat_client<boost::asio::ip::tcp>::handle_write(boost::system::error_code const&)
void handle_write(const boost::system::error_code& error)
  {
    if (!error)
    {
      write_msgs_.pop_front();
      if (!write_msgs_.empty())
      {
        boost::asio::async_write(this->socket_,
            boost::asio::buffer(write_msgs_.front().data(),
              write_msgs_.front().length()),
            boost::bind(&chat_client::handle_write, this,
              boost::asio::placeholders::error));
      }
    }
    else
    {
      do_close();
    }
  }

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x4(%rsi)
je 0x1220d
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x50, %rsp
popq %rbx
jmp 0x117ac
leaq 0x268(%rbx), %rdi
callq 0x12c24
movq 0x278(%rbx), %rax
cmpq %rax, 0x298(%rbx)
je 0x12284
leaq 0x8(%rbx), %rcx
movq 0x208(%rax), %rdx
addq $0x4, %rdx
leaq 0x10(%rsp), %rdi
movq %rcx, (%rdi)
movq %rax, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movl %eax, 0x20(%rdi)
leaq -0x6a(%rip), %rcx       # 0x121ee
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rbx, 0x38(%rdi)
movq %rsp, %rsi
movl %eax, (%rsi)
movb $0x0, 0x4(%rsi)
leaq 0x9c4c(%rip), %rax      # 0x1bec0
movq %rax, 0x8(%rsi)
xorl %edx, %edx
movl $0x1, %ecx
callq 0x124b4
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/matrix.h
// Function: std::ostream& efgy::math::operator<<<double, 3ul, 3ul, char>(std::basic_ostream<char, std::char_traits<char>>&, efgy::math::matrix<double, 3ul, 3ul> const&)
std::ostream &operator<<(std::basic_ostream<C> &stream,
                         const matrix<Q, n, m> &matrix) {
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < m; k++) {
      stream << matrix[i][k] << "\t";
    }
    stream << "\n";
  }
  return stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r13d, %r13d
leaq 0xf71a(%rip), %r15      # 0x14c26
leaq 0xecb5(%rip), %r12      # 0x141c8
xorl %ebp, %ebp
movsd (%r14,%rbp,8), %xmm0
movq %rbx, %rdi
callq 0x4360
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42a0
incq %rbp
cmpq $0x3, %rbp
jne 0x5515
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x42a0
incq %r13
addq $0x18, %r14
cmpq $0x3, %r13
jne 0x5513
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chenhn123[P]wdt_util_src/wdt_ct/w8755_funcs.cpp
// Function: wh_w8755_dev_exec_report_type_write(WdtDevice*, unsigned char, unsigned char*, int)
int wh_w8755_dev_exec_report_type_write(WDT_DEV* pdev, BYTE type, BYTE *pbuf, int size)
{
	W8755_WRITE_DATA write_data;

	if (!pdev || !pbuf)
		return 0;

	memset(&write_data, 0, sizeof(write_data));

	write_data.DD.rpt_id = W8755_RPTID_WRITE_DATA;
	write_data.DD.type = type;
	write_data.DD.size = size;

	memcpy(&write_data.DD.data[0], pbuf, size);

	if (g_func_dev_basic.p_wh_set_feature)
		return g_func_dev_basic.p_wh_set_feature(pdev, write_data.buffer, 4 + write_data.DD.size);		

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %ecx, %r14d
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x2a0d
movq %rdi, %rbx
leaq 0x4(%rsp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movb $0x8, -0x4(%rdi)
movb %sil, -0x3(%rdi)
movw %r14w, -0x2(%rdi)
movslq %r14d, %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x2150
cmpq $0x0, 0xe996(%rip)      # 0x11388
je 0x2a0d
cmpl $0x2, (%rbx)
jne 0x2a0d
movzwl %r14w, %edx
addl $0x4, %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x9a12
movl %eax, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chenhn123[P]wdt_util_src/wdt_ct/w8755_funcs.cpp
// Function: wh_w8755_dev_exec_set_report_read(WdtDevice*, unsigned char, unsigned char*, int)
int wh_w8755_dev_exec_set_report_read(WDT_DEV* pdev, BYTE type, BYTE *pbuf, int size)
{
	W8755_WRITE_DATA write_data;

	if (!pdev || !pbuf || !g_func_dev_basic.p_wh_set_feature)
		return 0;

	write_data.DD.rpt_id = W8755_RPTID_REQ_READ;	
	write_data.DD.type = type;
	write_data.DD.size = size;
	
	return g_func_dev_basic.p_wh_set_feature(pdev, write_data.buffer, 4);	
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x2a59
testq %rdx, %rdx
je 0x2a59
cmpq $0x0, 0xe95c(%rip)      # 0x11388
je 0x2a59
subq $0x48, %rsp
movb $0x6, 0x8(%rsp)
movb %sil, 0x9(%rsp)
movw %cx, 0xa(%rsp)
cmpl $0x2, (%rdi)
jne 0x2a55
leaq 0x8(%rsp), %rsi
movl $0x4, %edx
callq 0x9a12
addq $0x48, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chenhn123[P]wdt_util_src/wdt_ct/w8755_funcs.cpp
// Function: wh_w8755_dev_exec_get_report_read(WdtDevice*, unsigned char, unsigned char*, int)
int wh_w8755_dev_exec_get_report_read(WDT_DEV* pdev, BYTE type, BYTE *pbuf, int size)
{
	W8755_READ_DATA read_data;
	int retval;
	UINT32 read_checksum, calc_checksum;
	
	if (!pdev || !pbuf || !g_func_dev_basic.p_wh_get_feature)
		return 0;

	memset(&read_data.buffer[0], 0xff, 4);
	memset(&read_data.buffer[4], 0, 60);
			
	read_data.DD.rpt_id = W8755_RPTID_READ_DATA;
	read_data.DD.type = type;
	retval = g_func_dev_basic.p_wh_get_feature(pdev, read_data.buffer, 64);
	if (!retval)
		return 0;

	if (read_data.DD.rpt_id != W8755_RPTID_READ_DATA) {
		wh_printf("%s: wrong rpt_id\n", __func__);
		return 0;
	}
		
	read_checksum = read_data.DD.checksum;
	calc_checksum = 0;
	for (int i=0; i<60; i++)
		calc_checksum += read_data.DD.data[i];
		
	if (read_checksum != calc_checksum) {
		wh_printf("%s: wrong chksum\n", __func__);
		return 0;
	}
	
	memcpy(pbuf, read_data.DD.data, size);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
xorl %r14d, %r14d
testq %rdi, %rdi
je 0x2b55
movq %rdx, %rbx
testq %rdx, %rdx
je 0x2b55
cmpq $0x0, 0xe90e(%rip)      # 0x11390
je 0x2b55
movl $0xffffff07, (%rsp)     # imm = 0xFFFFFF07
pxor %xmm0, %xmm0
movdqu %xmm0, 0x4(%rsp)
movdqu %xmm0, 0x14(%rsp)
movdqu %xmm0, 0x24(%rsp)
movdqu %xmm0, 0x30(%rsp)
movb %sil, 0x1(%rsp)
cmpl $0x2, (%rdi)
jne 0x2b55
movl %ecx, %ebp
movq %rsp, %rsi
movl $0x40, %edx
callq 0x958c
testl %eax, %eax
je 0x2b55
cmpb $0x7, (%rsp)
jne 0x2b34
leaq 0x4(%rsp), %rsi
movzwl -0x2(%rsi), %eax
pxor %xmm1, %xmm1
movl $0x4, %ecx
pxor %xmm0, %xmm0
movd (%rsp,%rcx), %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
punpcklwd %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
paddd %xmm2, %xmm0
addq $0x4, %rcx
cmpq $0x40, %rcx
jne 0x2aec
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %ecx
cmpl %eax, %ecx
jne 0x2b3d
movslq %ebp, %rdx
movq %rbx, %rdi
callq 0x2150
movl $0x1, %r14d
jmp 0x2b55
leaq 0x8921(%rip), %rdi      # 0xb45c
jmp 0x2b44
leaq 0x894c(%rip), %rdi      # 0xb490
leaq 0x8923(%rip), %rsi      # 0xb46e
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2506
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chenhn123[P]wdt_util_src/wdt_ct/w8755_funcs.cpp
// Function: wh_w8755_dev_exec_report_type_read(WdtDevice*, unsigned char, unsigned char*, int, int)
int wh_w8755_dev_exec_report_type_read(WDT_DEV* pdev, BYTE type, BYTE *pbuf, int size, int offset)
{
	int retval;
	int i_size;

	if (offset & TYPE_READ_OFFSET_SET)
		i_size = offset & 0xFF;
	else
		i_size = size;

	retval = wh_w8755_dev_exec_set_report_read(pdev, type, pbuf, i_size);
	if (!retval)
		return 0;

	return wh_w8755_dev_exec_get_report_read(pdev, type, pbuf, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
btl $0x10, %r8d
movzbl %r8b, %ecx
cmovael %ebx, %ecx
callq 0x2a18
testl %eax, %eax
je 0x2ba2
movzbl %bpl, %esi
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a5a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq