// LocateHiiSetupConfig - decompiled from Platform.efi
__int64 __fastcall LocateHiiSetupConfig(_BYTE *x_UEFI_1, _BYTE *x_UEFI, unsigned __int64 n0xF4240)
{
  unsigned __int64 n0xF4240_1; // rdi
  _BYTE *x_UEFI_2; // rbx

  n0xF4240_1 = n0xF4240; /*0x59c7*/
  x_UEFI_2 = x_UEFI_1; /*0x59cd*/
  if ( !n0xF4240 ) /*0x59d3*/
    return 0; /*0x59d5*/
  if ( BoolToString(x_UEFI_1) == -1 ) /*0x59e5*/
    Assert((__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1320, (__int64)"AsciiStrSize (FirstString)"); /*0x59fa*/
  if ( BoolToString(x_UEFI) == -1 ) /*0x5a0b*/
    Assert((__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1321, (__int64)"AsciiStrSize (SecondString)"); /*0x5a20*/
  if ( n0xF4240_1 > 0xF4240 ) /*0x5a2c*/
    Assert( /*0x5a41*/
      (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c",
      1324,
      (__int64)"Length <= _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength");
  while ( *x_UEFI_2 && *x_UEFI && *x_UEFI_2 == *x_UEFI && n0xF4240_1 > 1 ) /*0x5a55*/
  {
    ++x_UEFI_2; /*0x5a57*/
    ++x_UEFI; /*0x5a5a*/
    --n0xF4240_1; /*0x5a5d*/
  }
  return (char)*x_UEFI_2 - (char)*x_UEFI; /*0x5a7b*/
}
