LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutStream(int, _IO_FILE*)
S::IO::OutStream::OutStream(Int type, FILE *openFile)
{
	inStream	= 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();

	dataBuffer.Resize(packageSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x569d0
movq 0xccd0b(%rip), %rax     # 0x16cb98
addq $0x10, %rax
movq %rax, (%rbx)
movq $0x0, 0x100(%rbx)
cmpl $0x4, %ebp
jne 0x9fefe
movl $0x48, %edi
callq 0x556b0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x58470
movq %r15, 0xe8(%rbx)
movq %r15, %rdi
callq 0x55190
testl %eax, %eax
je 0x9ff09
movq 0xe8(%rbx), %rdi
callq 0x55190
movw %ax, 0xf8(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x9ff3d
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movw $0x2, 0xf8(%rbx)
jmp 0x9ff3d
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)
leaq 0x20(%rbx), %rdi
movl 0x38(%rbx), %esi
callq 0x62eaa
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x48, %esi
movq %r15, %rdi
callq 0x55480
jmp 0x9ff5d
movq %rax, %r14
movq %rbx, %rdi
callq 0x573c0
movq %r14, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutStream(int, void*, long)
S::IO::OutStream::OutStream(Int type, Void *outBuffer, Long bufferSize)
{
	inStream	= NIL;

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

	driver		= new DriverMemory(outBuffer, bufferSize);

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

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

	dataBuffer.Resize(packageSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
callq 0x569d0
movq 0xccc0b(%rip), %rax     # 0x16cb98
addq $0x10, %rax
movq %rax, (%rbx)
movq $0x0, 0x100(%rbx)
cmpl $0x5, %ebp
jne 0x9ffff
movl $0x40, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x57470
movq %r12, 0xe8(%rbx)
movq %r12, %rdi
callq 0x55190
testl %eax, %eax
je 0xa000a
movq 0xe8(%rbx), %rdi
callq 0x55190
movw %ax, 0xf8(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0xa002d
movq (%rdi), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movw $0x2, 0xf8(%rbx)
jmp 0xa002d
movw $0x2, 0x8(%rbx)
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, 0x10(%rbx)
leaq 0x20(%rbx), %rdi
movl 0x38(%rbx), %esi
callq 0x62eaa
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x40, %esi
movq %r12, %rdi
callq 0x55480
jmp 0xa004b
movq %rax, %r14
movq %rbx, %rdi
callq 0x573c0
movq %r14, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutStream(int, smooth::IO::InStream*)
S::IO::OutStream::OutStream(Int type, InStream *in)
{
	inStream	= NIL;

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

	streamType	= STREAM_STREAM;

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

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

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

		streamType	= STREAM_DRIVER;
		size		= inStream->origsize;
		currentFilePos	= inStream->currentFilePos;
		closefile	= False;

		packageSize	= 1;
		stdpacksize	= packageSize;
		origpacksize	= packageSize;

		dataBuffer.Resize(packageSize);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x569d0
movq 0xccb24(%rip), %rax     # 0x16cb98
addq $0x10, %rax
movq %rax, (%rbx)
movq $0x0, 0x100(%rbx)
movw $0x2, %ax
cmpl $0x1, %ebp
jne 0xa00a2
movw $0x6, %ax
cmpw $0x0, 0x8(%r14)
je 0xa00a2
cmpb $0x0, 0xa(%r14)
je 0xa00ae
movw %ax, 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 0xcc6f6(%rip), %rax     # 0x16c7c8
movl (%rax), %eax
movl %eax, 0x38(%rbx)
movl %eax, 0x3c(%rbx)
movl %eax, 0x40(%rbx)
cmpw $0x2, 0x8(%r14)
jne 0xa00a9
movq 0xe8(%r14), %rax
movq %rax, 0xe8(%rbx)
movw $0x2, 0x8(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x48(%rbx)
movb $0x0, 0xb(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x38(%rbx)
movl $0x1, 0x40(%rbx)
leaq 0x20(%rbx), %rdi
movl $0x1, %esi
callq 0x62eaa
jmp 0xa00a9
movq %rax, %r14
movq %rbx, %rdi
callq 0x573c0
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::Flush()
S::Bool S::IO::OutStream::Flush()
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }

	if (currentBufferPos <= 0) return True;

	if (bitstreamActive) CompleteBitstream();

	Int	 ps		= packageSize;
	Int	 oldcpos	= currentBufferPos;

	if (filter != NIL && filter->GetPackageSize() > 0)
	{
		for (Int i = 0; i < (packageSize - oldcpos); i++) OutputNumber(0, 1);
	}

	if (currentBufferPos > 0)
	{
		packageSize = currentBufferPos;

		if (!WriteData())
		{
			packageSize = ps;

			{ lastError = IO_ERROR_UNKNOWN; return False; }
		}

		packageSize = ps;
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa021b
movw $0x4, %r14w
cmpl $0x0, 0x38(%rbx)
jle 0xa0220
movb $0x1, %bpl
cmpl $0x0, 0x50(%rbx)
jle 0xa022a
cmpb $0x1, 0x60(%rbx)
jne 0xa01bf
movq %rbx, %rdi
callq 0x56380
movl 0x38(%rbx), %r15d
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0xa01ff
cmpl $0x0, 0x8(%rax)
jle 0xa01ff
movl 0x50(%rbx), %r12d
cmpl %r12d, 0x38(%rbx)
jle 0xa01ff
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x55750
incl %r13d
movl 0x38(%rbx), %eax
subl %r12d, %eax
cmpl %eax, %r13d
jl 0xa01e2
movl 0x50(%rbx), %eax
testl %eax, %eax
jle 0xa022a
movl %eax, 0x38(%rbx)
movq %rbx, %rdi
callq 0x576a0
movl %r15d, 0x38(%rbx)
testb %al, %al
je 0xa0220
jmp 0xa022a
movw $0x5, %r14w
movw %r14w, 0xf8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::CompleteBitstream()
S::Bool S::IO::OutStream::CompleteBitstream()
{
	if (bitLength > 0)
	{
		Int	out = 0;

		for (Int i = 0; i < 8; i++)
		{
			if (i < bitLength) out = out | (bitBuffer[i] << i);
		}

		keepBits = True;
		OutputNumber(out, 1);
		keepBits = False;
	}

	bitstreamActive = 0;

	return True;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x64(%rdi), %rax
testq %rax, %rax
jle 0xa027c
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rax, %rcx
jae 0xa025b
movzbl 0x68(%rbx,%rcx), %esi
shll %cl, %esi
orl %esi, %edx
incq %rcx
cmpq $0x8, %rcx
jne 0xa024d
movb $0x1, 0x61(%rbx)
movslq %edx, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x55750
movb $0x0, 0x61(%rbx)
movb $0x0, 0x60(%rbx)
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutputNumber(long long, int)
S::Bool S::IO::OutStream::OutputNumber(Int64 number, Int bytes)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }
	if (bytes > 8 || bytes < 0)	{ lastError = IO_ERROR_BADPARAM; return False; }

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

	for (Int i = 0; i < bytes; i++)
	{
		if (currentBufferPos >= packageSize)
		{
			if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
		}

		dataBuffer[currentBufferPos] = IOGetByte(number, i);
		if (currentFilePos == size) size++;
		currentBufferPos++;
		currentFilePos++;
	}

	if (currentBufferPos >= packageSize)
	{
		if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa0358
movw $0x4, %cx
cmpl $0x0, 0x38(%rbx)
jle 0xa035c
movl %edx, %ebp
movw $0x2, %cx
cmpl $0x8, %edx
ja 0xa035c
cmpb $0x1, 0x60(%rbx)
jne 0xa02d4
cmpb $0x0, 0x61(%rbx)
jne 0xa02d4
movq %rbx, %rdi
movq %rsi, %r14
callq 0x56380
movq %r14, %rsi
testl %ebp, %ebp
setne %r14b
je 0xa0385
movl %ebp, %r15d
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
xorl %r13d, %r13d
movl 0x50(%rbx), %eax
cmpl 0x38(%rbx), %eax
jl 0xa030d
movq %rbx, %rdi
movq %rsi, %rbp
callq 0x576a0
movq %rbp, %rsi
testb %al, %al
je 0xa0376
leal (,%r13,8), %ecx
movq %rsi, %rax
sarq %cl, %rax
movslq 0x50(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq (%rdx), %rdx
movb %al, (%rdx,%rcx)
movq 0x10(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq %rcx, %rax
jne 0xa033d
incq %rcx
movq %rcx, 0x10(%rbx)
incl 0x50(%rbx)
incq %rax
movq %rax, 0x48(%rbx)
incq %r13
cmpq %r15, %r13
setb %r14b
cmpq %r12, %r13
jne 0xa02f3
jmp 0xa0385
movw $0x5, %cx
movw %cx, 0xf8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x4, 0xf8(%rbx)
testb $0x1, %r14b
jne 0xa0363
movl 0x50(%rbx), %eax
movb $0x1, %bpl
cmpl 0x38(%rbx), %eax
jl 0xa0365
movq %rbx, %rdi
callq 0x576a0
movw $0x4, %cx
testb %al, %al
je 0xa035c
jmp 0xa0365
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::WriteData()
S::Bool S::IO::OutStream::WriteData()
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }

	if (currentBufferPos < packageSize) return True;

	if (filter != NIL && filter->GetPackageSize() == -1)
	{
		dataBuffer.Resize(packageSize + defaultPackageSize);

		packageSize += defaultPackageSize;
		stdpacksize = packageSize;

		return True;
	}

	if (streamType == STREAM_DRIVER)
	{
		Int	 encsize = 0;

		dataBuffer.Resize(packageSize);

		if (filter == NIL) encsize = driver->WriteData(dataBuffer, packageSize);
		else		   encsize = filter->WriteData(dataBuffer);

		if (encsize == -1)
		{
			packageSize = 0;

			return False;
		}

		driver->Flush();

		if (size == currentFilePos) size -= (packageSize - encsize);

		currentFilePos	 -= (packageSize - encsize);
		currentBufferPos -= packageSize;
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movzwl 0x8(%rdi), %eax
testw %ax, %ax
je 0xa0400
movl 0x38(%r14), %esi
testl %esi, %esi
jle 0xa040c
movb $0x1, %bl
cmpl %esi, 0x50(%r14)
jl 0xa0418
movq 0xf0(%r14), %rcx
testq %rcx, %rcx
je 0xa03d7
cmpl $-0x1, 0x8(%rcx)
je 0xa0425
cmpw $0x2, %ax
jne 0xa0418
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x62eaa
movq 0xf0(%r14), %rdi
testq %rdi, %rdi
je 0xa0449
movq (%rdi), %rax
movq %r15, %rsi
callq *0x20(%rax)
jmp 0xa046a
movw $0x5, 0xf8(%r14)
jmp 0xa0416
movw $0x4, 0xf8(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%r14), %rdi
movq 0xcc398(%rip), %r15     # 0x16c7c8
addl (%r15), %esi
callq 0x62eaa
movl 0x38(%r14), %eax
addl (%r15), %eax
movl %eax, 0x38(%r14)
movl %eax, 0x3c(%r14)
jmp 0xa0418
movq 0x28(%r14), %rax
movq 0xe8(%r14), %rdi
testq %rax, %rax
je 0xa045e
movq (%rax), %rsi
jmp 0xa0460
xorl %esi, %esi
movl 0x38(%r14), %edx
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xa04b4
movq 0xe8(%r14), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x10(%r14), %rcx
movq 0x48(%r14), %rax
cmpq %rax, %rcx
jne 0xa049c
movslq 0x38(%r14), %rdx
movslq %ebp, %rsi
subq %rdx, %rsi
addq %rsi, %rcx
movq %rcx, 0x10(%r14)
movl 0x38(%r14), %ecx
movl %ecx, %edx
subl %ebp, %edx
movslq %edx, %rdx
subq %rdx, %rax
movq %rax, 0x48(%r14)
subl %ecx, 0x50(%r14)
jmp 0xa04bc
movl $0x0, 0x38(%r14)
cmpl $-0x1, %ebp
jne 0xa0418
jmp 0xa0416
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutputNumberRaw(long long, int)
S::Bool S::IO::OutStream::OutputNumberRaw(Int64 number, Int bytes)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }
	if (bytes > 8 || bytes < 0)	{ lastError = IO_ERROR_BADPARAM; return False; }

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

	for (Int i = bytes - 1; i >= 0; i--)
	{
		if (currentBufferPos >= packageSize)
		{
			if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
		}

		dataBuffer[currentBufferPos] = IOGetByte(number, i);
		if (currentFilePos == size) size++;
		currentBufferPos++;
		currentFilePos++;
	}

	if (currentBufferPos >= packageSize)
	{
		if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa0595
movw $0x4, %cx
cmpl $0x0, 0x38(%rbx)
jle 0xa0599
movl %edx, %r15d
movw $0x2, %cx
cmpl $0x8, %edx
ja 0xa0599
movq %rsi, %r14
cmpb $0x1, 0x60(%rbx)
jne 0xa0515
cmpb $0x0, 0x61(%rbx)
jne 0xa0515
movq %rbx, %rdi
callq 0x56380
testl %r15d, %r15d
sete %bpl
je 0xa05bc
movl %r15d, %eax
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
leaq (%rcx,%rax,8), %r12
movl 0x50(%rbx), %eax
cmpl 0x38(%rbx), %eax
jl 0xa0542
movq %rbx, %rdi
callq 0x576a0
testb %al, %al
je 0xa05ad
movl %r12d, %ecx
andb $-0x8, %cl
movq %r14, %rax
sarq %cl, %rax
movslq 0x50(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq (%rdx), %rdx
movb %al, (%rdx,%rcx)
movq 0x10(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq %rcx, %rax
jne 0xa0570
incq %rcx
movq %rcx, 0x10(%rbx)
incl 0x50(%rbx)
incq %rax
movq %rax, 0x48(%rbx)
cmpl $0x2, %r15d
setl %bpl
addq $-0x8, %r12
leal -0x1(%r15), %eax
cmpl $0x1, %r15d
movl %eax, %r15d
jg 0xa052e
jmp 0xa05bc
movw $0x5, %cx
movw %cx, 0xf8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movw $0x4, 0xf8(%rbx)
testb $0x1, %bpl
je 0xa05a0
movl 0x50(%rbx), %eax
movb $0x1, %bpl
cmpl 0x38(%rbx), %eax
jl 0xa05a2
movq %rbx, %rdi
callq 0x576a0
movw $0x4, %cx
testb %al, %al
je 0xa0599
jmp 0xa05a2
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutputBits(long long, int)
S::Bool S::IO::OutStream::OutputBits(Int64 number, Int bits)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }
	if (bits > 64 || bits < 0)	{ lastError = IO_ERROR_BADPARAM; return False; }

	if (!bitstreamActive) InitBitstream();

	for (Int j = 0; j < bits; j++)
	{
		bitBuffer[bitLength] = IOGetBit(number, j);
		bitLength++;
	}

	while (bitLength >= 8)
	{
		unsigned char	 out = 0;

		for (Int i = 0; i < 8; i++) out = out | (bitBuffer[i] << i);

		bitLength = bitLength - 8;

		for (Int j = 0; j < bitLength; j++) bitBuffer[j] = bitBuffer[j + 8];

		dataBuffer[currentBufferPos] = out;

		if (currentFilePos == size) size++;

		currentBufferPos++;
		currentFilePos++;

		if (currentBufferPos >= packageSize)
		{
			if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
		}
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa06df
cmpl $0x0, 0x38(%rbx)
jle 0xa06e5
movw $0x2, %ax
cmpl $0x40, %edx
ja 0xa06e9
cmpb $0x0, 0x60(%rbx)
jne 0xa0618
movl $0x0, 0x64(%rbx)
movb $0x1, 0x60(%rbx)
testl %edx, %edx
je 0xa064b
movslq 0x64(%rbx), %rdi
movl %edi, %eax
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
addq %rbx, %rdi
addq $0x68, %rdi
xorl %edx, %edx
btq %rdx, %rsi
setb (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0xa0636
addl %edx, %eax
movl %eax, 0x64(%rbx)
movl 0x64(%rbx), %eax
movb $0x1, %bpl
cmpl $0x8, %eax
jl 0xa06f2
leaq 0x68(%rbx), %r14
leaq 0x70(%rbx), %r15
xorl %ecx, %ecx
xorl %r12d, %r12d
movzbl 0x68(%rbx,%rcx), %edx
shll %cl, %edx
orb %dl, %r12b
incq %rcx
cmpq $0x8, %rcx
jne 0xa0667
leal -0x8(%rax), %ecx
movl %ecx, 0x64(%rbx)
cmpl $0x9, %eax
jl 0xa0692
movl %ecx, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x556d0
movslq 0x50(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx), %rcx
movb %r12b, (%rcx,%rax)
movq 0x10(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq %rcx, %rax
jne 0xa06b5
incq %rcx
movq %rcx, 0x10(%rbx)
movl 0x50(%rbx), %ecx
incl %ecx
movl %ecx, 0x50(%rbx)
incq %rax
movq %rax, 0x48(%rbx)
cmpl 0x38(%rbx), %ecx
jl 0xa06d5
movq %rbx, %rdi
callq 0x576a0
testb %al, %al
je 0xa06e5
movl 0x64(%rbx), %eax
cmpl $0x7, %eax
jg 0xa0662
jmp 0xa06f2
movw $0x5, %ax
jmp 0xa06e9
movw $0x4, %ax
movw %ax, 0xf8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutputString(smooth::String const&)
S::Bool S::IO::OutStream::OutputString(const String &string)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		{ lastError = IO_ERROR_UNKNOWN; return False; }
	if (string == NIL)		{ lastError = IO_ERROR_BADPARAM; return False; }

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

	/* Convert the string to char * here once to avoid
	 * having to convert it again and again later.
	 */
	const char	*value		= string;

	Int		 bytesleft	= strlen(value);
	Int		 databufferpos	= 0;

	while (bytesleft)
	{
		Int	 amount = ((packageSize - currentBufferPos) < (bytesleft)) ? (packageSize - currentBufferPos) : (bytesleft);

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

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

		if (size < currentFilePos) size = currentFilePos;

		if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa07de
cmpl $0x0, 0x38(%rbx)
jle 0xa07d8
movq %rsi, %r14
movq %rsi, %rdi
xorl %esi, %esi
callq 0x55260
movw $0x2, %cx
testb %al, %al
jne 0xa07e2
cmpb $0x1, 0x60(%rbx)
jne 0xa075c
cmpb $0x0, 0x61(%rbx)
jne 0xa075c
movq %rbx, %rdi
callq 0x56380
movq %r14, %rdi
callq 0x585e0
movq %rax, %r14
movq %rax, %rdi
callq 0x56370
movq %rax, %r15
xorl %r13d, %r13d
testl %r15d, %r15d
sete %al
je 0xa07eb
movl 0x38(%rbx), %ebp
movslq 0x50(%rbx), %rax
subl %eax, %ebp
cmpl %r15d, %ebp
cmovgel %r15d, %ebp
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0xa079b
movq (%rcx), %rdi
jmp 0xa079d
xorl %edi, %edi
addq %rax, %rdi
movslq %r13d, %rsi
addq %r14, %rsi
movslq %ebp, %r12
movq %r12, %rdx
callq 0x552d0
addl %ebp, 0x50(%rbx)
addq 0x48(%rbx), %r12
movq %r12, 0x48(%rbx)
cmpq %r12, 0x10(%rbx)
jge 0xa07c6
movq %r12, 0x10(%rbx)
subl %ebp, %r15d
addl %ebp, %r13d
movq %rbx, %rdi
callq 0x576a0
testb %al, %al
jne 0xa0775
movw $0x4, %cx
jmp 0xa07e2
movw $0x5, %cx
movw %cx, 0xf8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutputData(void const*, int)
S::Bool S::IO::OutStream::OutputData(const Void *pointer, Int bytes)
{
	if (streamType == STREAM_NONE)	 { lastError = IO_ERROR_NOTOPEN; return False; }
	if (packageSize <= 0)		 { lastError = IO_ERROR_UNKNOWN; return False; }
	if (bytes > 0 && pointer == NIL) { lastError = IO_ERROR_BADPARAM; return False; }
	if (bytes < 0)			 { lastError = IO_ERROR_BADPARAM; return False; }

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

	Int	 bytesleft	= bytes;
	Int	 databufferpos	= 0;

	while (bytesleft)
	{
		Int	 amount = ((packageSize - currentBufferPos) < (bytesleft)) ? (packageSize - currentBufferPos) : (bytesleft);

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

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

		if (size < currentFilePos) size = currentFilePos;

		if (!WriteData()) { lastError = IO_ERROR_UNKNOWN; return False; }
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa0908
cmpl $0x0, 0x38(%rbx)
jle 0xa0902
movl %edx, %ebp
movq %rsi, %r14
testq %rsi, %rsi
sete %al
testl %edx, %edx
setg %cl
sets %dl
andb %al, %cl
orb %dl, %cl
movw $0x2, %ax
jne 0xa090c
cmpb $0x1, 0x60(%rbx)
jne 0xa089a
cmpb $0x0, 0x61(%rbx)
jne 0xa089a
movq %rbx, %rdi
callq 0x56380
xorl %r12d, %r12d
testl %ebp, %ebp
sete %al
je 0xa0915
movl 0x38(%rbx), %r13d
movslq 0x50(%rbx), %rax
subl %eax, %r13d
cmpl %ebp, %r13d
cmovgel %ebp, %r13d
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0xa08c4
movq (%rcx), %rdi
jmp 0xa08c6
xorl %edi, %edi
addq %rax, %rdi
movslq %r12d, %rsi
addq %r14, %rsi
movslq %r13d, %r15
movq %r15, %rdx
callq 0x552d0
addl %r13d, 0x50(%rbx)
addq 0x48(%rbx), %r15
movq %r15, 0x48(%rbx)
cmpq %r15, 0x10(%rbx)
jge 0xa08f0
movq %r15, 0x10(%rbx)
subl %r13d, %ebp
addl %r13d, %r12d
movq %rbx, %rdi
callq 0x576a0
testb %al, %al
jne 0xa089d
movw $0x4, %ax
jmp 0xa090c
movw $0x5, %ax
movw %ax, 0xf8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::SetPackageSize(int)
S::Bool S::IO::OutStream::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; }

	Flush();

	dataBuffer.Resize(newPackageSize);

	packageSize = newPackageSize;
	stdpacksize = packageSize;

	return True;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa095a
cmpb $0x0, 0x44(%rbx)
je 0xa0965
movl %esi, %ebp
testl %esi, %esi
jle 0xa0970
movq %rbx, %rdi
callq 0x58d30
leaq 0x20(%rbx), %rdi
movl %ebp, %esi
callq 0x62eaa
movl %ebp, 0x38(%rbx)
movl %ebp, 0x3c(%rbx)
movb $0x1, %al
jmp 0xa097b
movw $0x5, 0xf8(%rbx)
jmp 0xa0979
movw $0x6, 0xf8(%rbx)
jmp 0xa0979
movw $0x2, 0xf8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::SetFilter(smooth::IO::Filter*)
S::Bool S::IO::OutStream::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);

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

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

	Flush();

	filter = newFilter;

	allowpackset = True;

	if (filter->GetPackageSize() > 0)
	{
		SetPackageSize(filter->GetPackageSize());	// package size must be eqv filter size

		allowpackset = False;
	}
	else if (filter->GetPackageSize() == -1)
	{
		SetPackageSize(defaultPackageSize);

		allowpackset = False;
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa09a5
cmpq $0x0, 0xf0(%rbx)
je 0xa09b0
movw $0x2, 0xf8(%rbx)
jmp 0xa0a14
movw $0x5, 0xf8(%rbx)
jmp 0xa0a14
movq %rsi, %r14
movq 0xe8(%rbx), %rax
movq %rax, 0x10(%rsi)
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
testb %al, %al
je 0xa0a0b
cmpb $0x1, 0x60(%rbx)
jne 0xa09df
cmpb $0x0, 0x61(%rbx)
jne 0xa09df
movq %rbx, %rdi
callq 0x56380
movq %rbx, %rdi
callq 0x58d30
movq %r14, 0xf0(%rbx)
movb $0x1, 0x44(%rbx)
movl 0x8(%r14), %esi
testl %esi, %esi
jle 0xa0a1d
movq %rbx, %rdi
callq 0x56350
movb $0x0, 0x44(%rbx)
movb $0x1, %bpl
jmp 0xa0a16
movw $0x4, 0xf8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %bpl
cmpl $-0x1, %esi
jne 0xa0a16
movq 0xcbd9c(%rip), %rax     # 0x16c7c8
movl (%rax), %esi
movq %rbx, %rdi
callq 0x56350
movb $0x0, 0x44(%rbx)
jmp 0xa0a16
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::RemoveFilter()
S::Bool S::IO::OutStream::RemoveFilter()
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }
	if (filter == NIL)		{ lastError = IO_ERROR_BADPARAM; return False; }

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

	Int	 oldcpos = currentBufferPos;

	if (filter->GetPackageSize() > 0 && currentBufferPos != 0)
	{
		for (Int i = 0; i < (packageSize - oldcpos); i++) OutputNumber(0, 1);
	}
	else
	{
		if (filter->GetPackageSize() == -1) allowpackset = True;

		Flush();
	}

	allowpackset = True;

	filter->Deactivate();
	filter = NIL;

	SetPackageSize(origpacksize);

	return True;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa0a96
cmpq $0x0, 0xf0(%rbx)
je 0xa0aa1
cmpb $0x1, 0x60(%rbx)
jne 0xa0a68
cmpb $0x0, 0x61(%rbx)
jne 0xa0a68
movq %rbx, %rdi
callq 0x56380
movl 0x50(%rbx), %ebp
movq 0xf0(%rbx), %rax
movl 0x8(%rax), %eax
testl %eax, %eax
setle %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
je 0xa0aae
cmpl $-0x1, %eax
jne 0xa0a8c
movb $0x1, 0x44(%rbx)
movq %rbx, %rdi
callq 0x58d30
jmp 0xa0ad2
movw $0x5, 0xf8(%rbx)
jmp 0xa0aaa
movw $0x2, 0xf8(%rbx)
xorl %eax, %eax
jmp 0xa0afb
cmpl %ebp, 0x38(%rbx)
jle 0xa0ad2
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x55750
incl %r14d
movl 0x38(%rbx), %eax
subl %ebp, %eax
cmpl %eax, %r14d
jl 0xa0ab6
movb $0x1, 0x44(%rbx)
movq 0xf0(%rbx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0xf0(%rbx)
movl 0x40(%rbx), %esi
movq %rbx, %rdi
callq 0x56350
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::Close()
S::Bool S::IO::OutStream::Close()
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }

	while (filter != NIL) RemoveFilter();

	Flush();

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

		inStream->crosslinked	= False;
		inStream->outStream	= 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
jne 0xa0b23
movw $0x5, 0xf8(%rbx)
jmp 0xa0b84
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpq $0x0, 0xf0(%rbx)
jne 0xa0b1a
movq %rbx, %rdi
callq 0x58d30
cmpb $0x1, 0xa(%rbx)
jne 0xa0b66
cmpb $0x1, 0xb(%rbx)
jne 0xa0b4c
movq 0x100(%rbx), %rax
movb $0x1, 0xb(%rax)
movq 0x100(%rbx), %rax
xorl %ecx, %ecx
movb %cl, 0xa(%rax)
movq $0x0, 0x100(%rax)
movb %cl, 0xb(%rbx)
cmpb $0x1, 0xb(%rbx)
jne 0xa0b7e
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0xa0b7e
movq (%rdi), %rax
callq *0x8(%rax)
movw $0x0, 0x8(%rbx)
testw %bp, %bp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::Seek(long long)
S::Bool S::IO::OutStream::Seek(Int64 position)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }

	Flush();

	if (driver->Seek(position) == -1) return False;

	currentFilePos	 = position;
	currentBufferPos = 0;

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x8(%rdi)
je 0xa0bd0
movq %rsi, %r14
movq %rbx, %rdi
callq 0x58d30
movq 0xe8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
cmpq $-0x1, %rax
je 0xa0bd9
movq %r14, 0x48(%rbx)
movl $0x0, 0x50(%rbx)
movb $0x1, %al
jmp 0xa0bdb
movw $0x5, 0xf8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::Truncate(long long)
S::Bool S::IO::OutStream::Truncate(Int64 size)
{
	if (streamType == STREAM_NONE)	{ lastError = IO_ERROR_NOTOPEN; return False; }

	if (!driver->Truncate(size)) return False;

	Seek(size);

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpw $0x0, 0x8(%rdi)
je 0xa0c36
movq %rsi, %rbx
movq 0xe8(%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0xa0c40
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
movb $0x1, %al
jmp 0xa0c42
movw $0x5, 0xf8(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/stream.cpp
// Function: smooth::IO::Stream::Stream()
S::IO::Stream::Stream()
{
	streamType	 = STREAM_NONE;
	size		 = 0;

	currentFilePos	 = 0;
	currentBufferPos = 0;

	bitstreamActive	 = False;
	keepBits	 = False;
	bitLength	 = 0;

	closefile	 = True;
	crosslinked	 = False;

	driver		 = NIL;
	filter		 = NIL;

	allowpackset	 = True;
	packageSize	 = 1;
	stdpacksize	 = packageSize;
	origpacksize	 = packageSize;
	origsize	 = 0;
	origfilepos	 = 0;

	lastError	 = IO_ERROR_OK;

	memset(&bitBuffer, 0, sizeof(bitBuffer));
}

// Assembly:
movq 0xcbd4d(%rip), %rax     # 0x16c9a0
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0xc02cf(%rip), %rax     # 0x160f30
movq %rax, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movl $0x1000000, 0x8(%rdi)   # imm = 0x1000000
movups %xmm0, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x48(%rdi)
movl %eax, 0x50(%rdi)
movw %ax, 0x60(%rdi)
movl %eax, 0x64(%rdi)
movups %xmm0, 0xe8(%rdi)
movb $0x1, 0x44(%rdi)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x38(%rdi)
movl $0x1, 0x40(%rdi)
movq %rax, 0x58(%rdi)
movw %ax, 0xf8(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x88(%rdi)
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
movups %xmm0, 0xb8(%rdi)
movups %xmm0, 0xc8(%rdi)
movups %xmm0, 0xd8(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_ansi.cpp
// Function: smooth::IO::DriverANSI::ReadData(unsigned char*, int)
S::Int S::IO::DriverANSI::ReadData(UnsignedByte *data, Int dataSize)
{
	if (!stream || dataSize <= 0) return 0;

	/* Switch between read and write mode.
	 */
	if (position == -1) fseeko(stream, 0, SEEK_CUR);

	position = 1;

	/* Perform actual read operation.
	 */
	return fread(data, 1, dataSize, stream);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
sete %cl
testl %edx, %edx
setle %dl
xorl %eax, %eax
orb %cl, %dl
jne 0xa1041
movq %rsi, %rbx
cmpq $-0x1, 0x10(%r14)
jne 0xa1026
xorl %esi, %esi
movl $0x1, %edx
callq 0x551e0
movq $0x1, 0x10(%r14)
movl %ebp, %edx
movq 0x38(%r14), %rcx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x56a20
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_ansi.cpp
// Function: smooth::IO::DriverANSI::WriteData(unsigned char const*, int)
S::Int S::IO::DriverANSI::WriteData(const UnsignedByte *data, Int dataSize)
{
	if (!stream || dataSize <= 0) return 0;

	/* Switch between read and write mode.
	 */
	if (position == 1) fseeko(stream, 0, SEEK_CUR);

	position = -1;

	/* Perform actual write operation.
	 */
	return fwrite(data, 1, dataSize, stream);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
sete %cl
testl %edx, %edx
setle %dl
xorl %eax, %eax
orb %cl, %dl
jne 0xa1095
movq %rsi, %rbx
cmpq $0x1, 0x10(%r14)
jne 0xa107a
xorl %esi, %esi
movl $0x1, %edx
callq 0x551e0
movq $-0x1, 0x10(%r14)
movl %ebp, %edx
movq 0x38(%r14), %rcx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x588d0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_ansi.cpp
// Function: smooth::IO::DriverANSI::GetSize() const
S::Int64 S::IO::DriverANSI::GetSize() const
{
	if (!stream) return -1;

	Int64	 oldPos = GetPos();

	if (fseeko(stream,      0, SEEK_END) != 0) return -1;

	Int64	 size = GetPos();

	if (fseeko(stream, oldPos, SEEK_SET) != 0) return -1;

	return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq $-0x1, %rbx
cmpq $0x0, 0x38(%rdi)
je 0xa11b4
movq %rdi, %r14
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r15
movq 0x38(%r14), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x551e0
testl %eax, %eax
jne 0xa11b4
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
movq %rax, %r12
movq 0x38(%r14), %rdi
xorl %ebx, %ebx
movq %r15, %rsi
xorl %edx, %edx
callq 0x551e0
negl %eax
sbbq %rbx, %rbx
orq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_ansi.cpp
// Function: smooth::IO::DriverANSI::SetBufferSize(int)
S::Bool S::IO::DriverANSI::SetBufferSize(Int size)
{
	if (!stream) return False;

	Int64	 pos  = GetPos();
	Int	 mode = size > 0 ? _IOFBF : _IONBF;

	if (setvbuf(stream, NULL, mode, size) != 0) return False;
	if (Seek(pos) < 0)			    return False;

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x38(%rdi)
je 0xa122d
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r14
xorl %edx, %edx
testl %ebp, %ebp
setle %dl
addl %edx, %edx
movq 0x38(%rbx), %rdi
movslq %ebp, %rcx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x56640
testl %eax, %eax
jne 0xa1230
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x20(%rax)
testq %rax, %rax
setns %r15b
jmp 0xa1230
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_memory.cpp
// Function: smooth::IO::DriverMemory::ReadData(unsigned char*, int)
S::Int S::IO::DriverMemory::ReadData(UnsignedByte *data, Int dataSize)
{
	if (dataSize <= 0) return 0;

	dataSize = Math::Min(dataSize, size - position);

	memcpy(data, (unsigned char *) stream + position, dataSize);

	position += dataSize;

	return dataSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %edx, %edx
jle 0xa1943
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rax, %rcx
cmpl %edx, %ecx
movl %edx, %r14d
cmovleq %rcx, %r14
addq 0x38(%rdi), %rax
movslq %r14d, %r15
movq %rsi, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x552d0
addq %r15, 0x10(%rbx)
jmp 0xa1946
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_memory.cpp
// Function: smooth::IO::DriverMemory::WriteData(unsigned char const*, int)
S::Int S::IO::DriverMemory::WriteData(const UnsignedByte *data, Int dataSize)
{
	if (dataSize <= 0) return 0;

	dataSize = Math::Min(dataSize, size - position);

	memcpy((unsigned char *) stream + position, data, dataSize);

	position += dataSize;

	return dataSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %edx, %edx
jle 0xa1985
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rdi
subq %rdi, %rax
cmpl %edx, %eax
movl %edx, %r14d
cmovleq %rax, %r14
addq 0x38(%rbx), %rdi
movslq %r14d, %r15
movq %r15, %rdx
callq 0x552d0
addq %r15, 0x10(%rbx)
jmp 0xa1988
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_posix.cpp
// Function: smooth::IO::DriverPOSIX::GetSize() const
S::Int64 S::IO::DriverPOSIX::GetSize() const
{
	if (stream == -1) return -1;

	Int64	 oldPos = GetPos();
	Int64	 size = lseek64(stream, 0, SEEK_END);

	lseek64(stream, oldPos, SEEK_SET);

	return size;
}

// Assembly:
cmpl $-0x1, 0x38(%rdi)
je 0xa1cad
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r14
movl 0x38(%rbx), %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x58110
movq %rax, %r15
movl 0x38(%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x58110
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq $-0x1, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_socket.cpp
// Function: smooth::IO::DriverSocket::DriverSocket(smooth::String const&, int)
S::IO::DriverSocket::DriverSocket(const String &hostName, Int port) : Driver()
{
	closeStream = False;

	stream	    = -1;
	size	    = -1;

	mode	    = MODE_SOCKET_BLOCKING;
	timeout	    = 0;

	if (hostName.Length() > 255) { lastError = IO_ERROR_BADPARAM; return; }

	/* Open TCP/IP socket.
	 */
	stream = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

	if (stream == (unsigned) (~0)) { lastError = IO_ERROR_UNEXPECTED; return; }

	closeStream = True;

	/* Get server hostname.
	 */
	hostent		*host = gethostbyname(hostName);

	if (host == NIL) { Close(); lastError = IO_ERROR_UNEXPECTED; return; }

	/* Connect to server.
	 */
	sockaddr_in	 saddr;

	saddr.sin_family = AF_INET;
	saddr.sin_addr	 = *((in_addr *) *host->h_addr_list);
	saddr.sin_port	 = htons((short) port);

	memset(&saddr.sin_zero, 0, sizeof(saddr.sin_zero));

	if (connect(stream, (sockaddr *) &saddr, sizeof(struct sockaddr)) == -1) { Close(); lastError = IO_ERROR_UNEXPECTED; return; }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x58560
movq 0xca688(%rip), %rax     # 0x16c378
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x0, 0x3c(%rbx)
movl $0xffffffff, 0x38(%rbx) # imm = 0xFFFFFFFF
movq $-0x1, 0x8(%rbx)
movq $0x0, 0x40(%rbx)
movl $0x0, 0x48(%rbx)
movq %r14, %rdi
callq 0x57180
cmpl $0x100, %eax            # imm = 0x100
jl 0xa1d34
movl $0x2, 0x18(%rbx)
jmp 0xa1dba
movl $0x2, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x56660
movl %eax, 0x38(%rbx)
cmpl $-0x1, %eax
je 0xa1db3
movb $0x1, 0x3c(%rbx)
movq %r14, %rdi
callq 0x585e0
movq %rax, %rdi
callq 0x56530
testq %rax, %rax
je 0xa1daa
movq %rsp, %rsi
movw $0x2, (%rsi)
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
rolw $0x8, %bp
movl %eax, 0x4(%rsi)
movw %bp, 0x2(%rsi)
movq $0x0, 0x8(%rsi)
movl 0x38(%rbx), %edi
movl $0x10, %edx
callq 0x56230
cmpl $-0x1, %eax
jne 0xa1dba
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
jmp 0xa1db3
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movl $0x3, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xa1dc7
jmp 0xa1dc7
movq %rax, %r14
movq %rbx, %rdi
callq 0x56c30
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/drivers/driver_socket.cpp
// Function: smooth::IO::DriverSocket::DriverSocket(unsigned int)
S::IO::DriverSocket::DriverSocket(unsigned int iStream) : Driver()
{
	size	    = -1;

	stream	    = iStream;
	closeStream = False;
	timeout	    = 0;

	SetMode(MODE_SOCKET_BLOCKING);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x58560
movq 0xca589(%rip), %rax     # 0x16c378
addq $0x10, %rax
movq %rax, (%r14)
movq $-0x1, 0x8(%r14)
movl %ebx, 0x38(%r14)
movb $0x0, 0x3c(%r14)
movl $0x0, 0x48(%r14)
movq $0x0, 0x40(%r14)
addq $0x40, %r14
movl $0x5421, %esi           # imm = 0x5421
movl %ebx, %edi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55560
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/filters/filter_bzip2.cpp
// Function: smooth::IO::FilterBZip2::WriteData(smooth::Buffer<unsigned char> const&)
S::Int S::IO::FilterBZip2::WriteData(const Buffer<UnsignedByte> &data)
{
	if (driver == NIL) return -1;

	int		 outsize = data.Size() + data.Size() / 100 + 1000;
	unsigned char	*dest = new unsigned char [outsize];

	BZ2_bzBuffToBuffCompress((char *) dest, (unsigned int *) &outsize, const_cast<char *>((const char *) (const UnsignedByte *) data), data.Size(), 5, 0, 0);

	driver->WriteData(dest, outsize);

	delete [] dest;

	return outsize;
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0xa2bfc
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movslq 0x10(%rsi), %r14
imulq $0x51eb851f, %r14, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
addl %r14d, %eax
addl $0x3e8, %eax            # imm = 0x3E8
movl %eax, 0x14(%rsp)
movslq %eax, %rdi
callq 0x56670
movq %rax, %r15
movq 0x8(%r12), %rax
testq %rax, %rax
je 0xa2c02
movq (%rax), %rdx
jmp 0xa2c04
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %edx, %edx
movl $0x0, (%rsp)
leaq 0x14(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %ecx
movl $0x5, %r8d
xorl %r9d, %r9d
callq 0x552c0
movq 0x10(%rbx), %rdi
movl (%r12), %edx
movq (%rdi), %rax
movq %r15, %rsi
callq *0x18(%rax)
movq %r15, %rdi
callq 0x561e0
movl (%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/filters/filter_bzip2.cpp
// Function: smooth::IO::FilterBZip2::ReadData(smooth::Buffer<unsigned char>&)
S::Int S::IO::FilterBZip2::ReadData(Buffer<UnsignedByte> &data)
{
	if (driver == NIL) return -1;

	/* Try guessing the size of uncompressed data.
	 */
	int	 size = data.Size();
	int	 outsize;

	if	(size < (200 * 1024))	    outsize = size * 100 + 10000;
	else if (size > (20 * 1024 * 1024)) outsize = size *   5 + 10000;
	else				    outsize = size *  10 + 10000;

	/* Now decompress.
	 */
	unsigned char	*src = new unsigned char [size];

	driver->ReadData(src, size);

	data.Resize(outsize);

	BZ2_bzBuffToBuffDecompress((char *) (UnsignedByte *) data, (unsigned int *) &outsize, (char *) src, size, 0, 0);

	delete [] src;

	return outsize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0xa2c7b
movq %rsi, %r14
movslq 0x10(%rsi), %rbx
cmpq $0x31fff, %rbx          # imm = 0x31FFF
jg 0xa2c82
imull $0x64, %ebx, %eax
addl $0x2710, %eax           # imm = 0x2710
jmp 0xa2c9e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa2cfa
cmpl $0x1400001, %ebx        # imm = 0x1400001
jl 0xa2c94
leal (%rbx,%rbx,4), %eax
addl $0x2710, %eax           # imm = 0x2710
jmp 0xa2c9e
leal (%rbx,%rbx,4), %eax
leal 0x2710(,%rax,2), %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
callq 0x56670
movq %rax, %r12
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq *0x10(%rax)
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x62eaa
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xa2cd5
movq (%rax), %rdi
jmp 0xa2cd7
xorl %edi, %edi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
movq %r12, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x57970
movq %r12, %rdi
callq 0x561e0
movl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/io/filters/filter_xor.cpp
// Function: smooth::IO::FilterXOR::ReadData(smooth::Buffer<unsigned char>&)
S::Int S::IO::FilterXOR::ReadData(Buffer<UnsignedByte> &data)
{
	if (driver == NIL) return -1;

	driver->ReadData(data, data.Size());

	Int	 value = (data[3] + 256 * data[2] + 65536 * data[1] + 16777216 * data[0]) ^ modifier;

	data[0] = (value >> 24) & 255;
	data[1] = (value >> 16) & 255;
	data[2] = (value >>  8) & 255;
	data[3] =  value	& 255;

	return data.Size();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xa2da7
movq %rsi, %rbx
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0xa2dae
movq (%rax), %rsi
jmp 0xa2db0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa2e0d
xorl %esi, %esi
movl 0x10(%rbx), %edx
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movzwl 0x2(%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rcx), %edx
shll $0x10, %edx
orl %eax, %edx
movzbl (%rcx), %eax
shll $0x18, %eax
orl %edx, %eax
xorl 0x18(%r14), %eax
movl %eax, %edx
shrl $0x18, %edx
movb %dl, (%rcx)
movl %eax, %ecx
shrl $0x10, %ecx
movq 0x8(%rbx), %rdx
movq (%rdx), %rdx
movb %cl, 0x1(%rdx)
movq 0x8(%rbx), %rcx
movq (%rcx), %rcx
movb %ah, 0x2(%rcx)
movq 0x8(%rbx), %rcx
movq (%rcx), %rcx
movb %al, 0x3(%rcx)
movl 0x10(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/misc/args.cpp
// Function: smooth::ArgumentsParser::ArgumentsParser(int, char**)
S::ArgumentsParser::ArgumentsParser(int argc, char **argv)
{
	command = argv[0];

	for (Int i = 1; i < argc; i++)
	{
#ifdef __APPLE__
		if (strncmp(argv[i], "-psn_", 5) == 0) continue;
#endif

		args.Add(argv[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x58e20
leaq 0x18(%rbx), %r14
movq %r14, %rdi
callq 0x55d90
leaq 0xbe444(%rip), %rax     # 0x161290
movq %rax, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
leaq 0xbe392(%rip), %rax     # 0x1611f0
movq %rax, 0x18(%rbx)
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x55f40
cmpl $0x2, %ebp
jl 0xa2ea4
movl %ebp, %r13d
movl $0x1, %ebp
movq %rsp, %r12
movq (%r15,%rbp,8), %rsi
movq %r12, %rdi
callq 0x579f0
movq %r14, %rdi
movq %r12, %rsi
callq 0x64280
movq %r12, %rdi
callq 0x59200
incq %rbp
cmpq %rbp, %r13
jne 0xa2e7d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa2eba
movq %rax, %r15
jmp 0xa2ed2
movq %rax, %r15
jmp 0xa2eca
movq %rax, %r15
movq %rsp, %rdi
callq 0x59200
movq %r14, %rdi
callq 0x63e08
movq %rbx, %rdi
callq 0x59200
movq %r15, %rdi
callq 0x57090