// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/misc/pciio.cpp
// Function: PCIIO::ReadDATATAG(smooth::IO::InStream*)
bool PCIIO::ReadDATATAG(PCIIn in)
{
	in->Seek(0);

	do
	{
		static String	 dataTag = "DATA";

		if (in->InputString(4).Compare(dataTag) == 0)
		{
			in->RelSeek(2);

			if (in->InputNumber(4) == imageid)
			{
				in->RelSeek(4);

				bmp.CreateBitmap(Size(sizex, sizey));

				DecompressPCI(in);

				return true;
			}
			else
			{
				in->RelSeek(in->InputNumber(4) - 14);
			}
		}
		else
		{
			in->RelSeek(6);

			in->RelSeek(in->InputNumber(4) - 14);
		}
	}
	while (in->Size() > in->GetPos());

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *0x28(%rax)
cmpb $0x0, 0xf8da0(%rip)     # 0x214750
jne 0x11b9fe
leaq 0xf8d97(%rip), %rdi     # 0x214750
callq 0x5a4e0
cmpl $0x0, %eax
je 0x11b9fe
leaq 0xf8d6e(%rip), %rdi     # 0x214738
leaq 0x8ad34(%rip), %rsi     # 0x1a6705
callq 0x5c1f0
jmp 0x11b9d8
movq 0xed549(%rip), %rdi     # 0x208f28
leaq 0xf8d52(%rip), %rsi     # 0x214738
leaq 0xefd13(%rip), %rdx     # 0x20b700
callq 0x5c700
leaq 0xf8d57(%rip), %rdi     # 0x214750
callq 0x5b0c0
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movl $0x4, %edx
callq 0x5d4f0
movq -0x60(%rbp), %rdi
leaq 0xf8d19(%rip), %rsi     # 0x214738
callq 0x5d070
movl %eax, -0x54(%rbp)
jmp 0x11ba29
leaq -0x40(%rbp), %rdi
callq 0x5df00
movl -0x54(%rbp), %eax
cmpl $0x0, %eax
jne 0x11bb21
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x50(%rbp), %rcx
movslq 0x68(%rcx), %rcx
cmpq %rcx, %rax
jne 0x11baf8
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0x30(%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x68(%rbp)
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
leaq -0x48(%rbp), %rdi
callq 0x59260
movq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5c4d0
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x115680
movb $0x1, -0x1(%rbp)
jmp 0x11bb83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq 0xf8c7c(%rip), %rdi     # 0x214750
callq 0x5a860
jmp 0x11bb91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5df00
jmp 0x11bb91
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x70(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11bb57
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x6, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x78(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11bb59
movq -0x18(%rbp), %rdi
callq 0x5a580
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5da70
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jg 0x11b9a9
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)