// File: /workspace/github_c_makefile_star2_O1/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 0x92154(%rip), %rsi     # 0xf45c3
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 0x920e7(%rip), %rsi     # 0xf45c3
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 0x62563
movq %r12, %rdi
movq %r14, %rsi
callq 0x58090
movq %r15, %rdi
leaq 0x920a5(%rip), %rsi     # 0xf45c3
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 0x624bd
leaq 0x38(%rsp), %rdi
callq 0x568c0
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0xbad22
movq %rax, %rbx
cmpw $0x0, 0xf8(%rax)
je 0x62591
movq %rbx, %rdi
callq 0xbad6e
jmp 0x625ed
movl $0x70, %edi
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
callq 0xbaa52
movq %r14, %rdi
movl %r15d, %esi
callq 0xbac76
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbb3e8
movq %rbx, %rdi
callq 0xbad6e
movq %r14, %rdi
callq 0xbac88
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x582c0
movq %r14, %rdi
callq 0xbac0e
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 0x62660
jmp 0x6263d
jmp 0x62642
jmp 0x6263d
movq %rax, %rbx
jmp 0x6266a
jmp 0x6263d
jmp 0x62649
jmp 0x6263d
jmp 0x62642
jmp 0x6263d
jmp 0x6263d
movq %rax, %rbx
jmp 0x62660
movq %rax, %rbx
jmp 0x62656
jmp 0x62649
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