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

	do
	{
		static String	 nameTag = "NAME";

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

			if (in->InputNumber(4) == imageid)
			{
				imagename = in->InputString(in->InputNumber(4) - 14);

				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 $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *0x28(%rax)
cmpb $0x0, 0xf8b60(%rip)     # 0x214730
jne 0x11bc1e
leaq 0xf8b57(%rip), %rdi     # 0x214730
callq 0x5a4e0
cmpl $0x0, %eax
je 0x11bc1e
leaq 0xf8b2e(%rip), %rdi     # 0x214718
leaq 0x8af57(%rip), %rsi     # 0x1a6b48
callq 0x5c1f0
jmp 0x11bbf8
movq 0xed329(%rip), %rdi     # 0x208f28
leaq 0xf8b12(%rip), %rsi     # 0x214718
leaq 0xefaf3(%rip), %rdx     # 0x20b700
callq 0x5c700
leaq 0xf8b17(%rip), %rdi     # 0x214730
callq 0x5b0c0
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movl $0x4, %edx
callq 0x5d4f0
movq -0x70(%rbp), %rdi
leaq 0xf8ad9(%rip), %rsi     # 0x214718
callq 0x5d070
movl %eax, -0x64(%rbp)
jmp 0x11bc49
leaq -0x40(%rbp), %rdi
callq 0x5df00
movl -0x64(%rbp), %eax
cmpl $0x0, %eax
jne 0x11bd59
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x60(%rbp), %rcx
movslq 0x68(%rcx), %rcx
cmpq %rcx, %rax
jne 0x11bd2a
movq -0x18(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movl $0x4, %esi
callq 0x5a170
movq -0x80(%rbp), %rsi
movl %eax, %edx
addl $-0xe, %edx
leaq -0x58(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x5d4f0
movq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x38, %rdi
callq 0x59760
jmp 0x11bcc7
leaq -0x58(%rbp), %rdi
callq 0x5df00
movb $0x1, -0x1(%rbp)
jmp 0x11bdc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq 0xf8a44(%rip), %rdi     # 0x214730
callq 0x5a860
jmp 0x11bdd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5df00
jmp 0x11bdd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5df00
jmp 0x11bdd5
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x88(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11bd95
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movl $0x6, %esi
callq *0x30(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5a170
movq -0x90(%rbp), %rdi
movq %rax, %rsi
subq $0xe, %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0x11bd97
movq -0x18(%rbp), %rdi
callq 0x5a580
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5da70
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jg 0x11bbc9
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x5b6b0
nop