// File: /workspace/github_c_makefile_star2_O2/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 0x57880
addq $0x8, %r14
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x59320
leaq 0x8048e(%rip), %rsi     # 0xe35e3
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x58830
addl $0x4, %eax
leaq 0x50(%rsp), %rdi
movl %eax, %esi
callq 0x59cc0
andl $0x0, (%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x5a588
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x5a588
pushq $0x5
popq %r13
movq %r14, %rdi
callq 0x58370
movl %eax, %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x59320
movq %r15, %rdi
leaq 0x80426(%rip), %rsi     # 0xe35e3
callq 0x58c40
movq %r12, %rdi
movq %r15, %rsi
callq 0x58830
leal -0x5(%r13), %ebx
subl %eax, %ebp
addl $-0x5, %ebp
movq %r15, %rdi
callq 0x5a588
movq %r12, %rdi
callq 0x5a588
cmpl %ebp, %ebx
jge 0x63244
movq %r12, %rdi
movq %r14, %rsi
callq 0x59320
movq %r15, %rdi
leaq 0x803e4(%rip), %rsi     # 0xe35e3
callq 0x58c40
movq %r12, %rdi
movq %r15, %rsi
callq 0x58830
addl %r13d, %eax
movq %r14, %rdi
movl %eax, %esi
callq 0x59cc0
movl (%rax), %ebp
leaq 0x38(%rsp), %rdi
movl %ebx, %esi
callq 0x59cc0
movl %ebp, (%rax)
movq %r15, %rdi
callq 0x5a588
movq %r12, %rdi
callq 0x5a588
incl %r13d
jmp 0x6319e
leaq 0x38(%rsp), %rdi
callq 0x57a10
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0xb419a
movq %rax, %rbx
cmpw $0x0, 0xf8(%rax)
je 0x63272
movq %rbx, %rdi
callq 0xb41e2
jmp 0x632ca
pushq $0x70
popq %rdi
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
callq 0xb3ed8
movq %r14, %rdi
movl %r15d, %esi
callq 0xb40f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb47f4
movq %rbx, %rdi
callq 0xb41e2
movq %r14, %rdi
callq 0xb4106
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x59570
movq %r14, %rdi
callq 0xb408c
pushq $0x70
popq %rsi
movq %r14, %rdi
callq 0x564c0
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x50(%rsp), %rdi
callq 0x5a588
movq (%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x70
popq %rsi
movq %r14, %rdi
callq 0x564c0
jmp 0x6333b
jmp 0x63318
jmp 0x6331d
jmp 0x63318
movq %rax, %rbx
jmp 0x63345
jmp 0x63318
jmp 0x63324
jmp 0x63318
jmp 0x6331d
jmp 0x63318
jmp 0x63318
movq %rax, %rbx
jmp 0x6333b
movq %rax, %rbx
jmp 0x63331
jmp 0x63324
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x50(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop