// File: /workspace/github_c_makefile_star2_O0/ughman[P]c2c/src/bios.c
// Function: BIOS_Execute
uint32_t BIOS_Execute(uint32_t address)
{
	switch (address)
	{
	case 0xA0:
		switch (T1)
		{
		CASE_METHOD(0x10,BIOS_AToI);
		CASE_METHOD(0x15,BIOS_StrCat);
		CASE_METHOD(0x17,BIOS_StrCmp);
		CASE_METHOD(0x18,BIOS_StrNCmp);
		CASE_METHOD(0x19,BIOS_StrCpy);
		CASE_METHOD(0x1B,BIOS_StrLen);
		CASE_METHOD(0x27,BIOS_BCopy);
		CASE_METHOD(0x28,BIOS_BZero);
		CASE_METHOD(0x2A,BIOS_MemCpy);
		CASE_METHOD(0x2B,BIOS_MemSet);
		CASE_METHOD(0x2E,BIOS_MemChr);
		default:
			SDL_LogDebug(LOG_BIOS,"Unrecognized BIOS(A0) method: %i:%s",T1,PCSX_A0Name(T1));
			return PCSX_HLEA0();
		}
		break;
	case 0xB0:
		switch (T1)
		{
		CASE_METHOD(0x7,BIOS_DeliverEvent);
		CASE_METHOD(0x8,BIOS_OpenEvent);
		CASE_METHOD(0xB,BIOS_TestEvent);
		CASE_METHOD(0xC,BIOS_EnableEvent);
		case 0x17:
			EMU_LoadRegisters();
			PCSX_ExecuteCOP(0,16 << 21);
			return COP0_GetRegister(14);
		default:
			SDL_LogDebug(LOG_BIOS,"Unrecognized BIOS(B0) method: %i:%s",T1,PCSX_B0Name(T1));
			return PCSX_HLEB0();
		}
		break;
	case 0xC0:
		switch (T1)
		{
		default:
			SDL_LogDebug(LOG_BIOS,"Unrecognized BIOS(C0) method: %i:%s",T1,PCSX_C0Name(T1));
			return PCSX_HLEC0();
		}
		break;
	default:
		SDL_LogCritical(LOG_BIOS,"Invalid BIOS routine class");
		abort();
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0xa0, %eax
je 0x319a4d
jmp 0x319a2a
movl -0xc(%rbp), %eax
subl $0xb0, %eax
je 0x319c3e
jmp 0x319a3a
movl -0xc(%rbp), %eax
subl $0xc0, %eax
je 0x319d6c
jmp 0x319dbc
leaq 0xcf7c(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x24(%rax), %eax
addl $-0x10, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x1e, %eax
ja 0x319beb
movq -0x18(%rbp), %rax
leaq 0x863d(%rip), %rcx      # 0x3220b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x6f7(%rip), %rdi      # 0x319390
callq 0x31dec0
leaq 0xcf3d(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x6e8(%rip), %rdi      # 0x3193c0
callq 0x31dec0
leaq 0xcf1c(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x689(%rip), %rdi      # 0x319440
callq 0x31dec0
leaq 0xcefb(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x62a(%rip), %rdi      # 0x3194c0
callq 0x31dec0
leaq 0xceda(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x5bb(%rip), %rdi      # 0x319550
callq 0x31dec0
leaq 0xceb9(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x57c(%rip), %rdi      # 0x3195b0
callq 0x31dec0
leaq 0xce98(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x55d(%rip), %rdi      # 0x3195f0
callq 0x31dec0
leaq 0xce77(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x4fe(%rip), %rdi      # 0x319670
callq 0x31dec0
leaq 0xce56(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x47f(%rip), %rdi      # 0x319710
callq 0x31dec0
leaq 0xce35(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x510(%rip), %rdi      # 0x3196a0
callq 0x31dec0
leaq 0xce14(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x441(%rip), %rdi      # 0x319790
callq 0x31dec0
leaq 0xcdf3(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq 0xcdde(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x24(%rax), %eax
movl %eax, -0x1c(%rbp)
leaq 0xcd76(%rip), %rax      # 0x326978
movq (%rax), %rax
leaq 0xcdc4(%rip), %rcx      # 0x3269d0
movq (%rcx), %rcx
movl 0x24(%rcx), %edi
callq *%rax
movl -0x1c(%rbp), %edx
movq %rax, %rcx
movl $0x15, %edi
leaq 0x850a(%rip), %rsi      # 0x322130
movb $0x0, %al
callq 0x1100
leaq 0xcd5c(%rip), %rax      # 0x326990
callq *(%rax)
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq 0xcd8b(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x24(%rax), %eax
addl $-0x7, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x10, %eax
ja 0x319d1c
movq -0x28(%rbp), %rax
leaq 0x8408(%rip), %rcx      # 0x322070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x478(%rip), %rdi      # 0x319800
callq 0x31dec0
leaq 0xcd4c(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x3f9(%rip), %rdi      # 0x3198a0
callq 0x31dec0
leaq 0xcd2b(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x37a(%rip), %rdi      # 0x319940
callq 0x31dec0
leaq 0xcd0a(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq -0x30b(%rip), %rdi      # 0x3199d0
callq 0x31dec0
leaq 0xcce9(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x319dd4
callq 0x31e020
xorl %edi, %edi
movl $0x2000000, %esi        # imm = 0x2000000
leaq 0xcc48(%rip), %rax      # 0x326950
callq *(%rax)
movl $0xe, %edi
callq 0x31a610
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq 0xccad(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x24(%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0xcc4d(%rip), %rax      # 0x326980
movq (%rax), %rax
leaq 0xcc93(%rip), %rcx      # 0x3269d0
movq (%rcx), %rcx
movl 0x24(%rcx), %edi
callq *%rax
movl -0x2c(%rbp), %edx
movq %rax, %rcx
movl $0x15, %edi
leaq 0x83fd(%rip), %rsi      # 0x322154
movb $0x0, %al
callq 0x1100
leaq 0xcc33(%rip), %rax      # 0x326998
callq *(%rax)
movl %eax, -0x4(%rbp)
jmp 0x319dd4
leaq 0xcc5d(%rip), %rax      # 0x3269d0
movq (%rax), %rax
movl 0x24(%rax), %eax
movl %eax, -0x30(%rbp)
leaq 0xcc05(%rip), %rax      # 0x326988
movq (%rax), %rax
leaq 0xcc43(%rip), %rcx      # 0x3269d0
movq (%rcx), %rcx
movl 0x24(%rcx), %edi
callq *%rax
movl -0x30(%rbp), %edx
movq %rax, %rcx
movl $0x15, %edi
leaq 0x83d1(%rip), %rsi      # 0x322178
movb $0x0, %al
callq 0x1100
leaq 0xcbeb(%rip), %rax      # 0x3269a0
callq *(%rax)
movl %eax, -0x4(%rbp)
jmp 0x319dd4
movl $0x15, %edi
leaq 0x83d4(%rip), %rsi      # 0x32219c
movb $0x0, %al
callq 0x1060
callq 0x1070
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)