// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/graphics/imageloader/pci.cpp
// Function: smooth::GUI::ImageLoaderPCI::Load()
const S::GUI::Bitmap &S::GUI::ImageLoaderPCI::Load()
{
	/* Make sure bitmap is initialized.
	 */
	bitmap = NIL;

	/* Load PCI file.
	 */
	String	 pciFile = fileName;
	String	 idString;

	pciFile[fileName.ToLower().Find(".pci:") + 4] = 0;

	for (Int i = 0; i < fileName.Length() - fileName.ToLower().Find(".pci:") - 5; i++) idString[i] = fileName[fileName.ToLower().Find(".pci:") + 5 + i];

	Int	 id = idString.ToInt();
	PCIIn	 pci = OpenPCIForInput(pciFile);

	if (pci->GetLastError() != IO::IO_ERROR_OK)
	{
		ClosePCI(pci);

		return bitmap;
	}

	PCIIO	*pio = new PCIIO();

	pio->SelectImage(id);
	pio->ReadPCI(pci);

	ClosePCI(pci);

	bitmap = pio->GetBitmap();

	delete pio;

	return bitmap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
addq $0x40, %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x56740
addq $0x8, %r14
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x58090
leaq 0x91118(%rip), %rsi     # 0xf361b
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x57610
addl $0x4, %eax
leaq 0x50(%rsp), %rdi
movl %eax, %esi
callq 0x58990
movl $0x0, (%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x59200
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x59200
movl $0x5, %r13d
movq %r14, %rdi
callq 0x57180
movl %eax, %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x58090
movq %r15, %rdi
leaq 0x910ab(%rip), %rsi     # 0xf361b
callq 0x579f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x57610
leal -0x5(%r13), %ebx
subl %eax, %ebp
addl $-0x5, %ebp
movq %r15, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
cmpl %ebp, %ebx
jge 0x625f7
movq %r12, %rdi
movq %r14, %rsi
callq 0x58090
movq %r15, %rdi
leaq 0x91069(%rip), %rsi     # 0xf361b
callq 0x579f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x57610
addl %r13d, %eax
movq %r14, %rdi
movl %eax, %esi
callq 0x58990
movl (%rax), %ebp
leaq 0x38(%rsp), %rdi
movl %ebx, %esi
callq 0x58990
movl %ebp, (%rax)
movq %r15, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
incl %r13d
jmp 0x62551
leaq 0x38(%rsp), %rdi
callq 0x568c0
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0xb9ed2
movq %rax, %rbx
cmpw $0x0, 0xf8(%rax)
je 0x62625
movq %rbx, %rdi
callq 0xb9f1e
jmp 0x62681
movl $0x70, %edi
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
callq 0xb9c02
movq %r14, %rdi
movl %r15d, %esi
callq 0xb9e26
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba598
movq %rbx, %rdi
callq 0xb9f1e
movq %r14, %rdi
callq 0xb9e38
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x582c0
movq %r14, %rdi
callq 0xb9dbe
movl $0x70, %esi
movq %r14, %rdi
callq 0x55480
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x50(%rsp), %rdi
callq 0x59200
movq (%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x70, %esi
movq %r14, %rdi
callq 0x55480
jmp 0x626f4
jmp 0x626d1
jmp 0x626d6
jmp 0x626d1
movq %rax, %rbx
jmp 0x626fe
jmp 0x626d1
jmp 0x626dd
jmp 0x626d1
jmp 0x626d6
jmp 0x626d1
jmp 0x626d1
movq %rax, %rbx
jmp 0x626f4
movq %rax, %rbx
jmp 0x626ea
jmp 0x626dd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x50(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090