LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Phidelux[P]terminal-table/src/table.cpp
// Function: bornageek::utils::termtab::Table::columnWidth(unsigned short) const
const std::uint16_t Table::columnWidth(const std::uint16_t n) const {
        if(n > this->numColumns()) {
          throw std::out_of_range("The table just has " 
                + std::to_string(this->numColumns()) + " columns.");
        }

        std::uint16_t max = 0;

        std::vector<Row> rows = this->rowsWithHeadings();
        std::for_each(rows.begin(), rows.end(),
          [&max, n](const Row &row) { 
            if(n < row.numCells() && row.cellWidth(n) > max) {
              max = row.cellWidth(n);
            } 
          });

        return max;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, -0xcc(%rbp)
callq 0x9be0
movw %ax, %cx
movl -0xcc(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0xa2be
movb $0x1, -0x7d(%rbp)
movl $0x10, %edi
callq 0x30f0
movq -0xd8(%rbp), %rdi
movq %rax, -0xe8(%rbp)
callq 0x9be0
movw %ax, -0xda(%rbp)
jmp 0xa1de
movw -0xda(%rbp), %ax
movzwl %ax, %esi
leaq -0x70(%rbp), %rdi
callq 0xba00
jmp 0xa1f3
leaq 0x6fe6(%rip), %rsi      # 0x111e0
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xb9b0
jmp 0xa209
leaq 0x6fe4(%rip), %rdx      # 0x111f4
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xb960
jmp 0xa21f
movq -0xe8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3350
jmp 0xa231
movq -0xe8(%rbp), %rdi
movb $0x0, -0x7d(%rbp)
movq 0xed8d(%rip), %rsi      # 0x18fd0
movq 0xed7e(%rip), %rdx      # 0x18fc8
callq 0x33a0
jmp 0xa3ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa2a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa29c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3140
leaq -0x50(%rbp), %rdi
callq 0x3140
leaq -0x70(%rbp), %rdi
callq 0x3140
testb $0x1, -0x7d(%rbp)
jne 0xa2ad
jmp 0xa2b9
movq -0xe8(%rbp), %rdi
callq 0x3190
jmp 0xa3a5
movq -0xd8(%rbp), %rsi
movw $0x0, -0x80(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0xa3b0
movq -0x100(%rbp), %rdi
callq 0xbb20
movq -0x100(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0xbb50
movq %rax, -0xa8(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0xb8(%rbp)
movw -0xa(%rbp), %ax
movw %ax, -0xb0(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movl -0xb0(%rbp), %ecx
callq 0xa4b0
movw %dx, -0xf2(%rbp)
movq %rax, -0xf0(%rbp)
jmp 0xa34a
movw -0xf2(%rbp), %ax
movq -0xf0(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movw %ax, -0xc0(%rbp)
movw -0x80(%rbp), %ax
movw %ax, -0x102(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x7660
movw -0x102(%rbp), %ax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x7660
movq -0x78(%rbp), %rdi
callq 0x33c0
nop
// File: Phidelux[P]terminal-table/src/table.cpp
// Function: bornageek::utils::termtab::Table::rowsWithHeadings() const
const std::vector<Row> Table::rowsWithHeadings() const {
        std::vector<Row> rows = this->rows();

        if(this->mHeadings.numCells() > 0) {
          rows.insert(rows.begin(), this->headings());
        }

        return rows;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movb $0x0, -0x11(%rbp)
callq 0xa840
movq -0x70(%rbp), %rdi
addq $0x40, %rdi
callq 0xecd0
movw %ax, -0x62(%rbp)
jmp 0xa3f2
movw -0x62(%rbp), %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jle 0xa47c
movq -0x80(%rbp), %rdi
callq 0xbb20
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc200
movq -0x70(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0xa650
jmp 0xa427
movq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0xbff0
movq %rax, -0x88(%rbp)
jmp 0xa441
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x76c0
jmp 0xa47c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa49c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x76c0
jmp 0xa49c
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xa48f
movq -0x80(%rbp), %rdi
callq 0x7660
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x7660
movq -0x20(%rbp), %rdi
callq 0x33c0
nop
// File: Phidelux[P]terminal-table/src/table.cpp
// Function: bornageek::utils::termtab::Table::row(unsigned short)
Row& Table::row(const std::uint16_t n) {
        if(n >= this->mRows.size()) {
          throw std::out_of_range("The table just has " 
                + std::to_string(this->mRows.size()) + " rows.");
        }

        return this->mRows[n];
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movzwl -0xa(%rbp), %eax
movq %rax, -0x88(%rbp)
addq $0x60, %rdi
callq 0xbbb0
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jb 0xa813
movb $0x1, -0x7d(%rbp)
movl $0x10, %edi
callq 0x30f0
movq -0x90(%rbp), %rdi
movq %rax, -0x98(%rbp)
addq $0x60, %rdi
callq 0xbbb0
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xbd70
jmp 0xa74b
leaq 0x6a8e(%rip), %rsi      # 0x111e0
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xb9b0
jmp 0xa761
leaq 0x6a96(%rip), %rdx      # 0x111fe
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xb960
jmp 0xa777
movq -0x98(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3350
jmp 0xa789
movq -0x98(%rbp), %rdi
movb $0x0, -0x7d(%rbp)
movq 0xe835(%rip), %rsi      # 0x18fd0
movq 0xe826(%rip), %rdx      # 0x18fc8
callq 0x33a0
jmp 0xa83b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa7fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa7f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xa7eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3140
leaq -0x50(%rbp), %rdi
callq 0x3140
leaq -0x70(%rbp), %rdi
callq 0x3140
testb $0x1, -0x7d(%rbp)
jne 0xa805
jmp 0xa811
movq -0x98(%rbp), %rdi
callq 0x3190
jmp 0xa832
movq -0x90(%rbp), %rdi
addq $0x60, %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0xbe50
addq $0xa0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x33c0
nopl (%rax,%rax)
// File: Phidelux[P]terminal-table/src/row.cpp
// Function: bornageek::utils::termtab::Row::height() const
const std::uint16_t Row::height() const {
        std::uint16_t max = 1;

        std::for_each(mCells.begin(), mCells.end(),
          [&max](const Cell &cell){
            if(cell.height() > max) {
              max = cell.height();
            }
          });

        return max;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movw $0x1, -0xa(%rbp)
addq $0x8, %rdi
callq 0xc710
movq -0x38(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
callq 0xc740
movq %rax, -0x20(%rbp)
leaq -0xa(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xee60
movq %rax, -0x30(%rbp)
movw -0xa(%rbp), %ax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/obj_loader.cpp
// Function: OBJ_FileLoader::OBJ_FileLoader(char const*)
OBJ_FileLoader::OBJ_FileLoader(const char* fname)
{
	std::ifstream fin(fname, std::ios_base::in);
	if(fin.fail()) { throw( Ghulbus::gbException(Ghulbus::gbException::GB_FAILED,
	                                             "Could not open obj file for read") ); }
	ReadFile(fin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x238(%rbp)
movq %rdi, %rax
movq %rax, -0x230(%rbp)
callq 0x4a40
movq -0x10(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x8, %edx
callq 0x2390
jmp 0x2744
movq -0x218(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x218(%rbp,%rax), %rdi
callq 0x2030
movb %al, -0x239(%rbp)
jmp 0x2764
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0x2770
jmp 0x27e5
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x248(%rbp)
leaq 0xe879(%rip), %rdx      # 0x11004
movl $0x1, %esi
callq 0xf0b0
movq -0x248(%rbp), %rdi
leaq 0x155ed(%rip), %rsi     # 0x17d90
leaq 0xc9a6(%rip), %rdx      # 0xf150
callq 0x2340
jmp 0x2827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x280f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2070
jmp 0x280f
movq -0x230(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x2830
jmp 0x27fa
leaq -0x218(%rbp), %rdi
callq 0x2070
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x238(%rbp), %rdi
callq 0x4a60
movq -0x220(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/obj_loader.cpp
// Function: OBJ_Mesh::SetName(char const*)
void OBJ_Mesh::SetName(char const* name) {
	if(m_name) { delete[] m_name;  m_name = NULL; }
	size_t size = strlen(name) + 1;
	m_name = new char[size];
	strcpy(m_name, name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x60(%rax)
je 0x4636
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x462a
movq -0x28(%rbp), %rdi
callq 0x2270
movq -0x20(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rdi
callq 0x20e0
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2040
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
movq 0x60(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x21a0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/obj_loader.cpp
// Function: OBJ_Mesh::OBJ_Mesh(OBJ_Mesh const&)
OBJ_Mesh::OBJ_Mesh(OBJ_Mesh const& rhs)
	:m_name(NULL)
{
	//copy construct:
	this->SetName(rhs.m_name);
	this->SetGeometry(rhs.m_geometry);
	this->SetNormals(rhs.m_normals);
	this->SetTextureData(rhs.m_texcoords);
	this->SetFaceData(rhs.m_faces);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
callq 0x4d60
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x40(%rbp)
callq 0x4d60
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x38(%rbp)
callq 0x4d60
movq -0x28(%rbp), %rdi
addq $0x48, %rdi
movq %rdi, -0x30(%rbp)
callq 0x4d80
movq -0x28(%rbp), %rdi
movq $0x0, 0x60(%rdi)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x45f0
jmp 0x4842
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x48d0
jmp 0x4851
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x4900
jmp 0x4864
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
callq 0x4930
jmp 0x4877
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
callq 0x4960
jmp 0x488a
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x4da0
movq -0x38(%rbp), %rdi
callq 0x4e00
movq -0x40(%rbp), %rdi
callq 0x4e00
movq -0x28(%rbp), %rdi
callq 0x4e00
movq -0x18(%rbp), %rdi
callq 0x2370
nopl (%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::CheckValidity(IconSys::File_t const&)
bool IconSys::CheckValidity(IconSys::File_t const& f)
{
	if( (f.ps2d_string[0] != 'P') ||
		(f.ps2d_string[1] != 'S') ||
		(f.ps2d_string[2] != '2') ||
		(f.ps2d_string[3] != 'D') ||
		/* (f.reserve1 != 0) || */ //this is not necessary, see e.g. system configuration file
		(f.reserve2 != 0) ) { return false; }
	for(int i=0; i<512; i++) {
		if(f.reserve3[i] != 0) { return false; }
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x50, %eax
jne 0x78f5
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x53, %eax
jne 0x78f5
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x32, %eax
jne 0x78f5
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x44, %eax
jne 0x78f5
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x78fb
movb $0x0, -0x1(%rbp)
jmp 0x7937
movl $0x0, -0x14(%rbp)
cmpl $0x200, -0x14(%rbp)     # imm = 0x200
jge 0x7933
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl 0x1c4(%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x7926
movb $0x0, -0x1(%rbp)
jmp 0x7937
jmp 0x7928
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7902
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::GetTitleString(char const*, unsigned int, char*)
void IconSys::GetTitleString(char const * str_in, unsigned int pos_linebreak, char * str_out)
{
	unsigned int i, j;
	pos_linebreak = pos_linebreak >> 1;				//remember S-JIS uses two bytes per character!
	if( (pos_linebreak>0) && (pos_linebreak < 33) ) {
		for(i=0, j=0; i<pos_linebreak; i++, j++) {
			str_out[i] = str_in[j];
		}
		str_out[i++] = '\n';
	} else {
		i = 0;
		j = 0;
	}
	for(; (i<35) || (str_in[i] == '\0'); i++, j++) {
		str_out[i] = str_in[j];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
shrl %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jbe 0x7fa8
cmpl $0x21, -0xc(%rbp)
jae 0x7fa8
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x7f91
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7f61
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movl %ecx, %ecx
movb $0xa, (%rax,%rcx)
jmp 0x7fb6
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
jmp 0x7fb8
movb $0x1, %al
cmpl $0x23, -0x1c(%rbp)
movb %al, -0x21(%rbp)
jb 0x7fd7
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x7fe0
jmp 0x8008
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7fb8
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::SetTitle(char const*)
void IconSys::SetTitle(char const* str) {
	size_t len = strlen(str);
	if(len > 32) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER,
			                         "Title string exceeds character limit" ) );
	}
	//write ASCII string:
	memcpy(decoded_title, str, len+1);
	//write S-JIS string:
	EncodeTitle(decoded_title, File.title);
	//update linebreaks (remember the / 2 since File is referring to SJIS):
	SetLinebreak(File.offset_2nd_line / 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
movq %rax, -0x18(%rbp)
cmpq $0x20, -0x18(%rbp)
jbe 0x8565
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x3, %esi
leaq 0x8c7e(%rip), %rdx      # 0x111c7
callq 0xf0b0
movq -0x28(%rbp), %rdi
leaq 0xf837(%rip), %rsi      # 0x17d90
leaq 0x6bf0(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x20(%rbp), %rdi
addq $0x3c4, %rdi            # imm = 0x3C4
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x2170
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x3c4, %rdi            # imm = 0x3C4
addq $0xc0, %rsi
callq 0x7bb0
movq -0x20(%rbp), %rdi
movzwl 0x6(%rdi), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x8850
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::SetIconFilename(char const*)
void IconSys::SetIconFilename(char const* fname) {
	if(strlen(fname) > 32) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );
	}
	for(size_t i=0; i<64; i++) {
		if(i < strlen(fname)) {
			File.icon_file[i] = fname[i];
		} else {
			File.icon_file[i] = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
cmpq $0x20, %rax
jbe 0x8619
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x28(%rbp), %rdi
leaq 0xf783(%rip), %rsi      # 0x17d90
leaq 0x6b3c(%rip), %rdx      # 0xf150
callq 0x2340
movq $0x0, -0x18(%rbp)
cmpq $0x40, -0x18(%rbp)
jae 0x8681
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x8661
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movb (%rcx,%rdx), %dl
movq -0x18(%rbp), %rcx
movb %dl, 0x104(%rax,%rcx)
jmp 0x8671
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, 0x104(%rax,%rcx)
jmp 0x8673
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8621
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::SetIconCopyFilename(char const*)
void IconSys::SetIconCopyFilename(char const* fname) {
	if(strlen(fname) > 32) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );
	}
	for(size_t i=0; i<64; i++) {
		if(i < strlen(fname)) {
			File.icon_copy_file[i] = fname[i];
		} else {
			File.icon_copy_file[i] = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
cmpq $0x20, %rax
jbe 0x86e9
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x28(%rbp), %rdi
leaq 0xf6b3(%rip), %rsi      # 0x17d90
leaq 0x6a6c(%rip), %rdx      # 0xf150
callq 0x2340
movq $0x0, -0x18(%rbp)
cmpq $0x40, -0x18(%rbp)
jae 0x8751
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x8731
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movb (%rcx,%rdx), %dl
movq -0x18(%rbp), %rcx
movb %dl, 0x144(%rax,%rcx)
jmp 0x8741
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, 0x144(%rax,%rcx)
jmp 0x8743
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x86f1
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::SetIconDeleteFilename(char const*)
void IconSys::SetIconDeleteFilename(char const* fname) {
	if(strlen(fname) > 32) {
		throw( Ghulbus::gbException( Ghulbus::gbException::GB_ILLEGALPARAMETER ) );
	}
	for(size_t i=0; i<64; i++) {
		if(i < strlen(fname)) {
			File.icon_delete_file[i] = fname[i];
		} else {
			File.icon_delete_file[i] = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
cmpq $0x20, %rax
jbe 0x87b9
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x28(%rbp), %rdi
leaq 0xf5e3(%rip), %rsi      # 0x17d90
leaq 0x699c(%rip), %rdx      # 0xf150
callq 0x2340
movq $0x0, -0x18(%rbp)
cmpq $0x40, -0x18(%rbp)
jae 0x8821
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20e0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x8801
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movb (%rcx,%rdx), %dl
movq -0x18(%rbp), %rcx
movb %dl, 0x184(%rax,%rcx)
jmp 0x8811
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, 0x184(%rax,%rcx)
jmp 0x8813
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x87c1
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x20, -0xc(%rbp)
jle 0x88a6
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x3, %esi
leaq 0x8962(%rip), %rdx      # 0x111ec
callq 0xf0b0
movq -0x28(%rbp), %rdi
leaq 0xf4f6(%rip), %rsi      # 0x17d90
leaq 0x68af(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x20(%rbp), %rdx
movl -0xc(%rbp), %eax
shll %eax
movw %ax, 0x6(%rdx)
movq %rdx, %rdi
addq $0x3c4, %rdi            # imm = 0x3C4
movzwl 0x6(%rdx), %esi
addq $0x3e6, %rdx            # imm = 0x3E6
callq 0x7f30
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x409, %rdi            # imm = 0x409
addq $0x3e6, %rsi            # imm = 0x3E6
callq 0x21a0
movq -0x20(%rbp), %rdi
addq $0x409, %rdi            # imm = 0x409
movl $0xa, %esi
callq 0x20b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x890e
movq -0x18(%rbp), %rax
movb $0x20, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::Get(unsigned int*) const
void IconSys::IconSys_Color::Get(unsigned int* p) const
{
	p[0] = static_cast<unsigned int>(R);
	p[1] = static_cast<unsigned int>(G);
	p[2] = static_cast<unsigned int>(B);
	p[3] = static_cast<unsigned int>(X);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rcx
movl %edx, (%rcx)
movl 0x4(%rax), %edx
movq -0x10(%rbp), %rcx
movl %edx, 0x4(%rcx)
movl 0x8(%rax), %edx
movq -0x10(%rbp), %rcx
movl %edx, 0x8(%rcx)
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::Get(float*) const
void IconSys::IconSys_LightColor::Get(float* p) const {
	p[0] = R;
	p[1] = G;
	p[2] = B;
	p[3] = X;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movss (%rax), %xmm0
movq -0x10(%rbp), %rcx
movss %xmm0, (%rcx)
movss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rcx
movss %xmm0, 0x4(%rcx)
movss 0x8(%rax), %xmm0
movq -0x10(%rbp), %rcx
movss %xmm0, 0x8(%rcx)
movss 0xc(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x9de0
movq -0x240(%rbp), %rsi
movl %eax, %edx
leaq -0x210(%rbp), %rdi
callq 0x2200
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x2030
movb %al, -0x231(%rbp)
jmp 0x901d
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x9029
jmp 0x9090
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x250(%rbp)
leaq 0x81ca(%rip), %rdx      # 0x1120e
movl $0x1, %esi
callq 0xf0b0
movq -0x250(%rbp), %rdi
leaq 0xed34(%rip), %rsi      # 0x17d90
leaq 0x60ed(%rip), %rdx      # 0xf150
callq 0x2340
jmp 0x9182
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x22e0
jmp 0x9176
xorl %eax, %eax
movl %eax, %esi
leaq -0x230(%rbp), %rdi
callq 0x9e00
jmp 0x90a2
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x2210
jmp 0x90be
movq -0x248(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movl $0x3c4, %edx            # imm = 0x3C4
callq 0x2280
jmp 0x90d8
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x2030
movb %al, -0x251(%rbp)
jmp 0x90f8
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x9104
jmp 0x9153
leaq -0x210(%rbp), %rdi
callq 0x22c0
jmp 0x9112
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x260(%rbp)
leaq 0x8108(%rip), %rdx      # 0x11235
movl $0x1, %esi
callq 0xf0b0
movq -0x260(%rbp), %rdi
leaq 0xec4b(%rip), %rsi      # 0x17d90
leaq 0x6004(%rip), %rdx      # 0xf150
callq 0x2340
jmp 0x9182
leaq -0x210(%rbp), %rdi
callq 0x22c0
jmp 0x9161
leaq -0x210(%rbp), %rdi
callq 0x22e0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x218(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, (%rax)
jge 0x91ff
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpl $0xff, (%rax)
jle 0x9215
movq -0x10(%rbp), %rax
movl $0xff, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jge 0x922a
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0xff, 0x4(%rax)
jle 0x9242
movq -0x10(%rbp), %rax
movl $0xff, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x9257
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpl $0xff, 0x8(%rax)
jle 0x926f
movq -0x10(%rbp), %rax
movl $0xff, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x9284
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0xff, 0xc(%rax)
jle 0x929c
movq -0x10(%rbp), %rax
movl $0xff, 0xc(%rax)
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::operator=(IconSys::IconSys_Color const&)
IconSys::IconSys_Color& IconSys::IconSys_Color::operator =(IconSys::IconSys_Color const& in) {
	if(this != &in) {
		R = in.R;
		G = in.G;
		B = in.B;
		X = in.X;
	}
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq -0x10(%rbp), %rax
je 0x93d4
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::SetR(int)
bool IconSys::IconSys_Color::SetR(int r) 
{
	if( (r >= 0) && (r <= 128) ) {		//color values must range between 0x00 and 0x80
		R = r;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x9581
cmpl $0x80, -0x14(%rbp)
jg 0x9581
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9585
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::SetG(int)
bool IconSys::IconSys_Color::SetG(int g) 
{
	if( (g >= 0) && (g <= 128) ) {		//color values must range between 0x00 and 0x80
		G = g;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x95c2
cmpl $0x80, -0x14(%rbp)
jg 0x95c2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x95c6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::SetB(int)
bool IconSys::IconSys_Color::SetB(int b) 
{
	if( (b >= 0) && (b <= 128) ) {		//color values must range between 0x00 and 0x80
		B = b;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x9602
cmpl $0x80, -0x14(%rbp)
jg 0x9602
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9606
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_Color::SetX(int)
bool IconSys::IconSys_Color::SetX(int x) 
{
	if( (x >= 0) && (x <= 128) ) {		//color values must range between 0x00 and 0x80
		X = x;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x9642
cmpl $0x80, -0x14(%rbp)
jg 0x9642
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9646
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomiss (%rax), %xmm0
jbe 0x96d3
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss 0x7a89(%rip), %xmm1     # 0x1116c
ucomiss %xmm1, %xmm0
jbe 0x96f8
movq -0x10(%rbp), %rax
movss 0x7a78(%rip), %xmm0     # 0x1116c
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x4(%rax), %xmm0
jbe 0x9711
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movss 0x7a4a(%rip), %xmm1     # 0x1116c
ucomiss %xmm1, %xmm0
jbe 0x9738
movq -0x10(%rbp), %rax
movss 0x7a39(%rip), %xmm0     # 0x1116c
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x8(%rax), %xmm0
jbe 0x9751
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss 0x7a0a(%rip), %xmm1     # 0x1116c
ucomiss %xmm1, %xmm0
jbe 0x9778
movq -0x10(%rbp), %rax
movss 0x79f9(%rip), %xmm0     # 0x1116c
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0xc(%rax), %xmm0
jbe 0x9791
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm0
movss 0x79ca(%rip), %xmm1     # 0x1116c
ucomiss %xmm1, %xmm0
jbe 0x97b8
movq -0x10(%rbp), %rax
movss 0x79b9(%rip), %xmm0     # 0x1116c
movss %xmm0, 0xc(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::SetR(float)
bool IconSys::IconSys_LightColor::SetR(float r) {
	if((r >= 0.0f) && (r <= 1.0f)) {
		R = r;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9a53
movss 0x7732(%rip), %xmm0     # 0x1116c
ucomiss -0x14(%rbp), %xmm0
jb 0x9a53
movq -0x20(%rbp), %rax
movss -0x14(%rbp), %xmm0
movss %xmm0, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9a57
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::SetG(float)
bool IconSys::IconSys_LightColor::SetG(float g) {
	if((g >= 0.0f) && (g <= 1.0f)) {
		G = g;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9aa4
movss 0x76e2(%rip), %xmm0     # 0x1116c
ucomiss -0x14(%rbp), %xmm0
jb 0x9aa4
movq -0x20(%rbp), %rax
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9aa8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::SetB(float)
bool IconSys::IconSys_LightColor::SetB(float b) {
	if((b >= 0.0f) && (b <= 1.0f)) {
		B = b;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9af4
movss 0x7692(%rip), %xmm0     # 0x1116c
ucomiss -0x14(%rbp), %xmm0
jb 0x9af4
movq -0x20(%rbp), %rax
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9af8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightColor::SetX(float)
bool IconSys::IconSys_LightColor::SetX(float x) {
	if((x >= 0.0f) && (x <= 1.0f)) {
		X = x;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9b44
movss 0x7642(%rip), %xmm0     # 0x1116c
ucomiss -0x14(%rbp), %xmm0
jb 0x9b44
movq -0x20(%rbp), %rax
movss -0x14(%rbp), %xmm0
movss %xmm0, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9b48
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: ticky[P]ps2iconsys/src/ps2_iconsys.cpp
// Function: IconSys::IconSys_LightVec::operator=(IconSys::IconSys_LightVec const&)
IconSys::IconSys_LightVec& IconSys::IconSys_LightVec::operator=(IconSys::IconSys_LightVec const& in)
{
	if(this != &in) {
		X = in.X;
		Y = in.Y;
		Z = in.Z;
		W = in.W;
	}
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq -0x10(%rbp), %rax
je 0x9ca4
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movss (%rcx), %xmm0
movss %xmm0, (%rax)
movq -0x10(%rbp), %rcx
movss 0x4(%rcx), %xmm0
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rcx
movss 0x8(%rcx), %xmm0
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movss 0xc(%rcx), %xmm0
movss %xmm0, 0xc(%rax)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: ticky[P]ps2iconsys/src/ps2_ps2icon.cpp
// Function: PS2Icon::CheckValidity(PS2Icon::Icon_Header_t const&)
bool PS2Icon::CheckValidity(PS2Icon::Icon_Header const& p) {
	if( (p.file_id != 0x010000) ||
		(p.reserved != 0x3F800000) )
	{ 
		// it seems not all icons set these ids right;
		// since the ps2 doesn't seem to care too much, there's no reason why we should
		//return false; 
	}
	//n_vertices has to be divisible by three, that's for sure:
	if(p.n_vertices % 3 != 0) {
		return false;
	}
	//seems that all we can check for now;
	//the regulations on the header files are somewhat
	//sloppy, so we'll just have to hope the best...
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x10000, (%rax)        # imm = 0x10000
jne 0x9e61
movq -0x10(%rbp), %rax
cmpl $0x3f800000, 0xc(%rax)  # imm = 0x3F800000
je 0x9e63
jmp 0x9e63
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
je 0x9e7e
movb $0x0, -0x1(%rbp)
jmp 0x9e82
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
movq $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq $0x0, 0x30(%rax)
movq $0x0, 0x38(%rax)
movq $0x0, 0x58(%rax)
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x9de0
movq -0x240(%rbp), %rsi
movl %eax, %edx
leaq -0x218(%rbp), %rdi
callq 0x2390
movq -0x218(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x218(%rbp,%rax), %rdi
callq 0x2030
movb %al, -0x231(%rbp)
jmp 0x9f35
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x9f41
jmp 0x9f9c
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x250(%rbp)
leaq 0x7228(%rip), %rdx      # 0x11184
movl $0x1, %esi
callq 0xf0b0
movq -0x250(%rbp), %rdi
leaq 0xde1c(%rip), %rsi      # 0x17d90
leaq 0x51d5(%rip), %rdx      # 0xf150
callq 0x2340
jmp 0xa088
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0xa068
movq -0x248(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0xa090
jmp 0x9fb1
jmp 0xa045
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
movl -0x224(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xa068
movq -0x220(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x2240
movq %rax, %rsi
leaq -0x230(%rbp), %rdi
callq 0xc6c0
movq -0x258(%rbp), %rdi
callq 0x20c0
leaq -0x218(%rbp), %rdi
callq 0x2060
jmp 0xa017
callq 0x22d0
jmp 0xa088
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x23c0
callq 0x2330
jmp 0xa043
jmp 0xa068
leaq -0x218(%rbp), %rdi
callq 0x2060
jmp 0xa053
leaq -0x218(%rbp), %rdi
callq 0x2070
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0x218(%rbp), %rdi
callq 0x2070
movq -0x220(%rbp), %rdi
callq 0x2370
movq %rax, %rdi
callq 0x5470
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq $0x0, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
movq $0x0, 0x58(%rdi)
movq $0x0, 0x60(%rdi)
movl $0x10000, (%rdi)        # imm = 0x10000
movl $0x1, 0x4(%rdi)
movl $0x7, 0x8(%rdi)
movl $0x3f800000, 0xc(%rdi)  # imm = 0x3F800000
movl $0x0, 0x10(%rdi)
movl $0x1, 0x40(%rdi)
movl $0x1f, 0x44(%rdi)
movss 0x696c(%rip), %xmm0     # 0x1116c
movss %xmm0, 0x48(%rdi)
movl $0x0, 0x4c(%rdi)
movl $0x0, 0x50(%rdi)
addq $0x68, %rdi
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x2110
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x18(%rax)
je 0xb692
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xb686
movq -0x20(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xb6c4
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xb6b8
movq -0x28(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xb6f6
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xb6ea
movq -0x30(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xb728
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xb71c
movq -0x38(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xb75a
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0xb74e
movq -0x40(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xb78c
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0xb780
movq -0x48(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xb829
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x50(%rcx), %eax
jae 0xb802
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movl -0xc(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0xb7f5
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0xb7e2
movq -0x50(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movl -0xc(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0xb7f7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb7a2
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0xb81d
movq -0x58(%rbp), %rdi
callq 0x2270
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
addq $0x60, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x50(%rcx), %eax
jb 0xb9a1
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x20(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x20(%rbp), %rdi
leaq 0xc3fb(%rip), %rsi      # 0x17d90
leaq 0x37b4(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
jbe 0xb9e8
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x1, %esi
callq 0xf060
movq -0x28(%rbp), %rdi
leaq 0xc3b4(%rip), %rsi      # 0x17d90
leaq 0x376d(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,8), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x50(%rcx), %eax
jb 0xba51
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x20(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x20(%rbp), %rdi
leaq 0xc34b(%rip), %rsi      # 0x17d90
leaq 0x3704(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x7fffffff, 0x4(%rax,%rcx,8) # imm = 0x7FFFFFFF
jbe 0xba99
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
movl $0x1, %esi
callq 0xf060
movq -0x28(%rbp), %rdi
leaq 0xc303(%rip), %rsi      # 0x17d90
leaq 0x36bc(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0xc(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x50(%rcx), %eax
jae 0xbae7
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
movq 0x58(%rcx), %rcx
movslq -0xc(%rbp), %rdx
cmpl 0x4(%rcx,%rdx,8), %eax
jb 0xbb19
movl $0x18, %edi
callq 0x20f0
movq %rax, %rdi
movq %rdi, -0x20(%rbp)
movl $0x3, %esi
callq 0xf060
movq -0x20(%rbp), %rdi
leaq 0xc283(%rip), %rsi      # 0x17d90
leaq 0x363c(%rip), %rdx      # 0xf150
callq 0x2340
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movss (%rax,%rcx,8), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)