// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x118(%rbp)
addq $0x40, %rdi
xorl %esi, %esi
movl %esi, -0x10c(%rbp)
callq 0x5ac20
movq -0x118(%rbp), %rsi
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
callq 0x5b6d0
movl -0x10c(%rbp), %esi
leaq -0x40(%rbp), %rdi
callq 0x5da90
jmp 0x71930
movq -0x118(%rbp), %rsi
addq $0x8, %rsi
leaq -0x68(%rbp), %rdi
callq 0x5ca10
jmp 0x71946
leaq 0x115c09(%rip), %rsi    # 0x187556
leaq -0x80(%rbp), %rdi
callq 0x5c1f0
jmp 0x71958
leaq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5bd60
movl %eax, -0x11c(%rbp)
jmp 0x7196d
movl -0x11c(%rbp), %esi
addl $0x4, %esi
leaq -0x28(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x128(%rbp)
jmp 0x71988
movq -0x128(%rbp), %rax
movl $0x0, (%rax)
leaq -0x80(%rbp), %rdi
callq 0x5df00
leaq -0x68(%rbp), %rdi
callq 0x5df00
movl $0x0, -0x84(%rbp)
movq -0x118(%rbp), %rdi
movl -0x84(%rbp), %eax
movl %eax, -0x130(%rbp)
addq $0x8, %rdi
callq 0x5b800
movl %eax, -0x12c(%rbp)
jmp 0x719d5
movq -0x118(%rbp), %rsi
addq $0x8, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x5ca10
jmp 0x719ee
leaq 0x115b61(%rip), %rsi    # 0x187556
leaq -0xb8(%rbp), %rdi
callq 0x5c1f0
jmp 0x71a03
leaq -0xa0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x5bd60
movl %eax, -0x134(%rbp)
jmp 0x71a1e
movl -0x134(%rbp), %ecx
movl -0x12c(%rbp), %eax
subl %ecx, %eax
subl $0x5, %eax
movl %eax, -0x138(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5df00
leaq -0xa0(%rbp), %rdi
callq 0x5df00
movl -0x138(%rbp), %ecx
movl -0x130(%rbp), %eax
cmpl %ecx, %eax
jge 0x71bfd
movq -0x118(%rbp), %rsi
addq $0x8, %rsi
movq %rsi, -0x140(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5ca10
jmp 0x71a81
leaq 0x115ace(%rip), %rsi    # 0x187556
leaq -0xe8(%rbp), %rdi
callq 0x5c1f0
jmp 0x71a96
leaq -0xd0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x5bd60
movl %eax, -0x144(%rbp)
jmp 0x71ab1
movq -0x140(%rbp), %rdi
movl -0x144(%rbp), %edx
movl -0x84(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x5(%rax,%rcx), %esi
callq 0x5d4e0
movq %rax, -0x150(%rbp)
jmp 0x71ada
movq -0x150(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x15c(%rbp)
movl -0x84(%rbp), %esi
leaq -0x40(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x158(%rbp)
jmp 0x71b01
movq -0x158(%rbp), %rax
movl -0x15c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0xe8(%rbp), %rdi
callq 0x5df00
leaq -0xd0(%rbp), %rdi
callq 0x5df00
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x719b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71da8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71b81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5df00
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0x71da8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71bb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5df00
leaq -0xa0(%rbp), %rdi
callq 0x5df00
jmp 0x71da8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5df00
leaq -0xd0(%rbp), %rdi
callq 0x5df00
jmp 0x71da8
leaq -0x40(%rbp), %rdi
callq 0x5adc0
movq %rax, -0x168(%rbp)
jmp 0x71c0f
movq -0x168(%rbp), %rax
movl %eax, -0xec(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x11a0f0
movq %rax, -0x170(%rbp)
jmp 0x71c2e
movq -0x170(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x5b1e0
movw %ax, -0x172(%rbp)
jmp 0x71c51
movw -0x172(%rbp), %ax
cwtl
cmpl $0x0, %eax
je 0x71c8a
movq -0xf8(%rbp), %rdi
callq 0x11a160
jmp 0x71c6c
movq -0x118(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xfc(%rbp)
jmp 0x71d89
movl $0x70, %edi
callq 0x59820
movq %rax, -0x180(%rbp)
jmp 0x71c9d
movq -0x180(%rbp), %rdi
callq 0x119c10
jmp 0x71cab
movq -0x180(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
movl -0xec(%rbp), %esi
callq 0x119f90
jmp 0x71ccd
movq -0x108(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x11aa00
jmp 0x71ce2
movq -0xf8(%rbp), %rdi
callq 0x11a160
jmp 0x71cf0
movq -0x108(%rbp), %rdi
callq 0x11a000
movq %rax, -0x188(%rbp)
jmp 0x71d05
movq -0x188(%rbp), %rsi
movq -0x118(%rbp), %rdi
addq $0x40, %rdi
callq 0x5cca0
jmp 0x71d1e
movq -0x108(%rbp), %rax
movq %rax, -0x190(%rbp)
cmpq $0x0, %rax
je 0x71d4f
movq -0x190(%rbp), %rdi
callq 0x119e30
movq -0x190(%rbp), %rdi
movl $0x70, %esi
callq 0x595b0
movq -0x118(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xfc(%rbp)
jmp 0x71d89
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x70, %esi
callq 0x595b0
jmp 0x71da8
leaq -0x40(%rbp), %rdi
callq 0x5df00
leaq -0x28(%rbp), %rdi
callq 0x5df00
movq -0x8(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x5df00
leaq -0x28(%rbp), %rdi
callq 0x5df00
movq -0x48(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)
nopl (%rax)