/* @004ac868 file=? name=FUN_004ac868 */

void __cdecl FUN_004ac868(int *param_1,byte param_2)

{
  int *piVar1;
  undefined4 *puVar2;
  int *piVar3;
  
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e210;
    puVar2 = (undefined4 *)param_1[0x38];
    if (puVar2 != (undefined4 *)0x0) {
      (**(code **)*puVar2)(puVar2,3);
    }
    piVar3 = (int *)param_1[0x3d];
    piVar1 = piVar3 + 3;
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_004024d8(piVar3,3);
    }
    FUN_0041c648(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ac8c0 file=? name=FUN_004ac8c0 */

void __cdecl FUN_004ac8c0(int param_1)

{
  int iVar1;
  uint uVar2;
  int *piVar3;
  
  iVar1 = *(int *)(param_1 + 0x40);
  if (iVar1 == 0) {
    FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
    FUN_004dbb24(&DAT_00524e20,s___DefaultState_0050df99,(char *)0x0);
    FUN_004d9c38(&DAT_00524e20);
    return;
  }
  if (iVar1 != 1) {
    if (iVar1 != 2) {
      uVar2 = *(uint *)(param_1 + 0x40);
      FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s___UnknownState______0050dfa9,(char *)0x0);
      piVar3 = FUN_004db880(&DAT_00524e20,uVar2);
      FUN_004d9c38(piVar3);
      return;
    }
    FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
    FUN_004dbb24(&DAT_00524e20,s___Exploding_0050df8c,(char *)0x0);
    FUN_004d9c38(&DAT_00524e20);
    return;
  }
  FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
  FUN_004dbb24(&DAT_00524e20,s___Destroyed_0050df7f,(char *)0x0);
  FUN_004d9c38(&DAT_00524e20);
  return;
}



/* @004ac9c8 file=? name=FUN_004ac9c8 */

bool __cdecl FUN_004ac9c8(int param_1)

{
  return *(int *)(*(int *)(*(int *)(param_1 + 0xd0) + 400) + 0x274) == 0;
}



/* @004ac9ec file=? name=FUN_004ac9ec */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined4 __cdecl
FUN_004ac9ec(int param_1,char *param_2,char *param_3,char *param_4,int param_5,int param_6,
            int param_7)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  undefined4 uVar4;
  char *pcVar5;
  uint uVar6;
  uint uVar7;
  char *pcVar8;
  bool bVar9;
  float local_20;
  float local_1c;
  char *local_18;
  char *local_14;
  char *local_10;
  char *local_c;
  int local_8;
  
  iVar3 = FUN_0041c684(param_1,param_2,param_3,param_4,param_5,param_6);
  if (iVar3 == 0) {
    uVar4 = 0;
  }
  else {
    param_4[0x24] = -0x1c;
    param_4[0x25] = '\0';
    param_4[0x26] = '\0';
    param_4[0x27] = '\0';
    param_4[0x20] = -0x45;
    param_4[0x21] = '\v';
    param_4[0x22] = '\0';
    param_4[0x23] = '\0';
    if (param_7 == 1) {
      param_4[0xe0] = '\0';
      param_4[0xe1] = '\0';
      param_4[0xe2] = -0x80;
      param_4[0xe3] = -0x41;
      local_8 = 0;
      pcVar5 = param_4 + 0x30;
      do {
        pcVar5[0] = '\0';
        pcVar5[1] = '\0';
        pcVar5[2] = -0x80;
        pcVar5[3] = -0x41;
        local_8 = local_8 + 1;
        pcVar5 = pcVar5 + 4;
      } while (local_8 < 5);
      param_4[0x48] = -1;
      param_4[0x49] = -1;
      param_4[0x4a] = -1;
      param_4[0x4b] = -1;
      iVar3 = 0;
      pcVar5 = param_4 + 0x4c;
      do {
        *pcVar5 = '\0';
        iVar3 = iVar3 + 1;
        pcVar5 = pcVar5 + 1;
      } while (iVar3 < 0x80);
      *(undefined4 *)(param_4 + 0x4c) = DAT_0050dfc0;
      param_4[0x50] = DAT_0050dfc4;
      local_c = param_4 + 0xcc;
      FUN_00408440((undefined4 *)local_c,&DAT_004e0f80);
      param_4[0x44] = '\0';
      param_4[0x45] = '\0';
      param_4[0x46] = -0x80;
      param_4[0x47] = -0x41;
      param_4[0xd8] = '\0';
      param_4[0xd9] = '\0';
      param_4[0xda] = '\0';
      param_4[0xdb] = '\0';
      param_4[0xdc] = '\0';
      param_4[0xdd] = '\0';
      param_4[0xde] = '\0';
      param_4[0xdf] = '\0';
    }
    FUN_00404190(param_5,param_3,s_PrintSimulationState_0050dfc5,(undefined4 *)(param_4 + 0xd8));
    FUN_00404118(param_5,param_3,s_CollisionCriticalHitWeight_0050dfda,(float *)(param_4 + 0xdc));
    local_10 = s_Unspecified_0050dff5;
    FUN_00404088(param_5,param_3,s_VideoObjectName_0050e001,&local_10);
    pcVar8 = s_Unspecified_0050e011;
    pcVar5 = local_10;
    do {
      bVar9 = *pcVar5 == *pcVar8;
      if (!bVar9) break;
      if (*pcVar5 == '\0') goto LAB_004acb51;
      pcVar1 = pcVar5 + 1;
      bVar9 = *pcVar1 == pcVar8[1];
      if (!bVar9) break;
      pcVar5 = pcVar5 + 2;
      pcVar8 = pcVar8 + 2;
      bVar9 = *pcVar1 == '\0';
    } while (!bVar9);
    if (!bVar9) {
      uVar6 = 0xffffffff;
      pcVar5 = local_10;
      do {
        pcVar8 = pcVar5;
        if (uVar6 == 0) break;
        uVar6 = uVar6 - 1;
        pcVar8 = pcVar5 + 1;
        cVar2 = *pcVar5;
        pcVar5 = pcVar8;
      } while (cVar2 != '\0');
      uVar6 = ~uVar6;
      pcVar5 = pcVar8 + -uVar6;
      pcVar8 = param_4 + 0x4c;
      for (uVar7 = uVar6 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {
        *(undefined4 *)pcVar8 = *(undefined4 *)pcVar5;
        pcVar5 = pcVar5 + 4;
        pcVar8 = pcVar8 + 4;
      }
      for (uVar6 = uVar6 & 3; uVar6 != 0; uVar6 = uVar6 - 1) {
        *pcVar8 = *pcVar5;
        pcVar5 = pcVar5 + 1;
        pcVar8 = pcVar8 + 1;
      }
    }
LAB_004acb51:
    local_14 = s_Unspecified_0050e01d;
    iVar3 = FUN_00404088(param_5,param_3,s_VitalSubsystem_0050e029,&local_14);
    if ((iVar3 == 0) && (*(int *)(param_4 + 0x48) == -1)) {
      FUN_004dbb24(&DAT_00524e20,param_3,(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s_missing_VitalSubsystem__0050e038,(char *)0x0);
      FUN_004d9c38(&DAT_00524e20);
      uVar4 = 0;
    }
    else {
      pcVar8 = s_Unspecified_0050e052;
      pcVar5 = local_14;
      do {
        if (*pcVar5 != *pcVar8) goto LAB_004acbd7;
        bVar9 = true;
        if (*pcVar5 == '\0') break;
        pcVar1 = pcVar5 + 1;
        if (*pcVar1 != pcVar8[1]) goto LAB_004acbd7;
        pcVar5 = pcVar5 + 2;
        pcVar8 = pcVar8 + 2;
        bVar9 = *pcVar1 == '\0';
      } while (!bVar9);
      if (!bVar9) {
LAB_004acbd7:
        pcVar8 = &DAT_0050e05e;
        pcVar5 = local_14;
        do {
          if (*pcVar5 != *pcVar8) goto LAB_004acc06;
          bVar9 = true;
          if (*pcVar5 == '\0') break;
          pcVar1 = pcVar5 + 1;
          if (*pcVar1 != pcVar8[1]) goto LAB_004acc06;
          pcVar5 = pcVar5 + 2;
          pcVar8 = pcVar8 + 2;
          bVar9 = *pcVar1 == '\0';
        } while (!bVar9);
        if (bVar9) {
          param_4[0x48] = '\x01';
          param_4[0x49] = '\0';
          param_4[0x4a] = '\0';
          param_4[0x4b] = '\0';
        }
        else {
LAB_004acc06:
          pcVar8 = s_False_0050e063;
          pcVar5 = local_14;
          do {
            if (*pcVar5 != *pcVar8) goto LAB_004acc33;
            bVar9 = true;
            if (*pcVar5 == '\0') break;
            pcVar1 = pcVar5 + 1;
            if (*pcVar1 != pcVar8[1]) goto LAB_004acc33;
            pcVar5 = pcVar5 + 2;
            pcVar8 = pcVar8 + 2;
            bVar9 = *pcVar1 == '\0';
          } while (!bVar9);
          if (!bVar9) {
LAB_004acc33:
            FUN_004dbb24(&DAT_00524e20,param_3,(char *)0x0);
            FUN_004dbb24(&DAT_00524e20,s___VitalSubsystem_must_be_True_or_0050e069,(char *)0x0);
            FUN_004d9c38(&DAT_00524e20);
            return 0;
          }
          param_4[0x48] = '\0';
          param_4[0x49] = '\0';
          param_4[0x4a] = '\0';
          param_4[0x4b] = '\0';
        }
      }
      iVar3 = FUN_00404088(param_5,param_3,s_SiteOffset_0050e092,&local_18);
      if (iVar3 != 0) {
        FUN_00408944(local_18,(float *)(param_4 + 0xcc));
      }
      iVar3 = FUN_00404118(param_5,param_3,s_WeaponDamagePoints_0050e09d,(float *)(param_4 + 0x44));
      if ((iVar3 == 0) && (_DAT_004aceec == *(float *)(param_4 + 0x44))) {
        FUN_004dbb24(&DAT_00524e20,param_3,(char *)0x0);
        FUN_004dbb24(&DAT_00524e20,s_Must_have_a_WeaponDamagePoints_0050e0b0,(char *)0x0);
        FUN_004d9c38(&DAT_00524e20);
        uVar4 = 0;
      }
      else {
        iVar3 = FUN_00404118(param_5,param_3,s_CriticalHitScoreBonus_0050e0d0,
                             (float *)(param_4 + 0xe0));
        if ((iVar3 == 0) && (_DAT_004aceec == *(float *)(param_4 + 0xe0))) {
          FUN_004dbb24(&DAT_00524e20,param_3,(char *)0x0);
          FUN_004dbb24(&DAT_00524e20,s_Must_have_a_CriticalHitScoreBonu_0050e0e6,(char *)0x0);
          FUN_004d9c38(&DAT_00524e20);
          uVar4 = 0;
        }
        else {
          local_1c = _DAT_004acef0 / *(float *)(param_4 + 0x44);
          local_20 = -1.0;
          iVar3 = FUN_00404118(param_5,param_3,s_CollisionDamagePoints_0050e109,&local_20);
          if ((iVar3 == 0) && (*(float *)(param_4 + 0x30) == _DAT_004aceec)) {
            *(float *)(param_4 + 0x30) = local_1c;
          }
          if (local_20 != _DAT_004aceec) {
            *(float *)(param_4 + 0x30) = _DAT_004acef0 / local_20;
          }
          local_20 = -1.0;
          iVar3 = FUN_00404118(param_5,param_3,s_BallisticDamagePoints_0050e11f,&local_20);
          if ((iVar3 == 0) && (*(float *)(param_4 + 0x34) == _DAT_004aceec)) {
            *(float *)(param_4 + 0x34) = local_1c;
          }
          if (local_20 != _DAT_004aceec) {
            *(float *)(param_4 + 0x34) = _DAT_004acef0 / local_20;
          }
          local_20 = -1.0;
          iVar3 = FUN_00404118(param_5,param_3,s_ExplosiveDamagePoints_0050e135,&local_20);
          if ((iVar3 == 0) && (*(float *)(param_4 + 0x38) == _DAT_004aceec)) {
            *(float *)(param_4 + 0x38) = local_1c;
          }
          if (local_20 != _DAT_004aceec) {
            *(float *)(param_4 + 0x38) = _DAT_004acef0 / local_20;
          }
          local_20 = -1.0;
          iVar3 = FUN_00404118(param_5,param_3,s_LaserDamagePoints_0050e14b,&local_20);
          if ((iVar3 == 0) && (*(float *)(param_4 + 0x3c) == _DAT_004aceec)) {
            *(float *)(param_4 + 0x3c) = local_1c;
          }
          if (local_20 != _DAT_004aceec) {
            *(float *)(param_4 + 0x3c) = _DAT_004acef0 / local_20;
          }
          local_20 = -1.0;
          iVar3 = FUN_00404118(param_5,param_3,s_EnergyDamagePoints_0050e15d,&local_20);
          if ((iVar3 == 0) && (*(float *)(param_4 + 0x40) == _DAT_004aceec)) {
            *(float *)(param_4 + 0x40) = local_1c;
          }
          if (local_20 != _DAT_004aceec) {
            *(float *)(param_4 + 0x40) = _DAT_004acef0 / local_20;
          }
          uVar4 = 1;
        }
      }
    }
  }
  return uVar4;
}



/* @004acfa9 file=? name=FUN_004acfa9 */

undefined4 * __cdecl FUN_004acfa9(undefined4 *param_1,int param_2,undefined4 param_3)

{
  FUN_00415f30(param_1,param_2,param_3);
  *param_1 = &PTR_FUN_0050e1c8;
  return param_1;
}



/* @004acfcc file=? name=FUN_004acfcc */

undefined4 * __cdecl FUN_004acfcc(undefined4 *param_1,int param_2,undefined4 param_3)

{
  FUN_00415f30(param_1,param_2,param_3);
  *param_1 = &PTR_FUN_0050e1c8;
  return param_1;
}



/* @004acfef file=? name=FUN_004acfef */

undefined4 * __cdecl FUN_004acfef(undefined4 *param_1,int param_2)

{
  FUN_00415f60(param_1,param_2);
  *param_1 = &PTR_FUN_0050e1c8;
  return param_1;
}



/* @004ad00e file=? name=FUN_004ad00e */

void __cdecl FUN_004ad00e(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e1c8;
    FUN_00415f90(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad03a file=? name=FUN_004ad03a */

undefined4 * __cdecl FUN_004ad03a(undefined4 *param_1,undefined4 param_2)

{
  FUN_00417be0(param_1,param_2);
  *param_1 = &PTR_FUN_0050e1c0;
  return param_1;
}



/* @004ad059 file=? name=FUN_004ad059 */

void __cdecl FUN_004ad059(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e1c0;
    FUN_00417c0c(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad085 file=? name=FUN_004ad085 */

undefined4 * __cdecl FUN_004ad085(undefined4 *param_1,int param_2)

{
  FUN_00417d00(param_1,param_2);
  *param_1 = &PTR_FUN_0050e170;
  return param_1;
}



/* @004ad0a4 file=? name=FUN_004ad0a4 */

undefined4 * __cdecl FUN_004ad0a4(undefined4 *param_1,int param_2)

{
  FUN_00417d00(param_1,param_2);
  *param_1 = &PTR_FUN_0050e170;
  return param_1;
}



/* @004ad0c3 file=? name=FUN_004ad0c3 */

undefined4 * __cdecl FUN_004ad0c3(undefined4 *param_1,int param_2)

{
  FUN_00417d28(param_1,param_2);
  *param_1 = &PTR_FUN_0050e170;
  return param_1;
}



/* @004ad0e2 file=? name=FUN_004ad0e2 */

void __cdecl FUN_004ad0e2(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e170;
    FUN_00417d54(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad10e file=? name=FUN_004ad10e */

void __cdecl FUN_004ad10e(int *param_1,undefined4 param_2)

{
  (**(code **)(*param_1 + 0x28))(param_1,param_2);
  return;
}



/* @004ad124 file=? name=FUN_004ad124 */

undefined4 * __cdecl FUN_004ad124(undefined4 *param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  int iVar2;
  
  FUN_00415e90(param_1,1);
  *param_1 = &PTR_FUN_0050e3d0;
  FUN_004de998(param_1 + 3,0x10,7,1,FUN_004ad619);
  param_1[0x1f] = param_2;
  iVar2 = 0;
  puVar1 = param_1 + 3;
  do {
    *puVar1 = 0;
    puVar1[2] = 0;
    puVar1[1] = 0;
    puVar1[3] = 0;
    iVar2 = iVar2 + 1;
    puVar1 = puVar1 + 4;
  } while (iVar2 < 7);
  return param_1;
}



/* @004ad180 file=? name=FUN_004ad180 */

void __cdecl FUN_004ad180(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e3d0;
    FUN_00415ed8(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_00402f98(0x50e248,param_1);
    }
  }
  return;
}



/* @004ad1b8 file=? name=FUN_004ad1b8 */

void __cdecl FUN_004ad1b8(int *param_1,byte param_2)

{
  void *this;
  int local_10 [3];
  
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e3a0;
    FUN_004ad68b(local_10,(int)(param_1 + 0x39));
    FUN_00417858(this,local_10,1);
    FUN_004ad6c9(local_10,2);
    FUN_004ad640(param_1 + 0x39,2);
    FUN_0041c648(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad228 file=? name=FUN_004ad228 */

undefined4 * __cdecl
FUN_004ad228(undefined4 *param_1,int param_2,undefined4 param_3,char *param_4,undefined4 param_5)

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  
  FUN_0041c52c(param_1,param_2,param_3,param_4,param_5);
  *param_1 = &PTR_FUN_0050e3a0;
  FUN_004ad621(param_1 + 0x39,0);
  if ((*(uint *)(param_2 + 0x28) & 0xc) == 0) {
    param_1[7] = PTR_FUN_0050e2b0;
    param_1[8] = DAT_0050e2b4;
    param_1[9] = DAT_0050e2b8;
    param_1[0x40] = *(undefined4 *)(param_4 + 0x30);
    param_1[0x3d] = *(undefined4 *)(param_4 + 0x34);
    param_1[0x3e] = *(undefined4 *)(param_4 + 0x38);
    param_1[0x3f] = *(undefined4 *)(param_4 + 0x3c);
    for (iVar4 = *(int *)(param_2 + 0x124) + -2; -1 < iVar4; iVar4 = iVar4 + -1) {
      iVar1 = *(int *)(*(int *)(param_2 + 0x128) + iVar4 * 4);
      if (((iVar1 != 0) && (iVar2 = FUN_0041a1a4(**(int **)(iVar1 + 0xc),0x50de2c), iVar2 != 0)) &&
         ((*(byte *)(iVar1 + 0x28) & 8) != 0)) {
        puVar3 = FUN_00402f74(0x50e248);
        if (puVar3 == (undefined4 *)0x0) {
          puVar3 = (undefined4 *)0x0;
        }
        else {
          puVar3 = FUN_004ad124(puVar3,iVar1);
        }
        (**(code **)(param_1[0x39] + 4))(param_1 + 0x39,puVar3);
      }
    }
  }
  else {
    param_1[10] = param_1[10] | 2;
  }
  return param_1;
}



/* @004ad33c file=? name=FUN_004ad33c */

void __cdecl FUN_004ad33c(int param_1)

{
  int iVar1;
  uint *puVar2;
  uint uVar3;
  uint local_64 [7];
  uint local_48 [8];
  int local_28 [3];
  int *local_1c;
  int *local_18;
  int *local_14;
  uint local_10;
  int *local_c;
  int local_8;
  
  local_8 = *(int *)(DAT_004efc94 + 0x38);
  FUN_004ad68b(local_28,param_1 + 0xe4);
  while( true ) {
    iVar1 = (**(code **)(local_28[0] + 0x28))(local_28);
    if (iVar1 == 0) break;
    local_c = *(int **)(iVar1 + 0x7c);
    local_10 = (**(code **)(*local_c + 0x30))(local_c);
    puVar2 = (uint *)(iVar1 + 0xc);
    iVar1 = 0;
    do {
      uVar3 = local_10 & 1;
      if (puVar2[1] != 0) {
        if ((int)puVar2[3] < *(int *)(param_1 + 0x10)) {
          puVar2[1] = 0;
        }
        else {
          uVar3 = *puVar2;
        }
      }
      if (uVar3 != *puVar2) {
        if (uVar3 == 0) {
          local_1c = *(int **)(param_1 + 0xd0);
          FUN_004366b8(local_64,(int)local_1c,local_c,iVar1);
          FUN_004364e4(local_8,local_1c,local_64);
        }
        else {
          local_14 = local_c;
          local_18 = *(int **)(param_1 + 0xd0);
          FUN_00436688(local_48,(int)local_18,local_c,iVar1,*(undefined4 *)(param_1 + 0x100));
          FUN_004364e4(local_8,local_18,local_48);
        }
      }
      *puVar2 = uVar3;
      iVar1 = iVar1 + 1;
      local_10 = (int)local_10 >> 1;
      puVar2 = puVar2 + 4;
    } while (iVar1 < 7);
  }
  FUN_004ad6c9(local_28,2);
  return;
}



/* @004ad470 file=? name=FUN_004ad470 */

void __cdecl FUN_004ad470(int param_1)

{
  FUN_0041a1a4(**(int **)(param_1 + 0xc),0x50e280);
  return;
}



/* @004ad48c file=? name=FUN_004ad48c */

undefined4 __cdecl
FUN_004ad48c(int param_1,char *param_2,char *param_3,char *param_4,int param_5,int param_6,
            int param_7)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  char *local_8;
  
  iVar1 = FUN_0041c684(param_1,param_2,param_3,param_4,param_5,param_6);
  if (iVar1 == 0) {
    uVar2 = 0;
  }
  else {
    param_4[0x24] = '@';
    param_4[0x25] = '\0';
    param_4[0x26] = '\0';
    param_4[0x27] = '\0';
    param_4[0x20] = -0x24;
    param_4[0x21] = '\v';
    param_4[0x22] = '\0';
    param_4[0x23] = '\0';
    param_4[0x30] = -1;
    param_4[0x31] = -1;
    param_4[0x32] = -1;
    param_4[0x33] = -1;
    param_4[0x34] = '\0';
    param_4[0x35] = '\0';
    param_4[0x36] = '\0';
    param_4[0x37] = '\0';
    param_4[0x38] = '\0';
    param_4[0x39] = '\0';
    param_4[0x3a] = '\0';
    param_4[0x3b] = '\0';
    param_4[0x3c] = '\0';
    param_4[0x3d] = '\0';
    param_4[0x3e] = '\0';
    param_4[0x3f] = '\0';
    if ((*(int *)(param_4 + 0x30) == -1) &&
       (iVar1 = FUN_00404088(param_5,param_3,s_AlarmModel_0050e322,&local_8), iVar1 == 0)) {
      return 1;
    }
    puVar3 = (undefined4 *)FUN_00406ff8(param_7,local_8,1,-1);
    if (puVar3 == (undefined4 *)0x0) {
      FUN_004dbb24(&DAT_00524e20,param_3,(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s_couldn_t_locate_0050e32d,(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,local_8,(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s__mod_0050e33f,(char *)0x0);
      uVar2 = 0;
    }
    else {
      uVar2 = 1;
      *(undefined4 *)(param_4 + 0x30) = *puVar3;
    }
  }
  return uVar2;
}



/* @004ad619 file=? name=FUN_004ad619 */

undefined4 __cdecl FUN_004ad619(undefined4 param_1)

{
  return param_1;
}



/* @004ad621 file=? name=FUN_004ad621 */

undefined4 * __cdecl FUN_004ad621(undefined4 *param_1,undefined4 param_2)

{
  FUN_00417be0(param_1,param_2);
  *param_1 = &PTR_FUN_0050e398;
  return param_1;
}



/* @004ad640 file=? name=FUN_004ad640 */

void __cdecl FUN_004ad640(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e398;
    FUN_00417c0c(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad66c file=? name=FUN_004ad66c */

undefined4 * __cdecl FUN_004ad66c(undefined4 *param_1,int param_2)

{
  FUN_00417d00(param_1,param_2);
  *param_1 = &PTR_FUN_0050e348;
  return param_1;
}



/* @004ad68b file=? name=FUN_004ad68b */

undefined4 * __cdecl FUN_004ad68b(undefined4 *param_1,int param_2)

{
  FUN_00417d00(param_1,param_2);
  *param_1 = &PTR_FUN_0050e348;
  return param_1;
}



/* @004ad6aa file=? name=FUN_004ad6aa */

undefined4 * __cdecl FUN_004ad6aa(undefined4 *param_1,int param_2)

{
  FUN_00417d28(param_1,param_2);
  *param_1 = &PTR_FUN_0050e348;
  return param_1;
}



/* @004ad6c9 file=? name=FUN_004ad6c9 */

void __cdecl FUN_004ad6c9(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050e348;
    FUN_00417d54(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ad748 file=? name=FUN_004ad748 */

void __cdecl FUN_004ad748(int *param_1,undefined4 param_2)

{
  FUN_004ac0bc(param_1,param_2);
  return;
}



/* @004ad760 file=? name=FUN_004ad760 */

void __cdecl FUN_004ad760(int *param_1)

{
  param_1[0x45] = param_1[0x4f];
  param_1[0x56] = (int)((float)param_1[0x4f] * (float)param_1[0x55]);
  param_1[0x4b] = param_1[0x4a];
  param_1[0x4c] = 0;
  param_1[0x4d] = 1;
  param_1[0x57] = 0x3f800000;
  FUN_004ad884((int)param_1);
  FUN_004ad7f0((int)param_1);
  param_1[0x4e] = 0;
  FUN_004ac22c(param_1);
  return;
}



/* @004ad7d4 file=? name=FUN_004ad7d4 */

undefined4 __cdecl FUN_004ad7d4(int param_1)

{
  return *(undefined4 *)(*(int *)(*(int *)(param_1 + 0xd0) + 400) + 0x260);
}



/* @004ad7f0 file=? name=FUN_004ad7f0 */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void __cdecl FUN_004ad7f0(int param_1)

{
  float fVar1;
  float fVar2;
  float10 fVar3;
  
  *(float *)(param_1 + 0x1cc) = *(float *)(param_1 + 0x114) * *(float *)(param_1 + 300);
  fVar1 = (float)(_DAT_004ad870 * (float10)*(float *)(param_1 + 0x1cc));
  fVar2 = _DAT_004ad87c;
  if ((_DAT_004ad87c <= fVar1) && (fVar2 = fVar1, _DAT_004ad880 < fVar1)) {
    fVar2 = _DAT_004ad880;
  }
  FUN_0043ade4((uint *)(param_1 + 0x144),fVar2);
  fVar3 = FUN_0043ae0b((uint *)(param_1 + 0x144));
  *(float *)(param_1 + 0x120) = (float)fVar3;
  return;
}



/* @004ad884 file=? name=FUN_004ad884 */

void __cdecl FUN_004ad884(int param_1)

{
  int iVar1;
  
  iVar1 = 0;
  do {
    FUN_0043ade4((uint *)(param_1 + 0x144),0);
    iVar1 = iVar1 + 1;
  } while (iVar1 < 0xf);
  return;
}



/* @004ad8ac file=? name=FUN_004ad8ac */

void __cdecl FUN_004ad8ac(int param_1,float param_2)

{
  int iVar1;
  float10 fVar2;
  int iVar3;
  
  iVar3 = param_1 + 0x164;
  iVar1 = FUN_00417ab4(iVar3);
  if ((iVar1 != 0) && (*(int *)(param_1 + 0x134) != 0)) {
    fVar2 = FUN_004ad9ec((short)iVar3,param_1,iVar1,param_2);
    *(float *)(iVar1 + 0x1c8) = (float)fVar2 + *(float *)(iVar1 + 0x1c8);
    *(float *)(param_1 + 0x1c8) = -(float)fVar2 + *(float *)(param_1 + 0x1c8);
    FUN_004ada94(param_1,param_2);
  }
  return;
}



/* @004ad924 file=? name=FUN_004ad924 */

void __cdecl FUN_004ad924(int *param_1,float param_2)

{
  int iVar1;
  
  iVar1 = FUN_004ad7d4((int)param_1);
  if (iVar1 != 0) {
    param_1[0x56] = (int)((float)param_1[0x72] + (float)param_1[0x56]);
    param_1[0x45] = (int)((float)param_1[0x56] / (float)param_1[0x55]);
    FUN_004ad7f0((int)param_1);
    param_1[0x72] = 0;
    FUN_004ad8ac((int)param_1,param_2);
  }
  iVar1 = FUN_004ad7d4((int)param_1);
  if (iVar1 != 0) {
    FUN_004adbf8(param_1,param_2);
  }
  if ((float)param_1[0x47] < (float)param_1[0x45]) {
    FUN_0041bbd8((int)(param_1 + 0x5c),2);
    return;
  }
  if ((float)param_1[0x46] < (float)param_1[0x45]) {
    FUN_0041bbd8((int)(param_1 + 0x5c),1);
    return;
  }
  FUN_0041bbd8((int)(param_1 + 0x5c),0);
  return;
}



/* @004ad9ec file=? name=FUN_004ad9ec */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

float10 __thiscall FUN_004ad9ec(undefined2 param_1,int param_2,int param_3,float param_4)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  double dVar6;
  float fVar7;
  float fVar8;
  float10 fVar9;
  
  fVar7 = *(float *)(param_2 + 0x154) / *(float *)(param_2 + 0x160);
  fVar8 = fVar7 + *(float *)(param_3 + 0x154);
  fVar1 = *(float *)(param_2 + 0x114);
  fVar2 = *(float *)(param_2 + 0x160);
  fVar3 = *(float *)(param_3 + 0x158);
  fVar4 = *(float *)(param_3 + 0x1c8);
  fVar5 = *(float *)(param_2 + 0x158);
  dVar6 = (double)((-param_4 *
                   *(float *)(param_2 + 0x140) *
                   (*(float *)(param_2 + 300) / *(float *)(param_2 + 0x128)) *
                   *(float *)(param_2 + 0x15c)) / fVar8);
  fVar9 = (float10)FUN_004dca38(param_1,SUB84(dVar6,0),(uint)((ulonglong)dVar6 >> 0x20));
  return (float10)(float)((float10)(fVar1 * fVar2 - (fVar3 + fVar4 + fVar5) / fVar8) *
                          (float10)fVar7 * ((float10)_DAT_004ada90 - fVar9));
}



/* @004ada94 file=? name=FUN_004ada94 */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void __cdecl FUN_004ada94(int param_1,float param_2)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  int iVar5;
  float10 fVar6;
  
  iVar5 = FUN_00417ab4(param_1 + 0x164);
  if ((iVar5 != 0) &&
     (fVar6 = FUN_004dcd00((double)(*(float *)(param_1 + 0x1cc) - *(float *)(iVar5 + 0x1cc))),
     (float10)_DAT_004adbf4 < fVar6)) {
    fVar1 = *(float *)(iVar5 + 0x1cc) / *(float *)(param_1 + 0x114) - *(float *)(param_1 + 300);
    fVar2 = *(float *)(param_1 + 0x128) * param_2;
    if (-fVar2 <= fVar1) {
      if (fVar2 < fVar1) {
        fVar1 = fVar2;
      }
    }
    else {
      fVar1 = -fVar2;
    }
    fVar2 = *(float *)(param_1 + 0x128) - *(float *)(param_1 + 300);
    fVar3 = -*(float *)(param_1 + 300);
    fVar4 = -(*(float *)(iVar5 + 0x128) - *(float *)(iVar5 + 300));
    if ((fVar3 <= fVar1) && (fVar3 = fVar1, fVar2 < fVar1)) {
      fVar3 = fVar2;
    }
    if ((fVar4 <= fVar3) && (fVar4 = fVar3, *(float *)(iVar5 + 300) < fVar3)) {
      fVar4 = *(float *)(iVar5 + 300);
    }
    fVar4 = *(float *)(param_1 + 0x15c) * fVar4;
    *(float *)(param_1 + 300) = fVar4 + *(float *)(param_1 + 300);
    *(float *)(iVar5 + 300) = *(float *)(iVar5 + 300) - fVar4;
  }
  return;
}



/* @004adbf8 file=? name=FUN_004adbf8 */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void __cdecl FUN_004adbf8(int *param_1,float param_2)

{
  float fVar1;
  float10 fVar2;
  
  param_1[0x4c] = (int)(*(float *)(param_1[0x38] + 0x158) * (float)param_1[0x48]);
  if ((float)param_1[0x4c] < _DAT_0050e3d8) {
    param_1[0x4c] = 0;
  }
  fVar1 = (float)param_1[0x4c] * param_2;
  if ((float)param_1[0x4b] < fVar1) {
    fVar1 = (float)param_1[0x4b];
  }
  param_1[0x4b] = (int)((float)param_1[0x4b] - fVar1);
  fVar2 = FUN_004dcd00((double)fVar1);
  if ((float10)_DAT_004adcfc < fVar2) {
    fVar2 = (float10)(**(code **)(*param_1 + 0x38))(param_1,fVar1);
    param_1[0x4b] = (int)(float)(fVar2 + (float10)(float)param_1[0x4b]);
  }
  if ((param_1[0x4e] != 0) || ((float)param_1[0x4c] <= _DAT_0050e3d4)) {
    if ((param_1[0x4e] == 1) && ((float)param_1[0x4c] < _DAT_0050e3d8)) {
      param_1[0x4e] = 0;
    }
  }
  else {
    param_1[0x4e] = 1;
  }
  return;
}



/* @004add30 file=? name=FUN_004add30 */

uint __cdecl FUN_004add30(int param_1)

{
  uint uVar1;
  int iVar2;
  
  uVar1 = FUN_004ac144(param_1);
  if (*(int *)(param_1 + 0x184) != 0) {
    uVar1 = uVar1 | 8;
  }
  if (*(int *)(param_1 + 0x138) != 0) {
    iVar2 = FUN_004ad7d4(param_1);
    if (iVar2 != 0) {
      uVar1 = uVar1 | 4;
    }
  }
  return uVar1;
}



/* @004add6c file=? name=FUN_004add6c */

undefined4 __cdecl FUN_004add6c(int *param_1,int param_2)

{
  undefined4 uVar1;
  
  if (param_2 == 1) {
    *(undefined4 *)(param_1[0x38] + 0x158) = 0x3f000000;
    return 1;
  }
  uVar1 = FUN_004ac1d4(param_1,param_2);
  return uVar1;
}



/* @004adda0 file=bt/heat.cpp name=FUN_004adda0 */

int * __cdecl
FUN_004adda0(int *param_1,int param_2,undefined4 param_3,char *param_4,undefined4 param_5,
            int param_6,int param_7)

{
  int iVar1;
  int local_8;
  
  FUN_004ac644(param_1,param_2,param_3,param_4,param_5,param_6,param_7);
  *param_1 = (int)&PTR_FUN_0050edc4;
  param_1[0x45] = *(int *)(param_4 + 0xe4);
  param_1[0x46] = *(int *)(param_4 + 0xe8);
  param_1[0x47] = *(int *)(param_4 + 0xec);
  param_1[0x48] = 0;
  param_1[0x49] = 0x3f000000;
  param_1[0x4a] = 0x3f800000;
  param_1[0x4b] = param_1[0x4a];
  param_1[0x4c] = 0;
  param_1[0x4d] = 1;
  param_1[0x4e] = 0;
  param_1[0x4f] = param_1[0x45];
  param_1[0x50] = *(int *)(param_4 + 0xf0);
  FUN_0043ad4f((uint *)(param_1 + 0x51),0xf,0);
  param_1[0x54] = 0x3ecccccd;
  param_1[0x55] = *(int *)(param_4 + 0xf4);
  param_1[0x56] = (int)((float)param_1[0x55] * (float)param_1[0x4f]);
  param_1[0x57] = 0x3f800000;
  param_1[0x58] = 0x3f800000;
  FUN_004af9cf(param_1 + 0x59,0);
  FUN_0041b9ec(param_1 + 0x5c,3);
  param_1[0x72] = 0;
  if (((*(uint *)(param_2 + 0x28) & 0xc) == 0) && ((*(uint *)(param_2 + 0x28) & 0x100) != 0)) {
    param_1[7] = (int)PTR_FUN_0050e4e0;
    param_1[8] = DAT_0050e4e4;
    param_1[9] = DAT_0050e4e8;
  }
  param_1[0x71] = (int)param_4;
  local_8 = 0;
  iVar1 = FUN_0041a1a4(*(int *)param_1[3],0x50e590);
  if (iVar1 == 0) {
    if (*(int *)(param_4 + 0xf8) < *(int *)(param_2 + 0x124)) {
      local_8 = *(int *)(*(int *)(param_2 + 0x128) + *(int *)(param_4 + 0xf8) * 4);
    }
    else {
      FUN_0040385c(s_Bad_subsystem_resource_>heatSink_0050e7c9,s_d__tesla_bt_bt_HEAT_CPP_0050e804,
                   0x25f);
    }
    if (((*(uint *)(param_2 + 0x28) & 0xc) == 0) && ((*(uint *)(param_2 + 0x28) & 0x100) != 0)) {
      if (local_8 == 0) {
        FUN_0040385c(s_Master_heatable_subystem_is_miss_0050e81c,s_d__tesla_bt_bt_HEAT_CPP_0050e859,
                     0x26b);
      }
      else {
        (**(code **)(param_1[0x59] + 4))(param_1 + 0x59,local_8);
      }
    }
    else if (((*(uint *)(param_2 + 0x28) & 0xc) == 4) && (local_8 != 0)) {
      (**(code **)(param_1[0x59] + 4))(param_1 + 0x59,local_8);
    }
  }
  FUN_004ad7f0((int)param_1);
  return param_1;
}



/* @004adfd4 file=? name=FUN_004adfd4 */

void __cdecl FUN_004adfd4(int *param_1,byte param_2)

{
  if (param_1 != (int *)0x0) {
    *param_1 = (int)&PTR_FUN_0050edc4;
    FUN_0041baa4(param_1 + 0x5c,2);
    FUN_004af9ee(param_1 + 0x59,2);
    FUN_0043adb5(param_1 + 0x51,2);
    FUN_004ac868(param_1,0);
    if ((param_2 & 1) != 0) {
      FUN_004022d0(param_1);
    }
  }
  return;
}



/* @004ae034 file=? name=FUN_004ae034 */

void __cdecl FUN_004ae034(int param_1)

{
  FUN_0041a1a4(**(int **)(param_1 + 0xc),0x50e3ec);
  return;
}



/* @004ae050 file=? name=FUN_004ae050 */

void __cdecl FUN_004ae050(int param_1)

{
  int iVar1;
  
  FUN_004ac8c0(param_1);
  iVar1 = *(int *)(param_1 + 0x184);
  if (iVar1 == 0) {
    FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
    FUN_004dbb24(&DAT_00524e20,s___NormalHeat_0050e893,(char *)0x0);
    FUN_004d9c38(&DAT_00524e20);
  }
  else {
    if (iVar1 == 1) {
      FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s___DegradationHeat_0050e880,(char *)0x0);
      FUN_004d9c38(&DAT_00524e20);
      return;
    }
    if (iVar1 == 2) {
      FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
      FUN_004dbb24(&DAT_00524e20,s___FailureHeat_0050e871,(char *)0x0);
      FUN_004d9c38(&DAT_00524e20);
      return;
    }
  }
  FUN_004dbb24(&DAT_00524e20,*(char **)(param_1 + 0xd4),(char *)0x0);
  FUN_004dbb24(&DAT_00524e20,s_Unknown_Heat_State__0050e8a1,(char *)0x0);
  FUN_004d9c38(&DAT_00524e20);
  return;
}



/* @004ae150 file=? name=FUN_004ae150 */

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined4 __cdecl
FUN_004ae150(int param_1,char *param_2,char *param_3,char *param_4,int param_5,int param_6,
            int param_7)

{
  char *pcVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  bool bVar6;
  char *local_8;
  
  iVar2 = FUN_004ac9ec(param_1,param_2,param_3,param_4,param_5,param_6,param_7);
  if (iVar2 == 0) {
    uVar3 = 0;
  }
  else {
    param_4[0x24] = -4;
    param_4[0x25] = '\0';
    param_4[0x26] = '\0';
    param_4[0x27] = '\0';
    param_4[0x20] = -0x44;
    param_4[0x21] = '\v';
    param_4[0x22] = '\0';
    param_4[0x23] = '\0';
    if (param_7 == 1) {
      param_4[0xe4] = '\0';
      param_4[0xe5] = '\0';
      param_4[0xe6] = -0x80;
      param_4[0xe7] = -0x41;
      param_4[0xe8] = '\0';
      param_4[0xe9] = '\0';
      param_4[0xea] = -0x80;
      param_4[0xeb] = -0x41;
      param_4[0xec] = '\0';
      param_4[0xed] = '\0';
      param_4[0xee] = -0x80;
      param_4[0xef] = -0x41;
      param_4[0xf0] = '\0';
      param_4[0xf1] = '\0';
      param_4[0xf2] = -0x80;
      param_4[0xf3] = -0x41;
      param_4[0xf4] = '\0';
      param_4[0xf5] = '\0';
      param_4[0xf6] = -0x80;
      param_4[0xf7] = -0x41;
      param_4[0xf8] = -1;
      param_4[0xf9] = -1;
      param_4[0xfa] = -1;
      param_4[0xfb] = -1;
    }
    iVar2 = FUN_00404118(param_5,param_3,s_StartingTemperature_0050e8b6,(float *)(param_4 + 0xe4));
    if ((iVar2 == 0) && (_DAT_004ae460 == *(float *)(param_4 + 0xe4))) {
      FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
      FUN_004dbb24((int *)&DAT_00524e68,s_missing_StartingTemperature__0050e8ca,(char *)0x0);
      uVar3 = 0;
    }
    else {
      iVar2 = FUN_00404118(param_5,param_3,s_DegradationTemperature_0050e8e9,
                           (float *)(param_4 + 0xe8));
      if ((iVar2 == 0) && (_DAT_004ae460 == *(float *)(param_4 + 0xe8))) {
        FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
        FUN_004dbb24((int *)&DAT_00524e68,s_missing_DegradationTemperature__0050e900,(char *)0x0);
        uVar3 = 0;
      }
      else {
        iVar2 = FUN_00404118(param_5,param_3,s_FailureTemperature_0050e922,(float *)(param_4 + 0xec)
                            );
        if ((iVar2 == 0) && (_DAT_004ae460 == *(float *)(param_4 + 0xec))) {
          FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
          FUN_004dbb24((int *)&DAT_00524e68,s_missing_FailureTemperature__0050e935,(char *)0x0);
          uVar3 = 0;
        }
        else {
          iVar2 = FUN_00404118(param_5,param_3,s_ThermalConductance_0050e953,
                               (float *)(param_4 + 0xf0));
          if ((iVar2 == 0) && (_DAT_004ae460 == *(float *)(param_4 + 0xf0))) {
            FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
            FUN_004dbb24((int *)&DAT_00524e68,s_missing_ThermalConductance__0050e966,(char *)0x0);
            uVar3 = 0;
          }
          else {
            iVar2 = FUN_00404118(param_5,param_3,s_ThermalMass_0050e984,(float *)(param_4 + 0xf4));
            if ((iVar2 == 0) && (_DAT_004ae460 == *(float *)(param_4 + 0xf4))) {
              FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
              FUN_004dbb24((int *)&DAT_00524e68,s_missing_ThermalMass__0050e990,(char *)0x0);
              uVar3 = 0;
            }
            else {
              local_8 = s_Unspecified_0050e9a7;
              iVar2 = FUN_00404088(param_5,param_3,s_HeatSink_0050e9b3,&local_8);
              if ((iVar2 == 0) && (*(int *)(param_4 + 0xf8) == -1)) {
                FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
                FUN_004dbb24((int *)&DAT_00524e68,s_missing_HeatSink__0050e9bc,(char *)0x0);
                uVar3 = 0;
              }
              else {
                pcVar5 = s_Unspecified_0050e9d0;
                pcVar4 = local_8;
                do {
                  bVar6 = *pcVar4 == *pcVar5;
                  if (!bVar6) break;
                  if (*pcVar4 == '\0') goto LAB_004ae418;
                  pcVar1 = pcVar4 + 1;
                  bVar6 = *pcVar1 == pcVar5[1];
                  if (!bVar6) break;
                  pcVar4 = pcVar4 + 2;
                  pcVar5 = pcVar5 + 2;
                  bVar6 = *pcVar1 == '\0';
                } while (!bVar6);
                if (!bVar6) {
                  iVar2 = FUN_004215b0(param_5,local_8);
                  *(int *)(param_4 + 0xf8) = iVar2;
                }
LAB_004ae418:
                if (*(int *)(param_4 + 0xf8) < 0) {
                  FUN_004dbb24((int *)&DAT_00524e68,param_3,(char *)0x0);
                  FUN_004dbb24((int *)&DAT_00524e68,s_has_an_invalid_heat_sink__0050e9dc,(char *)0x0
                              );
                  uVar3 = 0;
                }
                else {
                  *(int *)(param_4 + 0xf8) = *(int *)(param_4 + 0xf8) + 2;
                  uVar3 = 1;
                }
              }
            }
          }
        }
      }
    }
  }
  return uVar3;
}



