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

	do
	{
		static String	 resoTag = "RESO";

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

			if (in->InputNumber(4) == imageid)
			{
				if (in->InputNumber(4) != 30)	return false;
				else
				{
					sizex = in->InputNumber(4);
					sizey = in->InputNumber(4);
					dpix = in->InputNumber(4);
					dpiy = in->InputNumber(4);

					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 $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *0x28(%rax)
cmpb $0x0, 0xf9583(%rip)     # 0x2146d0
jne 0x11b19b
leaq 0xf957a(%rip), %rdi     # 0x2146d0
callq 0x5a4e0
cmpl $0x0, %eax
je 0x11b19b
leaq 0xf9551(%rip), %rdi     # 0x2146b8
leaq 0x8b58d(%rip), %rsi     # 0x1a66fb
callq 0x5c1f0
jmp 0x11b175
movq 0xeddac(%rip), %rdi     # 0x208f28
leaq 0xf9535(%rip), %rsi     # 0x2146b8
leaq 0xf0576(%rip), %rdx     # 0x20b700
callq 0x5c700
leaq 0xf953a(%rip), %rdi     # 0x2146d0
callq 0x5b0c0
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movl $0x4, %edx
callq 0x5d4f0
movq -0x58(%rbp), %rdi
leaq 0xf94fc(%rip), %rsi     # 0x2146b8
callq 0x5d070
movl %eax, -0x4c(%rbp)
jmp 0x11b1c6
leaq -0x40(%rbp), %rdi
callq 0x5df00
movl -0x4c(%rbp), %eax
cmpl $0x0, %eax
jne 0x11b2ef
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x48(%rbp), %rcx
movslq 0x68(%rcx), %rcx
cmpq %rcx, %rax
jne 0x11b2c6
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
cmpq $0x1e, %rax
je 0x11b25d
movb $0x0, -0x1(%rbp)
jmp 0x11b351
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq 0xf9497(%rip), %rdi     # 0x2146d0
callq 0x5a860
jmp 0x11b35c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5df00
jmp 0x11b35c
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl %ecx, 0x1c(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x11b351
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x60(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11b325
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x6, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x68(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11b327
movq -0x18(%rbp), %rdi
callq 0x5a580
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5da70
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jg 0x11b146
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)