LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::SetInternalLanguageInfo(smooth::String const&, smooth::String const&, smooth::String const&, bool)
S::Int S::I18n::Translator::SetInternalLanguageInfo(const String &langName, const String &author, const String &url, Bool rightToLeft)
{
	Language	*iLang = NIL;

	for (Int n = 0; n < languages.Length(); n++)
	{
		if (languages.GetNth(n)->magic == "internal")
		{
			iLang = languages.GetNth(n);

			languages.Remove(languages.GetNthIndex(n));

			break;
		}
	}

	if (iLang != NIL)
	{
		iLang->SetName(langName);

		iLang->author	   = author;
		iLang->url	   = url;
		iLang->rightToLeft = rightToLeft;

		AddLanguage(iLang);
	}

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %r14
leaq 0x20(%rdi), %rbp
xorl %ebx, %ebx
movl $0x108, %r12d           # imm = 0x108
leaq 0x4faec(%rip), %r15     # 0xe7272
cmpl 0x28(%r14), %ebx
jge 0x9781a
movq %rbp, %rdi
movl %ebx, %esi
callq 0x5c1b6
movq (%rax), %rdi
addq %r12, %rdi
movq %r15, %rsi
callq 0x59180
testb %al, %al
jne 0x977b0
incl %ebx
jmp 0x97786
movq %rbp, %rdi
movl %ebx, %esi
callq 0x5c1b6
movq (%rax), %r15
movq %rbp, %rdi
movl %ebx, %esi
callq 0x582c0
movq %rbp, %rdi
movl %eax, %esi
callq 0x59f00
testq %r15, %r15
je 0x9781a
leaq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x56630
leaq 0x120(%r15), %rdi
movq 0x8(%rsp), %rsi
callq 0x56630
leaq 0x138(%r15), %rdi
movq 0x10(%rsp), %rsi
callq 0x56630
movl 0x4(%rsp), %eax
movb %al, 0x150(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x56bb0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::AddLanguage(smooth::I18n::Language*)
S::Int S::I18n::Translator::AddLanguage(Language *language)
{
	/* Check arguments and return an error if they are not sane.
	 */
	if (language == NIL) return Error();

	const String	&langName = language->GetName();

	for (Int i = 0; i < languages.Length(); i++)
	{
		const String	&compName = languages.GetNth(i)->GetName();

		for (Int j = 0; j < Math::Max(langName.Length(), compName.Length()); j++)
		{
			if (langName == compName) return Error();

			if ((langName[j] < compName[j] && !(langName[j] == '(' && compName[j] == '/')) || (langName[j] == '/' && compName[j] == '('))
			{
				languages.InsertAtPos(i, language);

				return Success();
			}

			if ((langName[j] > compName[j] && !(langName[j] == '/' && compName[j] == '(')) || (langName[j] == '(' && compName[j] == '/')) break;
		}
	}

	languages.Add(language);

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
pushq $-0x1
popq %rax
testq %rsi, %rsi
je 0x9799a
movq %rsi, %r14
movq %rdi, %r15
addq $0x8, %r14
addq $0x20, %rdi
xorl %ebp, %ebp
movq %rdi, 0x8(%rsp)
cmpl 0x28(%r15), %ebp
jge 0x979a9
movl %ebp, %esi
callq 0x5c1b6
movq (%rax), %r13
addq $0x8, %r13
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x58370
movl %eax, %ebx
movq %r13, %rdi
callq 0x58370
cmpl %eax, %ebx
cmovgl %ebx, %eax
cmpl %eax, %r12d
jge 0x97976
movq %r14, %rdi
movq %r13, %rsi
callq 0x56960
testb %al, %al
jne 0x97997
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
movl %eax, %ebx
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl %eax, %ebx
jge 0x978f2
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x28, %eax
jne 0x97982
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x2f, %eax
jne 0x97982
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x2f, %eax
jne 0x97912
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x28, %eax
je 0x97982
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
movl %eax, %ebx
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl %eax, %ebx
jle 0x9794e
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x2f, %eax
jne 0x97976
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x28, %eax
jne 0x97976
movq %r14, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x28, %eax
jne 0x9796e
movq %r13, %rdi
movl %r12d, %esi
callq 0x59270
cmpl $0x2f, %eax
je 0x97976
incl %r12d
jmp 0x9787b
incl %ebp
movq 0x8(%rsp), %rdi
jmp 0x97860
leaq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x992c8
xorl %eax, %eax
jmp 0x9799a
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rsi
callq 0x992b6
jmp 0x97993
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::LoadDescription(smooth::XML::Document const&, smooth::I18n::Language*)
S::Int S::I18n::Translator::LoadDescription(const XML::Document &doc, Language *language)
{
	/* Check arguments and return an error if they are not sane.
	 */
	if (doc.GetRootNode() == NIL || language == NIL) return Error();

	XML::Node	*root	= doc.GetRootNode();
	Error		 result = language->ParseHeader(root);

	if (result != Success()) return Error();

	return Success();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x58010
movq %rax, %rcx
pushq $-0x1
popq %rax
testq %rbx, %rbx
je 0x98ae9
testq %rcx, %rcx
je 0x98ae9
movq %r14, %rdi
callq 0x58010
movq (%rbx), %rcx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq *0x18(%rcx)
movq 0xc8c64(%rip), %rax     # 0x161730
addq $0x10, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
andl $0x0, 0x8(%rsi)
movq %r14, %rdi
callq 0x57800
movzbl %al, %eax
negl %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::LoadData(smooth::XML::Document const&, smooth::I18n::Language*)
S::Int S::I18n::Translator::LoadData(const XML::Document &doc, Language *language)
{
	/* Check arguments and return an error if they are not sane.
	 */
	if (doc.GetRootNode() == NIL || language == NIL) return Error();

	XML::Node	*root	= doc.GetRootNode();
	Error		 result = language->Parse(root);

	if (result != Success()) return Error();

	return Success();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x58010
movq %rax, %rcx
pushq $-0x1
popq %rax
testq %rbx, %rbx
je 0x991dd
testq %rcx, %rcx
je 0x991dd
movq %r14, %rdi
callq 0x58010
movq (%rbx), %rcx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq *0x10(%rcx)
movq 0xc8570(%rip), %rax     # 0x161730
addq $0x10, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
andl $0x0, 0x8(%rsi)
movq %r14, %rdi
callq 0x57800
movzbl %al, %eax
negl %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::TranslateString(smooth::String const&, smooth::String const&)
const S::String &S::I18n::Translator::TranslateString(const String &string, const String &context)
{
	String	 prevContext = activeLanguage->GetContext();

	activeLanguage->SetContext(context);

	const String	&translation = activeLanguage->GetString(string);

	activeLanguage->SetContext(prevContext);

	if (translation == NIL)	return string;
	else			return translation;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x78(%rdi), %rsi
addq $0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x58280
movq 0x78(%r15), %rdi
movq %r14, %rsi
callq 0x57230
movq 0x78(%r15), %rdi
movq %rbx, %rsi
callq 0x573d0
movq %rax, %r14
movq 0x78(%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0x57230
movq %r14, %rdi
xorl %esi, %esi
callq 0x56280
testb %al, %al
cmovneq %rbx, %r14
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x9928a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/../../include/smooth/templates/array/arraybackend.h
// Function: smooth::ArrayBackend<void*>::InsertAtPos(int, void* const&, int)
Bool InsertAtPos(Int position, const s &value, Int index)
			{
				WriteLock	 lock(*this);
				Int		 nOfEntries = this->nOfEntries;

				if (position > nOfEntries || position < 0) return False;

				if (!IndexArray::InsertAtPos(position, index)) return False;

				if (entries.Size() == nOfEntries) entries.Resize(8 > nOfEntries * 1.25 ? 8 : nOfEntries * 1.25);

				memmove(entries + position + 1, entries + position, (nOfEntries - position) * sizeof(ArrayEntry
 *));

				entries[position] = new ArrayEntry
(value);

				return True;
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq %rdi, (%rsp)
callq 0x56300
movl 0x8(%rbx), %r13d
movl %r13d, %r12d
subl %ebp, %r12d
setl %al
testl %ebp, %ebp
sets %cl
orb %al, %cl
jne 0x99472
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x56200
testb %al, %al
je 0x99472
cmpl %r13d, 0x50(%rbx)
jne 0x99464
leaq 0x40(%rbx), %rdi
cvtsi2sd %r13d, %xmm0
mulsd 0x49bb1(%rip), %xmm0    # 0xe3000
movsd 0x49bb1(%rip), %xmm1    # 0xe3008
maxsd %xmm0, %xmm1
cvttsd2si %xmm1, %esi
callq 0x5c134
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x99476
movq (%rax), %rax
jmp 0x99478
xorl %ebx, %ebx
jmp 0x994ae
xorl %eax, %eax
movl %ebp, %r15d
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $0x8, %rdi
movslq %r12d, %rdx
shlq $0x3, %rdx
callq 0x56720
pushq $0x8
popq %rdi
callq 0x56700
movq (%r14), %rcx
movq %rcx, (%rax)
movq 0x48(%rbx), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx,%r15,8)
movb $0x1, %bl
movq %rsp, %rdi
callq 0x57400
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x57400
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator_internal.cpp
// Function: smooth::I18n::TranslatorInternal::GetSupportedLanguages()
S::Int S::I18n::TranslatorInternal::GetSupportedLanguages()
{
	SetInternalLanguageInfo("English", "Robert Kausch", "http://www.smooth-project.org/", False);

	for (Int i = 0; languageXMLs[i] != NIL; i++)
	{
		const char	*xml = languageXMLs[i];
		XML::Document	 doc;

		if (doc.ParseMemory((void *) xml, strlen(xml)) == Success())
		{
			Language	*language = new Language();

			language->magic = languageMagics[i];

			if (LoadDescription(doc, language) == Success()) AddLanguage(language);
		}
	}

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x4ddde(%rip), %rsi     # 0xe733c
leaq 0x30(%rsp), %rdi
callq 0x58c40
leaq 0x4ddd5(%rip), %rsi     # 0xe7344
leaq 0x18(%rsp), %rdi
callq 0x58c40
leaq 0x4ddd2(%rip), %rsi     # 0xe7352
movq %rsp, %rdi
callq 0x58c40
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x59e20
movq %rsp, %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x5a588
xorl %r12d, %r12d
leaq 0xc4d47(%rip), %r13     # 0x15e310
leaq 0xc4ed0(%rip), %rbp     # 0x15e4a0
cmpq $0x188, %r12            # imm = 0x188
je 0x99654
movq (%r12,%r13), %r15
movq %r14, %rdi
callq 0x58e60
movq %r15, %rdi
callq 0x57460
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x5a070
testl %eax, %eax
jne 0x99643
movl $0x158, %edi            # imm = 0x158
callq 0x56700
movq %rax, %r15
movq %rax, %rdi
callq 0x584a0
movq (%r12,%rbp), %rsi
movq %r15, %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x57010
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x58f20
testl %eax, %eax
jne 0x99643
movq %rbx, %rdi
movq %r15, %rsi
callq 0x56bb0
movq %r14, %rdi
callq 0x56440
addq $0x8, %r12
jmp 0x995d0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a588
jmp 0x99675
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5a588
jmp 0x99684
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5a588
jmp 0x996b1
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %r15, %rdi
callq 0x564c0
jmp 0x996a7
jmp 0x996a4
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x56440
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator_internal.cpp
// Function: smooth::I18n::TranslatorInternal::ActivateLanguage(smooth::String const&)
foreach (Language *language, languages)
	{
		if (language->magic != magic) continue;

		activeLanguage = language;

		/* Load actual language data.
		 */
		if (magic != "internal" && activeLanguage->strings.Length() == 0 && activeLanguage->sections.Length() == 0)
		{
			for (Int i = 0; languageMagics[i] != NIL; i++)
			{
				if (magic != languageMagics[i]) continue;

				XML::Document	 doc;

				if (doc.ParseMemory((void *) languageXMLs[i], strlen(languageXMLs[i])) == Success()) LoadData(doc, activeLanguage);
			}
		}

		return Success();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rdi), %r12
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movq %rax, 0x8(%rsp)
movl %eax, %ebp
testl %ecx, %ecx
jne 0x99775
movl 0x28(%r15), %eax
decl %eax
cmpl %eax, %ebp
jge 0x99775
incl %ebp
movq %r12, %rdi
movl %ebp, %esi
callq 0x6180a
movq (%rax), %rbx
leaq 0x108(%rbx), %r13
movb $0x1, %dl
pushq $-0x1
popq %rax
movl %eax, %ecx
testb $0x1, %dl
je 0x996fc
movq %r13, %rdi
movq %r14, %rsi
callq 0x58150
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x99727
movq %rbx, 0x78(%r15)
leaq 0x4db25(%rip), %rsi     # 0xe7272
movq %r14, %rdi
callq 0x5a420
movq $0x0, 0x8(%rsp)
testb %al, %al
je 0x99775
movq 0x78(%r15), %rax
cmpl $0x0, 0x48(%rax)
jne 0x99775
cmpl $0x0, 0xa0(%rax)
je 0x99789
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x8(%rsp)
leaq 0xc4d07(%rip), %rbx     # 0x15e4a0
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
cmpq $0x188, %rbp            # imm = 0x188
je 0x99775
movq (%rbp,%rbx), %rsi
movq %r14, %rdi
callq 0x5a420
testb %al, %al
jne 0x997fe
movq %r12, %rdi
callq 0x58e60
leaq 0xc4b47(%rip), %rax     # 0x15e310
movq (%rbp,%rax), %r13
movq %r13, %rdi
callq 0x57460
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x5a070
testl %eax, %eax
jne 0x997f6
movq 0x78(%r15), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x56e70
movq %r12, %rdi
callq 0x56440
addq $0x8, %rbp
jmp 0x997a0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x56440
movq %rbx, %rdi
callq 0x58260
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/driver.cpp
// Function: smooth::IO::Driver::Driver()
S::IO::Driver::Driver()
{
	streamID  = NIL;

	size	  = 2147483647;
	position  = 0;

	lastError = IO_ERROR_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc7df6(%rip), %rax     # 0x161c58
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x20(%rdi), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5a180
movq %r14, %rdi
xorl %esi, %esi
callq 0x58c30
movq $0x7fffffff, 0x8(%rbx)  # imm = 0x7FFFFFFF
andq $0x0, 0x10(%rbx)
andl $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InStream(int, smooth::IO::Driver*)
S::IO::InStream::InStream(Int type, Driver *iDriver)
{
	outStream	 = NIL;

	if (type != STREAM_DRIVER)		   { lastError = IO_ERROR_BADPARAM;	 return; }

	driver		 = iDriver;

	if (driver->GetLastError() != IO_ERROR_OK) { lastError = driver->GetLastError(); return; }

	streamType	 = STREAM_DRIVER;
	size		 = driver->GetSize();
	closefile	 = False;

	packageSize	 = defaultPackageSize;
	stdpacksize	 = packageSize;
	origpacksize	 = packageSize;
	currentBufferPos = defaultPackageSize;
	origsize	 = size;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x57b30
movq 0xc7358(%rip), %rax     # 0x1613b8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
cmpl $0x2, %ebp
jne 0x9a09c
movq %r14, 0xe8(%rbx)
movq %r14, %rdi
callq 0x56190
testl %eax, %eax
je 0x9a0a7
movq 0xe8(%rbx), %rdi
callq 0x56190
movw %ax, 0xf8(%rbx)
jmp 0x9a0db
movw $0x2, 0xf8(%rbx)
jmp 0x9a0db
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
movb $0x0, 0xb(%rbx)
movq 0xc79cf(%rip), %rcx     # 0x161a98
movl (%rcx), %ecx
movl %ecx, 0x38(%rbx)
movl %ecx, 0x3c(%rbx)
movl %ecx, 0x40(%rbx)
movl %ecx, 0x50(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x585c0
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InStream(int, smooth::String const&, int)
S::IO::InStream::InStream(Int type, const String &fileName, Int mode)
{
	outStream	 = NIL;

	if (type != STREAM_FILE)		   { lastError = IO_ERROR_BADPARAM;			return; }
	if (Directory(fileName).Exists())	   { lastError = IO_ERROR_BADPARAM;			return; }

	driver		 = new DriverANSI(File(fileName), mode);

	if (driver->GetLastError() != IO_ERROR_OK) { lastError = driver->GetLastError(); delete driver; return; }

	streamType	 = STREAM_DRIVER;
	size		 = driver->GetSize();

	packageSize	 = defaultPackageSize;
	stdpacksize	 = packageSize;
	origpacksize	 = packageSize;
	currentBufferPos = defaultPackageSize;
	origsize	 = size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
callq 0x57b30
movq 0xc72a0(%rip), %rax     # 0x1613b8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
cmpl $0x3, %r14d
jne 0x9a171
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
callq 0x59fb0
leaq 0x38(%rsp), %rdi
callq 0x56480
movl %eax, %r14d
leaq 0x38(%rsp), %rdi
callq 0x5a598
leaq 0x8(%rsp), %rdi
callq 0x5a588
testb %r14b, %r14b
je 0x9a188
movw $0x2, 0xf8(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x48
popq %rdi
callq 0x56700
movq %rax, %r14
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %r15, %rsi
callq 0x57940
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5a310
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x59450
movq %r14, 0xe8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a500
leaq 0x20(%rsp), %rdi
callq 0x5a588
movq 0xe8(%rbx), %rdi
callq 0x56190
testl %eax, %eax
je 0x9a232
movq 0xe8(%rbx), %rdi
callq 0x56190
movw %ax, 0xf8(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x9a17a
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x9a17a
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
movq 0xc7848(%rip), %rcx     # 0x161a98
movl (%rcx), %ecx
movl %ecx, 0x38(%rbx)
movl %ecx, 0x3c(%rbx)
movl %ecx, 0x40(%rbx)
movl %ecx, 0x50(%rbx)
movq %rax, 0x18(%rbx)
jmp 0x9a17a
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x9a279
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x5a500
jmp 0x9a288
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x5a588
jmp 0x9a297
movq %rax, %r15
pushq $0x48
popq %rsi
movq %r14, %rdi
callq 0x564c0
jmp 0x9a2c7
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x5a598
jmp 0x9a2b6
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x9a2c7
jmp 0x9a2c4
movq %rax, %r15
movq %rbx, %rdi
callq 0x585c0
movq %r15, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InStream(int, _IO_FILE*)
S::IO::InStream::InStream(Int type, FILE *openFile)
{
	outStream	 = NIL;

	if (type != STREAM_ANSI)		   { lastError = IO_ERROR_BADPARAM;			return; }

	driver		 = new DriverANSI(openFile);

	if (driver->GetLastError() != IO_ERROR_OK) { lastError = driver->GetLastError(); delete driver; return; }

	streamType	 = STREAM_DRIVER;
	size		 = driver->GetSize();
	currentFilePos	 = driver->GetPos();

	currentBufferPos = defaultPackageSize;
	origsize	 = size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x57b30
movq 0xc70c5(%rip), %rax     # 0x1613b8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
cmpl $0x4, %ebp
jne 0x9a35f
pushq $0x48
popq %rdi
callq 0x56700
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x59760
movq %r15, 0xe8(%rbx)
movq %r15, %rdi
callq 0x56190
testl %eax, %eax
je 0x9a36a
movq 0xe8(%rbx), %rdi
callq 0x56190
movw %ax, 0xf8(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x9a3a6
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movw $0x2, 0xf8(%rbx)
jmp 0x9a3a6
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, 0x48(%rbx)
movq 0xc76ff(%rip), %rax     # 0x161a98
movl (%rax), %eax
movl %eax, 0x50(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x48
popq %rsi
movq %r15, %rdi
callq 0x564c0
jmp 0x9a3c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x585c0
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InStream(int, void*, long)
S::IO::InStream::InStream(Int type, Void *inBuffer, Long bufferSize)
{
	outStream	 = NIL;

	if (type != STREAM_BUFFER)		   { lastError = IO_ERROR_BADPARAM;			return; }

	driver		 = new DriverMemory(inBuffer, bufferSize);

	if (driver->GetLastError() != IO_ERROR_OK) { lastError = driver->GetLastError(); delete driver; return; }

	streamType	 = STREAM_DRIVER;
	size		 = driver->GetSize();

	currentBufferPos = packageSize;
	origsize	 = size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
callq 0x57b30
movq 0xc6fc5(%rip), %rax     # 0x1613b8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
cmpl $0x5, %ebp
jne 0x9a460
pushq $0x40
popq %rdi
callq 0x56700
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x58670
movq %r12, 0xe8(%rbx)
movq %r12, %rdi
callq 0x56190
testl %eax, %eax
je 0x9a46b
movq 0xe8(%rbx), %rdi
callq 0x56190
movw %ax, 0xf8(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x9a48c
movq (%rdi), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movw $0x2, 0xf8(%rbx)
jmp 0x9a48c
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
movl 0x38(%rbx), %ecx
movl %ecx, 0x50(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x40
popq %rsi
movq %r12, %rdi
callq 0x564c0
jmp 0x9a4a8
movq %rax, %r14
movq %rbx, %rdi
callq 0x585c0
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InStream(int, smooth::IO::OutStream*)
S::IO::InStream::InStream(Int type, OutStream *out)
{
	outStream	 = NIL;

	if (type != STREAM_STREAM)				{ lastError = IO_ERROR_BADPARAM;   return; }
	if (out->streamType == STREAM_NONE || out->crosslinked)	{ lastError = IO_ERROR_OPNOTAVAIL; return; }

	streamType	 = STREAM_STREAM;

	crosslinked		= True;
	outStream		= out;
	outStream->inStream	= this;
	outStream->crosslinked	= True;

	packageSize		= defaultPackageSize;
	stdpacksize		= packageSize;
	origpacksize		= packageSize;

	if (outStream->streamType == STREAM_DRIVER)
	{
		driver		 = outStream->driver;

		streamType	 = STREAM_DRIVER;
		size		 = outStream->size;
		currentFilePos	 = outStream->currentFilePos;
		closefile	 = False;

		packageSize	 = 1;
		stdpacksize	 = packageSize;
		origpacksize	 = packageSize;
		currentBufferPos = packageSize;
		origsize	 = size;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x57b30
movq 0xc6ee8(%rip), %rax     # 0x1613b8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
cmpl $0x1, %ebp
jne 0x9a4fe
cmpw $0x0, 0x8(%r14)
je 0x9a4f3
cmpb $0x1, 0xa(%r14)
jne 0x9a50c
movw $0x6, 0xf8(%rbx)
jmp 0x9a507
movw $0x2, 0xf8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movw $0x1, 0x8(%rbx)
movb $0x1, %al
movb %al, 0xa(%rbx)
movq %r14, 0x100(%rbx)
movq %rbx, 0x100(%r14)
movb %al, 0xa(%r14)
movq 0xc7568(%rip), %rax     # 0x161a98
movl (%rax), %eax
movl %eax, 0x38(%rbx)
movl %eax, 0x3c(%rbx)
movl %eax, 0x40(%rbx)
cmpw $0x2, 0x8(%r14)
jne 0x9a507
movq 0xe8(%r14), %rax
movq %rax, 0xe8(%rbx)
movw $0x2, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x48(%r14), %rcx
movq %rcx, 0x48(%rbx)
movb $0x0, 0xb(%rbx)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x38(%rbx)
pushq $0x1
popq %rcx
movl %ecx, 0x40(%rbx)
movl %ecx, 0x50(%rbx)
movq %rax, 0x18(%rbx)
jmp 0x9a507
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputNumber(int)
S::Int64 S::IO::InStream::InputNumber(Int bytes)	// Intel byte order DCBA
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return -1; }
	if (bytes > 8 || bytes < 0)	{ lastError = IO_ERROR_BADPARAM; return -1; }

	if (bitstreamActive && !keepBits) CompleteBitstream();

	Int64	 rval = 0;

	for (Int i = 0; i < bytes; i++)
	{
		if (currentFilePos >= (origfilepos + packageSize)) { lastError = IO_ERROR_UNKNOWN; return -1; }

		while (currentBufferPos >= packageSize)
		{
			if (!ReadData()) { lastError = IO_ERROR_NODATA; return -1; }
		}

		if (bytes <= 4)	rval += dataBuffer[currentBufferPos] * (1   << (i * 8));
		else		rval += dataBuffer[currentBufferPos] * (1LL << (i * 8));

		currentBufferPos++;
		currentFilePos++;
	}

	return rval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9a7ef
movl %esi, %ebp
movw $0x2, %ax
cmpl $0x8, %esi
ja 0x9a7f9
cmpb $0x1, 0x60(%rbx)
jne 0x9a77f
cmpb $0x0, 0x61(%rbx)
jne 0x9a77f
andl $0x0, 0x64(%rbx)
movb $0x0, 0x60(%rbx)
movl %ebp, %r15d
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpq %r15, %r12
je 0x9a804
movslq 0x38(%rbx), %rax
addq 0x58(%rbx), %rax
cmpq %rax, 0x48(%rbx)
jge 0x9a810
movslq 0x50(%rbx), %rax
cmpl 0x38(%rbx), %eax
jl 0x9a7b2
movq %rbx, %rdi
callq 0x56ac0
testb %al, %al
jne 0x9a79b
jmp 0x9a7f5
movq 0x28(%rbx), %rcx
movq (%rcx), %rcx
movzbl (%rcx,%rax), %edx
cmpl $0x4, %ebp
ja 0x9a7d1
leal (,%r12,8), %ecx
shll %cl, %edx
movslq %edx, %rdx
jmp 0x9a7de
movl %edx, %edx
leal (,%r12,8), %ecx
shlq %cl, %rdx
addq %rdx, %r14
incl %eax
movl %eax, 0x50(%rbx)
incq 0x48(%rbx)
incq %r12
jmp 0x9a788
movw $0x5, %ax
jmp 0x9a7f9
movw $0x8, %ax
movw %ax, 0xf8(%rbx)
pushq $-0x1
popq %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movw $0x4, %ax
jmp 0x9a7f9
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputNumberRaw(int)
S::Int64 S::IO::InStream::InputNumberRaw(Int bytes)	// Raw byte order ABCD
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return -1; }
	if (bytes > 8 || bytes < 0)	{ lastError = IO_ERROR_BADPARAM; return -1; }

	if (bitstreamActive && !keepBits) CompleteBitstream();

	Int64	 rval = 0;

	for (Int i = bytes - 1; i >= 0; i--)
	{
		if (currentFilePos >= (origfilepos + packageSize)) { lastError = IO_ERROR_UNKNOWN; return -1; }

		while (currentBufferPos >= packageSize)
		{
			if (!ReadData()) { lastError = IO_ERROR_NODATA; return -1; }
		}

		if (bytes <= 4)	rval += dataBuffer[currentBufferPos] * (1   << (i * 8));
		else		rval += dataBuffer[currentBufferPos] * (1LL << (i * 8));

		currentBufferPos++;
		currentFilePos++;
	}

	return rval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9a8c7
movl %esi, %ebp
movw $0x2, %ax
cmpl $0x8, %esi
ja 0x9a8d1
cmpb $0x1, 0x60(%rbx)
jne 0x9a85a
cmpb $0x0, 0x61(%rbx)
jne 0x9a85a
andl $0x0, 0x64(%rbx)
movb $0x0, 0x60(%rbx)
movl %ebp, %r15d
xorl %r14d, %r14d
testl %r15d, %r15d
jle 0x9a8dc
movslq 0x38(%rbx), %rax
addq 0x58(%rbx), %rax
cmpq %rax, 0x48(%rbx)
jge 0x9a8ea
decq %r15
movslq 0x50(%rbx), %rax
cmpl 0x38(%rbx), %eax
jl 0x9a88d
movq %rbx, %rdi
callq 0x56ac0
testb %al, %al
jne 0x9a876
jmp 0x9a8cd
movq 0x28(%rbx), %rcx
movq (%rcx), %rcx
movzbl (%rcx,%rax), %edx
cmpl $0x4, %ebp
ja 0x9a8ac
leal (,%r15,8), %ecx
shll %cl, %edx
movslq %edx, %rdx
jmp 0x9a8b9
movl %edx, %edx
leal (,%r15,8), %ecx
shlq %cl, %rdx
addq %rdx, %r14
incl %eax
movl %eax, 0x50(%rbx)
incq 0x48(%rbx)
jmp 0x9a860
movw $0x5, %ax
jmp 0x9a8d1
movw $0x8, %ax
movw %ax, 0xf8(%rbx)
pushq $-0x1
popq %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movw $0x4, %ax
jmp 0x9a8d1
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputBits(int)
S::Int64 S::IO::InStream::InputBits(Int bits)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return -1; }
	if (bits > 64 || bits < 0)	{ lastError = IO_ERROR_BADPARAM; return -1; }

	if (!bitstreamActive) InitBitstream();

	Int64	 rval = 0;

	while (bitLength < bits)
	{
		if (currentFilePos >= (origfilepos + packageSize)) { lastError = IO_ERROR_UNKNOWN; return -1; }

		while (currentBufferPos >= packageSize)
		{
			if (!ReadData()) { lastError = IO_ERROR_NODATA; return -1; }
		}

		for (Int i = 0; i < 8; i++)
		{
			bitBuffer[bitLength] = IOGetBit(dataBuffer[currentBufferPos], i);
			bitLength++;
		}

		currentBufferPos++;
		currentFilePos++;
	}

	for (Int i = 0; i < bits; i++)
	{
		rval = rval | (Int64(bitBuffer[i]) << i);
	}

	bitLength = bitLength - bits;

	for (Int i = 0; i < bitLength; i++)
	{
		bitBuffer[i] = bitBuffer[i + bits];
	}

	return rval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9a97d
movl %esi, %ebp
movw $0x2, %ax
cmpl $0x40, %esi
ja 0x9a987
cmpb $0x0, 0x60(%rbx)
jne 0x9a917
andl $0x0, 0x64(%rbx)
movb $0x1, 0x60(%rbx)
leaq 0x68(%rbx), %r14
movl 0x64(%rbx), %esi
subl %ebp, %esi
jge 0x9a996
movslq 0x38(%rbx), %rax
addq 0x58(%rbx), %rax
cmpq %rax, 0x48(%rbx)
jge 0x9a9cd
movslq 0x50(%rbx), %rax
cmpl 0x38(%rbx), %eax
jl 0x9a94b
movq %rbx, %rdi
callq 0x56ac0
testb %al, %al
jne 0x9a934
jmp 0x9a983
movq 0x28(%rbx), %rcx
movq (%rcx), %rcx
xorl %edx, %edx
cmpl $0x8, %edx
je 0x9a972
movzbl (%rcx,%rax), %esi
btl %edx, %esi
movslq 0x64(%rbx), %rsi
setb 0x68(%rbx,%rsi)
incl %esi
movl %esi, 0x64(%rbx)
incl %edx
jmp 0x9a954
incl %eax
movl %eax, 0x50(%rbx)
incq 0x48(%rbx)
jmp 0x9a91b
movw $0x5, %ax
jmp 0x9a987
movw $0x8, %ax
movw %ax, 0xf8(%rbx)
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
movl %ebp, %edx
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %rdx
je 0x9a9b1
movzbl (%r14,%rcx), %edi
shlq %cl, %rdi
orq %rdi, %rax
incq %rcx
jmp 0x9a99c
movl %esi, 0x64(%rbx)
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
subq $0x1, %rcx
jb 0x9a991
movb (%r14,%rdx), %sil
movb %sil, (%r14)
incq %r14
jmp 0x9a9bb
movw $0x4, %ax
jmp 0x9a987
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputString(int)
S::String S::IO::InStream::InputString(Int bytes)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return NIL; }
	if (bytes <= 0)			{ lastError = IO_ERROR_BADPARAM; return NIL; }

	if (bitstreamActive && !keepBits) CompleteBitstream();

	Int	 bytesleft	= bytes;
	Int	 databufferpos	= 0;

	Buffer<UnsignedByte>	 stringBuffer(bytes + 1);

	while (bytesleft)
	{
		if (currentFilePos >= (origfilepos + packageSize)) { lastError = IO_ERROR_UNKNOWN; return NIL; }

		while (currentBufferPos >= packageSize)
		{
			/* If no more data is available, set lastError and return NIL.
			 */
			if (!ReadData()) { lastError = IO_ERROR_NODATA; return NIL; }
		}

		/* Get amount of data read and copy to string buffer.
		 */
		Int	 amount = ((packageSize - currentBufferPos) < (bytesleft)) ? (packageSize - currentBufferPos) : (bytesleft);

		memcpy((UnsignedByte *) stringBuffer + databufferpos, (UnsignedByte *) dataBuffer + currentBufferPos, amount);

		bytesleft	 -= amount;
		databufferpos	 += amount;
		currentBufferPos += amount;
		currentFilePos	 += amount;
	}

	stringBuffer[bytes] = 0;

	return String((char *) (UnsignedByte *) stringBuffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpw $0x0, 0x8(%rsi)
je 0x9aab4
movl %edx, %r15d
testl %edx, %edx
jle 0x9aae0
cmpb $0x1, 0x60(%r14)
jne 0x9aa22
cmpb $0x0, 0x61(%r14)
jne 0x9aa22
andl $0x0, 0x64(%r14)
movb $0x0, 0x60(%r14)
leal 0x1(%r15), %esi
movq %rsp, %rdi
callq 0x62d56
xorl %r13d, %r13d
movl %r15d, %ebp
testl %ebp, %ebp
je 0x9ab06
movslq 0x38(%r14), %rax
addq 0x58(%r14), %rax
cmpq %rax, 0x48(%r14)
jge 0x9ab24
movslq 0x50(%r14), %rax
movl 0x38(%r14), %ecx
cmpl %eax, %ecx
jg 0x9aa68
movq %r14, %rdi
callq 0x56ac0
testb %al, %al
jne 0x9aa4e
jmp 0x9aac0
subl %eax, %ecx
cmpl %ebp, %ecx
cmovgel %ebp, %ecx
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x9aa7e
movq (%rdx), %rdi
jmp 0x9aa80
xorl %edi, %edi
movq 0x28(%r14), %rdx
testq %rdx, %rdx
je 0x9aa8e
movq (%rdx), %rsi
jmp 0x9aa90
xorl %esi, %esi
movslq %r13d, %r13
addq %r13, %rdi
addq %rax, %rsi
movslq %ecx, %r12
movq %r12, %rdx
callq 0x562f0
subl %r12d, %ebp
addl %r12d, 0x50(%r14)
addl %r12d, %r13d
addq %r12, 0x48(%r14)
jmp 0x9aa34
movw $0x5, 0xf8(%r14)
jmp 0x9aaea
movw $0x8, %ax
movw %ax, 0xf8(%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rsp, %rdi
callq 0x62d46
jmp 0x9aaf4
movw $0x2, 0xf8(%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movq (%rax), %rax
movl %r15d, %ecx
movb $0x0, (%rax,%rcx)
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x9ab2a
movq (%rax), %rsi
jmp 0x9ab2c
movw $0x4, %ax
jmp 0x9aac4
xorl %esi, %esi
movq %rbx, %rdi
callq 0x58c40
jmp 0x9aad6
jmp 0x9ab38
movq %rax, %rbx
movq %rsp, %rdi
callq 0x62d46
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputLine()
S::String S::IO::InStream::InputLine()
{
	if (streamType == STREAM_NONE)		{ lastError = IO_ERROR_NOTOPEN; return NIL; }

	if (bitstreamActive && !keepBits) CompleteBitstream();

	Long	 inpval;
	Int	 bytes = 0;

	Buffer<UnsignedByte>	 stringBuffer(1024);

	while (True)
	{
		for (Int i = 0; i < 1024; i++)
		{
			inpval = InputNumber(1);

			if (inpval == 0 || inpval == -1)
			{
				stringBuffer[bytes] = 0;

				return String((char *) (UnsignedByte *) stringBuffer);
			}

			if (inpval != 13 && inpval != 10)
			{
				stringBuffer[bytes++] = (char) inpval;
			}
			else
			{
				if (inpval == 13) InputNumber(1);

				stringBuffer[bytes] = 0;

				return String((char *) (UnsignedByte *) stringBuffer);
			}
		}

		stringBuffer.Resize(bytes + 1024);
	}

	return NIL; // never reached
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpw $0x0, 0x8(%rsi)
je 0x9ac2a
movq %rbx, (%rsp)
cmpb $0x1, 0x60(%r14)
jne 0x9ab87
cmpb $0x0, 0x61(%r14)
jne 0x9ab87
andl $0x0, 0x64(%r14)
movb $0x0, 0x60(%r14)
leaq 0x10(%rsp), %rdi
movl $0x400, %r15d           # imm = 0x400
movl $0x400, %esi            # imm = 0x400
callq 0x62d56
xorl %r12d, %r12d
pushq $0x1
popq %rbp
movslq %r12d, %rbx
movq %rbx, %r13
shlq $0x20, %r13
movl %r15d, 0xc(%rsp)
movslq %r15d, %r15
leal 0x400(%rbx), %eax
movl %eax, 0x8(%rsp)
cmpq %rbx, %r15
je 0x9ac00
movq %r14, %rdi
movl %ebp, %esi
callq 0x56f60
leaq 0x1(%rax), %rcx
cmpq $0x1, %rcx
jbe 0x9ac4e
cmpq $0xa, %rax
je 0x9ac4e
cmpq $0xd, %rax
je 0x9ac43
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r13
jmp 0x9abbe
addl $0x800, %r12d           # imm = 0x800
movl 0xc(%rsp), %r15d
addl $0x400, %r15d           # imm = 0x400
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
callq 0x63b3a
movl 0x8(%rsp), %r12d
jmp 0x9aba2
movw $0x5, 0xf8(%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rax
jmp 0x9ac87
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x56f60
movq 0x18(%rsp), %rax
movq (%rax), %rax
sarq $0x20, %r13
movb $0x0, (%rax,%r13)
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x9ac6e
movq (%rax), %rsi
jmp 0x9ac70
xorl %esi, %esi
movq (%rsp), %rdi
callq 0x58c40
leaq 0x10(%rsp), %rdi
callq 0x62d46
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9ac9a
jmp 0x9ac9a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x62d46
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::InputData(void*, int)
S::Int S::IO::InStream::InputData(Void *pointer, Int bytes)
{
	if (streamType == STREAM_NONE)	 { lastError = IO_ERROR_NOTOPEN; return 0; }
	if (bytes > 0 && pointer == NIL) { lastError = IO_ERROR_BADPARAM; return 0; }
	if (bytes < 0)			 { lastError = IO_ERROR_BADPARAM; return 0; }

	if (bitstreamActive && !keepBits) CompleteBitstream();

	Int	 bytesleft	= bytes;
	Int	 databufferpos	= 0;

	while (bytesleft)
	{
		if (currentFilePos >= (origfilepos + packageSize)) { lastError = IO_ERROR_UNKNOWN; return bytes - bytesleft; }

		while (currentBufferPos >= packageSize)
		{
			/* If no more data is available, set lastError and
			 * return the number of bytes actually read.
			 */
			if (!ReadData()) { lastError = IO_ERROR_NODATA; return bytes - bytesleft; }
		}

		/* Get amount of data read and copy to output buffer.
		 */
		Int	 amount = ((packageSize - currentBufferPos) < (bytesleft)) ? (packageSize - currentBufferPos) : (bytesleft);

		memcpy((UnsignedByte *) pointer + databufferpos, (UnsignedByte *) dataBuffer + currentBufferPos, amount);

		bytesleft	 -= amount;
		databufferpos	 += amount;
		currentBufferPos += amount;
		currentFilePos	 += amount;
	}

	return bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpw $0x0, 0x8(%rdi)
je 0x9ad82
movl %edx, %ebx
movq %rsi, %r15
testl %edx, %edx
setle %al
testq %rsi, %rsi
setne %cl
orb %al, %cl
je 0x9ad76
testl %ebx, %ebx
js 0x9ad76
cmpb $0x1, 0x60(%r14)
jne 0x9ad01
cmpb $0x0, 0x61(%r14)
jne 0x9ad01
andl $0x0, 0x64(%r14)
movb $0x0, 0x60(%r14)
xorl %r13d, %r13d
movl %ebx, %ebp
testl %ebp, %ebp
je 0x9ad8e
movslq 0x38(%r14), %rax
addq 0x58(%r14), %rax
cmpq %rax, 0x48(%r14)
jge 0x9adad
movslq 0x50(%r14), %rax
movl 0x38(%r14), %ecx
cmpl %eax, %ecx
jg 0x9ad3a
movq %r14, %rdi
callq 0x56ac0
testb %al, %al
jne 0x9ad20
jmp 0x9ad9f
subl %eax, %ecx
cmpl %ebp, %ecx
cmovgel %ebp, %ecx
movq 0x28(%r14), %rdx
testq %rdx, %rdx
je 0x9ad4f
movq (%rdx), %rsi
jmp 0x9ad51
xorl %esi, %esi
movslq %r13d, %r13
leaq (%r15,%r13), %rdi
addq %rax, %rsi
movslq %ecx, %r12
movq %r12, %rdx
callq 0x562f0
subl %r12d, %ebp
addl %r12d, 0x50(%r14)
addl %r12d, %r13d
addq %r12, 0x48(%r14)
jmp 0x9ad06
movw $0x2, 0xf8(%r14)
jmp 0x9ad8c
movw $0x5, 0xf8(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x8, 0xf8(%r14)
subl %ebp, %ebx
jmp 0x9ad8e
movw $0x4, 0xf8(%r14)
jmp 0x9ada9
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::SetPackageSize(int)
S::Bool S::IO::InStream::SetPackageSize(Int newPackageSize)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (!allowpackset)		{ lastError = IO_ERROR_OPNOTAVAIL; return False; }
	if (newPackageSize <= 0)	{ lastError = IO_ERROR_BADPARAM; return False; }

	if (bitstreamActive) CompleteBitstream();

	packageSize	 = newPackageSize;
	stdpacksize	 = packageSize;
	currentBufferPos = packageSize;

	Seek(currentFilePos);

	return True;
}

// Assembly:
cmpw $0x0, 0x8(%rdi)
je 0x9adf4
cmpb $0x0, 0x44(%rdi)
je 0x9adff
testl %esi, %esi
jle 0x9ae0a
cmpb $0x1, 0x60(%rdi)
jne 0x9add9
andl $0x0, 0x64(%rdi)
movb $0x0, 0x60(%rdi)
pushq %rax
movl %esi, 0x38(%rdi)
movl %esi, 0x3c(%rdi)
movl %esi, 0x50(%rdi)
movq (%rdi), %rax
movq 0x48(%rdi), %rsi
callq *0x28(%rax)
movb $0x1, %al
addq $0x8, %rsp
retq
movw $0x5, 0xf8(%rdi)
jmp 0x9ae13
movw $0x6, 0xf8(%rdi)
jmp 0x9ae13
movw $0x2, 0xf8(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::SetFilter(smooth::IO::Filter*)
S::Bool S::IO::InStream::SetFilter(Filter *newFilter)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (filter != NIL)		{ lastError = IO_ERROR_BADPARAM; return False; }

	newFilter->SetDriver(driver);

	Seek(currentFilePos);

	if (newFilter->Activate() == False) { lastError = IO_ERROR_UNKNOWN; return False; }

	allowpackset = True;

	if	(newFilter->GetPackageSize() >   0) SetPackageSize(newFilter->GetPackageSize());
	else if (newFilter->GetPackageSize() == -1) SetPackageSize(size - currentFilePos);

	allowpackset = False;

	filter = newFilter;

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9ae39
cmpq $0x0, 0xf0(%rbx)
je 0x9ae44
movw $0x2, 0xf8(%rbx)
jmp 0x9ae8b
movw $0x5, 0xf8(%rbx)
jmp 0x9ae8b
movq %rsi, %r14
movq 0xe8(%rbx), %rax
movq %rax, 0x10(%rsi)
movq (%rbx), %rax
movq 0x48(%rbx), %rsi
movq %rbx, %rdi
callq *0x28(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
testb %al, %al
je 0x9ae82
movb $0x1, 0x44(%rbx)
movl 0x8(%r14), %esi
testl %esi, %esi
jle 0x9ae95
movq %rbx, %rdi
callq 0x586a0
jmp 0x9ae9a
movw $0x4, 0xf8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $-0x1, %esi
je 0x9aea9
movb $0x0, 0x44(%rbx)
movq %r14, 0xf0(%rbx)
movb $0x1, %al
jmp 0x9ae8d
movl 0x10(%rbx), %esi
subl 0x48(%rbx), %esi
jmp 0x9ae78
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::RemoveFilter()
S::Bool S::IO::InStream::RemoveFilter()
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (filter == NIL)		{ lastError = IO_ERROR_BADPARAM; return False; }

	filter->Deactivate();
	filter = NIL;

	allowpackset = True;

	SetPackageSize(origpacksize);

	return True;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9aeea
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x9aef5
movq (%rdi), %rax
callq *0x18(%rax)
andq $0x0, 0xf0(%rbx)
movb $0x1, 0x44(%rbx)
movl 0x40(%rbx), %esi
movq %rbx, %rdi
callq 0x586a0
movb $0x1, %al
jmp 0x9af00
movw $0x5, 0xf8(%rbx)
jmp 0x9aefe
movw $0x2, 0xf8(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::Close()
S::Bool S::IO::InStream::Close()
{
	if (streamType == STREAM_NONE) { lastError = IO_ERROR_NOTOPEN; return False; }

	if (bitstreamActive) CompleteBitstream();

	while (filter != NIL) RemoveFilter();

	if (crosslinked)
	{
		if (closefile) outStream->closefile = True;

		outStream->crosslinked	= False;
		outStream->inStream	= NIL;

		closefile = False;
	}

	if (closefile) delete driver;

	streamType = STREAM_NONE;

	return True;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x8(%rdi), %ebp
testw %bp, %bp
je 0x9af5f
cmpb $0x1, 0x60(%rbx)
jne 0x9af2a
andl $0x0, 0x64(%rbx)
movb $0x0, 0x60(%rbx)
jmp 0x9af2a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpq $0x0, 0xf0(%rbx)
jne 0x9af21
movb 0xb(%rbx), %cl
cmpb $0x1, 0xa(%rbx)
jne 0x9af6a
movq 0x100(%rbx), %rax
testb $0x1, %cl
je 0x9af4d
movb $0x1, 0xb(%rax)
xorl %ecx, %ecx
movb %cl, 0xa(%rax)
andq $0x0, 0x100(%rax)
movb %cl, 0xb(%rbx)
jmp 0x9af81
movw $0x5, 0xf8(%rbx)
jmp 0x9af86
testb $0x1, %cl
je 0x9af81
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x9af81
movq (%rdi), %rax
callq *0x8(%rax)
andw $0x0, 0x8(%rbx)
testw %bp, %bp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/instream.cpp
// Function: smooth::IO::InStream::Seek(long long)
S::Bool S::IO::InStream::Seek(Int64 position)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }

	if (bitstreamActive) CompleteBitstream();

	Int64	 offset = position - currentFilePos;

	if (currentBufferPos + offset >= 0 && currentBufferPos + offset <= packageSize)
	{
		currentFilePos	  = position;
		currentBufferPos += offset;
	}
	else
	{
		if (driver->Seek(position) == -1) return False;

		currentFilePos	  = position;
		currentBufferPos  = packageSize;
		origfilepos	  = currentFilePos;
	}

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0x9afda
movq %rsi, %r14
cmpb $0x1, 0x60(%rbx)
jne 0x9afb3
andl $0x0, 0x64(%rbx)
movb $0x0, 0x60(%rbx)
movq %r14, %rax
subq 0x48(%rbx), %rax
movslq 0x50(%rbx), %rcx
movq %rax, %rdx
addq %rcx, %rdx
js 0x9afe5
movslq 0x38(%rbx), %rsi
cmpq %rsi, %rdx
jg 0x9afe5
movq %r14, 0x48(%rbx)
addl %ecx, %eax
movl %eax, 0x50(%rbx)
jmp 0x9b009
movw $0x5, 0xf8(%rbx)
jmp 0x9b00d
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
cmpq $-0x1, %rax
je 0x9b00d
movq %r14, 0x48(%rbx)
movl 0x38(%rbx), %eax
movl %eax, 0x50(%rbx)
movq %r14, 0x58(%rbx)
movb $0x1, %al
jmp 0x9b00f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutStream(int, smooth::IO::Driver*)
S::IO::OutStream::OutStream(Int type, Driver *iDriver)
{
	inStream	= NIL;

	if (type != STREAM_DRIVER)		   { lastError = IO_ERROR_BADPARAM;	 return; }

	driver		= iDriver;

	if (driver->GetLastError() != IO_ERROR_OK) { lastError = driver->GetLastError(); return; }

	streamType	= STREAM_DRIVER;
	size		= driver->GetSize();
	currentFilePos	= driver->GetPos();
	closefile	= False;

	packageSize	= defaultPackageSize;
	stdpacksize	= packageSize;
	origpacksize	= packageSize;

	dataBuffer.Resize(packageSize);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x57b30
movq 0xc6b48(%rip), %rax     # 0x161b98
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x100(%rbx)
movw $0x2, %ax
cmpl $0x2, %ebp
jne 0x9b087
movq %r14, 0xe8(%rbx)
movq %r14, %rdi
callq 0x56190
testl %eax, %eax
je 0x9b093
movq 0xe8(%rbx), %rdi
callq 0x56190
movw %ax, 0xf8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, 0x48(%rbx)
movb $0x0, 0xb(%rbx)
movq 0xc6702(%rip), %rax     # 0x1617c8
movl (%rax), %esi
movl %esi, 0x38(%rbx)
movl %esi, 0x3c(%rbx)
movl %esi, 0x40(%rbx)
leaq 0x20(%rbx), %rdi
callq 0x63b3a
jmp 0x9b08e
movq %rax, %r14
movq %rbx, %rdi
callq 0x585c0
movq %r14, %rdi
callq 0x58260
nop