// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/io/outstream.cpp
// Function: smooth::IO::OutStream::OutStream(int, smooth::String const&, int)
S::IO::OutStream::OutStream(Int type, const String &fileName, Int mode)
{
	inStream	= 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();
	currentFilePos	= size;

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

	dataBuffer.Resize(packageSize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x5af00
movq -0x198(%rbp), %rax
movq 0x121e09(%rip), %rcx    # 0x208b80
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x100(%rax)
cmpl $0x3, -0xc(%rbp)
je 0xe6da4
movq -0x198(%rbp), %rax
movw $0x2, 0xf8(%rax)
jmp 0xe70b8
movq -0x18(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x118(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xe6dbf
movq -0x1a0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq -0x118(%rbp), %rdx
callq 0x5d860
jmp 0xe6ddb
leaq -0x100(%rbp), %rdi
callq 0x59570
movb %al, -0x1a1(%rbp)
jmp 0xe6def
leaq -0x100(%rbp), %rdi
callq 0x5df10
leaq -0x118(%rbp), %rdi
callq 0x5df00
movb -0x1a1(%rbp), %al
testb $0x1, %al
jne 0xe6e13
jmp 0xe6e82
movq -0x198(%rbp), %rax
movw $0x2, 0xf8(%rax)
jmp 0xe70b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe70c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe6e71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x5df10
leaq -0x118(%rbp), %rdi
callq 0x5df00
jmp 0xe70c1
movl $0x48, %edi
callq 0x59820
movq %rax, -0x1b0(%rbp)
jmp 0xe6e95
movb $0x1, -0x189(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x188(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xe6eb7
movq -0x1b8(%rbp), %rsi
leaq -0x170(%rbp), %rdi
leaq -0x188(%rbp), %rdx
callq 0x5acf0
jmp 0xe6ed3
leaq -0x140(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x5dc70
jmp 0xe6ee8
movq -0x1b0(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq -0x140(%rbp), %rsi
callq 0x5cb60
jmp 0xe6f00
movq -0x198(%rbp), %rax
movq -0x1b0(%rbp), %rcx
movb $0x0, -0x189(%rbp)
movq %rcx, 0xe8(%rax)
leaq -0x140(%rbp), %rdi
callq 0x5df00
leaq -0x170(%rbp), %rdi
callq 0x5de78
leaq -0x188(%rbp), %rdi
callq 0x5df00
movq -0x198(%rbp), %rax
movq 0xe8(%rax), %rdi
callq 0x591e0
movl %eax, -0x1bc(%rbp)
jmp 0xe6f5b
movl -0x1bc(%rbp), %eax
cmpl $0x0, %eax
je 0xe704f
movq -0x198(%rbp), %rax
movq 0xe8(%rax), %rdi
callq 0x591e0
movl %eax, -0x1c0(%rbp)
jmp 0xe6f85
movq -0x198(%rbp), %rax
movl -0x1c0(%rbp), %ecx
movw %cx, 0xf8(%rax)
movq 0xe8(%rax), %rax
movq %rax, -0x1c8(%rbp)
cmpq $0x0, %rax
je 0xe6fba
movq -0x1c8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xe70b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe7031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe7025
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe7019
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x5df00
leaq -0x170(%rbp), %rdi
callq 0x5de78
leaq -0x188(%rbp), %rdi
callq 0x5df00
testb $0x1, -0x189(%rbp)
jne 0xe703c
jmp 0xe704d
movq -0x1b0(%rbp), %rdi
movl $0x48, %esi
callq 0x595b0
jmp 0xe70c1
movq -0x198(%rbp), %rax
movw $0x2, 0x8(%rax)
movq 0xe8(%rax), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq %rax, -0x1d0(%rbp)
jmp 0xe7075
movq -0x198(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
movq %rcx, 0x48(%rax)
movq 0x12170a(%rip), %rcx    # 0x2087a0
movl (%rcx), %ecx
movl %ecx, 0x38(%rax)
movl 0x38(%rax), %ecx
movl %ecx, 0x3c(%rax)
movl 0x38(%rax), %ecx
movl %ecx, 0x40(%rax)
movq %rax, %rdi
addq $0x20, %rdi
movl 0x38(%rax), %esi
callq 0x72e00
jmp 0xe70b8
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x5ba70
movq -0x120(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)