// File: /workspace/github_c_makefile_star2_O0/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
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 0x1233b9(%rip), %rcx    # 0x208390
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x100(%rax)
cmpl $0x3, -0xc(%rbp)
je 0xe5004
movq -0x198(%rbp), %rax
movw $0x2, 0xf8(%rax)
jmp 0xe5313
movq -0x18(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x118(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xe501f
movq -0x1a0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq -0x118(%rbp), %rdx
callq 0x5d860
jmp 0xe503b
leaq -0x100(%rbp), %rdi
callq 0x59570
movb %al, -0x1a1(%rbp)
jmp 0xe504f
leaq -0x100(%rbp), %rdi
callq 0x5df10
leaq -0x118(%rbp), %rdi
callq 0x5df00
movb -0x1a1(%rbp), %al
testb $0x1, %al
jne 0xe5073
jmp 0xe50e2
movq -0x198(%rbp), %rax
movw $0x2, 0xf8(%rax)
jmp 0xe5313
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe531c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe50d1
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 0xe531c
movl $0x48, %edi
callq 0x59820
movq %rax, -0x1b0(%rbp)
jmp 0xe50f5
movb $0x1, -0x189(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x188(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xe5117
movq -0x1b8(%rbp), %rsi
leaq -0x170(%rbp), %rdi
leaq -0x188(%rbp), %rdx
callq 0x5acf0
jmp 0xe5133
leaq -0x140(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x5dc70
jmp 0xe5148
movq -0x1b0(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq -0x140(%rbp), %rsi
callq 0x5cb60
jmp 0xe5160
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 0xe51bb
movl -0x1bc(%rbp), %eax
cmpl $0x0, %eax
je 0xe52af
movq -0x198(%rbp), %rax
movq 0xe8(%rax), %rdi
callq 0x591e0
movl %eax, -0x1c0(%rbp)
jmp 0xe51e5
movq -0x198(%rbp), %rax
movl -0x1c0(%rbp), %ecx
movw %cx, 0xf8(%rax)
movq 0xe8(%rax), %rax
movq %rax, -0x1c8(%rbp)
cmpq $0x0, %rax
je 0xe521a
movq -0x1c8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xe5313
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe5291
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe5285
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0xe5279
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 0xe529c
jmp 0xe52ad
movq -0x1b0(%rbp), %rdi
movl $0x48, %esi
callq 0x595b0
jmp 0xe531c
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 0xe52d5
movq -0x198(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq 0x123792(%rip), %rcx    # 0x208a80
movl (%rcx), %ecx
movl %ecx, 0x38(%rax)
movl 0x38(%rax), %ecx
movl %ecx, 0x3c(%rax)
movl 0x38(%rax), %ecx
movl %ecx, 0x40(%rax)
movq 0x12377a(%rip), %rcx    # 0x208a80
movl (%rcx), %ecx
movl %ecx, 0x50(%rax)
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rax)
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x5ba70
movq -0x120(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)