// Original function: sub_B38
// Address: 0xB38
// Signature: __int64 sub_B38()
__int64 sub_B38()
{
unsigned __int8 v0; // al
char n3; // al
char n3_1; // cl
__int64 result; // rax
v0 = __inbyte(0x70u); /*0xb3d*/
__outbyte(0x70u, v0 & 0x80 | 0x4B); /*0xb42*/
n3 = __inbyte(0x71u); /*0xb48*/
n3_1 = n3; /*0xb49*/
if ( (unsigned __int8)n3 > 3u ) /*0xb50*/
{
n3_1 = n3; /*0xb52*/
if ( !n3 ) /*0xb5a*/
n3_1 = MEMORY[0xFDAF0490] & 2 | 1; /*0xb66*/
}
if ( (unsigned __int8)(n3_1 - 1) > 0xFDu ) /*0xb70*/
return 0; /*0xb83*/
result = 2147483718LL; /*0xb75*/
if ( n3_1 == 1 ) /*0xb7f*/
return 2147483652LL; /*0xb7f*/
return result; /*0xb82*/
}