// Decompiled from acclient.exe — chunk 0x00650000
// Ghidra 12.0.4 + pyghidra headless

// --- FUN_00650070 at 0x00650070 (size: 2699) ---


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



void FUN_00650070(undefined1 (*param_1) [16],undefined8 param_2,undefined8 param_3,

                 undefined8 param_4,undefined8 param_5,undefined8 param_6,undefined8 param_7,

                 undefined8 param_8,undefined8 param_9,undefined8 param_10,undefined8 param_11,

                 undefined8 param_12,undefined8 param_13,undefined8 param_14,undefined8 param_15,

                 undefined8 param_16)



{

  undefined1 (*pauVar1) [16];

  undefined1 auVar2 [16];

  undefined1 auVar3 [16];

  undefined1 auVar4 [16];

  undefined1 auVar6 [16];

  undefined1 auVar7 [16];

  undefined1 auVar8 [16];

  undefined1 auVar10 [16];

  undefined1 auVar11 [16];

  undefined1 auVar12 [16];

  undefined1 auVar14 [16];

  undefined1 auVar15 [16];

  undefined1 auVar16 [16];

  undefined1 auVar18 [16];

  undefined1 auVar19 [16];

  undefined1 auVar20 [16];

  undefined1 auVar22 [16];

  undefined1 auVar23 [16];

  undefined1 auVar24 [16];

  undefined1 auVar26 [16];

  undefined1 auVar27 [16];

  undefined1 auVar28 [16];

  undefined1 auVar29 [16];

  undefined1 auVar30 [16];

  undefined1 auVar31 [16];

  undefined1 auVar32 [16];

  undefined1 auVar33 [16];

  undefined1 auVar34 [16];

  undefined1 auVar35 [16];

  undefined1 auVar36 [16];

  undefined1 auVar37 [16];

  undefined1 auVar38 [16];

  undefined1 auVar39 [16];

  undefined1 auVar40 [16];

  undefined1 auVar41 [16];

  undefined1 auVar42 [16];

  undefined1 auVar43 [16];

  undefined1 auVar44 [16];

  undefined1 auVar45 [16];

  undefined1 auVar46 [16];

  undefined1 auVar47 [16];

  undefined1 auVar48 [16];

  undefined1 auVar49 [16];

  undefined1 auVar50 [16];

  undefined1 auVar51 [16];

  undefined1 auVar52 [16];

  undefined1 auVar53 [16];

  undefined1 auVar54 [16];

  undefined1 auVar55 [16];

  undefined1 auVar56 [16];

  undefined1 auVar57 [16];

  undefined1 auVar58 [16];

  undefined1 auVar59 [16];

  undefined1 auVar60 [16];

  undefined1 auVar61 [16];

  undefined1 auVar62 [16];

  undefined1 auVar63 [16];

  undefined1 auVar64 [16];

  undefined1 auVar65 [16];

  undefined1 auVar66 [16];

  undefined1 auVar67 [16];

  undefined1 auVar68 [16];

  undefined1 auVar69 [16];

  undefined1 auVar70 [16];

  undefined1 auVar71 [16];

  undefined1 auVar72 [16];

  undefined1 auVar73 [16];

  undefined1 auVar74 [16];

  undefined1 auVar75 [16];

  undefined1 auVar76 [16];

  undefined1 auVar77 [16];

  undefined1 auVar78 [16];

  undefined1 auVar79 [16];

  undefined1 auVar80 [16];

  undefined1 auVar81 [16];

  undefined1 auVar82 [16];

  undefined1 auVar83 [16];

  undefined1 auVar84 [16];

  undefined1 auVar85 [16];

  undefined1 auVar86 [16];

  undefined1 auVar87 [16];

  undefined1 auVar88 [16];

  undefined1 auVar89 [16];

  undefined4 unaff_retaddr;

  undefined1 local_80 [128];

  undefined1 auVar5 [16];

  undefined1 auVar9 [16];

  undefined1 auVar13 [16];

  undefined1 auVar17 [16];

  undefined1 auVar21 [16];

  undefined1 auVar25 [16];

  

  pauVar1 = param_1;

  if (((uint)param_1 & 0xf) != 0) {

    pauVar1 = (undefined1 (*) [16])local_80;

  }

  if (((uint)param_1 & 0xf) == 0) {

    auVar2 = paddsw(param_1[1],param_1[6]);

    auVar2 = psllw(auVar2,3);

    auVar52 = paddsw(param_1[5],param_1[2]);

    auVar70 = paddsw(*param_1,param_1[7]);

    auVar35 = psubsw(param_1[1],param_1[6]);

    auVar53 = psllw(auVar52,3);

    auVar52 = psubsw(auVar2,auVar53);

    auVar81 = paddsw(auVar2,auVar53);

    auVar53 = paddsw(param_1[3],param_1[4]);

    auVar2 = pmulhw(_DAT_00833400,auVar52);

    auVar71 = psubsw(auVar70,auVar53);

    auVar53 = paddsw(auVar70,auVar53);

    auVar71 = psllw(auVar71,3);

    auVar2 = paddsw(auVar2,auVar71);

    auVar70 = psllw(auVar53,3);

    auVar35 = psllw(auVar35,4);

    auVar72 = pmulhw(auVar71,_DAT_00833400);

    auVar53 = psubsw(param_1[2],param_1[5]);

    auVar71 = psubsw(auVar70,auVar81);

    auVar2 = pshufhw(auVar2 | _DAT_008333d0,auVar2 | _DAT_008333d0,0x1b);

    pauVar1[2] = auVar2;

    auVar81 = paddsw(auVar70,auVar81);

    auVar70 = psllw(auVar53,4);

    auVar2 = psubsw(param_1[3],param_1[4]);

    auVar53 = pshufhw(auVar71,auVar71,0x1b);

    pauVar1[4] = auVar53;

    auVar53 = paddsw(auVar35,auVar70);

    auVar53 = pmulhw(auVar53,_DAT_00833430);

    auVar35 = psubsw(auVar35,auVar70);

    auVar70 = pmulhw(auVar35,_DAT_00833430);

    auVar71 = psubsw(auVar72,auVar52);

    auVar2 = psllw(auVar2,3);

    auVar52 = paddsw(auVar2,auVar70);

    auVar35 = psubsw(*param_1,param_1[7]);

    auVar70 = psubsw(auVar2,auVar70);

    auVar35 = psllw(auVar35,3);

    auVar2 = pmulhw(_DAT_008333f0,auVar52);

    auVar72 = pshufhw(auVar81,auVar81,0x1b);

    *pauVar1 = auVar72;

    auVar72 = pmulhw(_DAT_00833410,auVar70);

    auVar71 = pshufhw(auVar71 | _DAT_008333d0,auVar71 | _DAT_008333d0,0x1b);

    pauVar1[6] = auVar71;

    auVar81 = psubsw(auVar35,auVar53 | _DAT_008333d0);

    auVar35 = paddsw(auVar35,auVar53 | _DAT_008333d0);

    auVar53 = pmulhw(_DAT_00833410,auVar81);

    auVar2 = paddsw(auVar2,auVar35);

    auVar71 = paddsw(auVar72,auVar70);

    auVar35 = pmulhw(auVar35,_DAT_008333f0);

    auVar53 = paddsw(auVar53,auVar81);

    auVar71 = psubsw(auVar81,auVar71);

    auVar2 = pshufhw(auVar2 | _DAT_008333d0,auVar2 | _DAT_008333d0,0x1b);

    pauVar1[1] = auVar2;

    auVar53 = paddsw(auVar53,auVar70);

    auVar2 = pshufhw(auVar71,auVar71,0x1b);

    pauVar1[3] = auVar2;

    auVar2 = psubsw(auVar35,auVar52);

    auVar52 = pshufhw(auVar53,auVar53,0x1b);

    pauVar1[5] = auVar52;

    auVar2 = pshufhw(auVar2,auVar2,0x1b);

    pauVar1[7] = auVar2;

  }

  else {

    auVar2 = param_1[2];

    auVar52 = paddsw(param_1[1],param_1[6]);

    auVar52 = psllw(auVar52,3);

    auVar35 = paddsw(param_1[5],auVar2);

    auVar71 = paddsw(*param_1,param_1[7]);

    auVar53 = psubsw(param_1[1],param_1[6]);

    auVar70 = psllw(auVar35,3);

    auVar35 = psubsw(auVar52,auVar70);

    auVar81 = paddsw(auVar52,auVar70);

    auVar70 = paddsw(param_1[3],param_1[4]);

    auVar52 = pmulhw(_DAT_00833400,auVar35);

    auVar72 = psubsw(auVar71,auVar70);

    auVar70 = paddsw(auVar71,auVar70);

    auVar71 = psllw(auVar72,3);

    auVar52 = paddsw(auVar52,auVar71);

    auVar70 = psllw(auVar70,3);

    auVar53 = psllw(auVar53,4);

    auVar72 = pmulhw(auVar71,_DAT_00833400);

    auVar52 = pshufhw(auVar52 | _DAT_008333d0,auVar52 | _DAT_008333d0,0x1b);

    pauVar1[2] = auVar52;

    auVar52 = psubsw(auVar70,auVar81);

    auVar2 = psubsw(auVar2,param_1[5]);

    auVar81 = paddsw(auVar70,auVar81);

    auVar71 = psllw(auVar2,4);

    auVar2 = psubsw(param_1[3],param_1[4]);

    auVar52 = pshufhw(auVar52,auVar52,0x1b);

    pauVar1[4] = auVar52;

    auVar52 = paddsw(auVar53,auVar71);

    auVar70 = pmulhw(auVar52,_DAT_00833430);

    auVar52 = psubsw(auVar53,auVar71);

    auVar53 = pmulhw(auVar52,_DAT_00833430);

    auVar71 = psubsw(auVar72,auVar35);

    auVar2 = psllw(auVar2,3);

    auVar52 = paddsw(auVar2,auVar53);

    auVar35 = psubsw(*param_1,param_1[7]);

    auVar53 = psubsw(auVar2,auVar53);

    auVar35 = psllw(auVar35,3);

    auVar2 = pmulhw(_DAT_008333f0,auVar52);

    auVar72 = pshufhw(auVar81,auVar81,0x1b);

    *pauVar1 = auVar72;

    auVar72 = pmulhw(_DAT_00833410,auVar53);

    auVar71 = pshufhw(auVar71 | _DAT_008333d0,auVar71 | _DAT_008333d0,0x1b);

    pauVar1[6] = auVar71;

    auVar81 = psubsw(auVar35,auVar70 | _DAT_008333d0);

    auVar35 = paddsw(auVar35,auVar70 | _DAT_008333d0);

    auVar70 = pmulhw(_DAT_00833410,auVar81);

    auVar2 = paddsw(auVar2,auVar35);

    auVar71 = paddsw(auVar72,auVar53);

    auVar35 = pmulhw(auVar35,_DAT_008333f0);

    auVar70 = paddsw(auVar70,auVar81);

    auVar71 = psubsw(auVar81,auVar71);

    auVar2 = pshufhw(auVar2 | _DAT_008333d0,auVar2 | _DAT_008333d0,0x1b);

    pauVar1[1] = auVar2;

    auVar53 = paddsw(auVar70,auVar53);

    auVar2 = pshufhw(auVar71,auVar71,0x1b);

    pauVar1[3] = auVar2;

    auVar2 = psubsw(auVar35,auVar52);

    auVar52 = pshufhw(auVar53,auVar53,0x1b);

    pauVar1[5] = auVar52;

    auVar2 = pshufhw(auVar2,auVar2,0x1b);

    pauVar1[7] = auVar2;

  }

  if (pauVar1 != (undefined1 (*) [16])&stack0x00000000) {

    auVar36._8_8_ = *(undefined8 *)(pauVar1[4] + 8);

    auVar36._0_8_ = *(undefined8 *)(*pauVar1 + 8);

    auVar3._8_8_ = *(undefined8 *)pauVar1[4];

    auVar3._0_8_ = *(undefined8 *)*pauVar1;

    auVar2 = paddsw(auVar3,auVar36);

    auVar52 = psubsw(auVar3,auVar36);

    auVar5._0_8_ = auVar2._0_8_;

    auVar5._8_4_ = auVar2._4_4_;

    auVar5._12_4_ = auVar52._4_4_;

    auVar4._8_8_ = auVar5._8_8_;

    auVar4._0_4_ = auVar2._0_4_;

    auVar4._4_4_ = auVar52._0_4_;

    auVar54._4_4_ = auVar52._8_4_;

    auVar54._0_4_ = auVar2._8_4_;

    auVar54._8_4_ = auVar2._12_4_;

    auVar54._12_4_ = auVar52._12_4_;

    auVar37._4_4_ = auVar52._4_4_;

    auVar37._0_4_ = auVar2._4_4_;

    auVar37._8_4_ = auVar4._0_4_;

    auVar37._12_4_ = auVar52._0_4_;

    auVar82._4_4_ = auVar52._12_4_;

    auVar82._0_4_ = auVar2._12_4_;

    auVar82._8_4_ = auVar2._8_4_;

    auVar82._12_4_ = auVar52._8_4_;

    auVar52 = pmaddwd(_DAT_00833540,auVar4);

    auVar53 = pmaddwd(_DAT_00833550,auVar37);

    auVar2 = pmaddwd(auVar4,_DAT_00833560);

    auVar35 = pmaddwd(auVar37,_DAT_00833570);

    auVar27._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar27._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar27._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar27._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar6._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

    auVar6._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

    auVar6._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

    auVar6._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

    auVar2 = packssdw(auVar27,auVar6);

    auVar35 = pmaddwd(_DAT_00833540,auVar54);

    auVar70 = pmaddwd(_DAT_00833550,auVar82);

    auVar52 = pmaddwd(auVar54,_DAT_00833560);

    auVar53 = pmaddwd(auVar82,_DAT_00833570);

    auVar73._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

    auVar73._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

    auVar73._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

    auVar73._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

    auVar55._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar55._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar55._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar55._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar52 = packssdw(auVar73,auVar55);

    *pauVar1 = auVar2;

    pauVar1[4] = auVar52;

    auVar38._8_8_ = *(undefined8 *)(pauVar1[7] + 8);

    auVar38._0_8_ = *(undefined8 *)(pauVar1[1] + 8);

    auVar7._8_8_ = *(undefined8 *)pauVar1[7];

    auVar7._0_8_ = *(undefined8 *)pauVar1[1];

    auVar2 = paddsw(auVar7,auVar38);

    auVar52 = psubsw(auVar7,auVar38);

    auVar9._0_8_ = auVar2._0_8_;

    auVar9._8_4_ = auVar2._4_4_;

    auVar9._12_4_ = auVar52._4_4_;

    auVar8._8_8_ = auVar9._8_8_;

    auVar8._0_4_ = auVar2._0_4_;

    auVar8._4_4_ = auVar52._0_4_;

    auVar56._4_4_ = auVar52._8_4_;

    auVar56._0_4_ = auVar2._8_4_;

    auVar56._8_4_ = auVar2._12_4_;

    auVar56._12_4_ = auVar52._12_4_;

    auVar39._4_4_ = auVar52._4_4_;

    auVar39._0_4_ = auVar2._4_4_;

    auVar39._8_4_ = auVar8._0_4_;

    auVar39._12_4_ = auVar52._0_4_;

    auVar83._4_4_ = auVar52._12_4_;

    auVar83._0_4_ = auVar2._12_4_;

    auVar83._8_4_ = auVar2._8_4_;

    auVar83._12_4_ = auVar52._8_4_;

    auVar52 = pmaddwd(_DAT_00833580,auVar8);

    auVar53 = pmaddwd(_DAT_00833590,auVar39);

    auVar2 = pmaddwd(auVar8,_DAT_008335a0);

    auVar35 = pmaddwd(auVar39,_DAT_008335b0);

    auVar28._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar28._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar28._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar28._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar10._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

    auVar10._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

    auVar10._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

    auVar10._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

    auVar2 = packssdw(auVar28,auVar10);

    auVar35 = pmaddwd(_DAT_00833580,auVar56);

    auVar70 = pmaddwd(_DAT_00833590,auVar83);

    auVar52 = pmaddwd(auVar56,_DAT_008335a0);

    auVar53 = pmaddwd(auVar83,_DAT_008335b0);

    auVar74._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

    auVar74._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

    auVar74._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

    auVar74._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

    auVar57._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar57._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar57._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar57._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar52 = packssdw(auVar74,auVar57);

    pauVar1[1] = auVar2;

    pauVar1[7] = auVar52;

    auVar40._8_8_ = *(undefined8 *)(pauVar1[6] + 8);

    auVar40._0_8_ = *(undefined8 *)(pauVar1[2] + 8);

    auVar11._8_8_ = *(undefined8 *)pauVar1[6];

    auVar11._0_8_ = *(undefined8 *)pauVar1[2];

    auVar2 = paddsw(auVar11,auVar40);

    auVar52 = psubsw(auVar11,auVar40);

    auVar13._0_8_ = auVar2._0_8_;

    auVar13._8_4_ = auVar2._4_4_;

    auVar13._12_4_ = auVar52._4_4_;

    auVar12._8_8_ = auVar13._8_8_;

    auVar12._0_4_ = auVar2._0_4_;

    auVar12._4_4_ = auVar52._0_4_;

    auVar58._4_4_ = auVar52._8_4_;

    auVar58._0_4_ = auVar2._8_4_;

    auVar58._8_4_ = auVar2._12_4_;

    auVar58._12_4_ = auVar52._12_4_;

    auVar41._4_4_ = auVar52._4_4_;

    auVar41._0_4_ = auVar2._4_4_;

    auVar41._8_4_ = auVar12._0_4_;

    auVar41._12_4_ = auVar52._0_4_;

    auVar84._4_4_ = auVar52._12_4_;

    auVar84._0_4_ = auVar2._12_4_;

    auVar84._8_4_ = auVar2._8_4_;

    auVar84._12_4_ = auVar52._8_4_;

    auVar52 = pmaddwd(_DAT_008335c0,auVar12);

    auVar53 = pmaddwd(_DAT_008335d0,auVar41);

    auVar2 = pmaddwd(auVar12,_DAT_008335e0);

    auVar35 = pmaddwd(auVar41,_DAT_008335f0);

    auVar29._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar29._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar29._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar29._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar14._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

    auVar14._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

    auVar14._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

    auVar14._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

    auVar2 = packssdw(auVar29,auVar14);

    auVar35 = pmaddwd(_DAT_008335c0,auVar58);

    auVar70 = pmaddwd(_DAT_008335d0,auVar84);

    auVar52 = pmaddwd(auVar58,_DAT_008335e0);

    auVar53 = pmaddwd(auVar84,_DAT_008335f0);

    auVar75._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

    auVar75._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

    auVar75._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

    auVar75._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

    auVar59._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar59._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar59._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar59._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar52 = packssdw(auVar75,auVar59);

    pauVar1[2] = auVar2;

    pauVar1[6] = auVar52;

    auVar42._8_8_ = *(undefined8 *)(pauVar1[5] + 8);

    auVar42._0_8_ = *(undefined8 *)(pauVar1[3] + 8);

    auVar15._8_8_ = *(undefined8 *)pauVar1[5];

    auVar15._0_8_ = *(undefined8 *)pauVar1[3];

    auVar2 = paddsw(auVar15,auVar42);

    auVar52 = psubsw(auVar15,auVar42);

    auVar17._0_8_ = auVar2._0_8_;

    auVar17._8_4_ = auVar2._4_4_;

    auVar17._12_4_ = auVar52._4_4_;

    auVar16._8_8_ = auVar17._8_8_;

    auVar16._0_4_ = auVar2._0_4_;

    auVar16._4_4_ = auVar52._0_4_;

    auVar60._4_4_ = auVar52._8_4_;

    auVar60._0_4_ = auVar2._8_4_;

    auVar60._8_4_ = auVar2._12_4_;

    auVar60._12_4_ = auVar52._12_4_;

    auVar43._4_4_ = auVar52._4_4_;

    auVar43._0_4_ = auVar2._4_4_;

    auVar43._8_4_ = auVar16._0_4_;

    auVar43._12_4_ = auVar52._0_4_;

    auVar85._4_4_ = auVar52._12_4_;

    auVar85._0_4_ = auVar2._12_4_;

    auVar85._8_4_ = auVar2._8_4_;

    auVar85._12_4_ = auVar52._8_4_;

    auVar52 = pmaddwd(_DAT_00833600,auVar16);

    auVar53 = pmaddwd(_DAT_00833610,auVar43);

    auVar2 = pmaddwd(auVar16,_DAT_00833620);

    auVar35 = pmaddwd(auVar43,_DAT_00833630);

    auVar30._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar30._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar30._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar30._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar18._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

    auVar18._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

    auVar18._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

    auVar18._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

    auVar2 = packssdw(auVar30,auVar18);

    auVar35 = pmaddwd(_DAT_00833600,auVar60);

    auVar70 = pmaddwd(_DAT_00833610,auVar85);

    auVar52 = pmaddwd(auVar60,_DAT_00833620);

    auVar53 = pmaddwd(auVar85,_DAT_00833630);

    auVar76._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

    auVar76._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

    auVar76._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

    auVar76._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

    auVar61._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

    auVar61._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

    auVar61._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

    auVar61._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

    auVar52 = packssdw(auVar76,auVar61);

    pauVar1[3] = auVar2;

    pauVar1[5] = auVar52;

    return;

  }

  auVar2._4_4_ = param_1;

  auVar2._0_4_ = unaff_retaddr;

  auVar44._8_8_ = param_10;

  auVar44._0_8_ = param_2;

  auVar2._8_8_ = param_9;

  auVar52 = paddsw(auVar2,auVar44);

  auVar2 = psubsw(auVar2,auVar44);

  auVar35._0_8_ = auVar52._0_8_;

  auVar35._8_4_ = auVar52._4_4_;

  auVar35._12_4_ = auVar2._4_4_;

  auVar53._8_8_ = auVar35._8_8_;

  auVar53._0_4_ = auVar52._0_4_;

  auVar53._4_4_ = auVar2._0_4_;

  auVar62._4_4_ = auVar2._8_4_;

  auVar62._0_4_ = auVar52._8_4_;

  auVar62._8_4_ = auVar52._12_4_;

  auVar62._12_4_ = auVar2._12_4_;

  auVar45._4_4_ = auVar2._4_4_;

  auVar45._0_4_ = auVar52._4_4_;

  auVar45._8_4_ = auVar53._0_4_;

  auVar45._12_4_ = auVar2._0_4_;

  auVar86._4_4_ = auVar2._12_4_;

  auVar86._0_4_ = auVar52._12_4_;

  auVar86._8_4_ = auVar52._8_4_;

  auVar86._12_4_ = auVar2._8_4_;

  auVar52 = pmaddwd(_DAT_00833540,auVar53);

  auVar70 = pmaddwd(_DAT_00833550,auVar45);

  auVar2 = pmaddwd(auVar53,_DAT_00833560);

  auVar35 = pmaddwd(auVar45,_DAT_00833570);

  auVar31._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

  auVar31._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

  auVar31._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

  auVar31._12_4_ = auVar52._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

  auVar52._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

  auVar52._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

  auVar52._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

  auVar52._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

  auVar2 = packssdw(auVar31,auVar52);

  auVar35 = pmaddwd(_DAT_00833540,auVar62);

  auVar70 = pmaddwd(_DAT_00833550,auVar86);

  auVar52 = pmaddwd(auVar62,_DAT_00833560);

  auVar53 = pmaddwd(auVar86,_DAT_00833570);

  auVar77._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

  auVar77._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

  auVar77._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

  auVar77._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

  auVar63._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar63._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar63._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar63._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar52 = packssdw(auVar77,auVar63);

  *(longlong *)*param_1 = auVar2._0_8_;

  *(longlong *)(*param_1 + 8) = auVar2._8_8_;

  *(longlong *)param_1[4] = auVar52._0_8_;

  *(longlong *)(param_1[4] + 8) = auVar52._8_8_;

  auVar46._8_8_ = param_16;

  auVar46._0_8_ = param_4;

  auVar70._8_8_ = param_15;

  auVar70._0_8_ = param_3;

  auVar2 = paddsw(auVar70,auVar46);

  auVar52 = psubsw(auVar70,auVar46);

  auVar72._0_8_ = auVar2._0_8_;

  auVar72._8_4_ = auVar2._4_4_;

  auVar72._12_4_ = auVar52._4_4_;

  auVar71._8_8_ = auVar72._8_8_;

  auVar71._0_4_ = auVar2._0_4_;

  auVar71._4_4_ = auVar52._0_4_;

  auVar64._4_4_ = auVar52._8_4_;

  auVar64._0_4_ = auVar2._8_4_;

  auVar64._8_4_ = auVar2._12_4_;

  auVar64._12_4_ = auVar52._12_4_;

  auVar47._4_4_ = auVar52._4_4_;

  auVar47._0_4_ = auVar2._4_4_;

  auVar47._8_4_ = auVar71._0_4_;

  auVar47._12_4_ = auVar52._0_4_;

  auVar87._4_4_ = auVar52._12_4_;

  auVar87._0_4_ = auVar2._12_4_;

  auVar87._8_4_ = auVar2._8_4_;

  auVar87._12_4_ = auVar52._8_4_;

  auVar52 = pmaddwd(_DAT_00833580,auVar71);

  auVar53 = pmaddwd(_DAT_00833590,auVar47);

  auVar2 = pmaddwd(auVar71,_DAT_008335a0);

  auVar35 = pmaddwd(auVar47,_DAT_008335b0);

  auVar32._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar32._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar32._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar32._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar81._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

  auVar81._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

  auVar81._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

  auVar81._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

  auVar2 = packssdw(auVar32,auVar81);

  auVar35 = pmaddwd(_DAT_00833580,auVar64);

  auVar70 = pmaddwd(_DAT_00833590,auVar87);

  auVar52 = pmaddwd(auVar64,_DAT_008335a0);

  auVar53 = pmaddwd(auVar87,_DAT_008335b0);

  auVar78._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

  auVar78._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

  auVar78._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

  auVar78._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

  auVar65._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar65._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar65._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar65._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar52 = packssdw(auVar78,auVar65);

  *(longlong *)param_1[1] = auVar2._0_8_;

  *(longlong *)(param_1[1] + 8) = auVar2._8_8_;

  *(longlong *)param_1[7] = auVar52._0_8_;

  *(longlong *)(param_1[7] + 8) = auVar52._8_8_;

  auVar48._8_8_ = param_14;

  auVar48._0_8_ = param_6;

  auVar19._8_8_ = param_13;

  auVar19._0_8_ = param_5;

  auVar2 = paddsw(auVar19,auVar48);

  auVar52 = psubsw(auVar19,auVar48);

  auVar21._0_8_ = auVar2._0_8_;

  auVar21._8_4_ = auVar2._4_4_;

  auVar21._12_4_ = auVar52._4_4_;

  auVar20._8_8_ = auVar21._8_8_;

  auVar20._0_4_ = auVar2._0_4_;

  auVar20._4_4_ = auVar52._0_4_;

  auVar66._4_4_ = auVar52._8_4_;

  auVar66._0_4_ = auVar2._8_4_;

  auVar66._8_4_ = auVar2._12_4_;

  auVar66._12_4_ = auVar52._12_4_;

  auVar49._4_4_ = auVar52._4_4_;

  auVar49._0_4_ = auVar2._4_4_;

  auVar49._8_4_ = auVar20._0_4_;

  auVar49._12_4_ = auVar52._0_4_;

  auVar88._4_4_ = auVar52._12_4_;

  auVar88._0_4_ = auVar2._12_4_;

  auVar88._8_4_ = auVar2._8_4_;

  auVar88._12_4_ = auVar52._8_4_;

  auVar52 = pmaddwd(_DAT_008335c0,auVar20);

  auVar53 = pmaddwd(_DAT_008335d0,auVar49);

  auVar2 = pmaddwd(auVar20,_DAT_008335e0);

  auVar35 = pmaddwd(auVar49,_DAT_008335f0);

  auVar33._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar33._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar33._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar33._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar22._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

  auVar22._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

  auVar22._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

  auVar22._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

  auVar2 = packssdw(auVar33,auVar22);

  auVar35 = pmaddwd(_DAT_008335c0,auVar66);

  auVar70 = pmaddwd(_DAT_008335d0,auVar88);

  auVar52 = pmaddwd(auVar66,_DAT_008335e0);

  auVar53 = pmaddwd(auVar88,_DAT_008335f0);

  auVar79._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

  auVar79._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

  auVar79._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

  auVar79._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

  auVar67._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar67._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar67._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar67._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar52 = packssdw(auVar79,auVar67);

  *(longlong *)param_1[2] = auVar2._0_8_;

  *(longlong *)(param_1[2] + 8) = auVar2._8_8_;

  *(longlong *)param_1[6] = auVar52._0_8_;

  *(longlong *)(param_1[6] + 8) = auVar52._8_8_;

  auVar50._8_8_ = param_12;

  auVar50._0_8_ = param_8;

  auVar23._8_8_ = param_11;

  auVar23._0_8_ = param_7;

  auVar2 = paddsw(auVar23,auVar50);

  auVar52 = psubsw(auVar23,auVar50);

  auVar25._0_8_ = auVar2._0_8_;

  auVar25._8_4_ = auVar2._4_4_;

  auVar25._12_4_ = auVar52._4_4_;

  auVar24._8_8_ = auVar25._8_8_;

  auVar24._0_4_ = auVar2._0_4_;

  auVar24._4_4_ = auVar52._0_4_;

  auVar68._4_4_ = auVar52._8_4_;

  auVar68._0_4_ = auVar2._8_4_;

  auVar68._8_4_ = auVar2._12_4_;

  auVar68._12_4_ = auVar52._12_4_;

  auVar51._4_4_ = auVar52._4_4_;

  auVar51._0_4_ = auVar2._4_4_;

  auVar51._8_4_ = auVar24._0_4_;

  auVar51._12_4_ = auVar52._0_4_;

  auVar89._4_4_ = auVar52._12_4_;

  auVar89._0_4_ = auVar2._12_4_;

  auVar89._8_4_ = auVar2._8_4_;

  auVar89._12_4_ = auVar52._8_4_;

  auVar52 = pmaddwd(_DAT_00833600,auVar24);

  auVar53 = pmaddwd(_DAT_00833610,auVar51);

  auVar2 = pmaddwd(auVar24,_DAT_00833620);

  auVar35 = pmaddwd(auVar51,_DAT_00833630);

  auVar34._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar34._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar34._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar34._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar26._0_4_ = auVar2._0_4_ + (int)DAT_008333e0 + auVar35._0_4_ >> 0x14;

  auVar26._4_4_ = auVar2._4_4_ + DAT_008333e0._4_4_ + auVar35._4_4_ >> 0x14;

  auVar26._8_4_ = auVar2._8_4_ + iRam008333e8 + auVar35._8_4_ >> 0x14;

  auVar26._12_4_ = auVar2._12_4_ + iRam008333ec + auVar35._12_4_ >> 0x14;

  auVar2 = packssdw(auVar34,auVar26);

  auVar35 = pmaddwd(_DAT_00833600,auVar68);

  auVar70 = pmaddwd(_DAT_00833610,auVar89);

  auVar52 = pmaddwd(auVar68,_DAT_00833620);

  auVar53 = pmaddwd(auVar89,_DAT_00833630);

  auVar80._0_4_ = auVar35._0_4_ + (int)DAT_008333e0 + auVar70._0_4_ >> 0x14;

  auVar80._4_4_ = auVar35._4_4_ + DAT_008333e0._4_4_ + auVar70._4_4_ >> 0x14;

  auVar80._8_4_ = auVar35._8_4_ + iRam008333e8 + auVar70._8_4_ >> 0x14;

  auVar80._12_4_ = auVar35._12_4_ + iRam008333ec + auVar70._12_4_ >> 0x14;

  auVar69._0_4_ = auVar52._0_4_ + (int)DAT_008333e0 + auVar53._0_4_ >> 0x14;

  auVar69._4_4_ = auVar52._4_4_ + DAT_008333e0._4_4_ + auVar53._4_4_ >> 0x14;

  auVar69._8_4_ = auVar52._8_4_ + iRam008333e8 + auVar53._8_4_ >> 0x14;

  auVar69._12_4_ = auVar52._12_4_ + iRam008333ec + auVar53._12_4_ >> 0x14;

  auVar52 = packssdw(auVar80,auVar69);

  *(longlong *)param_1[3] = auVar2._0_8_;

  *(longlong *)(param_1[3] + 8) = auVar2._8_8_;

  *(longlong *)param_1[5] = auVar52._0_8_;

  *(longlong *)(param_1[5] + 8) = auVar52._8_8_;

  return;

}





// --- FUN_00650b00 at 0x00650B00 (size: 76) ---


longlong __fastcall FUN_00650b00(undefined4 param_1,uint param_2,int param_3)



{

  int iVar1;

  int iVar2;

  int iVar3;

  int local_8;

  

  iVar3 = *(int *)(param_3 + 0x14);

  iVar2 = *(int *)(param_3 + 0x10) - iVar3;

  iVar1 = FUN_00619550(*(undefined4 *)(param_3 + 0x3c),iVar3,iVar2,&local_8);

  if ((iVar1 != 0) && (iVar2 == local_8)) {

    *(int *)(param_3 + 0x10) = iVar3;

    return (ulonglong)param_2 << 0x20;

  }

  return CONCAT44(param_2,0xffffffe9);

}





// --- FUN_00650b50 at 0x00650B50 (size: 841) ---


longlong __fastcall FUN_00650b50(undefined4 param_1,uint param_2,undefined4 param_3,int param_4)



{

  uint *puVar1;

  uint uVar2;

  uint uVar3;

  int iVar4;

  int unaff_ESI;

  int iVar5;

  ulonglong uVar6;

  undefined8 in_MM7;

  

  do {

    iVar4 = param_4 + *(int *)(unaff_ESI + 0xc);

    if (iVar4 < 0x41) {

      *(int *)(unaff_ESI + 0xc) = iVar4;

      return (ulonglong)param_2 << 0x20;

    }

    iVar4 = iVar4 - param_4;

    puVar1 = *(uint **)(unaff_ESI + 0x10);

    if (3 < *(int *)(unaff_ESI + 0x18) - (int)(puVar1 + 1)) {

      uVar6 = psllw(in_MM7,8);

      uVar6 = uVar6 | CONCAT26((ushort)((ulonglong)in_MM7 >> 0x38),

                               CONCAT24((ushort)((ulonglong)in_MM7 >> 0x20) >> 8,

                                        CONCAT22((ushort)((ulonglong)in_MM7 >> 0x10) >> 8,

                                                 (ushort)in_MM7 >> 8)));

      uVar6 = pshufw(uVar6,uVar6,0x1b);

      iVar5 = CONCAT13(-((char)(uVar6 >> 0x18) == -1),

                       CONCAT12(-((char)(uVar6 >> 0x10) == -1),

                                CONCAT11(-((char)(uVar6 >> 8) == -1),-((char)uVar6 == -1))));

      uVar2 = (uint)uVar6;

      if (iVar5 == 0) {

        *puVar1 = uVar2;

        iVar4 = iVar4 + -0x20;

        *(uint **)(unaff_ESI + 0x10) = puVar1 + 1;

        *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

      }

      else if (iVar5 == -0x1000000) {

        *puVar1 = uVar2;

        iVar4 = iVar4 + -0x18;

        *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

        *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

        *(int *)(unaff_ESI + 0xc) = iVar4;

      }

      else if (iVar5 == 0xff0000) {

        *puVar1 = uVar2 & (uint)DAT_00833b78;

        iVar4 = iVar4 + -0x18;

        *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

        *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

        *(int *)(unaff_ESI + 0xc) = iVar4;

      }

      else if (iVar5 == 0xff00) {

        *puVar1 = uVar2 & (uint)DAT_00833b80 | (uint)((uVar6 & DAT_00833b88) << 8);

        iVar4 = iVar4 + -0x18;

        *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

        *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

        *(int *)(unaff_ESI + 0xc) = iVar4;

      }

      else {

        uVar3 = (uint)DAT_00833b40;

        if ((iVar5 == 0xff) || (iVar5 == -0xffff01)) {

          *puVar1 = (uint)((uVar6 & DAT_00833b60) << 8) | uVar3;

          iVar4 = iVar4 + -0x18;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else if (iVar5 == -0xff0100) {

          *puVar1 = (uint)(ushort)uVar6 | (uint)((uVar6 & DAT_00833b88) << 8);

          iVar4 = iVar4 + -0x18;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else if (iVar5 == 0xff00ff) {

          *puVar1 = (uint)((uVar6 & DAT_00833b60) << 8) | uVar3;

          iVar4 = iVar4 + -0x10;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else if (iVar5 == 0xffff00) {

          *puVar1 = uVar2 & (uint)DAT_00833b80 | (uint)DAT_00833b90;

          iVar4 = iVar4 + -0x10;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else if (iVar5 == -0x10000) {

          *puVar1 = uVar2 & (uint)DAT_00833b78;

          iVar4 = iVar4 + -0x18;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else if ((iVar5 == 0xffff) || (iVar5 == -0xff0001)) {

          *puVar1 = (uint)DAT_00833b50;

          iVar4 = iVar4 + -0x10;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

        else {

          if (iVar5 != -0xff01) {

            return CONCAT44(param_2,0xffffffe8);

          }

          *puVar1 = (uint)((uVar6 & DAT_00833b60) << 8) | uVar3;

          iVar4 = iVar4 + -0x10;

          *(int *)(unaff_ESI + 0x1c) = *(int *)(unaff_ESI + 0x1c) + 4;

          *(int *)(unaff_ESI + 0x10) = *(int *)(unaff_ESI + 0x10) + 4;

          *(int *)(unaff_ESI + 0xc) = iVar4;

        }

      }

      *(int *)(unaff_ESI + 0xc) = iVar4 + param_4;

      return (ulonglong)param_2 << 0x20;

    }

    if (*(int *)(unaff_ESI + 0x3c) == 0) {

      return CONCAT44(param_2,0xffffffe4);

    }

    iVar4 = FUN_00650b00();

  } while (iVar4 == 0);

  return CONCAT44(param_2,iVar4);

}





// --- FUN_00650eb0 at 0x00650EB0 (size: 385) ---


undefined8 __fastcall

FUN_00650eb0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,int param_5,

            short *param_6,short *param_7)



{

  short sVar1;

  short sVar2;

  int iVar3;

  int iVar4;

  undefined4 extraout_ECX;

  undefined4 extraout_ECX_00;

  int iVar5;

  undefined8 uVar6;

  undefined8 uVar7;

  int local_18;

  int local_14;

  

  sVar1 = *param_7;

  sVar2 = *param_6;

  *param_6 = sVar1;

  iVar3 = (int)sVar1 - (int)sVar2;

  if ((int)sVar1 < (int)sVar2) {

    iVar3 = -iVar3;

  }

  iVar4 = iVar3;

  if (0xff < iVar3) {

    iVar4 = iVar3 >> 8;

  }

  iVar5 = *(int *)(&DAT_00833740 + iVar4 * 4);

  if (0xff < iVar3) {

    iVar5 = *(int *)(&DAT_00833740 + iVar4 * 4) + 8;

  }

  uVar6 = *param_3;

  uVar7 = FUN_00650b50(*(undefined2 *)(param_4 + 0x408 + iVar5 * 2),

                       *(undefined4 *)(param_4 + 8 + iVar5 * 4));

  iVar3 = (int)uVar7;

  if (iVar3 == 0) {

    iVar3 = FUN_00650b50((int)((ulonglong)uVar7 >> 0x20),extraout_ECX);

    if (iVar3 == 0) {

      local_14 = 0;

      local_18 = 1;

      do {

        iVar4 = (int)param_7[(&DAT_00833640)[local_18]];

        if (iVar4 == 0) {

          local_14 = local_14 + 1;

        }

        else {

          for (; 0xf < local_14; local_14 = local_14 + -0x10) {

            iVar3 = FUN_00650b50(*(undefined2 *)(param_5 + 0x5e8),*(undefined4 *)(param_5 + 0x3c8));

            if (iVar3 != 0) goto LAB_00651027;

          }

          if (iVar4 < 0) {

            iVar4 = -iVar4;

          }

          iVar3 = iVar4;

          if (0xff < iVar4) {

            iVar3 = iVar4 >> 8;

          }

          iVar5 = *(int *)(&DAT_00833740 + iVar3 * 4);

          if (0xff < iVar4) {

            iVar5 = *(int *)(&DAT_00833740 + iVar3 * 4) + 8;

          }

          iVar5 = local_14 * 0x10 + iVar5;

          uVar7 = FUN_00650b50(*(undefined2 *)(param_5 + 0x408 + iVar5 * 2),

                               *(undefined4 *)(param_5 + 8 + iVar5 * 4));

          iVar3 = (int)uVar7;

          if (iVar3 != 0) goto LAB_00651027;

          iVar3 = FUN_00650b50((int)((ulonglong)uVar7 >> 0x20),extraout_ECX_00);

          if (iVar3 != 0) goto LAB_00651027;

          local_14 = 0;

        }

        local_18 = local_18 + 1;

      } while (local_18 < 0x40);

      if (local_14 != 0) {

        iVar3 = FUN_00650b50(*(undefined2 *)(param_5 + 0x408),*(undefined4 *)(param_5 + 8));

        if (iVar3 != 0) goto LAB_00651027;

      }

      iVar3 = 0;

    }

  }

LAB_00651027:

  *param_3 = uVar6;

  return CONCAT44(param_2,iVar3);

}





// --- FUN_00651040 at 0x00651040 (size: 607) ---


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



undefined8 __fastcall

FUN_00651040(undefined4 param_1,undefined4 param_2,int param_3,ulonglong *param_4,uint *param_5,

            uint *param_6)



{

  uint uVar1;

  uint uVar2;

  uint uVar3;

  undefined4 in_EAX;

  uint uVar4;

  uint uVar5;

  uint uVar6;

  ulonglong *puVar7;

  short sVar8;

  short sVar12;

  short sVar13;

  ulonglong uVar9;

  short sVar14;

  ulonglong uVar10;

  ulonglong uVar11;

  uint uVar15;

  ulonglong uVar16;

  ulonglong uVar20;

  ulonglong uVar21;

  undefined8 uVar22;

  int *piStack_2c;

  int local_10;

  uint local_c;

  ulonglong *local_8;

  ushort uVar17;

  ushort uVar18;

  ushort uVar19;

  

  local_8 = param_4;

  piStack_2c = &DAT_00833640;

  local_10 = 0x10;

  local_c = 0;

  do {

    uVar3 = local_c;

    uVar5 = *(uint *)(param_3 + *piStack_2c * 2);

    uVar1 = *(uint *)(param_3 + piStack_2c[1] * 2);

    uVar15 = *(uint *)(param_3 + piStack_2c[2] * 2);

    uVar2 = *(uint *)(param_3 + piStack_2c[3] * 2);

    uVar4 = uVar5 & 0xffff | uVar1 << 0x10;

    uVar6 = uVar15 & 0xffff | uVar2 << 0x10;

    if (uVar4 == 0 && uVar6 == 0) {

      local_c = local_c + 4;

    }

    else {

      uVar5 = CONCAT22(-(ushort)((short)uVar1 == 0),-(ushort)((short)uVar5 == 0));

      uVar15 = CONCAT22(-(ushort)((short)uVar2 == 0),-(ushort)((short)uVar15 == 0));

      if (uVar5 != 0 || uVar15 != 0) {

        uVar5 = ~uVar5 & 0x20001 | ~uVar15 & 0x80004;

                    /* WARNING: Could not recover jumptable at 0x006510fe. Too many branches */

                    /* WARNING: Treating indirect jump as call */

        uVar22 = (*(code *)(&DAT_00651100 + ((uVar5 >> 0x10 | uVar5 & 0xffff) - 1) * 8))();

        return uVar22;

      }

      local_c = 0;

      *(uint *)((int)local_8 + 0x104) = 0;

      *(uint *)local_8 = uVar4;

      *(uint *)((int)local_8 + 4) = uVar1 & 0xffff;

      *(uint *)(local_8 + 0x21) = 0;

      *(uint *)(local_8 + 0x20) = uVar3;

      *(uint *)(local_8 + 1) = uVar6;

      *(uint *)((int)local_8 + 0x10c) = 0;

      *(uint *)((int)local_8 + 0xc) = uVar2 & 0xffff;

      local_8 = local_8 + 2;

    }

    piStack_2c = piStack_2c + 4;

    local_10 = local_10 + -1;

  } while (local_10 != 0);

  uVar5 = (uint)((int)local_8 - (int)param_4) >> 2;

  *param_6 = uVar5;

  uVar5 = uVar5 + 4 & 0xfc;

  puVar7 = param_4;

  do {

    uVar9 = packssdw(CONCAT44((int)(short)(*param_4 >> 0x20),(int)(short)*param_4),

                     CONCAT44((int)(short)(param_4[1] >> 0x20),(int)(short)param_4[1]));

    sVar8 = (short)uVar9;

    sVar12 = (short)(uVar9 >> 0x10);

    sVar13 = (short)(uVar9 >> 0x20);

    sVar14 = (short)(uVar9 >> 0x30);

    uVar11 = CONCAT26(-(ushort)(0 < sVar14),

                      CONCAT24(-(ushort)(0 < sVar13),

                               CONCAT22(-(ushort)(0 < sVar12),-(ushort)(0 < sVar8))));

    uVar10 = ~uVar11 & CONCAT26(-sVar14,CONCAT24(-sVar13,CONCAT22(-sVar12,-sVar8))) | uVar9 & uVar11

    ;

    uVar17 = (ushort)(uVar10 >> 0x10);

    uVar18 = (ushort)(uVar10 >> 0x20);

    uVar19 = (ushort)(uVar10 >> 0x30);

    uVar16 = CONCAT26(-(ushort)((short)((ulonglong)DAT_00833bc8 >> 0x30) < (short)uVar19),

                      CONCAT24(-(ushort)((short)((ulonglong)DAT_00833bc8 >> 0x20) < (short)uVar18),

                               CONCAT22(-(ushort)((short)((ulonglong)DAT_00833bc8 >> 0x10) <

                                                 (short)uVar17),

                                        -(ushort)((short)DAT_00833bc8 < (short)(ushort)uVar10))));

    *puVar7 = ~uVar11 & CONCAT26(sVar14 - (short)(DAT_00833b98 >> 0x30),

                                 CONCAT24(sVar13 - (short)(DAT_00833b98 >> 0x20),

                                          CONCAT22(sVar12 - (short)(DAT_00833b98 >> 0x10),

                                                   sVar8 - (short)DAT_00833b98))) | uVar9 & uVar11;

    uVar9 = CONCAT26(uVar19 >> 8,CONCAT24(uVar18 >> 8,CONCAT22(uVar17 >> 8,(ushort)uVar10 >> 8))) &

            uVar16;

    uVar11 = uVar9 | ~uVar16 & uVar10;

    uVar9 = uVar9 | ~uVar16 & uVar10;

    uVar21 = CONCAT26(-(ushort)((short)((ulonglong)DAT_00833bc0 >> 0x30) < (short)(uVar9 >> 0x30)),

                      CONCAT24(-(ushort)((short)((ulonglong)DAT_00833bc0 >> 0x20) <

                                        (short)(uVar9 >> 0x20)),

                               CONCAT22(-(ushort)((short)((ulonglong)DAT_00833bc0 >> 0x10) <

                                                 (short)(uVar9 >> 0x10)),

                                        -(ushort)((short)DAT_00833bc0 < (short)uVar9))));

    uVar9 = CONCAT26((ushort)(uVar11 >> 0x34),

                     CONCAT24((ushort)(uVar11 >> 0x20) >> 4,

                              CONCAT22((ushort)(uVar11 >> 0x10) >> 4,(ushort)uVar11 >> 4))) & uVar21

    ;

    uVar10 = uVar9 | ~uVar21 & uVar11;

    uVar9 = uVar9 | ~uVar21 & uVar11;

    uVar20 = CONCAT26(-(ushort)((short)((ulonglong)DAT_00833ba8 >> 0x30) < (short)(uVar9 >> 0x30)),

                      CONCAT24(-(ushort)((short)((ulonglong)DAT_00833ba8 >> 0x20) <

                                        (short)(uVar9 >> 0x20)),

                               CONCAT22(-(ushort)((short)((ulonglong)DAT_00833ba8 >> 0x10) <

                                                 (short)(uVar9 >> 0x10)),

                                        -(ushort)((short)DAT_00833ba8 < (short)uVar9))));

    uVar9 = CONCAT26((ushort)(uVar10 >> 0x32),

                     CONCAT24((ushort)(uVar10 >> 0x20) >> 2,

                              CONCAT22((ushort)(uVar10 >> 0x10) >> 2,(ushort)uVar10 >> 2))) & uVar20

    ;

    uVar11 = uVar9 | ~uVar20 & uVar10;

    uVar9 = uVar9 | ~uVar20 & uVar10;

    uVar10 = CONCAT26(-(ushort)((short)(DAT_00833b98 >> 0x30) < (short)(uVar9 >> 0x30)),

                      CONCAT24(-(ushort)((short)(DAT_00833b98 >> 0x20) < (short)(uVar9 >> 0x20)),

                               CONCAT22(-(ushort)((short)(DAT_00833b98 >> 0x10) <

                                                 (short)(uVar9 >> 0x10)),

                                        -(ushort)((short)DAT_00833b98 < (short)uVar9))));

    uVar9 = CONCAT26((ushort)(uVar11 >> 0x31),

                     CONCAT24((ushort)(uVar11 >> 0x20) >> 1,

                              CONCAT22((ushort)(uVar11 >> 0x10) >> 1,(ushort)uVar11 >> 1))) & uVar10

            | ~uVar10 & uVar11;

    uVar11 = uVar16 & _DAT_00833bb8 | uVar21 & _DAT_00833bb0 |

             uVar10 & DAT_00833b98 | uVar20 & _DAT_00833ba0;

    param_4 = param_4 + 2;

    puVar7[0x40] = CONCAT26((short)(uVar9 >> 0x30) + (short)(uVar11 >> 0x30),

                            CONCAT24((short)(uVar9 >> 0x20) + (short)(uVar11 >> 0x20),

                                     CONCAT22((short)(uVar9 >> 0x10) + (short)(uVar11 >> 0x10),

                                              (short)uVar9 + (short)uVar11)));

    uVar5 = uVar5 - 4;

    puVar7 = puVar7 + 1;

  } while (uVar5 != 0);

  *param_5 = local_c;

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_006515a0 at 0x006515A0 (size: 109) ---


undefined4 FUN_006515a0(int param_1)



{

  int iVar1;

  undefined4 local_14 [4];

  

  iVar1 = FUN_00619530(*(undefined4 *)(param_1 + 0x3c),param_1 + 0x40,0x1000,local_14);

  *(undefined4 *)(param_1 + 0x24) = local_14[0];

  if ((iVar1 != 0) && (*(int *)(param_1 + 0x24) == 0)) {

    return 0xfffffff5;

  }

  *(int *)(param_1 + 0x10) = param_1 + 0x40;

  return 0;

}





// --- FUN_00651610 at 0x00651610 (size: 645) ---


undefined4 FUN_00651610(ulonglong *param_1,int param_2,int param_3,short *param_4)



{

  undefined4 uVar1;

  undefined4 uVar2;

  ulonglong uVar3;

  ulonglong uVar4;

  uint uVar5;

  int iVar6;

  int iVar7;

  uint uVar8;

  int iVar9;

  ulonglong uVar10;

  ulonglong extraout_MM1;

  ulonglong extraout_MM1_00;

  ulonglong extraout_MM1_01;

  ulonglong extraout_MM1_02;

  ulonglong extraout_MM1_03;

  ulonglong extraout_MM1_04;

  ulonglong uVar11;

  undefined8 uVar12;

  ulonglong uVar13;

  

  uVar1 = *(undefined4 *)((int)param_1 + 0x1c);

  uVar2 = *(undefined4 *)((int)param_1 + 0x24);

  uVar3 = param_1[6];

  uVar10 = *param_1;

  iVar9 = *(int *)((int)param_1 + 0xc);

  uVar4 = param_1[2];

  uVar12 = 0x40;

  if (iVar9 < 8) {

    iVar6 = FUN_00651895();

    uVar10 = extraout_MM1;

    if (iVar6 == 0) goto LAB_00651861;

    if (7 < iVar9) goto LAB_00651669;

LAB_006517c3:

    uVar5 = FUN_006519f3();

    uVar10 = extraout_MM1_01;

    if ((int)uVar5 < 0) goto LAB_00651861;

  }

  else {

LAB_00651669:

    uVar5 = *(uint *)(param_2 + 8 + (uint)(byte)(uVar10 >> 0x38) * 4);

    if ((int)uVar5 < 0x10000) goto LAB_006517c3;

    iVar9 = iVar9 - (uVar5 >> 0x10);

    uVar10 = uVar10 << (ulonglong)(uVar5 >> 0x10);

    uVar5 = uVar5 & 0xffff;

  }

  if (((int)uVar5 <= iVar9) || (iVar6 = FUN_00651895(), uVar10 = extraout_MM1_00, iVar6 != 0)) {

    iVar9 = iVar9 - uVar5;

    iVar6 = (int)(uVar10 >> CONCAT44((int)((ulonglong)uVar12 >> 0x20),(int)uVar12 - uVar5));

    uVar10 = uVar10 << (ulonglong)uVar5;

    if (iVar6 < *(int *)(&DAT_00908100 + uVar5 * 4)) {

      iVar6 = iVar6 + *(int *)(&DAT_009080c0 + uVar5 * 4);

    }

    iVar7 = 1;

    *param_4 = *param_4 + (short)iVar6;

LAB_006516ea:

    do {

      if (iVar9 < 8) {

        uVar12 = FUN_00651895();

        iVar7 = (int)((ulonglong)uVar12 >> 0x20);

        uVar10 = extraout_MM1_03;

        if ((int)uVar12 == 0) break;

        if (7 < iVar9) goto LAB_006516ea;

LAB_00651842:

        uVar13 = FUN_006519f3();

        uVar10 = extraout_MM1_04;

        if ((int)uVar13 < 0) break;

      }

      else {

        uVar5 = *(uint *)(param_3 + 8 + (uint)(byte)(uVar10 >> 0x38) * 4);

        uVar8 = uVar5 >> 0x10;

        uVar13 = CONCAT44(iVar7,uVar5) & 0xffffffff0000ffff;

        if (uVar8 == 0) goto LAB_00651842;

        iVar9 = iVar9 - uVar8;

        uVar10 = uVar10 << (ulonglong)uVar8;

      }

      iVar7 = (int)(uVar13 >> 0x20);

      uVar5 = (uint)uVar13;

      uVar8 = uVar5 & 0xf;

      uVar11 = (ulonglong)uVar8;

      if ((uVar13 & 0xf) == 0) {

        if ((int)uVar5 < 0xf0) goto LAB_00651754;

        iVar7 = iVar7 + 0x10;

      }

      else {

        iVar7 = iVar7 + (uVar5 >> 4);

        if (iVar9 < (int)uVar8) {

          uVar12 = FUN_00651895();

          iVar7 = (int)((ulonglong)uVar12 >> 0x20);

          uVar10 = extraout_MM1_02;

          if ((int)uVar12 == 0) break;

        }

        iVar9 = iVar9 - uVar8;

        uVar10 = uVar10 << uVar11;

        iVar7 = iVar7 + 1;

      }

      if (0x3f < iVar7) {

LAB_00651754:

        *param_1 = uVar10;

        *(int *)((int)param_1 + 0xc) = iVar9;

        *(int *)(param_1 + 2) = (int)uVar4;

        *(undefined4 *)((int)param_1 + 0x24) = uVar2;

        *(char *)(param_1 + 6) = (char)uVar3;

        *(undefined4 *)((int)param_1 + 0x1c) = uVar1;

        return 0;

      }

    } while( true );

  }

LAB_00651861:

  *param_1 = uVar10;

  *(int *)((int)param_1 + 0xc) = iVar9;

  *(int *)(param_1 + 2) = (int)uVar4;

  *(undefined4 *)((int)param_1 + 0x24) = uVar2;

  *(char *)(param_1 + 6) = (char)uVar3;

  *(undefined4 *)((int)param_1 + 0x1c) = uVar1;

  return 0;

}





// --- FUN_00651895 at 0x00651895 (size: 350) ---


undefined4 __fastcall FUN_00651895(undefined4 param_1,undefined4 param_2)



{

  byte bVar1;

  undefined4 uVar2;

  uint in_EAX;

  int iVar3;

  int iVar4;

  undefined4 unaff_EBX;

  int unaff_EBP;

  byte *unaff_ESI;

  int unaff_EDI;

  

  iVar4 = *(int *)(unaff_EBP + -0x24);

  if (*(char *)(unaff_EBP + -0x20) == '\0') {

    if (3 < iVar4) {

      uVar2 = *(undefined4 *)unaff_ESI;

      in_EAX = CONCAT13(-((char)uVar2 == -1),

                        CONCAT12(-((char)((uint)uVar2 >> 8) == -1),

                                 CONCAT11(-((char)((uint)uVar2 >> 0x10) == -1),

                                          -((char)((uint)uVar2 >> 0x18) == -1))));

      if (in_EAX == 0) {

        *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 4;

        *(int *)(unaff_EBP + -0x24) = iVar4 + -4;

        return 0xff;

      }

    }

    iVar4 = *(int *)(unaff_EBP + -0x24);

    do {

      for (; iVar4 < 1; iVar4 = *(int *)(iVar4 + 0x24)) {

        iVar4 = *(int *)(unaff_EBP + 8);

        if ((*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) ||

           (iVar3 = FUN_006515a0(iVar4,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                                 param_2,iVar4,in_EAX), iVar3 != 0)) {

          return 0;

        }

        unaff_ESI = *(byte **)(iVar4 + 0x10);

      }

      *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

      in_EAX = (uint)*unaff_ESI;

      unaff_ESI = unaff_ESI + 1;

      iVar3 = iVar4 + -1;

      iVar4 = iVar4 + -1;

      if (in_EAX == 0xff) {

        do {

          while (iVar4 = iVar3 + -1, iVar3 < 1) {

            iVar4 = *(int *)(unaff_EBP + 8);

            if (*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) {

              return 0;

            }

            iVar3 = FUN_006515a0(iVar4,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                                 param_2,iVar4,in_EAX);

            if (iVar3 != 0) {

              return 0;

            }

            unaff_ESI = *(byte **)(iVar4 + 0x10);

            iVar3 = *(int *)(iVar4 + 0x24);

          }

          *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

          bVar1 = *unaff_ESI;

          in_EAX = (uint)bVar1;

          unaff_ESI = unaff_ESI + 1;

          iVar3 = iVar4;

        } while (in_EAX == 0xff);

        if (in_EAX != 0) {

          *(byte *)(unaff_EBP + -0x20) = bVar1;

          break;

        }

        in_EAX = 0xff;

      }

      unaff_EDI = unaff_EDI + 8;

    } while (unaff_EDI < 0x39);

  }

  *(int *)(unaff_EBP + -0x24) = iVar4;

  return 0xff;

}





// --- FUN_006519f3 at 0x006519F3 (size: 215) ---


longlong __fastcall FUN_006519f3(undefined4 param_1,uint param_2)



{

  int iVar1;

  uint uVar2;

  uint unaff_EBX;

  uint uVar3;

  int unaff_EBP;

  int unaff_EDI;

  int iVar4;

  ulonglong in_MM1;

  longlong lVar5;

  ulonglong extraout_MM1;

  longlong extraout_MM1_00;

  undefined8 in_MM4;

  

  *(uint *)(unaff_EBP + -0x10) = unaff_EBX;

  if (unaff_EDI < (int)unaff_EBX) {

    iVar4 = FUN_00651895();

    if (iVar4 == 0) goto LAB_00651ac3;

    unaff_EBX = *(uint *)(unaff_EBP + -0x10);

    in_MM1 = extraout_MM1;

  }

  iVar4 = unaff_EDI - unaff_EBX;

  uVar2 = (uint)(in_MM1 >> CONCAT44((int)((ulonglong)in_MM4 >> 0x20),(int)in_MM4 - unaff_EBX));

  lVar5 = in_MM1 << (ulonglong)unaff_EBX;

  while( true ) {

    iVar1 = *(int *)(unaff_EBP + -0x10);

    uVar3 = (uint)*(short *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    if (uVar3 != 0xffffffff) {

      uVar3 = (uint)*(ushort *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    }

    if ((int)uVar2 <= (int)uVar3) {

      if (iVar1 < 0x11) {

        iVar4 = *(int *)(unaff_EBP + -0x14);

        return CONCAT44(param_2,(int)*(short *)(iVar4 + 0x408 +

                                               CONCAT22((short)(uVar2 >> 0x10),

                                                        ((short)uVar2 -

                                                        *(short *)(iVar4 + 0x608 +

                                                                  *(int *)(unaff_EBP + -0x10) * 2))

                                                        + *(short *)(iVar4 + 0x64e +

                                                                    *(int *)(unaff_EBP + -0x10) * 2)

                                                       ) * 2));

      }

      return (ulonglong)param_2 << 0x20;

    }

    if ((iVar4 < 1) && (iVar1 = FUN_00651895(), lVar5 = extraout_MM1_00, iVar1 == 0)) break;

    iVar4 = iVar4 + -1;

    *(int *)(unaff_EBP + -0x10) = *(int *)(unaff_EBP + -0x10) + 1;

    uVar2 = uVar2 << 1 | (uint)((ulonglong)lVar5 >> 0x3f);

    lVar5 = lVar5 << 1;

  }

LAB_00651ac3:

  return CONCAT44(param_2,1);

}





// --- FUN_00651ae0 at 0x00651AE0 (size: 1192) ---


undefined4 FUN_00651ae0(ulonglong *param_1,int param_2,int param_3,ushort *param_4,uint *param_5)



{

  char cVar1;

  short sVar2;

  uint uVar3;

  ushort uVar4;

  int iVar5;

  int iVar6;

  uint uVar7;

  uint *puVar8;

  int iVar9;

  ulonglong uVar10;

  ulonglong uVar11;

  ulonglong uVar12;

  ulonglong extraout_MM1;

  ulonglong extraout_MM1_00;

  ulonglong extraout_MM1_01;

  ulonglong extraout_MM1_02;

  ulonglong extraout_MM1_03;

  ulonglong extraout_MM1_04;

  longlong lVar13;

  undefined8 uVar15;

  undefined8 uVar16;

  int local_2c;

  int local_24;

  undefined4 uVar14;

  

  uVar11 = *param_1;

  iVar9 = *(int *)((int)param_1 + 0xc);

  puVar8 = *(uint **)(param_1 + 2);

  local_2c = *(int *)((int)param_1 + 0x1c);

  local_24 = *(int *)((int)param_1 + 0x24);

  cVar1 = (char)param_1[6];

  uVar15 = 0x40;

  param_5[0] = 0;

  param_5[1] = 0;

  param_5[2] = 0;

  param_5[3] = 0;

  param_5[4] = 0;

  param_5[5] = 0;

  param_5[6] = 0;

  param_5[7] = 0;

  param_5[8] = 0;

  param_5[9] = 0;

  param_5[10] = 0;

  param_5[0xb] = 0;

  param_5[0xc] = 0;

  param_5[0xd] = 0;

  param_5[0xe] = 0;

  param_5[0xf] = 0;

  param_5[0x10] = 0;

  param_5[0x11] = 0;

  param_5[0x12] = 0;

  param_5[0x13] = 0;

  param_5[0x14] = 0;

  param_5[0x15] = 0;

  param_5[0x16] = 0;

  param_5[0x17] = 0;

  param_5[0x18] = 0;

  param_5[0x19] = 0;

  param_5[0x1a] = 0;

  param_5[0x1b] = 0;

  param_5[0x1c] = 0;

  param_5[0x1d] = 0;

  param_5[0x1e] = 0;

  param_5[0x1f] = 0;

  if (iVar9 < 8) {

    uVar11 = uVar11 >> (ulonglong)(0x40 - iVar9);

    if (cVar1 == '\0') {

      if (3 < local_24) {

        uVar3 = *puVar8;

        if (CONCAT13(-((char)uVar3 == -1),

                     CONCAT12(-((char)((uVar3 & 0xff00) >> 8) == -1),

                              CONCAT11(-((char)((uVar3 & 0xff0000) >> 0x10) == -1),

                                       -((char)(uVar3 >> 0x18) == -1)))) == 0) {

          puVar8 = puVar8 + 1;

          iVar9 = iVar9 + 0x20;

          uVar11 = uVar11 << 0x20 |

                   (ulonglong)

                   (uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18)

          ;

          local_24 = local_24 + -4;

          local_2c = local_2c + 4;

          goto LAB_00651d0e;

        }

      }

      iVar5 = FUN_00651f88();

      uVar11 = extraout_MM1;

      if (iVar5 == 0) goto LAB_00651f54;

    }

    else {

LAB_00651d0e:

      uVar11 = uVar11 << (ulonglong)(0x40 - iVar9);

    }

    if (7 < iVar9) goto LAB_00651b76;

LAB_00651dd2:

    uVar3 = FUN_00652085();

    uVar11 = extraout_MM1_01;

    if ((int)uVar3 < 0) goto LAB_00651f54;

  }

  else {

LAB_00651b76:

    uVar3 = (uint)(byte)(uVar11 >> 0x38);

    uVar7 = (uint)*(ushort *)(param_2 + 10 + uVar3 * 4);

    uVar3 = (uint)*(ushort *)(param_2 + 8 + uVar3 * 4);

    if (uVar7 == 0) goto LAB_00651dd2;

    iVar9 = iVar9 - uVar7;

    uVar11 = uVar11 << (ulonglong)uVar7;

  }

  if ((int)uVar3 <= iVar9) goto LAB_00651ba7;

  uVar14 = (undefined4)((ulonglong)uVar15 >> 0x20);

  uVar11 = uVar11 >> CONCAT44(uVar14,(int)uVar15 - iVar9);

  if (cVar1 == '\0') {

    if (3 < local_24) {

      uVar7 = *puVar8;

      if (CONCAT13(-((char)uVar7 == -1),

                   CONCAT12(-((char)((uVar7 & 0xff00) >> 8) == -1),

                            CONCAT11(-((char)((uVar7 & 0xff0000) >> 0x10) == -1),

                                     -((char)(uVar7 >> 0x18) == -1)))) == 0) {

        puVar8 = puVar8 + 1;

        iVar9 = iVar9 + 0x20;

        uVar11 = uVar11 << 0x20 |

                 (ulonglong)

                 (uVar7 >> 0x18 | (uVar7 & 0xff0000) >> 8 | (uVar7 & 0xff00) << 8 | uVar7 << 0x18);

        local_24 = local_24 + -4;

        local_2c = local_2c + 4;

        goto LAB_00651da3;

      }

    }

    iVar5 = FUN_00651f88();

    uVar11 = extraout_MM1_00;

    if (iVar5 == 0) {

LAB_00651f54:

      *param_1 = uVar11;

      *(int *)((int)param_1 + 0xc) = iVar9;

      *(uint **)(param_1 + 2) = puVar8;

      *(int *)((int)param_1 + 0x24) = local_24;

      *(char *)(param_1 + 6) = cVar1;

      *(int *)((int)param_1 + 0x1c) = local_2c;

      return 0;

    }

  }

  else {

LAB_00651da3:

    uVar11 = uVar11 << CONCAT44(uVar14,(int)uVar15 - iVar9);

  }

LAB_00651ba7:

  iVar9 = iVar9 - uVar3;

  uVar10 = uVar11 >> CONCAT44((int)((ulonglong)uVar15 >> 0x20),(int)uVar15 - uVar3);

  uVar11 = uVar11 << (ulonglong)uVar3;

  sVar2 = 0;

  if ((int)uVar10 < *(int *)(&DAT_00908100 + uVar3 * 4)) {

    sVar2 = (short)*(undefined4 *)(&DAT_009080c0 + uVar3 * 4);

  }

  iVar5 = 1;

  uVar4 = (short)uVar10 + sVar2 + *param_4;

  *param_4 = uVar4;

  *param_5 = (uint)uVar4;

  do {

    uVar10 = uVar11 >> 0x38;

    do {

      while( true ) {

        if (7 < iVar9) {

          uVar12 = CONCAT44(iVar5,(uint)*(ushort *)(param_3 + 8 + (int)uVar10 * 4));

          uVar3 = (uint)*(ushort *)(param_3 + 10 + (int)uVar10 * 4);

          if (uVar3 != 0) {

            iVar9 = iVar9 - uVar3;

            uVar11 = uVar11 << (ulonglong)uVar3;

            goto LAB_00651c27;

          }

          goto LAB_00651f35;

        }

        uVar14 = (undefined4)((ulonglong)uVar15 >> 0x20);

        uVar11 = uVar11 >> CONCAT44(uVar14,(int)uVar15 - iVar9);

        if (cVar1 == '\0') break;

LAB_00651eda:

        uVar11 = uVar11 << CONCAT44(uVar14,(int)uVar15 - iVar9);

        uVar10 = uVar11 >> 0x38;

        if (iVar9 < 8) goto LAB_00651f35;

      }

      if (3 < local_24) {

        uVar3 = *puVar8;

        if (CONCAT13(-((char)uVar3 == -1),

                     CONCAT12(-((char)((uVar3 & 0xff00) >> 8) == -1),

                              CONCAT11(-((char)((uVar3 & 0xff0000) >> 0x10) == -1),

                                       -((char)(uVar3 >> 0x18) == -1)))) == 0) {

          puVar8 = puVar8 + 1;

          iVar9 = iVar9 + 0x20;

          uVar11 = uVar11 << 0x20 |

                   (ulonglong)

                   (uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18)

          ;

          local_24 = local_24 + -4;

          local_2c = local_2c + 4;

          goto LAB_00651eda;

        }

      }

      uVar16 = FUN_00651f88();

      iVar5 = (int)((ulonglong)uVar16 >> 0x20);

      uVar11 = extraout_MM1_03;

      if ((int)uVar16 == 0) goto LAB_00651f54;

      uVar10 = extraout_MM1_03 >> 0x38;

    } while (7 < iVar9);

LAB_00651f35:

    uVar12 = FUN_00652085();

    uVar11 = extraout_MM1_04;

    if ((int)uVar12 < 0) goto LAB_00651f54;

LAB_00651c27:

    iVar6 = (int)(uVar12 >> 0x20);

    uVar3 = (uint)uVar12;

    uVar7 = uVar3 & 0xf;

    uVar10 = (ulonglong)uVar7;

    iVar5 = (int)uVar15;

    uVar14 = (undefined4)((ulonglong)uVar15 >> 0x20);

    lVar13 = CONCAT44(uVar14,iVar5 - uVar7);

    if ((uVar12 & 0xf) == 0) {

      if ((int)uVar3 < 0xf0) break;

      iVar5 = iVar6 + 0x10;

    }

    else {

      iVar6 = iVar6 + (uVar3 >> 4);

      if (iVar9 < (int)uVar7) {

        uVar11 = uVar11 >> CONCAT44(uVar14,iVar5 - iVar9);

        if (cVar1 == '\0') {

          if (3 < local_24) {

            uVar3 = *puVar8;

            if (CONCAT13(-((char)uVar3 == -1),

                         CONCAT12(-((char)((uVar3 & 0xff00) >> 8) == -1),

                                  CONCAT11(-((char)((uVar3 & 0xff0000) >> 0x10) == -1),

                                           -((char)(uVar3 >> 0x18) == -1)))) == 0) {

              puVar8 = puVar8 + 1;

              iVar9 = iVar9 + 0x20;

              uVar11 = uVar11 << 0x20 |

                       (ulonglong)

                       (uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 |

                       uVar3 << 0x18);

              local_24 = local_24 + -4;

              local_2c = local_2c + 4;

              goto LAB_00651e5c;

            }

          }

          uVar16 = FUN_00651f88();

          iVar6 = (int)((ulonglong)uVar16 >> 0x20);

          uVar11 = extraout_MM1_02;

          if ((int)uVar16 == 0) goto LAB_00651f54;

        }

        else {

LAB_00651e5c:

          uVar11 = uVar11 << CONCAT44(uVar14,iVar5 - iVar9);

        }

      }

      uVar12 = uVar11 >> lVar13;

      iVar9 = iVar9 - uVar7;

      uVar11 = uVar11 << uVar10;

      sVar2 = 0;

      if ((int)uVar12 < *(int *)(&DAT_00908100 + uVar7 * 4)) {

        sVar2 = (short)*(undefined4 *)(&DAT_009080c0 + uVar7 * 4);

      }

      iVar5 = iVar6 + 1;

      *(short *)((int)param_5 + (&DAT_00907ee0)[iVar6] * 2) = (short)uVar12 + sVar2;

    }

  } while (iVar5 < 0x40);

  *param_1 = uVar11;

  *(int *)((int)param_1 + 0xc) = iVar9;

  *(uint **)(param_1 + 2) = puVar8;

  *(char *)(param_1 + 6) = cVar1;

  *(int *)((int)param_1 + 0x24) = local_24;

  *(int *)((int)param_1 + 0x1c) = local_2c;

  return 0;

}





// --- FUN_00651f88 at 0x00651F88 (size: 253) ---


undefined4 __fastcall FUN_00651f88(undefined4 param_1,undefined4 param_2)



{

  uint in_EAX;

  int iVar1;

  int iVar2;

  undefined4 unaff_EBX;

  int unaff_EBP;

  byte *unaff_ESI;

  int unaff_EDI;

  

  iVar2 = *(int *)(unaff_EBP + -0x20);

  do {

    for (; iVar2 < 1; iVar2 = *(int *)(iVar2 + 0x24)) {

      iVar2 = *(int *)(unaff_EBP + 8);

      if ((*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) ||

         (iVar1 = FUN_006515a0(iVar2,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                               param_2,iVar2,in_EAX), iVar1 != 0)) {

        return 0;

      }

      unaff_ESI = *(byte **)(iVar2 + 0x10);

    }

    *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

    in_EAX = (uint)*unaff_ESI;

    unaff_ESI = unaff_ESI + 1;

    iVar1 = iVar2 + -1;

    iVar2 = iVar2 + -1;

    if (in_EAX == 0xff) {

      do {

        while (iVar2 = iVar1 + -1, iVar1 < 1) {

          iVar2 = *(int *)(unaff_EBP + 8);

          if (*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) {

            return 0;

          }

          iVar1 = FUN_006515a0(iVar2,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                               param_2,iVar2,in_EAX);

          if (iVar1 != 0) {

            return 0;

          }

          unaff_ESI = *(byte **)(iVar2 + 0x10);

          iVar1 = *(int *)(iVar2 + 0x24);

        }

        *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

        in_EAX = (uint)*unaff_ESI;

        unaff_ESI = unaff_ESI + 1;

        iVar1 = iVar2;

      } while (in_EAX == 0xff);

      if (in_EAX != 0) {

        *(uint *)(unaff_EBP + -0x24) = in_EAX;

        goto LAB_00651fc5;

      }

      in_EAX = 0xff;

    }

    unaff_EDI = unaff_EDI + 8;

    if (0x38 < unaff_EDI) {

LAB_00651fc5:

      *(int *)(unaff_EBP + -0x20) = iVar2;

      return 0xff;

    }

  } while( true );

}





// --- FUN_00652085 at 0x00652085 (size: 416) ---


longlong __fastcall FUN_00652085(undefined4 param_1,uint param_2)



{

  int iVar1;

  uint uVar2;

  uint unaff_EBX;

  uint uVar3;

  int unaff_EBP;

  uint *unaff_ESI;

  int unaff_EDI;

  int iVar4;

  ulonglong in_MM1;

  ulonglong extraout_MM1;

  ulonglong uVar5;

  ulonglong extraout_MM1_00;

  undefined8 in_MM4;

  undefined4 uVar6;

  

  *(uint *)(unaff_EBP + -0x10) = unaff_EBX;

  if ((int)unaff_EBX <= unaff_EDI) goto LAB_00652091;

  uVar6 = (undefined4)((ulonglong)in_MM4 >> 0x20);

  uVar5 = in_MM1 >> CONCAT44(uVar6,(int)in_MM4 - unaff_EDI);

  if (*(int *)(unaff_EBP + -0x24) == 0) {

    if (3 < *(int *)(unaff_EBP + -0x20)) {

      uVar2 = *unaff_ESI;

      if (CONCAT13(-((char)uVar2 == -1),

                   CONCAT12(-((char)((uVar2 & 0xff00) >> 8) == -1),

                            CONCAT11(-((char)((uVar2 & 0xff0000) >> 0x10) == -1),

                                     -((char)(uVar2 >> 0x18) == -1)))) == 0) {

        unaff_ESI = unaff_ESI + 1;

        unaff_EDI = unaff_EDI + 0x20;

        uVar5 = uVar5 << 0x20 |

                (ulonglong)

                (uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18);

        *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 4;

        *(int *)(unaff_EBP + -0x20) = *(int *)(unaff_EBP + -0x20) + -4;

        goto LAB_0065214a;

      }

    }

    iVar4 = FUN_00651f88();

    if (iVar4 == 0) {

LAB_0065221e:

      return CONCAT44(param_2,1);

    }

    unaff_EBX = *(uint *)(unaff_EBP + -0x10);

    in_MM1 = extraout_MM1;

  }

  else {

LAB_0065214a:

    in_MM1 = uVar5 << CONCAT44(uVar6,(int)in_MM4 - unaff_EDI);

    unaff_EBX = *(uint *)(unaff_EBP + -0x10);

  }

LAB_00652091:

  iVar4 = unaff_EDI - unaff_EBX;

  uVar2 = (uint)(in_MM1 >> CONCAT44((int)((ulonglong)in_MM4 >> 0x20),(int)in_MM4 - unaff_EBX));

  uVar5 = in_MM1 << (ulonglong)unaff_EBX;

  do {

    iVar1 = *(int *)(unaff_EBP + -0x10);

    uVar3 = (uint)*(short *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    if (uVar3 != 0xffffffff) {

      uVar3 = (uint)*(ushort *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    }

    if ((int)uVar2 <= (int)uVar3) {

      if (iVar1 < 0x11) {

        iVar4 = *(int *)(unaff_EBP + -0x14);

        return CONCAT44(param_2,(int)*(short *)(iVar4 + 0x408 +

                                               CONCAT22((short)(uVar2 >> 0x10),

                                                        ((short)uVar2 -

                                                        *(short *)(iVar4 + 0x608 +

                                                                  *(int *)(unaff_EBP + -0x10) * 2))

                                                        + *(short *)(iVar4 + 0x64e +

                                                                    *(int *)(unaff_EBP + -0x10) * 2)

                                                       ) * 2));

      }

      return (ulonglong)param_2 << 0x20;

    }

    if (iVar4 < 1) {

      uVar6 = (undefined4)((ulonglong)in_MM4 >> 0x20);

      uVar5 = uVar5 >> CONCAT44(uVar6,(int)in_MM4 - iVar4);

      if (*(int *)(unaff_EBP + -0x24) == 0) {

        if (3 < *(int *)(unaff_EBP + -0x20)) {

          uVar3 = *unaff_ESI;

          if (CONCAT13(-((char)uVar3 == -1),

                       CONCAT12(-((char)((uVar3 & 0xff00) >> 8) == -1),

                                CONCAT11(-((char)((uVar3 & 0xff0000) >> 0x10) == -1),

                                         -((char)(uVar3 >> 0x18) == -1)))) == 0) {

            unaff_ESI = unaff_ESI + 1;

            iVar4 = iVar4 + 0x20;

            uVar5 = uVar5 << 0x20 |

                    (ulonglong)

                    (uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18

                    );

            *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 4;

            *(int *)(unaff_EBP + -0x20) = *(int *)(unaff_EBP + -0x20) + -4;

            goto LAB_006521ca;

          }

        }

        iVar1 = FUN_00651f88();

        uVar5 = extraout_MM1_00;

        if (iVar1 == 0) goto LAB_0065221e;

      }

      else {

LAB_006521ca:

        uVar5 = uVar5 << CONCAT44(uVar6,(int)in_MM4 - iVar4);

      }

    }

    iVar4 = iVar4 + -1;

    *(int *)(unaff_EBP + -0x10) = *(int *)(unaff_EBP + -0x10) + 1;

    uVar2 = uVar2 << 1 | (uint)(uVar5 >> 0x3f);

    uVar5 = uVar5 << 1;

  } while( true );

}





// --- FUN_00652240 at 0x00652240 (size: 782) ---


undefined4 FUN_00652240(ulonglong *param_1,int param_2,int param_3,short *param_4,short *param_5)



{

  undefined4 uVar1;

  undefined4 uVar2;

  ulonglong uVar3;

  ulonglong uVar4;

  uint uVar5;

  short sVar6;

  int iVar7;

  int iVar8;

  uint uVar9;

  int iVar10;

  int iVar11;

  ulonglong uVar12;

  ulonglong extraout_MM1;

  ulonglong extraout_MM1_00;

  ulonglong extraout_MM1_01;

  ulonglong extraout_MM1_02;

  ulonglong extraout_MM1_03;

  ulonglong extraout_MM1_04;

  ulonglong uVar13;

  longlong lVar14;

  undefined8 uVar15;

  undefined8 uVar16;

  ulonglong uVar17;

  

  uVar1 = *(undefined4 *)((int)param_1 + 0x1c);

  uVar2 = *(undefined4 *)((int)param_1 + 0x24);

  uVar3 = param_1[6];

  uVar12 = *param_1;

  iVar11 = *(int *)((int)param_1 + 0xc);

  uVar4 = param_1[2];

  uVar15 = 0x40;

  param_5[0] = 0;

  param_5[1] = 0;

  param_5[2] = 0;

  param_5[3] = 0;

  param_5[4] = 0;

  param_5[5] = 0;

  param_5[6] = 0;

  param_5[7] = 0;

  param_5[8] = 0;

  param_5[9] = 0;

  param_5[10] = 0;

  param_5[0xb] = 0;

  param_5[0xc] = 0;

  param_5[0xd] = 0;

  param_5[0xe] = 0;

  param_5[0xf] = 0;

  param_5[0x10] = 0;

  param_5[0x11] = 0;

  param_5[0x12] = 0;

  param_5[0x13] = 0;

  param_5[0x14] = 0;

  param_5[0x15] = 0;

  param_5[0x16] = 0;

  param_5[0x17] = 0;

  param_5[0x18] = 0;

  param_5[0x19] = 0;

  param_5[0x1a] = 0;

  param_5[0x1b] = 0;

  param_5[0x1c] = 0;

  param_5[0x1d] = 0;

  param_5[0x1e] = 0;

  param_5[0x1f] = 0;

  param_5[0x20] = 0;

  param_5[0x21] = 0;

  param_5[0x22] = 0;

  param_5[0x23] = 0;

  param_5[0x24] = 0;

  param_5[0x25] = 0;

  param_5[0x26] = 0;

  param_5[0x27] = 0;

  param_5[0x28] = 0;

  param_5[0x29] = 0;

  param_5[0x2a] = 0;

  param_5[0x2b] = 0;

  param_5[0x2c] = 0;

  param_5[0x2d] = 0;

  param_5[0x2e] = 0;

  param_5[0x2f] = 0;

  param_5[0x30] = 0;

  param_5[0x31] = 0;

  param_5[0x32] = 0;

  param_5[0x33] = 0;

  param_5[0x34] = 0;

  param_5[0x35] = 0;

  param_5[0x36] = 0;

  param_5[0x37] = 0;

  param_5[0x38] = 0;

  param_5[0x39] = 0;

  param_5[0x3a] = 0;

  param_5[0x3b] = 0;

  param_5[0x3c] = 0;

  param_5[0x3d] = 0;

  param_5[0x3e] = 0;

  param_5[0x3f] = 0;

  if (iVar11 < 8) {

    iVar7 = FUN_0065254e();

    uVar12 = extraout_MM1;

    if (iVar7 == 0) goto LAB_0065251a;

    if (7 < iVar11) goto LAB_006522ec;

LAB_0065247c:

    uVar5 = FUN_00652656();

    uVar12 = extraout_MM1_01;

    if ((int)uVar5 < 0) goto LAB_0065251a;

  }

  else {

LAB_006522ec:

    uVar5 = *(uint *)(param_2 + 8 + (uint)(byte)(uVar12 >> 0x38) * 4);

    if ((int)uVar5 < 0x10000) goto LAB_0065247c;

    iVar11 = iVar11 - (uVar5 >> 0x10);

    uVar12 = uVar12 << (ulonglong)(uVar5 >> 0x10);

    uVar5 = uVar5 & 0xffff;

  }

  if (((int)uVar5 <= iVar11) || (iVar7 = FUN_0065254e(), uVar12 = extraout_MM1_00, iVar7 != 0)) {

    iVar11 = iVar11 - uVar5;

    iVar7 = (int)(uVar12 >> CONCAT44((int)((ulonglong)uVar15 >> 0x20),(int)uVar15 - uVar5));

    uVar12 = uVar12 << (ulonglong)uVar5;

    if (iVar7 < *(int *)(&DAT_00908100 + uVar5 * 4)) {

      iVar7 = iVar7 + *(int *)(&DAT_009080c0 + uVar5 * 4);

    }

    iVar8 = 1;

    sVar6 = (short)iVar7 + *param_4;

    *param_4 = sVar6;

    *param_5 = sVar6;

LAB_00652373:

    do {

      if (iVar11 < 8) {

        uVar16 = FUN_0065254e();

        iVar8 = (int)((ulonglong)uVar16 >> 0x20);

        uVar12 = extraout_MM1_03;

        if ((int)uVar16 == 0) break;

        if (7 < iVar11) goto LAB_00652373;

LAB_006524fb:

        uVar17 = FUN_00652656();

        uVar12 = extraout_MM1_04;

        if ((int)uVar17 < 0) break;

      }

      else {

        uVar5 = *(uint *)(param_3 + 8 + (uint)(byte)(uVar12 >> 0x38) * 4);

        uVar9 = uVar5 >> 0x10;

        uVar17 = CONCAT44(iVar8,uVar5) & 0xffffffff0000ffff;

        if (uVar9 == 0) goto LAB_006524fb;

        iVar11 = iVar11 - uVar9;

        uVar12 = uVar12 << (ulonglong)uVar9;

      }

      iVar7 = (int)(uVar17 >> 0x20);

      uVar5 = (uint)uVar17;

      uVar9 = uVar5 & 0xf;

      uVar13 = (ulonglong)uVar9;

      lVar14 = CONCAT44((int)((ulonglong)uVar15 >> 0x20),(int)uVar15 - uVar9);

      if ((uVar17 & 0xf) == 0) {

        if ((int)uVar5 < 0xf0) goto LAB_0065240d;

        iVar8 = iVar7 + 0x10;

      }

      else {

        iVar7 = iVar7 + (uVar5 >> 4);

        if (iVar11 < (int)uVar9) {

          uVar16 = FUN_0065254e();

          iVar7 = (int)((ulonglong)uVar16 >> 0x20);

          uVar12 = extraout_MM1_02;

          if ((int)uVar16 == 0) break;

        }

        iVar11 = iVar11 - uVar9;

        iVar10 = (int)(uVar12 >> lVar14);

        uVar12 = uVar12 << uVar13;

        if (iVar10 < *(int *)(&DAT_00908100 + uVar9 * 4)) {

          iVar10 = iVar10 + *(int *)(&DAT_009080c0 + uVar9 * 4);

        }

        iVar8 = iVar7 + 1;

        param_5[(&DAT_00907ee0)[iVar7]] = (short)iVar10;

      }

      if (0x3f < iVar8) {

LAB_0065240d:

        *param_1 = uVar12;

        *(int *)((int)param_1 + 0xc) = iVar11;

        *(int *)(param_1 + 2) = (int)uVar4;

        *(undefined4 *)((int)param_1 + 0x24) = uVar2;

        *(char *)(param_1 + 6) = (char)uVar3;

        *(undefined4 *)((int)param_1 + 0x1c) = uVar1;

        return 0;

      }

    } while( true );

  }

LAB_0065251a:

  *param_1 = uVar12;

  *(int *)((int)param_1 + 0xc) = iVar11;

  *(int *)(param_1 + 2) = (int)uVar4;

  *(undefined4 *)((int)param_1 + 0x24) = uVar2;

  *(char *)(param_1 + 6) = (char)uVar3;

  *(undefined4 *)((int)param_1 + 0x1c) = uVar1;

  return 0;

}





// --- FUN_0065254e at 0x0065254E (size: 264) ---


undefined4 __fastcall FUN_0065254e(undefined4 param_1,undefined4 param_2)



{

  byte bVar1;

  uint in_EAX;

  int iVar2;

  int iVar3;

  undefined4 unaff_EBX;

  int unaff_EBP;

  byte *unaff_ESI;

  int unaff_EDI;

  

  iVar3 = *(int *)(unaff_EBP + -0x24);

  if (*(char *)(unaff_EBP + -0x20) == '\0') {

    do {

      for (; iVar3 < 1; iVar3 = *(int *)(iVar3 + 0x24)) {

        iVar3 = *(int *)(unaff_EBP + 8);

        if ((*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) ||

           (iVar2 = FUN_006515a0(iVar3,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                                 param_2,iVar3,in_EAX), iVar2 != 0)) {

          return 0;

        }

        unaff_ESI = *(byte **)(iVar3 + 0x10);

      }

      *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

      in_EAX = (uint)*unaff_ESI;

      unaff_ESI = unaff_ESI + 1;

      iVar2 = iVar3 + -1;

      iVar3 = iVar3 + -1;

      if (in_EAX == 0xff) {

        do {

          while (iVar3 = iVar2 + -1, iVar2 < 1) {

            iVar3 = *(int *)(unaff_EBP + 8);

            if (*(int *)(*(int *)(unaff_EBP + 8) + 0x3c) == 0) {

              return 0;

            }

            iVar2 = FUN_006515a0(iVar3,unaff_EDI,unaff_ESI,unaff_EBP,&stack0x00000000,unaff_EBX,

                                 param_2,iVar3,in_EAX);

            if (iVar2 != 0) {

              return 0;

            }

            unaff_ESI = *(byte **)(iVar3 + 0x10);

            iVar2 = *(int *)(iVar3 + 0x24);

          }

          *(int *)(unaff_EBP + -0x28) = *(int *)(unaff_EBP + -0x28) + 1;

          bVar1 = *unaff_ESI;

          in_EAX = (uint)bVar1;

          unaff_ESI = unaff_ESI + 1;

          iVar2 = iVar3;

        } while (in_EAX == 0xff);

        if (in_EAX != 0) {

          *(byte *)(unaff_EBP + -0x20) = bVar1;

          break;

        }

        in_EAX = 0xff;

      }

      unaff_EDI = unaff_EDI + 8;

    } while (unaff_EDI < 0x39);

  }

  *(int *)(unaff_EBP + -0x24) = iVar3;

  return 0xff;

}





// --- FUN_00652656 at 0x00652656 (size: 213) ---


longlong __fastcall FUN_00652656(undefined4 param_1,uint param_2)



{

  int iVar1;

  uint uVar2;

  uint unaff_EBX;

  uint uVar3;

  int unaff_EBP;

  int unaff_EDI;

  int iVar4;

  ulonglong in_MM1;

  longlong lVar5;

  ulonglong extraout_MM1;

  longlong extraout_MM1_00;

  undefined8 in_MM4;

  

  *(uint *)(unaff_EBP + -0x10) = unaff_EBX;

  if (unaff_EDI < (int)unaff_EBX) {

    iVar4 = FUN_0065254e();

    if (iVar4 == 0) goto LAB_00652724;

    unaff_EBX = *(uint *)(unaff_EBP + -0x10);

    in_MM1 = extraout_MM1;

  }

  iVar4 = unaff_EDI - unaff_EBX;

  uVar2 = (uint)(in_MM1 >> CONCAT44((int)((ulonglong)in_MM4 >> 0x20),(int)in_MM4 - unaff_EBX));

  lVar5 = in_MM1 << (ulonglong)unaff_EBX;

  while( true ) {

    iVar1 = *(int *)(unaff_EBP + -0x10);

    uVar3 = (uint)*(short *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    if (uVar3 != 0xffffffff) {

      uVar3 = (uint)*(ushort *)(*(int *)(unaff_EBP + -0x14) + 0x62a + iVar1 * 2);

    }

    if ((int)uVar2 <= (int)uVar3) {

      if (iVar1 < 0x11) {

        iVar4 = *(int *)(unaff_EBP + -0x14);

        return CONCAT44(param_2,(int)*(short *)(iVar4 + 0x408 +

                                               CONCAT22((short)(uVar2 >> 0x10),

                                                        ((short)uVar2 -

                                                        *(short *)(iVar4 + 0x608 +

                                                                  *(int *)(unaff_EBP + -0x10) * 2))

                                                        + *(short *)(iVar4 + 0x64e +

                                                                    *(int *)(unaff_EBP + -0x10) * 2)

                                                       ) * 2));

      }

      return (ulonglong)param_2 << 0x20;

    }

    if ((iVar4 < 1) && (iVar1 = FUN_0065254e(), lVar5 = extraout_MM1_00, iVar1 == 0)) break;

    iVar4 = iVar4 + -1;

    *(int *)(unaff_EBP + -0x10) = *(int *)(unaff_EBP + -0x10) + 1;

    uVar2 = uVar2 << 1 | (uint)((ulonglong)lVar5 >> 0x3f);

    lVar5 = lVar5 << 1;

  }

LAB_00652724:

  return CONCAT44(param_2,1);

}





// --- FUN_00652740 at 0x00652740 (size: 252) ---


void FUN_00652740(undefined8 *param_1,undefined8 *param_2)



{

  undefined8 uVar1;

  undefined8 uVar2;

  undefined8 uVar3;

  undefined8 uVar4;

  

  uVar1 = *param_1;

  uVar2 = *param_2;

  uVar3 = param_1[1];

  uVar4 = param_2[1];

  *param_1 = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                      CONCAT24((short)((ulonglong)uVar1 >> 0x20) * (short)((ulonglong)uVar2 >> 0x20)

                               ,CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                         (short)((ulonglong)uVar2 >> 0x10),

                                         (short)uVar1 * (short)uVar2)));

  param_1[1] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                 (short)((ulonglong)uVar4 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                          (short)((ulonglong)uVar4 >> 0x10),

                                          (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[2];

  uVar2 = param_2[2];

  uVar3 = param_1[3];

  uVar4 = param_2[3];

  param_1[2] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                 (short)((ulonglong)uVar2 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                          (short)((ulonglong)uVar2 >> 0x10),

                                          (short)uVar1 * (short)uVar2)));

  param_1[3] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                 (short)((ulonglong)uVar4 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                          (short)((ulonglong)uVar4 >> 0x10),

                                          (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[4];

  uVar2 = param_2[4];

  uVar3 = param_1[5];

  uVar4 = param_2[5];

  param_1[4] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                 (short)((ulonglong)uVar2 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                          (short)((ulonglong)uVar2 >> 0x10),

                                          (short)uVar1 * (short)uVar2)));

  param_1[5] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                 (short)((ulonglong)uVar4 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                          (short)((ulonglong)uVar4 >> 0x10),

                                          (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[6];

  uVar2 = param_2[6];

  uVar3 = param_1[7];

  uVar4 = param_2[7];

  param_1[6] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                 (short)((ulonglong)uVar2 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                          (short)((ulonglong)uVar2 >> 0x10),

                                          (short)uVar1 * (short)uVar2)));

  param_1[7] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                 (short)((ulonglong)uVar4 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                          (short)((ulonglong)uVar4 >> 0x10),

                                          (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[8];

  uVar2 = param_2[8];

  uVar3 = param_1[9];

  uVar4 = param_2[9];

  param_1[8] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                 (short)((ulonglong)uVar2 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                          (short)((ulonglong)uVar2 >> 0x10),

                                          (short)uVar1 * (short)uVar2)));

  param_1[9] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                        CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                 (short)((ulonglong)uVar4 >> 0x20),

                                 CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                          (short)((ulonglong)uVar4 >> 0x10),

                                          (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[10];

  uVar2 = param_2[10];

  uVar3 = param_1[0xb];

  uVar4 = param_2[0xb];

  param_1[10] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                         CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                  (short)((ulonglong)uVar2 >> 0x20),

                                  CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                           (short)((ulonglong)uVar2 >> 0x10),

                                           (short)uVar1 * (short)uVar2)));

  param_1[0xb] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                          CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                   (short)((ulonglong)uVar4 >> 0x20),

                                   CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                            (short)((ulonglong)uVar4 >> 0x10),

                                            (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[0xc];

  uVar2 = param_2[0xc];

  uVar3 = param_1[0xd];

  uVar4 = param_2[0xd];

  param_1[0xc] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                          CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                   (short)((ulonglong)uVar2 >> 0x20),

                                   CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                            (short)((ulonglong)uVar2 >> 0x10),

                                            (short)uVar1 * (short)uVar2)));

  param_1[0xd] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                          CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                   (short)((ulonglong)uVar4 >> 0x20),

                                   CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                            (short)((ulonglong)uVar4 >> 0x10),

                                            (short)uVar3 * (short)uVar4)));

  uVar1 = param_1[0xe];

  uVar2 = param_2[0xe];

  uVar3 = param_1[0xf];

  uVar4 = param_2[0xf];

  param_1[0xe] = CONCAT26((short)((ulonglong)uVar1 >> 0x30) * (short)((ulonglong)uVar2 >> 0x30),

                          CONCAT24((short)((ulonglong)uVar1 >> 0x20) *

                                   (short)((ulonglong)uVar2 >> 0x20),

                                   CONCAT22((short)((ulonglong)uVar1 >> 0x10) *

                                            (short)((ulonglong)uVar2 >> 0x10),

                                            (short)uVar1 * (short)uVar2)));

  param_1[0xf] = CONCAT26((short)((ulonglong)uVar3 >> 0x30) * (short)((ulonglong)uVar4 >> 0x30),

                          CONCAT24((short)((ulonglong)uVar3 >> 0x20) *

                                   (short)((ulonglong)uVar4 >> 0x20),

                                   CONCAT22((short)((ulonglong)uVar3 >> 0x10) *

                                            (short)((ulonglong)uVar4 >> 0x10),

                                            (short)uVar3 * (short)uVar4)));

  return;

}





// --- FUN_00652840 at 0x00652840 (size: 662) ---


void FUN_00652840(short *param_1,short *param_2)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  short sVar12;

  short sVar13;

  short sVar14;

  short sVar15;

  

  if (((uint)param_1 & 0xf) == 0) {

    if (((uint)param_2 & 0xf) == 0) {

      sVar1 = param_2[1];

      sVar2 = param_2[2];

      sVar3 = param_2[3];

      sVar4 = param_2[4];

      sVar5 = param_2[5];

      sVar6 = param_2[6];

      sVar7 = param_2[7];

      sVar8 = param_2[8];

      sVar9 = param_2[9];

      sVar10 = param_2[10];

      sVar11 = param_2[0xb];

      sVar12 = param_2[0xc];

      sVar13 = param_2[0xd];

      sVar14 = param_2[0xe];

      sVar15 = param_2[0xf];

      *param_1 = *param_1 * *param_2;

      param_1[1] = param_1[1] * sVar1;

      param_1[2] = param_1[2] * sVar2;

      param_1[3] = param_1[3] * sVar3;

      param_1[4] = param_1[4] * sVar4;

      param_1[5] = param_1[5] * sVar5;

      param_1[6] = param_1[6] * sVar6;

      param_1[7] = param_1[7] * sVar7;

      param_1[8] = param_1[8] * sVar8;

      param_1[9] = param_1[9] * sVar9;

      param_1[10] = param_1[10] * sVar10;

      param_1[0xb] = param_1[0xb] * sVar11;

      param_1[0xc] = param_1[0xc] * sVar12;

      param_1[0xd] = param_1[0xd] * sVar13;

      param_1[0xe] = param_1[0xe] * sVar14;

      param_1[0xf] = param_1[0xf] * sVar15;

      sVar1 = param_2[0x11];

      sVar2 = param_2[0x12];

      sVar3 = param_2[0x13];

      sVar4 = param_2[0x14];

      sVar5 = param_2[0x15];

      sVar6 = param_2[0x16];

      sVar7 = param_2[0x17];

      sVar8 = param_2[0x18];

      sVar9 = param_2[0x19];

      sVar10 = param_2[0x1a];

      sVar11 = param_2[0x1b];

      sVar12 = param_2[0x1c];

      sVar13 = param_2[0x1d];

      sVar14 = param_2[0x1e];

      sVar15 = param_2[0x1f];

      param_1[0x10] = param_1[0x10] * param_2[0x10];

      param_1[0x11] = param_1[0x11] * sVar1;

      param_1[0x12] = param_1[0x12] * sVar2;

      param_1[0x13] = param_1[0x13] * sVar3;

      param_1[0x14] = param_1[0x14] * sVar4;

      param_1[0x15] = param_1[0x15] * sVar5;

      param_1[0x16] = param_1[0x16] * sVar6;

      param_1[0x17] = param_1[0x17] * sVar7;

      param_1[0x18] = param_1[0x18] * sVar8;

      param_1[0x19] = param_1[0x19] * sVar9;

      param_1[0x1a] = param_1[0x1a] * sVar10;

      param_1[0x1b] = param_1[0x1b] * sVar11;

      param_1[0x1c] = param_1[0x1c] * sVar12;

      param_1[0x1d] = param_1[0x1d] * sVar13;

      param_1[0x1e] = param_1[0x1e] * sVar14;

      param_1[0x1f] = param_1[0x1f] * sVar15;

      sVar1 = param_2[0x21];

      sVar2 = param_2[0x22];

      sVar3 = param_2[0x23];

      sVar4 = param_2[0x24];

      sVar5 = param_2[0x25];

      sVar6 = param_2[0x26];

      sVar7 = param_2[0x27];

      sVar8 = param_2[0x28];

      sVar9 = param_2[0x29];

      sVar10 = param_2[0x2a];

      sVar11 = param_2[0x2b];

      sVar12 = param_2[0x2c];

      sVar13 = param_2[0x2d];

      sVar14 = param_2[0x2e];

      sVar15 = param_2[0x2f];

      param_1[0x20] = param_1[0x20] * param_2[0x20];

      param_1[0x21] = param_1[0x21] * sVar1;

      param_1[0x22] = param_1[0x22] * sVar2;

      param_1[0x23] = param_1[0x23] * sVar3;

      param_1[0x24] = param_1[0x24] * sVar4;

      param_1[0x25] = param_1[0x25] * sVar5;

      param_1[0x26] = param_1[0x26] * sVar6;

      param_1[0x27] = param_1[0x27] * sVar7;

      param_1[0x28] = param_1[0x28] * sVar8;

      param_1[0x29] = param_1[0x29] * sVar9;

      param_1[0x2a] = param_1[0x2a] * sVar10;

      param_1[0x2b] = param_1[0x2b] * sVar11;

      param_1[0x2c] = param_1[0x2c] * sVar12;

      param_1[0x2d] = param_1[0x2d] * sVar13;

      param_1[0x2e] = param_1[0x2e] * sVar14;

      param_1[0x2f] = param_1[0x2f] * sVar15;

      sVar1 = param_2[0x31];

      sVar2 = param_2[0x32];

      sVar3 = param_2[0x33];

      sVar4 = param_2[0x34];

      sVar5 = param_2[0x35];

      sVar6 = param_2[0x36];

      sVar7 = param_2[0x37];

      sVar8 = param_2[0x38];

      sVar9 = param_2[0x39];

      sVar10 = param_2[0x3a];

      sVar11 = param_2[0x3b];

      sVar12 = param_2[0x3c];

      sVar13 = param_2[0x3d];

      sVar14 = param_2[0x3e];

      sVar15 = param_2[0x3f];

      param_1[0x30] = param_1[0x30] * param_2[0x30];

      param_1[0x31] = param_1[0x31] * sVar1;

      param_1[0x32] = param_1[0x32] * sVar2;

      param_1[0x33] = param_1[0x33] * sVar3;

      param_1[0x34] = param_1[0x34] * sVar4;

      param_1[0x35] = param_1[0x35] * sVar5;

      param_1[0x36] = param_1[0x36] * sVar6;

      param_1[0x37] = param_1[0x37] * sVar7;

      param_1[0x38] = param_1[0x38] * sVar8;

      param_1[0x39] = param_1[0x39] * sVar9;

      param_1[0x3a] = param_1[0x3a] * sVar10;

      param_1[0x3b] = param_1[0x3b] * sVar11;

      param_1[0x3c] = param_1[0x3c] * sVar12;

      param_1[0x3d] = param_1[0x3d] * sVar13;

      param_1[0x3e] = param_1[0x3e] * sVar14;

      param_1[0x3f] = param_1[0x3f] * sVar15;

    }

    else {

      sVar1 = param_2[1];

      sVar2 = param_2[2];

      sVar3 = param_2[3];

      sVar4 = param_2[4];

      sVar5 = param_2[5];

      sVar6 = param_2[6];

      sVar7 = param_2[7];

      sVar8 = param_2[8];

      sVar9 = param_2[9];

      sVar10 = param_2[10];

      sVar11 = param_2[0xb];

      sVar12 = param_2[0xc];

      sVar13 = param_2[0xd];

      sVar14 = param_2[0xe];

      sVar15 = param_2[0xf];

      *param_1 = *param_1 * *param_2;

      param_1[1] = param_1[1] * sVar1;

      param_1[2] = param_1[2] * sVar2;

      param_1[3] = param_1[3] * sVar3;

      param_1[4] = param_1[4] * sVar4;

      param_1[5] = param_1[5] * sVar5;

      param_1[6] = param_1[6] * sVar6;

      param_1[7] = param_1[7] * sVar7;

      param_1[8] = param_1[8] * sVar8;

      param_1[9] = param_1[9] * sVar9;

      param_1[10] = param_1[10] * sVar10;

      param_1[0xb] = param_1[0xb] * sVar11;

      param_1[0xc] = param_1[0xc] * sVar12;

      param_1[0xd] = param_1[0xd] * sVar13;

      param_1[0xe] = param_1[0xe] * sVar14;

      param_1[0xf] = param_1[0xf] * sVar15;

      sVar1 = param_2[0x11];

      sVar2 = param_2[0x12];

      sVar3 = param_2[0x13];

      sVar4 = param_2[0x14];

      sVar5 = param_2[0x15];

      sVar6 = param_2[0x16];

      sVar7 = param_2[0x17];

      sVar8 = param_2[0x18];

      sVar9 = param_2[0x19];

      sVar10 = param_2[0x1a];

      sVar11 = param_2[0x1b];

      sVar12 = param_2[0x1c];

      sVar13 = param_2[0x1d];

      sVar14 = param_2[0x1e];

      sVar15 = param_2[0x1f];

      param_1[0x10] = param_1[0x10] * param_2[0x10];

      param_1[0x11] = param_1[0x11] * sVar1;

      param_1[0x12] = param_1[0x12] * sVar2;

      param_1[0x13] = param_1[0x13] * sVar3;

      param_1[0x14] = param_1[0x14] * sVar4;

      param_1[0x15] = param_1[0x15] * sVar5;

      param_1[0x16] = param_1[0x16] * sVar6;

      param_1[0x17] = param_1[0x17] * sVar7;

      param_1[0x18] = param_1[0x18] * sVar8;

      param_1[0x19] = param_1[0x19] * sVar9;

      param_1[0x1a] = param_1[0x1a] * sVar10;

      param_1[0x1b] = param_1[0x1b] * sVar11;

      param_1[0x1c] = param_1[0x1c] * sVar12;

      param_1[0x1d] = param_1[0x1d] * sVar13;

      param_1[0x1e] = param_1[0x1e] * sVar14;

      param_1[0x1f] = param_1[0x1f] * sVar15;

      sVar1 = param_2[0x21];

      sVar2 = param_2[0x22];

      sVar3 = param_2[0x23];

      sVar4 = param_2[0x24];

      sVar5 = param_2[0x25];

      sVar6 = param_2[0x26];

      sVar7 = param_2[0x27];

      sVar8 = param_2[0x28];

      sVar9 = param_2[0x29];

      sVar10 = param_2[0x2a];

      sVar11 = param_2[0x2b];

      sVar12 = param_2[0x2c];

      sVar13 = param_2[0x2d];

      sVar14 = param_2[0x2e];

      sVar15 = param_2[0x2f];

      param_1[0x20] = param_1[0x20] * param_2[0x20];

      param_1[0x21] = param_1[0x21] * sVar1;

      param_1[0x22] = param_1[0x22] * sVar2;

      param_1[0x23] = param_1[0x23] * sVar3;

      param_1[0x24] = param_1[0x24] * sVar4;

      param_1[0x25] = param_1[0x25] * sVar5;

      param_1[0x26] = param_1[0x26] * sVar6;

      param_1[0x27] = param_1[0x27] * sVar7;

      param_1[0x28] = param_1[0x28] * sVar8;

      param_1[0x29] = param_1[0x29] * sVar9;

      param_1[0x2a] = param_1[0x2a] * sVar10;

      param_1[0x2b] = param_1[0x2b] * sVar11;

      param_1[0x2c] = param_1[0x2c] * sVar12;

      param_1[0x2d] = param_1[0x2d] * sVar13;

      param_1[0x2e] = param_1[0x2e] * sVar14;

      param_1[0x2f] = param_1[0x2f] * sVar15;

      sVar1 = param_2[0x31];

      sVar2 = param_2[0x32];

      sVar3 = param_2[0x33];

      sVar4 = param_2[0x34];

      sVar5 = param_2[0x35];

      sVar6 = param_2[0x36];

      sVar7 = param_2[0x37];

      sVar8 = param_2[0x38];

      sVar9 = param_2[0x39];

      sVar10 = param_2[0x3a];

      sVar11 = param_2[0x3b];

      sVar12 = param_2[0x3c];

      sVar13 = param_2[0x3d];

      sVar14 = param_2[0x3e];

      sVar15 = param_2[0x3f];

      param_1[0x30] = param_1[0x30] * param_2[0x30];

      param_1[0x31] = param_1[0x31] * sVar1;

      param_1[0x32] = param_1[0x32] * sVar2;

      param_1[0x33] = param_1[0x33] * sVar3;

      param_1[0x34] = param_1[0x34] * sVar4;

      param_1[0x35] = param_1[0x35] * sVar5;

      param_1[0x36] = param_1[0x36] * sVar6;

      param_1[0x37] = param_1[0x37] * sVar7;

      param_1[0x38] = param_1[0x38] * sVar8;

      param_1[0x39] = param_1[0x39] * sVar9;

      param_1[0x3a] = param_1[0x3a] * sVar10;

      param_1[0x3b] = param_1[0x3b] * sVar11;

      param_1[0x3c] = param_1[0x3c] * sVar12;

      param_1[0x3d] = param_1[0x3d] * sVar13;

      param_1[0x3e] = param_1[0x3e] * sVar14;

      param_1[0x3f] = param_1[0x3f] * sVar15;

    }

  }

  else if (((uint)param_2 & 0xf) == 0) {

    sVar1 = param_2[1];

    sVar2 = param_2[2];

    sVar3 = param_2[3];

    sVar4 = param_2[4];

    sVar5 = param_2[5];

    sVar6 = param_2[6];

    sVar7 = param_2[7];

    sVar8 = param_2[8];

    sVar9 = param_2[9];

    sVar10 = param_2[10];

    sVar11 = param_2[0xb];

    sVar12 = param_2[0xc];

    sVar13 = param_2[0xd];

    sVar14 = param_2[0xe];

    sVar15 = param_2[0xf];

    *param_1 = *param_1 * *param_2;

    param_1[1] = param_1[1] * sVar1;

    param_1[2] = param_1[2] * sVar2;

    param_1[3] = param_1[3] * sVar3;

    param_1[4] = param_1[4] * sVar4;

    param_1[5] = param_1[5] * sVar5;

    param_1[6] = param_1[6] * sVar6;

    param_1[7] = param_1[7] * sVar7;

    param_1[8] = param_1[8] * sVar8;

    param_1[9] = param_1[9] * sVar9;

    param_1[10] = param_1[10] * sVar10;

    param_1[0xb] = param_1[0xb] * sVar11;

    param_1[0xc] = param_1[0xc] * sVar12;

    param_1[0xd] = param_1[0xd] * sVar13;

    param_1[0xe] = param_1[0xe] * sVar14;

    param_1[0xf] = param_1[0xf] * sVar15;

    sVar1 = param_2[0x11];

    sVar2 = param_2[0x12];

    sVar3 = param_2[0x13];

    sVar4 = param_2[0x14];

    sVar5 = param_2[0x15];

    sVar6 = param_2[0x16];

    sVar7 = param_2[0x17];

    sVar8 = param_2[0x18];

    sVar9 = param_2[0x19];

    sVar10 = param_2[0x1a];

    sVar11 = param_2[0x1b];

    sVar12 = param_2[0x1c];

    sVar13 = param_2[0x1d];

    sVar14 = param_2[0x1e];

    sVar15 = param_2[0x1f];

    param_1[0x10] = param_1[0x10] * param_2[0x10];

    param_1[0x11] = param_1[0x11] * sVar1;

    param_1[0x12] = param_1[0x12] * sVar2;

    param_1[0x13] = param_1[0x13] * sVar3;

    param_1[0x14] = param_1[0x14] * sVar4;

    param_1[0x15] = param_1[0x15] * sVar5;

    param_1[0x16] = param_1[0x16] * sVar6;

    param_1[0x17] = param_1[0x17] * sVar7;

    param_1[0x18] = param_1[0x18] * sVar8;

    param_1[0x19] = param_1[0x19] * sVar9;

    param_1[0x1a] = param_1[0x1a] * sVar10;

    param_1[0x1b] = param_1[0x1b] * sVar11;

    param_1[0x1c] = param_1[0x1c] * sVar12;

    param_1[0x1d] = param_1[0x1d] * sVar13;

    param_1[0x1e] = param_1[0x1e] * sVar14;

    param_1[0x1f] = param_1[0x1f] * sVar15;

    sVar1 = param_2[0x21];

    sVar2 = param_2[0x22];

    sVar3 = param_2[0x23];

    sVar4 = param_2[0x24];

    sVar5 = param_2[0x25];

    sVar6 = param_2[0x26];

    sVar7 = param_2[0x27];

    sVar8 = param_2[0x28];

    sVar9 = param_2[0x29];

    sVar10 = param_2[0x2a];

    sVar11 = param_2[0x2b];

    sVar12 = param_2[0x2c];

    sVar13 = param_2[0x2d];

    sVar14 = param_2[0x2e];

    sVar15 = param_2[0x2f];

    param_1[0x20] = param_1[0x20] * param_2[0x20];

    param_1[0x21] = param_1[0x21] * sVar1;

    param_1[0x22] = param_1[0x22] * sVar2;

    param_1[0x23] = param_1[0x23] * sVar3;

    param_1[0x24] = param_1[0x24] * sVar4;

    param_1[0x25] = param_1[0x25] * sVar5;

    param_1[0x26] = param_1[0x26] * sVar6;

    param_1[0x27] = param_1[0x27] * sVar7;

    param_1[0x28] = param_1[0x28] * sVar8;

    param_1[0x29] = param_1[0x29] * sVar9;

    param_1[0x2a] = param_1[0x2a] * sVar10;

    param_1[0x2b] = param_1[0x2b] * sVar11;

    param_1[0x2c] = param_1[0x2c] * sVar12;

    param_1[0x2d] = param_1[0x2d] * sVar13;

    param_1[0x2e] = param_1[0x2e] * sVar14;

    param_1[0x2f] = param_1[0x2f] * sVar15;

    sVar1 = param_2[0x31];

    sVar2 = param_2[0x32];

    sVar3 = param_2[0x33];

    sVar4 = param_2[0x34];

    sVar5 = param_2[0x35];

    sVar6 = param_2[0x36];

    sVar7 = param_2[0x37];

    sVar8 = param_2[0x38];

    sVar9 = param_2[0x39];

    sVar10 = param_2[0x3a];

    sVar11 = param_2[0x3b];

    sVar12 = param_2[0x3c];

    sVar13 = param_2[0x3d];

    sVar14 = param_2[0x3e];

    sVar15 = param_2[0x3f];

    param_1[0x30] = param_1[0x30] * param_2[0x30];

    param_1[0x31] = param_1[0x31] * sVar1;

    param_1[0x32] = param_1[0x32] * sVar2;

    param_1[0x33] = param_1[0x33] * sVar3;

    param_1[0x34] = param_1[0x34] * sVar4;

    param_1[0x35] = param_1[0x35] * sVar5;

    param_1[0x36] = param_1[0x36] * sVar6;

    param_1[0x37] = param_1[0x37] * sVar7;

    param_1[0x38] = param_1[0x38] * sVar8;

    param_1[0x39] = param_1[0x39] * sVar9;

    param_1[0x3a] = param_1[0x3a] * sVar10;

    param_1[0x3b] = param_1[0x3b] * sVar11;

    param_1[0x3c] = param_1[0x3c] * sVar12;

    param_1[0x3d] = param_1[0x3d] * sVar13;

    param_1[0x3e] = param_1[0x3e] * sVar14;

    param_1[0x3f] = param_1[0x3f] * sVar15;

  }

  else {

    sVar1 = param_2[1];

    sVar2 = param_2[2];

    sVar3 = param_2[3];

    sVar4 = param_2[4];

    sVar5 = param_2[5];

    sVar6 = param_2[6];

    sVar7 = param_2[7];

    sVar8 = param_2[8];

    sVar9 = param_2[9];

    sVar10 = param_2[10];

    sVar11 = param_2[0xb];

    sVar12 = param_2[0xc];

    sVar13 = param_2[0xd];

    sVar14 = param_2[0xe];

    sVar15 = param_2[0xf];

    *param_1 = *param_1 * *param_2;

    param_1[1] = param_1[1] * sVar1;

    param_1[2] = param_1[2] * sVar2;

    param_1[3] = param_1[3] * sVar3;

    param_1[4] = param_1[4] * sVar4;

    param_1[5] = param_1[5] * sVar5;

    param_1[6] = param_1[6] * sVar6;

    param_1[7] = param_1[7] * sVar7;

    param_1[8] = param_1[8] * sVar8;

    param_1[9] = param_1[9] * sVar9;

    param_1[10] = param_1[10] * sVar10;

    param_1[0xb] = param_1[0xb] * sVar11;

    param_1[0xc] = param_1[0xc] * sVar12;

    param_1[0xd] = param_1[0xd] * sVar13;

    param_1[0xe] = param_1[0xe] * sVar14;

    param_1[0xf] = param_1[0xf] * sVar15;

    sVar1 = param_2[0x11];

    sVar2 = param_2[0x12];

    sVar3 = param_2[0x13];

    sVar4 = param_2[0x14];

    sVar5 = param_2[0x15];

    sVar6 = param_2[0x16];

    sVar7 = param_2[0x17];

    sVar8 = param_2[0x18];

    sVar9 = param_2[0x19];

    sVar10 = param_2[0x1a];

    sVar11 = param_2[0x1b];

    sVar12 = param_2[0x1c];

    sVar13 = param_2[0x1d];

    sVar14 = param_2[0x1e];

    sVar15 = param_2[0x1f];

    param_1[0x10] = param_1[0x10] * param_2[0x10];

    param_1[0x11] = param_1[0x11] * sVar1;

    param_1[0x12] = param_1[0x12] * sVar2;

    param_1[0x13] = param_1[0x13] * sVar3;

    param_1[0x14] = param_1[0x14] * sVar4;

    param_1[0x15] = param_1[0x15] * sVar5;

    param_1[0x16] = param_1[0x16] * sVar6;

    param_1[0x17] = param_1[0x17] * sVar7;

    param_1[0x18] = param_1[0x18] * sVar8;

    param_1[0x19] = param_1[0x19] * sVar9;

    param_1[0x1a] = param_1[0x1a] * sVar10;

    param_1[0x1b] = param_1[0x1b] * sVar11;

    param_1[0x1c] = param_1[0x1c] * sVar12;

    param_1[0x1d] = param_1[0x1d] * sVar13;

    param_1[0x1e] = param_1[0x1e] * sVar14;

    param_1[0x1f] = param_1[0x1f] * sVar15;

    sVar1 = param_2[0x21];

    sVar2 = param_2[0x22];

    sVar3 = param_2[0x23];

    sVar4 = param_2[0x24];

    sVar5 = param_2[0x25];

    sVar6 = param_2[0x26];

    sVar7 = param_2[0x27];

    sVar8 = param_2[0x28];

    sVar9 = param_2[0x29];

    sVar10 = param_2[0x2a];

    sVar11 = param_2[0x2b];

    sVar12 = param_2[0x2c];

    sVar13 = param_2[0x2d];

    sVar14 = param_2[0x2e];

    sVar15 = param_2[0x2f];

    param_1[0x20] = param_1[0x20] * param_2[0x20];

    param_1[0x21] = param_1[0x21] * sVar1;

    param_1[0x22] = param_1[0x22] * sVar2;

    param_1[0x23] = param_1[0x23] * sVar3;

    param_1[0x24] = param_1[0x24] * sVar4;

    param_1[0x25] = param_1[0x25] * sVar5;

    param_1[0x26] = param_1[0x26] * sVar6;

    param_1[0x27] = param_1[0x27] * sVar7;

    param_1[0x28] = param_1[0x28] * sVar8;

    param_1[0x29] = param_1[0x29] * sVar9;

    param_1[0x2a] = param_1[0x2a] * sVar10;

    param_1[0x2b] = param_1[0x2b] * sVar11;

    param_1[0x2c] = param_1[0x2c] * sVar12;

    param_1[0x2d] = param_1[0x2d] * sVar13;

    param_1[0x2e] = param_1[0x2e] * sVar14;

    param_1[0x2f] = param_1[0x2f] * sVar15;

    sVar1 = param_2[0x31];

    sVar2 = param_2[0x32];

    sVar3 = param_2[0x33];

    sVar4 = param_2[0x34];

    sVar5 = param_2[0x35];

    sVar6 = param_2[0x36];

    sVar7 = param_2[0x37];

    sVar8 = param_2[0x38];

    sVar9 = param_2[0x39];

    sVar10 = param_2[0x3a];

    sVar11 = param_2[0x3b];

    sVar12 = param_2[0x3c];

    sVar13 = param_2[0x3d];

    sVar14 = param_2[0x3e];

    sVar15 = param_2[0x3f];

    param_1[0x30] = param_1[0x30] * param_2[0x30];

    param_1[0x31] = param_1[0x31] * sVar1;

    param_1[0x32] = param_1[0x32] * sVar2;

    param_1[0x33] = param_1[0x33] * sVar3;

    param_1[0x34] = param_1[0x34] * sVar4;

    param_1[0x35] = param_1[0x35] * sVar5;

    param_1[0x36] = param_1[0x36] * sVar6;

    param_1[0x37] = param_1[0x37] * sVar7;

    param_1[0x38] = param_1[0x38] * sVar8;

    param_1[0x39] = param_1[0x39] * sVar9;

    param_1[0x3a] = param_1[0x3a] * sVar10;

    param_1[0x3b] = param_1[0x3b] * sVar11;

    param_1[0x3c] = param_1[0x3c] * sVar12;

    param_1[0x3d] = param_1[0x3d] * sVar13;

    param_1[0x3e] = param_1[0x3e] * sVar14;

    param_1[0x3f] = param_1[0x3f] * sVar15;

  }

  return;

}





// --- FUN_00652ae0 at 0x00652AE0 (size: 2493) ---


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



void FUN_00652ae0(undefined8 *param_1)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  undefined4 uVar5;

  int iVar6;

  undefined8 uVar7;

  int iVar9;

  ulonglong uVar8;

  int iVar10;

  undefined8 uVar11;

  int iVar12;

  undefined8 uVar13;

  int iVar14;

  undefined8 uVar15;

  int iVar16;

  undefined8 uVar17;

  uint uVar19;

  ulonglong uVar18;

  int iVar20;

  int iVar22;

  undefined8 uVar21;

  undefined4 uVar23;

  undefined8 uVar24;

  undefined8 uVar25;

  

  uVar11 = *param_1;

  uVar13 = param_1[1];

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833c90,uVar7);

  uVar17 = pmaddwd(DAT_00833c98,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833ca0);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833cb0,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833cb8,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833ca8);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833cc0);

  uVar17 = pmaddwd(uVar25,_DAT_00833cc8);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  *param_1 = uVar11;

  uVar11 = param_1[2];

  uVar13 = param_1[3];

  param_1[1] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

               CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833cd0,uVar7);

  uVar17 = pmaddwd(DAT_00833cd8,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833ce0);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833cf0,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833cf8,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833ce8);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d00);

  uVar17 = pmaddwd(uVar25,_DAT_00833d08);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[2] = uVar11;

  uVar11 = param_1[4];

  uVar13 = param_1[5];

  param_1[3] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

               CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833d10,uVar7);

  uVar17 = pmaddwd(DAT_00833d18,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833d20);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833d30,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833d38,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833d28);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d40);

  uVar17 = pmaddwd(uVar25,_DAT_00833d48);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[4] = uVar11;

  uVar11 = param_1[6];

  uVar13 = param_1[7];

  param_1[5] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

               CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833d50,uVar7);

  uVar17 = pmaddwd(DAT_00833d58,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833d60);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833d70,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833d78,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833d68);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d80);

  uVar17 = pmaddwd(uVar25,_DAT_00833d88);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[6] = uVar11;

  uVar11 = param_1[8];

  uVar13 = param_1[9];

  param_1[7] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

               CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833c90,uVar7);

  uVar17 = pmaddwd(DAT_00833c98,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833ca0);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833cb0,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833cb8,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833ca8);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833cc0);

  uVar17 = pmaddwd(uVar25,_DAT_00833cc8);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[8] = uVar11;

  uVar11 = param_1[10];

  uVar13 = param_1[0xb];

  param_1[9] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

               CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833d50,uVar7);

  uVar17 = pmaddwd(DAT_00833d58,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833d60);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833d70,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833d78,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833d68);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d80);

  uVar17 = pmaddwd(uVar25,_DAT_00833d88);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[10] = uVar11;

  uVar11 = param_1[0xc];

  uVar13 = param_1[0xd];

  param_1[0xb] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

                 CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833d10,uVar7);

  uVar17 = pmaddwd(DAT_00833d18,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833d20);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833d30,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833d38,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833d28);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d40);

  uVar17 = pmaddwd(uVar25,_DAT_00833d48);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar7 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                   CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar7 >> 0x20);

  param_1[0xc] = uVar11;

  uVar11 = param_1[0xe];

  uVar13 = param_1[0xf];

  param_1[0xd] = CONCAT44(uVar19 << 0x10,(uint)uVar7 << 0x10) |

                 CONCAT44(uVar19 >> 0x10,(uint)uVar7 >> 0x10);

  uVar23 = CONCAT22((short)((ulonglong)uVar13 >> 0x10),(short)((ulonglong)uVar11 >> 0x10));

  uVar5 = CONCAT22((short)uVar13,(short)uVar11);

  uVar7 = CONCAT44(uVar5,uVar5);

  uVar5 = CONCAT22((short)((ulonglong)uVar13 >> 0x20),(short)((ulonglong)uVar11 >> 0x20));

  uVar15 = pmaddwd(DAT_00833cd0,uVar7);

  uVar17 = pmaddwd(DAT_00833cd8,CONCAT44(uVar5,uVar5));

  uVar21 = CONCAT44(uVar23,uVar23);

  uVar7 = pmaddwd(uVar7,_DAT_00833ce0);

  uVar23 = (undefined4)

           (CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                     CONCAT24((short)((ulonglong)uVar11 >> 0x30),uVar5)) >> 0x20);

  uVar25 = CONCAT44(uVar23,uVar23);

  uVar11 = pmaddwd(DAT_00833cf0,uVar21);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar24 = pmaddwd(DAT_00833cf8,uVar25);

  uVar13 = pmaddwd(CONCAT44(uVar5,uVar5),_DAT_00833ce8);

  iVar14 = (int)uVar15 + (int)DAT_00833bf0 + (int)uVar17;

  iVar16 = (int)((ulonglong)uVar15 >> 0x20) + iVar9 + (int)((ulonglong)uVar17 >> 0x20);

  uVar15 = pmaddwd(uVar21,_DAT_00833d00);

  uVar17 = pmaddwd(uVar25,_DAT_00833d08);

  iVar10 = (int)uVar11 + (int)uVar24;

  iVar12 = (int)((ulonglong)uVar11 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  iVar6 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar13;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar13 >> 0x20);

  iVar20 = (int)uVar15 + (int)uVar17;

  iVar22 = (int)((ulonglong)uVar15 >> 0x20) + (int)((ulonglong)uVar17 >> 0x20);

  uVar11 = packssdw(CONCAT44(iVar12 + iVar16 >> 0xc,iVar10 + iVar14 >> 0xc),

                    CONCAT44(iVar9 + iVar22 >> 0xc,iVar6 + iVar20 >> 0xc));

  uVar13 = packssdw(CONCAT44(iVar9 - iVar22 >> 0xc,iVar6 - iVar20 >> 0xc),

                    CONCAT44(iVar16 - iVar12 >> 0xc,iVar14 - iVar10 >> 0xc));

  uVar19 = (uint)((ulonglong)uVar13 >> 0x20);

  param_1[0xe] = uVar11;

  uVar11 = param_1[10];

  param_1[0xf] = CONCAT44(uVar19 << 0x10,(uint)uVar13 << 0x10) |

                 CONCAT44(uVar19 >> 0x10,(uint)uVar13 >> 0x10);

  uVar13 = param_1[6];

  uVar7 = pmulhw(uVar11,DAT_00833c60);

  uVar15 = pmulhw(DAT_00833c60,uVar13);

  uVar17 = pmulhw(param_1[0xe],DAT_00833c40);

  uVar7 = paddsw(uVar7,uVar11);

  uVar21 = pmulhw(DAT_00833c40,param_1[2]);

  uVar15 = paddsw(uVar15,uVar13);

  uVar13 = paddsw(uVar7,uVar13);

  uVar7 = psubsw(uVar11,uVar15);

  uVar25 = pmulhw(param_1[0xc],DAT_00833c50);

  uVar15 = pmulhw(DAT_00833c50,param_1[4]);

  uVar21 = psubsw(uVar21,param_1[0xe]);

  uVar17 = paddsw(uVar17,param_1[2]);

  uVar11 = paddsw(uVar13,uVar17);

  uVar11 = paddsw(uVar11,_DAT_00833be0);

  uVar13 = psubsw(uVar17,uVar13);

  uVar24 = paddsw(uVar25,param_1[4]);

  uVar15 = psubsw(uVar15,param_1[0xc]);

  uVar17 = psubsw(uVar21,uVar7);

  uVar25 = paddsw(uVar17,_DAT_00833be0);

  uVar21 = paddsw(uVar21,uVar7);

  param_1[0xe] = uVar11;

  uVar11 = DAT_00833c70;

  uVar17 = paddsw(uVar13,uVar25);

  uVar7 = pmulhw(DAT_00833c70,uVar17);

  param_1[6] = uVar21;

  uVar13 = psubsw(uVar13,uVar25);

  uVar11 = pmulhw(uVar11,uVar13);

  uVar18 = paddsw(uVar17,uVar7);

  uVar18 = uVar18 | _DAT_00833be0;

  uVar7 = paddsw(param_1[8],*param_1);

  uVar21 = psubsw(*param_1,param_1[8]);

  uVar8 = paddsw(uVar11,uVar13);

  uVar8 = uVar8 | _DAT_00833be0;

  uVar11 = paddsw(uVar7,uVar24);

  uVar17 = paddsw(uVar11,_DAT_00833c00);

  uVar13 = psubsw(uVar7,uVar24);

  uVar11 = paddsw(uVar21,uVar15);

  uVar25 = paddsw(uVar11,_DAT_00833c00);

  uVar11 = paddsw(param_1[0xe],uVar17);

  uVar24 = psraw(uVar11,5);

  uVar11 = psubsw(uVar21,uVar15);

  uVar7 = paddsw(uVar13,_DAT_00833c10);

  uVar11 = paddsw(uVar11,_DAT_00833c10);

  uVar13 = paddsw(uVar25,uVar18);

  uVar15 = paddsw(uVar24,_DAT_00833c20);

  sVar1 = (short)uVar15;

  sVar2 = (short)((ulonglong)uVar15 >> 0x10);

  sVar3 = (short)((ulonglong)uVar15 >> 0x20);

  sVar4 = (short)((ulonglong)uVar15 >> 0x30);

  *param_1 = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >> 0x18

                                                                         ),(0 < sVar4) *

                                                                           (sVar4 < 0x100) *

                                                                           (char)((ulonglong)uVar15

                                                                                 >> 0x30) -

                                                                           (0xff < sVar4)),

                                                          (char)((uint)DAT_00833c30 >> 0x10)),

                                                 (0 < sVar3) * (sVar3 < 0x100) *

                                                 (char)((ulonglong)uVar15 >> 0x20) - (0xff < sVar3))

                                        ,(char)((uint)DAT_00833c30 >> 8)),

                               (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                               (0xff < sVar2)),

                      CONCAT11((char)DAT_00833c30,

                               (0 < sVar1) * (sVar1 < 0x100) * (char)uVar15 - (0xff < sVar1)));

  uVar13 = psraw(uVar13,5);

  uVar15 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar15;

  sVar2 = (short)((ulonglong)uVar15 >> 0x10);

  sVar3 = (short)((ulonglong)uVar15 >> 0x20);

  sVar4 = (short)((ulonglong)uVar15 >> 0x30);

  uVar13 = paddsw(uVar11,uVar8);

  param_1[2] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar15 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar15 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar15 - (0xff < sVar1)));

  uVar13 = psraw(uVar13,5);

  uVar21 = psubsw(uVar11,uVar8);

  uVar15 = paddsw(param_1[6],uVar7);

  uVar7 = psubsw(uVar7,param_1[6]);

  uVar11 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar21 = psraw(uVar21,5);

  param_1[4] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar11 = psraw(uVar15,5);

  uVar15 = psubsw(uVar17,param_1[0xe]);

  uVar13 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar13;

  sVar2 = (short)((ulonglong)uVar13 >> 0x10);

  sVar3 = (short)((ulonglong)uVar13 >> 0x20);

  sVar4 = (short)((ulonglong)uVar13 >> 0x30);

  uVar11 = psraw(uVar7,5);

  param_1[6] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar13 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar13 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar13 - (0xff < sVar1)));

  uVar11 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar13 = psubsw(uVar25,uVar18);

  param_1[8] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar7 = paddsw(uVar21,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psraw(uVar13,5);

  param_1[10] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                            0x18),

                                                                      (0 < sVar4) * (sVar4 < 0x100)

                                                                      * (char)((ulonglong)uVar7 >>

                                                                              0x30) - (0xff < sVar4)

                                                                     ),

                                                             (char)((uint)DAT_00833c30 >> 0x10)),

                                                    (0 < sVar3) * (sVar3 < 0x100) *

                                                    (char)((ulonglong)uVar7 >> 0x20) -

                                                    (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8))

                                  ,(0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                         CONCAT11((char)DAT_00833c30,

                                  (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar11 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar13 = psraw(uVar15,5);

  param_1[0xc] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar11 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar11 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar11 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  param_1[0xe] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar11 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar11 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar11 = param_1[0xb];

  uVar13 = param_1[7];

  uVar7 = pmulhw(uVar11,DAT_00833c60);

  uVar15 = pmulhw(DAT_00833c60,uVar13);

  uVar17 = pmulhw(param_1[0xf],DAT_00833c40);

  uVar7 = paddsw(uVar7,uVar11);

  uVar21 = pmulhw(DAT_00833c40,param_1[3]);

  uVar15 = paddsw(uVar15,uVar13);

  uVar13 = paddsw(uVar7,uVar13);

  uVar7 = psubsw(uVar11,uVar15);

  uVar25 = pmulhw(param_1[0xd],DAT_00833c50);

  uVar15 = pmulhw(DAT_00833c50,param_1[5]);

  uVar21 = psubsw(uVar21,param_1[0xf]);

  uVar17 = paddsw(uVar17,param_1[3]);

  uVar11 = paddsw(uVar13,uVar17);

  uVar11 = paddsw(uVar11,_DAT_00833be0);

  uVar13 = psubsw(uVar17,uVar13);

  uVar24 = paddsw(uVar25,param_1[5]);

  uVar15 = psubsw(uVar15,param_1[0xd]);

  uVar17 = psubsw(uVar21,uVar7);

  uVar25 = paddsw(uVar17,_DAT_00833be0);

  uVar21 = paddsw(uVar21,uVar7);

  param_1[0xf] = uVar11;

  uVar11 = DAT_00833c70;

  uVar17 = paddsw(uVar13,uVar25);

  uVar7 = pmulhw(DAT_00833c70,uVar17);

  param_1[7] = uVar21;

  uVar13 = psubsw(uVar13,uVar25);

  uVar11 = pmulhw(uVar11,uVar13);

  uVar18 = paddsw(uVar17,uVar7);

  uVar18 = uVar18 | _DAT_00833be0;

  uVar7 = paddsw(param_1[9],param_1[1]);

  uVar21 = psubsw(param_1[1],param_1[9]);

  uVar8 = paddsw(uVar11,uVar13);

  uVar8 = uVar8 | _DAT_00833be0;

  uVar11 = paddsw(uVar7,uVar24);

  uVar17 = paddsw(uVar11,_DAT_00833c00);

  uVar13 = psubsw(uVar7,uVar24);

  uVar11 = paddsw(uVar21,uVar15);

  uVar25 = paddsw(uVar11,_DAT_00833c00);

  uVar11 = paddsw(param_1[0xf],uVar17);

  uVar24 = psraw(uVar11,5);

  uVar11 = psubsw(uVar21,uVar15);

  uVar7 = paddsw(uVar13,_DAT_00833c10);

  uVar11 = paddsw(uVar11,_DAT_00833c10);

  uVar13 = paddsw(uVar25,uVar18);

  uVar15 = paddsw(uVar24,_DAT_00833c20);

  sVar1 = (short)uVar15;

  sVar2 = (short)((ulonglong)uVar15 >> 0x10);

  sVar3 = (short)((ulonglong)uVar15 >> 0x20);

  sVar4 = (short)((ulonglong)uVar15 >> 0x30);

  param_1[1] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar15 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar15 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar15 - (0xff < sVar1)));

  uVar13 = psraw(uVar13,5);

  uVar15 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar15;

  sVar2 = (short)((ulonglong)uVar15 >> 0x10);

  sVar3 = (short)((ulonglong)uVar15 >> 0x20);

  sVar4 = (short)((ulonglong)uVar15 >> 0x30);

  uVar13 = paddsw(uVar11,uVar8);

  param_1[3] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar15 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar15 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar15 - (0xff < sVar1)));

  uVar13 = psraw(uVar13,5);

  uVar21 = psubsw(uVar11,uVar8);

  uVar15 = paddsw(param_1[7],uVar7);

  uVar7 = psubsw(uVar7,param_1[7]);

  uVar11 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar21 = psraw(uVar21,5);

  param_1[5] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar11 = psraw(uVar15,5);

  uVar15 = psubsw(uVar17,param_1[0xf]);

  uVar13 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar13;

  sVar2 = (short)((ulonglong)uVar13 >> 0x10);

  sVar3 = (short)((ulonglong)uVar13 >> 0x20);

  sVar4 = (short)((ulonglong)uVar13 >> 0x30);

  uVar11 = psraw(uVar7,5);

  param_1[7] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar13 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar13 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar13 - (0xff < sVar1)));

  uVar11 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar13 = psubsw(uVar25,uVar18);

  param_1[9] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar7 = paddsw(uVar21,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psraw(uVar13,5);

  param_1[0xb] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar7 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar7 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar11 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar13 = psraw(uVar15,5);

  param_1[0xd] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar11 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar11 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar11 = paddsw(uVar13,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  param_1[0xf] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar11 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar11 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  return;

}





// --- FUN_006534a0 at 0x006534A0 (size: 2373) ---


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



void FUN_006534a0(undefined8 *param_1)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  int iVar5;

  undefined8 uVar6;

  undefined8 uVar7;

  int iVar9;

  ulonglong uVar8;

  undefined8 uVar10;

  undefined8 uVar11;

  int iVar12;

  undefined8 uVar13;

  int iVar14;

  int iVar15;

  undefined8 uVar16;

  int iVar17;

  undefined8 uVar18;

  ulonglong uVar19;

  undefined8 uVar20;

  int iVar21;

  undefined8 uVar22;

  int iVar23;

  undefined8 uVar24;

  

  uVar7 = *param_1;

  uVar11 = param_1[1];

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833d90,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833d98,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833db0,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833db8,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833da0);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833da8);

  uVar6 = pmaddwd(uVar13,_DAT_00833dc0);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833dc8);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  *param_1 = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[2];

  uVar11 = param_1[3];

  param_1[1] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833dd0,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833dd8,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833df0,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833df8,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833de0);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833de8);

  uVar6 = pmaddwd(uVar13,_DAT_00833e00);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e08);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[2] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[4];

  uVar11 = param_1[5];

  param_1[3] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833e10,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833e18,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833e30,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833e38,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833e20);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833e28);

  uVar6 = pmaddwd(uVar13,_DAT_00833e40);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e48);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[4] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[6];

  uVar11 = param_1[7];

  param_1[5] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833e50,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833e58,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833e70,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833e78,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833e60);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833e68);

  uVar6 = pmaddwd(uVar13,_DAT_00833e80);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e88);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[6] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[8];

  uVar11 = param_1[9];

  param_1[7] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833d90,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833d98,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833db0,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833db8,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833da0);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833da8);

  uVar6 = pmaddwd(uVar13,_DAT_00833dc0);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833dc8);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[8] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[10];

  uVar11 = param_1[0xb];

  param_1[9] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833e50,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833e58,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833e70,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833e78,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833e60);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833e68);

  uVar6 = pmaddwd(uVar13,_DAT_00833e80);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e88);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[10] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[0xc];

  uVar11 = param_1[0xd];

  param_1[0xb] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833e10,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833e18,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833e30,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833e38,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833e20);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833e28);

  uVar6 = pmaddwd(uVar13,_DAT_00833e40);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e48);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[0xc] = uVar7;

  uVar6 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[0xe];

  uVar11 = param_1[0xf];

  param_1[0xd] = uVar6;

  uVar6 = pshufw(uVar7,uVar7,0x88);

  uVar16 = pmaddwd(DAT_00833dd0,uVar6);

  uVar10 = pshufw(uVar11,uVar11,0x88);

  uVar18 = pmaddwd(DAT_00833dd8,uVar10);

  uVar13 = pshufw(uVar7,uVar7,0xdd);

  uVar22 = pmaddwd(DAT_00833df0,uVar13);

  uVar20 = pshufw(uVar11,uVar11,0xdd);

  uVar24 = pmaddwd(DAT_00833df8,uVar20);

  iVar9 = (int)((ulonglong)DAT_00833bf0 >> 0x20);

  uVar7 = pmaddwd(uVar6,_DAT_00833de0);

  iVar15 = (int)uVar16 + (int)DAT_00833bf0 + (int)uVar18;

  iVar17 = (int)((ulonglong)uVar16 >> 0x20) + iVar9 + (int)((ulonglong)uVar18 >> 0x20);

  uVar11 = pmaddwd(uVar10,_DAT_00833de8);

  uVar6 = pmaddwd(uVar13,_DAT_00833e00);

  iVar21 = (int)uVar22 + (int)uVar24;

  iVar23 = (int)((ulonglong)uVar22 >> 0x20) + (int)((ulonglong)uVar24 >> 0x20);

  uVar10 = pmaddwd(uVar20,_DAT_00833e08);

  iVar5 = (int)uVar7 + (int)DAT_00833bf0 + (int)uVar11;

  iVar9 = (int)((ulonglong)uVar7 >> 0x20) + iVar9 + (int)((ulonglong)uVar11 >> 0x20);

  iVar12 = (int)uVar6 + (int)uVar10;

  iVar14 = (int)((ulonglong)uVar6 >> 0x20) + (int)((ulonglong)uVar10 >> 0x20);

  uVar7 = packssdw(CONCAT44(iVar17 + iVar23 >> 0xc,iVar15 + iVar21 >> 0xc),

                   CONCAT44(iVar9 + iVar14 >> 0xc,iVar5 + iVar12 >> 0xc));

  uVar11 = packssdw(CONCAT44(iVar9 - iVar14 >> 0xc,iVar5 - iVar12 >> 0xc),

                    CONCAT44(iVar17 - iVar23 >> 0xc,iVar15 - iVar21 >> 0xc));

  param_1[0xe] = uVar7;

  uVar11 = pshufw(uVar11,uVar11,0xb1);

  uVar7 = param_1[10];

  param_1[0xf] = uVar11;

  uVar11 = param_1[6];

  uVar6 = pmulhw(uVar7,DAT_00833c60);

  uVar10 = pmulhw(DAT_00833c60,uVar11);

  uVar13 = pmulhw(param_1[0xe],DAT_00833c40);

  uVar6 = paddsw(uVar6,uVar7);

  uVar16 = pmulhw(DAT_00833c40,param_1[2]);

  uVar10 = paddsw(uVar10,uVar11);

  uVar11 = paddsw(uVar6,uVar11);

  uVar6 = psubsw(uVar7,uVar10);

  uVar18 = pmulhw(param_1[0xc],DAT_00833c50);

  uVar10 = pmulhw(DAT_00833c50,param_1[4]);

  uVar16 = psubsw(uVar16,param_1[0xe]);

  uVar13 = paddsw(uVar13,param_1[2]);

  uVar7 = paddsw(uVar11,uVar13);

  uVar7 = paddsw(uVar7,_DAT_00833be0);

  uVar11 = psubsw(uVar13,uVar11);

  uVar20 = paddsw(uVar18,param_1[4]);

  uVar10 = psubsw(uVar10,param_1[0xc]);

  uVar13 = psubsw(uVar16,uVar6);

  uVar18 = paddsw(uVar13,_DAT_00833be0);

  uVar16 = paddsw(uVar16,uVar6);

  param_1[0xe] = uVar7;

  uVar7 = DAT_00833c70;

  uVar13 = paddsw(uVar11,uVar18);

  uVar6 = pmulhw(DAT_00833c70,uVar13);

  param_1[6] = uVar16;

  uVar11 = psubsw(uVar11,uVar18);

  uVar7 = pmulhw(uVar7,uVar11);

  uVar19 = paddsw(uVar13,uVar6);

  uVar19 = uVar19 | _DAT_00833be0;

  uVar6 = paddsw(param_1[8],*param_1);

  uVar16 = psubsw(*param_1,param_1[8]);

  uVar8 = paddsw(uVar7,uVar11);

  uVar8 = uVar8 | _DAT_00833be0;

  uVar7 = paddsw(uVar6,uVar20);

  uVar13 = paddsw(uVar7,_DAT_00833c00);

  uVar11 = psubsw(uVar6,uVar20);

  uVar7 = paddsw(uVar16,uVar10);

  uVar18 = paddsw(uVar7,_DAT_00833c00);

  uVar7 = paddsw(param_1[0xe],uVar13);

  uVar20 = psraw(uVar7,5);

  uVar7 = psubsw(uVar16,uVar10);

  uVar6 = paddsw(uVar11,_DAT_00833c10);

  uVar7 = paddsw(uVar7,_DAT_00833c10);

  uVar11 = paddsw(uVar18,uVar19);

  uVar10 = paddsw(uVar20,_DAT_00833c20);

  sVar1 = (short)uVar10;

  sVar2 = (short)((ulonglong)uVar10 >> 0x10);

  sVar3 = (short)((ulonglong)uVar10 >> 0x20);

  sVar4 = (short)((ulonglong)uVar10 >> 0x30);

  *param_1 = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >> 0x18

                                                                         ),(0 < sVar4) *

                                                                           (sVar4 < 0x100) *

                                                                           (char)((ulonglong)uVar10

                                                                                 >> 0x30) -

                                                                           (0xff < sVar4)),

                                                          (char)((uint)DAT_00833c30 >> 0x10)),

                                                 (0 < sVar3) * (sVar3 < 0x100) *

                                                 (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar3))

                                        ,(char)((uint)DAT_00833c30 >> 8)),

                               (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                               (0xff < sVar2)),

                      CONCAT11((char)DAT_00833c30,

                               (0 < sVar1) * (sVar1 < 0x100) * (char)uVar10 - (0xff < sVar1)));

  uVar11 = psraw(uVar11,5);

  uVar10 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar10;

  sVar2 = (short)((ulonglong)uVar10 >> 0x10);

  sVar3 = (short)((ulonglong)uVar10 >> 0x20);

  sVar4 = (short)((ulonglong)uVar10 >> 0x30);

  uVar11 = paddsw(uVar7,uVar8);

  param_1[2] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar10 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar10 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar10 - (0xff < sVar1)));

  uVar11 = psraw(uVar11,5);

  uVar16 = psubsw(uVar7,uVar8);

  uVar10 = paddsw(param_1[6],uVar6);

  uVar6 = psubsw(uVar6,param_1[6]);

  uVar7 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar16 = psraw(uVar16,5);

  param_1[4] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar7 >> 0x30

                                                                           ) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar7 >> 0x20) - (0xff < sVar3)

                                                  ),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar7 = psraw(uVar10,5);

  uVar10 = psubsw(uVar13,param_1[0xe]);

  uVar11 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar7 = psraw(uVar6,5);

  param_1[6] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar7 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psubsw(uVar18,uVar19);

  param_1[8] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar7 >> 0x30

                                                                           ) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar7 >> 0x20) - (0xff < sVar3)

                                                  ),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar6 = paddsw(uVar16,_DAT_00833c20);

  sVar1 = (short)uVar6;

  sVar2 = (short)((ulonglong)uVar6 >> 0x10);

  sVar3 = (short)((ulonglong)uVar6 >> 0x20);

  sVar4 = (short)((ulonglong)uVar6 >> 0x30);

  uVar7 = psraw(uVar11,5);

  param_1[10] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                            0x18),

                                                                      (0 < sVar4) * (sVar4 < 0x100)

                                                                      * (char)((ulonglong)uVar6 >>

                                                                              0x30) - (0xff < sVar4)

                                                                     ),

                                                             (char)((uint)DAT_00833c30 >> 0x10)),

                                                    (0 < sVar3) * (sVar3 < 0x100) *

                                                    (char)((ulonglong)uVar6 >> 0x20) -

                                                    (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8))

                                  ,(0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar6 >> 0x10)

                                   - (0xff < sVar2)),

                         CONCAT11((char)DAT_00833c30,

                                  (0 < sVar1) * (sVar1 < 0x100) * (char)uVar6 - (0xff < sVar1)));

  uVar7 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psraw(uVar10,5);

  param_1[0xc] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar7 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar7 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar7 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  param_1[0xe] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar7 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar7 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar7 = param_1[0xb];

  uVar11 = param_1[7];

  uVar6 = pmulhw(uVar7,DAT_00833c60);

  uVar10 = pmulhw(DAT_00833c60,uVar11);

  uVar13 = pmulhw(param_1[0xf],DAT_00833c40);

  uVar6 = paddsw(uVar6,uVar7);

  uVar16 = pmulhw(DAT_00833c40,param_1[3]);

  uVar10 = paddsw(uVar10,uVar11);

  uVar11 = paddsw(uVar6,uVar11);

  uVar6 = psubsw(uVar7,uVar10);

  uVar18 = pmulhw(param_1[0xd],DAT_00833c50);

  uVar10 = pmulhw(DAT_00833c50,param_1[5]);

  uVar16 = psubsw(uVar16,param_1[0xf]);

  uVar13 = paddsw(uVar13,param_1[3]);

  uVar7 = paddsw(uVar11,uVar13);

  uVar7 = paddsw(uVar7,_DAT_00833be0);

  uVar11 = psubsw(uVar13,uVar11);

  uVar20 = paddsw(uVar18,param_1[5]);

  uVar10 = psubsw(uVar10,param_1[0xd]);

  uVar13 = psubsw(uVar16,uVar6);

  uVar18 = paddsw(uVar13,_DAT_00833be0);

  uVar16 = paddsw(uVar16,uVar6);

  param_1[0xf] = uVar7;

  uVar7 = DAT_00833c70;

  uVar13 = paddsw(uVar11,uVar18);

  uVar6 = pmulhw(DAT_00833c70,uVar13);

  param_1[7] = uVar16;

  uVar11 = psubsw(uVar11,uVar18);

  uVar7 = pmulhw(uVar7,uVar11);

  uVar19 = paddsw(uVar13,uVar6);

  uVar19 = uVar19 | _DAT_00833be0;

  uVar6 = paddsw(param_1[9],param_1[1]);

  uVar16 = psubsw(param_1[1],param_1[9]);

  uVar8 = paddsw(uVar7,uVar11);

  uVar8 = uVar8 | _DAT_00833be0;

  uVar7 = paddsw(uVar6,uVar20);

  uVar13 = paddsw(uVar7,_DAT_00833c00);

  uVar11 = psubsw(uVar6,uVar20);

  uVar7 = paddsw(uVar16,uVar10);

  uVar18 = paddsw(uVar7,_DAT_00833c00);

  uVar7 = paddsw(param_1[0xf],uVar13);

  uVar20 = psraw(uVar7,5);

  uVar7 = psubsw(uVar16,uVar10);

  uVar6 = paddsw(uVar11,_DAT_00833c10);

  uVar7 = paddsw(uVar7,_DAT_00833c10);

  uVar11 = paddsw(uVar18,uVar19);

  uVar10 = paddsw(uVar20,_DAT_00833c20);

  sVar1 = (short)uVar10;

  sVar2 = (short)((ulonglong)uVar10 >> 0x10);

  sVar3 = (short)((ulonglong)uVar10 >> 0x20);

  sVar4 = (short)((ulonglong)uVar10 >> 0x30);

  param_1[1] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar10 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar10 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar10 - (0xff < sVar1)));

  uVar11 = psraw(uVar11,5);

  uVar10 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar10;

  sVar2 = (short)((ulonglong)uVar10 >> 0x10);

  sVar3 = (short)((ulonglong)uVar10 >> 0x20);

  sVar4 = (short)((ulonglong)uVar10 >> 0x30);

  uVar11 = paddsw(uVar7,uVar8);

  param_1[3] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar10 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar10 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar10 - (0xff < sVar1)));

  uVar11 = psraw(uVar11,5);

  uVar16 = psubsw(uVar7,uVar8);

  uVar10 = paddsw(param_1[7],uVar6);

  uVar6 = psubsw(uVar6,param_1[7]);

  uVar7 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar16 = psraw(uVar16,5);

  param_1[5] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar7 >> 0x30

                                                                           ) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar7 >> 0x20) - (0xff < sVar3)

                                                  ),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar7 = psraw(uVar10,5);

  uVar10 = psubsw(uVar13,param_1[0xf]);

  uVar11 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar11;

  sVar2 = (short)((ulonglong)uVar11 >> 0x10);

  sVar3 = (short)((ulonglong)uVar11 >> 0x20);

  sVar4 = (short)((ulonglong)uVar11 >> 0x30);

  uVar7 = psraw(uVar6,5);

  param_1[7] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar11 >>

                                                                           0x30) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar11 >> 0x20) -

                                                   (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)));

  uVar7 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psubsw(uVar18,uVar19);

  param_1[9] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                           0x18),

                                                                     (0 < sVar4) * (sVar4 < 0x100) *

                                                                     (char)((ulonglong)uVar7 >> 0x30

                                                                           ) - (0xff < sVar4)),

                                                            (char)((uint)DAT_00833c30 >> 0x10)),

                                                   (0 < sVar3) * (sVar3 < 0x100) *

                                                   (char)((ulonglong)uVar7 >> 0x20) - (0xff < sVar3)

                                                  ),(char)((uint)DAT_00833c30 >> 8)),

                                 (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10) -

                                 (0xff < sVar2)),

                        CONCAT11((char)DAT_00833c30,

                                 (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar6 = paddsw(uVar16,_DAT_00833c20);

  sVar1 = (short)uVar6;

  sVar2 = (short)((ulonglong)uVar6 >> 0x10);

  sVar3 = (short)((ulonglong)uVar6 >> 0x20);

  sVar4 = (short)((ulonglong)uVar6 >> 0x30);

  uVar7 = psraw(uVar11,5);

  param_1[0xb] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar6 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar6 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar6 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar6 - (0xff < sVar1)));

  uVar7 = paddsw(uVar7,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  uVar11 = psraw(uVar10,5);

  param_1[0xd] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar7 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar7 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  uVar7 = paddsw(uVar11,_DAT_00833c20);

  sVar1 = (short)uVar7;

  sVar2 = (short)((ulonglong)uVar7 >> 0x10);

  sVar3 = (short)((ulonglong)uVar7 >> 0x20);

  sVar4 = (short)((ulonglong)uVar7 >> 0x30);

  param_1[0xf] = CONCAT62(CONCAT51(CONCAT41(CONCAT31(CONCAT21(CONCAT11((char)((uint)DAT_00833c30 >>

                                                                             0x18),

                                                                       (0 < sVar4) * (sVar4 < 0x100)

                                                                       * (char)((ulonglong)uVar7 >>

                                                                               0x30) -

                                                                       (0xff < sVar4)),

                                                              (char)((uint)DAT_00833c30 >> 0x10)),

                                                     (0 < sVar3) * (sVar3 < 0x100) *

                                                     (char)((ulonglong)uVar7 >> 0x20) -

                                                     (0xff < sVar3)),(char)((uint)DAT_00833c30 >> 8)

                                           ),

                                   (0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar7 >> 0x10)

                                   - (0xff < sVar2)),

                          CONCAT11((char)DAT_00833c30,

                                   (0 < sVar1) * (sVar1 < 0x100) * (char)uVar7 - (0xff < sVar1)));

  return;

}





// --- FUN_00653df0 at 0x00653DF0 (size: 3349) ---


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



void FUN_00653df0(undefined1 (*param_1) [16],undefined8 param_2,undefined1 param_3 [16],

                 undefined1 param_4 [16],undefined1 param_5 [16],undefined1 param_6 [16],

                 undefined1 param_7 [16],undefined1 param_8 [16],undefined1 param_9 [16])



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  undefined1 auVar9 [16];

  undefined1 uVar10;

  undefined1 uVar11;

  undefined1 uVar12;

  undefined1 uVar13;

  undefined1 uVar14;

  undefined1 uVar15;

  undefined1 uVar16;

  undefined1 uVar17;

  undefined1 (*pauVar18) [16];

  undefined1 auVar19 [16];

  int iVar20;

  int iVar26;

  int iVar27;

  undefined1 in_XMM1 [16];

  undefined1 auVar21 [16];

  int iVar28;

  undefined1 auVar22 [16];

  undefined1 auVar23 [16];

  undefined1 auVar24 [16];

  undefined1 auVar25 [16];

  undefined1 auVar29 [16];

  undefined1 auVar30 [16];

  undefined1 auVar31 [16];

  undefined1 auVar32 [16];

  undefined1 auVar33 [16];

  undefined1 auVar34 [16];

  int iVar35;

  int iVar37;

  int iVar38;

  undefined1 auVar36 [16];

  int iVar39;

  undefined1 auVar40 [16];

  undefined1 in_XMM5 [16];

  undefined1 auVar41 [16];

  undefined1 auVar42 [16];

  undefined1 auVar43 [16];

  undefined1 auVar44 [16];

  undefined1 auVar45 [16];

  undefined1 auVar46 [16];

  undefined1 auVar47 [16];

  undefined1 auVar48 [16];

  undefined1 auVar49 [16];

  undefined1 auVar50 [16];

  undefined1 auVar51 [16];

  undefined1 auVar52 [16];

  undefined1 auVar53 [16];

  undefined1 auVar54 [16];

  undefined1 auVar55 [16];

  undefined1 auVar56 [16];

  undefined1 auVar57 [16];

  undefined1 auVar58 [16];

  undefined1 auVar59 [16];

  undefined1 auVar60 [16];

  undefined1 auVar61 [16];

  undefined1 auVar62 [16];

  undefined4 unaff_retaddr;

  undefined1 local_80 [128];

  

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  pauVar18 = param_1;

  if (((uint)param_1 & 0xf) != 0) {

    pauVar18 = (undefined1 (*) [16])local_80;

  }

  if (((uint)param_1 & 0xf) == 0) {

    auVar19 = *param_1;

    auVar40 = param_1[4];

    auVar21 = pshuflw(in_XMM1,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833e90,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833eb0,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833ea0);

    auVar19 = pmaddwd(auVar19,_DAT_00833ec0);

    auVar41 = pshuflw(in_XMM5,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833e90,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar59 = pmaddwd(_DAT_00833eb0,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833ea0);

    auVar40 = pmaddwd(auVar40,_DAT_00833ec0);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar30._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar30._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar30._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar30._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar22._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar22._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar22._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar22._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar21 = packssdw(auVar22,auVar30);

    iVar35 = auVar59._0_4_ + auVar40._8_4_;

    iVar37 = auVar59._4_4_ + auVar40._12_4_;

    iVar38 = auVar59._8_4_ + auVar40._0_4_;

    iVar39 = auVar59._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar51._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar51._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar51._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar51._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar42._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar42._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar42._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar42._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar42,auVar51);

    *pauVar18 = auVar21;

    pauVar18[4] = auVar41;

    auVar19 = param_1[1];

    auVar40 = param_1[7];

    auVar21 = pshuflw(auVar21,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833ed0,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833ef0,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833ee0);

    auVar19 = pmaddwd(auVar19,_DAT_00833f00);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833ed0,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar59 = pmaddwd(_DAT_00833ef0,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833ee0);

    auVar40 = pmaddwd(auVar40,_DAT_00833f00);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar31._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar31._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar31._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar31._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar23._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar23._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar23._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar23._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar21 = packssdw(auVar23,auVar31);

    iVar35 = auVar59._0_4_ + auVar40._8_4_;

    iVar37 = auVar59._4_4_ + auVar40._12_4_;

    iVar38 = auVar59._8_4_ + auVar40._0_4_;

    iVar39 = auVar59._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar52._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar52._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar52._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar52._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar43._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar43._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar43._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar43._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar43,auVar52);

    pauVar18[1] = auVar21;

    pauVar18[7] = auVar41;

    auVar19 = param_1[3];

    auVar40 = param_1[5];

    auVar21 = pshuflw(auVar21,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833f50,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833f70,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833f60);

    auVar19 = pmaddwd(auVar19,_DAT_00833f80);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833f50,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar59 = pmaddwd(_DAT_00833f70,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833f60);

    auVar40 = pmaddwd(auVar40,_DAT_00833f80);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar32._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar32._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar32._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar32._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar24._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar24._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar24._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar24._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar21 = packssdw(auVar24,auVar32);

    iVar35 = auVar59._0_4_ + auVar40._8_4_;

    iVar37 = auVar59._4_4_ + auVar40._12_4_;

    iVar38 = auVar59._8_4_ + auVar40._0_4_;

    iVar39 = auVar59._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar53._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar53._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar53._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar53._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar44._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar44._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar44._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar44._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar44,auVar53);

    pauVar18[3] = auVar21;

    pauVar18[5] = auVar41;

    auVar19 = param_1[2];

    auVar40 = param_1[6];

    auVar21 = pshuflw(auVar21,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833f10,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833f30,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833f20);

    auVar19 = pmaddwd(auVar19,_DAT_00833f40);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833f10,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar59 = pmaddwd(_DAT_00833f30,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833f20);

    auVar40 = pmaddwd(auVar40,_DAT_00833f40);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar33._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar33._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar33._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar33._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar25._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar25._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar25._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar25._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar19 = packssdw(auVar25,auVar33);

    iVar35 = auVar59._0_4_ + auVar40._8_4_;

    iVar37 = auVar59._4_4_ + auVar40._12_4_;

    iVar38 = auVar59._8_4_ + auVar40._0_4_;

    iVar39 = auVar59._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar54._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar54._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar54._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar54._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar45._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar45._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar45._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar45._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar40 = packssdw(auVar45,auVar54);

    pauVar18[2] = auVar19;

    pauVar18[6] = auVar40;

  }

  else {

    auVar19 = *param_1;

    auVar40 = param_1[4];

    auVar21._8_8_ = 0;

    auVar21._0_8_ = *(ulonglong *)(param_1[4] + 8);

    auVar21 = pshuflw(auVar21,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833e90,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833eb0,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833ea0);

    auVar19 = pmaddwd(auVar19,_DAT_00833ec0);

    auVar41 = pshuflw(in_XMM5,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833e90,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar59 = pmaddwd(_DAT_00833eb0,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833ea0);

    auVar40 = pmaddwd(auVar40,_DAT_00833ec0);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar60._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar60._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar60._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar60._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar19._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar19._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar19._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar19._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar19 = packssdw(auVar19,auVar60);

    iVar35 = auVar59._0_4_ + auVar40._8_4_;

    iVar37 = auVar59._4_4_ + auVar40._12_4_;

    iVar38 = auVar59._8_4_ + auVar40._0_4_;

    iVar39 = auVar59._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar55._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar55._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar55._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar55._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar46._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar46._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar46._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar46._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar46,auVar55);

    *pauVar18 = auVar19;

    pauVar18[4] = auVar41;

    auVar19 = param_1[1];

    auVar40 = param_1[7];

    auVar29._8_8_ = 0;

    auVar29._0_8_ = *(ulonglong *)(param_1[7] + 8);

    auVar21 = pshuflw(auVar29,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833ed0,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833ef0,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833ee0);

    auVar19 = pmaddwd(auVar19,_DAT_00833f00);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar59 = pmaddwd(_DAT_00833ed0,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar60 = pmaddwd(_DAT_00833ef0,auVar40);

    auVar50 = pmaddwd(auVar41,_DAT_00833ee0);

    auVar41 = pmaddwd(auVar40,_DAT_00833f00);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar61._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar61._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar61._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar61._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar40._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar40._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar40._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar40._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar19 = packssdw(auVar40,auVar61);

    iVar35 = auVar60._0_4_ + auVar41._8_4_;

    iVar37 = auVar60._4_4_ + auVar41._12_4_;

    iVar38 = auVar60._8_4_ + auVar41._0_4_;

    iVar39 = auVar60._12_4_ + auVar41._4_4_;

    iVar20 = auVar50._8_4_ + auVar59._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar50._12_4_ + auVar59._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar50._0_4_ + auVar59._8_4_ + iRam00833bf8;

    iVar28 = auVar50._4_4_ + auVar59._12_4_ + iRam00833bfc;

    auVar56._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar56._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar56._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar56._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar47._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar47._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar47._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar47._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar47,auVar56);

    pauVar18[1] = auVar19;

    pauVar18[7] = auVar41;

    auVar19 = param_1[3];

    auVar40 = param_1[5];

    auVar36._8_8_ = 0;

    auVar36._0_8_ = *(ulonglong *)(param_1[5] + 8);

    auVar21 = pshuflw(auVar36,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833f50,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833f70,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833f60);

    auVar19 = pmaddwd(auVar19,_DAT_00833f80);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar59 = pmaddwd(_DAT_00833f50,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar60 = pmaddwd(_DAT_00833f70,auVar40);

    auVar50 = pmaddwd(auVar41,_DAT_00833f60);

    auVar40 = pmaddwd(auVar40,_DAT_00833f80);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar62._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar62._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar62._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar62._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar41._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar41._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar41._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar41._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar19 = packssdw(auVar41,auVar62);

    iVar35 = auVar60._0_4_ + auVar40._8_4_;

    iVar37 = auVar60._4_4_ + auVar40._12_4_;

    iVar38 = auVar60._8_4_ + auVar40._0_4_;

    iVar39 = auVar60._12_4_ + auVar40._4_4_;

    iVar20 = auVar50._8_4_ + auVar59._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar50._12_4_ + auVar59._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar50._0_4_ + auVar59._8_4_ + iRam00833bf8;

    iVar28 = auVar50._4_4_ + auVar59._12_4_ + iRam00833bfc;

    auVar57._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar57._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar57._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar57._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar48._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar48._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar48._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar48._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar41 = packssdw(auVar48,auVar57);

    pauVar18[3] = auVar19;

    pauVar18[5] = auVar41;

    auVar19 = param_1[2];

    auVar40 = param_1[6];

    auVar50._8_8_ = 0;

    auVar50._0_8_ = *(ulonglong *)(param_1[6] + 8);

    auVar21 = pshuflw(auVar50,auVar19,0x88);

    auVar19 = pshuflw(auVar19,auVar19,0xdd);

    auVar21 = pshufhw(auVar21,auVar21,0x88);

    auVar29 = pmaddwd(_DAT_00833f10,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0xdd);

    auVar36 = pmaddwd(_DAT_00833f30,auVar19);

    auVar21 = pmaddwd(auVar21,_DAT_00833f20);

    auVar19 = pmaddwd(auVar19,_DAT_00833f40);

    auVar41 = pshuflw(auVar41,auVar40,0x88);

    auVar40 = pshuflw(auVar40,auVar40,0xdd);

    auVar41 = pshufhw(auVar41,auVar41,0x88);

    auVar50 = pmaddwd(_DAT_00833f10,auVar41);

    auVar40 = pshufhw(auVar40,auVar40,0xdd);

    auVar60 = pmaddwd(_DAT_00833f30,auVar40);

    auVar41 = pmaddwd(auVar41,_DAT_00833f20);

    auVar40 = pmaddwd(auVar40,_DAT_00833f40);

    iVar35 = auVar36._0_4_ + auVar19._8_4_;

    iVar37 = auVar36._4_4_ + auVar19._12_4_;

    iVar38 = auVar36._8_4_ + auVar19._0_4_;

    iVar39 = auVar36._12_4_ + auVar19._4_4_;

    iVar20 = auVar21._8_4_ + auVar29._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar21._12_4_ + auVar29._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar21._0_4_ + auVar29._8_4_ + iRam00833bf8;

    iVar28 = auVar21._4_4_ + auVar29._12_4_ + iRam00833bfc;

    auVar34._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar34._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar34._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar34._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar59._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar59._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar59._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar59._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar19 = packssdw(auVar59,auVar34);

    iVar35 = auVar60._0_4_ + auVar40._8_4_;

    iVar37 = auVar60._4_4_ + auVar40._12_4_;

    iVar38 = auVar60._8_4_ + auVar40._0_4_;

    iVar39 = auVar60._12_4_ + auVar40._4_4_;

    iVar20 = auVar41._8_4_ + auVar50._0_4_ + (int)DAT_00833bf0;

    iVar26 = auVar41._12_4_ + auVar50._4_4_ + DAT_00833bf0._4_4_;

    iVar27 = auVar41._0_4_ + auVar50._8_4_ + iRam00833bf8;

    iVar28 = auVar41._4_4_ + auVar50._12_4_ + iRam00833bfc;

    auVar58._0_4_ = iVar20 - iVar35 >> 0xc;

    auVar58._4_4_ = iVar26 - iVar37 >> 0xc;

    auVar58._8_4_ = iVar27 - iVar38 >> 0xc;

    auVar58._12_4_ = iVar28 - iVar39 >> 0xc;

    auVar49._0_4_ = iVar20 + iVar35 >> 0xc;

    auVar49._4_4_ = iVar26 + iVar37 >> 0xc;

    auVar49._8_4_ = iVar27 + iVar38 >> 0xc;

    auVar49._12_4_ = iVar28 + iVar39 >> 0xc;

    auVar40 = packssdw(auVar49,auVar58);

    pauVar18[2] = auVar19;

    pauVar18[6] = auVar40;

  }

  if (pauVar18 != (undefined1 (*) [16])&stack0x00000000) {

    auVar19 = pauVar18[5];

    auVar40 = pauVar18[3];

    auVar21 = pmulhw(auVar19,_DAT_00833c60);

    auVar29 = pmulhw(_DAT_00833c60,auVar40);

    auVar36 = pmulhw(pauVar18[7],_DAT_00833c40);

    auVar21 = paddsw(auVar21,auVar19);

    auVar41 = pmulhw(_DAT_00833c40,pauVar18[1]);

    auVar29 = paddsw(auVar29,auVar40);

    auVar40 = paddsw(auVar21,auVar40);

    auVar21 = psubsw(auVar19,auVar29);

    auVar50 = pmulhw(pauVar18[6],_DAT_00833c50);

    auVar29 = pmulhw(_DAT_00833c50,pauVar18[2]);

    auVar41 = psubsw(auVar41,pauVar18[7]);

    auVar36 = paddsw(auVar36,pauVar18[1]);

    auVar19 = paddsw(auVar40,auVar36);

    auVar19 = paddsw(auVar19,_DAT_00833be0);

    auVar40 = psubsw(auVar36,auVar40);

    auVar59 = paddsw(auVar50,pauVar18[2]);

    auVar29 = psubsw(auVar29,pauVar18[6]);

    auVar36 = psubsw(auVar41,auVar21);

    auVar19 = pshufhw(auVar19,auVar19,0x1b);

    auVar50 = paddsw(auVar36,_DAT_00833be0);

    auVar21 = paddsw(auVar41,auVar21);

    pauVar18[7] = auVar19;

    auVar36 = paddsw(auVar40,auVar50);

    auVar19 = pshufhw(auVar21,auVar21,0x1b);

    auVar21 = pmulhw(_DAT_00833c70,auVar36);

    pauVar18[3] = auVar19;

    auVar40 = psubsw(auVar40,auVar50);

    auVar19 = pmulhw(_DAT_00833c70,auVar40);

    auVar21 = paddsw(auVar36,auVar21);

    auVar41 = paddsw(pauVar18[4],*pauVar18);

    auVar50 = psubsw(*pauVar18,pauVar18[4]);

    auVar19 = paddsw(auVar19,auVar40);

    auVar36 = pshufhw(auVar21 | _DAT_00833be0,auVar21 | _DAT_00833be0,0x1b);

    auVar40 = paddsw(auVar41,auVar59);

    auVar40 = paddsw(auVar40,_DAT_00833c00);

    auVar21 = psubsw(auVar41,auVar59);

    auVar59 = paddsw(auVar50,auVar29);

    auVar41 = pshufhw(auVar40,auVar40,0x1b);

    auVar59 = paddsw(auVar59,_DAT_00833c00);

    auVar40 = paddsw(pauVar18[7],auVar41);

    auVar60 = psraw(auVar40,5);

    auVar40 = psubsw(auVar50,auVar29);

    auVar50 = pshufhw(auVar59,auVar59,0x1b);

    auVar21 = paddsw(auVar21,_DAT_00833c10);

    auVar40 = paddsw(auVar40,_DAT_00833c10);

    auVar59 = paddsw(auVar50,auVar36);

    auVar29 = pshufhw(auVar21,auVar21,0x1b);

    auVar21 = paddsw(auVar60,_DAT_00833c20);

    sVar1 = auVar21._0_2_;

    sVar2 = auVar21._2_2_;

    sVar3 = auVar21._4_2_;

    sVar4 = auVar21._6_2_;

    sVar5 = auVar21._8_2_;

    sVar6 = auVar21._10_2_;

    sVar7 = auVar21._12_2_;

    sVar8 = auVar21._14_2_;

    (*pauVar18)[0] = (0 < sVar1) * (sVar1 < 0x100) * auVar21[0] - (0xff < sVar1);

    (*pauVar18)[1] = (undefined1)DAT_00833c30;

    (*pauVar18)[2] = (0 < sVar2) * (sVar2 < 0x100) * auVar21[2] - (0xff < sVar2);

    (*pauVar18)[3] = DAT_00833c30._1_1_;

    (*pauVar18)[4] = (0 < sVar3) * (sVar3 < 0x100) * auVar21[4] - (0xff < sVar3);

    (*pauVar18)[5] = DAT_00833c30._2_1_;

    (*pauVar18)[6] = (0 < sVar4) * (sVar4 < 0x100) * auVar21[6] - (0xff < sVar4);

    (*pauVar18)[7] = DAT_00833c30._3_1_;

    (*pauVar18)[8] = (0 < sVar5) * (sVar5 < 0x100) * auVar21[8] - (0xff < sVar5);

    (*pauVar18)[9] = uRam00833c34;

    (*pauVar18)[10] = (0 < sVar6) * (sVar6 < 0x100) * auVar21[10] - (0xff < sVar6);

    (*pauVar18)[0xb] = uRam00833c35;

    (*pauVar18)[0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar21[0xc] - (0xff < sVar7);

    (*pauVar18)[0xd] = uRam00833c36;

    (*pauVar18)[0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar21[0xe] - (0xff < sVar8);

    (*pauVar18)[0xf] = uRam00833c37;

    auVar59 = psraw(auVar59,5);

    auVar21 = paddsw(auVar40,auVar19 | _DAT_00833be0);

    auVar59 = paddsw(auVar59,_DAT_00833c20);

    sVar1 = auVar59._0_2_;

    sVar2 = auVar59._2_2_;

    sVar3 = auVar59._4_2_;

    sVar4 = auVar59._6_2_;

    sVar5 = auVar59._8_2_;

    sVar6 = auVar59._10_2_;

    sVar7 = auVar59._12_2_;

    sVar8 = auVar59._14_2_;

    pauVar18[1][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar59[0] - (0xff < sVar1);

    pauVar18[1][1] = (undefined1)DAT_00833c30;

    pauVar18[1][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar59[2] - (0xff < sVar2);

    pauVar18[1][3] = DAT_00833c30._1_1_;

    pauVar18[1][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar59[4] - (0xff < sVar3);

    pauVar18[1][5] = DAT_00833c30._2_1_;

    pauVar18[1][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar59[6] - (0xff < sVar4);

    pauVar18[1][7] = DAT_00833c30._3_1_;

    pauVar18[1][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar59[8] - (0xff < sVar5);

    pauVar18[1][9] = uRam00833c34;

    pauVar18[1][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar59[10] - (0xff < sVar6);

    pauVar18[1][0xb] = uRam00833c35;

    pauVar18[1][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar59[0xc] - (0xff < sVar7);

    pauVar18[1][0xd] = uRam00833c36;

    pauVar18[1][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar59[0xe] - (0xff < sVar8);

    pauVar18[1][0xf] = uRam00833c37;

    auVar21 = psraw(auVar21,5);

    auVar59 = psubsw(auVar40,auVar19 | _DAT_00833be0);

    auVar19 = pshufhw(auVar21,auVar21,0x1b);

    auVar21 = paddsw(pauVar18[3],auVar29);

    auVar40 = psubsw(auVar29,pauVar18[3]);

    auVar59 = psraw(auVar59,5);

    auVar19 = paddsw(auVar19,_DAT_00833c20);

    sVar1 = auVar19._0_2_;

    sVar2 = auVar19._2_2_;

    sVar3 = auVar19._4_2_;

    sVar4 = auVar19._6_2_;

    sVar5 = auVar19._8_2_;

    sVar6 = auVar19._10_2_;

    sVar7 = auVar19._12_2_;

    sVar8 = auVar19._14_2_;

    pauVar18[2][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

    pauVar18[2][1] = (undefined1)DAT_00833c30;

    pauVar18[2][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

    pauVar18[2][3] = DAT_00833c30._1_1_;

    pauVar18[2][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

    pauVar18[2][5] = DAT_00833c30._2_1_;

    pauVar18[2][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

    pauVar18[2][7] = DAT_00833c30._3_1_;

    pauVar18[2][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

    pauVar18[2][9] = uRam00833c34;

    pauVar18[2][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

    pauVar18[2][0xb] = uRam00833c35;

    pauVar18[2][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

    pauVar18[2][0xd] = uRam00833c36;

    pauVar18[2][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

    pauVar18[2][0xf] = uRam00833c37;

    auVar29 = psraw(auVar21,5);

    auVar21 = psubsw(auVar41,pauVar18[7]);

    auVar19 = psraw(auVar40,5);

    auVar40 = paddsw(auVar29,_DAT_00833c20);

    sVar1 = auVar40._0_2_;

    sVar2 = auVar40._2_2_;

    sVar3 = auVar40._4_2_;

    sVar4 = auVar40._6_2_;

    sVar5 = auVar40._8_2_;

    sVar6 = auVar40._10_2_;

    sVar7 = auVar40._12_2_;

    sVar8 = auVar40._14_2_;

    pauVar18[3][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar40[0] - (0xff < sVar1);

    pauVar18[3][1] = (undefined1)DAT_00833c30;

    pauVar18[3][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar40[2] - (0xff < sVar2);

    pauVar18[3][3] = DAT_00833c30._1_1_;

    pauVar18[3][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar40[4] - (0xff < sVar3);

    pauVar18[3][5] = DAT_00833c30._2_1_;

    pauVar18[3][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar40[6] - (0xff < sVar4);

    pauVar18[3][7] = DAT_00833c30._3_1_;

    pauVar18[3][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar40[8] - (0xff < sVar5);

    pauVar18[3][9] = uRam00833c34;

    pauVar18[3][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar40[10] - (0xff < sVar6);

    pauVar18[3][0xb] = uRam00833c35;

    pauVar18[3][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar40[0xc] - (0xff < sVar7);

    pauVar18[3][0xd] = uRam00833c36;

    pauVar18[3][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar40[0xe] - (0xff < sVar8);

    pauVar18[3][0xf] = uRam00833c37;

    auVar40 = psubsw(auVar50,auVar36);

    auVar29 = pshufhw(auVar59,auVar59,0x1b);

    auVar19 = paddsw(auVar19,_DAT_00833c20);

    sVar1 = auVar19._0_2_;

    sVar2 = auVar19._2_2_;

    sVar3 = auVar19._4_2_;

    sVar4 = auVar19._6_2_;

    sVar5 = auVar19._8_2_;

    sVar6 = auVar19._10_2_;

    sVar7 = auVar19._12_2_;

    sVar8 = auVar19._14_2_;

    pauVar18[4][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

    pauVar18[4][1] = (undefined1)DAT_00833c30;

    pauVar18[4][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

    pauVar18[4][3] = DAT_00833c30._1_1_;

    pauVar18[4][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

    pauVar18[4][5] = DAT_00833c30._2_1_;

    pauVar18[4][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

    pauVar18[4][7] = DAT_00833c30._3_1_;

    pauVar18[4][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

    pauVar18[4][9] = uRam00833c34;

    pauVar18[4][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

    pauVar18[4][0xb] = uRam00833c35;

    pauVar18[4][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

    pauVar18[4][0xd] = uRam00833c36;

    pauVar18[4][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

    pauVar18[4][0xf] = uRam00833c37;

    auVar19 = psraw(auVar40,5);

    auVar40 = paddsw(auVar29,_DAT_00833c20);

    sVar1 = auVar40._0_2_;

    sVar2 = auVar40._2_2_;

    sVar3 = auVar40._4_2_;

    sVar4 = auVar40._6_2_;

    sVar5 = auVar40._8_2_;

    sVar6 = auVar40._10_2_;

    sVar7 = auVar40._12_2_;

    sVar8 = auVar40._14_2_;

    pauVar18[5][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar40[0] - (0xff < sVar1);

    pauVar18[5][1] = (undefined1)DAT_00833c30;

    pauVar18[5][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar40[2] - (0xff < sVar2);

    pauVar18[5][3] = DAT_00833c30._1_1_;

    pauVar18[5][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar40[4] - (0xff < sVar3);

    pauVar18[5][5] = DAT_00833c30._2_1_;

    pauVar18[5][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar40[6] - (0xff < sVar4);

    pauVar18[5][7] = DAT_00833c30._3_1_;

    pauVar18[5][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar40[8] - (0xff < sVar5);

    pauVar18[5][9] = uRam00833c34;

    pauVar18[5][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar40[10] - (0xff < sVar6);

    pauVar18[5][0xb] = uRam00833c35;

    pauVar18[5][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar40[0xc] - (0xff < sVar7);

    pauVar18[5][0xd] = uRam00833c36;

    pauVar18[5][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar40[0xe] - (0xff < sVar8);

    pauVar18[5][0xf] = uRam00833c37;

    auVar40 = psraw(auVar21,5);

    auVar19 = paddsw(auVar19,_DAT_00833c20);

    sVar1 = auVar19._0_2_;

    sVar2 = auVar19._2_2_;

    sVar3 = auVar19._4_2_;

    sVar4 = auVar19._6_2_;

    sVar5 = auVar19._8_2_;

    sVar6 = auVar19._10_2_;

    sVar7 = auVar19._12_2_;

    sVar8 = auVar19._14_2_;

    pauVar18[6][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

    pauVar18[6][1] = (undefined1)DAT_00833c30;

    pauVar18[6][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

    pauVar18[6][3] = DAT_00833c30._1_1_;

    pauVar18[6][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

    pauVar18[6][5] = DAT_00833c30._2_1_;

    pauVar18[6][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

    pauVar18[6][7] = DAT_00833c30._3_1_;

    pauVar18[6][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

    pauVar18[6][9] = uRam00833c34;

    pauVar18[6][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

    pauVar18[6][0xb] = uRam00833c35;

    pauVar18[6][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

    pauVar18[6][0xd] = uRam00833c36;

    pauVar18[6][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

    pauVar18[6][0xf] = uRam00833c37;

    auVar19 = paddsw(auVar40,_DAT_00833c20);

    sVar1 = auVar19._0_2_;

    sVar2 = auVar19._2_2_;

    sVar3 = auVar19._4_2_;

    sVar4 = auVar19._6_2_;

    sVar5 = auVar19._8_2_;

    sVar6 = auVar19._10_2_;

    sVar7 = auVar19._12_2_;

    sVar8 = auVar19._14_2_;

    pauVar18[7][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

    pauVar18[7][1] = (undefined1)DAT_00833c30;

    pauVar18[7][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

    pauVar18[7][3] = DAT_00833c30._1_1_;

    pauVar18[7][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

    pauVar18[7][5] = DAT_00833c30._2_1_;

    pauVar18[7][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

    pauVar18[7][7] = DAT_00833c30._3_1_;

    pauVar18[7][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

    pauVar18[7][9] = uRam00833c34;

    pauVar18[7][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

    pauVar18[7][0xb] = uRam00833c35;

    pauVar18[7][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

    pauVar18[7][0xd] = uRam00833c36;

    pauVar18[7][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

    pauVar18[7][0xf] = uRam00833c37;

    return;

  }

  auVar19 = pmulhw(param_7,_DAT_00833c60);

  auVar40 = pmulhw(_DAT_00833c60,param_5);

  auVar36 = pmulhw(param_9,_DAT_00833c40);

  auVar19 = paddsw(auVar19,param_7);

  auVar41 = pmulhw(_DAT_00833c40,param_3);

  auVar40 = paddsw(auVar40,param_5);

  auVar19 = paddsw(auVar19,param_5);

  auVar21 = psubsw(param_7,auVar40);

  auVar59 = pmulhw(param_8,_DAT_00833c50);

  auVar29 = pmulhw(_DAT_00833c50,param_4);

  auVar50 = psubsw(auVar41,param_9);

  auVar36 = paddsw(auVar36,param_3);

  auVar40 = paddsw(auVar19,auVar36);

  auVar40 = paddsw(auVar40,_DAT_00833be0);

  auVar41 = psubsw(auVar36,auVar19);

  auVar61 = paddsw(auVar59,param_4);

  auVar36 = psubsw(auVar29,param_8);

  auVar29 = psubsw(auVar50,auVar21);

  auVar19 = pshufhw(auVar40,auVar40,0x1b);

  auVar40 = paddsw(auVar29,_DAT_00833be0);

  auVar21 = paddsw(auVar50,auVar21);

  auVar50 = paddsw(auVar41,auVar40);

  auVar59 = pshufhw(auVar21,auVar21,0x1b);

  auVar29 = pmulhw(_DAT_00833c70,auVar50);

  auVar21 = psubsw(auVar41,auVar40);

  auVar9._4_4_ = param_1;

  auVar9._0_4_ = unaff_retaddr;

  auVar9._8_8_ = param_2;

  auVar40 = pmulhw(_DAT_00833c70,auVar21);

  auVar29 = paddsw(auVar50,auVar29);

  auVar50 = paddsw(param_6,auVar9);

  auVar60 = psubsw(auVar9,param_6);

  auVar40 = paddsw(auVar40,auVar21);

  auVar41 = pshufhw(auVar29 | _DAT_00833be0,auVar29 | _DAT_00833be0,0x1b);

  auVar40 = auVar40 | _DAT_00833be0;

  auVar21 = paddsw(auVar50,auVar61);

  auVar21 = paddsw(auVar21,_DAT_00833c00);

  auVar29 = psubsw(auVar50,auVar61);

  auVar61 = paddsw(auVar60,auVar36);

  auVar50 = pshufhw(auVar21,auVar21,0x1b);

  auVar61 = paddsw(auVar61,_DAT_00833c00);

  auVar21 = paddsw(auVar19,auVar50);

  auVar62 = psraw(auVar21,5);

  auVar21 = psubsw(auVar60,auVar36);

  auVar60 = pshufhw(auVar61,auVar61,0x1b);

  auVar29 = paddsw(auVar29,_DAT_00833c10);

  auVar21 = paddsw(auVar21,_DAT_00833c10);

  auVar61 = paddsw(auVar60,auVar41);

  auVar36 = pshufhw(auVar29,auVar29,0x1b);

  auVar29 = paddsw(auVar62,_DAT_00833c20);

  sVar1 = auVar29._0_2_;

  sVar2 = auVar29._2_2_;

  sVar3 = auVar29._4_2_;

  sVar4 = auVar29._6_2_;

  sVar5 = auVar29._8_2_;

  sVar6 = auVar29._10_2_;

  sVar7 = auVar29._12_2_;

  sVar8 = auVar29._14_2_;

  (*param_1)[0] = (0 < sVar1) * (sVar1 < 0x100) * auVar29[0] - (0xff < sVar1);

  (*param_1)[1] = uVar10;

  (*param_1)[2] = (0 < sVar2) * (sVar2 < 0x100) * auVar29[2] - (0xff < sVar2);

  (*param_1)[3] = uVar11;

  (*param_1)[4] = (0 < sVar3) * (sVar3 < 0x100) * auVar29[4] - (0xff < sVar3);

  (*param_1)[5] = uVar12;

  (*param_1)[6] = (0 < sVar4) * (sVar4 < 0x100) * auVar29[6] - (0xff < sVar4);

  (*param_1)[7] = uVar13;

  (*param_1)[8] = (0 < sVar5) * (sVar5 < 0x100) * auVar29[8] - (0xff < sVar5);

  (*param_1)[9] = uVar14;

  (*param_1)[10] = (0 < sVar6) * (sVar6 < 0x100) * auVar29[10] - (0xff < sVar6);

  (*param_1)[0xb] = uVar15;

  (*param_1)[0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar29[0xc] - (0xff < sVar7);

  (*param_1)[0xd] = uVar16;

  (*param_1)[0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar29[0xe] - (0xff < sVar8);

  (*param_1)[0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar61 = psraw(auVar61,5);

  auVar29 = paddsw(auVar21,auVar40);

  auVar61 = paddsw(auVar61,_DAT_00833c20);

  sVar1 = auVar61._0_2_;

  sVar2 = auVar61._2_2_;

  sVar3 = auVar61._4_2_;

  sVar4 = auVar61._6_2_;

  sVar5 = auVar61._8_2_;

  sVar6 = auVar61._10_2_;

  sVar7 = auVar61._12_2_;

  sVar8 = auVar61._14_2_;

  param_1[1][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar61[0] - (0xff < sVar1);

  param_1[1][1] = uVar10;

  param_1[1][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar61[2] - (0xff < sVar2);

  param_1[1][3] = uVar11;

  param_1[1][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar61[4] - (0xff < sVar3);

  param_1[1][5] = uVar12;

  param_1[1][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar61[6] - (0xff < sVar4);

  param_1[1][7] = uVar13;

  param_1[1][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar61[8] - (0xff < sVar5);

  param_1[1][9] = uVar14;

  param_1[1][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar61[10] - (0xff < sVar6);

  param_1[1][0xb] = uVar15;

  param_1[1][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar61[0xc] - (0xff < sVar7);

  param_1[1][0xd] = uVar16;

  param_1[1][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar61[0xe] - (0xff < sVar8);

  param_1[1][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar29 = psraw(auVar29,5);

  auVar61 = psubsw(auVar21,auVar40);

  auVar40 = pshufhw(auVar29,auVar29,0x1b);

  auVar29 = paddsw(auVar59,auVar36);

  auVar21 = psubsw(auVar36,auVar59);

  auVar36 = psraw(auVar61,5);

  auVar40 = paddsw(auVar40,_DAT_00833c20);

  sVar1 = auVar40._0_2_;

  sVar2 = auVar40._2_2_;

  sVar3 = auVar40._4_2_;

  sVar4 = auVar40._6_2_;

  sVar5 = auVar40._8_2_;

  sVar6 = auVar40._10_2_;

  sVar7 = auVar40._12_2_;

  sVar8 = auVar40._14_2_;

  param_1[2][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar40[0] - (0xff < sVar1);

  param_1[2][1] = uVar10;

  param_1[2][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar40[2] - (0xff < sVar2);

  param_1[2][3] = uVar11;

  param_1[2][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar40[4] - (0xff < sVar3);

  param_1[2][5] = uVar12;

  param_1[2][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar40[6] - (0xff < sVar4);

  param_1[2][7] = uVar13;

  param_1[2][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar40[8] - (0xff < sVar5);

  param_1[2][9] = uVar14;

  param_1[2][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar40[10] - (0xff < sVar6);

  param_1[2][0xb] = uVar15;

  param_1[2][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar40[0xc] - (0xff < sVar7);

  param_1[2][0xd] = uVar16;

  param_1[2][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar40[0xe] - (0xff < sVar8);

  param_1[2][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar40 = psraw(auVar29,5);

  auVar29 = psubsw(auVar50,auVar19);

  auVar19 = psraw(auVar21,5);

  auVar40 = paddsw(auVar40,_DAT_00833c20);

  sVar1 = auVar40._0_2_;

  sVar2 = auVar40._2_2_;

  sVar3 = auVar40._4_2_;

  sVar4 = auVar40._6_2_;

  sVar5 = auVar40._8_2_;

  sVar6 = auVar40._10_2_;

  sVar7 = auVar40._12_2_;

  sVar8 = auVar40._14_2_;

  param_1[3][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar40[0] - (0xff < sVar1);

  param_1[3][1] = uVar10;

  param_1[3][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar40[2] - (0xff < sVar2);

  param_1[3][3] = uVar11;

  param_1[3][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar40[4] - (0xff < sVar3);

  param_1[3][5] = uVar12;

  param_1[3][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar40[6] - (0xff < sVar4);

  param_1[3][7] = uVar13;

  param_1[3][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar40[8] - (0xff < sVar5);

  param_1[3][9] = uVar14;

  param_1[3][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar40[10] - (0xff < sVar6);

  param_1[3][0xb] = uVar15;

  param_1[3][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar40[0xc] - (0xff < sVar7);

  param_1[3][0xd] = uVar16;

  param_1[3][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar40[0xe] - (0xff < sVar8);

  param_1[3][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar40 = psubsw(auVar60,auVar41);

  auVar21 = pshufhw(auVar36,auVar36,0x1b);

  auVar19 = paddsw(auVar19,_DAT_00833c20);

  sVar1 = auVar19._0_2_;

  sVar2 = auVar19._2_2_;

  sVar3 = auVar19._4_2_;

  sVar4 = auVar19._6_2_;

  sVar5 = auVar19._8_2_;

  sVar6 = auVar19._10_2_;

  sVar7 = auVar19._12_2_;

  sVar8 = auVar19._14_2_;

  param_1[4][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

  param_1[4][1] = uVar10;

  param_1[4][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

  param_1[4][3] = uVar11;

  param_1[4][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

  param_1[4][5] = uVar12;

  param_1[4][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

  param_1[4][7] = uVar13;

  param_1[4][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

  param_1[4][9] = uVar14;

  param_1[4][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

  param_1[4][0xb] = uVar15;

  param_1[4][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

  param_1[4][0xd] = uVar16;

  param_1[4][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

  param_1[4][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar19 = psraw(auVar40,5);

  auVar40 = paddsw(auVar21,_DAT_00833c20);

  sVar1 = auVar40._0_2_;

  sVar2 = auVar40._2_2_;

  sVar3 = auVar40._4_2_;

  sVar4 = auVar40._6_2_;

  sVar5 = auVar40._8_2_;

  sVar6 = auVar40._10_2_;

  sVar7 = auVar40._12_2_;

  sVar8 = auVar40._14_2_;

  param_1[5][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar40[0] - (0xff < sVar1);

  param_1[5][1] = uVar10;

  param_1[5][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar40[2] - (0xff < sVar2);

  param_1[5][3] = uVar11;

  param_1[5][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar40[4] - (0xff < sVar3);

  param_1[5][5] = uVar12;

  param_1[5][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar40[6] - (0xff < sVar4);

  param_1[5][7] = uVar13;

  param_1[5][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar40[8] - (0xff < sVar5);

  param_1[5][9] = uVar14;

  param_1[5][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar40[10] - (0xff < sVar6);

  param_1[5][0xb] = uVar15;

  param_1[5][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar40[0xc] - (0xff < sVar7);

  param_1[5][0xd] = uVar16;

  param_1[5][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar40[0xe] - (0xff < sVar8);

  param_1[5][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar40 = psraw(auVar29,5);

  auVar19 = paddsw(auVar19,_DAT_00833c20);

  sVar1 = auVar19._0_2_;

  sVar2 = auVar19._2_2_;

  sVar3 = auVar19._4_2_;

  sVar4 = auVar19._6_2_;

  sVar5 = auVar19._8_2_;

  sVar6 = auVar19._10_2_;

  sVar7 = auVar19._12_2_;

  sVar8 = auVar19._14_2_;

  param_1[6][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

  param_1[6][1] = uVar10;

  param_1[6][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

  param_1[6][3] = uVar11;

  param_1[6][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

  param_1[6][5] = uVar12;

  param_1[6][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

  param_1[6][7] = uVar13;

  param_1[6][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

  param_1[6][9] = uVar14;

  param_1[6][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

  param_1[6][0xb] = uVar15;

  param_1[6][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

  param_1[6][0xd] = uVar16;

  param_1[6][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

  param_1[6][0xf] = uVar17;

  uVar17 = uRam00833c37;

  uVar16 = uRam00833c36;

  uVar15 = uRam00833c35;

  uVar14 = uRam00833c34;

  uVar13 = DAT_00833c30._3_1_;

  uVar12 = DAT_00833c30._2_1_;

  uVar11 = DAT_00833c30._1_1_;

  uVar10 = (undefined1)DAT_00833c30;

  auVar19 = paddsw(auVar40,_DAT_00833c20);

  sVar1 = auVar19._0_2_;

  sVar2 = auVar19._2_2_;

  sVar3 = auVar19._4_2_;

  sVar4 = auVar19._6_2_;

  sVar5 = auVar19._8_2_;

  sVar6 = auVar19._10_2_;

  sVar7 = auVar19._12_2_;

  sVar8 = auVar19._14_2_;

  param_1[7][0] = (0 < sVar1) * (sVar1 < 0x100) * auVar19[0] - (0xff < sVar1);

  param_1[7][1] = uVar10;

  param_1[7][2] = (0 < sVar2) * (sVar2 < 0x100) * auVar19[2] - (0xff < sVar2);

  param_1[7][3] = uVar11;

  param_1[7][4] = (0 < sVar3) * (sVar3 < 0x100) * auVar19[4] - (0xff < sVar3);

  param_1[7][5] = uVar12;

  param_1[7][6] = (0 < sVar4) * (sVar4 < 0x100) * auVar19[6] - (0xff < sVar4);

  param_1[7][7] = uVar13;

  param_1[7][8] = (0 < sVar5) * (sVar5 < 0x100) * auVar19[8] - (0xff < sVar5);

  param_1[7][9] = uVar14;

  param_1[7][10] = (0 < sVar6) * (sVar6 < 0x100) * auVar19[10] - (0xff < sVar6);

  param_1[7][0xb] = uVar15;

  param_1[7][0xc] = (0 < sVar7) * (sVar7 < 0x100) * auVar19[0xc] - (0xff < sVar7);

  param_1[7][0xd] = uVar16;

  param_1[7][0xe] = (0 < sVar8) * (sVar8 < 0x100) * auVar19[0xe] - (0xff < sVar8);

  param_1[7][0xf] = uVar17;

  return;

}





// --- FUN_00654b10 at 0x00654B10 (size: 123) ---


longlong __fastcall

FUN_00654b10(undefined4 param_1,uint param_2,longlong *param_3,int param_4,int param_5)



{

  bool bVar1;

  char cVar2;

  char *pcVar3;

  char *pcVar4;

  int iVar5;

  int iVar6;

  longlong lVar7;

  

  pcVar4 = *(char **)(param_3 + 2);

  if (*(int *)((int)param_3 + 0xc) != 0) {

    lVar7 = *param_3;

    pcVar3 = pcVar4;

    iVar5 = *(int *)((int)param_3 + 0xc);

    do {

      cVar2 = (char)((ulonglong)lVar7 >> 0x38);

      *pcVar3 = cVar2;

      pcVar4 = pcVar3 + 1;

      if (cVar2 == -1) {

        *pcVar4 = '\0';

        *(int *)((int)param_3 + 0x1c) = *(int *)((int)param_3 + 0x1c) + 1;

        pcVar4 = pcVar3 + 2;

      }

      *(int *)((int)param_3 + 0x1c) = *(int *)((int)param_3 + 0x1c) + 1;

      lVar7 = lVar7 << 8;

      iVar6 = iVar5 + -8;

      bVar1 = 7 < iVar5;

      pcVar3 = pcVar4;

      iVar5 = iVar6;

    } while (iVar6 != 0 && bVar1);

    *(undefined4 *)((int)param_3 + 0xc) = 0;

    *param_3 = 0;

  }

  iVar5 = 0;

  if (param_4 == 0) {

    *(char **)(param_3 + 2) = pcVar4;

  }

  else {

    do {

      pcVar3 = (char *)(iVar5 + param_4);

      iVar5 = iVar5 + 1;

      *pcVar4 = *pcVar3;

      pcVar4 = pcVar4 + 1;

    } while (iVar5 != param_5);

  }

  *(char **)(param_3 + 2) = pcVar4;

  return (ulonglong)param_2 << 0x20;

}





// --- FUN_00654b90 at 0x00654B90 (size: 627) ---


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



undefined8 __fastcall

FUN_00654b90(undefined4 param_1,undefined4 param_2,uint param_3,int param_4,ulonglong *param_5)



{

  uint uVar1;

  undefined4 uVar2;

  uint uVar3;

  uint *puVar4;

  uint *puVar5;

  char cVar6;

  char cVar8;

  char cVar9;

  byte bVar10;

  undefined8 uVar7;

  ulonglong uVar11;

  ulonglong uVar12;

  

  param_4 = param_4 + *(int *)((int)param_5 + 0xc);

  *(int *)((int)param_5 + 0xc) = param_4;

  uVar2 = 0;

  uVar12 = *param_5 | (ulonglong)param_3 << (ulonglong)(0x40 - param_4);

  if (0x20 < param_4) {

    uVar2 = 0xffffffe4;

    puVar4 = *(uint **)(param_5 + 2);

    if (3 < (uint)((int)param_5[3] - (int)*(uint **)(param_5 + 2))) {

      do {

        while( true ) {

          *(int *)((int)param_5 + 0x1c) = *(int *)((int)param_5 + 0x1c) + 4;

          cVar6 = (char)(uVar12 >> 0x20);

          cVar8 = (char)(uVar12 >> 0x28);

          cVar9 = (char)(uVar12 >> 0x30);

          bVar10 = (byte)(uVar12 >> 0x38);

          puVar5 = puVar4 + 1;

          uVar3 = CONCAT13(-(bVar10 == 0xff),

                           CONCAT12(-(cVar9 == -1),CONCAT11(-(cVar8 == -1),-(cVar6 == -1))));

          if (uVar3 == 0) {

            param_4 = param_4 + -0x20;

            uVar7 = CONCAT44((int)CONCAT11(cVar9,bVar10),(int)CONCAT11(cVar6,cVar8));

            uVar7 = packssdw(uVar7,uVar7);

            uVar12 = uVar12 << 0x20;

            *puVar4 = CONCAT22((short)uVar7,(short)((ulonglong)uVar7 >> 0x10));

            goto LAB_00654df1;

          }

          uVar3 = uVar3 >> 8;

          if (0xfeffff < uVar3) break;

          uVar1 = (uint)(uVar12 >> 0x20);

          if (uVar3 < 0xff00) {

            if (uVar3 == 0) {

              uVar7 = CONCAT44((int)CONCAT11(cVar9,bVar10),(int)CONCAT11(cVar6,cVar8));

              uVar7 = packssdw(uVar7,uVar7);

              uVar12 = (uVar12 << 0x20) >> 8;

              *puVar4 = CONCAT22((short)uVar7,(short)((ulonglong)uVar7 >> 0x10));

              goto joined_r0x00654ca0;

            }

            param_4 = param_4 + -0x18;

            uVar12 = uVar12 << 0x18;

            *puVar4 = (uint)((ulonglong)(DAT_00833f98 << 0x18) >> 0x10) | (uint)bVar10 |

                      uVar1 >> 8 & (uint)DAT_00833f98;

          }

          else if (uVar3 == 0xffff) {

            uVar12 = (uVar12 << 0x18) >> 8;

            param_4 = param_4 + -0x10;

            *puVar4 = (uint)bVar10 | (uint)_DAT_00833fa8;

          }

          else {

            uVar12 = uVar12 << 0x18;

            param_4 = param_4 + -0x18;

            *puVar4 = (uint)bVar10 | (uVar1 >> 8) << 0x18 | (uint)DAT_00833f98;

          }

joined_r0x00654ca0:

          puVar4 = puVar5;

          if (param_4 < 0x20) goto LAB_00654df1;

        }

        if (uVar3 == 0xff0000) {

          uVar12 = uVar12 << 0x18;

          *puVar4 = (uint)CONCAT11(cVar8,cVar9) << 0x10 | (uint)_DAT_00833f90;

joined_r0x00654ca0:

          param_4 = param_4 + -0x18;

          goto joined_r0x00654ca0;

        }

        if (uVar3 == 0xffff00) {

          uVar12 = uVar12 << 0x10;

          param_4 = param_4 + -0x10;

          *puVar4 = (uint)DAT_00833fa0;

          goto joined_r0x00654ca0;

        }

        uVar11 = uVar12 >> 0x30;

        param_4 = param_4 + -0x10;

        uVar12 = (uVar12 << 0x18) >> 8;

        *puVar4 = (uint)(uVar11 << 0x10) | (uint)_DAT_00833f90;

        puVar4 = puVar5;

      } while (0x1f < param_4);

LAB_00654df1:

      uVar2 = 0;

      *(uint **)(param_5 + 2) = puVar5;

      *(int *)((int)param_5 + 0xc) = param_4;

    }

  }

  *param_5 = uVar12;

  return CONCAT44(param_2,uVar2);

}





// --- FUN_00654e10 at 0x00654E10 (size: 646) ---


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



undefined8 __fastcall

FUN_00654e10(undefined4 param_1,undefined4 param_2,uint param_3,int param_4,ulonglong *param_5)



{

  uint uVar1;

  byte bVar2;

  int iVar3;

  uint uVar4;

  ulonglong *puVar5;

  ulonglong *puVar6;

  char cVar7;

  char cVar9;

  char cVar10;

  char cVar11;

  ulonglong extraout_MM0;

  undefined8 uVar8;

  char cVar12;

  char extraout_MM1_Ba;

  char cVar13;

  char extraout_MM1_Bb;

  char cVar14;

  char extraout_MM1_Bc;

  char cVar15;

  char extraout_MM1_Bd;

  undefined1 uVar16;

  undefined1 uVar17;

  ulonglong uVar18;

  ulonglong uVar19;

  

  param_4 = param_4 + *(int *)((int)param_5 + 0xc);

  cVar12 = -1;

  cVar13 = -1;

  cVar14 = -1;

  cVar15 = -1;

  *(int *)((int)param_5 + 0xc) = param_4;

  uVar18 = *param_5 | (ulonglong)param_3 << (ulonglong)(0x40 - param_4);

  if (0x20 < param_4) {

    puVar5 = *(ulonglong **)(param_5 + 2);

    uVar19 = uVar18;

    if ((int)param_5[3] - (int)*(ulonglong **)(param_5 + 2) < 0x17) {

      iVar3 = FUN_00622a10(param_5);

      uVar18 = uVar19;

      if (iVar3 != 0) goto LAB_0065508c;

      *(ulonglong **)(param_5 + 3) = param_5 + 0x208;

      puVar5 = param_5 + 8;

      uVar18 = extraout_MM0;

      cVar12 = extraout_MM1_Ba;

      cVar13 = extraout_MM1_Bb;

      cVar14 = extraout_MM1_Bc;

      cVar15 = extraout_MM1_Bd;

    }

    do {

      while( true ) {

        *(int *)((int)param_5 + 0x1c) = *(int *)((int)param_5 + 0x1c) + 4;

        cVar7 = (char)(uVar18 >> 0x20);

        cVar9 = (char)(uVar18 >> 0x28);

        cVar10 = (char)(uVar18 >> 0x30);

        cVar11 = (char)(uVar18 >> 0x38);

        puVar6 = (ulonglong *)((int)puVar5 + 4);

        uVar4 = CONCAT13(-(cVar15 == cVar11),

                         CONCAT12(-(cVar14 == cVar10),

                                  CONCAT11(-(cVar13 == cVar9),-(cVar12 == cVar7))));

        if (uVar4 == 0) {

          param_4 = param_4 + -0x20;

          uVar8 = CONCAT44((int)CONCAT11(cVar10,cVar11),(int)CONCAT11(cVar7,cVar9));

          uVar8 = packssdw(uVar8,uVar8);

          uVar18 = uVar19 << 0x20;

          *(uint *)puVar5 = CONCAT22((short)uVar8,(short)((ulonglong)uVar8 >> 0x10));

          goto LAB_00655084;

        }

        uVar4 = uVar4 >> 8;

        uVar16 = (undefined1)(uVar19 >> 0x30);

        uVar17 = (undefined1)(uVar19 >> 0x28);

        if (0xfeffff < uVar4) break;

        uVar1 = (uint)(uVar19 >> 0x20);

        bVar2 = (byte)(uVar19 >> 0x38);

        if (uVar4 < 0xff00) {

          if (uVar4 == 0) {

            uVar8 = CONCAT44((int)CONCAT11(uVar16,bVar2),

                             (int)CONCAT11((char)(uVar19 >> 0x20),uVar17));

            uVar8 = packssdw(uVar8,uVar8);

            uVar18 = (uVar19 << 0x20) >> 8;

            *(uint *)puVar5 = CONCAT22((short)uVar8,(short)((ulonglong)uVar8 >> 0x10));

            goto joined_r0x00654f33;

          }

          param_4 = param_4 + -0x18;

          uVar18 = uVar19 << 0x18;

          *(uint *)puVar5 =

               (uint)((ulonglong)(DAT_00833f98 << 0x18) >> 0x10) | (uint)bVar2 |

               uVar1 >> 8 & (uint)DAT_00833f98;

        }

        else if (uVar4 == 0xffff) {

          uVar18 = (uVar19 << 0x18) >> 8;

          param_4 = param_4 + -0x10;

          *(uint *)puVar5 = (uint)bVar2 | (uint)_DAT_00833fa8;

        }

        else {

          uVar18 = uVar19 << 0x18;

          param_4 = param_4 + -0x18;

          *(uint *)puVar5 = (uint)bVar2 | (uVar1 >> 8) << 0x18 | (uint)DAT_00833f98;

        }

joined_r0x00654f33:

        cVar15 = -1;

        cVar14 = -1;

        cVar13 = -1;

        cVar12 = -1;

        puVar5 = puVar6;

        uVar19 = uVar18;

        if (param_4 < 0x20) goto LAB_00655084;

      }

      if (uVar4 == 0xff0000) {

        uVar18 = uVar19 << 0x18;

        *(uint *)puVar5 = (uint)CONCAT11(uVar17,uVar16) << 0x10 | (uint)_DAT_00833f90;

joined_r0x00654f33:

        param_4 = param_4 + -0x18;

        goto joined_r0x00654f33;

      }

      if (uVar4 == 0xffff00) {

        uVar18 = uVar19 << 0x10;

        param_4 = param_4 + -0x10;

        *(int *)puVar5 = (int)DAT_00833fa0;

        goto joined_r0x00654f33;

      }

      param_4 = param_4 + -0x10;

      uVar18 = (uVar19 << 0x18) >> 8;

      *(uint *)puVar5 = (uint)((uVar19 >> 0x30) << 0x10) | (uint)_DAT_00833f90;

      cVar12 = -1;

      cVar13 = -1;

      cVar14 = -1;

      cVar15 = -1;

      puVar5 = puVar6;

      uVar19 = uVar18;

    } while (0x1f < param_4);

LAB_00655084:

    *(ulonglong **)(param_5 + 2) = puVar6;

    *(int *)((int)param_5 + 0xc) = param_4;

  }

  iVar3 = 0;

LAB_0065508c:

  *param_5 = uVar18;

  return CONCAT44(param_2,iVar3);

}





// --- FUN_006550a0 at 0x006550A0 (size: 707) ---


undefined8 __fastcall

FUN_006550a0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6,undefined8 *param_7)



{

  int iVar1;

  int iVar2;

  undefined4 in_EAX;

  int iVar3;

  ulonglong uVar4;

  undefined8 uVar5;

  undefined2 uVar6;

  undefined8 uVar8;

  undefined8 uVar9;

  undefined8 uVar10;

  undefined8 uVar11;

  undefined8 uVar12;

  undefined8 uVar13;

  undefined8 uVar14;

  ulonglong uVar7;

  

  iVar3 = 8;

  do {

    uVar5 = *param_3;

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar5 = pmaddwd(uVar4,DAT_00833fb0);

    uVar8 = pmaddwd(uVar7,DAT_00833fb0);

    uVar9 = pmaddwd(uVar4,DAT_00833fb8);

    uVar10 = pmaddwd(uVar7,DAT_00833fb8);

    uVar11 = pmaddwd(uVar4,DAT_00833fc0);

    iVar2 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar12 = pmaddwd(uVar7,DAT_00833fc0);

    uVar5 = CONCAT44(((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20)) - iVar2 >> 8,

                     ((int)uVar5 + (int)((ulonglong)uVar5 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar8 = packssdw(uVar5,uVar5);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) + (int)uVar11 + iVar1 >> 8,

                     (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9 + (int)DAT_00833fe8 >> 8);

    uVar10 = CONCAT44((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12 + iVar1 >> 8,

                      (int)((ulonglong)uVar10 >> 0x20) + (int)uVar10 + (int)DAT_00833fe8 >> 8);

    uVar9 = packssdw(uVar5,uVar5);

    uVar10 = packssdw(uVar10,uVar10);

    uVar5 = *(undefined8 *)((int)param_3 + 6);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar12 = pmaddwd(uVar4,DAT_00833fb0);

    uVar13 = pmaddwd(uVar7,DAT_00833fb0);

    uVar5 = pmaddwd(uVar4,DAT_00833fb8);

    uVar11 = pmaddwd(uVar7,DAT_00833fb8);

    uVar12 = CONCAT44(((int)((ulonglong)uVar13 >> 0x20) + (int)uVar13) - iVar2 >> 8,

                      ((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12) - (int)DAT_00833fe0 >> 8);

    uVar12 = packssdw(uVar12,uVar12);

    uVar13 = pmaddwd(uVar4,DAT_00833fc0);

    uVar14 = pmaddwd(uVar7,DAT_00833fc0);

    *param_5 = CONCAT44((int)uVar12,(int)uVar8);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar1 >> 8,

                     (int)uVar5 + (int)((ulonglong)uVar5 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar8 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar1 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar5 = packssdw(uVar5,uVar5);

    uVar8 = packssdw(uVar8,uVar8);

    *param_6 = CONCAT44(CONCAT22((short)uVar8,(short)uVar5),CONCAT22((short)uVar10,(short)uVar9));

    *param_7 = CONCAT44(CONCAT22((short)((ulonglong)uVar8 >> 0x10),(short)((ulonglong)uVar5 >> 0x10)

                                ),

                        CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                 (short)((ulonglong)uVar9 >> 0x10)));

    uVar5 = *(undefined8 *)((int)param_3 + 0xc);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar5 = pmaddwd(uVar4,DAT_00833fb0);

    uVar8 = pmaddwd(uVar7,DAT_00833fb0);

    uVar9 = pmaddwd(uVar4,DAT_00833fb8);

    uVar10 = pmaddwd(uVar7,DAT_00833fb8);

    uVar11 = pmaddwd(uVar4,DAT_00833fc0);

    iVar2 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar12 = pmaddwd(uVar7,DAT_00833fc0);

    uVar5 = CONCAT44(((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20)) - iVar2 >> 8,

                     ((int)uVar5 + (int)((ulonglong)uVar5 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar8 = packssdw(uVar5,uVar5);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar9 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) + (int)uVar11 + iVar1 >> 8,

                     (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9 + (int)DAT_00833fe8 >> 8);

    uVar5 = CONCAT44((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12 + iVar1 >> 8,

                     (int)((ulonglong)uVar10 >> 0x20) + (int)uVar10 + (int)DAT_00833fe8 >> 8);

    uVar10 = packssdw(uVar9,uVar9);

    uVar9 = packssdw(uVar5,uVar5);

    uVar5 = *(undefined8 *)((int)param_3 + 0x12);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar12 = pmaddwd(uVar4,DAT_00833fb0);

    uVar13 = pmaddwd(uVar7,DAT_00833fb0);

    uVar5 = pmaddwd(uVar4,DAT_00833fb8);

    uVar11 = pmaddwd(uVar7,DAT_00833fb8);

    uVar12 = CONCAT44(((int)((ulonglong)uVar13 >> 0x20) + (int)uVar13) - iVar2 >> 8,

                      ((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12) - (int)DAT_00833fe0 >> 8);

    uVar12 = packssdw(uVar12,uVar12);

    uVar13 = pmaddwd(uVar4,DAT_00833fc0);

    uVar14 = pmaddwd(uVar7,DAT_00833fc0);

    param_5[1] = CONCAT44((int)uVar12,(int)uVar8);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar1 >> 8,

                     (int)uVar5 + (int)((ulonglong)uVar5 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar8 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar1 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar5 = packssdw(uVar5,uVar5);

    uVar8 = packssdw(uVar8,uVar8);

    param_5 = param_5 + 2;

    param_6[1] = CONCAT44(CONCAT22((short)uVar8,(short)uVar5),CONCAT22((short)uVar9,(short)uVar10));

    param_7[1] = CONCAT44(CONCAT22((short)((ulonglong)uVar8 >> 0x10),

                                   (short)((ulonglong)uVar5 >> 0x10)),

                          CONCAT22((short)((ulonglong)uVar9 >> 0x10),

                                   (short)((ulonglong)uVar10 >> 0x10)));

    param_6 = param_6 + 2;

    param_7 = param_7 + 2;

    param_3 = (undefined8 *)((int)param_3 + param_4);

    iVar3 = iVar3 + -1;

  } while (iVar3 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00655370 at 0x00655370 (size: 707) ---


undefined8 __fastcall

FUN_00655370(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6,undefined8 *param_7)



{

  int iVar1;

  int iVar2;

  undefined4 in_EAX;

  int iVar3;

  ulonglong uVar4;

  undefined8 uVar5;

  undefined2 uVar6;

  undefined8 uVar8;

  undefined8 uVar9;

  undefined8 uVar10;

  undefined8 uVar11;

  undefined8 uVar12;

  undefined8 uVar13;

  undefined8 uVar14;

  ulonglong uVar7;

  

  iVar3 = 8;

  do {

    uVar5 = *param_3;

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar5 = pmaddwd(uVar4,DAT_00833fc8);

    uVar8 = pmaddwd(uVar7,DAT_00833fc8);

    uVar9 = pmaddwd(uVar4,DAT_00833fd0);

    uVar10 = pmaddwd(uVar7,DAT_00833fd0);

    uVar11 = pmaddwd(uVar4,DAT_00833fd8);

    iVar2 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar12 = pmaddwd(uVar7,DAT_00833fd8);

    uVar5 = CONCAT44(((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20)) - iVar2 >> 8,

                     ((int)uVar5 + (int)((ulonglong)uVar5 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar8 = packssdw(uVar5,uVar5);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) + (int)uVar11 + iVar1 >> 8,

                     (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9 + (int)DAT_00833fe8 >> 8);

    uVar10 = CONCAT44((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12 + iVar1 >> 8,

                      (int)((ulonglong)uVar10 >> 0x20) + (int)uVar10 + (int)DAT_00833fe8 >> 8);

    uVar9 = packssdw(uVar5,uVar5);

    uVar10 = packssdw(uVar10,uVar10);

    uVar5 = *(undefined8 *)((int)param_3 + 6);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar12 = pmaddwd(uVar4,DAT_00833fc8);

    uVar13 = pmaddwd(uVar7,DAT_00833fc8);

    uVar5 = pmaddwd(uVar4,DAT_00833fd0);

    uVar11 = pmaddwd(uVar7,DAT_00833fd0);

    uVar12 = CONCAT44(((int)((ulonglong)uVar13 >> 0x20) + (int)uVar13) - iVar2 >> 8,

                      ((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12) - (int)DAT_00833fe0 >> 8);

    uVar12 = packssdw(uVar12,uVar12);

    uVar13 = pmaddwd(uVar4,DAT_00833fd8);

    uVar14 = pmaddwd(uVar7,DAT_00833fd8);

    *param_5 = CONCAT44((int)uVar12,(int)uVar8);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar1 >> 8,

                     (int)uVar5 + (int)((ulonglong)uVar5 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar8 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar1 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar5 = packssdw(uVar5,uVar5);

    uVar8 = packssdw(uVar8,uVar8);

    *param_6 = CONCAT44(CONCAT22((short)uVar8,(short)uVar5),CONCAT22((short)uVar10,(short)uVar9));

    *param_7 = CONCAT44(CONCAT22((short)((ulonglong)uVar8 >> 0x10),(short)((ulonglong)uVar5 >> 0x10)

                                ),

                        CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                 (short)((ulonglong)uVar9 >> 0x10)));

    uVar5 = *(undefined8 *)((int)param_3 + 0xc);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar5 = pmaddwd(uVar4,DAT_00833fc8);

    uVar8 = pmaddwd(uVar7,DAT_00833fc8);

    uVar9 = pmaddwd(uVar4,DAT_00833fd0);

    uVar10 = pmaddwd(uVar7,DAT_00833fd0);

    uVar11 = pmaddwd(uVar4,DAT_00833fd8);

    iVar2 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar12 = pmaddwd(uVar7,DAT_00833fd8);

    uVar5 = CONCAT44(((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20)) - iVar2 >> 8,

                     ((int)uVar5 + (int)((ulonglong)uVar5 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar8 = packssdw(uVar5,uVar5);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar9 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) + (int)uVar11 + iVar1 >> 8,

                     (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9 + (int)DAT_00833fe8 >> 8);

    uVar5 = CONCAT44((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12 + iVar1 >> 8,

                     (int)((ulonglong)uVar10 >> 0x20) + (int)uVar10 + (int)DAT_00833fe8 >> 8);

    uVar10 = packssdw(uVar9,uVar9);

    uVar9 = packssdw(uVar5,uVar5);

    uVar5 = *(undefined8 *)((int)param_3 + 0x12);

    uVar4 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar5 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar5 >> 8)),(ushort)(byte)uVar5);

    uVar6 = (undefined2)((ulonglong)uVar5 >> 0x18);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar5

                                                                                  >> 0x30) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar5 >> 0x28)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar5 >> 0x20),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar12 = pmaddwd(uVar4,DAT_00833fc8);

    uVar13 = pmaddwd(uVar7,DAT_00833fc8);

    uVar5 = pmaddwd(uVar4,DAT_00833fd0);

    uVar11 = pmaddwd(uVar7,DAT_00833fd0);

    uVar12 = CONCAT44(((int)((ulonglong)uVar13 >> 0x20) + (int)uVar13) - iVar2 >> 8,

                      ((int)((ulonglong)uVar12 >> 0x20) + (int)uVar12) - (int)DAT_00833fe0 >> 8);

    uVar12 = packssdw(uVar12,uVar12);

    uVar13 = pmaddwd(uVar4,DAT_00833fd8);

    uVar14 = pmaddwd(uVar7,DAT_00833fd8);

    param_5[1] = CONCAT44((int)uVar12,(int)uVar8);

    iVar1 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar5 = CONCAT44((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar1 >> 8,

                     (int)uVar5 + (int)((ulonglong)uVar5 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar8 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar1 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + (int)DAT_00833fe8 >> 8);

    uVar5 = packssdw(uVar5,uVar5);

    uVar8 = packssdw(uVar8,uVar8);

    param_5 = param_5 + 2;

    param_6[1] = CONCAT44(CONCAT22((short)uVar8,(short)uVar5),CONCAT22((short)uVar9,(short)uVar10));

    param_7[1] = CONCAT44(CONCAT22((short)((ulonglong)uVar8 >> 0x10),

                                   (short)((ulonglong)uVar5 >> 0x10)),

                          CONCAT22((short)((ulonglong)uVar9 >> 0x10),

                                   (short)((ulonglong)uVar10 >> 0x10)));

    param_6 = param_6 + 2;

    param_7 = param_7 + 2;

    param_3 = (undefined8 *)((int)param_3 + param_4);

    iVar3 = iVar3 + -1;

  } while (iVar3 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00655640 at 0x00655640 (size: 828) ---


undefined8 __fastcall

FUN_00655640(undefined4 param_1,undefined4 param_2,ulonglong *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6,undefined8 *param_7)



{

  ulonglong uVar1;

  int iVar2;

  undefined4 in_EAX;

  int iVar3;

  undefined8 uVar4;

  ulonglong uVar5;

  undefined2 uVar6;

  ulonglong uVar7;

  undefined8 uVar8;

  ulonglong uVar9;

  undefined8 uVar10;

  undefined8 uVar11;

  int iVar12;

  undefined8 uVar13;

  undefined8 uVar14;

  

  iVar3 = 8;

  do {

    uVar4 = DAT_00834008;

    uVar1 = *param_3;

    uVar5 = param_3[1];

    uVar7 = uVar1 & DAT_00834010;

    uVar9 = uVar5 & DAT_00834010;

    iVar12 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar8 = CONCAT44((uint)(byte)(uVar7 >> 0x38) - iVar12,(int)(uVar7 >> 0x18) - (int)DAT_00833fe8);

    uVar10 = CONCAT44((uint)(byte)(uVar9 >> 0x38) - iVar12,(int)(uVar9 >> 0x18) - (int)DAT_00833fe8)

    ;

    uVar8 = packssdw(uVar8,uVar8);

    uVar10 = packssdw(uVar10,uVar10);

    param_5[0x30] = CONCAT44((int)uVar10,(int)uVar8);

    uVar10 = DAT_00833fc0;

    uVar8 = DAT_00833fb8;

    uVar13 = psubusb(uVar4,uVar1);

    uVar4 = psubusb(uVar4,uVar5);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar13

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar13 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar13 >> 8),(short)uVar13)) >> 0x10

                           ),(short)uVar13) & 0xffff00ff00ff00ff;

    uVar6 = (undefined2)((ulonglong)uVar13 >> 0x20);

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar13

                                                                                  >> 0x38) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar13 >> 0x30)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar13 >> 0x28),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar1 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar4 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar4 >> 8)),(ushort)(byte)uVar4);

    uVar6 = (undefined2)((ulonglong)uVar4 >> 0x20);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4

                                                                                  >> 0x38) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar4 >> 0x30)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar4 >> 0x28),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar14 = pmaddwd(uVar9,DAT_00833fb0);

    uVar13 = pmaddwd(uVar5,DAT_00833fb0);

    uVar4 = pmaddwd(uVar1,DAT_00833fb0);

    uVar11 = pmaddwd(uVar7,DAT_00833fb0);

    iVar12 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar13 = CONCAT44(((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20)) - iVar12 >> 8,

                      ((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar4 = CONCAT44(((int)uVar11 + (int)((ulonglong)uVar11 >> 0x20)) - iVar12 >> 8,

                     ((int)uVar4 + (int)((ulonglong)uVar4 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar13 = packssdw(uVar13,uVar13);

    uVar4 = packssdw(uVar4,uVar4);

    *param_5 = CONCAT44((int)uVar4,(int)uVar13);

    uVar4 = pmaddwd(uVar9,uVar8);

    uVar13 = pmaddwd(uVar5,uVar8);

    uVar11 = pmaddwd(uVar9,uVar10);

    uVar14 = pmaddwd(uVar5,uVar10);

    iVar12 = (int)DAT_00833fe8;

    iVar2 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar4 = CONCAT44((int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + iVar2 >> 8,

                     (int)uVar4 + (int)((ulonglong)uVar4 >> 0x20) + iVar12 >> 8);

    uVar13 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar2 >> 8,

                      (int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar12 >> 8);

    uVar4 = packssdw(uVar4,uVar4);

    uVar13 = packssdw(uVar13,uVar13);

    uVar11 = pmaddwd(uVar1,uVar8);

    uVar14 = pmaddwd(uVar7,uVar8);

    uVar8 = pmaddwd(uVar1,uVar10);

    uVar10 = pmaddwd(uVar7,uVar10);

    uVar8 = CONCAT44((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20) + iVar2 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + iVar12 >> 8);

    uVar10 = CONCAT44((int)uVar10 + (int)((ulonglong)uVar10 >> 0x20) + iVar2 >> 8,

                      (int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar12 >> 8);

    uVar8 = packssdw(uVar8,uVar8);

    uVar10 = packssdw(uVar10,uVar10);

    *param_6 = CONCAT44(CONCAT22((short)uVar10,(short)uVar8),CONCAT22((short)uVar13,(short)uVar4));

    *param_7 = CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                 (short)((ulonglong)uVar8 >> 0x10)),

                        CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                 (short)((ulonglong)uVar4 >> 0x10)));

    uVar4 = DAT_00834008;

    uVar1 = param_3[2];

    uVar5 = param_3[3];

    uVar7 = uVar1 & DAT_00834010;

    uVar9 = uVar5 & DAT_00834010;

    iVar12 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar8 = CONCAT44((uint)(byte)(uVar7 >> 0x38) - iVar12,(int)(uVar7 >> 0x18) - (int)DAT_00833fe8);

    uVar10 = CONCAT44((uint)(byte)(uVar9 >> 0x38) - iVar12,(int)(uVar9 >> 0x18) - (int)DAT_00833fe8)

    ;

    uVar8 = packssdw(uVar8,uVar8);

    uVar10 = packssdw(uVar10,uVar10);

    param_5[0x31] = CONCAT44((int)uVar10,(int)uVar8);

    uVar10 = DAT_00833fc0;

    uVar8 = DAT_00833fb8;

    uVar13 = psubusb(uVar4,uVar1);

    uVar4 = psubusb(uVar4,uVar5);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar13

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar13 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar13 >> 8),(short)uVar13)) >> 0x10

                           ),(short)uVar13) & 0xffff00ff00ff00ff;

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar4 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar4 >> 8),(short)uVar4)) >> 0x10),

                     (short)uVar4) & 0xffff00ff00ff00ff;

    uVar1 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar13 >>

                                                                           0x38) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar13 >> 0x30)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar13 >> 0x28)),

                     (ushort)(byte)((ulonglong)uVar13 >> 0x20));

    uVar6 = (undefined2)((ulonglong)uVar4 >> 0x20);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4

                                                                                  >> 0x38) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar4 >> 0x30)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar4 >> 0x28),uVar6)) >> 0x10),

                     uVar6) & 0xffffffff00ff00ff;

    uVar14 = pmaddwd(uVar9,DAT_00833fb0);

    uVar13 = pmaddwd(uVar1,DAT_00833fb0);

    uVar4 = pmaddwd(uVar5,DAT_00833fb0);

    uVar11 = pmaddwd(uVar7,DAT_00833fb0);

    iVar12 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar13 = CONCAT44(((int)uVar13 + (int)((ulonglong)uVar13 >> 0x20)) - iVar12 >> 8,

                      ((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar4 = CONCAT44(((int)uVar11 + (int)((ulonglong)uVar11 >> 0x20)) - iVar12 >> 8,

                     ((int)uVar4 + (int)((ulonglong)uVar4 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar13 = packssdw(uVar13,uVar13);

    uVar4 = packssdw(uVar4,uVar4);

    param_5[1] = CONCAT44((int)uVar4,(int)uVar13);

    uVar4 = pmaddwd(uVar9,uVar8);

    uVar13 = pmaddwd(uVar1,uVar8);

    uVar11 = pmaddwd(uVar9,uVar10);

    uVar14 = pmaddwd(uVar1,uVar10);

    iVar12 = (int)DAT_00833fe8;

    iVar2 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar4 = CONCAT44((int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + iVar2 >> 8,

                     (int)uVar4 + (int)((ulonglong)uVar4 >> 0x20) + iVar12 >> 8);

    uVar13 = CONCAT44((int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar2 >> 8,

                      (int)uVar13 + (int)((ulonglong)uVar13 >> 0x20) + iVar12 >> 8);

    uVar4 = packssdw(uVar4,uVar4);

    uVar13 = packssdw(uVar13,uVar13);

    uVar11 = pmaddwd(uVar5,uVar8);

    uVar14 = pmaddwd(uVar7,uVar8);

    uVar8 = pmaddwd(uVar5,uVar10);

    uVar10 = pmaddwd(uVar7,uVar10);

    uVar8 = CONCAT44((int)uVar8 + (int)((ulonglong)uVar8 >> 0x20) + iVar2 >> 8,

                     (int)uVar11 + (int)((ulonglong)uVar11 >> 0x20) + iVar12 >> 8);

    uVar10 = CONCAT44((int)uVar10 + (int)((ulonglong)uVar10 >> 0x20) + iVar2 >> 8,

                      (int)uVar14 + (int)((ulonglong)uVar14 >> 0x20) + iVar12 >> 8);

    uVar8 = packssdw(uVar8,uVar8);

    uVar10 = packssdw(uVar10,uVar10);

    param_5 = param_5 + 2;

    param_3 = (ulonglong *)((int)param_3 + param_4);

    param_6[1] = CONCAT44(CONCAT22((short)uVar10,(short)uVar8),CONCAT22((short)uVar13,(short)uVar4))

    ;

    param_7[1] = CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                   (short)((ulonglong)uVar8 >> 0x10)),

                          CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                   (short)((ulonglong)uVar4 >> 0x10)));

    param_6 = param_6 + 2;

    param_7 = param_7 + 2;

    iVar3 = iVar3 + -1;

  } while (iVar3 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00655980 at 0x00655980 (size: 966) ---


undefined8 __fastcall

FUN_00655980(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6,undefined8 *param_7)



{

  int iVar1;

  ushort uVar2;

  ushort uVar3;

  ushort uVar4;

  ushort uVar5;

  undefined7 uVar6;

  undefined7 uVar7;

  uint3 uVar8;

  undefined5 uVar9;

  uint3 uVar10;

  uint3 uVar11;

  undefined5 uVar12;

  uint3 uVar13;

  undefined4 in_EAX;

  int iVar14;

  byte bVar16;

  undefined8 uVar15;

  undefined8 uVar17;

  ushort uVar18;

  undefined8 uVar19;

  undefined8 uVar20;

  ushort uVar21;

  undefined8 uVar22;

  undefined8 uVar23;

  undefined8 uVar24;

  undefined8 uVar25;

  undefined8 uVar26;

  undefined8 uVar27;

  

  iVar14 = 8;

  do {

    uVar17 = *param_3;

    uVar15 = *(undefined8 *)((int)param_3 + 6);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar18 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar18));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar21 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar21));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fb0);

    uVar19 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar20 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fb0);

    uVar24 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar18 & 0xff) + (uVar21 & 0xff))));

    uVar22 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar22 + (int)((ulonglong)uVar22 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar23 = pmaddwd(uVar20,DAT_00833fb8);

    uVar15 = packssdw(uVar15,uVar15);

    uVar25 = pmaddwd(uVar24,DAT_00833fb8);

    uVar19 = pmaddwd(uVar20,DAT_00833fc0);

    uVar22 = pmaddwd(uVar24,DAT_00833fc0);

    *param_5 = CONCAT44((int)uVar15,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = *(undefined8 *)((int)param_3 + 0xc);

    uVar15 = *(undefined8 *)((int)param_3 + 0x12);

    uVar22 = CONCAT44((int)((ulonglong)uVar22 >> 0x20) + (int)uVar22 + iVar1 >> 9,

                      (int)((ulonglong)uVar25 >> 0x20) + (int)uVar25 + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) + (int)uVar19 + iVar1 >> 9,

                      (int)((ulonglong)uVar23 >> 0x20) + (int)uVar23 + (int)DAT_00833ff0 >> 9);

    uVar19 = packssdw(uVar19,uVar19);

    uVar22 = packssdw(uVar22,uVar22);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar21 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar21));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar18 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar18));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fb0);

    uVar20 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar24 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fb0);

    uVar26 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar21 & 0xff) + (uVar18 & 0xff))));

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar20 + (int)((ulonglong)uVar20 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar25 = pmaddwd(uVar24,DAT_00833fb8);

    uVar20 = packssdw(uVar15,uVar15);

    uVar27 = pmaddwd(uVar26,DAT_00833fb8);

    uVar15 = pmaddwd(uVar24,DAT_00833fc0);

    uVar23 = pmaddwd(uVar26,DAT_00833fc0);

    param_5[1] = CONCAT44((int)uVar20,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = CONCAT44((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20) + iVar1 >> 9,

                      (int)uVar25 + (int)((ulonglong)uVar25 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar15 = CONCAT44((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + iVar1 >> 9,

                      (int)uVar27 + (int)((ulonglong)uVar27 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar17 = packssdw(uVar17,uVar17);

    uVar15 = packssdw(uVar15,uVar15);

    *param_6 = CONCAT44(CONCAT22((short)uVar15,(short)uVar17),CONCAT22((short)uVar22,(short)uVar19))

    ;

    *param_7 = CONCAT44(CONCAT22((short)((ulonglong)uVar15 >> 0x10),

                                 (short)((ulonglong)uVar17 >> 0x10)),

                        CONCAT22((short)((ulonglong)uVar22 >> 0x10),

                                 (short)((ulonglong)uVar19 >> 0x10)));

    uVar17 = *(undefined8 *)((int)param_3 + 0x1e);

    uVar15 = param_3[3];

    bVar16 = (byte)((ulonglong)uVar15 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar15 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar15 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar17 >> 0x10));

    uVar18 = (ushort)uVar17;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar17 >> 8),uVar18));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar15 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar15 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar17 >> 0x28));

    uVar21 = (ushort)((ulonglong)uVar17 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar17 >> 0x20),uVar21));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar15),DAT_00833fb0);

    uVar19 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar20 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar15 + (ushort)bVar16)));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fb0);

    uVar24 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar18 & 0xff) + (uVar21 & 0xff))));

    uVar22 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar22 + (int)((ulonglong)uVar22 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar23 = pmaddwd(uVar20,DAT_00833fb8);

    uVar15 = packssdw(uVar15,uVar15);

    uVar25 = pmaddwd(uVar24,DAT_00833fb8);

    uVar19 = pmaddwd(uVar20,DAT_00833fc0);

    uVar22 = pmaddwd(uVar24,DAT_00833fc0);

    param_5[0x10] = CONCAT44((int)uVar15,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = *(undefined8 *)((int)param_3 + 0x24);

    uVar15 = *(undefined8 *)((int)param_3 + 0x2a);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) + (int)uVar19 + iVar1 >> 9,

                      (int)((ulonglong)uVar23 >> 0x20) + (int)uVar23 + (int)DAT_00833ff0 >> 9);

    uVar22 = CONCAT44((int)((ulonglong)uVar22 >> 0x20) + (int)uVar22 + iVar1 >> 9,

                      (int)((ulonglong)uVar25 >> 0x20) + (int)uVar25 + (int)DAT_00833ff0 >> 9);

    uVar19 = packssdw(uVar19,uVar19);

    uVar22 = packssdw(uVar22,uVar22);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar21 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar21));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar18 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar18));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fb0);

    uVar20 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar24 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fb0);

    uVar26 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar21 & 0xff) + (uVar18 & 0xff))));

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar20 + (int)((ulonglong)uVar20 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar25 = pmaddwd(uVar24,DAT_00833fb8);

    uVar20 = packssdw(uVar15,uVar15);

    uVar27 = pmaddwd(uVar26,DAT_00833fb8);

    uVar15 = pmaddwd(uVar24,DAT_00833fc0);

    uVar23 = pmaddwd(uVar26,DAT_00833fc0);

    param_3 = (undefined8 *)((int)param_3 + param_4);

    param_5[0x11] = CONCAT44((int)uVar20,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = CONCAT44((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20) + iVar1 >> 9,

                      (int)uVar25 + (int)((ulonglong)uVar25 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar15 = CONCAT44((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + iVar1 >> 9,

                      (int)uVar27 + (int)((ulonglong)uVar27 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar17 = packssdw(uVar17,uVar17);

    uVar15 = packssdw(uVar15,uVar15);

    param_5 = param_5 + 2;

    param_6[1] = CONCAT44(CONCAT22((short)uVar15,(short)uVar17),

                          CONCAT22((short)uVar22,(short)uVar19));

    param_7[1] = CONCAT44(CONCAT22((short)((ulonglong)uVar15 >> 0x10),

                                   (short)((ulonglong)uVar17 >> 0x10)),

                          CONCAT22((short)((ulonglong)uVar22 >> 0x10),

                                   (short)((ulonglong)uVar19 >> 0x10)));

    iVar14 = iVar14 + -1;

    param_6 = param_6 + 2;

    param_7 = param_7 + 2;

  } while (iVar14 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00655d50 at 0x00655D50 (size: 966) ---


undefined8 __fastcall

FUN_00655d50(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6,undefined8 *param_7)



{

  int iVar1;

  ushort uVar2;

  ushort uVar3;

  ushort uVar4;

  ushort uVar5;

  undefined7 uVar6;

  undefined7 uVar7;

  uint3 uVar8;

  undefined5 uVar9;

  uint3 uVar10;

  uint3 uVar11;

  undefined5 uVar12;

  uint3 uVar13;

  undefined4 in_EAX;

  int iVar14;

  byte bVar16;

  undefined8 uVar15;

  undefined8 uVar17;

  ushort uVar18;

  undefined8 uVar19;

  undefined8 uVar20;

  ushort uVar21;

  undefined8 uVar22;

  undefined8 uVar23;

  undefined8 uVar24;

  undefined8 uVar25;

  undefined8 uVar26;

  undefined8 uVar27;

  

  iVar14 = 8;

  do {

    uVar17 = *param_3;

    uVar15 = *(undefined8 *)((int)param_3 + 6);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar18 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar18));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar21 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar21));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fc8);

    uVar19 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    uVar20 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fc8);

    uVar24 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar18 & 0xff) + (uVar21 & 0xff))));

    uVar22 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar22 + (int)((ulonglong)uVar22 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar23 = pmaddwd(uVar20,DAT_00833fd0);

    uVar15 = packssdw(uVar15,uVar15);

    uVar25 = pmaddwd(uVar24,DAT_00833fd0);

    uVar19 = pmaddwd(uVar20,DAT_00833fd8);

    uVar22 = pmaddwd(uVar24,DAT_00833fd8);

    *param_5 = CONCAT44((int)uVar15,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = *(undefined8 *)((int)param_3 + 0xc);

    uVar15 = *(undefined8 *)((int)param_3 + 0x12);

    uVar22 = CONCAT44((int)((ulonglong)uVar22 >> 0x20) + (int)uVar22 + iVar1 >> 9,

                      (int)((ulonglong)uVar25 >> 0x20) + (int)uVar25 + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) + (int)uVar19 + iVar1 >> 9,

                      (int)((ulonglong)uVar23 >> 0x20) + (int)uVar23 + (int)DAT_00833ff0 >> 9);

    uVar19 = packssdw(uVar19,uVar19);

    uVar22 = packssdw(uVar22,uVar22);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar21 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar21));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar18 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar18));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fc8);

    uVar20 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    uVar24 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fc8);

    uVar26 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar21 & 0xff) + (uVar18 & 0xff))));

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar20 + (int)((ulonglong)uVar20 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar25 = pmaddwd(uVar24,DAT_00833fd0);

    uVar20 = packssdw(uVar15,uVar15);

    uVar27 = pmaddwd(uVar26,DAT_00833fd0);

    uVar15 = pmaddwd(uVar24,DAT_00833fd8);

    uVar23 = pmaddwd(uVar26,DAT_00833fd8);

    param_5[1] = CONCAT44((int)uVar20,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = CONCAT44((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20) + iVar1 >> 9,

                      (int)uVar25 + (int)((ulonglong)uVar25 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar15 = CONCAT44((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + iVar1 >> 9,

                      (int)uVar27 + (int)((ulonglong)uVar27 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar17 = packssdw(uVar17,uVar17);

    uVar15 = packssdw(uVar15,uVar15);

    *param_6 = CONCAT44(CONCAT22((short)uVar15,(short)uVar17),CONCAT22((short)uVar22,(short)uVar19))

    ;

    *param_7 = CONCAT44(CONCAT22((short)((ulonglong)uVar15 >> 0x10),

                                 (short)((ulonglong)uVar17 >> 0x10)),

                        CONCAT22((short)((ulonglong)uVar22 >> 0x10),

                                 (short)((ulonglong)uVar19 >> 0x10)));

    uVar17 = *(undefined8 *)((int)param_3 + 0x1e);

    uVar15 = param_3[3];

    bVar16 = (byte)((ulonglong)uVar15 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar15 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar15 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar17 >> 0x10));

    uVar18 = (ushort)uVar17;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar17 >> 8),uVar18));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar15 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar15 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar17 >> 0x28));

    uVar21 = (ushort)((ulonglong)uVar17 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar17 >> 0x20),uVar21));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar15),DAT_00833fc8);

    uVar19 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    uVar20 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar15 + (ushort)bVar16)));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fc8);

    uVar24 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar18 & 0xff) + (uVar21 & 0xff))));

    uVar22 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar22 + (int)((ulonglong)uVar22 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar23 = pmaddwd(uVar20,DAT_00833fd0);

    uVar15 = packssdw(uVar15,uVar15);

    uVar25 = pmaddwd(uVar24,DAT_00833fd0);

    uVar19 = pmaddwd(uVar20,DAT_00833fd8);

    uVar22 = pmaddwd(uVar24,DAT_00833fd8);

    param_5[0x10] = CONCAT44((int)uVar15,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = *(undefined8 *)((int)param_3 + 0x24);

    uVar15 = *(undefined8 *)((int)param_3 + 0x2a);

    uVar22 = CONCAT44((int)((ulonglong)uVar22 >> 0x20) + (int)uVar22 + iVar1 >> 9,

                      (int)((ulonglong)uVar25 >> 0x20) + (int)uVar25 + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) + (int)uVar19 + iVar1 >> 9,

                      (int)((ulonglong)uVar23 >> 0x20) + (int)uVar23 + (int)DAT_00833ff0 >> 9);

    uVar19 = packssdw(uVar19,uVar19);

    uVar22 = packssdw(uVar22,uVar22);

    bVar16 = (byte)((ulonglong)uVar17 >> 0x18);

    uVar5 = (ushort)(((uint7)bVar16 << 0x30) >> 0x28);

    uVar8 = CONCAT21(uVar5,(char)((ulonglong)uVar17 >> 0x10));

    uVar9 = CONCAT41((int)(((uint7)uVar8 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar15 >> 0x10));

    uVar21 = (ushort)uVar15;

    uVar7 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 8),uVar21));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar17 >> 0x30) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar17 >> 0x28));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar17 >> 0x20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar15 >> 0x30) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar15 >> 0x28));

    uVar18 = (ushort)((ulonglong)uVar15 >> 0x18);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar15 >> 0x20),uVar18));

    uVar15 = pmaddwd((ulonglong)CONCAT52(uVar9,(ushort)(byte)uVar17),DAT_00833fc8);

    uVar20 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar21) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    uVar24 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar8 + (short)uVar11,

                               CONCAT22((short)uVar9 + (short)uVar12,

                                        (ushort)(byte)uVar17 + (ushort)bVar16)));

    uVar17 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)bVar16),DAT_00833fc8);

    uVar26 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar21 & 0xff) + (uVar18 & 0xff))));

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar18) & 0xffffffffffff00ff,

                     DAT_00833fc8);

    iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar17 = CONCAT44(((int)uVar17 + (int)((ulonglong)uVar17 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar15 = CONCAT44(((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - iVar1 >> 8,

                      ((int)uVar20 + (int)((ulonglong)uVar20 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar17 = packssdw(uVar17,uVar17);

    uVar25 = pmaddwd(uVar24,DAT_00833fd0);

    uVar20 = packssdw(uVar15,uVar15);

    uVar27 = pmaddwd(uVar26,DAT_00833fd0);

    uVar15 = pmaddwd(uVar24,DAT_00833fd8);

    uVar23 = pmaddwd(uVar26,DAT_00833fd8);

    param_3 = (undefined8 *)((int)param_3 + param_4);

    param_5[0x11] = CONCAT44((int)uVar20,(int)uVar17);

    iVar1 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar17 = CONCAT44((int)uVar15 + (int)((ulonglong)uVar15 >> 0x20) + iVar1 >> 9,

                      (int)uVar25 + (int)((ulonglong)uVar25 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar15 = CONCAT44((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + iVar1 >> 9,

                      (int)uVar27 + (int)((ulonglong)uVar27 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar17 = packssdw(uVar17,uVar17);

    uVar15 = packssdw(uVar15,uVar15);

    param_5 = param_5 + 2;

    param_6[1] = CONCAT44(CONCAT22((short)uVar15,(short)uVar17),

                          CONCAT22((short)uVar22,(short)uVar19));

    param_7[1] = CONCAT44(CONCAT22((short)((ulonglong)uVar15 >> 0x10),

                                   (short)((ulonglong)uVar17 >> 0x10)),

                          CONCAT22((short)((ulonglong)uVar22 >> 0x10),

                                   (short)((ulonglong)uVar19 >> 0x10)));

    iVar14 = iVar14 + -1;

    param_6 = param_6 + 2;

    param_7 = param_7 + 2;

  } while (iVar14 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00656120 at 0x00656120 (size: 1279) ---


undefined8 __fastcall

FUN_00656120(undefined4 param_1,undefined4 param_2,ulonglong *param_3,int param_4,

            undefined8 *param_5,undefined4 *param_6,undefined4 *param_7,undefined8 *param_8)



{

  ulonglong uVar1;

  ushort uVar2;

  ushort uVar3;

  ushort uVar4;

  ushort uVar5;

  undefined7 uVar6;

  undefined7 uVar7;

  undefined7 uVar8;

  uint3 uVar9;

  uint3 uVar10;

  uint3 uVar11;

  undefined5 uVar12;

  uint3 uVar13;

  undefined4 in_EAX;

  int iVar14;

  ushort uVar15;

  undefined8 uVar16;

  ushort uVar17;

  ulonglong uVar18;

  undefined8 uVar19;

  ushort uVar20;

  ulonglong uVar21;

  ulonglong uVar22;

  undefined8 uVar23;

  undefined8 uVar24;

  undefined8 uVar25;

  int iVar26;

  int iVar27;

  ushort uVar28;

  undefined8 uVar29;

  undefined8 uVar30;

  undefined8 uVar31;

  

  iVar14 = 8;

  do {

    uVar16 = DAT_00834008;

    uVar1 = param_3[1];

    uVar18 = *param_3 & DAT_00834010;

    uVar22 = uVar1 & DAT_00834010;

    iVar26 = (int)((ulonglong)DAT_00833fe8 >> 0x20);

    uVar19 = CONCAT44((uint)(byte)(uVar18 >> 0x38) - iVar26,

                      (int)(uVar18 >> 0x18) - (int)DAT_00833fe8);

    uVar23 = CONCAT44((uint)(byte)(uVar22 >> 0x38) - iVar26,

                      (int)(uVar22 >> 0x18) - (int)DAT_00833fe8);

    uVar19 = packssdw(uVar19,uVar19);

    uVar23 = packssdw(uVar23,uVar23);

    uVar29 = psubusb(DAT_00834008,*param_3);

    *param_8 = CONCAT44((int)uVar23,(int)uVar19);

    uVar16 = psubusb(uVar16,uVar1);

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar29 >> 0x18) << 0x30) >> 0x28);

    uVar9 = CONCAT21(uVar2,(char)((ulonglong)uVar29 >> 0x10));

    uVar28 = (ushort)uVar29;

    uVar7 = CONCAT43((int)(((uint7)uVar9 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar29 >> 8),uVar28));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar16 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar3,(char)((ulonglong)uVar16 >> 0x10));

    uVar15 = (ushort)uVar16;

    uVar8 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar16 >> 8),uVar15));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar29 >> 0x38) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar4,(char)((ulonglong)uVar29 >> 0x30));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar29 >> 0x28));

    uVar17 = (ushort)(byte)((ulonglong)uVar29 >> 0x20);

    uVar5 = (ushort)(((uint7)(byte)((ulonglong)uVar16 >> 0x38) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar5,(char)((ulonglong)uVar16 >> 0x30));

    uVar20 = (ushort)((ulonglong)uVar16 >> 0x20);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar16 >> 0x28),uVar20));

    uVar30 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar28) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar16 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar8 >> 0x10),uVar15) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar23 = pmaddwd((ulonglong)CONCAT52(uVar12,uVar17),DAT_00833fb0);

    uVar24 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar20) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar19 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar9 + (short)uVar11,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) + (short)uVar12,

                                        (uVar28 & 0xff) + uVar17)));

    uVar29 = CONCAT26((uVar3 >> 8) + (uVar5 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar8 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar15 & 0xff) + (uVar20 & 0xff))));

    iVar26 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar16 = CONCAT44(((int)uVar24 + (int)((ulonglong)uVar24 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar16 + (int)((ulonglong)uVar16 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar25 = CONCAT44(((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar30 + (int)((ulonglong)uVar30 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar24 = pmaddwd(uVar19,DAT_00833fc0);

    uVar19 = pmaddwd(uVar19,DAT_00833fb8);

    uVar30 = pmaddwd(uVar29,DAT_00833fc0);

    uVar23 = pmaddwd(uVar29,DAT_00833fb8);

    uVar29 = packssdw(uVar25,uVar25);

    uVar16 = packssdw(uVar16,uVar16);

    *param_5 = CONCAT44((int)uVar16,(int)uVar29);

    uVar22 = DAT_00834010;

    uVar16 = DAT_00833fe8;

    iVar26 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar19 = CONCAT44((int)uVar24 + (int)((ulonglong)uVar24 >> 0x20) + iVar26 >> 9,

                      (int)uVar19 + (int)((ulonglong)uVar19 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar23 = CONCAT44((int)uVar30 + (int)((ulonglong)uVar30 >> 0x20) + iVar26 >> 9,

                      (int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar19 = packssdw(uVar19,uVar19);

    uVar1 = param_3[2];

    uVar23 = packssdw(uVar23,uVar23);

    uVar18 = param_3[3];

    *param_6 = CONCAT22((short)uVar23,(short)uVar19);

    uVar21 = uVar18 & uVar22;

    *param_7 = CONCAT22((short)((ulonglong)uVar23 >> 0x10),(short)((ulonglong)uVar19 >> 0x10));

    uVar23 = DAT_00834008;

    uVar22 = uVar1 & uVar22;

    iVar26 = (int)uVar16;

    iVar27 = (int)((ulonglong)uVar16 >> 0x20);

    uVar16 = CONCAT44((uint)(byte)(uVar21 >> 0x38) - iVar27,(int)(uVar21 >> 0x18) - iVar26);

    uVar19 = CONCAT44((uint)(byte)(uVar22 >> 0x38) - iVar27,(int)(uVar22 >> 0x18) - iVar26);

    uVar16 = packssdw(uVar16,uVar16);

    uVar19 = packssdw(uVar19,uVar19);

    param_8[1] = CONCAT44((int)uVar16,(int)uVar19);

    uVar19 = DAT_00833fc0;

    uVar16 = DAT_00833fb8;

    uVar29 = psubusb(uVar23,uVar1);

    uVar23 = psubusb(uVar23,uVar18);

    uVar5 = (ushort)(((uint7)(byte)((ulonglong)uVar29 >> 0x18) << 0x30) >> 0x28);

    uVar9 = CONCAT21(uVar5,(char)((ulonglong)uVar29 >> 0x10));

    uVar12 = CONCAT41((int)(((uint7)uVar9 << 0x20) >> 0x18),(char)((ulonglong)uVar29 >> 8));

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar2,(char)((ulonglong)uVar23 >> 0x10));

    uVar15 = (ushort)uVar23;

    uVar8 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 8),uVar15));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar29 >> 0x38) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar3,(char)((ulonglong)uVar29 >> 0x30));

    uVar20 = (ushort)((ulonglong)uVar29 >> 0x20);

    uVar6 = CONCAT43((int)(((uint7)uVar11 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar29 >> 0x28),uVar20));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x38) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar4,(char)((ulonglong)uVar23 >> 0x30));

    uVar17 = (ushort)((ulonglong)uVar23 >> 0x20);

    uVar7 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 0x28),uVar17));

    uVar24 = CONCAT26((uVar5 >> 8) + (uVar3 >> 8),

                      CONCAT24((short)uVar9 + (short)uVar11,

                               CONCAT22((short)uVar12 + (short)((uint7)uVar6 >> 0x10),

                                        (ushort)(byte)uVar29 + (uVar20 & 0xff))));

    uVar25 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar8 >> 0x10) +

                                        (short)((uint7)uVar7 >> 0x10),

                                        (uVar15 & 0xff) + (uVar17 & 0xff))));

    uVar29 = pmaddwd((ulonglong)CONCAT52(uVar12,(ushort)(byte)uVar29),DAT_00833fb0);

    uVar31 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar20) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar8 >> 0x10),uVar15) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar30 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar17) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar26 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar29 = CONCAT44(((int)uVar31 + (int)((ulonglong)uVar31 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar29 + (int)((ulonglong)uVar29 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar23 = CONCAT44(((int)uVar30 + (int)((ulonglong)uVar30 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar29 = packssdw(uVar29,uVar29);

    uVar23 = packssdw(uVar23,uVar23);

    param_5[1] = CONCAT44((int)uVar23,(int)uVar29);

    uVar22 = DAT_00834010;

    uVar23 = DAT_00833fe8;

    uVar29 = pmaddwd(uVar24,uVar16);

    uVar30 = pmaddwd(uVar25,uVar16);

    uVar16 = pmaddwd(uVar24,uVar19);

    uVar19 = pmaddwd(uVar25,uVar19);

    iVar26 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar16 = CONCAT44((int)uVar16 + (int)((ulonglong)uVar16 >> 0x20) + iVar26 >> 9,

                      (int)uVar29 + (int)((ulonglong)uVar29 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20) + iVar26 >> 9,

                      (int)uVar30 + (int)((ulonglong)uVar30 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar16 = packssdw(uVar16,uVar16);

    uVar19 = packssdw(uVar19,uVar19);

    param_6[1] = CONCAT22((short)uVar19,(short)uVar16);

    param_7[1] = CONCAT22((short)((ulonglong)uVar19 >> 0x10),(short)((ulonglong)uVar16 >> 0x10));

    uVar29 = DAT_00834008;

    uVar1 = param_3[4];

    uVar18 = param_3[5];

    uVar21 = uVar1 & uVar22;

    uVar22 = uVar18 & uVar22;

    iVar26 = (int)uVar23;

    iVar27 = (int)((ulonglong)uVar23 >> 0x20);

    uVar16 = CONCAT44((uint)(byte)(uVar21 >> 0x38) - iVar27,(int)(uVar21 >> 0x18) - iVar26);

    uVar19 = CONCAT44((uint)(byte)(uVar22 >> 0x38) - iVar27,(int)(uVar22 >> 0x18) - iVar26);

    uVar16 = packssdw(uVar16,uVar16);

    uVar19 = packssdw(uVar19,uVar19);

    param_8[0x10] = CONCAT44((int)uVar19,(int)uVar16);

    uVar19 = DAT_00833fc0;

    uVar16 = DAT_00833fb8;

    uVar24 = psubusb(uVar29,uVar1);

    uVar23 = psubusb(uVar29,uVar18);

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar24 >> 0x18) << 0x30) >> 0x28);

    uVar9 = CONCAT21(uVar2,(char)((ulonglong)uVar24 >> 0x10));

    uVar28 = (ushort)uVar24;

    uVar7 = CONCAT43((int)(((uint7)uVar9 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar24 >> 8),uVar28));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar3,(char)((ulonglong)uVar23 >> 0x10));

    uVar15 = (ushort)uVar23;

    uVar8 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 8),uVar15));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar24 >> 0x38) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar4,(char)((ulonglong)uVar24 >> 0x30));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar24 >> 0x28));

    uVar17 = (ushort)(byte)((ulonglong)uVar24 >> 0x20);

    uVar5 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x38) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar5,(char)((ulonglong)uVar23 >> 0x30));

    uVar20 = (ushort)((ulonglong)uVar23 >> 0x20);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 0x28),uVar20));

    uVar29 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar9 + (short)uVar11,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) + (short)uVar12,

                                        (uVar28 & 0xff) + uVar17)));

    uVar30 = CONCAT26((uVar3 >> 8) + (uVar5 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar8 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar15 & 0xff) + (uVar20 & 0xff))));

    uVar31 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar28) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar24 = pmaddwd((ulonglong)CONCAT52(uVar12,uVar17),DAT_00833fb0);

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar8 >> 0x10),uVar15) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar25 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar20) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar26 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar24 = CONCAT44(((int)uVar24 + (int)((ulonglong)uVar24 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar31 + (int)((ulonglong)uVar31 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar23 = CONCAT44(((int)uVar25 + (int)((ulonglong)uVar25 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar24 = packssdw(uVar24,uVar24);

    uVar23 = packssdw(uVar23,uVar23);

    param_5[0x10] = CONCAT44((int)uVar23,(int)uVar24);

    uVar22 = DAT_00834010;

    uVar23 = DAT_00833fe8;

    uVar24 = pmaddwd(uVar29,uVar16);

    uVar25 = pmaddwd(uVar30,uVar16);

    uVar16 = pmaddwd(uVar29,uVar19);

    uVar19 = pmaddwd(uVar30,uVar19);

    iVar26 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar16 = CONCAT44((int)uVar16 + (int)((ulonglong)uVar16 >> 0x20) + iVar26 >> 9,

                      (int)uVar24 + (int)((ulonglong)uVar24 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20) + iVar26 >> 9,

                      (int)uVar25 + (int)((ulonglong)uVar25 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar16 = packssdw(uVar16,uVar16);

    uVar19 = packssdw(uVar19,uVar19);

    uVar1 = param_3[6];

    uVar18 = param_3[7];

    param_6[2] = CONCAT22((short)uVar19,(short)uVar16);

    param_7[2] = CONCAT22((short)((ulonglong)uVar19 >> 0x10),(short)((ulonglong)uVar16 >> 0x10));

    uVar29 = DAT_00834008;

    uVar21 = uVar18 & uVar22;

    uVar22 = uVar1 & uVar22;

    iVar26 = (int)uVar23;

    iVar27 = (int)((ulonglong)uVar23 >> 0x20);

    uVar19 = CONCAT44((uint)(byte)(uVar21 >> 0x38) - iVar27,(int)(uVar21 >> 0x18) - iVar26);

    uVar16 = CONCAT44((uint)(byte)(uVar22 >> 0x38) - iVar27,(int)(uVar22 >> 0x18) - iVar26);

    uVar19 = packssdw(uVar19,uVar19);

    uVar16 = packssdw(uVar16,uVar16);

    param_8[0x11] = CONCAT44((int)uVar19,(int)uVar16);

    uVar19 = DAT_00833fc0;

    uVar16 = DAT_00833fb8;

    uVar24 = psubusb(uVar29,uVar1);

    uVar23 = psubusb(uVar29,uVar18);

    uVar2 = (ushort)(((uint7)(byte)((ulonglong)uVar24 >> 0x18) << 0x30) >> 0x28);

    uVar9 = CONCAT21(uVar2,(char)((ulonglong)uVar24 >> 0x10));

    uVar28 = (ushort)uVar24;

    uVar7 = CONCAT43((int)(((uint7)uVar9 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar24 >> 8),uVar28));

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x18) << 0x30) >> 0x28);

    uVar10 = CONCAT21(uVar3,(char)((ulonglong)uVar23 >> 0x10));

    uVar15 = (ushort)uVar23;

    uVar8 = CONCAT43((int)(((uint7)uVar10 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 8),uVar15));

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar24 >> 0x38) << 0x30) >> 0x28);

    uVar11 = CONCAT21(uVar4,(char)((ulonglong)uVar24 >> 0x30));

    uVar12 = CONCAT41((int)(((uint7)uVar11 << 0x20) >> 0x18),(char)((ulonglong)uVar24 >> 0x28));

    uVar17 = (ushort)(byte)((ulonglong)uVar24 >> 0x20);

    uVar5 = (ushort)(((uint7)(byte)((ulonglong)uVar23 >> 0x38) << 0x30) >> 0x28);

    uVar13 = CONCAT21(uVar5,(char)((ulonglong)uVar23 >> 0x30));

    uVar20 = (ushort)((ulonglong)uVar23 >> 0x20);

    uVar6 = CONCAT43((int)(((uint7)uVar13 << 0x20) >> 0x18),

                     CONCAT12((char)((ulonglong)uVar23 >> 0x28),uVar20));

    uVar24 = CONCAT26((uVar2 >> 8) + (uVar4 >> 8),

                      CONCAT24((short)uVar9 + (short)uVar11,

                               CONCAT22((short)((uint7)uVar7 >> 0x10) + (short)uVar12,

                                        (uVar28 & 0xff) + uVar17)));

    uVar25 = CONCAT26((uVar3 >> 8) + (uVar5 >> 8),

                      CONCAT24((short)uVar10 + (short)uVar13,

                               CONCAT22((short)((uint7)uVar8 >> 0x10) +

                                        (short)((uint7)uVar6 >> 0x10),

                                        (uVar15 & 0xff) + (uVar20 & 0xff))));

    uVar31 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar7 >> 0x10),uVar28) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar29 = pmaddwd((ulonglong)CONCAT52(uVar12,uVar17),DAT_00833fb0);

    uVar23 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar8 >> 0x10),uVar15) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    uVar30 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar6 >> 0x10),uVar20) & 0xffffffffffff00ff,

                     DAT_00833fb0);

    iVar26 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

    uVar29 = CONCAT44(((int)uVar29 + (int)((ulonglong)uVar29 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar31 + (int)((ulonglong)uVar31 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar23 = CONCAT44(((int)uVar30 + (int)((ulonglong)uVar30 >> 0x20)) - iVar26 >> 8,

                      ((int)uVar23 + (int)((ulonglong)uVar23 >> 0x20)) - (int)DAT_00833fe0 >> 8);

    uVar29 = packssdw(uVar29,uVar29);

    uVar23 = packssdw(uVar23,uVar23);

    param_5[0x11] = CONCAT44((int)uVar23,(int)uVar29);

    uVar23 = pmaddwd(uVar24,uVar16);

    uVar29 = pmaddwd(uVar25,uVar16);

    uVar16 = pmaddwd(uVar24,uVar19);

    uVar19 = pmaddwd(uVar25,uVar19);

    iVar26 = (int)((ulonglong)DAT_00833ff0 >> 0x20);

    uVar16 = CONCAT44((int)uVar16 + (int)((ulonglong)uVar16 >> 0x20) + iVar26 >> 9,

                      (int)uVar23 + (int)((ulonglong)uVar23 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar19 = CONCAT44((int)uVar19 + (int)((ulonglong)uVar19 >> 0x20) + iVar26 >> 9,

                      (int)uVar29 + (int)((ulonglong)uVar29 >> 0x20) + (int)DAT_00833ff0 >> 9);

    uVar16 = packssdw(uVar16,uVar16);

    param_5 = param_5 + 2;

    uVar19 = packssdw(uVar19,uVar19);

    param_6[3] = CONCAT22((short)uVar19,(short)uVar16);

    param_8 = param_8 + 2;

    param_3 = (ulonglong *)((int)param_3 + param_4);

    param_7[3] = CONCAT22((short)((ulonglong)uVar19 >> 0x10),(short)((ulonglong)uVar16 >> 0x10));

    iVar14 = iVar14 + -1;

    param_6 = param_6 + 4;

    param_7 = param_7 + 4;

  } while (iVar14 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00656620 at 0x00656620 (size: 1562) ---


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



undefined8 __fastcall

FUN_00656620(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6)



{

  int iVar1;

  int iVar2;

  ushort uVar3;

  bool bVar4;

  ushort uVar5;

  ushort uVar6;

  ushort uVar7;

  ushort uVar8;

  ushort uVar9;

  undefined7 uVar10;

  ushort uVar11;

  ushort uVar12;

  undefined7 uVar13;

  uint5 uVar14;

  uint5 uVar15;

  undefined7 uVar16;

  undefined7 uVar17;

  uint3 uVar18;

  undefined5 uVar19;

  uint3 uVar20;

  undefined5 uVar21;

  undefined6 uVar22;

  undefined4 uVar23;

  short sVar24;

  uint3 uVar25;

  uint3 uVar26;

  uint3 uVar27;

  uint3 uVar28;

  undefined5 uVar29;

  uint3 uVar30;

  undefined5 uVar31;

  uint3 uVar32;

  undefined6 uVar33;

  undefined4 uVar34;

  undefined4 in_EAX;

  int iVar35;

  undefined8 *puVar36;

  undefined8 *puVar37;

  ushort uVar38;

  ushort uVar39;

  byte bVar43;

  undefined8 uVar40;

  ulonglong uVar41;

  byte bVar44;

  ulonglong uVar42;

  undefined2 uVar45;

  short sVar46;

  ushort uVar47;

  short sVar48;

  ushort uVar49;

  short sVar50;

  undefined8 uVar51;

  undefined8 uVar52;

  ulonglong uVar53;

  ulonglong uVar54;

  ushort uVar55;

  undefined8 uVar56;

  ushort uVar57;

  undefined8 uVar58;

  byte bVar59;

  undefined8 uVar60;

  undefined8 uVar61;

  undefined8 uVar62;

  undefined8 local_24;

  undefined8 local_1c;

  undefined8 local_14;

  undefined8 local_c;

  

  iVar35 = 3;

  bVar4 = true;

  uVar60 = *param_3;

  local_c = 0;

  local_14 = 0;

  local_1c = 0;

  uVar42 = (ulonglong)

           CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar60 >> 0x18

                                                                          ) << 0x30) >> 0x28),

                                                    (char)((ulonglong)uVar60 >> 0x10)) << 0x20) >>

                                  0x18),(char)((ulonglong)uVar60 >> 8)),(ushort)(byte)uVar60);

  local_24 = 0;

  uVar45 = (undefined2)((ulonglong)uVar60 >> 0x18);

  uVar54 = (ulonglong)

           CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar60

                                                                                 >> 0x30) << 0x30)

                                                                  >> 0x28),

                                                           (char)((ulonglong)uVar60 >> 0x28)) <<

                                          0x20) >> 0x18),

                                    CONCAT12((char)((ulonglong)uVar60 >> 0x20),uVar45)) >> 0x10),

                    uVar45) & 0xffffffff00ff00ff;

  uVar60 = DAT_00833fb0;

  do {

    do {

      puVar37 = param_5;

      puVar36 = param_6;

      local_c = CONCAT26((short)(uVar42 >> 0x30) + (short)((ulonglong)local_c >> 0x30) +

                         (short)(uVar54 >> 0x30),

                         CONCAT24((short)(uVar42 >> 0x20) + (short)((ulonglong)local_c >> 0x20) +

                                  (short)(uVar54 >> 0x20),

                                  CONCAT22((short)(uVar42 >> 0x10) +

                                           (short)((ulonglong)local_c >> 0x10) +

                                           (short)(uVar54 >> 0x10),

                                           (short)uVar42 + (short)local_c + (short)uVar54)));

      uVar40 = pmaddwd(uVar42,uVar60);

      uVar52 = param_3[1];

      uVar51 = pmaddwd(uVar54,uVar60);

      iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

      bVar44 = (byte)((ulonglong)uVar52 >> 0x20);

      uVar18 = CONCAT21((short)(((uint7)bVar44 << 0x30) >> 0x28),(char)((ulonglong)uVar52 >> 0x18));

      uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar52 >> 0x10));

      bVar43 = (byte)((ulonglong)uVar52 >> 8);

      uVar51 = CONCAT44(((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      uVar40 = param_3[2];

      uVar51 = packssdw(uVar51,uVar51);

      uVar3 = (ushort)((ulonglong)*param_3 >> 0x30);

      uVar38 = (ushort)(((uint7)bVar43 << 0x30) >> 0x28);

      uVar20 = CONCAT21(uVar38,(char)uVar52);

      uVar21 = CONCAT41((int)(((uint7)uVar20 << 0x20) >> 0x18),(char)((ulonglong)*param_3 >> 0x38));

      uVar52 = param_3[1];

      local_14 = CONCAT26((short)((ulonglong)local_14 >> 0x30) + (ushort)bVar44 + (uVar38 >> 8),

                          CONCAT24((short)((ulonglong)local_14 >> 0x20) + (short)uVar18 +

                                   (short)uVar20,

                                   CONCAT22((short)((ulonglong)local_14 >> 0x10) + (short)uVar19 +

                                            (short)uVar21,

                                            (short)local_14 + (ushort)bVar43 + (uVar3 & 0xff))));

      uVar56 = pmaddwd((ulonglong)(CONCAT52(uVar21,uVar3) & 0xffffffffff00ff),uVar60);

      uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar52 >> 0x38) << 0x30) >> 0x28);

      uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar52 >> 0x30));

      uVar21 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar52 >> 0x28));

      uVar38 = (ushort)(byte)((ulonglong)uVar52 >> 0x20);

      uVar60 = pmaddwd((ulonglong)CONCAT52(uVar19,(ushort)bVar43),uVar60);

      sVar24 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar40 >> 0x10));

      uVar23 = CONCAT31(CONCAT21(sVar24,(char)((uint)DAT_00834040 >> 0x10)),

                        (char)((ulonglong)uVar40 >> 8));

      uVar22 = CONCAT51(CONCAT41(uVar23,(char)((uint)DAT_00834040 >> 8)),(char)uVar40);

      sVar46 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

      local_1c = CONCAT26((short)((ulonglong)local_1c >> 0x30) + (uVar3 >> 8) + sVar24,

                          CONCAT24((short)((ulonglong)local_1c >> 0x20) + (short)uVar18 +

                                   (short)uVar23,

                                   CONCAT22((short)((ulonglong)local_1c >> 0x10) + (short)uVar21 +

                                            (short)uVar22,(short)local_1c + uVar38 + sVar46)));

      uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      uVar60 = packssdw(uVar60,uVar60);

      uVar58 = pmaddwd((ulonglong)CONCAT52(uVar21,uVar38),DAT_00833fb0);

      uVar52 = param_3[2];

      uVar56 = pmaddwd(CONCAT62(uVar22,sVar46),DAT_00833fb0);

      *puVar37 = CONCAT44((int)uVar60,(int)uVar51);

      uVar60 = DAT_00833fb0;

      uVar40 = param_3[2];

      iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

      uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar52 >> 0x28) << 0x30) >> 0x28);

      uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar52 >> 0x20));

      uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar52 >> 0x18));

      uVar47 = (ushort)(byte)((ulonglong)uVar52 >> 0x10);

      uVar52 = CONCAT44(((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      bVar43 = (byte)((ulonglong)uVar40 >> 0x38);

      uVar38 = (ushort)((ulonglong)uVar40 >> 0x28);

      uVar14 = CONCAT23((short)(((uint5)bVar43 << 0x20) >> 0x18),

                        CONCAT12((char)((ulonglong)uVar40 >> 0x30),uVar38));

      uVar51 = pmaddwd((ulonglong)CONCAT52(uVar19,uVar47),DAT_00833fb0);

      uVar56 = packssdw(uVar52,uVar52);

      local_24 = CONCAT26((short)((ulonglong)local_24 >> 0x30) + (uVar3 >> 8),

                          CONCAT24((short)((ulonglong)local_24 >> 0x20) + (short)uVar18 +

                                   (ushort)bVar43,

                                   CONCAT22((short)((ulonglong)local_24 >> 0x10) + (short)uVar19 +

                                            (short)(uVar14 >> 0x10),

                                            (short)local_24 + uVar47 + (uVar38 & 0xff))));

      uVar52 = *(undefined8 *)(param_4 + (int)param_3);

      uVar40 = pmaddwd((ulonglong)CONCAT52(uVar14 >> 0x10,uVar38) & 0xffffffff00ff,DAT_00833fb0);

      param_3 = (undefined8 *)((int)param_3 + param_4);

      uVar40 = CONCAT44(((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      uVar40 = packssdw(uVar40,uVar40);

      uVar42 = (ulonglong)

               CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar52 >>

                                                                              0x18) << 0x30) >> 0x28

                                                               ),(char)((ulonglong)uVar52 >> 0x10))

                                       << 0x20) >> 0x18),(char)((ulonglong)uVar52 >> 8)),

                        (ushort)(byte)uVar52);

      puVar37[1] = CONCAT44((int)uVar40,(int)uVar56);

      uVar40 = DAT_00833fb0;

      uVar45 = (undefined2)((ulonglong)uVar52 >> 0x18);

      uVar54 = (ulonglong)

               CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)

                                                                                      uVar52 >> 0x30

                                                                                     ) << 0x30) >>

                                                                      0x28),

                                                               (char)((ulonglong)uVar52 >> 0x28)) <<

                                              0x20) >> 0x18),

                                        CONCAT12((char)((ulonglong)uVar52 >> 0x20),uVar45)) >> 0x10)

                        ,uVar45) & 0xffffffff00ff00ff;

      param_5 = puVar37 + 2;

      bVar4 = (bool)(bVar4 ^ 1);

      param_6 = puVar36;

    } while (!bVar4);

    uVar60 = pmaddwd(local_c,DAT_00833fb8);

    uVar52 = pmaddwd(local_c,DAT_00833fc0);

    uVar56 = pmaddwd(local_14,DAT_00833fb8);

    uVar61 = pmaddwd(local_1c,DAT_00833fb8);

    uVar58 = pmaddwd(local_14,DAT_00833fc0);

    iVar1 = (int)DAT_00833ff8;

    iVar2 = (int)((ulonglong)DAT_00833ff8 >> 0x20);

    uVar51 = pmaddwd(local_1c,DAT_00833fc0);

    uVar41 = CONCAT44((int)uVar52 + (int)((ulonglong)uVar52 >> 0x20) + iVar2 >> 10,

                      (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar1 >> 10) & _DAT_00834020

             | (CONCAT44((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20) + iVar2 >> 10,

                         (int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar1 >> 10) &

               _DAT_00834020) << 0x10;

    uVar60 = pmaddwd(local_24,DAT_00833fb8);

    uVar56 = pmaddwd(local_24,DAT_00833fc0);

    local_c = 0;

    local_14 = 0;

    local_1c = 0;

    local_24 = 0;

    uVar52 = *param_3;

    uVar53 = (CONCAT44((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar2 >> 10,

                       (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar1 >> 10) & _DAT_00834020

             ) << 0x10 |

             CONCAT44((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20) + iVar2 >> 10,

                      (int)uVar61 + (int)((ulonglong)uVar61 >> 0x20) + iVar1 >> 10) & _DAT_00834020;

    uVar38 = (ushort)(((uint7)(byte)((ulonglong)uVar52 >> 0x18) << 0x30) >> 0x28);

    uVar18 = CONCAT21(uVar38,(char)((ulonglong)uVar52 >> 0x10));

    uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar52 >> 8));

    uVar42 = (ulonglong)CONCAT52(uVar19,(ushort)(byte)uVar52);

    *puVar36 = CONCAT44((int)uVar53,(int)uVar41);

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar52 >> 0x30) << 0x30) >> 0x28);

    uVar20 = CONCAT21(uVar3,(char)((ulonglong)uVar52 >> 0x28));

    uVar47 = (ushort)((ulonglong)uVar52 >> 0x18);

    uVar10 = CONCAT43((int)(((uint7)uVar20 << 0x20) >> 0x18),

                      CONCAT12((char)((ulonglong)uVar52 >> 0x20),uVar47));

    uVar54 = (ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar47) & 0xffffffffffff00ff;

    puVar36[0x10] = CONCAT44((int)(uVar53 >> 0x20),(int)(uVar41 >> 0x20));

    iVar35 = iVar35 + -1;

    param_6 = puVar36 + 2;

    uVar60 = uVar40;

  } while (iVar35 != 0);

  uVar51 = pmaddwd(uVar42,uVar40);

  uVar60 = param_3[1];

  uVar56 = pmaddwd(uVar54,uVar40);

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar6 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x20) << 0x30) >> 0x28);

  uVar25 = CONCAT21(uVar6,(char)((ulonglong)uVar60 >> 0x18));

  uVar21 = CONCAT41((int)(((uint7)uVar25 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x10));

  bVar44 = (byte)((ulonglong)uVar60 >> 8);

  uVar56 = CONCAT44(((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar51 = param_3[2];

  uVar56 = packssdw(uVar56,uVar56);

  uVar5 = (ushort)((ulonglong)*param_3 >> 0x30);

  uVar7 = (ushort)(((uint7)bVar44 << 0x30) >> 0x28);

  uVar26 = CONCAT21(uVar7,(char)uVar60);

  uVar17 = CONCAT43((int)(((uint7)uVar26 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)*param_3 >> 0x38),uVar5));

  uVar60 = param_3[1];

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar17 >> 0x10),uVar5) & 0xffffffffffff00ff,

                   uVar40);

  uVar8 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x38) << 0x30) >> 0x28);

  uVar27 = CONCAT21(uVar8,(char)((ulonglong)uVar60 >> 0x30));

  uVar57 = (ushort)((ulonglong)uVar60 >> 0x20);

  uVar16 = CONCAT43((int)(((uint7)uVar27 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar60 >> 0x28),uVar57));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar21,(ushort)bVar44),uVar40);

  sVar24 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar51 >> 0x10));

  uVar23 = CONCAT31(CONCAT21(sVar24,(char)((uint)DAT_00834040 >> 0x10)),

                    (char)((ulonglong)uVar51 >> 8));

  uVar22 = CONCAT51(CONCAT41(uVar23,(char)((uint)DAT_00834040 >> 8)),(char)uVar51);

  sVar48 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar40 = packssdw(uVar60,uVar60);

  uVar61 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar16 >> 0x10),uVar57) & 0xffffffffffff00ff,

                   DAT_00833fb0);

  uVar60 = param_3[2];

  uVar58 = pmaddwd(CONCAT62(uVar22,sVar48),DAT_00833fb0);

  *param_5 = CONCAT44((int)uVar40,(int)uVar56);

  uVar51 = DAT_00833fb0;

  uVar40 = param_3[2];

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar11 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x28) << 0x30) >> 0x28);

  uVar28 = CONCAT21(uVar11,(char)((ulonglong)uVar60 >> 0x20));

  uVar29 = CONCAT41((int)(((uint7)uVar28 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x18));

  uVar55 = (ushort)(byte)((ulonglong)uVar60 >> 0x10);

  uVar60 = CONCAT44(((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar61 + (int)((ulonglong)uVar61 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  bVar43 = (byte)((ulonglong)uVar40 >> 0x38);

  uVar39 = (ushort)((ulonglong)uVar40 >> 0x28);

  uVar14 = CONCAT23((short)(((uint5)bVar43 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar40 >> 0x30),uVar39));

  uVar56 = pmaddwd((ulonglong)CONCAT52(uVar29,uVar55),DAT_00833fb0);

  uVar58 = packssdw(uVar60,uVar60);

  uVar60 = *(undefined8 *)(param_4 + (int)param_3);

  uVar40 = pmaddwd((ulonglong)CONCAT52(uVar14 >> 0x10,uVar39) & 0xffffffff00ff,DAT_00833fb0);

  param_3 = (undefined8 *)((int)param_3 + param_4);

  uVar40 = CONCAT44(((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar40 = packssdw(uVar40,uVar40);

  uVar12 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x18) << 0x30) >> 0x28);

  uVar30 = CONCAT21(uVar12,(char)((ulonglong)uVar60 >> 0x10));

  uVar31 = CONCAT41((int)(((uint7)uVar30 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 8));

  puVar37[3] = CONCAT44((int)uVar40,(int)uVar58);

  uVar9 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x30) << 0x30) >> 0x28);

  uVar32 = CONCAT21(uVar9,(char)((ulonglong)uVar60 >> 0x28));

  uVar49 = (ushort)((ulonglong)uVar60 >> 0x18);

  uVar13 = CONCAT43((int)(((uint7)uVar32 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar60 >> 0x20),uVar49));

  uVar61 = CONCAT26((uVar12 >> 8) + (uVar38 >> 8) + (uVar3 >> 8) + (uVar9 >> 8),

                    CONCAT24((short)uVar30 + (short)uVar18 + (short)uVar20 + (short)uVar32,

                             CONCAT22((short)uVar31 + (short)uVar19 + (short)((uint7)uVar10 >> 0x10)

                                      + (short)((uint7)uVar13 >> 0x10),

                                      (ushort)(byte)uVar60 + (ushort)(byte)uVar52 + (uVar47 & 0xff)

                                      + (uVar49 & 0xff))));

  uVar52 = pmaddwd((ulonglong)CONCAT52(uVar31,(ushort)(byte)uVar60),uVar51);

  uVar60 = param_3[1];

  uVar40 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar13 >> 0x10),uVar49) & 0xffffffffffff00ff,

                   uVar51);

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar38 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x20) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar38,(char)((ulonglong)uVar60 >> 0x18));

  uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x10));

  bVar59 = (byte)((ulonglong)uVar60 >> 8);

  uVar40 = CONCAT44(((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar52 + (int)((ulonglong)uVar52 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar52 = param_3[2];

  uVar40 = packssdw(uVar40,uVar40);

  uVar3 = (ushort)((ulonglong)*param_3 >> 0x30);

  uVar47 = (ushort)(((uint7)bVar59 << 0x30) >> 0x28);

  uVar20 = CONCAT21(uVar47,(char)uVar60);

  uVar10 = CONCAT43((int)(((uint7)uVar20 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)*param_3 >> 0x38),uVar3));

  uVar60 = param_3[1];

  uVar56 = CONCAT26((uVar6 >> 8) + (uVar7 >> 8) + (uVar38 >> 8) + (uVar47 >> 8),

                    CONCAT24((short)uVar25 + (short)uVar26 + (short)uVar18 + (short)uVar20,

                             CONCAT22((short)uVar21 + (short)((uint7)uVar17 >> 0x10) + (short)uVar19

                                      + (short)((uint7)uVar10 >> 0x10),

                                      (ushort)bVar44 + (uVar5 & 0xff) + (ushort)bVar59 +

                                      (uVar3 & 0xff))));

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar3) & 0xffffffffffff00ff,

                   uVar51);

  uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x38) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar60 >> 0x30));

  uVar38 = (ushort)((ulonglong)uVar60 >> 0x20);

  uVar10 = CONCAT43((int)(((uint7)uVar18 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar60 >> 0x28),uVar38));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar19,(ushort)bVar59),uVar51);

  sVar46 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar52 >> 0x10));

  uVar34 = CONCAT31(CONCAT21(sVar46,(char)((uint)DAT_00834040 >> 0x10)),

                    (char)((ulonglong)uVar52 >> 8));

  uVar33 = CONCAT51(CONCAT41(uVar34,(char)((uint)DAT_00834040 >> 8)),(char)uVar52);

  sVar50 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

  uVar62 = CONCAT26((uVar8 >> 8) + sVar24 + (uVar3 >> 8) + sVar46,

                    CONCAT24((short)uVar27 + (short)uVar23 + (short)uVar18 + (short)uVar34,

                             CONCAT22((short)((uint7)uVar16 >> 0x10) + (short)uVar22 +

                                      (short)((uint7)uVar10 >> 0x10) + (short)uVar33,

                                      (uVar57 & 0xff) + sVar48 + (uVar38 & 0xff) + sVar50)));

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar52 = packssdw(uVar60,uVar60);

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar38) & 0xffffffffffff00ff,

                   DAT_00833fb0);

  uVar60 = param_3[2];

  uVar51 = pmaddwd(CONCAT62(uVar33,sVar50),DAT_00833fb0);

  puVar37[4] = CONCAT44((int)uVar52,(int)uVar40);

  uVar52 = param_3[2];

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x28) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar60 >> 0x20));

  uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x18));

  uVar47 = (ushort)(byte)((ulonglong)uVar60 >> 0x10);

  uVar60 = CONCAT44(((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  bVar44 = (byte)((ulonglong)uVar52 >> 0x38);

  uVar38 = (ushort)((ulonglong)uVar52 >> 0x28);

  uVar15 = CONCAT23((short)(((uint5)bVar44 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar52 >> 0x30),uVar38));

  uVar52 = pmaddwd((ulonglong)CONCAT52(uVar19,uVar47),DAT_00833fb0);

  uVar40 = packssdw(uVar60,uVar60);

  uVar58 = CONCAT26((uVar11 >> 8) + (uVar3 >> 8),

                    CONCAT24((short)uVar28 + (ushort)bVar43 + (short)uVar18 + (ushort)bVar44,

                             CONCAT22((short)uVar29 + (short)(uVar14 >> 0x10) + (short)uVar19 +

                                      (short)(uVar15 >> 0x10),

                                      uVar55 + (uVar39 & 0xff) + uVar47 + (uVar38 & 0xff))));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar15 >> 0x10,uVar38) & 0xffffffff00ff,DAT_00833fb0);

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar52 + (int)((ulonglong)uVar52 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar60 = packssdw(uVar60,uVar60);

  puVar37[5] = CONCAT44((int)uVar60,(int)uVar40);

  uVar60 = pmaddwd(uVar61,DAT_00833fb8);

  uVar52 = pmaddwd(uVar61,DAT_00833fc0);

  uVar51 = pmaddwd(uVar56,DAT_00833fb8);

  uVar61 = pmaddwd(uVar62,DAT_00833fb8);

  uVar56 = pmaddwd(uVar56,DAT_00833fc0);

  iVar35 = (int)DAT_00833ff8;

  iVar1 = (int)((ulonglong)DAT_00833ff8 >> 0x20);

  uVar40 = pmaddwd(uVar62,DAT_00833fc0);

  uVar42 = CONCAT44((int)uVar52 + (int)((ulonglong)uVar52 >> 0x20) + iVar1 >> 10,

                    (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar35 >> 10) & _DAT_00834020 |

           (CONCAT44((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar1 >> 10,

                     (int)uVar51 + (int)((ulonglong)uVar51 >> 0x20) + iVar35 >> 10) & _DAT_00834020)

           << 0x10;

  uVar60 = pmaddwd(uVar58,DAT_00833fb8);

  uVar52 = pmaddwd(uVar58,DAT_00833fc0);

  uVar54 = (CONCAT44((int)uVar52 + (int)((ulonglong)uVar52 >> 0x20) + iVar1 >> 10,

                     (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar35 >> 10) & _DAT_00834020)

           << 0x10 | CONCAT44((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20) + iVar1 >> 10,

                              (int)uVar61 + (int)((ulonglong)uVar61 >> 0x20) + iVar35 >> 10) &

                     _DAT_00834020;

  puVar36[2] = CONCAT44((int)uVar54,(int)uVar42);

  puVar36[0x12] = CONCAT44((int)(uVar54 >> 0x20),(int)(uVar42 >> 0x20));

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00656c40 at 0x00656C40 (size: 1561) ---


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



undefined8 __fastcall

FUN_00656c40(undefined4 param_1,undefined4 param_2,undefined8 *param_3,int param_4,

            undefined8 *param_5,undefined8 *param_6)



{

  int iVar1;

  int iVar2;

  ushort uVar3;

  bool bVar4;

  ushort uVar5;

  ushort uVar6;

  ushort uVar7;

  ushort uVar8;

  ushort uVar9;

  undefined7 uVar10;

  ushort uVar11;

  ushort uVar12;

  undefined7 uVar13;

  uint5 uVar14;

  uint5 uVar15;

  undefined7 uVar16;

  undefined7 uVar17;

  uint3 uVar18;

  undefined5 uVar19;

  uint3 uVar20;

  undefined5 uVar21;

  undefined6 uVar22;

  undefined4 uVar23;

  short sVar24;

  uint3 uVar25;

  uint3 uVar26;

  uint3 uVar27;

  uint3 uVar28;

  undefined5 uVar29;

  uint3 uVar30;

  undefined5 uVar31;

  uint3 uVar32;

  undefined6 uVar33;

  undefined4 uVar34;

  undefined4 in_EAX;

  int iVar35;

  undefined8 *puVar36;

  undefined8 *puVar37;

  ushort uVar38;

  ushort uVar39;

  byte bVar43;

  undefined8 uVar40;

  ulonglong uVar41;

  byte bVar44;

  ulonglong uVar42;

  undefined2 uVar45;

  short sVar46;

  ushort uVar47;

  short sVar48;

  ushort uVar49;

  short sVar50;

  undefined8 uVar51;

  ulonglong uVar52;

  ulonglong uVar53;

  ushort uVar54;

  undefined8 uVar55;

  undefined8 uVar56;

  ushort uVar57;

  undefined8 uVar58;

  byte bVar59;

  undefined8 uVar60;

  undefined8 uVar61;

  undefined8 uVar62;

  undefined8 local_24;

  undefined8 local_1c;

  undefined8 local_14;

  undefined8 local_c;

  

  iVar35 = 3;

  bVar4 = true;

  uVar60 = *param_3;

  local_c = 0;

  local_14 = 0;

  local_1c = 0;

  uVar42 = (ulonglong)

           CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar60 >> 0x18

                                                                          ) << 0x30) >> 0x28),

                                                    (char)((ulonglong)uVar60 >> 0x10)) << 0x20) >>

                                  0x18),(char)((ulonglong)uVar60 >> 8)),(ushort)(byte)uVar60);

  local_24 = 0;

  uVar45 = (undefined2)((ulonglong)uVar60 >> 0x18);

  uVar53 = (ulonglong)

           CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar60

                                                                                 >> 0x30) << 0x30)

                                                                  >> 0x28),

                                                           (char)((ulonglong)uVar60 >> 0x28)) <<

                                          0x20) >> 0x18),

                                    CONCAT12((char)((ulonglong)uVar60 >> 0x20),uVar45)) >> 0x10),

                    uVar45) & 0xffffffff00ff00ff;

  uVar60 = DAT_00833fc8;

  do {

    while( true ) {

      puVar37 = param_5;

      puVar36 = param_6;

      local_c = CONCAT26((short)(uVar42 >> 0x30) + (short)((ulonglong)local_c >> 0x30) +

                         (short)(uVar53 >> 0x30),

                         CONCAT24((short)(uVar42 >> 0x20) + (short)((ulonglong)local_c >> 0x20) +

                                  (short)(uVar53 >> 0x20),

                                  CONCAT22((short)(uVar42 >> 0x10) +

                                           (short)((ulonglong)local_c >> 0x10) +

                                           (short)(uVar53 >> 0x10),

                                           (short)uVar42 + (short)local_c + (short)uVar53)));

      uVar40 = pmaddwd(uVar42,uVar60);

      uVar56 = param_3[1];

      uVar51 = pmaddwd(uVar53,uVar60);

      iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

      bVar44 = (byte)((ulonglong)uVar56 >> 0x20);

      uVar18 = CONCAT21((short)(((uint7)bVar44 << 0x30) >> 0x28),(char)((ulonglong)uVar56 >> 0x18));

      uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar56 >> 0x10));

      bVar43 = (byte)((ulonglong)uVar56 >> 8);

      uVar51 = CONCAT44(((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      uVar40 = param_3[2];

      uVar51 = packssdw(uVar51,uVar51);

      uVar3 = (ushort)((ulonglong)*param_3 >> 0x30);

      uVar38 = (ushort)(((uint7)bVar43 << 0x30) >> 0x28);

      uVar20 = CONCAT21(uVar38,(char)uVar56);

      uVar21 = CONCAT41((int)(((uint7)uVar20 << 0x20) >> 0x18),(char)((ulonglong)*param_3 >> 0x38));

      uVar56 = param_3[1];

      local_14 = CONCAT26((short)((ulonglong)local_14 >> 0x30) + (ushort)bVar44 + (uVar38 >> 8),

                          CONCAT24((short)((ulonglong)local_14 >> 0x20) + (short)uVar18 +

                                   (short)uVar20,

                                   CONCAT22((short)((ulonglong)local_14 >> 0x10) + (short)uVar19 +

                                            (short)uVar21,

                                            (short)local_14 + (ushort)bVar43 + (uVar3 & 0xff))));

      uVar55 = pmaddwd((ulonglong)(CONCAT52(uVar21,uVar3) & 0xffffffffff00ff),uVar60);

      uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar56 >> 0x38) << 0x30) >> 0x28);

      uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar56 >> 0x30));

      uVar21 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar56 >> 0x28));

      uVar38 = (ushort)(byte)((ulonglong)uVar56 >> 0x20);

      uVar60 = pmaddwd((ulonglong)CONCAT52(uVar19,(ushort)bVar43),uVar60);

      sVar24 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar40 >> 0x10));

      uVar23 = CONCAT31(CONCAT21(sVar24,(char)((uint)DAT_00834040 >> 0x10)),

                        (char)((ulonglong)uVar40 >> 8));

      uVar22 = CONCAT51(CONCAT41(uVar23,(char)((uint)DAT_00834040 >> 8)),(char)uVar40);

      sVar46 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

      local_1c = CONCAT26((short)((ulonglong)local_1c >> 0x30) + (uVar3 >> 8) + sVar24,

                          CONCAT24((short)((ulonglong)local_1c >> 0x20) + (short)uVar18 +

                                   (short)uVar23,

                                   CONCAT22((short)((ulonglong)local_1c >> 0x10) + (short)uVar21 +

                                            (short)uVar22,(short)local_1c + uVar38 + sVar46)));

      uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      uVar56 = packssdw(uVar60,uVar60);

      uVar58 = pmaddwd((ulonglong)CONCAT52(uVar21,uVar38),DAT_00833fc8);

      uVar60 = param_3[2];

      uVar55 = pmaddwd(CONCAT62(uVar22,sVar46),DAT_00833fc8);

      *puVar37 = CONCAT44((int)uVar56,(int)uVar51);

      uVar40 = DAT_00833fc8;

      uVar56 = param_3[2];

      iVar1 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

      uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x28) << 0x30) >> 0x28);

      uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar60 >> 0x20));

      uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x18));

      uVar47 = (ushort)(byte)((ulonglong)uVar60 >> 0x10);

      uVar60 = CONCAT44(((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      bVar43 = (byte)((ulonglong)uVar56 >> 0x38);

      uVar38 = (ushort)((ulonglong)uVar56 >> 0x28);

      uVar14 = CONCAT23((short)(((uint5)bVar43 << 0x20) >> 0x18),

                        CONCAT12((char)((ulonglong)uVar56 >> 0x30),uVar38));

      uVar51 = pmaddwd((ulonglong)CONCAT52(uVar19,uVar47),DAT_00833fc8);

      uVar55 = packssdw(uVar60,uVar60);

      local_24 = CONCAT26((short)((ulonglong)local_24 >> 0x30) + (uVar3 >> 8),

                          CONCAT24((short)((ulonglong)local_24 >> 0x20) + (short)uVar18 +

                                   (ushort)bVar43,

                                   CONCAT22((short)((ulonglong)local_24 >> 0x10) + (short)uVar19 +

                                            (short)(uVar14 >> 0x10),

                                            (short)local_24 + uVar47 + (uVar38 & 0xff))));

      uVar56 = *(undefined8 *)(param_4 + (int)param_3);

      uVar60 = pmaddwd((ulonglong)CONCAT52(uVar14 >> 0x10,uVar38) & 0xffffffff00ff,DAT_00833fc8);

      param_3 = (undefined8 *)((int)param_3 + param_4);

      param_5 = puVar37 + 2;

      uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar1 >> 8,

                        ((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - (int)DAT_00833fe0 >> 8);

      bVar4 = (bool)(bVar4 ^ 1);

      uVar60 = packssdw(uVar60,uVar60);

      uVar42 = (ulonglong)

               CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar56 >>

                                                                              0x18) << 0x30) >> 0x28

                                                               ),(char)((ulonglong)uVar56 >> 0x10))

                                       << 0x20) >> 0x18),(char)((ulonglong)uVar56 >> 8)),

                        (ushort)(byte)uVar56);

      puVar37[1] = CONCAT44((int)uVar60,(int)uVar55);

      uVar60 = DAT_00833fc8;

      if (bVar4) break;

      uVar45 = (undefined2)((ulonglong)uVar56 >> 0x18);

      uVar53 = (ulonglong)

               CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)

                                                                                      uVar56 >> 0x30

                                                                                     ) << 0x30) >>

                                                                      0x28),

                                                               (char)((ulonglong)uVar56 >> 0x28)) <<

                                              0x20) >> 0x18),

                                        CONCAT12((char)((ulonglong)uVar56 >> 0x20),uVar45)) >> 0x10)

                        ,uVar45) & 0xffffffff00ff00ff;

      param_6 = puVar36;

      uVar60 = uVar40;

    }

    uVar56 = pmaddwd(local_c,DAT_00833fd0);

    uVar40 = pmaddwd(local_c,DAT_00833fd8);

    uVar55 = pmaddwd(local_14,DAT_00833fd0);

    uVar61 = pmaddwd(local_1c,DAT_00833fd0);

    uVar58 = pmaddwd(local_14,DAT_00833fd8);

    iVar1 = (int)DAT_00833ff8;

    iVar2 = (int)((ulonglong)DAT_00833ff8 >> 0x20);

    uVar51 = pmaddwd(local_1c,DAT_00833fd8);

    uVar41 = CONCAT44((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20) + iVar2 >> 10,

                      (int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar1 >> 10) & _DAT_00834020

             | (CONCAT44((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20) + iVar2 >> 10,

                         (int)uVar55 + (int)((ulonglong)uVar55 >> 0x20) + iVar1 >> 10) &

               _DAT_00834020) << 0x10;

    uVar40 = pmaddwd(local_24,DAT_00833fd0);

    uVar55 = pmaddwd(local_24,DAT_00833fd8);

    local_c = 0;

    local_14 = 0;

    local_1c = 0;

    local_24 = 0;

    uVar56 = *param_3;

    uVar52 = (CONCAT44((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20) + iVar2 >> 10,

                       (int)uVar40 + (int)((ulonglong)uVar40 >> 0x20) + iVar1 >> 10) & _DAT_00834020

             ) << 0x10 |

             CONCAT44((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20) + iVar2 >> 10,

                      (int)uVar61 + (int)((ulonglong)uVar61 >> 0x20) + iVar1 >> 10) & _DAT_00834020;

    uVar38 = (ushort)(((uint7)(byte)((ulonglong)uVar56 >> 0x18) << 0x30) >> 0x28);

    uVar18 = CONCAT21(uVar38,(char)((ulonglong)uVar56 >> 0x10));

    uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar56 >> 8));

    uVar42 = (ulonglong)CONCAT52(uVar19,(ushort)(byte)uVar56);

    *puVar36 = CONCAT44((int)uVar52,(int)uVar41);

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar56 >> 0x30) << 0x30) >> 0x28);

    uVar20 = CONCAT21(uVar3,(char)((ulonglong)uVar56 >> 0x28));

    uVar47 = (ushort)((ulonglong)uVar56 >> 0x18);

    uVar10 = CONCAT43((int)(((uint7)uVar20 << 0x20) >> 0x18),

                      CONCAT12((char)((ulonglong)uVar56 >> 0x20),uVar47));

    uVar53 = (ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar47) & 0xffffffffffff00ff;

    puVar36[0x10] = CONCAT44((int)(uVar52 >> 0x20),(int)(uVar41 >> 0x20));

    iVar35 = iVar35 + -1;

    param_6 = puVar36 + 2;

  } while (iVar35 != 0);

  uVar51 = pmaddwd(uVar42,uVar60);

  uVar40 = param_3[1];

  uVar55 = pmaddwd(uVar53,uVar60);

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar6 = (ushort)(((uint7)(byte)((ulonglong)uVar40 >> 0x20) << 0x30) >> 0x28);

  uVar25 = CONCAT21(uVar6,(char)((ulonglong)uVar40 >> 0x18));

  uVar21 = CONCAT41((int)(((uint7)uVar25 << 0x20) >> 0x18),(char)((ulonglong)uVar40 >> 0x10));

  bVar44 = (byte)((ulonglong)uVar40 >> 8);

  uVar55 = CONCAT44(((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar51 = param_3[2];

  uVar55 = packssdw(uVar55,uVar55);

  uVar5 = (ushort)((ulonglong)*param_3 >> 0x30);

  uVar7 = (ushort)(((uint7)bVar44 << 0x30) >> 0x28);

  uVar26 = CONCAT21(uVar7,(char)uVar40);

  uVar17 = CONCAT43((int)(((uint7)uVar26 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)*param_3 >> 0x38),uVar5));

  uVar40 = param_3[1];

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar17 >> 0x10),uVar5) & 0xffffffffffff00ff,

                   uVar60);

  uVar8 = (ushort)(((uint7)(byte)((ulonglong)uVar40 >> 0x38) << 0x30) >> 0x28);

  uVar27 = CONCAT21(uVar8,(char)((ulonglong)uVar40 >> 0x30));

  uVar57 = (ushort)((ulonglong)uVar40 >> 0x20);

  uVar16 = CONCAT43((int)(((uint7)uVar27 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar40 >> 0x28),uVar57));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar21,(ushort)bVar44),uVar60);

  sVar24 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar51 >> 0x10));

  uVar23 = CONCAT31(CONCAT21(sVar24,(char)((uint)DAT_00834040 >> 0x10)),

                    (char)((ulonglong)uVar51 >> 8));

  uVar22 = CONCAT51(CONCAT41(uVar23,(char)((uint)DAT_00834040 >> 8)),(char)uVar51);

  sVar48 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar40 = packssdw(uVar60,uVar60);

  uVar61 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar16 >> 0x10),uVar57) & 0xffffffffffff00ff,

                   DAT_00833fc8);

  uVar60 = param_3[2];

  uVar58 = pmaddwd(CONCAT62(uVar22,sVar48),DAT_00833fc8);

  *param_5 = CONCAT44((int)uVar40,(int)uVar55);

  uVar51 = DAT_00833fc8;

  uVar40 = param_3[2];

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar11 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x28) << 0x30) >> 0x28);

  uVar28 = CONCAT21(uVar11,(char)((ulonglong)uVar60 >> 0x20));

  uVar29 = CONCAT41((int)(((uint7)uVar28 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x18));

  uVar54 = (ushort)(byte)((ulonglong)uVar60 >> 0x10);

  uVar60 = CONCAT44(((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar61 + (int)((ulonglong)uVar61 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  bVar43 = (byte)((ulonglong)uVar40 >> 0x38);

  uVar39 = (ushort)((ulonglong)uVar40 >> 0x28);

  uVar14 = CONCAT23((short)(((uint5)bVar43 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar40 >> 0x30),uVar39));

  uVar55 = pmaddwd((ulonglong)CONCAT52(uVar29,uVar54),DAT_00833fc8);

  uVar58 = packssdw(uVar60,uVar60);

  uVar60 = *(undefined8 *)(param_4 + (int)param_3);

  uVar40 = pmaddwd((ulonglong)CONCAT52(uVar14 >> 0x10,uVar39) & 0xffffffff00ff,DAT_00833fc8);

  param_3 = (undefined8 *)((int)param_3 + param_4);

  uVar40 = CONCAT44(((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar40 = packssdw(uVar40,uVar40);

  uVar12 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x18) << 0x30) >> 0x28);

  uVar30 = CONCAT21(uVar12,(char)((ulonglong)uVar60 >> 0x10));

  uVar31 = CONCAT41((int)(((uint7)uVar30 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 8));

  puVar37[3] = CONCAT44((int)uVar40,(int)uVar58);

  uVar9 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x30) << 0x30) >> 0x28);

  uVar32 = CONCAT21(uVar9,(char)((ulonglong)uVar60 >> 0x28));

  uVar49 = (ushort)((ulonglong)uVar60 >> 0x18);

  uVar13 = CONCAT43((int)(((uint7)uVar32 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar60 >> 0x20),uVar49));

  uVar61 = CONCAT26((uVar12 >> 8) + (uVar38 >> 8) + (uVar3 >> 8) + (uVar9 >> 8),

                    CONCAT24((short)uVar30 + (short)uVar18 + (short)uVar20 + (short)uVar32,

                             CONCAT22((short)uVar31 + (short)uVar19 + (short)((uint7)uVar10 >> 0x10)

                                      + (short)((uint7)uVar13 >> 0x10),

                                      (ushort)(byte)uVar60 + (ushort)(byte)uVar56 + (uVar47 & 0xff)

                                      + (uVar49 & 0xff))));

  uVar56 = pmaddwd((ulonglong)CONCAT52(uVar31,(ushort)(byte)uVar60),uVar51);

  uVar60 = param_3[1];

  uVar40 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar13 >> 0x10),uVar49) & 0xffffffffffff00ff,

                   uVar51);

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar38 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x20) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar38,(char)((ulonglong)uVar60 >> 0x18));

  uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x10));

  bVar59 = (byte)((ulonglong)uVar60 >> 8);

  uVar40 = CONCAT44(((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar56 = param_3[2];

  uVar40 = packssdw(uVar40,uVar40);

  uVar3 = (ushort)((ulonglong)*param_3 >> 0x30);

  uVar47 = (ushort)(((uint7)bVar59 << 0x30) >> 0x28);

  uVar20 = CONCAT21(uVar47,(char)uVar60);

  uVar10 = CONCAT43((int)(((uint7)uVar20 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)*param_3 >> 0x38),uVar3));

  uVar60 = param_3[1];

  uVar55 = CONCAT26((uVar6 >> 8) + (uVar7 >> 8) + (uVar38 >> 8) + (uVar47 >> 8),

                    CONCAT24((short)uVar25 + (short)uVar26 + (short)uVar18 + (short)uVar20,

                             CONCAT22((short)uVar21 + (short)((uint7)uVar17 >> 0x10) + (short)uVar19

                                      + (short)((uint7)uVar10 >> 0x10),

                                      (ushort)bVar44 + (uVar5 & 0xff) + (ushort)bVar59 +

                                      (uVar3 & 0xff))));

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar3) & 0xffffffffffff00ff,

                   uVar51);

  uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x38) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar60 >> 0x30));

  uVar38 = (ushort)((ulonglong)uVar60 >> 0x20);

  uVar10 = CONCAT43((int)(((uint7)uVar18 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar60 >> 0x28),uVar38));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar19,(ushort)bVar59),uVar51);

  sVar46 = CONCAT11((char)((uint)DAT_00834040 >> 0x18),(char)((ulonglong)uVar56 >> 0x10));

  uVar34 = CONCAT31(CONCAT21(sVar46,(char)((uint)DAT_00834040 >> 0x10)),

                    (char)((ulonglong)uVar56 >> 8));

  uVar33 = CONCAT51(CONCAT41(uVar34,(char)((uint)DAT_00834040 >> 8)),(char)uVar56);

  sVar50 = CONCAT11((char)DAT_00834040,(char)((ulonglong)param_3[1] >> 0x38));

  uVar62 = CONCAT26((uVar8 >> 8) + sVar24 + (uVar3 >> 8) + sVar46,

                    CONCAT24((short)uVar27 + (short)uVar23 + (short)uVar18 + (short)uVar34,

                             CONCAT22((short)((uint7)uVar16 >> 0x10) + (short)uVar22 +

                                      (short)((uint7)uVar10 >> 0x10) + (short)uVar33,

                                      (uVar57 & 0xff) + sVar48 + (uVar38 & 0xff) + sVar50)));

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar56 = packssdw(uVar60,uVar60);

  uVar58 = pmaddwd((ulonglong)CONCAT52((int5)((uint7)uVar10 >> 0x10),uVar38) & 0xffffffffffff00ff,

                   DAT_00833fc8);

  uVar60 = param_3[2];

  uVar51 = pmaddwd(CONCAT62(uVar33,sVar50),DAT_00833fc8);

  puVar37[4] = CONCAT44((int)uVar56,(int)uVar40);

  uVar56 = param_3[2];

  iVar35 = (int)((ulonglong)DAT_00833fe0 >> 0x20);

  uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar60 >> 0x28) << 0x30) >> 0x28);

  uVar18 = CONCAT21(uVar3,(char)((ulonglong)uVar60 >> 0x20));

  uVar19 = CONCAT41((int)(((uint7)uVar18 << 0x20) >> 0x18),(char)((ulonglong)uVar60 >> 0x18));

  uVar47 = (ushort)(byte)((ulonglong)uVar60 >> 0x10);

  uVar60 = CONCAT44(((int)uVar51 + (int)((ulonglong)uVar51 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar58 + (int)((ulonglong)uVar58 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  bVar44 = (byte)((ulonglong)uVar56 >> 0x38);

  uVar38 = (ushort)((ulonglong)uVar56 >> 0x28);

  uVar15 = CONCAT23((short)(((uint5)bVar44 << 0x20) >> 0x18),

                    CONCAT12((char)((ulonglong)uVar56 >> 0x30),uVar38));

  uVar56 = pmaddwd((ulonglong)CONCAT52(uVar19,uVar47),DAT_00833fc8);

  uVar40 = packssdw(uVar60,uVar60);

  uVar58 = CONCAT26((uVar11 >> 8) + (uVar3 >> 8),

                    CONCAT24((short)uVar28 + (ushort)bVar43 + (short)uVar18 + (ushort)bVar44,

                             CONCAT22((short)uVar29 + (short)(uVar14 >> 0x10) + (short)uVar19 +

                                      (short)(uVar15 >> 0x10),

                                      uVar54 + (uVar39 & 0xff) + uVar47 + (uVar38 & 0xff))));

  uVar60 = pmaddwd((ulonglong)CONCAT52(uVar15 >> 0x10,uVar38) & 0xffffffff00ff,DAT_00833fc8);

  uVar60 = CONCAT44(((int)uVar60 + (int)((ulonglong)uVar60 >> 0x20)) - iVar35 >> 8,

                    ((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20)) - (int)DAT_00833fe0 >> 8);

  uVar60 = packssdw(uVar60,uVar60);

  puVar37[5] = CONCAT44((int)uVar60,(int)uVar40);

  uVar60 = pmaddwd(uVar61,DAT_00833fd0);

  uVar56 = pmaddwd(uVar61,DAT_00833fd8);

  uVar51 = pmaddwd(uVar55,DAT_00833fd0);

  uVar61 = pmaddwd(uVar62,DAT_00833fd0);

  uVar55 = pmaddwd(uVar55,DAT_00833fd8);

  iVar35 = (int)DAT_00833ff8;

  iVar1 = (int)((ulonglong)DAT_00833ff8 >> 0x20);

  uVar40 = pmaddwd(uVar62,DAT_00833fd8);

  uVar42 = CONCAT44((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar1 >> 10,

                    (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar35 >> 10) & _DAT_00834020 |

           (CONCAT44((int)uVar55 + (int)((ulonglong)uVar55 >> 0x20) + iVar1 >> 10,

                     (int)uVar51 + (int)((ulonglong)uVar51 >> 0x20) + iVar35 >> 10) & _DAT_00834020)

           << 0x10;

  uVar60 = pmaddwd(uVar58,DAT_00833fd0);

  uVar56 = pmaddwd(uVar58,DAT_00833fd8);

  uVar53 = (CONCAT44((int)uVar56 + (int)((ulonglong)uVar56 >> 0x20) + iVar1 >> 10,

                     (int)uVar60 + (int)((ulonglong)uVar60 >> 0x20) + iVar35 >> 10) & _DAT_00834020)

           << 0x10 | CONCAT44((int)uVar40 + (int)((ulonglong)uVar40 >> 0x20) + iVar1 >> 10,

                              (int)uVar61 + (int)((ulonglong)uVar61 >> 0x20) + iVar35 >> 10) &

                     _DAT_00834020;

  puVar36[2] = CONCAT44((int)uVar53,(int)uVar42);

  puVar36[0x12] = CONCAT44((int)(uVar53 >> 0x20),(int)(uVar42 >> 0x20));

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00657260 at 0x00657260 (size: 975) ---


undefined8 __fastcall

FUN_00657260(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined8 *param_5,

            undefined8 *param_6,undefined4 param_7,undefined8 *param_8)



{

  int iVar1;

  undefined4 in_EAX;

  int iVar2;

  int iVar3;

  int iVar4;

  int iVar5;

  int iVar6;

  undefined8 uVar7;

  ulonglong uVar8;

  undefined8 uVar9;

  ulonglong uVar10;

  undefined8 uVar11;

  undefined8 uVar12;

  undefined8 local_120;

  undefined8 local_118;

  undefined8 local_110;

  undefined8 local_108;

  undefined8 local_100;

  undefined8 local_f8;

  undefined8 local_f0;

  undefined8 local_e8;

  int local_e0 [16];

  int local_a0 [16];

  undefined8 local_60;

  undefined8 local_58;

  undefined8 local_50;

  undefined8 local_48;

  undefined8 local_40;

  undefined8 local_38;

  undefined8 local_30;

  undefined8 local_28;

  

  iVar4 = 0;

  iVar2 = 8;

  iVar3 = 0;

  iVar5 = 4;

  while( true ) {

    while( true ) {

      uVar11 = DAT_00834068;

      uVar8 = *(ulonglong *)(iVar4 + param_3) & DAT_00834050;

      iVar6 = (int)((ulonglong)DAT_00834060 >> 0x20);

      uVar9 = CONCAT44((uint)(byte)(uVar8 >> 0x38) - iVar6,(int)(uVar8 >> 0x18) - (int)DAT_00834060)

      ;

      uVar9 = packssdw(uVar9,uVar9);

      uVar12 = psubusb(DAT_00834048,*(ulonglong *)(iVar4 + param_3));

      *(int *)((int)&local_60 + iVar3) = (int)uVar9;

      uVar8 = (ulonglong)

              CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar12 >>

                                                                             0x18) << 0x30) >> 0x28)

                                                       ,(char)((ulonglong)uVar12 >> 0x10)) << 0x20)

                                     >> 0x18),(char)((ulonglong)uVar12 >> 8)),(ushort)(byte)uVar12);

      uVar7 = pmaddwd(DAT_00834070,uVar8);

      uVar10 = (ulonglong)

               CONCAT16((char)((ulonglong)uVar12 >> 0x38),

                        (uint6)CONCAT14((char)((ulonglong)uVar12 >> 0x30),

                                        (uint)CONCAT12((char)((ulonglong)uVar12 >> 0x28),

                                                       (ushort)(byte)((ulonglong)uVar12 >> 0x20))));

      uVar9 = pmaddwd(DAT_00834070,uVar10);

      iVar1 = (int)((ulonglong)DAT_00834058 >> 0x20);

      uVar9 = CONCAT44(((int)((ulonglong)uVar9 >> 0x20) + (int)uVar9) - iVar1 >> 8,

                       ((int)((ulonglong)uVar7 >> 0x20) + (int)uVar7) - (int)DAT_00834058 >> 8);

      uVar9 = packssdw(uVar9,uVar9);

      *(int *)((int)&local_120 + iVar3) = (int)uVar9;

      uVar7 = pmaddwd(DAT_00834078,uVar8);

      uVar9 = pmaddwd(DAT_00834078,uVar10);

      *(int *)((int)local_e0 + iVar3) =

           (int)((ulonglong)uVar7 >> 0x20) + (int)uVar7 +

           (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9;

      uVar7 = pmaddwd(DAT_00834080,uVar8);

      uVar9 = pmaddwd(DAT_00834080,uVar10);

      *(int *)((int)local_a0 + iVar3) =

           (int)((ulonglong)uVar7 >> 0x20) + (int)uVar7 +

           (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9;

      iVar2 = iVar2 + -1;

      if (iVar2 == 0) break;

      iVar4 = iVar4 + 8;

      iVar3 = iVar3 + 4;

    }

    iVar4 = 0;

    iVar2 = 8;

    while( true ) {

      uVar8 = *(ulonglong *)(iVar4 + param_3 + param_4);

      uVar10 = uVar8 & DAT_00834050;

      uVar9 = CONCAT44((uint)(byte)(uVar10 >> 0x38) - iVar6,

                       (int)(uVar10 >> 0x18) - (int)DAT_00834060);

      uVar9 = packssdw(uVar9,uVar9);

      uVar12 = psubusb(DAT_00834048,uVar8);

      *(int *)((int)&local_60 + iVar3 + 4) = (int)uVar9;

      uVar8 = (ulonglong)

              CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar12 >>

                                                                             0x18) << 0x30) >> 0x28)

                                                       ,(char)((ulonglong)uVar12 >> 0x10)) << 0x20)

                                     >> 0x18),(char)((ulonglong)uVar12 >> 8)),(ushort)(byte)uVar12);

      uVar7 = pmaddwd(DAT_00834070,uVar8);

      uVar10 = (ulonglong)

               CONCAT16((char)((ulonglong)uVar12 >> 0x38),

                        (uint6)CONCAT14((char)((ulonglong)uVar12 >> 0x30),

                                        (uint)CONCAT12((char)((ulonglong)uVar12 >> 0x28),

                                                       (ushort)(byte)((ulonglong)uVar12 >> 0x20))));

      uVar9 = pmaddwd(DAT_00834070,uVar10);

      uVar9 = CONCAT44(((int)((ulonglong)uVar9 >> 0x20) + (int)uVar9) - iVar1 >> 8,

                       ((int)((ulonglong)uVar7 >> 0x20) + (int)uVar7) - (int)DAT_00834058 >> 8);

      uVar9 = packssdw(uVar9,uVar9);

      *(int *)((int)&local_120 + iVar3 + 4) = (int)uVar9;

      uVar7 = pmaddwd(DAT_00834078,uVar8);

      uVar9 = pmaddwd(DAT_00834078,uVar10);

      *(int *)((int)local_e0 + iVar3 + 4) =

           (int)((ulonglong)uVar7 >> 0x20) + (int)uVar7 +

           (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9;

      uVar7 = pmaddwd(DAT_00834080,uVar8);

      uVar9 = pmaddwd(DAT_00834080,uVar10);

      *(int *)((int)local_a0 + iVar3 + 4) =

           (int)((ulonglong)uVar7 >> 0x20) + (int)uVar7 +

           (int)((ulonglong)uVar9 >> 0x20) + (int)uVar9;

      iVar2 = iVar2 + -1;

      if (iVar2 == 0) break;

      iVar4 = iVar4 + 8;

      iVar3 = iVar3 + 4;

    }

    *param_5 = local_120;

    param_5[1] = local_118;

    param_5[0x10] = local_110;

    param_5[0x11] = local_108;

    param_5[2] = local_100;

    param_5[3] = local_f8;

    param_5[0x12] = local_f0;

    param_5[0x13] = local_e8;

    iVar3 = (int)uVar11;

    iVar2 = (int)((ulonglong)uVar11 >> 0x20);

    uVar11 = packssdw(CONCAT44(SUB84(local_e0._32_8_,4) + SUB84(local_e0._0_8_,4) + iVar2 >> 10,

                               (int)local_e0._32_8_ + (int)local_e0._0_8_ + iVar3 >> 10),

                      CONCAT44(SUB84(local_e0._8_8_,4) + SUB84(local_e0._40_8_,4) + iVar2 >> 10,

                               (int)local_e0._8_8_ + (int)local_e0._40_8_ + iVar3 >> 10));

    *param_6 = uVar11;

    uVar11 = packssdw(CONCAT44(SUB84(local_e0._48_8_,4) + SUB84(local_e0._16_8_,4) + iVar2 >> 10,

                               (int)local_e0._48_8_ + (int)local_e0._16_8_ + iVar3 >> 10),

                      CONCAT44(SUB84(local_e0._24_8_,4) + SUB84(local_e0._56_8_,4) + iVar2 >> 10,

                               (int)local_e0._24_8_ + (int)local_e0._56_8_ + iVar3 >> 10));

    param_6[1] = uVar11;

    uVar11 = packssdw(CONCAT44(SUB84(local_a0._32_8_,4) + SUB84(local_a0._0_8_,4) + iVar2 >> 10,

                               (int)local_a0._32_8_ + (int)local_a0._0_8_ + iVar3 >> 10),

                      CONCAT44(SUB84(local_a0._8_8_,4) + SUB84(local_a0._40_8_,4) + iVar2 >> 10,

                               (int)local_a0._8_8_ + (int)local_a0._40_8_ + iVar3 >> 10));

    param_6[0x10] = uVar11;

    uVar11 = packssdw(CONCAT44(SUB84(local_a0._48_8_,4) + SUB84(local_a0._16_8_,4) + iVar2 >> 10,

                               (int)local_a0._48_8_ + (int)local_a0._16_8_ + iVar3 >> 10),

                      CONCAT44(SUB84(local_a0._24_8_,4) + SUB84(local_a0._56_8_,4) + iVar2 >> 10,

                               (int)local_a0._24_8_ + (int)local_a0._56_8_ + iVar3 >> 10));

    param_6[0x11] = uVar11;

    *param_8 = local_60;

    param_8[1] = local_58;

    param_8[0x10] = local_50;

    param_8[0x11] = local_48;

    param_8[2] = local_40;

    param_8[3] = local_38;

    param_8[0x12] = local_30;

    param_8[0x13] = local_28;

    iVar5 = iVar5 + -1;

    if (iVar5 == 0) break;

    iVar4 = 0;

    iVar3 = 0;

    iVar2 = 8;

    param_3 = param_3 + param_4 + param_4;

    param_5 = param_5 + 4;

    param_6 = param_6 + 2;

    param_8 = param_8 + 4;

  }

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00657630 at 0x00657630 (size: 323) ---


undefined4

FUN_00657630(undefined8 *param_1,int param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5)



{

  undefined8 uVar1;

  undefined8 uVar2;

  ushort uVar3;

  undefined8 uVar4;

  undefined4 in_EAX;

  int iVar5;

  ulonglong uVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  

  uVar4 = DAT_00834000;

  iVar5 = 8;

  do {

    uVar1 = *param_1;

    uVar2 = param_1[1];

    uVar6 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar2

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar2 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar2 >> 8),(short)uVar2)) >> 0x10),

                     (short)uVar2) & 0xffff00ff00ff00ff;

    sVar7 = (short)uVar4;

    sVar8 = (short)((ulonglong)uVar4 >> 0x10);

    sVar9 = (short)((ulonglong)uVar4 >> 0x20);

    sVar10 = (short)((ulonglong)uVar4 >> 0x30);

    *param_3 = CONCAT26((ushort)(byte)((ulonglong)uVar1 >> 0x30) - sVar10,

                        CONCAT24((ushort)(byte)((ulonglong)uVar1 >> 0x20) - sVar9,

                                 CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x10) - sVar8,

                                          (ushort)(byte)uVar1 - sVar7)));

    param_3[1] = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x30) - sVar10,

                          CONCAT24((ushort)(byte)((ulonglong)uVar2 >> 0x20) - sVar9,

                                   CONCAT22((short)(uVar6 >> 0x20) - sVar8,(short)uVar6 - sVar7)));

    *param_4 = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x28) - sVar10,

                        CONCAT24((short)(uVar6 >> 0x10) - sVar9,

                                 CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x28) - sVar8,

                                          (ushort)(byte)((ulonglong)uVar1 >> 8) - sVar7)));

    *param_5 = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x38) - sVar10,

                        CONCAT24((short)(uVar6 >> 0x30) - sVar9,

                                 CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x38) - sVar8,

                                          (ushort)(byte)((ulonglong)uVar1 >> 0x18) - sVar7)));

    uVar1 = param_1[2];

    uVar2 = param_1[3];

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar1 >> 0x18) << 0x30) >> 0x28);

    uVar6 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar2

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar2 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar2 >> 8),(short)uVar2)) >> 0x10),

                     (short)uVar2) & 0xffff00ff00ff00ff;

    param_3[0x10] =

         CONCAT26((ushort)(byte)((ulonglong)uVar1 >> 0x30) - sVar10,

                  CONCAT24((ushort)(byte)((ulonglong)uVar1 >> 0x20) - sVar9,

                           CONCAT22((short)CONCAT21(uVar3,(char)((ulonglong)uVar1 >> 0x10)) - sVar8,

                                    (ushort)(byte)uVar1 - sVar7)));

    param_3[0x11] =

         CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x30) - sVar10,

                  CONCAT24((ushort)(byte)((ulonglong)uVar2 >> 0x20) - sVar9,

                           CONCAT22((short)(uVar6 >> 0x20) - sVar8,(short)uVar6 - sVar7)));

    param_4[1] = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x28) - sVar10,

                          CONCAT24((short)(uVar6 >> 0x10) - sVar9,

                                   CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x28) - sVar8,

                                            (ushort)(byte)((ulonglong)uVar1 >> 8) - sVar7)));

    param_5[1] = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x38) - sVar10,

                          CONCAT24((short)(uVar6 >> 0x30) - sVar9,

                                   CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x38) - sVar8,

                                            (uVar3 >> 8) - sVar7)));

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_1 = (undefined8 *)((int)param_1 + param_2);

    iVar5 = iVar5 + -1;

  } while (iVar5 != 0);

  return in_EAX;

}





// --- FUN_00657780 at 0x00657780 (size: 273) ---


undefined4

FUN_00657780(undefined8 *param_1,int param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5)



{

  undefined8 uVar1;

  undefined4 in_EAX;

  int iVar2;

  ulonglong uVar3;

  undefined8 uVar4;

  ulonglong uVar5;

  undefined8 uVar6;

  ulonglong uVar7;

  undefined8 uVar8;

  ulonglong uVar9;

  undefined8 uVar10;

  undefined8 uVar11;

  undefined8 uVar12;

  short sVar13;

  short sVar14;

  short sVar15;

  short sVar16;

  

  uVar1 = DAT_00834000;

  iVar2 = 8;

  do {

    uVar4 = *param_1;

    uVar6 = param_1[1];

    uVar3 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar4 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar4 >> 8)),(ushort)(byte)uVar4);

    uVar7 = (ulonglong)

            CONCAT16((char)((ulonglong)uVar4 >> 0x38),

                     (uint6)CONCAT14((char)((ulonglong)uVar4 >> 0x30),

                                     (uint)CONCAT12((char)((ulonglong)uVar4 >> 0x28),

                                                    (ushort)(byte)((ulonglong)uVar4 >> 0x20))));

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar6

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar6 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar6 >> 8),(short)uVar6)) >> 0x10),

                     (short)uVar6) & 0xffff00ff00ff00ff;

    uVar9 = (ulonglong)

            CONCAT16((char)((ulonglong)uVar6 >> 0x38),

                     (uint6)CONCAT14((char)((ulonglong)uVar6 >> 0x30),

                                     (uint)CONCAT12((char)((ulonglong)uVar6 >> 0x28),

                                                    (ushort)(byte)((ulonglong)uVar6 >> 0x20))));

    uVar4 = pshufw(uVar3,uVar3,0xd8);

    uVar8 = pshufw(uVar7,uVar7,0xd8);

    uVar6 = pshufw(uVar5,uVar5,0xd8);

    uVar10 = pshufw(uVar9,uVar9,0xd8);

    uVar11 = CONCAT44((int)((ulonglong)uVar8 >> 0x20),(int)((ulonglong)uVar4 >> 0x20));

    uVar12 = CONCAT44((int)((ulonglong)uVar10 >> 0x20),(int)((ulonglong)uVar6 >> 0x20));

    sVar13 = (short)uVar1;

    sVar14 = (short)((ulonglong)uVar1 >> 0x10);

    sVar15 = (short)((ulonglong)uVar1 >> 0x20);

    sVar16 = (short)((ulonglong)uVar1 >> 0x30);

    *param_3 = CONCAT26((short)((ulonglong)uVar8 >> 0x10) - sVar16,

                        CONCAT24((short)uVar8 - sVar15,

                                 CONCAT22((short)((ulonglong)uVar4 >> 0x10) - sVar14,

                                          (short)uVar4 - sVar13)));

    param_3[1] = CONCAT26((short)((ulonglong)uVar10 >> 0x10) - sVar16,

                          CONCAT24((short)uVar10 - sVar15,

                                   CONCAT22((short)((ulonglong)uVar6 >> 0x10) - sVar14,

                                            (short)uVar6 - sVar13)));

    uVar4 = pshufw(uVar11,uVar11,0xd8);

    uVar6 = pshufw(uVar12,uVar12,0xd8);

    *param_4 = CONCAT26((short)((ulonglong)uVar6 >> 0x10) - sVar16,

                        CONCAT24((short)uVar6 - sVar15,

                                 CONCAT22((short)((ulonglong)uVar4 >> 0x10) - sVar14,

                                          (short)uVar4 - sVar13)));

    *param_5 = CONCAT26((short)((ulonglong)uVar6 >> 0x30) - sVar16,

                        CONCAT24((short)((ulonglong)uVar6 >> 0x20) - sVar15,

                                 CONCAT22((short)((ulonglong)uVar4 >> 0x30) - sVar14,

                                          (short)((ulonglong)uVar4 >> 0x20) - sVar13)));

    uVar4 = param_1[2];

    uVar6 = param_1[3];

    uVar3 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar4 >> 0x18

                                                                           ) << 0x30) >> 0x28),

                                                     (char)((ulonglong)uVar4 >> 0x10)) << 0x20) >>

                                   0x18),(char)((ulonglong)uVar4 >> 8)),(ushort)(byte)uVar4);

    uVar7 = (ulonglong)

            CONCAT16((char)((ulonglong)uVar4 >> 0x38),

                     (uint6)CONCAT14((char)((ulonglong)uVar4 >> 0x30),

                                     (uint)CONCAT12((char)((ulonglong)uVar4 >> 0x28),

                                                    (ushort)(byte)((ulonglong)uVar4 >> 0x20))));

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((ulonglong)uVar6

                                                                                  >> 0x18) << 0x30)

                                                                   >> 0x28),

                                                            (char)((ulonglong)uVar6 >> 0x10)) <<

                                           0x20) >> 0x18),

                                     CONCAT12((char)((ulonglong)uVar6 >> 8),(short)uVar6)) >> 0x10),

                     (short)uVar6) & 0xffff00ff00ff00ff;

    uVar9 = (ulonglong)

            CONCAT16((char)((ulonglong)uVar6 >> 0x38),

                     (uint6)CONCAT14((char)((ulonglong)uVar6 >> 0x30),

                                     (uint)CONCAT12((char)((ulonglong)uVar6 >> 0x28),

                                                    (ushort)(byte)((ulonglong)uVar6 >> 0x20))));

    uVar4 = pshufw(uVar3,uVar3,0xd8);

    uVar8 = pshufw(uVar7,uVar7,0xd8);

    uVar6 = pshufw(uVar5,uVar5,0xd8);

    uVar10 = pshufw(uVar9,uVar9,0xd8);

    uVar11 = CONCAT44((int)((ulonglong)uVar8 >> 0x20),(int)((ulonglong)uVar4 >> 0x20));

    uVar12 = CONCAT44((int)((ulonglong)uVar10 >> 0x20),(int)((ulonglong)uVar6 >> 0x20));

    param_3[0x10] =

         CONCAT26((short)((ulonglong)uVar8 >> 0x10) - sVar16,

                  CONCAT24((short)uVar8 - sVar15,

                           CONCAT22((short)((ulonglong)uVar4 >> 0x10) - sVar14,(short)uVar4 - sVar13

                                   )));

    param_3[0x11] =

         CONCAT26((short)((ulonglong)uVar10 >> 0x10) - sVar16,

                  CONCAT24((short)uVar10 - sVar15,

                           CONCAT22((short)((ulonglong)uVar6 >> 0x10) - sVar14,(short)uVar6 - sVar13

                                   )));

    uVar4 = pshufw(uVar11,uVar11,0xd8);

    uVar6 = pshufw(uVar12,uVar12,0xd8);

    param_4[1] = CONCAT26((short)((ulonglong)uVar6 >> 0x10) - sVar16,

                          CONCAT24((short)uVar6 - sVar15,

                                   CONCAT22((short)((ulonglong)uVar4 >> 0x10) - sVar14,

                                            (short)uVar4 - sVar13)));

    param_5[1] = CONCAT26((short)((ulonglong)uVar6 >> 0x30) - sVar16,

                          CONCAT24((short)((ulonglong)uVar6 >> 0x20) - sVar15,

                                   CONCAT22((short)((ulonglong)uVar4 >> 0x30) - sVar14,

                                            (short)((ulonglong)uVar4 >> 0x20) - sVar13)));

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_1 = (undefined8 *)((int)param_1 + param_2);

    iVar2 = iVar2 + -1;

  } while (iVar2 != 0);

  return in_EAX;

}





// --- FUN_006578a0 at 0x006578A0 (size: 99) ---


void FUN_006578a0(undefined8 *param_1,int param_2,undefined8 *param_3)



{

  undefined8 uVar1;

  undefined8 uVar2;

  ushort uVar3;

  ushort uVar4;

  undefined8 uVar5;

  int iVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  

  uVar5 = DAT_00834000;

  iVar6 = 4;

  do {

    uVar1 = *param_1;

    uVar2 = *(undefined8 *)(param_2 + (int)param_1);

    uVar4 = (ushort)(((uint7)(byte)((ulonglong)uVar1 >> 0x18) << 0x30) >> 0x28);

    uVar3 = (ushort)(((uint7)(byte)((ulonglong)uVar2 >> 0x18) << 0x30) >> 0x28);

    sVar7 = (short)uVar5;

    sVar8 = (short)((ulonglong)uVar5 >> 0x10);

    sVar9 = (short)((ulonglong)uVar5 >> 0x20);

    sVar10 = (short)((ulonglong)uVar5 >> 0x30);

    *param_3 = CONCAT26((uVar4 >> 8) - sVar10,

                        CONCAT24((short)CONCAT21(uVar4,(char)((ulonglong)uVar1 >> 0x10)) - sVar9,

                                 CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 8) - sVar8,

                                          (ushort)(byte)uVar1 - sVar7)));

    param_3[1] = CONCAT26((ushort)(byte)((ulonglong)uVar1 >> 0x38) - sVar10,

                          CONCAT24((ushort)(byte)((ulonglong)uVar1 >> 0x30) - sVar9,

                                   CONCAT22((ushort)(byte)((ulonglong)uVar1 >> 0x28) - sVar8,

                                            (ushort)(byte)((ulonglong)uVar1 >> 0x20) - sVar7)));

    param_3[2] = CONCAT26((uVar3 >> 8) - sVar10,

                          CONCAT24((short)CONCAT21(uVar3,(char)((ulonglong)uVar2 >> 0x10)) - sVar9,

                                   CONCAT22((ushort)(byte)((ulonglong)uVar2 >> 8) - sVar8,

                                            ((ushort)uVar2 & 0xff) - sVar7)));

    param_3[3] = CONCAT26((ushort)(byte)((ulonglong)uVar2 >> 0x38) - sVar10,

                          CONCAT24((ushort)(byte)((ulonglong)uVar2 >> 0x30) - sVar9,

                                   CONCAT22((ushort)(byte)((ulonglong)uVar2 >> 0x28) - sVar8,

                                            (ushort)(byte)((ulonglong)uVar2 >> 0x20) - sVar7)));

    param_1 = (undefined8 *)((int)param_1 + param_2 * 2);

    param_3 = param_3 + 4;

    iVar6 = iVar6 + -1;

  } while (iVar6 != 0);

  return;

}





// --- FUN_00657910 at 0x00657910 (size: 65) ---


void FUN_00657910(undefined8 *param_1,undefined8 *param_2,int param_3)



{

  undefined8 uVar1;

  undefined8 uVar2;

  undefined8 uVar3;

  undefined8 uVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  short sVar12;

  short sVar13;

  short sVar14;

  short sVar15;

  short sVar16;

  short sVar17;

  short sVar18;

  short sVar19;

  short sVar20;

  int iVar21;

  

  iVar21 = 4;

  do {

    uVar1 = *param_1;

    uVar2 = param_1[1];

    uVar3 = param_1[2];

    uVar4 = param_1[3];

    sVar5 = (short)uVar1;

    sVar7 = (short)((ulonglong)uVar1 >> 0x10);

    sVar9 = (short)((ulonglong)uVar1 >> 0x20);

    sVar11 = (short)((ulonglong)uVar1 >> 0x30);

    sVar13 = (short)uVar2;

    sVar15 = (short)((ulonglong)uVar2 >> 0x10);

    sVar17 = (short)((ulonglong)uVar2 >> 0x20);

    sVar19 = (short)((ulonglong)uVar2 >> 0x30);

    sVar6 = (short)uVar3;

    sVar8 = (short)((ulonglong)uVar3 >> 0x10);

    sVar10 = (short)((ulonglong)uVar3 >> 0x20);

    sVar12 = (short)((ulonglong)uVar3 >> 0x30);

    sVar14 = (short)uVar4;

    sVar16 = (short)((ulonglong)uVar4 >> 0x10);

    sVar18 = (short)((ulonglong)uVar4 >> 0x20);

    sVar20 = (short)((ulonglong)uVar4 >> 0x30);

    *param_2 = CONCAT17((0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar2 >> 0x30) -

                        (0xff < sVar19),

                        CONCAT16((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar2 >> 0x20)

                                 - (0xff < sVar17),

                                 CONCAT15((0 < sVar15) * (sVar15 < 0x100) *

                                          (char)((ulonglong)uVar2 >> 0x10) - (0xff < sVar15),

                                          CONCAT14((0 < sVar13) * (sVar13 < 0x100) * (char)uVar2 -

                                                   (0xff < sVar13),

                                                   CONCAT13((0 < sVar11) * (sVar11 < 0x100) *

                                                            (char)((ulonglong)uVar1 >> 0x30) -

                                                            (0xff < sVar11),

                                                            CONCAT12((0 < sVar9) * (sVar9 < 0x100) *

                                                                     (char)((ulonglong)uVar1 >> 0x20

                                                                           ) - (0xff < sVar9),

                                                                     CONCAT11((0 < sVar7) *

                                                                              (sVar7 < 0x100) *

                                                                              (char)((ulonglong)

                                                                                     uVar1 >> 0x10)

                                                                              - (0xff < sVar7),

                                                                              (0 < sVar5) *

                                                                              (sVar5 < 0x100) *

                                                                              (char)uVar1 -

                                                                              (0xff < sVar5))))))));

    *(ulonglong *)(param_3 + (int)param_2) =

         CONCAT17((0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar4 >> 0x30) -

                  (0xff < sVar20),

                  CONCAT16((0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar4 >> 0x20) -

                           (0xff < sVar18),

                           CONCAT15((0 < sVar16) * (sVar16 < 0x100) *

                                    (char)((ulonglong)uVar4 >> 0x10) - (0xff < sVar16),

                                    CONCAT14((0 < sVar14) * (sVar14 < 0x100) * (char)uVar4 -

                                             (0xff < sVar14),

                                             CONCAT13((0 < sVar12) * (sVar12 < 0x100) *

                                                      (char)((ulonglong)uVar3 >> 0x30) -

                                                      (0xff < sVar12),

                                                      CONCAT12((0 < sVar10) * (sVar10 < 0x100) *

                                                               (char)((ulonglong)uVar3 >> 0x20) -

                                                               (0xff < sVar10),

                                                               CONCAT11((0 < sVar8) *

                                                                        (sVar8 < 0x100) *

                                                                        (char)((ulonglong)uVar3 >>

                                                                              0x10) - (0xff < sVar8)

                                                                        ,(0 < sVar6) *

                                                                         (sVar6 < 0x100) *

                                                                         (char)uVar3 -

                                                                         (0xff < sVar6))))))));

    param_2 = (undefined8 *)((int)param_2 + param_3 * 2);

    param_1 = param_1 + 4;

    iVar21 = iVar21 + -1;

  } while (iVar21 != 0);

  return;

}





// --- FUN_00657960 at 0x00657960 (size: 556) ---


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



undefined8 __fastcall

FUN_00657960(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  bool bVar1;

  char cVar2;

  int iVar3;

  int iVar4;

  undefined4 in_EAX;

  int iVar5;

  short sVar6;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  short sVar12;

  short sVar13;

  ulonglong uVar7;

  short sVar14;

  short sVar18;

  short sVar19;

  undefined8 uVar15;

  undefined8 uVar16;

  short sVar20;

  ulonglong uVar17;

  short sVar21;

  undefined8 uVar22;

  ulonglong uVar23;

  short sVar24;

  undefined2 uVar25;

  short sVar26;

  short sVar29;

  short sVar30;

  short sVar31;

  short sVar32;

  undefined8 uVar27;

  undefined8 uVar28;

  short sVar33;

  short sVar34;

  undefined8 uVar35;

  ulonglong uVar36;

  undefined8 uVar37;

  undefined8 uVar38;

  undefined8 uVar39;

  ulonglong uVar40;

  undefined8 uVar41;

  ulonglong uVar42;

  ulonglong uVar43;

  

  iVar5 = 7;

  do {

    uVar15 = psllw(*param_5,4);

    uVar22 = psllw(param_5[1],4);

    uVar27 = psllw(*param_4,4);

    uVar35 = psllw(param_4[1],4);

    uVar16 = pmulhw(uVar15,DAT_00834090);

    uVar37 = pmulhw(DAT_00834090,uVar22);

    uVar28 = pmulhw(uVar27,DAT_00834098);

    sVar9 = (short)DAT_008340c0;

    sVar11 = (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar13 = (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar21 = (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar39 = pmulhw(DAT_00834098,uVar35);

    sVar26 = (short)DAT_008340b8;

    sVar30 = (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar32 = (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar34 = (short)((ulonglong)DAT_008340b8 >> 0x30);

    uVar38 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar27 >> 0x10),

                                       (short)((ulonglong)uVar15 >> 0x10)),

                              CONCAT22((short)uVar27,(short)uVar15)),DAT_008340a0);

    uVar15 = pmaddwd(CONCAT26((short)((ulonglong)uVar27 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar15 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar27 >> 0x20),

                                                (short)((ulonglong)uVar15 >> 0x20)))),DAT_008340a0);

    uVar41 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar35 >> 0x10),

                                       (short)((ulonglong)uVar22 >> 0x10)),

                              CONCAT22((short)uVar35,(short)uVar22)),DAT_008340a0);

    iVar3 = (int)DAT_008340c8;

    iVar4 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar22 = pmaddwd(CONCAT26((short)((ulonglong)uVar35 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar22 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar35 >> 0x20),

                                                (short)((ulonglong)uVar22 >> 0x20)))),DAT_008340a0);

    uVar27 = packssdw(CONCAT44((int)((ulonglong)uVar38 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar38 - iVar3 >> 0xc),

                      CONCAT44((int)((ulonglong)uVar15 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar15 - iVar3 >> 0xc));

    param_5 = param_5 + 2;

    uVar22 = packssdw(CONCAT44((int)((ulonglong)uVar41 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar41 - iVar3 >> 0xc),

                      CONCAT44((int)((ulonglong)uVar22 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar22 - iVar3 >> 0xc));

    uVar15 = *param_3;

    sVar6 = (short)uVar15;

    sVar14 = ((short)uVar16 - sVar9) + sVar6;

    sVar8 = (short)((ulonglong)uVar15 >> 0x10);

    sVar18 = ((short)((ulonglong)uVar16 >> 0x10) - sVar11) + sVar8;

    sVar10 = (short)((ulonglong)uVar15 >> 0x20);

    sVar19 = ((short)((ulonglong)uVar16 >> 0x20) - sVar13) + sVar10;

    sVar12 = (short)((ulonglong)uVar15 >> 0x30);

    sVar20 = ((short)((ulonglong)uVar16 >> 0x30) - sVar21) + sVar12;

    sVar24 = ((short)uVar28 - sVar26) + sVar6;

    sVar29 = ((short)((ulonglong)uVar28 >> 0x10) - sVar30) + sVar8;

    sVar31 = ((short)((ulonglong)uVar28 >> 0x20) - sVar32) + sVar10;

    sVar33 = ((short)((ulonglong)uVar28 >> 0x30) - sVar34) + sVar12;

    sVar6 = sVar6 - (short)uVar27;

    sVar8 = sVar8 - (short)((ulonglong)uVar27 >> 0x10);

    sVar10 = sVar10 - (short)((ulonglong)uVar27 >> 0x20);

    sVar12 = sVar12 - (short)((ulonglong)uVar27 >> 0x30);

    cVar2 = (0 < sVar29) * (sVar29 < 0x100) * (char)sVar29 - (0xff < sVar29);

    uVar25 = CONCAT11(cVar2,(0 < sVar24) * (sVar24 < 0x100) * (char)sVar24 - (0xff < sVar24));

    param_4 = param_4 + 2;

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar33) *

                                                                                   (sVar33 < 0x100)

                                                                                   * (char)sVar33 -

                                                                                  (0xff < sVar33))

                                                                    << 0x30) >> 0x28),

                                                            (0 < sVar31) * (sVar31 < 0x100) *

                                                            (char)sVar31 - (0xff < sVar31)) << 0x20)

                                          >> 0x18),CONCAT12(cVar2,uVar25)) >> 0x10),uVar25) &

            0xffffffff00ff00ff;

    uVar17 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar20) *

                                                                             (sVar20 < 0x100) *

                                                                             (char)sVar20 -

                                                                            (0xff < sVar20)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar19) * (sVar19 < 0x100) * (char)sVar19

                                                      - (0xff < sVar19)) << 0x20) >> 0x18),

                               (0 < sVar18) * (sVar18 < 0x100) * (char)sVar18 - (0xff < sVar18)),

                      (ushort)(byte)((0 < sVar14) * (sVar14 < 0x100) * (char)sVar14 -

                                    (0xff < sVar14))) |

             (ulonglong)

             CONCAT16((0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12),

                      (uint6)CONCAT14((0 < sVar10) * (sVar10 < 0x100) * (char)sVar10 -

                                      (0xff < sVar10),

                                      (uint)CONCAT12((0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 -

                                                     (0xff < sVar8),

                                                     (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                                                    (char)sVar6 - (0xff < sVar6)))))

             << 8;

    uVar42 = ~DAT_008340f0 & uVar7 | (uVar7 & DAT_008340f0) << 8;

    uVar23 = uVar17 & _DAT_008340d0;

    uVar15 = param_3[1];

    *param_6 = (uVar17 & _DAT_008340e0) << 8 |

               (uVar17 & _DAT_008340d8) << 0x10 | uVar17 & _DAT_008340e8 | (uVar42 << 0x20) >> 0x10;

    sVar6 = (short)uVar15;

    sVar8 = ((short)uVar37 - sVar9) + sVar6;

    sVar9 = (short)((ulonglong)uVar15 >> 0x10);

    sVar10 = ((short)((ulonglong)uVar37 >> 0x10) - sVar11) + sVar9;

    sVar11 = (short)((ulonglong)uVar15 >> 0x20);

    sVar12 = ((short)((ulonglong)uVar37 >> 0x20) - sVar13) + sVar11;

    sVar13 = (short)((ulonglong)uVar15 >> 0x30);

    sVar21 = ((short)((ulonglong)uVar37 >> 0x30) - sVar21) + sVar13;

    sVar26 = ((short)uVar39 - sVar26) + sVar6;

    sVar30 = ((short)((ulonglong)uVar39 >> 0x10) - sVar30) + sVar9;

    sVar32 = ((short)((ulonglong)uVar39 >> 0x20) - sVar32) + sVar11;

    sVar34 = ((short)((ulonglong)uVar39 >> 0x30) - sVar34) + sVar13;

    sVar6 = sVar6 - (short)uVar22;

    sVar9 = sVar9 - (short)((ulonglong)uVar22 >> 0x10);

    sVar11 = sVar11 - (short)((ulonglong)uVar22 >> 0x20);

    sVar13 = sVar13 - (short)((ulonglong)uVar22 >> 0x30);

    cVar2 = (0 < sVar30) * (sVar30 < 0x100) * (char)sVar30 - (0xff < sVar30);

    uVar25 = CONCAT11(cVar2,(0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26));

    uVar17 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                             (sVar21 < 0x100) *

                                                                             (char)sVar21 -

                                                                            (0xff < sVar21)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar12) * (sVar12 < 0x100) * (char)sVar12

                                                      - (0xff < sVar12)) << 0x20) >> 0x18),

                               (0 < sVar10) * (sVar10 < 0x100) * (char)sVar10 - (0xff < sVar10)),

                      (ushort)(byte)((0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 - (0xff < sVar8)));

    param_3 = param_3 + 2;

    uVar7 = (ulonglong)

            CONCAT16((0 < sVar13) * (sVar13 < 0x100) * (char)sVar13 - (0xff < sVar13),

                     (uint6)CONCAT14((0 < sVar11) * (sVar11 < 0x100) * (char)sVar11 -

                                     (0xff < sVar11),

                                     (uint)CONCAT12((0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 -

                                                    (0xff < sVar9),

                                                    (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                                                   (char)sVar6 - (0xff < sVar6)))))

            | ((ulonglong)

               CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar34) *

                                                                                      (sVar34 < 

                                                  0x100) * (char)sVar34 - (0xff < sVar34)) << 0x30)

                                                  >> 0x28),(0 < sVar32) * (sVar32 < 0x100) *

                                                           (char)sVar32 - (0xff < sVar32)) << 0x20)

                                             >> 0x18),CONCAT12(cVar2,uVar25)) >> 0x10),uVar25) &

              0xffffffff00ff00ff) << 8;

    uVar36 = ~DAT_008340f0 & uVar17 | (uVar17 & DAT_008340f0) << 8;

    uVar43 = uVar7 & _DAT_008340d8;

    uVar17 = uVar7 & _DAT_008340d0;

    uVar40 = uVar7 & _DAT_008340e0;

    param_6[1] = uVar23 >> 0x28 | uVar42 >> 0x20 | (uVar7 & _DAT_008340e8) << 0x28 | uVar36 << 0x20;

    param_6[2] = uVar17 | uVar43 >> 8 | (uVar36 >> 0x20) << 0x10 |

                 CONCAT44((uint)(uVar40 >> 0x30),(uint)uVar40 >> 0x10);

    param_6 = (ulonglong *)((int)param_6 + param_7);

    bVar1 = 0 < iVar5;

    iVar5 = iVar5 + -1;

  } while (bVar1);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00657b90 at 0x00657B90 (size: 556) ---


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



undefined8 __fastcall

FUN_00657b90(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  bool bVar1;

  char cVar2;

  int iVar3;

  int iVar4;

  undefined4 in_EAX;

  int iVar5;

  short sVar6;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  short sVar12;

  short sVar13;

  ulonglong uVar7;

  short sVar14;

  short sVar18;

  short sVar19;

  undefined8 uVar15;

  undefined8 uVar16;

  short sVar20;

  ulonglong uVar17;

  short sVar21;

  undefined8 uVar22;

  ulonglong uVar23;

  short sVar24;

  undefined2 uVar25;

  short sVar26;

  short sVar29;

  short sVar30;

  short sVar31;

  short sVar32;

  undefined8 uVar27;

  undefined8 uVar28;

  short sVar33;

  short sVar34;

  undefined8 uVar35;

  ulonglong uVar36;

  undefined8 uVar37;

  undefined8 uVar38;

  undefined8 uVar39;

  ulonglong uVar40;

  ulonglong uVar41;

  ulonglong uVar42;

  

  iVar5 = 7;

  do {

    uVar15 = psllw(*param_4,4);

    uVar22 = psllw(param_4[1],4);

    uVar27 = psllw(*param_5,4);

    uVar35 = psllw(param_5[1],4);

    uVar28 = pmulhw(uVar27,DAT_00834090);

    uVar16 = pmulhw(uVar15,DAT_00834098);

    uVar37 = pmulhw(DAT_00834098,uVar22);

    sVar26 = (short)DAT_008340c0;

    sVar30 = (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar32 = (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar34 = (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar39 = pmulhw(DAT_00834090,uVar35);

    sVar9 = (short)DAT_008340b8;

    sVar11 = (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar13 = (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar21 = (short)((ulonglong)DAT_008340b8 >> 0x30);

    uVar38 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar15 >> 0x10),

                                       (short)((ulonglong)uVar27 >> 0x10)),

                              CONCAT22((short)uVar15,(short)uVar27)),DAT_008340a0);

    uVar15 = pmaddwd(CONCAT26((short)((ulonglong)uVar15 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar27 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar15 >> 0x20),

                                                (short)((ulonglong)uVar27 >> 0x20)))),DAT_008340a0);

    iVar3 = (int)DAT_008340c8;

    iVar4 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar27 = packssdw(CONCAT44((int)((ulonglong)uVar38 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar38 - iVar3 >> 0xc),

                      CONCAT44((int)((ulonglong)uVar15 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar15 - iVar3 >> 0xc));

    uVar38 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar22 >> 0x10),

                                       (short)((ulonglong)uVar35 >> 0x10)),

                              CONCAT22((short)uVar22,(short)uVar35)),DAT_008340a0);

    uVar15 = pmaddwd(CONCAT26((short)((ulonglong)uVar22 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar35 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar22 >> 0x20),

                                                (short)((ulonglong)uVar35 >> 0x20)))),DAT_008340a0);

    uVar22 = packssdw(CONCAT44((int)((ulonglong)uVar38 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar38 - iVar3 >> 0xc),

                      CONCAT44((int)((ulonglong)uVar15 >> 0x20) - iVar4 >> 0xc,

                               (int)uVar15 - iVar3 >> 0xc));

    uVar15 = *param_3;

    sVar6 = (short)uVar15;

    sVar14 = ((short)uVar16 - sVar9) + sVar6;

    sVar8 = (short)((ulonglong)uVar15 >> 0x10);

    sVar18 = ((short)((ulonglong)uVar16 >> 0x10) - sVar11) + sVar8;

    sVar10 = (short)((ulonglong)uVar15 >> 0x20);

    sVar19 = ((short)((ulonglong)uVar16 >> 0x20) - sVar13) + sVar10;

    sVar12 = (short)((ulonglong)uVar15 >> 0x30);

    sVar20 = ((short)((ulonglong)uVar16 >> 0x30) - sVar21) + sVar12;

    sVar24 = ((short)uVar28 - sVar26) + sVar6;

    sVar29 = ((short)((ulonglong)uVar28 >> 0x10) - sVar30) + sVar8;

    sVar31 = ((short)((ulonglong)uVar28 >> 0x20) - sVar32) + sVar10;

    sVar33 = ((short)((ulonglong)uVar28 >> 0x30) - sVar34) + sVar12;

    sVar6 = sVar6 - (short)uVar27;

    sVar8 = sVar8 - (short)((ulonglong)uVar27 >> 0x10);

    sVar10 = sVar10 - (short)((ulonglong)uVar27 >> 0x20);

    sVar12 = sVar12 - (short)((ulonglong)uVar27 >> 0x30);

    cVar2 = (0 < sVar29) * (sVar29 < 0x100) * (char)sVar29 - (0xff < sVar29);

    uVar25 = CONCAT11(cVar2,(0 < sVar24) * (sVar24 < 0x100) * (char)sVar24 - (0xff < sVar24));

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar33) *

                                                                                   (sVar33 < 0x100)

                                                                                   * (char)sVar33 -

                                                                                  (0xff < sVar33))

                                                                    << 0x30) >> 0x28),

                                                            (0 < sVar31) * (sVar31 < 0x100) *

                                                            (char)sVar31 - (0xff < sVar31)) << 0x20)

                                          >> 0x18),CONCAT12(cVar2,uVar25)) >> 0x10),uVar25) &

            0xffffffff00ff00ff;

    uVar17 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar20) *

                                                                             (sVar20 < 0x100) *

                                                                             (char)sVar20 -

                                                                            (0xff < sVar20)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar19) * (sVar19 < 0x100) * (char)sVar19

                                                      - (0xff < sVar19)) << 0x20) >> 0x18),

                               (0 < sVar18) * (sVar18 < 0x100) * (char)sVar18 - (0xff < sVar18)),

                      (ushort)(byte)((0 < sVar14) * (sVar14 < 0x100) * (char)sVar14 -

                                    (0xff < sVar14))) |

             (ulonglong)

             CONCAT16((0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12),

                      (uint6)CONCAT14((0 < sVar10) * (sVar10 < 0x100) * (char)sVar10 -

                                      (0xff < sVar10),

                                      (uint)CONCAT12((0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 -

                                                     (0xff < sVar8),

                                                     (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                                                    (char)sVar6 - (0xff < sVar6)))))

             << 8;

    uVar41 = ~DAT_008340f0 & uVar7 | (uVar7 & DAT_008340f0) << 8;

    uVar23 = uVar17 & _DAT_008340d0;

    uVar15 = param_3[1];

    *param_6 = (uVar17 & _DAT_008340e0) << 8 |

               (uVar17 & _DAT_008340d8) << 0x10 | uVar17 & _DAT_008340e8 | (uVar41 << 0x20) >> 0x10;

    sVar6 = (short)uVar15;

    sVar8 = ((short)uVar37 - sVar9) + sVar6;

    sVar9 = (short)((ulonglong)uVar15 >> 0x10);

    sVar10 = ((short)((ulonglong)uVar37 >> 0x10) - sVar11) + sVar9;

    sVar11 = (short)((ulonglong)uVar15 >> 0x20);

    sVar12 = ((short)((ulonglong)uVar37 >> 0x20) - sVar13) + sVar11;

    sVar13 = (short)((ulonglong)uVar15 >> 0x30);

    sVar21 = ((short)((ulonglong)uVar37 >> 0x30) - sVar21) + sVar13;

    sVar26 = ((short)uVar39 - sVar26) + sVar6;

    sVar30 = ((short)((ulonglong)uVar39 >> 0x10) - sVar30) + sVar9;

    sVar32 = ((short)((ulonglong)uVar39 >> 0x20) - sVar32) + sVar11;

    sVar34 = ((short)((ulonglong)uVar39 >> 0x30) - sVar34) + sVar13;

    sVar6 = sVar6 - (short)uVar22;

    sVar9 = sVar9 - (short)((ulonglong)uVar22 >> 0x10);

    sVar11 = sVar11 - (short)((ulonglong)uVar22 >> 0x20);

    sVar13 = sVar13 - (short)((ulonglong)uVar22 >> 0x30);

    cVar2 = (0 < sVar30) * (sVar30 < 0x100) * (char)sVar30 - (0xff < sVar30);

    uVar25 = CONCAT11(cVar2,(0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26));

    uVar17 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                             (sVar21 < 0x100) *

                                                                             (char)sVar21 -

                                                                            (0xff < sVar21)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar12) * (sVar12 < 0x100) * (char)sVar12

                                                      - (0xff < sVar12)) << 0x20) >> 0x18),

                               (0 < sVar10) * (sVar10 < 0x100) * (char)sVar10 - (0xff < sVar10)),

                      (ushort)(byte)((0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 - (0xff < sVar8)));

    uVar7 = (ulonglong)

            CONCAT16((0 < sVar13) * (sVar13 < 0x100) * (char)sVar13 - (0xff < sVar13),

                     (uint6)CONCAT14((0 < sVar11) * (sVar11 < 0x100) * (char)sVar11 -

                                     (0xff < sVar11),

                                     (uint)CONCAT12((0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 -

                                                    (0xff < sVar9),

                                                    (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                                                   (char)sVar6 - (0xff < sVar6)))))

            | ((ulonglong)

               CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar34) *

                                                                                      (sVar34 < 

                                                  0x100) * (char)sVar34 - (0xff < sVar34)) << 0x30)

                                                  >> 0x28),(0 < sVar32) * (sVar32 < 0x100) *

                                                           (char)sVar32 - (0xff < sVar32)) << 0x20)

                                             >> 0x18),CONCAT12(cVar2,uVar25)) >> 0x10),uVar25) &

              0xffffffff00ff00ff) << 8;

    uVar36 = ~DAT_008340f0 & uVar17 | (uVar17 & DAT_008340f0) << 8;

    uVar42 = uVar7 & _DAT_008340d8;

    uVar17 = uVar7 & _DAT_008340d0;

    uVar40 = uVar7 & _DAT_008340e0;

    param_6[1] = uVar23 >> 0x28 | uVar41 >> 0x20 | (uVar7 & _DAT_008340e8) << 0x28 | uVar36 << 0x20;

    param_6[2] = uVar17 | uVar42 >> 8 | (uVar36 >> 0x20) << 0x10 |

                 CONCAT44((uint)(uVar40 >> 0x30),(uint)uVar40 >> 0x10);

    param_6 = (ulonglong *)((int)param_6 + param_7);

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    bVar1 = 0 < iVar5;

    iVar5 = iVar5 + -1;

  } while (bVar1);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00657dc0 at 0x00657DC0 (size: 453) ---


undefined8 __fastcall

FUN_00657dc0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  char cVar12;

  undefined4 uVar13;

  undefined4 in_EAX;

  int iVar14;

  undefined8 uVar15;

  ulonglong uVar16;

  undefined8 uVar17;

  undefined8 uVar18;

  undefined8 uVar19;

  undefined8 uVar20;

  ulonglong uVar21;

  

  iVar14 = 8;

  do {

    uVar17 = psllw(*param_5,4);

    uVar19 = psllw(*param_4,4);

    uVar15 = pmulhw(DAT_00834108,uVar17);

    uVar18 = pmulhw(DAT_00834110,uVar19);

    uVar20 = *param_3;

    uVar19 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar17 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar19 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar17 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar19 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar17 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar19 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar17 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar19 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar15 = paddsw(CONCAT26((short)((ulonglong)uVar15 >> 0x30) -

                             (short)((ulonglong)DAT_00834130 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar15 >> 0x20) -

                                      (short)((ulonglong)DAT_00834130 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar15 >> 0x10) -

                                               (short)((ulonglong)DAT_00834130 >> 0x10),

                                               (short)uVar15 - (short)DAT_00834130))),uVar20);

    uVar17 = paddsw(CONCAT26((short)((ulonglong)uVar18 >> 0x30) -

                             (short)((ulonglong)DAT_00834128 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar18 >> 0x20) -

                                      (short)((ulonglong)DAT_00834128 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar18 >> 0x10) -

                                               (short)((ulonglong)DAT_00834128 >> 0x10),

                                               (short)uVar18 - (short)DAT_00834128))),uVar20);

    uVar20 = psubsw(uVar20,uVar19);

    sVar1 = (short)uVar15;

    sVar4 = (short)((ulonglong)uVar15 >> 0x10);

    sVar6 = (short)((ulonglong)uVar15 >> 0x20);

    sVar9 = (short)((ulonglong)uVar15 >> 0x30);

    sVar2 = (short)uVar17;

    sVar3 = (short)((ulonglong)uVar17 >> 0x10);

    cVar12 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar17 >> 0x10) - (0xff < sVar3);

    sVar7 = (short)((ulonglong)uVar17 >> 0x20);

    sVar10 = (short)((ulonglong)uVar17 >> 0x30);

    sVar3 = (short)uVar20;

    sVar5 = (short)((ulonglong)uVar20 >> 0x10);

    sVar8 = (short)((ulonglong)uVar20 >> 0x20);

    sVar11 = (short)((ulonglong)uVar20 >> 0x30);

    uVar21 = (ulonglong)

             CONCAT12(cVar12,CONCAT11(cVar12,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar17 -

                                             (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar13 = (undefined4)

             (((uint7)(byte)((0 < sVar8) * (sVar8 < 0x100) * (char)((ulonglong)uVar20 >> 0x20) -

                            (0xff < sVar8)) << 0x20) >> 0x18);

    uVar16 = (ulonglong)

             CONCAT14((0 < sVar9) * (sVar9 < 0x100) * (char)((ulonglong)uVar15 >> 0x30) -

                      (0xff < sVar9),

                      (uint)(byte)((0 < sVar6) * (sVar6 < 0x100) * (char)((ulonglong)uVar15 >> 0x20)

                                  - (0xff < sVar6))) |

             (ulonglong)

             CONCAT42((uint)(byte)((0 < sVar10) * (sVar10 < 0x100) *

                                   (char)((ulonglong)uVar17 >> 0x30) - (0xff < sVar10)) << 0x10,

                      (ushort)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                     (char)((ulonglong)uVar17 >> 0x20) - (0xff < sVar7))) << 0x10 |

             CONCAT44((uint)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                   (char)((ulonglong)uVar20 >> 0x30) - (0xff < sVar11)) << 8,uVar13)

             | DAT_00834140;

    *param_6 = (ulonglong)

               CONCAT14((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                        (0xff < sVar4),

                        (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar15 - (0xff < sVar1)))

               | CONCAT44((uint)(ushort)(uVar21 >> 0x10) << 0x10,(int)uVar21 << 0x10) |

               CONCAT44((uint)(ushort)CONCAT41(uVar13,(0 < sVar5) * (sVar5 < 0x100) *

                                                      (char)((ulonglong)uVar20 >> 0x10) -

                                                      (0xff < sVar5)) << 8,

                        (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar20 - (0xff < sVar3))

                        << 8) | DAT_00834140;

    param_6[1] = uVar16;

    uVar17 = psllw(param_5[1],4);

    uVar18 = psllw(param_4[1],4);

    uVar19 = pmulhw(DAT_00834108,uVar17);

    uVar15 = pmulhw(DAT_00834110,uVar18);

    uVar20 = param_3[1];

    uVar17 = psraw(CONCAT26(((short)((ulonglong)DAT_00834118 >> 0x30) *

                             (ushort)((ulonglong)uVar18 >> 0x34) +

                            (short)((ulonglong)DAT_00834120 >> 0x30) *

                            (ushort)((ulonglong)uVar17 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834118 >> 0x20) *

                                      ((ushort)((ulonglong)uVar18 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834120 >> 0x20) *

                                     ((ushort)((ulonglong)uVar17 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834118 >> 0x10) *

                                               ((ushort)((ulonglong)uVar18 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834120 >> 0x10) *

                                              ((ushort)((ulonglong)uVar17 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834118 * ((ushort)uVar18 >> 4) +

                                              (short)DAT_00834120 * ((ushort)uVar17 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar18 = paddsw(CONCAT26((short)((ulonglong)uVar19 >> 0x30) -

                             (short)((ulonglong)DAT_00834130 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar19 >> 0x20) -

                                      (short)((ulonglong)DAT_00834130 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar19 >> 0x10) -

                                               (short)((ulonglong)DAT_00834130 >> 0x10),

                                               (short)uVar19 - (short)DAT_00834130))),uVar20);

    uVar15 = paddsw(CONCAT26((short)((ulonglong)uVar15 >> 0x30) -

                             (short)((ulonglong)DAT_00834128 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar15 >> 0x20) -

                                      (short)((ulonglong)DAT_00834128 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar15 >> 0x10) -

                                               (short)((ulonglong)DAT_00834128 >> 0x10),

                                               (short)uVar15 - (short)DAT_00834128))),uVar20);

    uVar20 = psubsw(uVar20,uVar17);

    sVar1 = (short)uVar18;

    sVar4 = (short)((ulonglong)uVar18 >> 0x10);

    sVar6 = (short)((ulonglong)uVar18 >> 0x20);

    sVar9 = (short)((ulonglong)uVar18 >> 0x30);

    sVar2 = (short)uVar15;

    sVar3 = (short)((ulonglong)uVar15 >> 0x10);

    cVar12 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) - (0xff < sVar3);

    sVar7 = (short)((ulonglong)uVar15 >> 0x20);

    sVar10 = (short)((ulonglong)uVar15 >> 0x30);

    sVar3 = (short)uVar20;

    sVar5 = (short)((ulonglong)uVar20 >> 0x10);

    sVar8 = (short)((ulonglong)uVar20 >> 0x20);

    sVar11 = (short)((ulonglong)uVar20 >> 0x30);

    uVar16 = (ulonglong)

             CONCAT12(cVar12,CONCAT11(cVar12,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar15 -

                                             (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar13 = (undefined4)

             (((uint7)(byte)((0 < sVar8) * (sVar8 < 0x100) * (char)((ulonglong)uVar20 >> 0x20) -

                            (0xff < sVar8)) << 0x20) >> 0x18);

    uVar21 = (ulonglong)

             CONCAT14((0 < sVar9) * (sVar9 < 0x100) * (char)((ulonglong)uVar18 >> 0x30) -

                      (0xff < sVar9),

                      (uint)(byte)((0 < sVar6) * (sVar6 < 0x100) * (char)((ulonglong)uVar18 >> 0x20)

                                  - (0xff < sVar6))) |

             (ulonglong)

             CONCAT42((uint)(byte)((0 < sVar10) * (sVar10 < 0x100) *

                                   (char)((ulonglong)uVar15 >> 0x30) - (0xff < sVar10)) << 0x10,

                      (ushort)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                     (char)((ulonglong)uVar15 >> 0x20) - (0xff < sVar7))) << 0x10 |

             CONCAT44((uint)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                   (char)((ulonglong)uVar20 >> 0x30) - (0xff < sVar11)) << 8,uVar13)

             | DAT_00834140;

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_6[2] = (ulonglong)

                 CONCAT14((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar18 >> 0x10) -

                          (0xff < sVar4),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar18 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar16 >> 0x10) << 0x10,(int)uVar16 << 0x10) |

                 CONCAT44((uint)(ushort)CONCAT41(uVar13,(0 < sVar5) * (sVar5 < 0x100) *

                                                        (char)((ulonglong)uVar20 >> 0x10) -

                                                        (0xff < sVar5)) << 8,

                          (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar20 - (0xff < sVar3)

                                      ) << 8) | DAT_00834140;

    param_6[3] = uVar21;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    iVar14 = iVar14 + -1;

  } while (iVar14 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00657f90 at 0x00657F90 (size: 531) ---


undefined8 __fastcall

FUN_00657f90(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,undefined4 param_6,ulonglong *param_7,int param_8)



{

  ulonglong uVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  uint uVar11;

  ushort uVar12;

  ushort uVar13;

  ushort uVar14;

  undefined4 in_EAX;

  int iVar15;

  undefined8 uVar16;

  short sVar17;

  short sVar19;

  short sVar20;

  undefined8 uVar18;

  short sVar21;

  undefined8 uVar22;

  ushort uVar24;

  undefined8 uVar23;

  undefined8 uVar25;

  

  iVar15 = 8;

  do {

    uVar18 = psllw(*param_5,4);

    uVar23 = psllw(*param_4,4);

    uVar16 = pmulhw(DAT_00834108,uVar18);

    uVar22 = pmulhw(DAT_00834110,uVar23);

    uVar25 = *param_3;

    uVar23 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar18 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar23 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar18 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar23 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar18 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar23 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar18 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar23 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar16 = paddsw(CONCAT26((short)((ulonglong)uVar16 >> 0x30) -

                             (short)((ulonglong)DAT_00834130 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar16 >> 0x20) -

                                      (short)((ulonglong)DAT_00834130 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar16 >> 0x10) -

                                               (short)((ulonglong)DAT_00834130 >> 0x10),

                                               (short)uVar16 - (short)DAT_00834130))),uVar25);

    uVar18 = paddsw(CONCAT26((short)((ulonglong)uVar22 >> 0x30) -

                             (short)((ulonglong)DAT_00834128 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar22 >> 0x20) -

                                      (short)((ulonglong)DAT_00834128 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar22 >> 0x10) -

                                               (short)((ulonglong)DAT_00834128 >> 0x10),

                                               (short)uVar22 - (short)DAT_00834128))),uVar25);

    uVar25 = psubsw(uVar25,uVar23);

    sVar2 = (short)uVar16;

    sVar5 = (short)((ulonglong)uVar16 >> 0x10);

    sVar8 = (short)((ulonglong)uVar16 >> 0x20);

    sVar17 = (short)((ulonglong)uVar16 >> 0x30);

    sVar3 = (short)uVar18;

    sVar6 = (short)((ulonglong)uVar18 >> 0x10);

    sVar9 = (short)((ulonglong)uVar18 >> 0x20);

    sVar19 = (short)((ulonglong)uVar18 >> 0x30);

    sVar4 = (short)uVar25;

    sVar7 = (short)((ulonglong)uVar25 >> 0x10);

    sVar10 = (short)((ulonglong)uVar25 >> 0x20);

    sVar20 = (short)((ulonglong)uVar25 >> 0x30);

    uVar14 = (ushort)(((uint7)(byte)((0 < sVar17) * (sVar17 < 0x100) *

                                     (char)((ulonglong)uVar16 >> 0x30) - (0xff < sVar17)) << 0x30)

                     >> 0x28);

    uVar12 = (ushort)(((uint7)(byte)((0 < sVar19) * (sVar19 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar19)) << 0x30)

                     >> 0x28);

    uVar13 = (ushort)(((uint7)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                     (char)((ulonglong)uVar25 >> 0x30) - (0xff < sVar20)) << 0x30)

                     >> 0x28);

    uVar1 = param_3[0x30];

    sVar17 = (short)DAT_00834148;

    sVar19 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar20 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar21 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar24 = sVar19 - (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar6));

    uVar11 = (uint)(ushort)(uVar1 >> 0x20);

    *param_7 = (ulonglong)

               CONCAT24(sVar19 - (ushort)(byte)((0 < sVar5) * (sVar5 < 0x100) *

                                                (char)((ulonglong)uVar16 >> 0x10) - (0xff < sVar5)),

                        (uint)(ushort)(sVar17 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                               (char)uVar16 - (0xff < sVar2)))) |

               CONCAT44((uint)uVar24 << 0x10,

                        CONCAT22(uVar24,sVar17 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                                (char)uVar18 - (0xff < sVar3))) <<

                        0x10) |

               CONCAT44((uint)(ushort)(sVar19 - (ushort)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                                               (char)((ulonglong)uVar25 >> 0x10) -

                                                              (0xff < sVar7))) << 8,

                        (uint)(ushort)(sVar17 - (ushort)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                                               (char)uVar25 - (0xff < sVar4))) << 8)

               | CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18)

    ;

    param_7[1] = (ulonglong)

                 CONCAT24(sVar21 - (uVar14 >> 8),

                          (uint)(ushort)(sVar20 - (short)CONCAT21(uVar14,(0 < sVar8) *

                                                                         (sVar8 < 0x100) *

                                                                         (char)((ulonglong)uVar16 >>

                                                                               0x20) -

                                                                         (0xff < sVar8)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar21 - (uVar12 >> 8)) << 0x10,

                          sVar20 - (short)CONCAT21(uVar12,(0 < sVar9) * (sVar9 < 0x100) *

                                                          (char)((ulonglong)uVar18 >> 0x20) -

                                                          (0xff < sVar9))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar21 - (uVar13 >> 8)) << 8,

                          (uint)(ushort)(sVar20 - (short)CONCAT21(uVar13,(0 < sVar10) *

                                                                         (sVar10 < 0x100) *

                                                                         (char)((ulonglong)uVar25 >>

                                                                               0x20) -

                                                                         (0xff < sVar10))) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar11) >> 0x10) << 8,uVar11 << 0x18

                         );

    uVar18 = psllw(param_5[1],4);

    uVar23 = psllw(param_4[1],4);

    uVar16 = pmulhw(DAT_00834108,uVar18);

    uVar22 = pmulhw(DAT_00834110,uVar23);

    uVar25 = param_3[1];

    uVar23 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar18 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar23 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar18 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar23 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar18 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar23 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar18 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar23 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar16 = paddsw(CONCAT26((short)((ulonglong)uVar16 >> 0x30) -

                             (short)((ulonglong)DAT_00834130 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar16 >> 0x20) -

                                      (short)((ulonglong)DAT_00834130 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar16 >> 0x10) -

                                               (short)((ulonglong)DAT_00834130 >> 0x10),

                                               (short)uVar16 - (short)DAT_00834130))),uVar25);

    uVar18 = paddsw(CONCAT26((short)((ulonglong)uVar22 >> 0x30) -

                             (short)((ulonglong)DAT_00834128 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar22 >> 0x20) -

                                      (short)((ulonglong)DAT_00834128 >> 0x20),

                                      CONCAT22((short)((ulonglong)uVar22 >> 0x10) -

                                               (short)((ulonglong)DAT_00834128 >> 0x10),

                                               (short)uVar22 - (short)DAT_00834128))),uVar25);

    uVar25 = psubsw(uVar25,uVar23);

    sVar2 = (short)uVar16;

    sVar5 = (short)((ulonglong)uVar16 >> 0x10);

    sVar8 = (short)((ulonglong)uVar16 >> 0x20);

    sVar17 = (short)((ulonglong)uVar16 >> 0x30);

    sVar3 = (short)uVar18;

    sVar6 = (short)((ulonglong)uVar18 >> 0x10);

    sVar9 = (short)((ulonglong)uVar18 >> 0x20);

    sVar19 = (short)((ulonglong)uVar18 >> 0x30);

    sVar4 = (short)uVar25;

    sVar7 = (short)((ulonglong)uVar25 >> 0x10);

    sVar10 = (short)((ulonglong)uVar25 >> 0x20);

    sVar20 = (short)((ulonglong)uVar25 >> 0x30);

    uVar14 = (ushort)(((uint7)(byte)((0 < sVar17) * (sVar17 < 0x100) *

                                     (char)((ulonglong)uVar16 >> 0x30) - (0xff < sVar17)) << 0x30)

                     >> 0x28);

    uVar12 = (ushort)(((uint7)(byte)((0 < sVar19) * (sVar19 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar19)) << 0x30)

                     >> 0x28);

    uVar13 = (ushort)(((uint7)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                     (char)((ulonglong)uVar25 >> 0x30) - (0xff < sVar20)) << 0x30)

                     >> 0x28);

    uVar1 = param_3[0x31];

    sVar17 = (short)DAT_00834148;

    sVar19 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar20 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar21 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar24 = sVar19 - (ushort)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar6));

    uVar11 = (uint)(ushort)(uVar1 >> 0x20);

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_7[2] = (ulonglong)

                 CONCAT24(sVar19 - (ushort)(byte)((0 < sVar5) * (sVar5 < 0x100) *

                                                  (char)((ulonglong)uVar16 >> 0x10) - (0xff < sVar5)

                                                 ),

                          (uint)(ushort)(sVar17 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                 (char)uVar16 - (0xff < sVar2)))) |

                 CONCAT44((uint)uVar24 << 0x10,

                          CONCAT22(uVar24,sVar17 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                                  (char)uVar18 - (0xff < sVar3))) <<

                          0x10) |

                 CONCAT44((uint)(ushort)(sVar19 - (ushort)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                                                 (char)((ulonglong)uVar25 >> 0x10) -

                                                                (0xff < sVar7))) << 8,

                          (uint)(ushort)(sVar17 - (ushort)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                                                 (char)uVar25 - (0xff < sVar4))) <<

                          8) |

                 CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18)

    ;

    param_7[3] = (ulonglong)

                 CONCAT24(sVar21 - (uVar14 >> 8),

                          (uint)(ushort)(sVar20 - (short)CONCAT21(uVar14,(0 < sVar8) *

                                                                         (sVar8 < 0x100) *

                                                                         (char)((ulonglong)uVar16 >>

                                                                               0x20) -

                                                                         (0xff < sVar8)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar21 - (uVar12 >> 8)) << 0x10,

                          sVar20 - (short)CONCAT21(uVar12,(0 < sVar9) * (sVar9 < 0x100) *

                                                          (char)((ulonglong)uVar18 >> 0x20) -

                                                          (0xff < sVar9))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar21 - (uVar13 >> 8)) << 8,

                          (uint)(ushort)(sVar20 - (short)CONCAT21(uVar13,(0 < sVar10) *

                                                                         (sVar10 < 0x100) *

                                                                         (char)((ulonglong)uVar25 >>

                                                                               0x20) -

                                                                         (0xff < sVar10))) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar11) >> 0x10) << 8,uVar11 << 0x18

                         );

    param_7 = (ulonglong *)((int)param_7 + param_8);

    iVar15 = iVar15 + -1;

  } while (iVar15 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_006581b0 at 0x006581B0 (size: 886) ---


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



undefined8 __fastcall

FUN_006581b0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  char cVar5;

  char cVar6;

  int iVar7;

  uint7 uVar8;

  undefined4 in_EAX;

  int iVar9;

  ulonglong uVar10;

  ulonglong uVar11;

  undefined2 uVar12;

  undefined8 uVar13;

  ulonglong uVar14;

  undefined8 uVar15;

  ulonglong uVar16;

  short sVar17;

  short sVar19;

  short sVar20;

  undefined8 uVar18;

  short sVar21;

  short sVar22;

  short sVar24;

  short sVar25;

  undefined8 uVar23;

  short sVar26;

  undefined2 uVar27;

  undefined2 uVar28;

  undefined8 uVar29;

  ulonglong uVar30;

  

  iVar9 = 8;

  do {

    uVar15 = psllw(*param_5,4);

    uVar13 = psllw(*param_4,4);

    uVar23 = pmulhw(DAT_00834098,uVar13);

    uVar18 = pmulhw(DAT_00834090,uVar15);

    sVar22 = (short)uVar23 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar23 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar23 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar23 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar17 = (short)uVar18 - (short)DAT_008340c0;

    sVar19 = (short)((ulonglong)uVar18 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar20 = (short)((ulonglong)uVar18 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar21 = (short)((ulonglong)uVar18 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar18 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                       (short)((ulonglong)uVar15 >> 0x10)),

                              CONCAT22((short)uVar13,(short)uVar15)),DAT_008340a0);

    uVar13 = pmaddwd(CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar15 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar13 >> 0x20),

                                                (short)((ulonglong)uVar15 >> 0x20)))),DAT_008340a0);

    iVar7 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar15 = CONCAT44((int)((ulonglong)uVar18 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar18 - (int)DAT_008340c8 >> 0xc);

    uVar13 = CONCAT44((int)((ulonglong)uVar13 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar13 - (int)DAT_008340c8 >> 0xc);

    uVar15 = packssdw(uVar15,uVar15);

    uVar18 = packssdw(uVar13,uVar13);

    uVar27 = (undefined2)((ulonglong)uVar15 >> 0x10);

    uVar12 = (undefined2)((ulonglong)uVar18 >> 0x10);

    uVar13 = *param_3;

    uVar29 = paddsw(CONCAT44(CONCAT22(sVar19,sVar19),CONCAT22(sVar17,sVar17)),uVar13);

    uVar23 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar22,sVar22)),uVar13);

    uVar13 = psubsw(uVar13,CONCAT44(CONCAT22(uVar27,uVar27),CONCAT22((short)uVar15,(short)uVar15)));

    sVar17 = (short)uVar29;

    sVar19 = (short)((ulonglong)uVar29 >> 0x10);

    cVar5 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar29 >> 0x10) - (0xff < sVar19);

    uVar28 = CONCAT11(cVar5,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar29 - (0xff < sVar17));

    sVar22 = (short)((ulonglong)uVar29 >> 0x20);

    sVar2 = (short)((ulonglong)uVar29 >> 0x30);

    sVar17 = (short)uVar23;

    sVar19 = (short)((ulonglong)uVar23 >> 0x10);

    cVar6 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) - (0xff < sVar19);

    uVar27 = CONCAT11(cVar6,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar23 - (0xff < sVar17));

    sVar24 = (short)((ulonglong)uVar23 >> 0x20);

    sVar3 = (short)((ulonglong)uVar23 >> 0x30);

    sVar17 = (short)uVar13;

    sVar19 = (short)((ulonglong)uVar13 >> 0x10);

    sVar1 = (short)((ulonglong)uVar13 >> 0x20);

    sVar4 = (short)((ulonglong)uVar13 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                                    (sVar2 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar29 >> 0x30) - (0xff < sVar2)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar22) * (sVar22 < 0x100) *

                                                  (char)((ulonglong)uVar29 >> 0x20) -

                                                  (0xff < sVar22)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar16 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar3) *

                                                                                    (sVar3 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar23 >> 0x30) - (0xff < sVar3)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar23 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar6,uVar27)) >> 0x10),uVar27) & 0xffffffff00ff00ff;

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar13 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar13 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar13 -

                                    (0xff < sVar17)));

    uVar30 = (uVar10 | uVar11 << 8) & _DAT_008340f8;

    uVar10 = (uVar11 | uVar16 << 8) & DAT_008340f0 | (uVar16 | uVar10 >> 8) & _DAT_008340f8;

    *param_6 = (uVar30 << 0x10 | uVar30) & _DAT_00834100 | (uVar10 << 0x20) >> 0x10;

    uVar13 = param_3[1];

    uVar23 = paddsw(CONCAT26(sVar26,CONCAT24(sVar26,CONCAT22(sVar25,sVar25))),uVar13);

    uVar15 = paddsw(CONCAT26(sVar21,CONCAT24(sVar21,CONCAT22(sVar20,sVar20))),uVar13);

    uVar13 = psubsw(uVar13,CONCAT44(CONCAT22(uVar12,uVar12),CONCAT22((short)uVar18,(short)uVar18)));

    sVar17 = (short)uVar23;

    sVar22 = (short)((ulonglong)uVar23 >> 0x10);

    sVar1 = (short)((ulonglong)uVar23 >> 0x20);

    sVar4 = (short)((ulonglong)uVar23 >> 0x30);

    sVar19 = (short)uVar15;

    sVar24 = (short)((ulonglong)uVar15 >> 0x10);

    cVar5 = (0 < sVar24) * (sVar24 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) - (0xff < sVar24);

    uVar12 = CONCAT11(cVar5,(0 < sVar19) * (sVar19 < 0x100) * (char)uVar15 - (0xff < sVar19));

    sVar2 = (short)((ulonglong)uVar15 >> 0x20);

    sVar20 = (short)((ulonglong)uVar15 >> 0x30);

    sVar19 = (short)uVar13;

    sVar24 = (short)((ulonglong)uVar13 >> 0x10);

    sVar3 = (short)((ulonglong)uVar13 >> 0x20);

    sVar21 = (short)((ulonglong)uVar13 >> 0x30);

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar23 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar23 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar22) * (sVar22 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) -

                               (0xff < sVar22)),

                      (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar23 -

                                    (0xff < sVar17)));

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar20) *

                                                                                    (sVar20 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar15 >> 0x30) - (0xff < sVar20)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar2) * (sVar2 < 0x100) *

                                                  (char)((ulonglong)uVar15 >> 0x20) - (0xff < sVar2)

                                                  ) << 0x20) >> 0x18),CONCAT12(cVar5,uVar12)) >>

                            0x10),uVar12) & 0xffffffff00ff00ff;

    uVar16 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                             (sVar21 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar13 >> 0x30)

                                                                            - (0xff < sVar21)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar3) * (sVar3 < 0x100) *

                                                      (char)((ulonglong)uVar13 >> 0x20) -

                                                      (0xff < sVar3)) << 0x20) >> 0x18),

                               (0 < sVar24) * (sVar24 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                               (0xff < sVar24)),

                      (ushort)(byte)((0 < sVar19) * (sVar19 < 0x100) * (char)uVar13 -

                                    (0xff < sVar19)));

    uVar30 = (uVar16 | uVar11 << 8) & DAT_008340f0;

    uVar16 = ((uVar11 | uVar14 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar14 | uVar16 << 8) & _DAT_008340f8;

    uVar11 = (uVar30 | uVar30 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar10 >> 0x20 | uVar16 << 0x20;

    param_6[2] = (uVar16 >> 0x20) << 0x10 | uVar11;

    uVar15 = psllw(param_5[1],4);

    uVar13 = psllw(param_4[1],4);

    uVar23 = pmulhw(DAT_00834098,uVar13);

    uVar18 = pmulhw(DAT_00834090,uVar15);

    sVar22 = (short)uVar23 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar23 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar23 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar23 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar17 = (short)uVar18 - (short)DAT_008340c0;

    sVar19 = (short)((ulonglong)uVar18 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar20 = (short)((ulonglong)uVar18 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar21 = (short)((ulonglong)uVar18 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar18 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                       (short)((ulonglong)uVar15 >> 0x10)),

                              CONCAT22((short)uVar13,(short)uVar15)),DAT_008340a0);

    uVar13 = pmaddwd(CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar15 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar13 >> 0x20),

                                                (short)((ulonglong)uVar15 >> 0x20)))),DAT_008340a0);

    iVar7 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar15 = CONCAT44((int)((ulonglong)uVar18 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar18 - (int)DAT_008340c8 >> 0xc);

    uVar13 = CONCAT44((int)((ulonglong)uVar13 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar13 - (int)DAT_008340c8 >> 0xc);

    uVar15 = packssdw(uVar15,uVar15);

    param_4 = param_4 + 2;

    uVar18 = packssdw(uVar13,uVar13);

    param_5 = param_5 + 2;

    uVar27 = (undefined2)((ulonglong)uVar15 >> 0x10);

    uVar12 = (undefined2)((ulonglong)uVar18 >> 0x10);

    uVar13 = param_3[0x10];

    uVar29 = paddsw(CONCAT44(CONCAT22(sVar19,sVar19),CONCAT22(sVar17,sVar17)),uVar13);

    uVar23 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar22,sVar22)),uVar13);

    uVar13 = psubsw(uVar13,CONCAT44(CONCAT22(uVar27,uVar27),CONCAT22((short)uVar15,(short)uVar15)));

    sVar17 = (short)uVar29;

    sVar19 = (short)((ulonglong)uVar29 >> 0x10);

    cVar5 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar29 >> 0x10) - (0xff < sVar19);

    uVar28 = CONCAT11(cVar5,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar29 - (0xff < sVar17));

    sVar22 = (short)((ulonglong)uVar29 >> 0x20);

    sVar2 = (short)((ulonglong)uVar29 >> 0x30);

    sVar17 = (short)uVar23;

    sVar19 = (short)((ulonglong)uVar23 >> 0x10);

    cVar6 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) - (0xff < sVar19);

    uVar27 = CONCAT11(cVar6,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar23 - (0xff < sVar17));

    sVar24 = (short)((ulonglong)uVar23 >> 0x20);

    sVar3 = (short)((ulonglong)uVar23 >> 0x30);

    sVar17 = (short)uVar13;

    sVar19 = (short)((ulonglong)uVar13 >> 0x10);

    sVar1 = (short)((ulonglong)uVar13 >> 0x20);

    sVar4 = (short)((ulonglong)uVar13 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                                    (sVar2 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar29 >> 0x30) - (0xff < sVar2)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar22) * (sVar22 < 0x100) *

                                                  (char)((ulonglong)uVar29 >> 0x20) -

                                                  (0xff < sVar22)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar16 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar3) *

                                                                                    (sVar3 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar23 >> 0x30) - (0xff < sVar3)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar23 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar6,uVar27)) >> 0x10),uVar27) & 0xffffffff00ff00ff;

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar13 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar13 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar13 -

                                    (0xff < sVar17)));

    uVar30 = (uVar10 | uVar11 << 8) & _DAT_008340f8;

    uVar16 = (uVar11 | uVar16 << 8) & DAT_008340f0 | (uVar16 | uVar10 >> 8) & _DAT_008340f8;

    param_6[3] = (uVar30 << 0x10 | uVar30) & _DAT_00834100 | (uVar16 << 0x20) >> 0x10;

    uVar13 = param_3[0x11];

    uVar15 = paddsw(CONCAT26(sVar21,CONCAT24(sVar21,CONCAT22(sVar20,sVar20))),uVar13);

    uVar23 = paddsw(CONCAT26(sVar26,CONCAT24(sVar26,CONCAT22(sVar25,sVar25))),uVar13);

    uVar13 = psubsw(uVar13,CONCAT44(CONCAT22(uVar12,uVar12),CONCAT22((short)uVar18,(short)uVar18)));

    sVar17 = (short)uVar15;

    sVar22 = (short)((ulonglong)uVar15 >> 0x10);

    sVar1 = (short)((ulonglong)uVar15 >> 0x20);

    sVar4 = (short)((ulonglong)uVar15 >> 0x30);

    sVar19 = (short)uVar23;

    sVar24 = (short)((ulonglong)uVar23 >> 0x10);

    cVar5 = (0 < sVar24) * (sVar24 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) - (0xff < sVar24);

    uVar12 = CONCAT11(cVar5,(0 < sVar19) * (sVar19 < 0x100) * (char)uVar23 - (0xff < sVar19));

    sVar2 = (short)((ulonglong)uVar23 >> 0x20);

    sVar20 = (short)((ulonglong)uVar23 >> 0x30);

    sVar19 = (short)uVar13;

    sVar24 = (short)((ulonglong)uVar13 >> 0x10);

    sVar3 = (short)((ulonglong)uVar13 >> 0x20);

    sVar21 = (short)((ulonglong)uVar13 >> 0x30);

    uVar8 = CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                            (sVar4 < 0x100) *

                                                                            (char)((ulonglong)uVar15

                                                                                  >> 0x30) -

                                                                           (0xff < sVar4)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar1) * (sVar1 < 0x100) *

                                                     (char)((ulonglong)uVar15 >> 0x20) -

                                                     (0xff < sVar1)) << 0x20) >> 0x18),

                              (0 < sVar22) * (sVar22 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                              (0xff < sVar22)),

                     (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar15 - (0xff < sVar17)

                                   ));

    uVar30 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar20) *

                                                                                    (sVar20 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar23 >> 0x30) - (0xff < sVar20)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar2) * (sVar2 < 0x100) *

                                                  (char)((ulonglong)uVar23 >> 0x20) - (0xff < sVar2)

                                                  ) << 0x20) >> 0x18),CONCAT12(cVar5,uVar12)) >>

                            0x10),uVar12) & 0xffffffff00ff00ff;

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                             (sVar21 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar13 >> 0x30)

                                                                            - (0xff < sVar21)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar3) * (sVar3 < 0x100) *

                                                      (char)((ulonglong)uVar13 >> 0x20) -

                                                      (0xff < sVar3)) << 0x20) >> 0x18),

                               (0 < sVar24) * (sVar24 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                               (0xff < sVar24)),

                      (ushort)(byte)((0 < sVar19) * (sVar19 < 0x100) * (char)uVar13 -

                                    (0xff < sVar19)));

    uVar10 = (uVar11 | uVar30 << 8) & DAT_008340f0;

    uVar30 = ((uVar30 | uVar8 >> 8) & _DAT_008340f8) << 0x10 |

             ((ulonglong)uVar8 | uVar11 << 8) & _DAT_008340f8;

    uVar11 = (uVar10 | uVar10 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar16 >> 0x20 | uVar30 << 0x20;

    param_6[5] = (uVar30 >> 0x20) << 0x10 | uVar11;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    param_3 = param_3 + 2;

    iVar9 = iVar9 + -1;

  } while (iVar9 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00658530 at 0x00658530 (size: 886) ---


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



undefined8 __fastcall

FUN_00658530(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  char cVar1;

  char cVar2;

  int iVar3;

  undefined4 in_EAX;

  int iVar4;

  ulonglong uVar5;

  ulonglong uVar6;

  short sVar7;

  undefined2 uVar8;

  short sVar11;

  undefined8 uVar9;

  ulonglong uVar10;

  short sVar12;

  short sVar15;

  short sVar16;

  undefined8 uVar13;

  ulonglong uVar14;

  short sVar17;

  short sVar19;

  short sVar20;

  undefined8 uVar18;

  short sVar21;

  short sVar22;

  short sVar24;

  short sVar25;

  undefined8 uVar23;

  short sVar26;

  undefined2 uVar27;

  undefined8 uVar28;

  ulonglong uVar29;

  

  iVar4 = 8;

  do {

    uVar13 = psllw(*param_5,4);

    uVar9 = psllw(*param_4,4);

    uVar23 = pmulhw(DAT_00834098,uVar9);

    uVar18 = pmulhw(DAT_00834090,uVar13);

    sVar22 = (short)uVar23 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar23 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar23 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar23 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar17 = (short)uVar18 - (short)DAT_008340c0;

    sVar19 = (short)((ulonglong)uVar18 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar20 = (short)((ulonglong)uVar18 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar21 = (short)((ulonglong)uVar18 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar18 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar9 >> 0x10),

                                       (short)((ulonglong)uVar13 >> 0x10)),

                              CONCAT22((short)uVar9,(short)uVar13)),DAT_008340a0);

    uVar9 = pmaddwd(CONCAT26((short)((ulonglong)uVar9 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar13 >> 0x30),

                                      CONCAT22((short)((ulonglong)uVar9 >> 0x20),

                                               (short)((ulonglong)uVar13 >> 0x20)))),DAT_008340a0);

    iVar3 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar13 = CONCAT44((int)((ulonglong)uVar18 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar18 - (int)DAT_008340c8 >> 0xc);

    uVar9 = CONCAT44((int)((ulonglong)uVar9 >> 0x20) - iVar3 >> 0xc,

                     (int)uVar9 - (int)DAT_008340c8 >> 0xc);

    uVar18 = packssdw(uVar13,uVar13);

    uVar13 = packssdw(uVar9,uVar9);

    uVar8 = (undefined2)((ulonglong)uVar18 >> 0x10);

    sVar15 = (short)((ulonglong)uVar13 >> 0x10);

    uVar9 = *param_3;

    uVar28 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar22,sVar22)),uVar9);

    uVar23 = paddsw(CONCAT44(CONCAT22(sVar19,sVar19),CONCAT22(sVar17,sVar17)),uVar9);

    uVar9 = psubsw(uVar9,CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar18,(short)uVar18)));

    sVar17 = (short)uVar28;

    sVar19 = (short)((ulonglong)uVar28 >> 0x10);

    cVar1 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar28 >> 0x10) - (0xff < sVar19);

    uVar27 = CONCAT11(cVar1,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar28 - (0xff < sVar17));

    sVar22 = (short)((ulonglong)uVar28 >> 0x20);

    sVar11 = (short)((ulonglong)uVar28 >> 0x30);

    sVar17 = (short)uVar23;

    sVar19 = (short)((ulonglong)uVar23 >> 0x10);

    cVar2 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) - (0xff < sVar19);

    uVar8 = CONCAT11(cVar2,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar23 - (0xff < sVar17));

    sVar24 = (short)((ulonglong)uVar23 >> 0x20);

    sVar12 = (short)((ulonglong)uVar23 >> 0x30);

    sVar17 = (short)uVar9;

    sVar19 = (short)((ulonglong)uVar9 >> 0x10);

    sVar7 = (short)((ulonglong)uVar9 >> 0x20);

    sVar16 = (short)((ulonglong)uVar9 >> 0x30);

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar11) *

                                                                                   (sVar11 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar28 >> 0x30) - (0xff < sVar11)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar22) * (sVar22 < 0x100) *

                                                  (char)((ulonglong)uVar28 >> 0x20) -

                                                  (0xff < sVar22)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar27)) >> 0x10),uVar27) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                    (sVar12 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar23 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar23 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar6 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar16) *

                                                                            (sVar16 < 0x100) *

                                                                            (char)((ulonglong)uVar9

                                                                                  >> 0x30) -

                                                                           (0xff < sVar16)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar7) * (sVar7 < 0x100) *

                                                     (char)((ulonglong)uVar9 >> 0x20) -

                                                     (0xff < sVar7)) << 0x20) >> 0x18),

                              (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar9 >> 0x10) -

                              (0xff < sVar19)),

                     (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar9 - (0xff < sVar17))

                    );

    uVar29 = (uVar5 | uVar6 << 8) & _DAT_008340f8;

    uVar5 = (uVar6 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar5 >> 8) & _DAT_008340f8;

    *param_6 = (uVar29 << 0x10 | uVar29) & _DAT_00834100 | (uVar5 << 0x20) >> 0x10;

    uVar9 = param_3[1];

    sVar17 = (short)uVar9;

    sVar12 = sVar20 + sVar17;

    sVar19 = (short)((ulonglong)uVar9 >> 0x10);

    sVar20 = sVar20 + sVar19;

    sVar22 = (short)((ulonglong)uVar9 >> 0x20);

    sVar16 = sVar21 + sVar22;

    sVar24 = (short)((ulonglong)uVar9 >> 0x30);

    sVar21 = sVar21 + sVar24;

    sVar7 = sVar25 + sVar17;

    sVar25 = sVar25 + sVar19;

    sVar11 = sVar26 + sVar22;

    sVar26 = sVar26 + sVar24;

    sVar17 = sVar17 - (short)uVar13;

    sVar19 = sVar19 - (short)uVar13;

    sVar22 = sVar22 - sVar15;

    sVar24 = sVar24 - sVar15;

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25);

    uVar8 = CONCAT11(cVar1,(0 < sVar7) * (sVar7 < 0x100) * (char)sVar7 - (0xff < sVar7));

    uVar6 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                            (sVar21 < 0x100) *

                                                                            (char)sVar21 -

                                                                           (0xff < sVar21)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar16) * (sVar16 < 0x100) * (char)sVar16

                                                     - (0xff < sVar16)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12)

                                   ));

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                                    (sVar26 < 0x100)

                                                                                    * (char)sVar26 -

                                                                                   (0xff < sVar26))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar11) * (sVar11 < 0x100) *

                                                             (char)sVar11 - (0xff < sVar11)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar8)) >> 0x10),uVar8) &

             0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                             (sVar24 < 0x100) *

                                                                             (char)sVar24 -

                                                                            (0xff < sVar24)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar22) * (sVar22 < 0x100) * (char)sVar22

                                                      - (0xff < sVar22)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)sVar19 - (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)sVar17 -

                                    (0xff < sVar17)));

    uVar29 = (uVar14 | uVar6 << 8) & DAT_008340f0;

    uVar14 = ((uVar6 | uVar10 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar10 | uVar14 << 8) & _DAT_008340f8;

    uVar6 = (uVar29 | uVar29 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar5 >> 0x20 | uVar14 << 0x20;

    param_6[2] = (uVar14 >> 0x20) << 0x10 | uVar6;

    uVar13 = psllw(param_5[1],4);

    uVar9 = psllw(param_4[1],4);

    uVar23 = pmulhw(DAT_00834098,uVar9);

    uVar18 = pmulhw(DAT_00834090,uVar13);

    sVar22 = (short)uVar23 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar23 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar23 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar23 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar17 = (short)uVar18 - (short)DAT_008340c0;

    sVar19 = (short)((ulonglong)uVar18 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar20 = (short)((ulonglong)uVar18 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar21 = (short)((ulonglong)uVar18 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar18 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar9 >> 0x10),

                                       (short)((ulonglong)uVar13 >> 0x10)),

                              CONCAT22((short)uVar9,(short)uVar13)),DAT_008340a0);

    uVar9 = pmaddwd(CONCAT26((short)((ulonglong)uVar9 >> 0x30),

                             CONCAT24((short)((ulonglong)uVar13 >> 0x30),

                                      CONCAT22((short)((ulonglong)uVar9 >> 0x20),

                                               (short)((ulonglong)uVar13 >> 0x20)))),DAT_008340a0);

    iVar3 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar13 = CONCAT44((int)((ulonglong)uVar18 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar18 - (int)DAT_008340c8 >> 0xc);

    uVar9 = CONCAT44((int)((ulonglong)uVar9 >> 0x20) - iVar3 >> 0xc,

                     (int)uVar9 - (int)DAT_008340c8 >> 0xc);

    uVar18 = packssdw(uVar13,uVar13);

    param_4 = param_4 + 2;

    uVar13 = packssdw(uVar9,uVar9);

    param_5 = param_5 + 2;

    uVar8 = (undefined2)((ulonglong)uVar18 >> 0x10);

    sVar15 = (short)((ulonglong)uVar13 >> 0x10);

    uVar9 = param_3[0x10];

    uVar28 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar22,sVar22)),uVar9);

    uVar23 = paddsw(CONCAT44(CONCAT22(sVar19,sVar19),CONCAT22(sVar17,sVar17)),uVar9);

    uVar9 = psubsw(uVar9,CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar18,(short)uVar18)));

    sVar17 = (short)uVar28;

    sVar19 = (short)((ulonglong)uVar28 >> 0x10);

    cVar1 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar28 >> 0x10) - (0xff < sVar19);

    uVar27 = CONCAT11(cVar1,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar28 - (0xff < sVar17));

    sVar22 = (short)((ulonglong)uVar28 >> 0x20);

    sVar11 = (short)((ulonglong)uVar28 >> 0x30);

    sVar17 = (short)uVar23;

    sVar19 = (short)((ulonglong)uVar23 >> 0x10);

    cVar2 = (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar23 >> 0x10) - (0xff < sVar19);

    uVar8 = CONCAT11(cVar2,(0 < sVar17) * (sVar17 < 0x100) * (char)uVar23 - (0xff < sVar17));

    sVar24 = (short)((ulonglong)uVar23 >> 0x20);

    sVar12 = (short)((ulonglong)uVar23 >> 0x30);

    sVar17 = (short)uVar9;

    sVar19 = (short)((ulonglong)uVar9 >> 0x10);

    sVar7 = (short)((ulonglong)uVar9 >> 0x20);

    sVar16 = (short)((ulonglong)uVar9 >> 0x30);

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar11) *

                                                                                   (sVar11 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar28 >> 0x30) - (0xff < sVar11)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar22) * (sVar22 < 0x100) *

                                                  (char)((ulonglong)uVar28 >> 0x20) -

                                                  (0xff < sVar22)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar27)) >> 0x10),uVar27) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                    (sVar12 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar23 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar23 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar6 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar16) *

                                                                            (sVar16 < 0x100) *

                                                                            (char)((ulonglong)uVar9

                                                                                  >> 0x30) -

                                                                           (0xff < sVar16)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar7) * (sVar7 < 0x100) *

                                                     (char)((ulonglong)uVar9 >> 0x20) -

                                                     (0xff < sVar7)) << 0x20) >> 0x18),

                              (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar9 >> 0x10) -

                              (0xff < sVar19)),

                     (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)uVar9 - (0xff < sVar17))

                    );

    uVar29 = (uVar5 | uVar6 << 8) & _DAT_008340f8;

    uVar5 = (uVar6 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar5 >> 8) & _DAT_008340f8;

    param_6[3] = (uVar29 << 0x10 | uVar29) & _DAT_00834100 | (uVar5 << 0x20) >> 0x10;

    uVar9 = param_3[0x11];

    sVar17 = (short)uVar9;

    sVar12 = sVar20 + sVar17;

    sVar19 = (short)((ulonglong)uVar9 >> 0x10);

    sVar20 = sVar20 + sVar19;

    sVar22 = (short)((ulonglong)uVar9 >> 0x20);

    sVar16 = sVar21 + sVar22;

    sVar24 = (short)((ulonglong)uVar9 >> 0x30);

    sVar21 = sVar21 + sVar24;

    sVar7 = sVar25 + sVar17;

    sVar25 = sVar25 + sVar19;

    sVar11 = sVar26 + sVar22;

    sVar26 = sVar26 + sVar24;

    sVar17 = sVar17 - (short)uVar13;

    sVar19 = sVar19 - (short)uVar13;

    sVar22 = sVar22 - sVar15;

    sVar24 = sVar24 - sVar15;

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25);

    uVar8 = CONCAT11(cVar1,(0 < sVar7) * (sVar7 < 0x100) * (char)sVar7 - (0xff < sVar7));

    uVar6 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                            (sVar21 < 0x100) *

                                                                            (char)sVar21 -

                                                                           (0xff < sVar21)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar16) * (sVar16 < 0x100) * (char)sVar16

                                                     - (0xff < sVar16)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12)

                                   ));

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                                    (sVar26 < 0x100)

                                                                                    * (char)sVar26 -

                                                                                   (0xff < sVar26))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar11) * (sVar11 < 0x100) *

                                                             (char)sVar11 - (0xff < sVar11)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar8)) >> 0x10),uVar8) &

             0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                             (sVar24 < 0x100) *

                                                                             (char)sVar24 -

                                                                            (0xff < sVar24)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar22) * (sVar22 < 0x100) * (char)sVar22

                                                      - (0xff < sVar22)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)sVar19 - (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar17) * (sVar17 < 0x100) * (char)sVar17 -

                                    (0xff < sVar17)));

    uVar29 = (uVar14 | uVar6 << 8) & DAT_008340f0;

    uVar14 = ((uVar6 | uVar10 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar10 | uVar14 << 8) & _DAT_008340f8;

    uVar6 = (uVar29 | uVar29 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar5 >> 0x20 | uVar14 << 0x20;

    param_6[5] = (uVar14 >> 0x20) << 0x10 | uVar6;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    param_3 = param_3 + 2;

    iVar4 = iVar4 + -1;

  } while (iVar4 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_006588b0 at 0x006588B0 (size: 860) ---


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



undefined8 __fastcall

FUN_006588b0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  char cVar5;

  char cVar6;

  int iVar7;

  uint7 uVar8;

  undefined4 in_EAX;

  int iVar9;

  ulonglong uVar10;

  ulonglong uVar11;

  undefined2 uVar12;

  undefined8 uVar13;

  ulonglong uVar14;

  ulonglong uVar15;

  undefined8 uVar16;

  ulonglong uVar17;

  short sVar18;

  short sVar20;

  short sVar21;

  undefined8 uVar19;

  short sVar22;

  short sVar23;

  short sVar25;

  short sVar26;

  undefined8 uVar24;

  short sVar27;

  undefined2 uVar28;

  undefined8 uVar29;

  undefined2 uVar30;

  undefined8 uVar31;

  

  iVar9 = 8;

  do {

    uVar16 = psllw(*param_5,4);

    uVar13 = psllw(*param_4,4);

    uVar24 = pmulhw(DAT_00834098,uVar13);

    uVar19 = pmulhw(DAT_00834090,uVar16);

    sVar23 = (short)uVar24 - (short)DAT_008340b8;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar18 = (short)uVar19 - (short)DAT_008340c0;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar19 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                       (short)((ulonglong)uVar16 >> 0x10)),

                              CONCAT22((short)uVar13,(short)uVar16)),DAT_008340a0);

    uVar16 = pmaddwd(CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar16 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar13 >> 0x20),

                                                (short)((ulonglong)uVar16 >> 0x20)))),DAT_008340a0);

    iVar7 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar19 - (int)DAT_008340c8 >> 0xc);

    uVar16 = CONCAT44((int)((ulonglong)uVar16 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar16 - (int)DAT_008340c8 >> 0xc);

    uVar24 = packssdw(uVar19,uVar19);

    uVar19 = packssdw(uVar16,uVar16);

    uVar28 = (undefined2)((ulonglong)uVar24 >> 0x10);

    uVar12 = (undefined2)((ulonglong)uVar19 >> 0x10);

    uVar16 = *param_3;

    uVar31 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar16);

    uVar29 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar28,uVar28),CONCAT22((short)uVar24,(short)uVar24)));

    sVar18 = (short)uVar31;

    sVar20 = (short)((ulonglong)uVar31 >> 0x10);

    cVar5 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar31 >> 0x10) - (0xff < sVar20);

    uVar30 = CONCAT11(cVar5,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar31 - (0xff < sVar18));

    sVar23 = (short)((ulonglong)uVar31 >> 0x20);

    sVar2 = (short)((ulonglong)uVar31 >> 0x30);

    sVar18 = (short)uVar29;

    sVar20 = (short)((ulonglong)uVar29 >> 0x10);

    cVar6 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar29 >> 0x10) - (0xff < sVar20);

    uVar28 = CONCAT11(cVar6,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar29 - (0xff < sVar18));

    sVar25 = (short)((ulonglong)uVar29 >> 0x20);

    sVar3 = (short)((ulonglong)uVar29 >> 0x30);

    sVar18 = (short)uVar16;

    sVar20 = (short)((ulonglong)uVar16 >> 0x10);

    sVar1 = (short)((ulonglong)uVar16 >> 0x20);

    sVar4 = (short)((ulonglong)uVar16 >> 0x30);

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                                    (sVar2 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar31 >> 0x30) - (0xff < sVar2)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar31 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar30)) >> 0x10),uVar30) & 0xffffffff00ff00ff;

    uVar17 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar3) *

                                                                                    (sVar3 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar29 >> 0x30) - (0xff < sVar3)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar29 >> 0x20) -

                                                  (0xff < sVar25)) << 0x20) >> 0x18),

                                      CONCAT12(cVar6,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar16 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar16 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar16 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar16 -

                                    (0xff < sVar18)));

    uVar10 = (uVar14 | uVar17 << 8) & DAT_008340f0 | (uVar17 | uVar11 >> 8) & _DAT_008340f8;

    uVar14 = pshufw(uVar13,(uVar11 | uVar14 << 8) & _DAT_008340f8,0x94);

    *param_6 = uVar14 | (uVar10 << 0x20) >> 0x10;

    uVar16 = param_3[1];

    uVar24 = paddsw(CONCAT26(sVar27,CONCAT24(sVar27,CONCAT22(sVar26,sVar26))),uVar16);

    uVar13 = paddsw(CONCAT26(sVar22,CONCAT24(sVar22,CONCAT22(sVar21,sVar21))),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar12,uVar12),CONCAT22((short)uVar19,(short)uVar19)));

    sVar18 = (short)uVar24;

    sVar23 = (short)((ulonglong)uVar24 >> 0x10);

    sVar1 = (short)((ulonglong)uVar24 >> 0x20);

    sVar4 = (short)((ulonglong)uVar24 >> 0x30);

    sVar20 = (short)uVar13;

    sVar25 = (short)((ulonglong)uVar13 >> 0x10);

    cVar5 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar25);

    uVar12 = CONCAT11(cVar5,(0 < sVar20) * (sVar20 < 0x100) * (char)uVar13 - (0xff < sVar20));

    sVar2 = (short)((ulonglong)uVar13 >> 0x20);

    sVar21 = (short)((ulonglong)uVar13 >> 0x30);

    sVar20 = (short)uVar16;

    sVar25 = (short)((ulonglong)uVar16 >> 0x10);

    sVar3 = (short)((ulonglong)uVar16 >> 0x20);

    sVar22 = (short)((ulonglong)uVar16 >> 0x30);

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar24 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar24 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) -

                               (0xff < sVar23)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar24 -

                                    (0xff < sVar18)));

    uVar15 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                                    (sVar21 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar21)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar2) * (sVar2 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) - (0xff < sVar2)

                                                  ) << 0x20) >> 0x18),CONCAT12(cVar5,uVar12)) >>

                            0x10),uVar12) & 0xffffffff00ff00ff;

    uVar17 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                             (sVar22 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar16 >> 0x30)

                                                                            - (0xff < sVar22)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar3) * (sVar3 < 0x100) *

                                                      (char)((ulonglong)uVar16 >> 0x20) -

                                                      (0xff < sVar3)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar16 >> 0x10) -

                               (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) * (char)uVar16 -

                                    (0xff < sVar20)));

    uVar11 = (uVar17 | uVar14 << 8) & DAT_008340f0;

    uVar17 = ((uVar14 | uVar15 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar15 | uVar17 << 8) & _DAT_008340f8;

    uVar14 = (uVar11 | uVar11 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar10 >> 0x20 | uVar17 << 0x20;

    param_6[2] = (uVar17 >> 0x20) << 0x10 | uVar14;

    uVar16 = psllw(param_5[1],4);

    uVar13 = psllw(param_4[1],4);

    uVar24 = pmulhw(DAT_00834098,uVar13);

    uVar19 = pmulhw(DAT_00834090,uVar16);

    sVar23 = (short)uVar24 - (short)DAT_008340b8;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar18 = (short)uVar19 - (short)DAT_008340c0;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar19 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar13 >> 0x10),

                                       (short)((ulonglong)uVar16 >> 0x10)),

                              CONCAT22((short)uVar13,(short)uVar16)),DAT_008340a0);

    uVar16 = pmaddwd(CONCAT26((short)((ulonglong)uVar13 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar16 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar13 >> 0x20),

                                                (short)((ulonglong)uVar16 >> 0x20)))),DAT_008340a0);

    iVar7 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar19 - (int)DAT_008340c8 >> 0xc);

    uVar16 = CONCAT44((int)((ulonglong)uVar16 >> 0x20) - iVar7 >> 0xc,

                      (int)uVar16 - (int)DAT_008340c8 >> 0xc);

    uVar24 = packssdw(uVar19,uVar19);

    param_4 = param_4 + 2;

    uVar19 = packssdw(uVar16,uVar16);

    param_5 = param_5 + 2;

    uVar28 = (undefined2)((ulonglong)uVar24 >> 0x10);

    uVar12 = (undefined2)((ulonglong)uVar19 >> 0x10);

    uVar16 = param_3[0x10];

    uVar31 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar16);

    uVar29 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar28,uVar28),CONCAT22((short)uVar24,(short)uVar24)));

    sVar18 = (short)uVar31;

    sVar20 = (short)((ulonglong)uVar31 >> 0x10);

    cVar5 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar31 >> 0x10) - (0xff < sVar20);

    uVar30 = CONCAT11(cVar5,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar31 - (0xff < sVar18));

    sVar23 = (short)((ulonglong)uVar31 >> 0x20);

    sVar2 = (short)((ulonglong)uVar31 >> 0x30);

    sVar18 = (short)uVar29;

    sVar20 = (short)((ulonglong)uVar29 >> 0x10);

    cVar6 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar29 >> 0x10) - (0xff < sVar20);

    uVar28 = CONCAT11(cVar6,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar29 - (0xff < sVar18));

    sVar25 = (short)((ulonglong)uVar29 >> 0x20);

    sVar3 = (short)((ulonglong)uVar29 >> 0x30);

    sVar18 = (short)uVar16;

    sVar20 = (short)((ulonglong)uVar16 >> 0x10);

    sVar1 = (short)((ulonglong)uVar16 >> 0x20);

    sVar4 = (short)((ulonglong)uVar16 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                                    (sVar2 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar31 >> 0x30) - (0xff < sVar2)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar31 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar30)) >> 0x10),uVar30) & 0xffffffff00ff00ff;

    uVar17 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar3) *

                                                                                    (sVar3 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar29 >> 0x30) - (0xff < sVar3)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar29 >> 0x20) -

                                                  (0xff < sVar25)) << 0x20) >> 0x18),

                                      CONCAT12(cVar6,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                             (sVar4 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar16 >> 0x30)

                                                                            - (0xff < sVar4)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar1) * (sVar1 < 0x100) *

                                                      (char)((ulonglong)uVar16 >> 0x20) -

                                                      (0xff < sVar1)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar16 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar16 -

                                    (0xff < sVar18)));

    uVar17 = (uVar14 | uVar17 << 8) & DAT_008340f0 | (uVar17 | uVar10 >> 8) & _DAT_008340f8;

    uVar14 = pshufw(uVar13,(uVar10 | uVar14 << 8) & _DAT_008340f8,0x94);

    param_6[3] = uVar14 | (uVar17 << 0x20) >> 0x10;

    uVar16 = param_3[0x11];

    uVar13 = paddsw(CONCAT26(sVar22,CONCAT24(sVar22,CONCAT22(sVar21,sVar21))),uVar16);

    uVar24 = paddsw(CONCAT26(sVar27,CONCAT24(sVar27,CONCAT22(sVar26,sVar26))),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar12,uVar12),CONCAT22((short)uVar19,(short)uVar19)));

    sVar18 = (short)uVar13;

    sVar23 = (short)((ulonglong)uVar13 >> 0x10);

    sVar1 = (short)((ulonglong)uVar13 >> 0x20);

    sVar4 = (short)((ulonglong)uVar13 >> 0x30);

    sVar20 = (short)uVar24;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10);

    cVar5 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar25);

    uVar12 = CONCAT11(cVar5,(0 < sVar20) * (sVar20 < 0x100) * (char)uVar24 - (0xff < sVar20));

    sVar2 = (short)((ulonglong)uVar24 >> 0x20);

    sVar21 = (short)((ulonglong)uVar24 >> 0x30);

    sVar20 = (short)uVar16;

    sVar25 = (short)((ulonglong)uVar16 >> 0x10);

    sVar3 = (short)((ulonglong)uVar16 >> 0x20);

    sVar22 = (short)((ulonglong)uVar16 >> 0x30);

    uVar8 = CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar4) *

                                                                            (sVar4 < 0x100) *

                                                                            (char)((ulonglong)uVar13

                                                                                  >> 0x30) -

                                                                           (0xff < sVar4)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar1) * (sVar1 < 0x100) *

                                                     (char)((ulonglong)uVar13 >> 0x20) -

                                                     (0xff < sVar1)) << 0x20) >> 0x18),

                              (0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) -

                              (0xff < sVar23)),

                     (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar13 - (0xff < sVar18)

                                   ));

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                                    (sVar21 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar24 >> 0x30) - (0xff < sVar21)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar2) * (sVar2 < 0x100) *

                                                  (char)((ulonglong)uVar24 >> 0x20) - (0xff < sVar2)

                                                  ) << 0x20) >> 0x18),CONCAT12(cVar5,uVar12)) >>

                            0x10),uVar12) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                             (sVar22 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar16 >> 0x30)

                                                                            - (0xff < sVar22)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar3) * (sVar3 < 0x100) *

                                                      (char)((ulonglong)uVar16 >> 0x20) -

                                                      (0xff < sVar3)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar16 >> 0x10) -

                               (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) * (char)uVar16 -

                                    (0xff < sVar20)));

    uVar10 = (uVar14 | uVar11 << 8) & DAT_008340f0;

    uVar11 = ((uVar11 | uVar8 >> 8) & _DAT_008340f8) << 0x10 |

             ((ulonglong)uVar8 | uVar14 << 8) & _DAT_008340f8;

    uVar14 = (uVar10 | uVar10 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar17 >> 0x20 | uVar11 << 0x20;

    param_6[5] = (uVar11 >> 0x20) << 0x10 | uVar14;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    param_3 = param_3 + 2;

    iVar9 = iVar9 + -1;

  } while (iVar9 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00658c10 at 0x00658C10 (size: 860) ---


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



undefined8 __fastcall

FUN_00658c10(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  char cVar1;

  char cVar2;

  int iVar3;

  undefined4 in_EAX;

  int iVar4;

  ulonglong uVar5;

  ulonglong uVar6;

  ulonglong uVar7;

  short sVar8;

  undefined2 uVar9;

  short sVar13;

  undefined8 uVar10;

  ulonglong uVar11;

  ulonglong uVar12;

  short sVar14;

  short sVar16;

  short sVar17;

  undefined8 uVar15;

  short sVar18;

  short sVar20;

  short sVar21;

  undefined8 uVar19;

  short sVar22;

  short sVar23;

  short sVar25;

  short sVar26;

  undefined8 uVar24;

  short sVar27;

  undefined8 uVar28;

  undefined2 uVar29;

  undefined8 uVar30;

  

  iVar4 = 8;

  do {

    uVar15 = psllw(*param_5,4);

    uVar10 = psllw(*param_4,4);

    uVar24 = pmulhw(DAT_00834098,uVar10);

    uVar19 = pmulhw(DAT_00834090,uVar15);

    sVar23 = (short)uVar24 - (short)DAT_008340b8;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar18 = (short)uVar19 - (short)DAT_008340c0;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar19 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                       (short)((ulonglong)uVar15 >> 0x10)),

                              CONCAT22((short)uVar10,(short)uVar15)),DAT_008340a0);

    uVar15 = pmaddwd(CONCAT26((short)((ulonglong)uVar10 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar15 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar10 >> 0x20),

                                                (short)((ulonglong)uVar15 >> 0x20)))),DAT_008340a0);

    iVar3 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar19 - (int)DAT_008340c8 >> 0xc);

    uVar15 = CONCAT44((int)((ulonglong)uVar15 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar15 - (int)DAT_008340c8 >> 0xc);

    uVar24 = packssdw(uVar19,uVar19);

    uVar19 = packssdw(uVar15,uVar15);

    uVar9 = (undefined2)((ulonglong)uVar24 >> 0x10);

    sVar16 = (short)((ulonglong)uVar19 >> 0x10);

    uVar15 = *param_3;

    uVar30 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar15);

    uVar28 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar15);

    uVar15 = psubsw(uVar15,CONCAT44(CONCAT22(uVar9,uVar9),CONCAT22((short)uVar24,(short)uVar24)));

    sVar18 = (short)uVar30;

    sVar20 = (short)((ulonglong)uVar30 >> 0x10);

    cVar1 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar30 >> 0x10) - (0xff < sVar20);

    uVar29 = CONCAT11(cVar1,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar30 - (0xff < sVar18));

    sVar23 = (short)((ulonglong)uVar30 >> 0x20);

    sVar13 = (short)((ulonglong)uVar30 >> 0x30);

    sVar18 = (short)uVar28;

    sVar20 = (short)((ulonglong)uVar28 >> 0x10);

    cVar2 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar28 >> 0x10) - (0xff < sVar20);

    uVar9 = CONCAT11(cVar2,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar28 - (0xff < sVar18));

    sVar25 = (short)((ulonglong)uVar28 >> 0x20);

    sVar14 = (short)((ulonglong)uVar28 >> 0x30);

    sVar18 = (short)uVar15;

    sVar20 = (short)((ulonglong)uVar15 >> 0x10);

    sVar8 = (short)((ulonglong)uVar15 >> 0x20);

    sVar17 = (short)((ulonglong)uVar15 >> 0x30);

    uVar6 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar13) *

                                                                                   (sVar13 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar30 >> 0x30) - (0xff < sVar13)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar30 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar29)) >> 0x10),uVar29) & 0xffffffff00ff00ff;

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                                   (sVar14 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar28 >> 0x30) - (0xff < sVar14)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar28 >> 0x20) -

                                                  (0xff < sVar25)) << 0x20) >> 0x18),

                                     CONCAT12(cVar2,uVar9)) >> 0x10),uVar9) & 0xffffffff00ff00ff;

    uVar7 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar17) *

                                                                            (sVar17 < 0x100) *

                                                                            (char)((ulonglong)uVar15

                                                                                  >> 0x30) -

                                                                           (0xff < sVar17)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar8) * (sVar8 < 0x100) *

                                                     (char)((ulonglong)uVar15 >> 0x20) -

                                                     (0xff < sVar8)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                              (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar15 - (0xff < sVar18)

                                   ));

    uVar11 = pshufw(uVar10,(uVar6 | uVar7 << 8) & _DAT_008340f8,0x94);

    uVar5 = (uVar7 | uVar5 << 8) & DAT_008340f0 | (uVar5 | uVar6 >> 8) & _DAT_008340f8;

    *param_6 = uVar11 | (uVar5 << 0x20) >> 0x10;

    uVar15 = param_3[1];

    sVar18 = (short)uVar15;

    sVar14 = sVar21 + sVar18;

    sVar20 = (short)((ulonglong)uVar15 >> 0x10);

    sVar21 = sVar21 + sVar20;

    sVar23 = (short)((ulonglong)uVar15 >> 0x20);

    sVar17 = sVar22 + sVar23;

    sVar25 = (short)((ulonglong)uVar15 >> 0x30);

    sVar22 = sVar22 + sVar25;

    sVar8 = sVar26 + sVar18;

    sVar26 = sVar26 + sVar20;

    sVar13 = sVar27 + sVar23;

    sVar27 = sVar27 + sVar25;

    sVar18 = sVar18 - (short)uVar19;

    sVar20 = sVar20 - (short)uVar19;

    sVar23 = sVar23 - sVar16;

    sVar25 = sVar25 - sVar16;

    cVar1 = (0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26);

    uVar9 = CONCAT11(cVar1,(0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 - (0xff < sVar8));

    uVar7 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                            (sVar22 < 0x100) *

                                                                            (char)sVar22 -

                                                                           (0xff < sVar22)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar17) * (sVar17 < 0x100) * (char)sVar17

                                                     - (0xff < sVar17)) << 0x20) >> 0x18),

                              (0 < sVar21) * (sVar21 < 0x100) * (char)sVar21 - (0xff < sVar21)),

                     (ushort)(byte)((0 < sVar14) * (sVar14 < 0x100) * (char)sVar14 - (0xff < sVar14)

                                   ));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar27) *

                                                                                    (sVar27 < 0x100)

                                                                                    * (char)sVar27 -

                                                                                   (0xff < sVar27))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar13) * (sVar13 < 0x100) *

                                                             (char)sVar13 - (0xff < sVar13)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar9)) >> 0x10),uVar9) &

             0xffffffff00ff00ff;

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                             (sVar25 < 0x100) *

                                                                             (char)sVar25 -

                                                                            (0xff < sVar25)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar23) * (sVar23 < 0x100) * (char)sVar23

                                                      - (0xff < sVar23)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)sVar18 -

                                    (0xff < sVar18)));

    uVar6 = (uVar11 | uVar7 << 8) & DAT_008340f0;

    uVar11 = ((uVar7 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar11 << 8) & _DAT_008340f8;

    uVar7 = (uVar6 | uVar6 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar5 >> 0x20 | uVar11 << 0x20;

    param_6[2] = (uVar11 >> 0x20) << 0x10 | uVar7;

    uVar15 = psllw(param_5[1],4);

    uVar10 = psllw(param_4[1],4);

    uVar24 = pmulhw(DAT_00834098,uVar10);

    uVar19 = pmulhw(DAT_00834090,uVar15);

    sVar23 = (short)uVar24 - (short)DAT_008340b8;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar18 = (short)uVar19 - (short)DAT_008340c0;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar19 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                       (short)((ulonglong)uVar15 >> 0x10)),

                              CONCAT22((short)uVar10,(short)uVar15)),DAT_008340a0);

    uVar15 = pmaddwd(CONCAT26((short)((ulonglong)uVar10 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar15 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar10 >> 0x20),

                                                (short)((ulonglong)uVar15 >> 0x20)))),DAT_008340a0);

    iVar3 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar19 = CONCAT44((int)((ulonglong)uVar19 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar19 - (int)DAT_008340c8 >> 0xc);

    uVar15 = CONCAT44((int)((ulonglong)uVar15 >> 0x20) - iVar3 >> 0xc,

                      (int)uVar15 - (int)DAT_008340c8 >> 0xc);

    uVar24 = packssdw(uVar19,uVar19);

    param_4 = param_4 + 2;

    uVar19 = packssdw(uVar15,uVar15);

    param_5 = param_5 + 2;

    uVar9 = (undefined2)((ulonglong)uVar24 >> 0x10);

    sVar16 = (short)((ulonglong)uVar19 >> 0x10);

    uVar15 = param_3[0x10];

    uVar30 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar15);

    uVar28 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar15);

    uVar15 = psubsw(uVar15,CONCAT44(CONCAT22(uVar9,uVar9),CONCAT22((short)uVar24,(short)uVar24)));

    sVar18 = (short)uVar30;

    sVar20 = (short)((ulonglong)uVar30 >> 0x10);

    cVar1 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar30 >> 0x10) - (0xff < sVar20);

    uVar29 = CONCAT11(cVar1,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar30 - (0xff < sVar18));

    sVar23 = (short)((ulonglong)uVar30 >> 0x20);

    sVar13 = (short)((ulonglong)uVar30 >> 0x30);

    sVar18 = (short)uVar28;

    sVar20 = (short)((ulonglong)uVar28 >> 0x10);

    cVar2 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar28 >> 0x10) - (0xff < sVar20);

    uVar9 = CONCAT11(cVar2,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar28 - (0xff < sVar18));

    sVar25 = (short)((ulonglong)uVar28 >> 0x20);

    sVar14 = (short)((ulonglong)uVar28 >> 0x30);

    sVar18 = (short)uVar15;

    sVar20 = (short)((ulonglong)uVar15 >> 0x10);

    sVar8 = (short)((ulonglong)uVar15 >> 0x20);

    sVar17 = (short)((ulonglong)uVar15 >> 0x30);

    uVar6 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar13) *

                                                                                   (sVar13 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar30 >> 0x30) - (0xff < sVar13)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar30 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar29)) >> 0x10),uVar29) & 0xffffffff00ff00ff;

    uVar5 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                                   (sVar14 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar28 >> 0x30) - (0xff < sVar14)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar28 >> 0x20) -

                                                  (0xff < sVar25)) << 0x20) >> 0x18),

                                     CONCAT12(cVar2,uVar9)) >> 0x10),uVar9) & 0xffffffff00ff00ff;

    uVar7 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar17) *

                                                                            (sVar17 < 0x100) *

                                                                            (char)((ulonglong)uVar15

                                                                                  >> 0x30) -

                                                                           (0xff < sVar17)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar8) * (sVar8 < 0x100) *

                                                     (char)((ulonglong)uVar15 >> 0x20) -

                                                     (0xff < sVar8)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) -

                              (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar15 - (0xff < sVar18)

                                   ));

    uVar11 = pshufw(uVar10,(uVar6 | uVar7 << 8) & _DAT_008340f8,0x94);

    uVar5 = (uVar7 | uVar5 << 8) & DAT_008340f0 | (uVar5 | uVar6 >> 8) & _DAT_008340f8;

    param_6[3] = uVar11 | (uVar5 << 0x20) >> 0x10;

    uVar15 = param_3[0x11];

    sVar18 = (short)uVar15;

    sVar14 = sVar21 + sVar18;

    sVar20 = (short)((ulonglong)uVar15 >> 0x10);

    sVar21 = sVar21 + sVar20;

    sVar23 = (short)((ulonglong)uVar15 >> 0x20);

    sVar17 = sVar22 + sVar23;

    sVar25 = (short)((ulonglong)uVar15 >> 0x30);

    sVar22 = sVar22 + sVar25;

    sVar8 = sVar26 + sVar18;

    sVar26 = sVar26 + sVar20;

    sVar13 = sVar27 + sVar23;

    sVar27 = sVar27 + sVar25;

    sVar18 = sVar18 - (short)uVar19;

    sVar20 = sVar20 - (short)uVar19;

    sVar23 = sVar23 - sVar16;

    sVar25 = sVar25 - sVar16;

    cVar1 = (0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26);

    uVar9 = CONCAT11(cVar1,(0 < sVar8) * (sVar8 < 0x100) * (char)sVar8 - (0xff < sVar8));

    uVar7 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                            (sVar22 < 0x100) *

                                                                            (char)sVar22 -

                                                                           (0xff < sVar22)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar17) * (sVar17 < 0x100) * (char)sVar17

                                                     - (0xff < sVar17)) << 0x20) >> 0x18),

                              (0 < sVar21) * (sVar21 < 0x100) * (char)sVar21 - (0xff < sVar21)),

                     (ushort)(byte)((0 < sVar14) * (sVar14 < 0x100) * (char)sVar14 - (0xff < sVar14)

                                   ));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar27) *

                                                                                    (sVar27 < 0x100)

                                                                                    * (char)sVar27 -

                                                                                   (0xff < sVar27))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar13) * (sVar13 < 0x100) *

                                                             (char)sVar13 - (0xff < sVar13)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar9)) >> 0x10),uVar9) &

             0xffffffff00ff00ff;

    uVar11 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                             (sVar25 < 0x100) *

                                                                             (char)sVar25 -

                                                                            (0xff < sVar25)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar23) * (sVar23 < 0x100) * (char)sVar23

                                                      - (0xff < sVar23)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)sVar18 -

                                    (0xff < sVar18)));

    uVar6 = (uVar11 | uVar7 << 8) & DAT_008340f0;

    uVar11 = ((uVar7 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar11 << 8) & _DAT_008340f8;

    uVar7 = (uVar6 | uVar6 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar5 >> 0x20 | uVar11 << 0x20;

    param_6[5] = (uVar11 >> 0x20) << 0x10 | uVar7;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    param_3 = param_3 + 2;

    iVar4 = iVar4 + -1;

  } while (iVar4 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00658f70 at 0x00658F70 (size: 790) ---


undefined8 __fastcall

FUN_00658f70(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  short sVar7;

  char cVar8;

  undefined4 uVar9;

  ulonglong uVar10;

  undefined4 in_EAX;

  int iVar11;

  undefined8 uVar12;

  ulonglong uVar13;

  undefined8 uVar14;

  short sVar15;

  short sVar18;

  short sVar19;

  undefined8 uVar16;

  short sVar20;

  ulonglong uVar17;

  short sVar21;

  short sVar23;

  short sVar24;

  undefined8 uVar22;

  short sVar25;

  undefined2 uVar26;

  undefined2 uVar27;

  

  iVar11 = 8;

  do {

    uVar10 = DAT_00834140;

    uVar12 = psllw(*param_5,4);

    uVar14 = psllw(*param_4,4);

    uVar16 = pmulhw(DAT_00834108,uVar12);

    uVar22 = pmulhw(DAT_00834110,uVar14);

    sVar15 = (short)uVar16 - (short)DAT_00834130;

    sVar18 = (short)((ulonglong)uVar16 >> 0x10) - (short)((ulonglong)DAT_00834130 >> 0x10);

    sVar19 = (short)((ulonglong)uVar16 >> 0x20) - (short)((ulonglong)DAT_00834130 >> 0x20);

    sVar20 = (short)((ulonglong)uVar16 >> 0x30) - (short)((ulonglong)DAT_00834130 >> 0x30);

    sVar21 = (short)uVar22 - (short)DAT_00834128;

    sVar23 = (short)((ulonglong)uVar22 >> 0x10) - (short)((ulonglong)DAT_00834128 >> 0x10);

    sVar24 = (short)((ulonglong)uVar22 >> 0x20) - (short)((ulonglong)DAT_00834128 >> 0x20);

    sVar25 = (short)((ulonglong)uVar22 >> 0x30) - (short)((ulonglong)DAT_00834128 >> 0x30);

    uVar16 = *param_3;

    uVar14 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar12 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar14 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar12 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar14 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar12 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar14 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar12 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar14 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar26 = (undefined2)((ulonglong)uVar14 >> 0x10);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar15,sVar15)),uVar16);

    uVar22 = paddsw(CONCAT44(CONCAT22(sVar23,sVar23),CONCAT22(sVar21,sVar21)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar26,uVar26),CONCAT22((short)uVar14,(short)uVar14)));

    sVar15 = (short)uVar12;

    sVar23 = (short)((ulonglong)uVar12 >> 0x10);

    sVar2 = (short)((ulonglong)uVar12 >> 0x20);

    sVar5 = (short)((ulonglong)uVar12 >> 0x30);

    sVar18 = (short)uVar22;

    sVar21 = (short)((ulonglong)uVar22 >> 0x10);

    cVar8 = (0 < sVar21) * (sVar21 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar21);

    sVar3 = (short)((ulonglong)uVar22 >> 0x20);

    sVar6 = (short)((ulonglong)uVar22 >> 0x30);

    sVar21 = (short)uVar16;

    sVar1 = (short)((ulonglong)uVar16 >> 0x10);

    sVar4 = (short)((ulonglong)uVar16 >> 0x20);

    sVar7 = (short)((ulonglong)uVar16 >> 0x30);

    uVar17 = (ulonglong)

             CONCAT12(cVar8,CONCAT11(cVar8,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar22 -

                                           (0xff < sVar18))) & 0xffffffff00ff00ff;

    uVar9 = (undefined4)

            (((uint7)(byte)((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar16 >> 0x20) -

                           (0xff < sVar4)) << 0x20) >> 0x18);

    uVar13 = (ulonglong)

             CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar12 >> 0x30) -

                      (0xff < sVar5),

                      (uint)(byte)((0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar12 >> 0x20)

                                  - (0xff < sVar2))) |

             (ulonglong)

             CONCAT42((uint)(byte)((0 < sVar6) * (sVar6 < 0x100) * (char)((ulonglong)uVar22 >> 0x30)

                                  - (0xff < sVar6)) << 0x10,

                      (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                     (char)((ulonglong)uVar22 >> 0x20) - (0xff < sVar3))) << 0x10 |

             CONCAT44((uint)(byte)((0 < sVar7) * (sVar7 < 0x100) * (char)((ulonglong)uVar16 >> 0x30)

                                  - (0xff < sVar7)) << 8,uVar9) | DAT_00834140;

    *param_6 = (ulonglong)

               CONCAT14((0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar12 >> 0x10) -

                        (0xff < sVar23),

                        (uint)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar12 -

                                    (0xff < sVar15))) |

               CONCAT44((uint)(ushort)(uVar17 >> 0x10) << 0x10,(int)uVar17 << 0x10) |

               CONCAT44((uint)(ushort)CONCAT41(uVar9,(0 < sVar1) * (sVar1 < 0x100) *

                                                     (char)((ulonglong)uVar16 >> 0x10) -

                                                     (0xff < sVar1)) << 8,

                        (uint)(byte)((0 < sVar21) * (sVar21 < 0x100) * (char)uVar16 -

                                    (0xff < sVar21)) << 8) | DAT_00834140;

    param_6[1] = uVar13;

    uVar16 = param_3[1];

    uVar27 = (undefined2)((ulonglong)uVar14 >> 0x30);

    uVar26 = (undefined2)((ulonglong)uVar14 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar19,sVar19)),uVar16);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar24,sVar24)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar27,uVar27),CONCAT22(uVar26,uVar26)));

    sVar15 = (short)uVar12;

    sVar23 = (short)((ulonglong)uVar12 >> 0x10);

    sVar2 = (short)((ulonglong)uVar12 >> 0x20);

    sVar5 = (short)((ulonglong)uVar12 >> 0x30);

    sVar18 = (short)uVar14;

    sVar21 = (short)((ulonglong)uVar14 >> 0x10);

    cVar8 = (0 < sVar21) * (sVar21 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar21);

    sVar3 = (short)((ulonglong)uVar14 >> 0x20);

    sVar6 = (short)((ulonglong)uVar14 >> 0x30);

    sVar21 = (short)uVar16;

    sVar1 = (short)((ulonglong)uVar16 >> 0x10);

    sVar4 = (short)((ulonglong)uVar16 >> 0x20);

    sVar7 = (short)((ulonglong)uVar16 >> 0x30);

    uVar13 = (ulonglong)

             CONCAT12(cVar8,CONCAT11(cVar8,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar14 -

                                           (0xff < sVar18))) & 0xffffffff00ff00ff;

    uVar9 = (undefined4)

            (((uint7)(byte)((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar16 >> 0x20) -

                           (0xff < sVar4)) << 0x20) >> 0x18);

    param_6[2] = (ulonglong)

                 CONCAT14((0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar12 >> 0x10) -

                          (0xff < sVar23),

                          (uint)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar12 -

                                      (0xff < sVar15))) |

                 CONCAT44((uint)(ushort)(uVar13 >> 0x10) << 0x10,(int)uVar13 << 0x10) |

                 CONCAT44((uint)(ushort)CONCAT41(uVar9,(0 < sVar1) * (sVar1 < 0x100) *

                                                       (char)((ulonglong)uVar16 >> 0x10) -

                                                       (0xff < sVar1)) << 8,

                          (uint)(byte)((0 < sVar21) * (sVar21 < 0x100) * (char)uVar16 -

                                      (0xff < sVar21)) << 8) | uVar10;

    param_6[3] = (ulonglong)

                 CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar12 >> 0x30) -

                          (0xff < sVar5),

                          (uint)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                       (char)((ulonglong)uVar12 >> 0x20) - (0xff < sVar2))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar6)) << 0x10,

                          (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar3))) <<

                 0x10 | CONCAT44((uint)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                              (char)((ulonglong)uVar16 >> 0x30) - (0xff < sVar7)) <<

                                 8,uVar9) | uVar10;

    uVar10 = DAT_00834140;

    uVar12 = psllw(param_5[1],4);

    uVar14 = psllw(param_4[1],4);

    uVar16 = pmulhw(DAT_00834108,uVar12);

    uVar22 = pmulhw(DAT_00834110,uVar14);

    sVar15 = (short)uVar16 - (short)DAT_00834130;

    sVar18 = (short)((ulonglong)uVar16 >> 0x10) - (short)((ulonglong)DAT_00834130 >> 0x10);

    sVar19 = (short)((ulonglong)uVar16 >> 0x20) - (short)((ulonglong)DAT_00834130 >> 0x20);

    sVar20 = (short)((ulonglong)uVar16 >> 0x30) - (short)((ulonglong)DAT_00834130 >> 0x30);

    sVar21 = (short)uVar22 - (short)DAT_00834128;

    sVar23 = (short)((ulonglong)uVar22 >> 0x10) - (short)((ulonglong)DAT_00834128 >> 0x10);

    sVar24 = (short)((ulonglong)uVar22 >> 0x20) - (short)((ulonglong)DAT_00834128 >> 0x20);

    sVar25 = (short)((ulonglong)uVar22 >> 0x30) - (short)((ulonglong)DAT_00834128 >> 0x30);

    uVar16 = param_3[0x10];

    uVar14 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar12 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar14 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar12 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar14 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar12 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar14 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar12 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar14 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar26 = (undefined2)((ulonglong)uVar14 >> 0x10);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar15,sVar15)),uVar16);

    uVar22 = paddsw(CONCAT44(CONCAT22(sVar23,sVar23),CONCAT22(sVar21,sVar21)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar26,uVar26),CONCAT22((short)uVar14,(short)uVar14)));

    sVar15 = (short)uVar12;

    sVar23 = (short)((ulonglong)uVar12 >> 0x10);

    sVar2 = (short)((ulonglong)uVar12 >> 0x20);

    sVar5 = (short)((ulonglong)uVar12 >> 0x30);

    sVar18 = (short)uVar22;

    sVar21 = (short)((ulonglong)uVar22 >> 0x10);

    cVar8 = (0 < sVar21) * (sVar21 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar21);

    sVar3 = (short)((ulonglong)uVar22 >> 0x20);

    sVar6 = (short)((ulonglong)uVar22 >> 0x30);

    sVar21 = (short)uVar16;

    sVar1 = (short)((ulonglong)uVar16 >> 0x10);

    sVar4 = (short)((ulonglong)uVar16 >> 0x20);

    sVar7 = (short)((ulonglong)uVar16 >> 0x30);

    uVar17 = (ulonglong)

             CONCAT12(cVar8,CONCAT11(cVar8,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar22 -

                                           (0xff < sVar18))) & 0xffffffff00ff00ff;

    uVar9 = (undefined4)

            (((uint7)(byte)((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar16 >> 0x20) -

                           (0xff < sVar4)) << 0x20) >> 0x18);

    uVar13 = (ulonglong)

             CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar12 >> 0x30) -

                      (0xff < sVar5),

                      (uint)(byte)((0 < sVar2) * (sVar2 < 0x100) * (char)((ulonglong)uVar12 >> 0x20)

                                  - (0xff < sVar2))) |

             (ulonglong)

             CONCAT42((uint)(byte)((0 < sVar6) * (sVar6 < 0x100) * (char)((ulonglong)uVar22 >> 0x30)

                                  - (0xff < sVar6)) << 0x10,

                      (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                     (char)((ulonglong)uVar22 >> 0x20) - (0xff < sVar3))) << 0x10 |

             CONCAT44((uint)(byte)((0 < sVar7) * (sVar7 < 0x100) * (char)((ulonglong)uVar16 >> 0x30)

                                  - (0xff < sVar7)) << 8,uVar9) | DAT_00834140;

    param_6[4] = (ulonglong)

                 CONCAT14((0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar12 >> 0x10) -

                          (0xff < sVar23),

                          (uint)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar12 -

                                      (0xff < sVar15))) |

                 CONCAT44((uint)(ushort)(uVar17 >> 0x10) << 0x10,(int)uVar17 << 0x10) |

                 CONCAT44((uint)(ushort)CONCAT41(uVar9,(0 < sVar1) * (sVar1 < 0x100) *

                                                       (char)((ulonglong)uVar16 >> 0x10) -

                                                       (0xff < sVar1)) << 8,

                          (uint)(byte)((0 < sVar21) * (sVar21 < 0x100) * (char)uVar16 -

                                      (0xff < sVar21)) << 8) | DAT_00834140;

    param_6[5] = uVar13;

    uVar16 = param_3[0x11];

    uVar27 = (undefined2)((ulonglong)uVar14 >> 0x30);

    uVar26 = (undefined2)((ulonglong)uVar14 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar19,sVar19)),uVar16);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar24,sVar24)),uVar16);

    uVar16 = psubsw(uVar16,CONCAT44(CONCAT22(uVar27,uVar27),CONCAT22(uVar26,uVar26)));

    sVar15 = (short)uVar12;

    sVar23 = (short)((ulonglong)uVar12 >> 0x10);

    sVar2 = (short)((ulonglong)uVar12 >> 0x20);

    sVar5 = (short)((ulonglong)uVar12 >> 0x30);

    sVar18 = (short)uVar14;

    sVar21 = (short)((ulonglong)uVar14 >> 0x10);

    cVar8 = (0 < sVar21) * (sVar21 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar21);

    sVar3 = (short)((ulonglong)uVar14 >> 0x20);

    sVar6 = (short)((ulonglong)uVar14 >> 0x30);

    sVar21 = (short)uVar16;

    sVar1 = (short)((ulonglong)uVar16 >> 0x10);

    sVar4 = (short)((ulonglong)uVar16 >> 0x20);

    sVar7 = (short)((ulonglong)uVar16 >> 0x30);

    uVar13 = (ulonglong)

             CONCAT12(cVar8,CONCAT11(cVar8,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar14 -

                                           (0xff < sVar18))) & 0xffffffff00ff00ff;

    uVar9 = (undefined4)

            (((uint7)(byte)((0 < sVar4) * (sVar4 < 0x100) * (char)((ulonglong)uVar16 >> 0x20) -

                           (0xff < sVar4)) << 0x20) >> 0x18);

    param_6[6] = (ulonglong)

                 CONCAT14((0 < sVar23) * (sVar23 < 0x100) * (char)((ulonglong)uVar12 >> 0x10) -

                          (0xff < sVar23),

                          (uint)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar12 -

                                      (0xff < sVar15))) |

                 CONCAT44((uint)(ushort)(uVar13 >> 0x10) << 0x10,(int)uVar13 << 0x10) |

                 CONCAT44((uint)(ushort)CONCAT41(uVar9,(0 < sVar1) * (sVar1 < 0x100) *

                                                       (char)((ulonglong)uVar16 >> 0x10) -

                                                       (0xff < sVar1)) << 8,

                          (uint)(byte)((0 < sVar21) * (sVar21 < 0x100) * (char)uVar16 -

                                      (0xff < sVar21)) << 8) | uVar10;

    param_6[7] = (ulonglong)

                 CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar12 >> 0x30) -

                          (0xff < sVar5),

                          (uint)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                       (char)((ulonglong)uVar12 >> 0x20) - (0xff < sVar2))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar6) * (sVar6 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar6)) << 0x10,

                          (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar3))) <<

                 0x10 | CONCAT44((uint)(byte)((0 < sVar7) * (sVar7 < 0x100) *

                                              (char)((ulonglong)uVar16 >> 0x30) - (0xff < sVar7)) <<

                                 8,uVar9) | uVar10;

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    iVar11 = iVar11 + -1;

  } while (iVar11 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00659290 at 0x00659290 (size: 960) ---


undefined8 __fastcall

FUN_00659290(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,undefined4 param_6,ulonglong *param_7,int param_8)



{

  ulonglong uVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  short sVar6;

  uint uVar7;

  ushort uVar8;

  ushort uVar9;

  ushort uVar10;

  undefined4 in_EAX;

  int iVar11;

  undefined8 uVar12;

  short sVar13;

  short sVar15;

  short sVar16;

  undefined8 uVar14;

  short sVar17;

  short sVar18;

  short sVar20;

  short sVar21;

  undefined8 uVar19;

  short sVar22;

  short sVar23;

  short sVar25;

  ushort uVar26;

  short sVar27;

  undefined8 uVar24;

  short sVar28;

  undefined2 uVar29;

  undefined2 uVar30;

  

  iVar11 = 8;

  do {

    uVar12 = psllw(*param_5,4);

    uVar14 = psllw(*param_4,4);

    uVar19 = pmulhw(DAT_00834108,uVar12);

    uVar24 = pmulhw(DAT_00834110,uVar14);

    sVar18 = (short)uVar19 - (short)DAT_00834130;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_00834130 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_00834130 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_00834130 >> 0x30);

    sVar23 = (short)uVar24 - (short)DAT_00834128;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_00834128 >> 0x10);

    sVar27 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_00834128 >> 0x20);

    sVar28 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_00834128 >> 0x30);

    uVar19 = *param_3;

    uVar14 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar12 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar14 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar12 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar14 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar12 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar14 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar12 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar14 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar29 = (undefined2)((ulonglong)uVar14 >> 0x10);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar19);

    uVar24 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar19);

    uVar19 = psubsw(uVar19,CONCAT44(CONCAT22(uVar29,uVar29),CONCAT22((short)uVar14,(short)uVar14)));

    sVar18 = (short)uVar12;

    sVar25 = (short)((ulonglong)uVar12 >> 0x10);

    sVar4 = (short)((ulonglong)uVar12 >> 0x20);

    sVar13 = (short)((ulonglong)uVar12 >> 0x30);

    sVar20 = (short)uVar24;

    sVar2 = (short)((ulonglong)uVar24 >> 0x10);

    sVar5 = (short)((ulonglong)uVar24 >> 0x20);

    sVar15 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar19;

    sVar3 = (short)((ulonglong)uVar19 >> 0x10);

    sVar6 = (short)((ulonglong)uVar19 >> 0x20);

    sVar16 = (short)((ulonglong)uVar19 >> 0x30);

    uVar10 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                     (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar13)) << 0x30)

                     >> 0x28);

    uVar8 = (ushort)(((uint7)(byte)((0 < sVar15) * (sVar15 < 0x100) *

                                    (char)((ulonglong)uVar24 >> 0x30) - (0xff < sVar15)) << 0x30) >>

                    0x28);

    uVar9 = (ushort)(((uint7)(byte)((0 < sVar16) * (sVar16 < 0x100) *

                                    (char)((ulonglong)uVar19 >> 0x30) - (0xff < sVar16)) << 0x30) >>

                    0x28);

    uVar1 = param_3[0x40];

    sVar13 = (short)DAT_00834148;

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar16 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar17 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar26 = sVar15 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                     (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar2));

    uVar7 = (uint)(ushort)(uVar1 >> 0x20);

    *param_7 = (ulonglong)

               CONCAT24(sVar15 - (ushort)(byte)((0 < sVar25) * (sVar25 < 0x100) *

                                                (char)((ulonglong)uVar12 >> 0x10) - (0xff < sVar25))

                        ,(uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) *

                                                                (char)uVar12 - (0xff < sVar18)))) |

               CONCAT44((uint)uVar26 << 0x10,

                        CONCAT22(uVar26,sVar13 - (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                                                (char)uVar24 - (0xff < sVar20))) <<

                        0x10) |

               CONCAT44((uint)(ushort)(sVar15 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                               (char)((ulonglong)uVar19 >> 0x10) -

                                                              (0xff < sVar3))) << 8,

                        (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                                               (char)uVar19 - (0xff < sVar23))) << 8

                       ) |

               CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18);

    param_7[1] = (ulonglong)

                 CONCAT24(sVar17 - (uVar10 >> 8),

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar10,(0 < sVar4) *

                                                                         (sVar4 < 0x100) *

                                                                         (char)((ulonglong)uVar12 >>

                                                                               0x20) -

                                                                         (0xff < sVar4)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar17 - (uVar8 >> 8)) << 0x10,

                          sVar16 - (short)CONCAT21(uVar8,(0 < sVar5) * (sVar5 < 0x100) *

                                                         (char)((ulonglong)uVar24 >> 0x20) -

                                                         (0xff < sVar5))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar17 - (uVar9 >> 8)) << 8,

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar9,(0 < sVar6) *

                                                                        (sVar6 < 0x100) *

                                                                        (char)((ulonglong)uVar19 >>

                                                                              0x20) - (0xff < sVar6)

                                                                 )) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar7) >> 0x10) << 8,uVar7 << 0x18);

    uVar19 = param_3[1];

    uVar30 = (undefined2)((ulonglong)uVar14 >> 0x30);

    uVar29 = (undefined2)((ulonglong)uVar14 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar21,sVar21)),uVar19);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar28,sVar28),CONCAT22(sVar27,sVar27)),uVar19);

    uVar19 = psubsw(uVar19,CONCAT44(CONCAT22(uVar30,uVar30),CONCAT22(uVar29,uVar29)));

    sVar18 = (short)uVar12;

    sVar25 = (short)((ulonglong)uVar12 >> 0x10);

    sVar4 = (short)((ulonglong)uVar12 >> 0x20);

    sVar13 = (short)((ulonglong)uVar12 >> 0x30);

    sVar20 = (short)uVar14;

    sVar2 = (short)((ulonglong)uVar14 >> 0x10);

    sVar5 = (short)((ulonglong)uVar14 >> 0x20);

    sVar15 = (short)((ulonglong)uVar14 >> 0x30);

    sVar23 = (short)uVar19;

    sVar3 = (short)((ulonglong)uVar19 >> 0x10);

    sVar6 = (short)((ulonglong)uVar19 >> 0x20);

    sVar16 = (short)((ulonglong)uVar19 >> 0x30);

    uVar10 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                     (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar13)) << 0x30)

                     >> 0x28);

    uVar8 = (ushort)(((uint7)(byte)((0 < sVar15) * (sVar15 < 0x100) *

                                    (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar15)) << 0x30) >>

                    0x28);

    uVar9 = (ushort)(((uint7)(byte)((0 < sVar16) * (sVar16 < 0x100) *

                                    (char)((ulonglong)uVar19 >> 0x30) - (0xff < sVar16)) << 0x30) >>

                    0x28);

    uVar1 = param_3[0x41];

    sVar13 = (short)DAT_00834148;

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar16 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar17 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar26 = sVar15 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                     (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar2));

    uVar7 = (uint)(ushort)(uVar1 >> 0x20);

    param_7[2] = (ulonglong)

                 CONCAT24(sVar15 - (ushort)(byte)((0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar25)),

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar18)))) |

                 CONCAT44((uint)uVar26 << 0x10,

                          CONCAT22(uVar26,sVar13 - (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                                                  (char)uVar14 - (0xff < sVar20)))

                          << 0x10) |

                 CONCAT44((uint)(ushort)(sVar15 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                                 (char)((ulonglong)uVar19 >> 0x10) -

                                                                (0xff < sVar3))) << 8,

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                                                 (char)uVar19 - (0xff < sVar23))) <<

                          8) |

                 CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18)

    ;

    param_7[3] = (ulonglong)

                 CONCAT24(sVar17 - (uVar10 >> 8),

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar10,(0 < sVar4) *

                                                                         (sVar4 < 0x100) *

                                                                         (char)((ulonglong)uVar12 >>

                                                                               0x20) -

                                                                         (0xff < sVar4)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar17 - (uVar8 >> 8)) << 0x10,

                          sVar16 - (short)CONCAT21(uVar8,(0 < sVar5) * (sVar5 < 0x100) *

                                                         (char)((ulonglong)uVar14 >> 0x20) -

                                                         (0xff < sVar5))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar17 - (uVar9 >> 8)) << 8,

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar9,(0 < sVar6) *

                                                                        (sVar6 < 0x100) *

                                                                        (char)((ulonglong)uVar19 >>

                                                                              0x20) - (0xff < sVar6)

                                                                 )) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar7) >> 0x10) << 8,uVar7 << 0x18);

    uVar12 = psllw(param_5[1],4);

    uVar14 = psllw(param_4[1],4);

    uVar19 = pmulhw(DAT_00834108,uVar12);

    uVar24 = pmulhw(DAT_00834110,uVar14);

    sVar18 = (short)uVar19 - (short)DAT_00834130;

    sVar20 = (short)((ulonglong)uVar19 >> 0x10) - (short)((ulonglong)DAT_00834130 >> 0x10);

    sVar21 = (short)((ulonglong)uVar19 >> 0x20) - (short)((ulonglong)DAT_00834130 >> 0x20);

    sVar22 = (short)((ulonglong)uVar19 >> 0x30) - (short)((ulonglong)DAT_00834130 >> 0x30);

    sVar23 = (short)uVar24 - (short)DAT_00834128;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_00834128 >> 0x10);

    sVar27 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_00834128 >> 0x20);

    sVar28 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_00834128 >> 0x30);

    uVar19 = param_3[0x10];

    uVar14 = psraw(CONCAT26(((short)((ulonglong)DAT_00834120 >> 0x30) *

                             (ushort)((ulonglong)uVar12 >> 0x34) +

                            (short)((ulonglong)DAT_00834118 >> 0x30) *

                            (ushort)((ulonglong)uVar14 >> 0x34)) -

                            (short)((ulonglong)DAT_00834138 >> 0x30),

                            CONCAT24(((short)((ulonglong)DAT_00834120 >> 0x20) *

                                      ((ushort)((ulonglong)uVar12 >> 0x20) >> 4) +

                                     (short)((ulonglong)DAT_00834118 >> 0x20) *

                                     ((ushort)((ulonglong)uVar14 >> 0x20) >> 4)) -

                                     (short)((ulonglong)DAT_00834138 >> 0x20),

                                     CONCAT22(((short)((ulonglong)DAT_00834120 >> 0x10) *

                                               ((ushort)((ulonglong)uVar12 >> 0x10) >> 4) +

                                              (short)((ulonglong)DAT_00834118 >> 0x10) *

                                              ((ushort)((ulonglong)uVar14 >> 0x10) >> 4)) -

                                              (short)((ulonglong)DAT_00834138 >> 0x10),

                                              ((short)DAT_00834120 * ((ushort)uVar12 >> 4) +

                                              (short)DAT_00834118 * ((ushort)uVar14 >> 4)) -

                                              (short)DAT_00834138))),8);

    uVar29 = (undefined2)((ulonglong)uVar14 >> 0x10);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar18,sVar18)),uVar19);

    uVar24 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar19);

    uVar19 = psubsw(uVar19,CONCAT44(CONCAT22(uVar29,uVar29),CONCAT22((short)uVar14,(short)uVar14)));

    sVar18 = (short)uVar12;

    sVar25 = (short)((ulonglong)uVar12 >> 0x10);

    sVar4 = (short)((ulonglong)uVar12 >> 0x20);

    sVar13 = (short)((ulonglong)uVar12 >> 0x30);

    sVar20 = (short)uVar24;

    sVar2 = (short)((ulonglong)uVar24 >> 0x10);

    sVar5 = (short)((ulonglong)uVar24 >> 0x20);

    sVar15 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar19;

    sVar3 = (short)((ulonglong)uVar19 >> 0x10);

    sVar6 = (short)((ulonglong)uVar19 >> 0x20);

    sVar16 = (short)((ulonglong)uVar19 >> 0x30);

    uVar10 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                     (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar13)) << 0x30)

                     >> 0x28);

    uVar8 = (ushort)(((uint7)(byte)((0 < sVar15) * (sVar15 < 0x100) *

                                    (char)((ulonglong)uVar24 >> 0x30) - (0xff < sVar15)) << 0x30) >>

                    0x28);

    uVar9 = (ushort)(((uint7)(byte)((0 < sVar16) * (sVar16 < 0x100) *

                                    (char)((ulonglong)uVar19 >> 0x30) - (0xff < sVar16)) << 0x30) >>

                    0x28);

    uVar1 = param_3[0x50];

    sVar13 = (short)DAT_00834148;

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar16 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar17 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar26 = sVar15 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                     (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar2));

    uVar7 = (uint)(ushort)(uVar1 >> 0x20);

    param_7[4] = (ulonglong)

                 CONCAT24(sVar15 - (ushort)(byte)((0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar25)),

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar18)))) |

                 CONCAT44((uint)uVar26 << 0x10,

                          CONCAT22(uVar26,sVar13 - (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                                                  (char)uVar24 - (0xff < sVar20)))

                          << 0x10) |

                 CONCAT44((uint)(ushort)(sVar15 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                                 (char)((ulonglong)uVar19 >> 0x10) -

                                                                (0xff < sVar3))) << 8,

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                                                 (char)uVar19 - (0xff < sVar23))) <<

                          8) |

                 CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18)

    ;

    param_7[5] = (ulonglong)

                 CONCAT24(sVar17 - (uVar10 >> 8),

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar10,(0 < sVar4) *

                                                                         (sVar4 < 0x100) *

                                                                         (char)((ulonglong)uVar12 >>

                                                                               0x20) -

                                                                         (0xff < sVar4)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar17 - (uVar8 >> 8)) << 0x10,

                          sVar16 - (short)CONCAT21(uVar8,(0 < sVar5) * (sVar5 < 0x100) *

                                                         (char)((ulonglong)uVar24 >> 0x20) -

                                                         (0xff < sVar5))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar17 - (uVar9 >> 8)) << 8,

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar9,(0 < sVar6) *

                                                                        (sVar6 < 0x100) *

                                                                        (char)((ulonglong)uVar19 >>

                                                                              0x20) - (0xff < sVar6)

                                                                 )) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar7) >> 0x10) << 8,uVar7 << 0x18);

    uVar19 = param_3[0x11];

    uVar30 = (undefined2)((ulonglong)uVar14 >> 0x30);

    uVar29 = (undefined2)((ulonglong)uVar14 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar21,sVar21)),uVar19);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar28,sVar28),CONCAT22(sVar27,sVar27)),uVar19);

    uVar19 = psubsw(uVar19,CONCAT44(CONCAT22(uVar30,uVar30),CONCAT22(uVar29,uVar29)));

    sVar18 = (short)uVar12;

    sVar25 = (short)((ulonglong)uVar12 >> 0x10);

    sVar4 = (short)((ulonglong)uVar12 >> 0x20);

    sVar13 = (short)((ulonglong)uVar12 >> 0x30);

    sVar20 = (short)uVar14;

    sVar2 = (short)((ulonglong)uVar14 >> 0x10);

    sVar5 = (short)((ulonglong)uVar14 >> 0x20);

    sVar15 = (short)((ulonglong)uVar14 >> 0x30);

    sVar23 = (short)uVar19;

    sVar3 = (short)((ulonglong)uVar19 >> 0x10);

    sVar6 = (short)((ulonglong)uVar19 >> 0x20);

    sVar16 = (short)((ulonglong)uVar19 >> 0x30);

    uVar10 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                     (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar13)) << 0x30)

                     >> 0x28);

    uVar8 = (ushort)(((uint7)(byte)((0 < sVar15) * (sVar15 < 0x100) *

                                    (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar15)) << 0x30) >>

                    0x28);

    uVar9 = (ushort)(((uint7)(byte)((0 < sVar16) * (sVar16 < 0x100) *

                                    (char)((ulonglong)uVar19 >> 0x30) - (0xff < sVar16)) << 0x30) >>

                    0x28);

    uVar1 = param_3[0x51];

    sVar13 = (short)DAT_00834148;

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar16 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar17 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar26 = sVar15 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                     (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar2));

    uVar7 = (uint)(ushort)(uVar1 >> 0x20);

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_7[6] = (ulonglong)

                 CONCAT24(sVar15 - (ushort)(byte)((0 < sVar25) * (sVar25 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar25)),

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar18)))) |

                 CONCAT44((uint)uVar26 << 0x10,

                          CONCAT22(uVar26,sVar13 - (ushort)(byte)((0 < sVar20) * (sVar20 < 0x100) *

                                                                  (char)uVar14 - (0xff < sVar20)))

                          << 0x10) |

                 CONCAT44((uint)(ushort)(sVar15 - (ushort)(byte)((0 < sVar3) * (sVar3 < 0x100) *

                                                                 (char)((ulonglong)uVar19 >> 0x10) -

                                                                (0xff < sVar3))) << 8,

                          (uint)(ushort)(sVar13 - (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                                                 (char)uVar19 - (0xff < sVar23))) <<

                          8) |

                 CONCAT44((int)(((uVar1 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar1 << 0x18)

    ;

    param_7[7] = (ulonglong)

                 CONCAT24(sVar17 - (uVar10 >> 8),

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar10,(0 < sVar4) *

                                                                         (sVar4 < 0x100) *

                                                                         (char)((ulonglong)uVar12 >>

                                                                               0x20) -

                                                                         (0xff < sVar4)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar17 - (uVar8 >> 8)) << 0x10,

                          sVar16 - (short)CONCAT21(uVar8,(0 < sVar5) * (sVar5 < 0x100) *

                                                         (char)((ulonglong)uVar14 >> 0x20) -

                                                         (0xff < sVar5))) << 0x10 |

                 CONCAT44((uint)(ushort)(sVar17 - (uVar9 >> 8)) << 8,

                          (uint)(ushort)(sVar16 - (short)CONCAT21(uVar9,(0 < sVar6) *

                                                                        (sVar6 < 0x100) *

                                                                        (char)((ulonglong)uVar19 >>

                                                                              0x20) - (0xff < sVar6)

                                                                 )) << 8) |

                 CONCAT44((int)(CONCAT24((short)(uVar1 >> 0x30),uVar7) >> 0x10) << 8,uVar7 << 0x18);

    param_7 = (ulonglong *)((int)param_7 + param_8);

    iVar11 = iVar11 + -1;

  } while (iVar11 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00659650 at 0x00659650 (size: 1496) ---


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



undefined8 __fastcall

FUN_00659650(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  char cVar3;

  char cVar4;

  char cVar5;

  int iVar6;

  undefined4 in_EAX;

  int iVar7;

  undefined2 uVar8;

  ulonglong uVar9;

  ulonglong uVar10;

  undefined8 uVar11;

  ulonglong uVar12;

  undefined8 uVar13;

  ulonglong uVar14;

  short sVar15;

  short sVar18;

  short sVar19;

  undefined8 uVar16;

  short sVar20;

  undefined8 uVar17;

  short sVar21;

  short sVar24;

  short sVar25;

  undefined8 uVar22;

  short sVar26;

  undefined8 uVar23;

  undefined8 uVar27;

  undefined2 uVar28;

  undefined8 uVar29;

  undefined2 uVar30;

  undefined8 uVar31;

  ulonglong uVar32;

  

  iVar7 = 4;

  do {

    uVar13 = psllw(*param_5,4);

    uVar11 = psllw(*param_4,4);

    uVar22 = pmulhw(DAT_00834098,uVar11);

    uVar16 = pmulhw(DAT_00834090,uVar13);

    sVar21 = (short)uVar22 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar22 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar22 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar15 = (short)uVar16 - (short)DAT_008340c0;

    sVar18 = (short)((ulonglong)uVar16 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar19 = (short)((ulonglong)uVar16 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar20 = (short)((ulonglong)uVar16 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar16 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar11 >> 0x10),

                                       (short)((ulonglong)uVar13 >> 0x10)),

                              CONCAT22((short)uVar11,(short)uVar13)),DAT_008340a0);

    uVar11 = pmaddwd(CONCAT26((short)((ulonglong)uVar11 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar13 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar11 >> 0x20),

                                                (short)((ulonglong)uVar13 >> 0x20)))),DAT_008340a0);

    iVar6 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar29 = CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar21,sVar21));

    uVar31 = CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar15,sVar15));

    uVar13 = CONCAT44((int)((ulonglong)uVar16 >> 0x20) - iVar6 >> 0xc,

                      (int)uVar16 - (int)DAT_008340c8 >> 0xc);

    uVar11 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) - iVar6 >> 0xc,

                      (int)uVar11 - (int)DAT_008340c8 >> 0xc);

    uVar23 = CONCAT26(sVar26,CONCAT24(sVar26,CONCAT22(sVar25,sVar25)));

    uVar17 = CONCAT26(sVar20,CONCAT24(sVar20,CONCAT22(sVar19,sVar19)));

    uVar13 = packssdw(uVar13,uVar13);

    uVar11 = packssdw(uVar11,uVar11);

    uVar8 = (undefined2)((ulonglong)uVar13 >> 0x10);

    uVar27 = CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar13,(short)uVar13));

    uVar8 = (undefined2)((ulonglong)uVar11 >> 0x10);

    uVar16 = CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar11,(short)uVar11));

    uVar11 = *param_3;

    uVar22 = paddsw(uVar31,uVar11);

    uVar13 = paddsw(uVar29,uVar11);

    uVar11 = psubsw(uVar11,uVar27);

    sVar15 = (short)uVar22;

    sVar18 = (short)((ulonglong)uVar22 >> 0x10);

    cVar3 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar18);

    uVar28 = CONCAT11(cVar3,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 - (0xff < sVar15));

    sVar19 = (short)((ulonglong)uVar22 >> 0x20);

    sVar24 = (short)((ulonglong)uVar22 >> 0x30);

    sVar15 = (short)uVar13;

    sVar18 = (short)((ulonglong)uVar13 >> 0x10);

    cVar4 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar18);

    uVar8 = CONCAT11(cVar4,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar13 - (0xff < sVar15));

    sVar20 = (short)((ulonglong)uVar13 >> 0x20);

    sVar25 = (short)((ulonglong)uVar13 >> 0x30);

    sVar15 = (short)uVar11;

    sVar18 = (short)((ulonglong)uVar11 >> 0x10);

    sVar21 = (short)((ulonglong)uVar11 >> 0x20);

    sVar26 = (short)((ulonglong)uVar11 >> 0x30);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                                   (sVar24 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar22 >> 0x30) - (0xff < sVar24)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar19) * (sVar19 < 0x100) *

                                                  (char)((ulonglong)uVar22 >> 0x20) -

                                                  (0xff < sVar19)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                                    (sVar25 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar25)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar20)) << 0x20) >> 0x18),

                                      CONCAT12(cVar4,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar18)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar11 -

                                    (0xff < sVar15)));

    uVar32 = (uVar9 | uVar10 << 8) & _DAT_008340f8;

    uVar9 = (uVar10 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar9 >> 8) & _DAT_008340f8;

    *param_6 = (uVar32 << 0x10 | uVar32) & _DAT_00834100 | (uVar9 << 0x20) >> 0x10;

    uVar11 = param_3[1];

    uVar22 = paddsw(uVar23,uVar11);

    uVar13 = paddsw(uVar17,uVar11);

    uVar11 = psubsw(uVar11,uVar16);

    sVar15 = (short)uVar22;

    sVar19 = (short)((ulonglong)uVar22 >> 0x10);

    sVar21 = (short)((ulonglong)uVar22 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30);

    sVar18 = (short)uVar13;

    sVar20 = (short)((ulonglong)uVar13 >> 0x10);

    cVar3 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar20);

    uVar8 = CONCAT11(cVar3,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar13 - (0xff < sVar18));

    sVar24 = (short)((ulonglong)uVar13 >> 0x20);

    sVar1 = (short)((ulonglong)uVar13 >> 0x30);

    sVar18 = (short)uVar11;

    sVar20 = (short)((ulonglong)uVar11 >> 0x10);

    sVar25 = (short)((ulonglong)uVar11 >> 0x20);

    sVar2 = (short)((ulonglong)uVar11 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar22 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar22 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 -

                                    (0xff < sVar15)));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar1) *

                                                                                    (sVar1 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar1)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar3,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                             (sVar2 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar2)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar25) * (sVar25 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar25)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar11 -

                                    (0xff < sVar18)));

    uVar32 = (uVar14 | uVar10 << 8) & DAT_008340f0;

    uVar14 = ((uVar10 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar14 << 8) & _DAT_008340f8;

    uVar10 = (uVar32 | uVar32 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar9 >> 0x20 | uVar14 << 0x20;

    param_6[2] = (uVar14 >> 0x20) << 0x10 | uVar10;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    uVar11 = param_3[2];

    uVar22 = paddsw(uVar31,uVar11);

    uVar13 = paddsw(uVar29,uVar11);

    uVar11 = psubsw(uVar11,uVar27);

    sVar15 = (short)uVar22;

    sVar18 = (short)((ulonglong)uVar22 >> 0x10);

    cVar3 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar18);

    uVar30 = CONCAT11(cVar3,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 - (0xff < sVar15));

    sVar19 = (short)((ulonglong)uVar22 >> 0x20);

    sVar21 = (short)((ulonglong)uVar22 >> 0x30);

    sVar15 = (short)uVar13;

    sVar18 = (short)((ulonglong)uVar13 >> 0x10);

    cVar4 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar18);

    uVar28 = CONCAT11(cVar4,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar13 - (0xff < sVar15));

    sVar20 = (short)((ulonglong)uVar13 >> 0x20);

    sVar24 = (short)((ulonglong)uVar13 >> 0x30);

    sVar15 = (short)uVar11;

    sVar18 = (short)((ulonglong)uVar11 >> 0x10);

    cVar5 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) - (0xff < sVar18);

    uVar8 = CONCAT11(cVar5,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar11 - (0xff < sVar15));

    sVar15 = (short)((ulonglong)uVar11 >> 0x20);

    sVar18 = (short)((ulonglong)uVar11 >> 0x30);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                                   (sVar21 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar22 >> 0x30) - (0xff < sVar21)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar19) * (sVar19 < 0x100) *

                                                  (char)((ulonglong)uVar22 >> 0x20) -

                                                  (0xff < sVar19)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar30)) >> 0x10),uVar30) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                                    (sVar24 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar24)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar20)) << 0x20) >> 0x18),

                                      CONCAT12(cVar4,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar18) *

                                                                                    (sVar18 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar11 >> 0x30) - (0xff < sVar18)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar15) * (sVar15 < 0x100) *

                                                  (char)((ulonglong)uVar11 >> 0x20) -

                                                  (0xff < sVar15)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar32 = (uVar9 | uVar10 << 8) & _DAT_008340f8;

    uVar9 = (uVar10 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar9 >> 8) & _DAT_008340f8;

    *param_6 = (uVar32 << 0x10 | uVar32) & _DAT_00834100 | (uVar9 << 0x20) >> 0x10;

    uVar11 = param_3[3];

    uVar22 = paddsw(uVar23,uVar11);

    uVar13 = paddsw(uVar17,uVar11);

    uVar11 = psubsw(uVar11,uVar16);

    sVar15 = (short)uVar22;

    sVar19 = (short)((ulonglong)uVar22 >> 0x10);

    sVar21 = (short)((ulonglong)uVar22 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30);

    sVar18 = (short)uVar13;

    sVar20 = (short)((ulonglong)uVar13 >> 0x10);

    cVar3 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar20);

    uVar8 = CONCAT11(cVar3,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar13 - (0xff < sVar18));

    sVar24 = (short)((ulonglong)uVar13 >> 0x20);

    sVar1 = (short)((ulonglong)uVar13 >> 0x30);

    sVar18 = (short)uVar11;

    sVar20 = (short)((ulonglong)uVar11 >> 0x10);

    sVar25 = (short)((ulonglong)uVar11 >> 0x20);

    sVar2 = (short)((ulonglong)uVar11 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar22 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar22 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 -

                                    (0xff < sVar15)));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar1) *

                                                                                    (sVar1 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar1)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar3,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                             (sVar2 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar2)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar25) * (sVar25 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar25)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar11 -

                                    (0xff < sVar18)));

    uVar32 = (uVar14 | uVar10 << 8) & DAT_008340f0;

    uVar14 = ((uVar10 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar14 << 8) & _DAT_008340f8;

    uVar10 = (uVar32 | uVar32 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar9 >> 0x20 | uVar14 << 0x20;

    param_6[2] = (uVar14 >> 0x20) << 0x10 | uVar10;

    uVar13 = psllw(param_5[1],4);

    uVar11 = psllw(param_4[1],4);

    uVar22 = pmulhw(DAT_00834098,uVar11);

    uVar16 = pmulhw(DAT_00834090,uVar13);

    sVar21 = (short)uVar22 - (short)DAT_008340b8;

    sVar24 = (short)((ulonglong)uVar22 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar25 = (short)((ulonglong)uVar22 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar15 = (short)uVar16 - (short)DAT_008340c0;

    sVar18 = (short)((ulonglong)uVar16 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar19 = (short)((ulonglong)uVar16 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar20 = (short)((ulonglong)uVar16 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar16 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar11 >> 0x10),

                                       (short)((ulonglong)uVar13 >> 0x10)),

                              CONCAT22((short)uVar11,(short)uVar13)),DAT_008340a0);

    uVar11 = pmaddwd(CONCAT26((short)((ulonglong)uVar11 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar13 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar11 >> 0x20),

                                                (short)((ulonglong)uVar13 >> 0x20)))),DAT_008340a0);

    iVar6 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar29 = CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar21,sVar21));

    uVar31 = CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar15,sVar15));

    uVar13 = CONCAT44((int)((ulonglong)uVar16 >> 0x20) - iVar6 >> 0xc,

                      (int)uVar16 - (int)DAT_008340c8 >> 0xc);

    uVar11 = CONCAT44((int)((ulonglong)uVar11 >> 0x20) - iVar6 >> 0xc,

                      (int)uVar11 - (int)DAT_008340c8 >> 0xc);

    uVar23 = CONCAT26(sVar26,CONCAT24(sVar26,CONCAT22(sVar25,sVar25)));

    uVar17 = CONCAT26(sVar20,CONCAT24(sVar20,CONCAT22(sVar19,sVar19)));

    uVar13 = packssdw(uVar13,uVar13);

    uVar11 = packssdw(uVar11,uVar11);

    uVar8 = (undefined2)((ulonglong)uVar13 >> 0x10);

    uVar27 = CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar13,(short)uVar13));

    uVar8 = (undefined2)((ulonglong)uVar11 >> 0x10);

    uVar16 = CONCAT44(CONCAT22(uVar8,uVar8),CONCAT22((short)uVar11,(short)uVar11));

    uVar11 = param_3[0x10];

    uVar22 = paddsw(uVar31,uVar11);

    uVar13 = paddsw(uVar29,uVar11);

    uVar11 = psubsw(uVar11,uVar27);

    sVar15 = (short)uVar22;

    sVar18 = (short)((ulonglong)uVar22 >> 0x10);

    cVar3 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar18);

    uVar28 = CONCAT11(cVar3,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 - (0xff < sVar15));

    sVar19 = (short)((ulonglong)uVar22 >> 0x20);

    sVar24 = (short)((ulonglong)uVar22 >> 0x30);

    sVar15 = (short)uVar13;

    sVar18 = (short)((ulonglong)uVar13 >> 0x10);

    cVar4 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar18);

    uVar8 = CONCAT11(cVar4,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar13 - (0xff < sVar15));

    sVar20 = (short)((ulonglong)uVar13 >> 0x20);

    sVar25 = (short)((ulonglong)uVar13 >> 0x30);

    sVar15 = (short)uVar11;

    sVar18 = (short)((ulonglong)uVar11 >> 0x10);

    sVar21 = (short)((ulonglong)uVar11 >> 0x20);

    sVar26 = (short)((ulonglong)uVar11 >> 0x30);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                                   (sVar24 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar22 >> 0x30) - (0xff < sVar24)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar19) * (sVar19 < 0x100) *

                                                  (char)((ulonglong)uVar22 >> 0x20) -

                                                  (0xff < sVar19)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                                    (sVar25 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar25)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar20)) << 0x20) >> 0x18),

                                      CONCAT12(cVar4,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar18)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar11 -

                                    (0xff < sVar15)));

    uVar32 = (uVar9 | uVar10 << 8) & _DAT_008340f8;

    uVar9 = (uVar10 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar9 >> 8) & _DAT_008340f8;

    *(ulonglong *)((int)param_6 + (0x18 - param_7)) =

         (uVar32 << 0x10 | uVar32) & _DAT_00834100 | (uVar9 << 0x20) >> 0x10;

    uVar11 = param_3[0x11];

    uVar22 = paddsw(uVar23,uVar11);

    uVar13 = paddsw(uVar17,uVar11);

    uVar11 = psubsw(uVar11,uVar16);

    sVar15 = (short)uVar22;

    sVar19 = (short)((ulonglong)uVar22 >> 0x10);

    sVar21 = (short)((ulonglong)uVar22 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30);

    sVar18 = (short)uVar13;

    sVar20 = (short)((ulonglong)uVar13 >> 0x10);

    cVar3 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar20);

    uVar8 = CONCAT11(cVar3,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar13 - (0xff < sVar18));

    sVar24 = (short)((ulonglong)uVar13 >> 0x20);

    sVar1 = (short)((ulonglong)uVar13 >> 0x30);

    sVar18 = (short)uVar11;

    sVar20 = (short)((ulonglong)uVar11 >> 0x10);

    sVar25 = (short)((ulonglong)uVar11 >> 0x20);

    sVar2 = (short)((ulonglong)uVar11 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar22 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar22 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 -

                                    (0xff < sVar15)));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar1) *

                                                                                    (sVar1 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar1)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar3,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                             (sVar2 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar2)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar25) * (sVar25 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar25)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar11 -

                                    (0xff < sVar18)));

    uVar32 = (uVar14 | uVar10 << 8) & DAT_008340f0;

    uVar14 = ((uVar10 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar14 << 8) & _DAT_008340f8;

    uVar10 = (uVar32 | uVar32 >> 0x10) & _DAT_00834100;

    *(ulonglong *)((int)param_6 + (0x20 - param_7)) = uVar9 >> 0x20 | uVar14 << 0x20;

    *(ulonglong *)((int)param_6 + (0x28 - param_7)) = (uVar14 >> 0x20) << 0x10 | uVar10;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    uVar11 = param_3[0x12];

    uVar22 = paddsw(uVar31,uVar11);

    uVar13 = paddsw(uVar29,uVar11);

    uVar11 = psubsw(uVar11,uVar27);

    sVar15 = (short)uVar22;

    sVar18 = (short)((ulonglong)uVar22 >> 0x10);

    cVar3 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) - (0xff < sVar18);

    uVar30 = CONCAT11(cVar3,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 - (0xff < sVar15));

    sVar19 = (short)((ulonglong)uVar22 >> 0x20);

    sVar21 = (short)((ulonglong)uVar22 >> 0x30);

    sVar15 = (short)uVar13;

    sVar18 = (short)((ulonglong)uVar13 >> 0x10);

    cVar4 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar18);

    uVar28 = CONCAT11(cVar4,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar13 - (0xff < sVar15));

    sVar20 = (short)((ulonglong)uVar13 >> 0x20);

    sVar24 = (short)((ulonglong)uVar13 >> 0x30);

    sVar15 = (short)uVar11;

    sVar18 = (short)((ulonglong)uVar11 >> 0x10);

    cVar5 = (0 < sVar18) * (sVar18 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) - (0xff < sVar18);

    uVar8 = CONCAT11(cVar5,(0 < sVar15) * (sVar15 < 0x100) * (char)uVar11 - (0xff < sVar15));

    sVar15 = (short)((ulonglong)uVar11 >> 0x20);

    sVar18 = (short)((ulonglong)uVar11 >> 0x30);

    uVar9 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar21) *

                                                                                   (sVar21 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar22 >> 0x30) - (0xff < sVar21)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar19) * (sVar19 < 0x100) *

                                                  (char)((ulonglong)uVar22 >> 0x20) -

                                                  (0xff < sVar19)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar30)) >> 0x10),uVar30) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar24) *

                                                                                    (sVar24 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar24)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar20)) << 0x20) >> 0x18),

                                      CONCAT12(cVar4,uVar28)) >> 0x10),uVar28) & 0xffffffff00ff00ff;

    uVar10 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar18) *

                                                                                    (sVar18 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar11 >> 0x30) - (0xff < sVar18)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar15) * (sVar15 < 0x100) *

                                                  (char)((ulonglong)uVar11 >> 0x20) -

                                                  (0xff < sVar15)) << 0x20) >> 0x18),

                                      CONCAT12(cVar5,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar32 = (uVar9 | uVar10 << 8) & _DAT_008340f8;

    uVar9 = (uVar10 | uVar14 << 8) & DAT_008340f0 | (uVar14 | uVar9 >> 8) & _DAT_008340f8;

    param_6[3] = (uVar32 << 0x10 | uVar32) & _DAT_00834100 | (uVar9 << 0x20) >> 0x10;

    uVar11 = param_3[0x13];

    uVar22 = paddsw(uVar23,uVar11);

    uVar13 = paddsw(uVar17,uVar11);

    uVar11 = psubsw(uVar11,uVar16);

    sVar15 = (short)uVar22;

    sVar19 = (short)((ulonglong)uVar22 >> 0x10);

    sVar21 = (short)((ulonglong)uVar22 >> 0x20);

    sVar26 = (short)((ulonglong)uVar22 >> 0x30);

    sVar18 = (short)uVar13;

    sVar20 = (short)((ulonglong)uVar13 >> 0x10);

    cVar3 = (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar13 >> 0x10) - (0xff < sVar20);

    uVar8 = CONCAT11(cVar3,(0 < sVar18) * (sVar18 < 0x100) * (char)uVar13 - (0xff < sVar18));

    sVar24 = (short)((ulonglong)uVar13 >> 0x20);

    sVar1 = (short)((ulonglong)uVar13 >> 0x30);

    sVar18 = (short)uVar11;

    sVar20 = (short)((ulonglong)uVar11 >> 0x10);

    sVar25 = (short)((ulonglong)uVar11 >> 0x20);

    sVar2 = (short)((ulonglong)uVar11 >> 0x30);

    uVar10 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar26) *

                                                                             (sVar26 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar22 >> 0x30)

                                                                            - (0xff < sVar26)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar21) * (sVar21 < 0x100) *

                                                      (char)((ulonglong)uVar22 >> 0x20) -

                                                      (0xff < sVar21)) << 0x20) >> 0x18),

                               (0 < sVar19) * (sVar19 < 0x100) * (char)((ulonglong)uVar22 >> 0x10) -

                               (0xff < sVar19)),

                      (ushort)(byte)((0 < sVar15) * (sVar15 < 0x100) * (char)uVar22 -

                                    (0xff < sVar15)));

    uVar12 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar1) *

                                                                                    (sVar1 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar13 >> 0x30) - (0xff < sVar1)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar24) * (sVar24 < 0x100) *

                                                  (char)((ulonglong)uVar13 >> 0x20) -

                                                  (0xff < sVar24)) << 0x20) >> 0x18),

                                      CONCAT12(cVar3,uVar8)) >> 0x10),uVar8) & 0xffffffff00ff00ff;

    uVar14 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar2) *

                                                                             (sVar2 < 0x100) *

                                                                             (char)((ulonglong)

                                                                                    uVar11 >> 0x30)

                                                                            - (0xff < sVar2)) <<

                                                              0x30) >> 0x28),

                                                      (0 < sVar25) * (sVar25 < 0x100) *

                                                      (char)((ulonglong)uVar11 >> 0x20) -

                                                      (0xff < sVar25)) << 0x20) >> 0x18),

                               (0 < sVar20) * (sVar20 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                               (0xff < sVar20)),

                      (ushort)(byte)((0 < sVar18) * (sVar18 < 0x100) * (char)uVar11 -

                                    (0xff < sVar18)));

    uVar32 = (uVar14 | uVar10 << 8) & DAT_008340f0;

    uVar14 = ((uVar10 | uVar12 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar12 | uVar14 << 8) & _DAT_008340f8;

    uVar10 = (uVar32 | uVar32 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar9 >> 0x20 | uVar14 << 0x20;

    param_6[5] = (uVar14 >> 0x20) << 0x10 | uVar10;

    param_3 = param_3 + 4;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    iVar7 = iVar7 + -1;

  } while (iVar7 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_00659c30 at 0x00659C30 (size: 1496) ---


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



undefined8 __fastcall

FUN_00659c30(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  char cVar1;

  char cVar2;

  char cVar3;

  int iVar4;

  undefined4 in_EAX;

  int iVar5;

  undefined2 uVar6;

  ulonglong uVar7;

  ulonglong uVar8;

  short sVar9;

  short sVar12;

  short sVar13;

  undefined8 uVar10;

  short sVar14;

  ulonglong uVar11;

  short sVar15;

  short sVar16;

  short sVar19;

  short sVar21;

  undefined8 uVar17;

  short sVar20;

  short sVar22;

  ulonglong uVar18;

  short sVar23;

  short sVar25;

  short sVar26;

  undefined8 uVar24;

  short sVar27;

  short sVar28;

  short sVar30;

  short sVar31;

  undefined8 uVar29;

  short sVar32;

  undefined2 uVar33;

  undefined2 uVar34;

  undefined8 uVar35;

  ulonglong uVar36;

  undefined8 uVar37;

  

  iVar5 = 4;

  do {

    uVar17 = psllw(*param_5,4);

    uVar10 = psllw(*param_4,4);

    uVar29 = pmulhw(DAT_00834098,uVar10);

    uVar24 = pmulhw(DAT_00834090,uVar17);

    sVar28 = (short)uVar29 - (short)DAT_008340b8;

    sVar30 = (short)((ulonglong)uVar29 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar31 = (short)((ulonglong)uVar29 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar32 = (short)((ulonglong)uVar29 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar23 = (short)uVar24 - (short)DAT_008340c0;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar24 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                       (short)((ulonglong)uVar17 >> 0x10)),

                              CONCAT22((short)uVar10,(short)uVar17)),DAT_008340a0);

    uVar10 = pmaddwd(CONCAT26((short)((ulonglong)uVar10 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar17 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar10 >> 0x20),

                                                (short)((ulonglong)uVar17 >> 0x20)))),DAT_008340a0);

    uVar37 = CONCAT44(CONCAT22(sVar30,sVar30),CONCAT22(sVar28,sVar28));

    uVar29 = CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23));

    iVar4 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar17 = CONCAT44((int)((ulonglong)uVar24 >> 0x20) - iVar4 >> 0xc,

                      (int)uVar24 - (int)DAT_008340c8 >> 0xc);

    uVar10 = CONCAT44((int)((ulonglong)uVar10 >> 0x20) - iVar4 >> 0xc,

                      (int)uVar10 - (int)DAT_008340c8 >> 0xc);

    uVar17 = packssdw(uVar17,uVar17);

    uVar10 = packssdw(uVar10,uVar10);

    uVar6 = (undefined2)((ulonglong)uVar17 >> 0x10);

    uVar17 = CONCAT44(CONCAT22(uVar6,uVar6),CONCAT22((short)uVar17,(short)uVar17));

    sVar19 = (short)((ulonglong)uVar10 >> 0x10);

    sVar15 = (short)uVar10;

    uVar10 = *param_3;

    uVar35 = paddsw(uVar37,uVar10);

    uVar24 = paddsw(uVar29,uVar10);

    uVar10 = psubsw(uVar10,uVar17);

    sVar23 = (short)uVar35;

    sVar25 = (short)((ulonglong)uVar35 >> 0x10);

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar35 >> 0x10) - (0xff < sVar25);

    uVar33 = CONCAT11(cVar1,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar35 - (0xff < sVar23));

    sVar28 = (short)((ulonglong)uVar35 >> 0x20);

    sVar12 = (short)((ulonglong)uVar35 >> 0x30);

    sVar23 = (short)uVar24;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10);

    cVar2 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar25);

    uVar6 = CONCAT11(cVar2,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar24 - (0xff < sVar23));

    sVar30 = (short)((ulonglong)uVar24 >> 0x20);

    sVar13 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar10;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar9 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                   (sVar12 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar35 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar28) * (sVar28 < 0x100) *

                                                  (char)((ulonglong)uVar35 >> 0x20) -

                                                  (0xff < sVar28)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar33)) >> 0x10),uVar33) & 0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar13) *

                                                                                    (sVar13 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar24 >> 0x30) - (0xff < sVar13)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar30) * (sVar30 < 0x100) *

                                                  (char)((ulonglong)uVar24 >> 0x20) -

                                                  (0xff < sVar30)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar6)) >> 0x10),uVar6) & 0xffffffff00ff00ff;

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                            (sVar14 < 0x100) *

                                                                            (char)((ulonglong)uVar10

                                                                                  >> 0x30) -

                                                                           (0xff < sVar14)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar9) * (sVar9 < 0x100) *

                                                     (char)((ulonglong)uVar10 >> 0x20) -

                                                     (0xff < sVar9)) << 0x20) >> 0x18),

                              (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                              (0xff < sVar25)),

                     (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)uVar10 - (0xff < sVar23)

                                   ));

    uVar36 = (uVar7 | uVar8 << 8) & _DAT_008340f8;

    uVar7 = (uVar8 | uVar18 << 8) & DAT_008340f0 | (uVar18 | uVar7 >> 8) & _DAT_008340f8;

    *param_6 = (uVar36 << 0x10 | uVar36) & _DAT_00834100 | (uVar7 << 0x20) >> 0x10;

    uVar10 = param_3[1];

    sVar23 = (short)uVar10;

    sVar16 = sVar26 + sVar23;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar20 = sVar26 + sVar25;

    sVar28 = (short)((ulonglong)uVar10 >> 0x20);

    sVar21 = sVar27 + sVar28;

    sVar30 = (short)((ulonglong)uVar10 >> 0x30);

    sVar22 = sVar27 + sVar30;

    sVar9 = sVar31 + sVar23;

    sVar12 = sVar31 + sVar25;

    sVar13 = sVar32 + sVar28;

    sVar14 = sVar32 + sVar30;

    sVar23 = sVar23 - sVar15;

    sVar25 = sVar25 - sVar15;

    sVar28 = sVar28 - sVar19;

    sVar30 = sVar30 - sVar19;

    cVar1 = (0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12);

    uVar6 = CONCAT11(cVar1,(0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 - (0xff < sVar9));

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                            (sVar22 < 0x100) *

                                                                            (char)sVar22 -

                                                                           (0xff < sVar22)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar21) * (sVar21 < 0x100) * (char)sVar21

                                                     - (0xff < sVar21)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar16) * (sVar16 < 0x100) * (char)sVar16 - (0xff < sVar16)

                                   ));

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                                    (sVar14 < 0x100)

                                                                                    * (char)sVar14 -

                                                                                   (0xff < sVar14))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar13) * (sVar13 < 0x100) *

                                                             (char)sVar13 - (0xff < sVar13)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar6)) >> 0x10),uVar6) &

             0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar30) *

                                                                             (sVar30 < 0x100) *

                                                                             (char)sVar30 -

                                                                            (0xff < sVar30)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar28) * (sVar28 < 0x100) * (char)sVar28

                                                      - (0xff < sVar28)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)sVar23 -

                                    (0xff < sVar23)));

    uVar36 = (uVar18 | uVar8 << 8) & DAT_008340f0;

    uVar18 = ((uVar8 | uVar11 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar11 | uVar18 << 8) & _DAT_008340f8;

    uVar8 = (uVar36 | uVar36 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar7 >> 0x20 | uVar18 << 0x20;

    param_6[2] = (uVar18 >> 0x20) << 0x10 | uVar8;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    uVar10 = param_3[2];

    uVar37 = paddsw(uVar37,uVar10);

    uVar24 = paddsw(uVar29,uVar10);

    uVar10 = psubsw(uVar10,uVar17);

    sVar23 = (short)uVar37;

    sVar25 = (short)((ulonglong)uVar37 >> 0x10);

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar37 >> 0x10) - (0xff < sVar25);

    uVar34 = CONCAT11(cVar1,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar37 - (0xff < sVar23));

    sVar28 = (short)((ulonglong)uVar37 >> 0x20);

    sVar9 = (short)((ulonglong)uVar37 >> 0x30);

    sVar23 = (short)uVar24;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10);

    cVar2 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar25);

    uVar33 = CONCAT11(cVar2,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar24 - (0xff < sVar23));

    sVar30 = (short)((ulonglong)uVar24 >> 0x20);

    sVar12 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar10;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    cVar3 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar25);

    uVar6 = CONCAT11(cVar3,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar10 - (0xff < sVar23));

    sVar23 = (short)((ulonglong)uVar10 >> 0x20);

    sVar25 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar9) *

                                                                                   (sVar9 < 0x100) *

                                                                                   (char)((ulonglong

                                                                                          )uVar37 >>

                                                                                         0x30) -

                                                                                  (0xff < sVar9)) <<

                                                                    0x30) >> 0x28),

                                                            (0 < sVar28) * (sVar28 < 0x100) *

                                                            (char)((ulonglong)uVar37 >> 0x20) -

                                                            (0xff < sVar28)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar34)) >> 0x10),uVar34) & 0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                    (sVar12 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar24 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar30) * (sVar30 < 0x100) *

                                                  (char)((ulonglong)uVar24 >> 0x20) -

                                                  (0xff < sVar30)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar33)) >> 0x10),uVar33) & 0xffffffff00ff00ff;

    uVar8 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                                   (sVar25 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar10 >> 0x30) - (0xff < sVar25)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar6)) >> 0x10),uVar6) & 0xffffffff00ff00ff;

    uVar36 = (uVar7 | uVar8 << 8) & _DAT_008340f8;

    uVar7 = (uVar8 | uVar18 << 8) & DAT_008340f0 | (uVar18 | uVar7 >> 8) & _DAT_008340f8;

    *param_6 = (uVar36 << 0x10 | uVar36) & _DAT_00834100 | (uVar7 << 0x20) >> 0x10;

    uVar10 = param_3[3];

    sVar23 = (short)uVar10;

    sVar13 = sVar26 + sVar23;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar26 = sVar26 + sVar25;

    sVar28 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = sVar27 + sVar28;

    sVar30 = (short)((ulonglong)uVar10 >> 0x30);

    sVar27 = sVar27 + sVar30;

    sVar9 = sVar31 + sVar23;

    sVar31 = sVar31 + sVar25;

    sVar12 = sVar32 + sVar28;

    sVar32 = sVar32 + sVar30;

    sVar23 = sVar23 - sVar15;

    sVar25 = sVar25 - sVar15;

    sVar28 = sVar28 - sVar19;

    sVar30 = sVar30 - sVar19;

    cVar1 = (0 < sVar31) * (sVar31 < 0x100) * (char)sVar31 - (0xff < sVar31);

    uVar6 = CONCAT11(cVar1,(0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 - (0xff < sVar9));

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar27) *

                                                                            (sVar27 < 0x100) *

                                                                            (char)sVar27 -

                                                                           (0xff < sVar27)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar14) * (sVar14 < 0x100) * (char)sVar14

                                                     - (0xff < sVar14)) << 0x20) >> 0x18),

                              (0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26)),

                     (ushort)(byte)((0 < sVar13) * (sVar13 < 0x100) * (char)sVar13 - (0xff < sVar13)

                                   ));

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar32) *

                                                                                    (sVar32 < 0x100)

                                                                                    * (char)sVar32 -

                                                                                   (0xff < sVar32))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar12) * (sVar12 < 0x100) *

                                                             (char)sVar12 - (0xff < sVar12)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar6)) >> 0x10),uVar6) &

             0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar30) *

                                                                             (sVar30 < 0x100) *

                                                                             (char)sVar30 -

                                                                            (0xff < sVar30)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar28) * (sVar28 < 0x100) * (char)sVar28

                                                      - (0xff < sVar28)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)sVar23 -

                                    (0xff < sVar23)));

    uVar36 = (uVar18 | uVar8 << 8) & DAT_008340f0;

    uVar18 = ((uVar8 | uVar11 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar11 | uVar18 << 8) & _DAT_008340f8;

    uVar8 = (uVar36 | uVar36 >> 0x10) & _DAT_00834100;

    param_6[1] = uVar7 >> 0x20 | uVar18 << 0x20;

    param_6[2] = (uVar18 >> 0x20) << 0x10 | uVar8;

    uVar17 = psllw(param_5[1],4);

    uVar10 = psllw(param_4[1],4);

    uVar29 = pmulhw(DAT_00834098,uVar10);

    uVar24 = pmulhw(DAT_00834090,uVar17);

    sVar28 = (short)uVar29 - (short)DAT_008340b8;

    sVar30 = (short)((ulonglong)uVar29 >> 0x10) - (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar31 = (short)((ulonglong)uVar29 >> 0x20) - (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar32 = (short)((ulonglong)uVar29 >> 0x30) - (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar23 = (short)uVar24 - (short)DAT_008340c0;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10) - (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar26 = (short)((ulonglong)uVar24 >> 0x20) - (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar27 = (short)((ulonglong)uVar24 >> 0x30) - (short)((ulonglong)DAT_008340c0 >> 0x30);

    uVar24 = pmaddwd(CONCAT44(CONCAT22((short)((ulonglong)uVar10 >> 0x10),

                                       (short)((ulonglong)uVar17 >> 0x10)),

                              CONCAT22((short)uVar10,(short)uVar17)),DAT_008340a0);

    uVar10 = pmaddwd(CONCAT26((short)((ulonglong)uVar10 >> 0x30),

                              CONCAT24((short)((ulonglong)uVar17 >> 0x30),

                                       CONCAT22((short)((ulonglong)uVar10 >> 0x20),

                                                (short)((ulonglong)uVar17 >> 0x20)))),DAT_008340a0);

    uVar37 = CONCAT44(CONCAT22(sVar30,sVar30),CONCAT22(sVar28,sVar28));

    uVar29 = CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23));

    iVar4 = (int)((ulonglong)DAT_008340c8 >> 0x20);

    uVar17 = CONCAT44((int)((ulonglong)uVar24 >> 0x20) - iVar4 >> 0xc,

                      (int)uVar24 - (int)DAT_008340c8 >> 0xc);

    uVar10 = CONCAT44((int)((ulonglong)uVar10 >> 0x20) - iVar4 >> 0xc,

                      (int)uVar10 - (int)DAT_008340c8 >> 0xc);

    uVar17 = packssdw(uVar17,uVar17);

    uVar10 = packssdw(uVar10,uVar10);

    uVar6 = (undefined2)((ulonglong)uVar17 >> 0x10);

    uVar17 = CONCAT44(CONCAT22(uVar6,uVar6),CONCAT22((short)uVar17,(short)uVar17));

    sVar19 = (short)((ulonglong)uVar10 >> 0x10);

    sVar15 = (short)uVar10;

    uVar10 = param_3[0x10];

    uVar35 = paddsw(uVar37,uVar10);

    uVar24 = paddsw(uVar29,uVar10);

    uVar10 = psubsw(uVar10,uVar17);

    sVar23 = (short)uVar35;

    sVar25 = (short)((ulonglong)uVar35 >> 0x10);

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar35 >> 0x10) - (0xff < sVar25);

    uVar33 = CONCAT11(cVar1,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar35 - (0xff < sVar23));

    sVar28 = (short)((ulonglong)uVar35 >> 0x20);

    sVar12 = (short)((ulonglong)uVar35 >> 0x30);

    sVar23 = (short)uVar24;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10);

    cVar2 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar25);

    uVar6 = CONCAT11(cVar2,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar24 - (0xff < sVar23));

    sVar30 = (short)((ulonglong)uVar24 >> 0x20);

    sVar13 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar10;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar9 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                   (sVar12 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar35 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar28) * (sVar28 < 0x100) *

                                                  (char)((ulonglong)uVar35 >> 0x20) -

                                                  (0xff < sVar28)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar33)) >> 0x10),uVar33) & 0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar13) *

                                                                                    (sVar13 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar24 >> 0x30) - (0xff < sVar13)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar30) * (sVar30 < 0x100) *

                                                  (char)((ulonglong)uVar24 >> 0x20) -

                                                  (0xff < sVar30)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar6)) >> 0x10),uVar6) & 0xffffffff00ff00ff;

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                            (sVar14 < 0x100) *

                                                                            (char)((ulonglong)uVar10

                                                                                  >> 0x30) -

                                                                           (0xff < sVar14)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar9) * (sVar9 < 0x100) *

                                                     (char)((ulonglong)uVar10 >> 0x20) -

                                                     (0xff < sVar9)) << 0x20) >> 0x18),

                              (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) -

                              (0xff < sVar25)),

                     (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)uVar10 - (0xff < sVar23)

                                   ));

    uVar36 = (uVar7 | uVar8 << 8) & _DAT_008340f8;

    uVar7 = (uVar8 | uVar18 << 8) & DAT_008340f0 | (uVar18 | uVar7 >> 8) & _DAT_008340f8;

    *(ulonglong *)((int)param_6 + (0x18 - param_7)) =

         (uVar36 << 0x10 | uVar36) & _DAT_00834100 | (uVar7 << 0x20) >> 0x10;

    uVar10 = param_3[0x11];

    sVar23 = (short)uVar10;

    sVar16 = sVar26 + sVar23;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar20 = sVar26 + sVar25;

    sVar28 = (short)((ulonglong)uVar10 >> 0x20);

    sVar21 = sVar27 + sVar28;

    sVar30 = (short)((ulonglong)uVar10 >> 0x30);

    sVar22 = sVar27 + sVar30;

    sVar9 = sVar31 + sVar23;

    sVar12 = sVar31 + sVar25;

    sVar13 = sVar32 + sVar28;

    sVar14 = sVar32 + sVar30;

    sVar23 = sVar23 - sVar15;

    sVar25 = sVar25 - sVar15;

    sVar28 = sVar28 - sVar19;

    sVar30 = sVar30 - sVar19;

    cVar1 = (0 < sVar12) * (sVar12 < 0x100) * (char)sVar12 - (0xff < sVar12);

    uVar6 = CONCAT11(cVar1,(0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 - (0xff < sVar9));

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar22) *

                                                                            (sVar22 < 0x100) *

                                                                            (char)sVar22 -

                                                                           (0xff < sVar22)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar21) * (sVar21 < 0x100) * (char)sVar21

                                                     - (0xff < sVar21)) << 0x20) >> 0x18),

                              (0 < sVar20) * (sVar20 < 0x100) * (char)sVar20 - (0xff < sVar20)),

                     (ushort)(byte)((0 < sVar16) * (sVar16 < 0x100) * (char)sVar16 - (0xff < sVar16)

                                   ));

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar14) *

                                                                                    (sVar14 < 0x100)

                                                                                    * (char)sVar14 -

                                                                                   (0xff < sVar14))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar13) * (sVar13 < 0x100) *

                                                             (char)sVar13 - (0xff < sVar13)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar6)) >> 0x10),uVar6) &

             0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar30) *

                                                                             (sVar30 < 0x100) *

                                                                             (char)sVar30 -

                                                                            (0xff < sVar30)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar28) * (sVar28 < 0x100) * (char)sVar28

                                                      - (0xff < sVar28)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)sVar23 -

                                    (0xff < sVar23)));

    uVar36 = (uVar18 | uVar8 << 8) & DAT_008340f0;

    uVar18 = ((uVar8 | uVar11 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar11 | uVar18 << 8) & _DAT_008340f8;

    uVar8 = (uVar36 | uVar36 >> 0x10) & _DAT_00834100;

    *(ulonglong *)((int)param_6 + (0x20 - param_7)) = uVar7 >> 0x20 | uVar18 << 0x20;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    *(ulonglong *)((int)param_6 + (0x28 - param_7)) = (uVar18 >> 0x20) << 0x10 | uVar8;

    uVar10 = param_3[0x12];

    uVar37 = paddsw(uVar37,uVar10);

    uVar24 = paddsw(uVar29,uVar10);

    uVar10 = psubsw(uVar10,uVar17);

    sVar23 = (short)uVar37;

    sVar25 = (short)((ulonglong)uVar37 >> 0x10);

    cVar1 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar37 >> 0x10) - (0xff < sVar25);

    uVar34 = CONCAT11(cVar1,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar37 - (0xff < sVar23));

    sVar28 = (short)((ulonglong)uVar37 >> 0x20);

    sVar9 = (short)((ulonglong)uVar37 >> 0x30);

    sVar23 = (short)uVar24;

    sVar25 = (short)((ulonglong)uVar24 >> 0x10);

    cVar2 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar24 >> 0x10) - (0xff < sVar25);

    uVar33 = CONCAT11(cVar2,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar24 - (0xff < sVar23));

    sVar30 = (short)((ulonglong)uVar24 >> 0x20);

    sVar12 = (short)((ulonglong)uVar24 >> 0x30);

    sVar23 = (short)uVar10;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    cVar3 = (0 < sVar25) * (sVar25 < 0x100) * (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar25);

    uVar6 = CONCAT11(cVar3,(0 < sVar23) * (sVar23 < 0x100) * (char)uVar10 - (0xff < sVar23));

    sVar23 = (short)((ulonglong)uVar10 >> 0x20);

    sVar25 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar9) *

                                                                                   (sVar9 < 0x100) *

                                                                                   (char)((ulonglong

                                                                                          )uVar37 >>

                                                                                         0x30) -

                                                                                  (0xff < sVar9)) <<

                                                                    0x30) >> 0x28),

                                                            (0 < sVar28) * (sVar28 < 0x100) *

                                                            (char)((ulonglong)uVar37 >> 0x20) -

                                                            (0xff < sVar28)) << 0x20) >> 0x18),

                                     CONCAT12(cVar1,uVar34)) >> 0x10),uVar34) & 0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar12) *

                                                                                    (sVar12 < 0x100)

                                                                                    * (char)((

                                                  ulonglong)uVar24 >> 0x30) - (0xff < sVar12)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar30) * (sVar30 < 0x100) *

                                                  (char)((ulonglong)uVar24 >> 0x20) -

                                                  (0xff < sVar30)) << 0x20) >> 0x18),

                                      CONCAT12(cVar2,uVar33)) >> 0x10),uVar33) & 0xffffffff00ff00ff;

    uVar8 = (ulonglong)

            CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar25) *

                                                                                   (sVar25 < 0x100)

                                                                                   * (char)((

                                                  ulonglong)uVar10 >> 0x30) - (0xff < sVar25)) <<

                                                  0x30) >> 0x28),

                                                  (0 < sVar23) * (sVar23 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x20) -

                                                  (0xff < sVar23)) << 0x20) >> 0x18),

                                     CONCAT12(cVar3,uVar6)) >> 0x10),uVar6) & 0xffffffff00ff00ff;

    uVar36 = (uVar7 | uVar8 << 8) & _DAT_008340f8;

    uVar7 = (uVar8 | uVar18 << 8) & DAT_008340f0 | (uVar18 | uVar7 >> 8) & _DAT_008340f8;

    param_6[3] = (uVar36 << 0x10 | uVar36) & _DAT_00834100 | (uVar7 << 0x20) >> 0x10;

    uVar10 = param_3[0x13];

    sVar23 = (short)uVar10;

    sVar13 = sVar26 + sVar23;

    sVar25 = (short)((ulonglong)uVar10 >> 0x10);

    sVar26 = sVar26 + sVar25;

    sVar28 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = sVar27 + sVar28;

    sVar30 = (short)((ulonglong)uVar10 >> 0x30);

    sVar27 = sVar27 + sVar30;

    sVar9 = sVar31 + sVar23;

    sVar31 = sVar31 + sVar25;

    sVar12 = sVar32 + sVar28;

    sVar32 = sVar32 + sVar30;

    sVar23 = sVar23 - sVar15;

    sVar25 = sVar25 - sVar15;

    sVar28 = sVar28 - sVar19;

    sVar30 = sVar30 - sVar19;

    cVar1 = (0 < sVar31) * (sVar31 < 0x100) * (char)sVar31 - (0xff < sVar31);

    uVar6 = CONCAT11(cVar1,(0 < sVar9) * (sVar9 < 0x100) * (char)sVar9 - (0xff < sVar9));

    uVar8 = (ulonglong)

            CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar27) *

                                                                            (sVar27 < 0x100) *

                                                                            (char)sVar27 -

                                                                           (0xff < sVar27)) << 0x30)

                                                            >> 0x28),

                                                     (0 < sVar14) * (sVar14 < 0x100) * (char)sVar14

                                                     - (0xff < sVar14)) << 0x20) >> 0x18),

                              (0 < sVar26) * (sVar26 < 0x100) * (char)sVar26 - (0xff < sVar26)),

                     (ushort)(byte)((0 < sVar13) * (sVar13 < 0x100) * (char)sVar13 - (0xff < sVar13)

                                   ));

    uVar11 = (ulonglong)

             CONCAT52((int5)(CONCAT43((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar32) *

                                                                                    (sVar32 < 0x100)

                                                                                    * (char)sVar32 -

                                                                                   (0xff < sVar32))

                                                                     << 0x30) >> 0x28),

                                                             (0 < sVar12) * (sVar12 < 0x100) *

                                                             (char)sVar12 - (0xff < sVar12)) << 0x20

                                            ) >> 0x18),CONCAT12(cVar1,uVar6)) >> 0x10),uVar6) &

             0xffffffff00ff00ff;

    uVar18 = (ulonglong)

             CONCAT52(CONCAT41((int)(((uint7)CONCAT21((short)(((uint7)(byte)((0 < sVar30) *

                                                                             (sVar30 < 0x100) *

                                                                             (char)sVar30 -

                                                                            (0xff < sVar30)) << 0x30

                                                              ) >> 0x28),

                                                      (0 < sVar28) * (sVar28 < 0x100) * (char)sVar28

                                                      - (0xff < sVar28)) << 0x20) >> 0x18),

                               (0 < sVar25) * (sVar25 < 0x100) * (char)sVar25 - (0xff < sVar25)),

                      (ushort)(byte)((0 < sVar23) * (sVar23 < 0x100) * (char)sVar23 -

                                    (0xff < sVar23)));

    uVar36 = (uVar18 | uVar8 << 8) & DAT_008340f0;

    uVar18 = ((uVar8 | uVar11 >> 8) & _DAT_008340f8) << 0x10 |

             (uVar11 | uVar18 << 8) & _DAT_008340f8;

    uVar8 = (uVar36 | uVar36 >> 0x10) & _DAT_00834100;

    param_6[4] = uVar7 >> 0x20 | uVar18 << 0x20;

    param_3 = param_3 + 4;

    param_6[5] = (uVar18 >> 0x20) << 0x10 | uVar8;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    iVar5 = iVar5 + -1;

  } while (iVar5 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_0065a210 at 0x0065A210 (size: 1434) ---


undefined8 __fastcall

FUN_0065a210(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,ulonglong *param_6,int param_7)



{

  short sVar1;

  short sVar2;

  short sVar3;

  short sVar4;

  short sVar5;

  char cVar6;

  uint uVar7;

  undefined4 in_EAX;

  int iVar8;

  undefined8 *puVar9;

  undefined8 uVar10;

  undefined8 uVar11;

  short sVar12;

  short sVar13;

  short sVar16;

  short sVar18;

  short sVar19;

  short sVar21;

  undefined8 uVar14;

  short sVar17;

  short sVar20;

  short sVar22;

  short sVar23;

  undefined8 uVar15;

  short sVar24;

  short sVar25;

  short sVar26;

  short sVar29;

  short sVar31;

  short sVar32;

  short sVar34;

  undefined8 uVar27;

  short sVar30;

  short sVar33;

  short sVar35;

  short sVar36;

  undefined8 uVar28;

  short sVar37;

  undefined2 uVar38;

  undefined2 uVar39;

  undefined2 uVar40;

  undefined2 uVar41;

  undefined2 uVar42;

  undefined2 uVar43;

  undefined2 uVar44;

  undefined2 uVar45;

  ulonglong uVar46;

  ulonglong uVar47;

  

  iVar8 = 8;

  while( true ) {

    uVar11 = psllw(*param_4,4);

    uVar10 = psllw(*param_5,4);

    uVar27 = pmulhw(DAT_00834098,uVar11);

    uVar14 = pmulhw(DAT_00834090,uVar10);

    sVar12 = (short)uVar14 - (short)DAT_008340c0;

    sVar18 = (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar16 = (short)((ulonglong)uVar14 >> 0x10) - sVar18;

    sVar21 = (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar19 = (short)((ulonglong)uVar14 >> 0x20) - sVar21;

    sVar24 = (short)((ulonglong)DAT_008340c0 >> 0x30);

    sVar22 = (short)((ulonglong)uVar14 >> 0x30) - sVar24;

    sVar25 = (short)uVar27 - (short)DAT_008340b8;

    sVar31 = (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar29 = (short)((ulonglong)uVar27 >> 0x10) - sVar31;

    sVar34 = (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar32 = (short)((ulonglong)uVar27 >> 0x20) - sVar34;

    sVar37 = (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar35 = (short)((ulonglong)uVar27 >> 0x30) - sVar37;

    sVar30 = (short)((ulonglong)DAT_008340a8 >> 0x10);

    sVar33 = (short)((ulonglong)DAT_008340a8 >> 0x20);

    sVar36 = (short)((ulonglong)DAT_008340a8 >> 0x30);

    sVar17 = (short)((ulonglong)DAT_008340b0 >> 0x10);

    sVar20 = (short)((ulonglong)DAT_008340b0 >> 0x20);

    sVar23 = (short)((ulonglong)DAT_008340b0 >> 0x30);

    sVar1 = (short)((ulonglong)DAT_00834138 >> 0x10);

    sVar2 = (short)((ulonglong)DAT_00834138 >> 0x20);

    sVar3 = (short)((ulonglong)DAT_00834138 >> 0x30);

    uVar27 = psraw(CONCAT26((sVar23 * (ushort)((ulonglong)uVar10 >> 0x34) +

                            sVar36 * (ushort)((ulonglong)uVar11 >> 0x34)) - sVar3,

                            CONCAT24((sVar20 * ((ushort)((ulonglong)uVar10 >> 0x20) >> 4) +

                                     sVar33 * ((ushort)((ulonglong)uVar11 >> 0x20) >> 4)) - sVar2,

                                     CONCAT22((sVar17 * ((ushort)((ulonglong)uVar10 >> 0x10) >> 4) +

                                              sVar30 * ((ushort)((ulonglong)uVar11 >> 0x10) >> 4)) -

                                              sVar1,((short)DAT_008340b0 * ((ushort)uVar10 >> 4) +

                                                    (short)DAT_008340a8 * ((ushort)uVar11 >> 4)) -

                                                    (short)DAT_00834138))),8);

    uVar14 = psllw(param_4[1],4);

    uVar11 = psllw(param_5[1],4);

    uVar28 = pmulhw(DAT_00834098,uVar14);

    uVar15 = pmulhw(DAT_00834090,uVar11);

    uVar10 = *param_3;

    sVar13 = (short)uVar15 - (short)DAT_008340c0;

    sVar18 = (short)((ulonglong)uVar15 >> 0x10) - sVar18;

    sVar21 = (short)((ulonglong)uVar15 >> 0x20) - sVar21;

    sVar24 = (short)((ulonglong)uVar15 >> 0x30) - sVar24;

    sVar26 = (short)uVar28 - (short)DAT_008340b8;

    sVar31 = (short)((ulonglong)uVar28 >> 0x10) - sVar31;

    sVar34 = (short)((ulonglong)uVar28 >> 0x20) - sVar34;

    sVar37 = (short)((ulonglong)uVar28 >> 0x30) - sVar37;

    uVar14 = psraw(CONCAT26((sVar23 * (ushort)((ulonglong)uVar11 >> 0x34) +

                            sVar36 * (ushort)((ulonglong)uVar14 >> 0x34)) - sVar3,

                            CONCAT24((sVar20 * ((ushort)((ulonglong)uVar11 >> 0x20) >> 4) +

                                     sVar33 * ((ushort)((ulonglong)uVar14 >> 0x20) >> 4)) - sVar2,

                                     CONCAT22((sVar17 * ((ushort)((ulonglong)uVar11 >> 0x10) >> 4) +

                                              sVar30 * ((ushort)((ulonglong)uVar14 >> 0x10) >> 4)) -

                                              sVar1,((short)DAT_008340b0 * ((ushort)uVar11 >> 4) +

                                                    (short)DAT_008340a8 * ((ushort)uVar14 >> 4)) -

                                                    (short)DAT_00834138))),8);

    uVar42 = (undefined2)((ulonglong)uVar27 >> 0x10);

    uVar38 = (undefined2)uVar27;

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar16,sVar16),CONCAT22(sVar12,sVar12)),uVar10);

    uVar15 = paddsw(CONCAT44(CONCAT22(sVar29,sVar29),CONCAT22(sVar25,sVar25)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar42,uVar42),CONCAT22(uVar38,uVar38)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar15;

    sVar3 = (short)((ulonglong)uVar15 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar15 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar15 >> 0x20);

    sVar4 = (short)((ulonglong)uVar15 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar15 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    *param_6 = (ulonglong)

               CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                        (0xff < sVar17),

                        (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)))

               | CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

               DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[1] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar15 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar15 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[1];

    uVar43 = (undefined2)((ulonglong)uVar27 >> 0x30);

    uVar39 = (undefined2)((ulonglong)uVar27 >> 0x20);

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar19,sVar19)),uVar10);

    uVar27 = paddsw(CONCAT44(CONCAT22(sVar35,sVar35),CONCAT22(sVar32,sVar32)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar43,uVar43),CONCAT22(uVar39,uVar39)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar27;

    sVar3 = (short)((ulonglong)uVar27 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar27 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar27 >> 0x20);

    sVar4 = (short)((ulonglong)uVar27 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar27 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[2] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[3] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar27 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar27 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[0x10];

    uVar44 = (undefined2)((ulonglong)uVar14 >> 0x10);

    uVar40 = (undefined2)uVar14;

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar13,sVar13)),uVar10);

    uVar27 = paddsw(CONCAT44(CONCAT22(sVar31,sVar31),CONCAT22(sVar26,sVar26)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar44,uVar44),CONCAT22(uVar40,uVar40)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar27;

    sVar3 = (short)((ulonglong)uVar27 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar27 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar27 >> 0x20);

    sVar4 = (short)((ulonglong)uVar27 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar27 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[4] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[5] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar27 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar27 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[0x11];

    uVar45 = (undefined2)((ulonglong)uVar14 >> 0x30);

    uVar41 = (undefined2)((ulonglong)uVar14 >> 0x20);

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar21,sVar21)),uVar10);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar37,sVar37),CONCAT22(sVar34,sVar34)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar45,uVar45),CONCAT22(uVar41,uVar41)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar14;

    sVar3 = (short)((ulonglong)uVar14 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar14 >> 0x20);

    sVar4 = (short)((ulonglong)uVar14 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar14 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[6] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[7] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    param_6 = (ulonglong *)((int)param_6 + param_7);

    puVar9 = param_3 + 2;

    uVar10 = *puVar9;

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar16,sVar16),CONCAT22(sVar12,sVar12)),uVar10);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar29,sVar29),CONCAT22(sVar25,sVar25)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar42,uVar42),CONCAT22(uVar38,uVar38)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar14;

    sVar3 = (short)((ulonglong)uVar14 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar14 >> 0x20);

    sVar4 = (short)((ulonglong)uVar14 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar14 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    *param_6 = (ulonglong)

               CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                        (0xff < sVar17),

                        (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)))

               | CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

               DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[1] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[3];

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar19,sVar19)),uVar10);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar35,sVar35),CONCAT22(sVar32,sVar32)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar43,uVar43),CONCAT22(uVar39,uVar39)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar14;

    sVar3 = (short)((ulonglong)uVar14 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar14 >> 0x20);

    sVar4 = (short)((ulonglong)uVar14 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar14 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[2] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[3] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[0x12];

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar18,sVar18),CONCAT22(sVar13,sVar13)),uVar10);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar31,sVar31),CONCAT22(sVar26,sVar26)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar44,uVar44),CONCAT22(uVar40,uVar40)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar14;

    sVar3 = (short)((ulonglong)uVar14 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar14 >> 0x20);

    sVar4 = (short)((ulonglong)uVar14 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar14 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[4] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[5] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    uVar10 = param_3[0x13];

    uVar11 = paddsw(CONCAT44(CONCAT22(sVar24,sVar24),CONCAT22(sVar21,sVar21)),uVar10);

    uVar14 = paddsw(CONCAT44(CONCAT22(sVar37,sVar37),CONCAT22(sVar34,sVar34)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar45,uVar45),CONCAT22(uVar41,uVar41)));

    sVar1 = (short)uVar11;

    sVar17 = (short)((ulonglong)uVar11 >> 0x10);

    sVar23 = (short)((ulonglong)uVar11 >> 0x20);

    sVar36 = (short)((ulonglong)uVar11 >> 0x30);

    sVar2 = (short)uVar14;

    sVar3 = (short)((ulonglong)uVar14 >> 0x10);

    cVar6 = (0 < sVar3) * (sVar3 < 0x100) * (char)((ulonglong)uVar14 >> 0x10) - (0xff < sVar3);

    sVar30 = (short)((ulonglong)uVar14 >> 0x20);

    sVar4 = (short)((ulonglong)uVar14 >> 0x30);

    sVar3 = (short)uVar10;

    sVar20 = (short)((ulonglong)uVar10 >> 0x10);

    sVar33 = (short)((ulonglong)uVar10 >> 0x20);

    sVar5 = (short)((ulonglong)uVar10 >> 0x30);

    uVar47 = (ulonglong)

             CONCAT12(cVar6,CONCAT11(cVar6,(0 < sVar2) * (sVar2 < 0x100) * (char)uVar14 -

                                           (0xff < sVar2))) & 0xffffffff00ff00ff;

    uVar7 = (uint)(((uint7)(byte)((0 < sVar33) * (sVar33 < 0x100) *

                                  (char)((ulonglong)uVar10 >> 0x20) - (0xff < sVar33)) << 0x20) >>

                  0x18);

    uVar46 = psllw((ulonglong)

                   CONCAT24((short)CONCAT41(uVar7,(0 < sVar20) * (sVar20 < 0x100) *

                                                  (char)((ulonglong)uVar10 >> 0x10) -

                                                  (0xff < sVar20)),

                            (uint)(byte)((0 < sVar3) * (sVar3 < 0x100) * (char)uVar10 -

                                        (0xff < sVar3))),8);

    param_6[6] = (ulonglong)

                 CONCAT14((0 < sVar17) * (sVar17 < 0x100) * (char)((ulonglong)uVar11 >> 0x10) -

                          (0xff < sVar17),

                          (uint)(byte)((0 < sVar1) * (sVar1 < 0x100) * (char)uVar11 - (0xff < sVar1)

                                      )) |

                 CONCAT44((uint)(ushort)(uVar47 >> 0x10) << 0x10,(int)uVar47 << 0x10) | uVar46 |

                 DAT_00834140;

    uVar47 = psllw((ulonglong)

                   CONCAT14((0 < sVar5) * (sVar5 < 0x100) * (char)((ulonglong)uVar10 >> 0x30) -

                            (0xff < sVar5),uVar7 >> 8),8);

    param_6[7] = (ulonglong)

                 CONCAT14((0 < sVar36) * (sVar36 < 0x100) * (char)((ulonglong)uVar11 >> 0x30) -

                          (0xff < sVar36),

                          (uint)(byte)((0 < sVar23) * (sVar23 < 0x100) *

                                       (char)((ulonglong)uVar11 >> 0x20) - (0xff < sVar23))) |

                 (ulonglong)

                 CONCAT42((uint)(byte)((0 < sVar4) * (sVar4 < 0x100) *

                                       (char)((ulonglong)uVar14 >> 0x30) - (0xff < sVar4)) << 0x10,

                          (ushort)(byte)((0 < sVar30) * (sVar30 < 0x100) *

                                         (char)((ulonglong)uVar14 >> 0x20) - (0xff < sVar30))) <<

                 0x10 | uVar47 | DAT_00834140;

    iVar8 = iVar8 + -1;

    if (iVar8 == 0) break;

    if (iVar8 == 4) {

      puVar9 = param_3 + 0x12;

    }

    param_3 = puVar9 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_6 = (ulonglong *)((int)param_6 + param_7);

  }

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_0065a7b0 at 0x0065A7B0 (size: 1666) ---


undefined8 __fastcall

FUN_0065a7b0(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,undefined4 param_6,ulonglong *param_7,int param_8)



{

  short sVar1;

  short sVar2;

  short sVar3;

  uint uVar4;

  ushort uVar5;

  ushort uVar6;

  ushort uVar7;

  undefined4 in_EAX;

  int iVar8;

  undefined8 *puVar9;

  undefined8 uVar10;

  short sVar11;

  short sVar13;

  short sVar14;

  undefined8 uVar12;

  short sVar15;

  short sVar16;

  short sVar17;

  short sVar20;

  short sVar22;

  short sVar23;

  short sVar24;

  undefined8 uVar18;

  short sVar21;

  short sVar25;

  short sVar26;

  undefined8 uVar19;

  short sVar27;

  short sVar28;

  short sVar29;

  short sVar32;

  short sVar34;

  ushort uVar35;

  short sVar36;

  short sVar38;

  undefined8 uVar30;

  short sVar33;

  short sVar37;

  short sVar39;

  short sVar40;

  undefined8 uVar31;

  short sVar41;

  undefined2 uVar42;

  undefined2 uVar43;

  undefined2 uVar44;

  undefined2 uVar45;

  undefined2 uVar46;

  undefined2 uVar47;

  undefined2 uVar48;

  undefined2 uVar49;

  short sVar51;

  ulonglong uVar50;

  ulonglong uVar52;

  

  iVar8 = 8;

  while( true ) {

    uVar12 = psllw(*param_4,4);

    uVar10 = psllw(*param_5,4);

    uVar30 = pmulhw(DAT_00834098,uVar12);

    uVar18 = pmulhw(DAT_00834090,uVar10);

    sVar16 = (short)uVar18 - (short)DAT_008340c0;

    sVar22 = (short)((ulonglong)DAT_008340c0 >> 0x10);

    sVar20 = (short)((ulonglong)uVar18 >> 0x10) - sVar22;

    sVar24 = (short)((ulonglong)DAT_008340c0 >> 0x20);

    sVar23 = (short)((ulonglong)uVar18 >> 0x20) - sVar24;

    sVar27 = (short)((ulonglong)DAT_008340c0 >> 0x30);

    sVar25 = (short)((ulonglong)uVar18 >> 0x30) - sVar27;

    sVar28 = (short)uVar30 - (short)DAT_008340b8;

    sVar34 = (short)((ulonglong)DAT_008340b8 >> 0x10);

    sVar32 = (short)((ulonglong)uVar30 >> 0x10) - sVar34;

    sVar38 = (short)((ulonglong)DAT_008340b8 >> 0x20);

    sVar36 = (short)((ulonglong)uVar30 >> 0x20) - sVar38;

    sVar41 = (short)((ulonglong)DAT_008340b8 >> 0x30);

    sVar39 = (short)((ulonglong)uVar30 >> 0x30) - sVar41;

    sVar33 = (short)((ulonglong)DAT_008340a8 >> 0x10);

    sVar37 = (short)((ulonglong)DAT_008340a8 >> 0x20);

    sVar40 = (short)((ulonglong)DAT_008340a8 >> 0x30);

    sVar21 = (short)((ulonglong)DAT_008340b0 >> 0x10);

    sVar51 = (short)((ulonglong)DAT_008340b0 >> 0x20);

    sVar26 = (short)((ulonglong)DAT_008340b0 >> 0x30);

    sVar1 = (short)((ulonglong)DAT_00834138 >> 0x10);

    sVar2 = (short)((ulonglong)DAT_00834138 >> 0x20);

    sVar3 = (short)((ulonglong)DAT_00834138 >> 0x30);

    uVar30 = psraw(CONCAT26((sVar26 * (ushort)((ulonglong)uVar10 >> 0x34) +

                            sVar40 * (ushort)((ulonglong)uVar12 >> 0x34)) - sVar3,

                            CONCAT24((sVar51 * ((ushort)((ulonglong)uVar10 >> 0x20) >> 4) +

                                     sVar37 * ((ushort)((ulonglong)uVar12 >> 0x20) >> 4)) - sVar2,

                                     CONCAT22((sVar21 * ((ushort)((ulonglong)uVar10 >> 0x10) >> 4) +

                                              sVar33 * ((ushort)((ulonglong)uVar12 >> 0x10) >> 4)) -

                                              sVar1,((short)DAT_008340b0 * ((ushort)uVar10 >> 4) +

                                                    (short)DAT_008340a8 * ((ushort)uVar12 >> 4)) -

                                                    (short)DAT_00834138))),8);

    uVar18 = psllw(param_4[1],4);

    uVar12 = psllw(param_5[1],4);

    uVar31 = pmulhw(DAT_00834098,uVar18);

    uVar19 = pmulhw(DAT_00834090,uVar12);

    uVar10 = *param_3;

    sVar17 = (short)uVar19 - (short)DAT_008340c0;

    sVar22 = (short)((ulonglong)uVar19 >> 0x10) - sVar22;

    sVar24 = (short)((ulonglong)uVar19 >> 0x20) - sVar24;

    sVar27 = (short)((ulonglong)uVar19 >> 0x30) - sVar27;

    sVar29 = (short)uVar31 - (short)DAT_008340b8;

    sVar34 = (short)((ulonglong)uVar31 >> 0x10) - sVar34;

    sVar38 = (short)((ulonglong)uVar31 >> 0x20) - sVar38;

    sVar41 = (short)((ulonglong)uVar31 >> 0x30) - sVar41;

    uVar18 = psraw(CONCAT26((sVar26 * (ushort)((ulonglong)uVar12 >> 0x34) +

                            sVar40 * (ushort)((ulonglong)uVar18 >> 0x34)) - sVar3,

                            CONCAT24((sVar51 * ((ushort)((ulonglong)uVar12 >> 0x20) >> 4) +

                                     sVar37 * ((ushort)((ulonglong)uVar18 >> 0x20) >> 4)) - sVar2,

                                     CONCAT22((sVar21 * ((ushort)((ulonglong)uVar12 >> 0x10) >> 4) +

                                              sVar33 * ((ushort)((ulonglong)uVar18 >> 0x10) >> 4)) -

                                              sVar1,((short)DAT_008340b0 * ((ushort)uVar12 >> 4) +

                                                    (short)DAT_008340a8 * ((ushort)uVar18 >> 4)) -

                                                    (short)DAT_00834138))),8);

    uVar46 = (undefined2)((ulonglong)uVar30 >> 0x10);

    uVar42 = (undefined2)uVar30;

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar16,sVar16)),uVar10);

    uVar19 = paddsw(CONCAT44(CONCAT22(sVar32,sVar32),CONCAT22(sVar28,sVar28)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar46,uVar46),CONCAT22(uVar42,uVar42)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar19;

    sVar51 = (short)((ulonglong)uVar19 >> 0x10);

    sVar37 = (short)((ulonglong)uVar19 >> 0x20);

    sVar13 = (short)((ulonglong)uVar19 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar19 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar19 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x60];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    *param_7 = (ulonglong)

               CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                (char)((ulonglong)uVar12 >> 0x10) - (0xff < sVar21))

                        ,(uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                (char)uVar12 - (0xff < sVar1)))) |

               CONCAT44((uint)uVar35 << 0x10,

                        CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                (char)uVar19 - (0xff < sVar2))) <<

                        0x10) | uVar50 |

               CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar52 << 0x18)

    ;

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[1] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar19 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    uVar10 = param_3[1];

    uVar47 = (undefined2)((ulonglong)uVar30 >> 0x30);

    uVar43 = (undefined2)((ulonglong)uVar30 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar10);

    uVar30 = paddsw(CONCAT44(CONCAT22(sVar39,sVar39),CONCAT22(sVar36,sVar36)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar47,uVar47),CONCAT22(uVar43,uVar43)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar30;

    sVar51 = (short)((ulonglong)uVar30 >> 0x10);

    sVar37 = (short)((ulonglong)uVar30 >> 0x20);

    sVar13 = (short)((ulonglong)uVar30 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar30 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar30 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x61];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[2] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar30 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar4 = (uint)(ushort)(uVar52 >> 0x20);

    param_7[3] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar30 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 |

                 CONCAT44((int)(CONCAT24((short)(uVar52 >> 0x30),uVar4) >> 0x10) << 8,uVar4 << 0x18)

    ;

    uVar10 = param_3[0x10];

    uVar48 = (undefined2)((ulonglong)uVar18 >> 0x10);

    uVar44 = (undefined2)uVar18;

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar17,sVar17)),uVar10);

    uVar30 = paddsw(CONCAT44(CONCAT22(sVar34,sVar34),CONCAT22(sVar29,sVar29)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar48,uVar48),CONCAT22(uVar44,uVar44)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar30;

    sVar51 = (short)((ulonglong)uVar30 >> 0x10);

    sVar37 = (short)((ulonglong)uVar30 >> 0x20);

    sVar13 = (short)((ulonglong)uVar30 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar30 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar30 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x70];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[4] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar30 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[5] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar30 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    uVar10 = param_3[0x11];

    uVar49 = (undefined2)((ulonglong)uVar18 >> 0x30);

    uVar45 = (undefined2)((ulonglong)uVar18 >> 0x20);

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar27,sVar27),CONCAT22(sVar24,sVar24)),uVar10);

    uVar18 = paddsw(CONCAT44(CONCAT22(sVar41,sVar41),CONCAT22(sVar38,sVar38)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar49,uVar49),CONCAT22(uVar45,uVar45)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar18;

    sVar51 = (short)((ulonglong)uVar18 >> 0x10);

    sVar37 = (short)((ulonglong)uVar18 >> 0x20);

    sVar13 = (short)((ulonglong)uVar18 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x71];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[6] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar18 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[7] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar18 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    param_7 = (ulonglong *)((int)param_7 + param_8);

    puVar9 = param_3 + 2;

    uVar10 = *puVar9;

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar20,sVar20),CONCAT22(sVar16,sVar16)),uVar10);

    uVar18 = paddsw(CONCAT44(CONCAT22(sVar32,sVar32),CONCAT22(sVar28,sVar28)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar46,uVar46),CONCAT22(uVar42,uVar42)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar18;

    sVar51 = (short)((ulonglong)uVar18 >> 0x10);

    sVar37 = (short)((ulonglong)uVar18 >> 0x20);

    sVar13 = (short)((ulonglong)uVar18 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x62];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    *param_7 = (ulonglong)

               CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                (char)((ulonglong)uVar12 >> 0x10) - (0xff < sVar21))

                        ,(uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                (char)uVar12 - (0xff < sVar1)))) |

               CONCAT44((uint)uVar35 << 0x10,

                        CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                (char)uVar18 - (0xff < sVar2))) <<

                        0x10) | uVar50 |

               CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,(uint)(ushort)uVar52 << 0x18)

    ;

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[1] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar18 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    uVar10 = param_3[3];

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar25,sVar25),CONCAT22(sVar23,sVar23)),uVar10);

    uVar18 = paddsw(CONCAT44(CONCAT22(sVar39,sVar39),CONCAT22(sVar36,sVar36)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar47,uVar47),CONCAT22(uVar43,uVar43)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar18;

    sVar51 = (short)((ulonglong)uVar18 >> 0x10);

    sVar37 = (short)((ulonglong)uVar18 >> 0x20);

    sVar13 = (short)((ulonglong)uVar18 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[99];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[2] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar18 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[3] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar18 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    uVar10 = param_3[0x12];

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar22,sVar22),CONCAT22(sVar17,sVar17)),uVar10);

    uVar18 = paddsw(CONCAT44(CONCAT22(sVar34,sVar34),CONCAT22(sVar29,sVar29)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar48,uVar48),CONCAT22(uVar44,uVar44)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar18;

    sVar51 = (short)((ulonglong)uVar18 >> 0x10);

    sVar37 = (short)((ulonglong)uVar18 >> 0x20);

    sVar13 = (short)((ulonglong)uVar18 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x72];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[4] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar18 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[5] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar18 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    uVar10 = param_3[0x13];

    uVar12 = paddsw(CONCAT44(CONCAT22(sVar27,sVar27),CONCAT22(sVar24,sVar24)),uVar10);

    uVar18 = paddsw(CONCAT44(CONCAT22(sVar41,sVar41),CONCAT22(sVar38,sVar38)),uVar10);

    uVar10 = psubsw(uVar10,CONCAT44(CONCAT22(uVar49,uVar49),CONCAT22(uVar45,uVar45)));

    sVar1 = (short)uVar12;

    sVar21 = (short)((ulonglong)uVar12 >> 0x10);

    sVar33 = (short)((ulonglong)uVar12 >> 0x20);

    sVar11 = (short)((ulonglong)uVar12 >> 0x30);

    sVar2 = (short)uVar18;

    sVar51 = (short)((ulonglong)uVar18 >> 0x10);

    sVar37 = (short)((ulonglong)uVar18 >> 0x20);

    sVar13 = (short)((ulonglong)uVar18 >> 0x30);

    sVar3 = (short)uVar10;

    sVar26 = (short)((ulonglong)uVar10 >> 0x10);

    sVar40 = (short)((ulonglong)uVar10 >> 0x20);

    sVar14 = (short)((ulonglong)uVar10 >> 0x30);

    uVar7 = (ushort)(((uint7)(byte)((0 < sVar11) * (sVar11 < 0x100) *

                                    (char)((ulonglong)uVar12 >> 0x30) - (0xff < sVar11)) << 0x30) >>

                    0x28);

    uVar5 = (ushort)(((uint7)(byte)((0 < sVar13) * (sVar13 < 0x100) *

                                    (char)((ulonglong)uVar18 >> 0x30) - (0xff < sVar13)) << 0x30) >>

                    0x28);

    uVar6 = (ushort)(((uint7)(byte)((0 < sVar14) * (sVar14 < 0x100) *

                                    (char)((ulonglong)uVar10 >> 0x30) - (0xff < sVar14)) << 0x30) >>

                    0x28);

    sVar11 = (short)DAT_00834148;

    sVar13 = (short)((ulonglong)DAT_00834148 >> 0x10);

    sVar14 = (short)((ulonglong)DAT_00834148 >> 0x20);

    sVar15 = (short)((ulonglong)DAT_00834148 >> 0x30);

    uVar35 = sVar13 - (ushort)(byte)((0 < sVar51) * (sVar51 < 0x100) *

                                     (char)((ulonglong)uVar18 >> 0x10) - (0xff < sVar51));

    sVar51 = sVar13 - (ushort)(byte)((0 < sVar26) * (sVar26 < 0x100) *

                                     (char)((ulonglong)uVar10 >> 0x10) - (0xff < sVar26));

    uVar52 = param_3[0x73];

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar51,CONCAT22(sVar51,sVar11 - (ushort)(byte)((0 < sVar3) *

                                                                           (sVar3 < 0x100) *

                                                                           (char)uVar10 -

                                                                          (0xff < sVar3)))) &

                   0xffffffff0000ffff,8);

    param_7[6] = (ulonglong)

                 CONCAT24(sVar13 - (ushort)(byte)((0 < sVar21) * (sVar21 < 0x100) *

                                                  (char)((ulonglong)uVar12 >> 0x10) -

                                                 (0xff < sVar21)),

                          (uint)(ushort)(sVar11 - (ushort)(byte)((0 < sVar1) * (sVar1 < 0x100) *

                                                                 (char)uVar12 - (0xff < sVar1)))) |

                 CONCAT44((uint)uVar35 << 0x10,

                          CONCAT22(uVar35,sVar11 - (ushort)(byte)((0 < sVar2) * (sVar2 < 0x100) *

                                                                  (char)uVar18 - (0xff < sVar2))) <<

                          0x10) | uVar50 |

                 CONCAT44((int)(((uVar52 >> 0x10) << 0x30) >> 0x20) << 8,

                          (uint)(ushort)uVar52 << 0x18);

    uVar50 = psllw((ulonglong)

                   CONCAT24(sVar15 - (uVar6 >> 8),

                            (uint)(ushort)(sVar14 - (short)CONCAT21(uVar6,(0 < sVar40) *

                                                                          (sVar40 < 0x100) *

                                                                          (char)((ulonglong)uVar10

                                                                                >> 0x20) -

                                                                          (0xff < sVar40)))),8);

    uVar52 = psllw((ulonglong)CONCAT24((short)(uVar52 >> 0x30),(uint)(ushort)(uVar52 >> 0x20)) <<

                   0x10,8);

    param_7[7] = (ulonglong)

                 CONCAT24(sVar15 - (uVar7 >> 8),

                          (uint)(ushort)(sVar14 - (short)CONCAT21(uVar7,(0 < sVar33) *

                                                                        (sVar33 < 0x100) *

                                                                        (char)((ulonglong)uVar12 >>

                                                                              0x20) -

                                                                        (0xff < sVar33)))) |

                 (ulonglong)

                 CONCAT42((uint)(ushort)(sVar15 - (uVar5 >> 8)) << 0x10,

                          sVar14 - (short)CONCAT21(uVar5,(0 < sVar37) * (sVar37 < 0x100) *

                                                         (char)((ulonglong)uVar18 >> 0x20) -

                                                         (0xff < sVar37))) << 0x10 | uVar50 | uVar52

    ;

    iVar8 = iVar8 + -1;

    if (iVar8 == 0) break;

    if (iVar8 == 4) {

      puVar9 = param_3 + 0x12;

    }

    param_3 = puVar9 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_7 = (ulonglong *)((int)param_7 + param_8);

  }

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_0065ae40 at 0x0065AE40 (size: 171) ---


undefined8 __fastcall

FUN_0065ae40(undefined4 param_1,undefined4 param_2,undefined8 *param_3,undefined8 *param_4,

            undefined8 *param_5,undefined8 *param_6,int param_7)



{

  undefined8 uVar1;

  undefined8 uVar2;

  undefined8 uVar3;

  undefined8 uVar4;

  undefined4 in_EAX;

  int iVar5;

  short sVar6;

  short sVar7;

  short sVar8;

  short sVar9;

  short sVar10;

  short sVar11;

  short sVar12;

  short sVar13;

  short sVar14;

  short sVar15;

  short sVar16;

  short sVar17;

  short sVar18;

  short sVar19;

  short sVar20;

  short sVar21;

  

  iVar5 = 8;

  do {

    uVar1 = *param_3;

    uVar2 = param_3[1];

    uVar3 = *param_4;

    uVar4 = *param_5;

    sVar13 = (short)((ulonglong)uVar4 >> 0x10);

    sVar11 = (short)((ulonglong)uVar3 >> 0x10);

    sVar10 = (short)uVar3;

    sVar12 = (short)uVar4;

    sVar16 = (short)((ulonglong)uVar3 >> 0x20);

    sVar14 = (short)((ulonglong)uVar4 >> 0x20);

    sVar17 = (short)((ulonglong)uVar3 >> 0x30);

    sVar15 = (short)((ulonglong)uVar4 >> 0x30);

    sVar7 = (short)((ulonglong)uVar1 >> 0x10);

    sVar6 = (short)uVar1;

    sVar20 = (short)((ulonglong)uVar1 >> 0x20);

    sVar21 = (short)((ulonglong)uVar1 >> 0x30);

    sVar9 = (short)((ulonglong)uVar2 >> 0x10);

    sVar8 = (short)uVar2;

    sVar18 = (short)((ulonglong)uVar2 >> 0x20);

    sVar19 = (short)((ulonglong)uVar2 >> 0x30);

    *param_6 = CONCAT17((0 < sVar13) * (sVar13 < 0x100) * (char)((ulonglong)uVar4 >> 0x10) -

                        (0xff < sVar13),

                        CONCAT16((0 < sVar21) * (sVar21 < 0x100) * (char)((ulonglong)uVar1 >> 0x30)

                                 - (0xff < sVar21),

                                 CONCAT15((0 < sVar11) * (sVar11 < 0x100) *

                                          (char)((ulonglong)uVar3 >> 0x10) - (0xff < sVar11),

                                          CONCAT14((0 < sVar20) * (sVar20 < 0x100) *

                                                   (char)((ulonglong)uVar1 >> 0x20) -

                                                   (0xff < sVar20),

                                                   CONCAT13((0 < sVar12) * (sVar12 < 0x100) *

                                                            (char)uVar4 - (0xff < sVar12),

                                                            CONCAT12((0 < sVar7) * (sVar7 < 0x100) *

                                                                     (char)((ulonglong)uVar1 >> 0x10

                                                                           ) - (0xff < sVar7),

                                                                     CONCAT11((0 < sVar10) *

                                                                              (sVar10 < 0x100) *

                                                                              (char)uVar3 -

                                                                              (0xff < sVar10),

                                                                              (0 < sVar6) *

                                                                              (sVar6 < 0x100) *

                                                                              (char)uVar1 -

                                                                              (0xff < sVar6))))))));

    param_6[1] = CONCAT17((0 < sVar15) * (sVar15 < 0x100) * (char)((ulonglong)uVar4 >> 0x30) -

                          (0xff < sVar15),

                          CONCAT16((0 < sVar19) * (sVar19 < 0x100) *

                                   (char)((ulonglong)uVar2 >> 0x30) - (0xff < sVar19),

                                   CONCAT15((0 < sVar17) * (sVar17 < 0x100) *

                                            (char)((ulonglong)uVar3 >> 0x30) - (0xff < sVar17),

                                            CONCAT14((0 < sVar18) * (sVar18 < 0x100) *

                                                     (char)((ulonglong)uVar2 >> 0x20) -

                                                     (0xff < sVar18),

                                                     CONCAT13((0 < sVar14) * (sVar14 < 0x100) *

                                                              (char)((ulonglong)uVar4 >> 0x20) -

                                                              (0xff < sVar14),

                                                              CONCAT12((0 < sVar9) * (sVar9 < 0x100)

                                                                       * (char)((ulonglong)uVar2 >>

                                                                               0x10) -

                                                                       (0xff < sVar9),

                                                                       CONCAT11((0 < sVar16) *

                                                                                (sVar16 < 0x100) *

                                                                                (char)((ulonglong)

                                                                                       uVar3 >> 0x20

                                                                                      ) - (0xff < 

                                                  sVar16),(0 < sVar8) * (sVar8 < 0x100) *

                                                          (char)uVar2 - (0xff < sVar8))))))));

    uVar1 = param_3[0x10];

    uVar2 = param_3[0x11];

    uVar3 = param_4[1];

    uVar4 = param_5[1];

    sVar13 = (short)((ulonglong)uVar4 >> 0x10);

    sVar11 = (short)((ulonglong)uVar3 >> 0x10);

    sVar10 = (short)uVar3;

    sVar12 = (short)uVar4;

    sVar16 = (short)((ulonglong)uVar3 >> 0x20);

    sVar14 = (short)((ulonglong)uVar4 >> 0x20);

    sVar17 = (short)((ulonglong)uVar3 >> 0x30);

    sVar15 = (short)((ulonglong)uVar4 >> 0x30);

    sVar7 = (short)((ulonglong)uVar1 >> 0x10);

    sVar6 = (short)uVar1;

    sVar20 = (short)((ulonglong)uVar1 >> 0x20);

    sVar21 = (short)((ulonglong)uVar1 >> 0x30);

    sVar9 = (short)((ulonglong)uVar2 >> 0x10);

    sVar8 = (short)uVar2;

    sVar18 = (short)((ulonglong)uVar2 >> 0x20);

    sVar19 = (short)((ulonglong)uVar2 >> 0x30);

    param_6[2] = CONCAT17((0 < sVar13) * (sVar13 < 0x100) * (char)((ulonglong)uVar4 >> 0x10) -

                          (0xff < sVar13),

                          CONCAT16((0 < sVar21) * (sVar21 < 0x100) *

                                   (char)((ulonglong)uVar1 >> 0x30) - (0xff < sVar21),

                                   CONCAT15((0 < sVar11) * (sVar11 < 0x100) *

                                            (char)((ulonglong)uVar3 >> 0x10) - (0xff < sVar11),

                                            CONCAT14((0 < sVar20) * (sVar20 < 0x100) *

                                                     (char)((ulonglong)uVar1 >> 0x20) -

                                                     (0xff < sVar20),

                                                     CONCAT13((0 < sVar12) * (sVar12 < 0x100) *

                                                              (char)uVar4 - (0xff < sVar12),

                                                              CONCAT12((0 < sVar7) * (sVar7 < 0x100)

                                                                       * (char)((ulonglong)uVar1 >>

                                                                               0x10) -

                                                                       (0xff < sVar7),

                                                                       CONCAT11((0 < sVar10) *

                                                                                (sVar10 < 0x100) *

                                                                                (char)uVar3 -

                                                                                (0xff < sVar10),

                                                                                (0 < sVar6) *

                                                                                (sVar6 < 0x100) *

                                                                                (char)uVar1 -

                                                                                (0xff < sVar6)))))))

                         );

    param_6[3] = CONCAT17((0 < sVar15) * (sVar15 < 0x100) * (char)((ulonglong)uVar4 >> 0x30) -

                          (0xff < sVar15),

                          CONCAT16((0 < sVar19) * (sVar19 < 0x100) *

                                   (char)((ulonglong)uVar2 >> 0x30) - (0xff < sVar19),

                                   CONCAT15((0 < sVar17) * (sVar17 < 0x100) *

                                            (char)((ulonglong)uVar3 >> 0x30) - (0xff < sVar17),

                                            CONCAT14((0 < sVar18) * (sVar18 < 0x100) *

                                                     (char)((ulonglong)uVar2 >> 0x20) -

                                                     (0xff < sVar18),

                                                     CONCAT13((0 < sVar14) * (sVar14 < 0x100) *

                                                              (char)((ulonglong)uVar4 >> 0x20) -

                                                              (0xff < sVar14),

                                                              CONCAT12((0 < sVar9) * (sVar9 < 0x100)

                                                                       * (char)((ulonglong)uVar2 >>

                                                                               0x10) -

                                                                       (0xff < sVar9),

                                                                       CONCAT11((0 < sVar16) *

                                                                                (sVar16 < 0x100) *

                                                                                (char)((ulonglong)

                                                                                       uVar3 >> 0x20

                                                                                      ) - (0xff < 

                                                  sVar16),(0 < sVar8) * (sVar8 < 0x100) *

                                                          (char)uVar2 - (0xff < sVar8))))))));

    param_3 = param_3 + 2;

    param_4 = param_4 + 2;

    param_5 = param_5 + 2;

    param_6 = (undefined8 *)((int)param_6 + param_7);

    iVar5 = iVar5 + -1;

  } while (iVar5 != 0);

  return CONCAT44(param_2,in_EAX);

}





// --- FUN_0065aef0 at 0x0065AEF0 (size: 28) ---


void FUN_0065aef0(undefined4 param_1)



{

  FUN_0040f420(1,DAT_008f8604,param_1,&stack0x00000008);

  return;

}





// --- FUN_0065af10 at 0x0065AF10 (size: 28) ---


void FUN_0065af10(undefined4 param_1)



{

  FUN_0040f420(1,DAT_008f8608,param_1,&stack0x00000008);

  return;

}





// --- FUN_0065af30 at 0x0065AF30 (size: 60) ---


void FUN_0065af30(undefined4 param_1)



{

  FUN_0040fa60(DAT_008f8600,param_1);

  FUN_0040fa60(DAT_008f8604,param_1);

  FUN_0040fa60(DAT_008f8608,param_1);

  FUN_0040fa60(DAT_008f860c,param_1);

  return;

}





// --- FUN_0065af70 at 0x0065AF70 (size: 25) ---


void FUN_0065af70(undefined4 *param_1)



{

  FUN_0040f0e0(1,DAT_008f8608,*param_1);

  return;

}





// --- FUN_0065af90 at 0x0065AF90 (size: 19) ---


undefined4 FUN_0065af90(int *param_1)



{

  undefined4 uVar1;

  

  if (param_1 != (int *)0x0) {

                    /* WARNING: Could not recover jumptable at 0x0065af9a. Too many branches */

                    /* WARNING: Treating indirect jump as call */

    uVar1 = (**(code **)(*param_1 + 4))();

    return uVar1;

  }

  return 0xff;

}





// --- FUN_0065afb0 at 0x0065AFB0 (size: 56) ---


uint __thiscall FUN_0065afb0(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  return CONCAT31((int3)((uint)param_1[1] >> 8),param_1[1] == param_2[1]);

}





// --- FUN_0065aff0 at 0x0065AFF0 (size: 72) ---


uint __thiscall FUN_0065aff0(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  if ((param_1[2] == param_2[2]) && (param_1[3] == param_2[3])) {

    return 1;

  }

  return 0;

}





// --- FUN_0065b040 at 0x0065B040 (size: 77) ---


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



uint __thiscall FUN_0065b040(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  if (ABS(*(double *)(param_1 + 2) - *(double *)(param_2 + 2)) < _DAT_007fe920 !=

      (ABS(*(double *)(param_1 + 2) - *(double *)(param_2 + 2)) == _DAT_007fe920)) {

    return 1;

  }

  return 0;

}





// --- FUN_0065b090 at 0x0065B090 (size: 76) ---


uint __thiscall FUN_0065b090(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  if ((param_1[2] == param_2[2]) && (param_1[3] == param_2[3])) {

    return 1;

  }

  return 0;

}





// --- FUN_0065b0e0 at 0x0065B0E0 (size: 56) ---


bool __thiscall FUN_0065b0e0(int *param_1,int *param_2)



{

  int iVar1;

  int iVar2;

  

  iVar1 = (**(code **)(*param_2 + 4))();

  iVar2 = (**(code **)(*param_1 + 4))();

  if (iVar1 != iVar2) {

    return false;

  }

  return (char)param_1[1] == (char)param_2[1];

}





// --- FUN_0065b1d0 at 0x0065B1D0 (size: 31) ---


undefined4 * __thiscall FUN_0065b1d0(undefined4 *param_1,byte param_2)



{

  *param_1 = &PTR_FUN_0079702c;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065b340 at 0x0065B340 (size: 77) ---


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



uint __thiscall FUN_0065b340(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  if (ABS((float)param_1[1] - (float)param_2[1]) < _DAT_007fe918 !=

      (ABS((float)param_1[1] - (float)param_2[1]) == _DAT_007fe918)) {

    return 1;

  }

  return 0;

}





// --- FUN_0065b390 at 0x0065B390 (size: 56) ---


uint __thiscall FUN_0065b390(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  return (uint)((short)param_1[1] == (short)param_2[1]);

}





// --- FUN_0065b3d0 at 0x0065B3D0 (size: 55) ---


uint __thiscall FUN_0065b3d0(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  uVar1 = FUN_00401920(param_2 + 1);

  return uVar1;

}





// --- FUN_0065b410 at 0x0065B410 (size: 88) ---


uint __thiscall FUN_0065b410(int *param_1,int *param_2)



{

  uint uVar1;

  uint uVar2;

  

  uVar1 = (**(code **)(*param_2 + 4))();

  uVar2 = (**(code **)(*param_1 + 4))();

  if (uVar1 != uVar2) {

    return uVar2 & 0xffffff00;

  }

  if ((((param_1[1] == param_2[1]) && (param_1[2] == param_2[2])) && (param_1[3] == param_2[3])) &&

     (param_1[4] == param_2[4])) {

    return 1;

  }

  return 0;

}





// --- FUN_0065b470 at 0x0065B470 (size: 18) ---


void FUN_0065b470(void)



{

  FUN_0040fd30();

  return;

}





// --- FUN_0065b490 at 0x0065B490 (size: 105) ---


undefined1 FUN_0065b490(char *param_1)



{

  int *piVar1;

  LONG LVar2;

  undefined1 uVar3;

  char *local_4;

  

  local_4 = (char *)0x0;

  piVar1 = _errno();

  *piVar1 = 0;

  strtoul(param_1,&local_4,0);

  if (*local_4 == '\0') {

    piVar1 = _errno();

    if (*piVar1 != 0x22) {

      uVar3 = 1;

      goto LAB_0065b4d5;

    }

  }

  uVar3 = 0;

LAB_0065b4d5:

  LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));

  if ((LVar2 == 0) && (param_1 + -0x14 != (char *)0x0)) {

    (*(code *)**(undefined4 **)(param_1 + -0x14))(1);

  }

  return uVar3;

}





// --- FUN_0065b500 at 0x0065B500 (size: 105) ---


undefined1 FUN_0065b500(char *param_1)



{

  int *piVar1;

  LONG LVar2;

  undefined1 uVar3;

  char *local_4;

  

  local_4 = (char *)0x0;

  piVar1 = _errno();

  *piVar1 = 0;

  strtol(param_1,&local_4,0);

  if (*local_4 == '\0') {

    piVar1 = _errno();

    if (*piVar1 != 0x22) {

      uVar3 = 1;

      goto LAB_0065b545;

    }

  }

  uVar3 = 0;

LAB_0065b545:

  LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));

  if ((LVar2 == 0) && (param_1 + -0x14 != (char *)0x0)) {

    (*(code *)**(undefined4 **)(param_1 + -0x14))(1);

  }

  return uVar3;

}





// --- FUN_0065b570 at 0x0065B570 (size: 104) ---


undefined1 FUN_0065b570(int param_1)



{

  int *piVar1;

  LONG LVar2;

  undefined1 uVar3;

  char *local_4;

  

  local_4 = (char *)0x0;

  piVar1 = _errno();

  *piVar1 = 0;

  FUN_0065de50(param_1,&local_4,0);

  if (*local_4 == '\0') {

    piVar1 = _errno();

    if (*piVar1 != 0x22) {

      uVar3 = 1;

      goto LAB_0065b5b4;

    }

  }

  uVar3 = 0;

LAB_0065b5b4:

  LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));

  if ((LVar2 == 0) && ((undefined4 *)(param_1 + -0x14) != (undefined4 *)0x0)) {

    (*(code *)**(undefined4 **)(param_1 + -0x14))(1);

  }

  return uVar3;

}





// --- FUN_0065b5e0 at 0x0065B5E0 (size: 104) ---


undefined1 FUN_0065b5e0(int param_1)



{

  int *piVar1;

  LONG LVar2;

  undefined1 uVar3;

  char *local_4;

  

  local_4 = (char *)0x0;

  piVar1 = _errno();

  *piVar1 = 0;

  FUN_0065de30(param_1,&local_4,0);

  if (*local_4 == '\0') {

    piVar1 = _errno();

    if (*piVar1 != 0x22) {

      uVar3 = 1;

      goto LAB_0065b624;

    }

  }

  uVar3 = 0;

LAB_0065b624:

  LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));

  if ((LVar2 == 0) && ((undefined4 *)(param_1 + -0x14) != (undefined4 *)0x0)) {

    (*(code *)**(undefined4 **)(param_1 + -0x14))(1);

  }

  return uVar3;

}





// --- FUN_0065b650 at 0x0065B650 (size: 105) ---


undefined1 FUN_0065b650(char *param_1)



{

  int *piVar1;

  LONG LVar2;

  undefined1 uVar3;

  char *local_4;

  

  local_4 = (char *)0x0;

  piVar1 = _errno();

  *piVar1 = 0;

  strtod(param_1,&local_4);

  if (*local_4 == '\0') {

    piVar1 = _errno();

    if (*piVar1 != 0x22) {

      uVar3 = 1;

      goto LAB_0065b695;

    }

  }

  uVar3 = 0;

LAB_0065b695:

  LVar2 = InterlockedDecrement((LONG *)(param_1 + -0x10));

  if ((LVar2 == 0) && (param_1 + -0x14 != (char *)0x0)) {

    (*(code *)**(undefined4 **)(param_1 + -0x14))(1);

  }

  return uVar3;

}





// --- FUN_0065b6c0 at 0x0065B6C0 (size: 60) ---


void __thiscall FUN_0065b6c0(int param_1,int param_2)



{

  undefined2 *puVar1;

  

  FUN_0040ad10(2);

  puVar1 = (undefined2 *)FUN_0040acf0(2);

  if (puVar1 != (undefined2 *)0x0) {

    if ((*(byte *)(param_2 + 4) & 1) != 0) {

      *puVar1 = *(undefined2 *)(param_1 + 4);

      return;

    }

    *(undefined2 *)(param_1 + 4) = *puVar1;

  }

  return;

}





// --- FUN_0065b720 at 0x0065B720 (size: 61) ---


void FUN_0065b720(undefined4 *param_1,int param_2)



{

  undefined4 *puVar1;

  

  FUN_0040ad10(8);

  puVar1 = (undefined4 *)FUN_0040acf0(8);

  if (puVar1 != (undefined4 *)0x0) {

    if ((*(byte *)(param_2 + 4) & 1) != 0) {

      *puVar1 = *param_1;

      puVar1[1] = param_1[1];

      return;

    }

    *param_1 = *puVar1;

    param_1[1] = puVar1[1];

  }

  return;

}





// --- FUN_0065b7c0 at 0x0065B7C0 (size: 366) ---


undefined4 * FUN_0065b7c0(int param_1)



{

  int iVar1;

  undefined4 *puVar2;

  

  if (param_1 < 0x100) {

    switch(param_1) {

    case 0:

      iVar1 = FUN_005df0f5(8);

      if (iVar1 != 0) {

        puVar2 = (undefined4 *)FUN_00429c40();

        return puVar2;

      }

      break;

    case 1:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_00798108;

        return puVar2;

      }

      break;

    case 2:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_00798124;

        return puVar2;

      }

      break;

    case 3:

      puVar2 = (undefined4 *)FUN_005df0f5(0x10);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_00797e28;

        return puVar2;

      }

      break;

    case 4:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007980d0;

        return puVar2;

      }

      break;

    case 5:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe960;

        return puVar2;

      }

      break;

    case 6:

      puVar2 = (undefined4 *)FUN_005df0f5(0x10);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe97c;

        return puVar2;

      }

      break;

    case 7:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_00797010;

        return puVar2;

      }

      break;

    case 8:

      puVar2 = (undefined4 *)FUN_005df0f5(8);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007980ec;

        return puVar2;

      }

      break;

    case 9:

      iVar1 = FUN_005df0f5(0x10);

      if (iVar1 != 0) {

        puVar2 = (undefined4 *)FUN_00444800();

        return puVar2;

      }

      break;

    case 0xb:

      puVar2 = (undefined4 *)FUN_005df0f5(0x10);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe928;

        return puVar2;

      }

      break;

    case 0xc:

      puVar2 = (undefined4 *)FUN_005df0f5(0x10);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe944;

        return puVar2;

      }

      break;

    case 0xd:

      puVar2 = (undefined4 *)FUN_005df0f5(0x10);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe9b4;

        return puVar2;

      }

      break;

    case 0xe:

      puVar2 = (undefined4 *)FUN_005df0f5(0x14);

      if (puVar2 != (undefined4 *)0x0) {

        *puVar2 = &PTR_FUN_007fe998;

        return puVar2;

      }

    }

  }

  return (undefined4 *)0x0;

}





// --- FUN_0065b970 at 0x0065B970 (size: 87) ---


undefined4 __thiscall FUN_0065b970(int param_1,int *param_2)



{

  char *_Str;

  char cVar1;

  int *piVar2;

  ulong uVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b490(iVar4);

  if (cVar1 != '\0') {

    _Str = (char *)*param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    uVar3 = strtoul(_Str,(char **)0x0,0);

    *(ulong *)(param_1 + 4) = uVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065b9d0 at 0x0065B9D0 (size: 87) ---


undefined4 __thiscall FUN_0065b9d0(int param_1,int *param_2)



{

  char *_Str;

  char cVar1;

  int *piVar2;

  long lVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b500(iVar4);

  if (cVar1 != '\0') {

    _Str = (char *)*param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    lVar3 = strtol(_Str,(char **)0x0,0);

    *(long *)(param_1 + 4) = lVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065ba30 at 0x0065BA30 (size: 89) ---


undefined4 __thiscall FUN_0065ba30(int param_1,int *param_2)



{

  char cVar1;

  int *piVar2;

  undefined8 uVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b570(iVar4);

  if (cVar1 != '\0') {

    iVar4 = *param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    uVar3 = FUN_0065de50(iVar4,0,0);

    *(undefined8 *)(param_1 + 8) = uVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065ba90 at 0x0065BA90 (size: 89) ---


undefined4 __thiscall FUN_0065ba90(int param_1,int *param_2)



{

  char cVar1;

  int *piVar2;

  undefined8 uVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b5e0(iVar4);

  if (cVar1 != '\0') {

    iVar4 = *param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    uVar3 = FUN_0065de30(iVar4,0,0);

    *(undefined8 *)(param_1 + 8) = uVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065baf0 at 0x0065BAF0 (size: 85) ---


undefined4 __thiscall FUN_0065baf0(int param_1,int *param_2)



{

  char *_Str;

  char cVar1;

  int *piVar2;

  double dVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b650(iVar4);

  if (cVar1 != '\0') {

    _Str = (char *)*param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    dVar3 = strtod(_Str,(char **)0x0);

    *(double *)(param_1 + 8) = dVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065bb50 at 0x0065BB50 (size: 85) ---


undefined4 __thiscall FUN_0065bb50(int param_1,int *param_2)



{

  char *_Str;

  char cVar1;

  int *piVar2;

  double dVar3;

  int iVar4;

  

  iVar4 = *param_2;

  InterlockedIncrement((LONG *)(iVar4 + -0x10));

  cVar1 = FUN_0065b650(iVar4);

  if (cVar1 != '\0') {

    _Str = (char *)*param_2;

    piVar2 = _errno();

    *piVar2 = 0;

    dVar3 = strtod(_Str,(char **)0x0);

    *(float *)(param_1 + 4) = (float)dVar3;

    return 1;

  }

  return 0;

}





// --- FUN_0065bc10 at 0x0065BC10 (size: 80) ---


undefined4 __thiscall FUN_0065bc10(int param_1,undefined4 *param_2)



{

  int iVar1;

  

  iVar1 = _stricmp((char *)*param_2,DAT_008f8610);

  if (iVar1 != 0) {

    iVar1 = _stricmp((char *)*param_2,DAT_008f8618);

    if (iVar1 != 0) {

      *(undefined1 *)(param_1 + 4) = 0;

      return 1;

    }

  }

  *(undefined1 *)(param_1 + 4) = 1;

  return 1;

}





// --- FUN_0065bc90 at 0x0065BC90 (size: 114) ---


undefined4 FUN_0065bc90(int *param_1)



{

  undefined4 uVar1;

  LONG LVar2;

  undefined4 *puVar3;

  undefined1 local_c [12];

  

  param_1 = (int *)*param_1;

  InterlockedIncrement((LONG *)((int)param_1 + -0x10));

  FUN_0040de60(&param_1);

  uVar1 = FUN_0040baa0(local_c,&param_1);

  FUN_004070d0(uVar1);

  FUN_00406f90();

  puVar3 = (undefined4 *)((int)param_1 + -0x14);

  LVar2 = InterlockedDecrement((LONG *)((int)param_1 + -0x10));

  if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {

    (**(code **)*puVar3)(1);

  }

  return 1;

}





// --- FUN_0065bd70 at 0x0065BD70 (size: 20) ---


undefined4 FUN_0065bd70(undefined4 param_1)



{

  FUN_0040fde0(param_1);

  return param_1;

}





// --- FUN_0065bd90 at 0x0065BD90 (size: 303) ---


void FUN_0065bd90(undefined4 param_1,uint *param_2,uint param_3)



{

  char cVar1;

  uint uVar2;

  uint uVar3;

  ushort local_8 [2];

  uint local_4;

  

  uVar2 = param_3;

  if ((*(byte *)(param_3 + 4) & 1) == 0) {

    if ((~*(byte *)(param_3 + 4) & 1) != 0) {

      FUN_0040b0b0(&param_3,param_3);

      uVar3 = param_3;

      cVar1 = (char)param_3;

      if ((char)param_3 < '\0') {

        FUN_0040b0b0(&param_3,uVar2);

        if ((uVar3 & 0x40) != 0) {

          FUN_0065bec0(local_8,uVar2);

          *param_2 = (CONCAT11(cVar1,(char)param_3) & 0xffff3fff) << 0x10 | (uint)local_8[0];

          return;

        }

        *param_2 = CONCAT11(cVar1,(char)param_3) & 0xffff7fff;

        return;

      }

      *param_2 = param_3 & 0xff;

    }

    return;

  }

  local_4 = *param_2;

  if (local_4 < 0x80) {

    param_3 = CONCAT31(param_3._1_3_,(char)local_4);

    FUN_0040b0b0(&param_3,uVar2);

    return;

  }

  if (local_4 < 0x4000) {

    param_3 = CONCAT31(param_3._1_3_,*(undefined1 *)((int)param_2 + 1)) | 0x80;

    local_8[0] = CONCAT11(local_8[0]._1_1_,(char)*param_2);

    FUN_0040b0b0(&param_3,uVar2);

    FUN_0040b0b0(local_8,uVar2);

    return;

  }

  param_3 = CONCAT31(param_3._1_3_,(char)(local_4 >> 0x18)) | 0xc0;

  local_8[0] = CONCAT11(local_8[0]._1_1_,(char)(local_4 >> 0x10));

  FUN_0040b0b0(&param_3,uVar2);

  FUN_0040b0b0(local_8,uVar2);

  FUN_0065bec0(&local_4,uVar2);

  return;

}





// --- FUN_0065bec0 at 0x0065BEC0 (size: 53) ---


void FUN_0065bec0(undefined2 *param_1,int param_2)



{

  undefined2 *puVar1;

  

  FUN_0040ad10(2);

  puVar1 = (undefined2 *)FUN_0040acf0(2);

  if (puVar1 != (undefined2 *)0x0) {

    if ((*(byte *)(param_2 + 4) & 1) != 0) {

      *puVar1 = *param_1;

      return;

    }

    *param_1 = *puVar1;

  }

  return;

}





// --- FUN_0065c360 at 0x0065C360 (size: 132) ---


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



ushort __fastcall FUN_0065c360(float *param_1)



{

  float fVar1;

  ushort uVar2;

  

  fVar1 = param_1[3];

  uVar2 = (ushort)(fVar1 < _DAT_007fea04) << 8 | (ushort)(NAN(fVar1) || NAN(_DAT_007fea04)) << 10 |

          (ushort)(fVar1 == _DAT_007fea04) << 0xe;

  if (fVar1 >= _DAT_007fea04) {

    fVar1 = *param_1;

    uVar2 = (ushort)(fVar1 < _DAT_007fea04) << 8 | (ushort)(NAN(fVar1) || NAN(_DAT_007fea04)) << 10

            | (ushort)(fVar1 == _DAT_007fea04) << 0xe;

    if (fVar1 >= _DAT_007fea04) {

      fVar1 = param_1[1];

      uVar2 = (ushort)(fVar1 < _DAT_007fea04) << 8 |

              (ushort)(NAN(fVar1) || NAN(_DAT_007fea04)) << 10 |

              (ushort)(fVar1 == _DAT_007fea04) << 0xe;

      if (fVar1 >= _DAT_007fea04) {

        fVar1 = param_1[2];

        uVar2 = (ushort)(fVar1 < _DAT_007fea04) << 8 |

                (ushort)(NAN(fVar1) || NAN(_DAT_007fea04)) << 10 |

                (ushort)(fVar1 == _DAT_007fea04) << 0xe;

        if (fVar1 >= _DAT_007fea04) {

          fVar1 = param_1[3];

          uVar2 = (ushort)(fVar1 < _DAT_007fea00) << 8 |

                  (ushort)(NAN(fVar1) || NAN(_DAT_007fea00)) << 10 |

                  (ushort)(fVar1 == _DAT_007fea00) << 0xe;

          if (fVar1 < _DAT_007fea00 || (fVar1 == _DAT_007fea00) != 0) {

            fVar1 = *param_1;

            uVar2 = (ushort)(fVar1 < _DAT_007fea00) << 8 |

                    (ushort)(NAN(fVar1) || NAN(_DAT_007fea00)) << 10 |

                    (ushort)(fVar1 == _DAT_007fea00) << 0xe;

            if (fVar1 < _DAT_007fea00 || (fVar1 == _DAT_007fea00) != 0) {

              fVar1 = param_1[1];

              uVar2 = (ushort)(fVar1 < _DAT_007fea00) << 8 |

                      (ushort)(NAN(fVar1) || NAN(_DAT_007fea00)) << 10 |

                      (ushort)(fVar1 == _DAT_007fea00) << 0xe;

              if (fVar1 < _DAT_007fea00 || (fVar1 == _DAT_007fea00) != 0) {

                fVar1 = param_1[2];

                uVar2 = (ushort)(fVar1 < _DAT_007fea00) << 8 |

                        (ushort)(NAN(fVar1) || NAN(_DAT_007fea00)) << 10 |

                        (ushort)(fVar1 == _DAT_007fea00) << 0xe;

                if (fVar1 < _DAT_007fea00 || (fVar1 == _DAT_007fea00) != 0) {

                  return CONCAT11((char)(uVar2 >> 8),1);

                }

              }

            }

          }

        }

      }

    }

  }

  return uVar2;

}





// --- FUN_0065c3f0 at 0x0065C3F0 (size: 115) ---


void __thiscall FUN_0065c3f0(undefined4 *param_1,int param_2)



{

  int iVar1;

  int *piVar2;

  

  iVar1 = param_2;

  if ((*(byte *)(param_2 + 4) & 1) != 0) {

    iVar1 = FUN_0043dbe0(*param_1,param_1[1],param_1[2],param_1[3]);

  }

  FUN_0040ad10(4);

  piVar2 = (int *)FUN_0040acf0(4);

  if (piVar2 != (int *)0x0) {

    if ((*(byte *)(param_2 + 4) & 1) == 0) {

      iVar1 = *piVar2;

    }

    else {

      *piVar2 = iVar1;

    }

  }

  if (((~*(byte *)(param_2 + 4) & 1) != 0) && ((*(uint *)(param_2 + 4) >> 2 & 1) == 0)) {

    FUN_00430cd0(iVar1);

  }

  return;

}





// --- FUN_0065c470 at 0x0065C470 (size: 108) ---


bool __thiscall FUN_0065c470(undefined4 *param_1,int param_2)



{

  int iVar1;

  

  if (param_2 != 0) {

    iVar1 = FUN_005b3b50(*param_1);

    if (iVar1 != 0) {

      iVar1 = FUN_005b3b50(param_1[1]);

      if (iVar1 != 0) {

        iVar1 = FUN_005b3b50(param_1[2]);

        if (iVar1 != 0) {

          iVar1 = FUN_005b3b50(param_1[3]);

          return iVar1 != 0;

        }

      }

    }

  }

  return false;

}





// --- FUN_0065c4e0 at 0x0065C4E0 (size: 501) ---


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



undefined4 __thiscall FUN_0065c4e0(float *param_1,int *param_2,char param_3,int param_4)



{

  float fVar1;

  bool bVar2;

  char cVar3;

  char cVar4;

  int iVar5;

  int iVar6;

  int extraout_ECX;

  int extraout_ECX_00;

  int extraout_ECX_01;

  int extraout_ECX_02;

  int extraout_ECX_03;

  int extraout_ECX_04;

  int extraout_ECX_05;

  int extraout_ECX_06;

  int extraout_ECX_07;

  int extraout_ECX_08;

  int extraout_ECX_09;

  int extraout_ECX_10;

  int extraout_ECX_11;

  char *pcVar7;

  

  if (param_2 == (int *)0x0) {

    return 0;

  }

  cVar4 = (char)param_4;

  iVar5 = FUN_0065ca40();

  iVar6 = extraout_ECX;

  if (cVar4 == '\0') {

    if (iVar5 != 3) {

      pcVar7 = "non-alpha color needs 3 arguments";

      goto LAB_0065c509;

    }

  }

  else if (iVar5 != 4) {

    pcVar7 = "alpha color needs 4 arguments";

    goto LAB_0065c509;

  }

  if (param_3 == '\0') {

    iVar6 = (**(code **)(*param_2 + 0xc))(0);

    if (iVar6 == 0) {

      cVar3 = '\0';

      iVar6 = extraout_ECX_05;

    }

    else {

      cVar3 = FUN_00448290(&param_4);

      iVar6 = extraout_ECX_06;

    }

    fVar1 = (float)param_4;

    if (param_4 < 0) {

      fVar1 = fVar1 + _DAT_0079920c;

    }

    *param_1 = fVar1 * _DAT_00799208;

    if (((cVar3 == '\0') ||

        (iVar5 = (**(code **)(*param_2 + 0xc))(1), iVar6 = extraout_ECX_07, iVar5 == 0)) ||

       (cVar3 = FUN_00448290(&param_4), iVar6 = extraout_ECX_08, cVar3 == '\0')) {

      bVar2 = false;

    }

    else {

      bVar2 = true;

    }

    fVar1 = (float)param_4;

    if (param_4 < 0) {

      fVar1 = fVar1 + _DAT_0079920c;

    }

    param_1[1] = fVar1 * _DAT_00799208;

    if (((bVar2) && (iVar5 = (**(code **)(*param_2 + 0xc))(2), iVar6 = extraout_ECX_09, iVar5 != 0))

       && (cVar3 = FUN_00448290(&param_4), iVar6 = extraout_ECX_10, cVar3 != '\0')) {

      bVar2 = true;

    }

    else {

      bVar2 = false;

    }

    fVar1 = (float)param_4;

    if (param_4 < 0) {

      fVar1 = fVar1 + _DAT_0079920c;

    }

    param_1[2] = fVar1 * _DAT_00799208;

    if (cVar4 == '\0') {

      param_1[3] = 1.0;

    }

    else {

      if ((bVar2) && (cVar4 = FUN_005d8780(3,&param_4), cVar4 != '\0')) {

        bVar2 = true;

      }

      else {

        bVar2 = false;

      }

      fVar1 = (float)param_4;

      if (param_4 < 0) {

        fVar1 = fVar1 + _DAT_0079920c;

      }

      param_1[3] = fVar1 * _DAT_00799208;

      iVar6 = param_4;

    }

    if (!bVar2) {

      pcVar7 = "reading as integers failed for color";

      goto LAB_0065c509;

    }

LAB_0065c6b5:

    cVar4 = FUN_0065c360();

    if (cVar4 != '\0') {

      return 1;

    }

    pcVar7 = "Not a valid color";

    iVar6 = extraout_ECX_11;

  }

  else {

    iVar5 = (**(code **)(*param_2 + 0xc))();

    iVar6 = extraout_ECX_00;

    if ((((iVar5 == 0) || (cVar3 = FUN_00426cb0(param_1), iVar6 = extraout_ECX_01, cVar3 == '\0'))

        || (cVar3 = FUN_005d87b0(1,param_1 + 1), iVar6 = extraout_ECX_02, cVar3 == '\0')) ||

       (cVar3 = FUN_005d87b0(2,param_1 + 2), iVar6 = extraout_ECX_03, cVar3 == '\0')) {

      cVar3 = '\0';

    }

    else {

      cVar3 = '\x01';

    }

    if (cVar4 == '\0') {

      param_1[3] = 1.0;

LAB_0065c594:

      if (cVar3 != '\0') goto LAB_0065c6b5;

    }

    else if (cVar3 != '\0') {

      cVar3 = FUN_005d87b0(3,param_1 + 3);

      iVar6 = extraout_ECX_04;

      goto LAB_0065c594;

    }

    pcVar7 = "read failed for color";

  }

LAB_0065c509:

  FUN_00401340(pcVar7);

  FUN_0065d620(param_2,iVar6);

  return 0;

}





// --- FUN_0065c6e0 at 0x0065C6E0 (size: 100) ---


bool __thiscall FUN_0065c6e0(undefined4 *param_1,int param_2)



{

  char cVar1;

  int iVar2;

  

  if (param_2 != 0) {

    cVar1 = FUN_005b2d90(param_1);

    if (cVar1 != '\0') {

      iVar2 = FUN_005b3b50(*param_1);

      if (iVar2 != 0) {

        iVar2 = FUN_005b3b50(param_1[1]);

        if (iVar2 != 0) {

          iVar2 = FUN_005b3b50(param_1[2]);

          return iVar2 != 0;

        }

      }

    }

  }

  return false;

}





// --- FUN_0065c750 at 0x0065C750 (size: 155) ---


bool __thiscall FUN_0065c750(int param_1,int *param_2)



{

  char cVar1;

  int iVar2;

  undefined4 extraout_ECX;

  undefined4 extraout_ECX_00;

  undefined4 extraout_ECX_01;

  undefined4 extraout_ECX_02;

  undefined4 uVar3;

  char *pcVar4;

  

  if (param_2 != (int *)0x0) {

    iVar2 = FUN_0065ca40();

    if (iVar2 == 3) {

      (**(code **)(*param_2 + 0xc))(0);

      cVar1 = FUN_00426cb0(param_1);

      uVar3 = extraout_ECX_00;

      if (cVar1 != '\0') {

        (**(code **)(*param_2 + 0xc))(1);

        cVar1 = FUN_00426cb0(param_1 + 4);

        uVar3 = extraout_ECX_01;

        if (cVar1 != '\0') {

          (**(code **)(*param_2 + 0xc))(2);

          cVar1 = FUN_00426cb0(param_1 + 8);

          uVar3 = extraout_ECX_02;

          if (cVar1 != '\0') {

            cVar1 = FUN_005b2d90(param_1);

            return cVar1 != '\0';

          }

        }

      }

      pcVar4 = "Invalid vector";

    }

    else {

      pcVar4 = "Invalid number of components in vector";

      uVar3 = extraout_ECX;

    }

    FUN_00401340(pcVar4);

    FUN_0065d620(param_2,uVar3);

  }

  return false;

}





// --- FUN_0065c7f0 at 0x0065C7F0 (size: 12) ---


void __thiscall FUN_0065c7f0(int param_1,undefined2 param_2)



{

  *(undefined2 *)(param_1 + 0xc) = param_2;

  return;

}





// --- FUN_0065c800 at 0x0065C800 (size: 12) ---


void __thiscall FUN_0065c800(int param_1,undefined2 param_2)



{

  *(undefined2 *)(param_1 + 0xe) = param_2;

  return;

}





// --- FUN_0065c810 at 0x0065C810 (size: 19) ---


void __fastcall FUN_0065c810(int *param_1)



{

  if ((int *)*param_1 == (int *)0x0) {

    return;

  }

  (**(code **)(*(int *)*param_1 + 0xc))(param_1[1]);

  return;

}





// --- FUN_0065c830 at 0x0065C830 (size: 74) ---


uint __thiscall FUN_0065c830(int *param_1,uint param_2)



{

  uint uVar1;

  int iVar2;

  undefined4 *puVar3;

  undefined4 *puVar4;

  

  uVar1 = param_1[2];

  if (param_2 < uVar1) {

    puVar3 = (undefined4 *)(*param_1 + param_2 * 4);

    puVar4 = (undefined4 *)(*param_1 + (uVar1 - 1) * 4);

    param_1[2] = uVar1 - 1;

    if (puVar3 < puVar4) {

      iVar2 = ((uint)((int)puVar4 + (-1 - (int)puVar3)) >> 2) + 1;

      puVar4 = puVar3;

      for (; puVar3 = puVar3 + 1, iVar2 != 0; iVar2 = iVar2 + -1) {

        *puVar4 = *puVar3;

        puVar4 = puVar4 + 1;

      }

    }

    iVar2 = param_1[2];

    *(undefined4 *)(*param_1 + iVar2 * 4) = 0;

    return CONCAT31((int3)((uint)iVar2 >> 8),1);

  }

  return uVar1 & 0xffffff00;

}





// --- FUN_0065c880 at 0x0065C880 (size: 115) ---


int * FUN_0065c880(int *param_1,int *param_2,int *param_3)



{

  int iVar1;

  int iVar2;

  

  iVar2 = (int)param_2 - (int)param_1 >> 4;

  if (0 < iVar2) {

    iVar1 = *param_3;

    do {

      if (*param_1 == iVar1) {

        return param_1;

      }

      if (param_1[1] == iVar1) {

        return param_1 + 1;

      }

      if (param_1[2] == iVar1) {

        return param_1 + 2;

      }

      if (param_1[3] == iVar1) {

        return param_1 + 3;

      }

      iVar2 = iVar2 + -1;

      param_1 = param_1 + 4;

    } while (0 < iVar2);

  }

  iVar2 = (int)param_2 - (int)param_1 >> 2;

  if (iVar2 != 1) {

    if (iVar2 != 2) {

      if (iVar2 != 3) {

        return param_2;

      }

      if (*param_1 == *param_3) {

        return param_1;

      }

      param_1 = param_1 + 1;

    }

    if (*param_1 == *param_3) {

      return param_1;

    }

    param_1 = param_1 + 1;

  }

  if (*param_1 != *param_3) {

    return param_2;

  }

  return param_1;

}





// --- FUN_0065c900 at 0x0065C900 (size: 122) ---


undefined4 * FUN_0065c900(undefined4 *param_1,undefined4 *param_2,undefined4 *param_3,code *param_4)



{

  char cVar1;

  

  cVar1 = (*param_4)(*param_1,*param_2);

  if (cVar1 == '\0') {

    cVar1 = (*param_4)(*param_1,*param_3);

    if (cVar1 != '\0') {

      return param_1;

    }

    cVar1 = (*param_4)(*param_2,*param_3);

    if (cVar1 != '\0') {

      return param_3;

    }

  }

  else {

    cVar1 = (*param_4)(*param_2,*param_3);

    if (cVar1 == '\0') {

      cVar1 = (*param_4)(*param_1,*param_3);

      if (cVar1 == '\0') {

        return param_1;

      }

      return param_3;

    }

  }

  return param_2;

}





// --- FUN_0065c980 at 0x0065C980 (size: 63) ---


void FUN_0065c980(undefined4 *param_1,undefined4 param_2,code *param_3)



{

  char cVar1;

  

  cVar1 = (*param_3)(param_2,param_1[-1]);

  while (cVar1 != '\0') {

    *param_1 = param_1[-1];

    cVar1 = (*param_3)(param_2,param_1[-2]);

    param_1 = param_1 + -1;

  }

  *param_1 = param_2;

  return;

}





// --- FUN_0065c9c0 at 0x0065C9C0 (size: 94) ---


void FUN_0065c9c0(int param_1,int param_2,int param_3,undefined4 param_4,code *param_5)



{

  char cVar1;

  int iVar2;

  

  if (param_2 <= param_3) {

    *(undefined4 *)(param_1 + param_2 * 4) = param_4;

    return;

  }

  do {

    iVar2 = (param_2 + -1) / 2;

    cVar1 = (*param_5)(*(undefined4 *)(param_1 + iVar2 * 4),param_4);

    if (cVar1 == '\0') break;

    *(undefined4 *)(param_1 + param_2 * 4) = *(undefined4 *)(param_1 + iVar2 * 4);

    param_2 = iVar2;

  } while (param_3 < iVar2);

  *(undefined4 *)(param_1 + param_2 * 4) = param_4;

  return;

}





// --- FUN_0065ca20 at 0x0065CA20 (size: 18) ---


undefined4 __fastcall FUN_0065ca20(int param_1)



{

  int iVar1;

  

  do {

    iVar1 = param_1;

    param_1 = *(int *)(iVar1 + 0x2c);

  } while (param_1 != 0);

  return *(undefined4 *)(iVar1 + 0x28);

}





// --- FUN_0065ca40 at 0x0065CA40 (size: 4) ---


undefined4 __fastcall FUN_0065ca40(int param_1)



{

  return *(undefined4 *)(param_1 + 0x20);

}





// --- FUN_0065ca70 at 0x0065CA70 (size: 17) ---


undefined4 __fastcall FUN_0065ca70(int *param_1)



{

  undefined4 uVar1;

  

  if (param_1[8] != 1) {

    return 0;

  }

  uVar1 = (**(code **)(*param_1 + 0xc))(0);

  return uVar1;

}





// --- FUN_0065ca90 at 0x0065CA90 (size: 30) ---


int __fastcall FUN_0065ca90(int *param_1)



{

  int iVar1;

  

  if (param_1[8] == 1) {

    iVar1 = (**(code **)(*param_1 + 0xc))(0);

  }

  else {

    iVar1 = 0;

  }

  if ((iVar1 != 0) && (*(int *)(iVar1 + 0x20) != 0)) {

    iVar1 = 0;

  }

  return iVar1;

}





// --- FUN_0065cab0 at 0x0065CAB0 (size: 48) ---


int __thiscall FUN_0065cab0(int *param_1,uint param_2)



{

  int iVar1;

  

  iVar1 = 0;

  if (param_2 < (uint)param_1[8]) {

    iVar1 = (**(code **)(*param_1 + 8))(param_2);

    FUN_0065c830(param_2);

    *(undefined4 *)(iVar1 + 0x2c) = 0;

  }

  return iVar1;

}





// --- FUN_0065cae0 at 0x0065CAE0 (size: 35) ---


void __fastcall FUN_0065cae0(int param_1)



{

  LONG LVar1;

  undefined4 *puVar2;

  

  puVar2 = (undefined4 *)(*(int *)(param_1 + 8) + -0x14);

  LVar1 = InterlockedDecrement((LONG *)(*(int *)(param_1 + 8) + -0x10));

  if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  return;

}





// --- FUN_0065cb10 at 0x0065CB10 (size: 47) ---


undefined4 __fastcall FUN_0065cb10(int *param_1)



{

  int iVar1;

  undefined4 uVar2;

  

  if ((int *)*param_1 != (int *)0x0) {

    iVar1 = (**(code **)(*(int *)*param_1 + 0xc))(param_1[1]);

    if (iVar1 != 0) {

      param_1[1] = param_1[1] + 1;

      if ((int *)*param_1 != (int *)0x0) {

        uVar2 = (**(code **)(*(int *)*param_1 + 0xc))(param_1[1]);

        return uVar2;

      }

    }

  }

  return 0;

}





// --- FUN_0065cb40 at 0x0065CB40 (size: 39) ---


undefined4 * __thiscall FUN_0065cb40(undefined4 *param_1,byte param_2)



{

  FUN_004011b0();

  *param_1 = &PTR_LAB_007cae34;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065cb70 at 0x0065CB70 (size: 81) ---


void FUN_0065cb70(undefined4 *param_1,undefined4 *param_2,undefined4 param_3,code *param_4)



{

  undefined4 uVar1;

  undefined4 *puVar2;

  char cVar3;

  

  for (; param_1 != param_2; param_1 = param_1 + 1) {

    uVar1 = *param_1;

    cVar3 = (*param_4)(uVar1,param_1[-1]);

    puVar2 = param_1;

    while (cVar3 != '\0') {

      *puVar2 = puVar2[-1];

      cVar3 = (*param_4)(uVar1,puVar2[-2]);

      puVar2 = puVar2 + -1;

    }

    *puVar2 = uVar1;

  }

  return;

}





// --- FUN_0065cbd0 at 0x0065CBD0 (size: 113) ---


void FUN_0065cbd0(int param_1,int param_2,int param_3,undefined4 param_4,code *param_5)



{

  int iVar1;

  char cVar2;

  int iVar3;

  int iVar4;

  

  iVar3 = param_2;

  while( true ) {

    iVar1 = iVar3 * 2;

    iVar4 = iVar1 + 2;

    if (param_3 <= iVar4) break;

    cVar2 = (*param_5)(*(undefined4 *)(param_1 + iVar4 * 4),

                       *(undefined4 *)(param_1 + -4 + iVar4 * 4));

    if (cVar2 != '\0') {

      iVar4 = iVar1 + 1;

    }

    *(undefined4 *)(param_1 + iVar3 * 4) = *(undefined4 *)(param_1 + iVar4 * 4);

    iVar3 = iVar4;

  }

  if (iVar4 == param_3) {

    *(undefined4 *)(param_1 + iVar3 * 4) = *(undefined4 *)(param_1 + -4 + iVar4 * 4);

    iVar3 = iVar1 + 1;

  }

  FUN_0065c9c0(param_1,iVar3,param_2,param_4,param_5);

  return;

}





// --- FUN_0065cc50 at 0x0065CC50 (size: 106) ---


undefined1 FUN_0065cc50(undefined4 *param_1)



{

  char *pcVar1;

  char cVar2;

  int iVar3;

  LONG LVar4;

  undefined1 uVar5;

  char *pcVar6;

  char *local_4;

  

  local_4 = PTR_DAT_00818344;

  uVar5 = 0;

  InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));

  cVar2 = FUN_00426020(&local_4);

  pcVar1 = local_4;

  if (cVar2 != '\0') {

    iVar3 = _stricmp(local_4,(char *)*param_1);

    if (iVar3 == 0) {

      uVar5 = 1;

    }

  }

  pcVar6 = pcVar1 + -0x14;

  LVar4 = InterlockedDecrement((LONG *)(pcVar1 + -0x10));

  if ((LVar4 == 0) && (pcVar6 != (char *)0x0)) {

    (*(code *)**(undefined4 **)pcVar6)(1);

  }

  return uVar5;

}





// --- FUN_0065cd80 at 0x0065CD80 (size: 165) ---


undefined4 __thiscall FUN_0065cd80(int param_1,char *param_2)



{

  LONG *lpAddend;

  undefined4 *puVar1;

  char *pcVar2;

  undefined4 uVar3;

  int iVar4;

  LONG LVar5;

  uint uVar6;

  char *pcVar7;

  

  puVar1 = (undefined4 *)param_2;

  uVar6 = 0;

  uVar3 = 0;

  if (*(int *)(param_1 + 0x20) != 0) {

    while( true ) {

      param_2 = PTR_DAT_00818344;

      InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));

      FUN_00426020(&param_2);

      pcVar2 = param_2;

      iVar4 = _stricmp(param_2,(char *)*puVar1);

      pcVar7 = pcVar2 + -0x14;

      lpAddend = (LONG *)(pcVar2 + -0x10);

      if (iVar4 == 0) break;

      LVar5 = InterlockedDecrement(lpAddend);

      if ((LVar5 == 0) && (pcVar7 != (char *)0x0)) {

        (*(code *)**(undefined4 **)pcVar7)(1);

      }

      uVar6 = uVar6 + 1;

      if (*(uint *)(param_1 + 0x20) <= uVar6) {

        return 0;

      }

    }

    uVar3 = *(undefined4 *)(*(int *)(param_1 + 0x18) + uVar6 * 4);

    LVar5 = InterlockedDecrement(lpAddend);

    if ((LVar5 == 0) && (pcVar7 != (char *)0x0)) {

      (*(code *)**(undefined4 **)pcVar7)(1);

    }

  }

  return uVar3;

}





// --- thunk_FUN_0065cd80 at 0x0065CE30 (size: 5) ---


undefined4 __thiscall thunk_FUN_0065cd80(int param_1,char *param_2)



{

  LONG *lpAddend;

  undefined4 *puVar1;

  char *pcVar2;

  undefined4 uVar3;

  int iVar4;

  LONG LVar5;

  uint uVar6;

  char *pcVar7;

  

  puVar1 = (undefined4 *)param_2;

  uVar6 = 0;

  uVar3 = 0;

  if (*(int *)(param_1 + 0x20) != 0) {

    while( true ) {

      param_2 = PTR_DAT_00818344;

      InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));

      FUN_00426020(&param_2);

      pcVar2 = param_2;

      iVar4 = _stricmp(param_2,(char *)*puVar1);

      pcVar7 = pcVar2 + -0x14;

      lpAddend = (LONG *)(pcVar2 + -0x10);

      if (iVar4 == 0) break;

      LVar5 = InterlockedDecrement(lpAddend);

      if ((LVar5 == 0) && (pcVar7 != (char *)0x0)) {

        (*(code *)**(undefined4 **)pcVar7)(1);

      }

      uVar6 = uVar6 + 1;

      if (*(uint *)(param_1 + 0x20) <= uVar6) {

        return 0;

      }

    }

    uVar3 = *(undefined4 *)(*(int *)(param_1 + 0x18) + uVar6 * 4);

    LVar5 = InterlockedDecrement(lpAddend);

    if ((LVar5 == 0) && (pcVar7 != (char *)0x0)) {

      (*(code *)**(undefined4 **)pcVar7)(1);

    }

  }

  return uVar3;

}





// --- FUN_0065ce40 at 0x0065CE40 (size: 129) ---


undefined1 __thiscall FUN_0065ce40(int *param_1,undefined4 param_2)



{

  undefined *puVar1;

  char cVar2;

  LONG LVar3;

  LONG *lpAddend;

  uint uVar4;

  undefined4 uVar5;

  undefined1 local_1;

  

  puVar1 = (undefined *)param_1[4];

  local_1 = 1;

  if (puVar1 != PTR_DAT_00818344) {

    LVar3 = InterlockedDecrement((LONG *)(puVar1 + -0x10));

    if ((LVar3 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {

      (*(code *)**(undefined4 **)(puVar1 + -0x14))(1);

    }

    lpAddend = (LONG *)(PTR_DAT_00818344 + -0x10);

    param_1[4] = (int)PTR_DAT_00818344;

    InterlockedIncrement(lpAddend);

  }

  if (((char)param_2 != '\0') && (uVar4 = 0, param_1[8] != 0)) {

    do {

      uVar5 = param_2;

      (**(code **)(*param_1 + 8))(uVar4,param_2);

      cVar2 = FUN_0065ce40(uVar5);

      if (cVar2 == '\0') {

        local_1 = 0;

      }

      uVar4 = uVar4 + 1;

    } while (uVar4 < (uint)param_1[8]);

  }

  return local_1;

}





// --- FUN_0065ced0 at 0x0065CED0 (size: 95) ---


void __fastcall FUN_0065ced0(int param_1)



{

  int iVar1;

  LONG LVar2;

  undefined4 *puVar3;

  undefined *local_4;

  

  local_4 = PTR_DAT_00818344;

  InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));

  FUN_00426020(&local_4);

  if (*(int *)(param_1 + 0x2c) == 0) {

    iVar1 = *(int *)(param_1 + 0x28);

  }

  else {

    iVar1 = FUN_0065ca20();

  }

  *(short *)(iVar1 + 0xc) = *(short *)(iVar1 + 0xc) + 1;

  puVar3 = (undefined4 *)(local_4 + -0x14);

  LVar2 = InterlockedDecrement((LONG *)(local_4 + -0x10));

  if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {

    (**(code **)*puVar3)(1);

  }

  return;

}





// --- FUN_0065cf30 at 0x0065CF30 (size: 95) ---


void __fastcall FUN_0065cf30(int param_1)



{

  int iVar1;

  LONG LVar2;

  undefined4 *puVar3;

  undefined *local_4;

  

  local_4 = PTR_DAT_00818344;

  InterlockedIncrement((LONG *)(PTR_DAT_00818344 + -0x10));

  FUN_00426020(&local_4);

  if (*(int *)(param_1 + 0x2c) == 0) {

    iVar1 = *(int *)(param_1 + 0x28);

  }

  else {

    iVar1 = FUN_0065ca20();

  }

  *(short *)(iVar1 + 0xe) = *(short *)(iVar1 + 0xe) + 1;

  puVar3 = (undefined4 *)(local_4 + -0x14);

  LVar2 = InterlockedDecrement((LONG *)(local_4 + -0x10));

  if ((LVar2 == 0) && (puVar3 != (undefined4 *)0x0)) {

    (**(code **)*puVar3)(1);

  }

  return;

}





// --- FUN_0065cf90 at 0x0065CF90 (size: 43) ---


undefined4 * __thiscall FUN_0065cf90(undefined4 *param_1,undefined4 param_2)



{

  LONG *lpAddend;

  

  *param_1 = param_2;

  param_1[1] = 0;

  lpAddend = (LONG *)(PTR_DAT_00818344 + -0x10);

  param_1[2] = PTR_DAT_00818344;

  InterlockedIncrement(lpAddend);

  return param_1;

}





// --- FUN_0065cfc0 at 0x0065CFC0 (size: 116) ---


void __fastcall FUN_0065cfc0(int *param_1)



{

  LONG LVar1;

  undefined4 *puVar2;

  LONG *lpAddend;

  

  puVar2 = (undefined4 *)*param_1;

  if (puVar2 != (undefined4 *)0x0) {

    LVar1 = InterlockedDecrement(puVar2 + 1);

    if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

      (**(code **)*puVar2)(1);

    }

  }

  puVar2 = (undefined4 *)FUN_005df0f5(0x14);

  if (puVar2 != (undefined4 *)0x0) {

    puVar2[1] = 1;

    *puVar2 = &PTR_FUN_007feadc;

    lpAddend = (LONG *)(PTR_DAT_00818344 + -0x10);

    puVar2[2] = PTR_DAT_00818344;

    InterlockedIncrement(lpAddend);

    *(undefined2 *)(puVar2 + 3) = 0;

    *(undefined2 *)((int)puVar2 + 0xe) = 0;

    puVar2[4] = 0;

    *param_1 = (int)puVar2;

    return;

  }

  *param_1 = 0;

  return;

}





// --- FUN_0065d040 at 0x0065D040 (size: 133) ---


undefined4 __fastcall FUN_0065d040(int *param_1)



{

  uint uVar1;

  int iVar2;

  int iVar3;

  

  uVar1 = param_1[2];

  if (uVar1 == (param_1[1] & 0x7fffffffU)) {

    return 0;

  }

  if (uVar1 == 0) {

    iVar2 = 0;

  }

  else {

    iVar2 = thunk_FUN_005df0f5(uVar1 * 4);

    if (iVar2 == 0) {

      return 0;

    }

    iVar3 = param_1[2] + -1;

    while (-1 < iVar3) {

      iVar3 = iVar3 + -1;

      *(undefined4 *)(iVar2 + 4 + iVar3 * 4) = *(undefined4 *)(*param_1 + 4 + iVar3 * 4);

    }

  }

  if ((param_1[1] & 0x80000000U) == 0x80000000) {

    operator_delete__((void *)*param_1);

  }

  *param_1 = iVar2;

  param_1[1] = param_1[2] | 0x80000000;

  return 1;

}





// --- FUN_0065d0d0 at 0x0065D0D0 (size: 108) ---


undefined4 * FUN_0065d0d0(undefined4 *param_1,undefined4 *param_2,undefined4 param_3,code *param_4)



{

  undefined4 uVar1;

  char cVar2;

  undefined4 *puVar3;

  

  while( true ) {

    cVar2 = (*param_4)(*param_1,param_3);

    while (cVar2 != '\0') {

      puVar3 = param_1 + 1;

      param_1 = param_1 + 1;

      cVar2 = (*param_4)(*puVar3,param_3);

    }

    cVar2 = (*param_4)(param_3,param_2[-1]);

    puVar3 = param_2;

    while (param_2 = puVar3 + -1, cVar2 != '\0') {

      cVar2 = (*param_4)(param_3,puVar3[-2]);

      puVar3 = param_2;

    }

    if (param_2 <= param_1) break;

    uVar1 = *param_1;

    *param_1 = *param_2;

    *param_2 = uVar1;

    param_1 = param_1 + 1;

  }

  return param_1;

}





// --- FUN_0065d140 at 0x0065D140 (size: 85) ---


void FUN_0065d140(int param_1,int param_2,undefined4 param_3)



{

  int iVar1;

  int iVar2;

  int iVar3;

  

  iVar2 = param_2 - param_1 >> 2;

  if (1 < iVar2) {

    iVar3 = (iVar2 + -2) / 2;

    FUN_0065cbd0(param_1,iVar3,iVar2,*(undefined4 *)(param_1 + iVar3 * 4),param_3);

    while (iVar3 != 0) {

      iVar1 = iVar3 * 4;

      iVar3 = iVar3 + -1;

      FUN_0065cbd0(param_1,iVar3,iVar2,*(undefined4 *)(param_1 + -4 + iVar1),param_3);

    }

  }

  return;

}





// --- FUN_0065d1a0 at 0x0065D1A0 (size: 97) ---


undefined4 * __fastcall FUN_0065d1a0(undefined4 *param_1)



{

  LONG *pLVar1;

  

  param_1[1] = 1;

  *param_1 = &PTR_FUN_007feae0;

  param_1[2] = 0;

  *(undefined2 *)(param_1 + 3) = 0;

  *(undefined2 *)((int)param_1 + 0xe) = 0;

  pLVar1 = (LONG *)(PTR_DAT_00818344 + -0x10);

  param_1[4] = PTR_DAT_00818344;

  InterlockedIncrement(pLVar1);

  pLVar1 = (LONG *)(PTR_DAT_00818344 + -0x10);

  param_1[5] = PTR_DAT_00818344;

  InterlockedIncrement(pLVar1);

  param_1[6] = 0;

  param_1[7] = 0;

  param_1[8] = 0;

  *(undefined1 *)(param_1 + 9) = 0;

  param_1[10] = 0;

  param_1[0xb] = 0;

  param_1[0xc] = 0;

  return param_1;

}





// --- FUN_0065d210 at 0x0065D210 (size: 323) ---


void __fastcall FUN_0065d210(int *param_1)



{

  undefined *puVar1;

  undefined4 *puVar2;

  int iVar3;

  LONG LVar4;

  LONG *pLVar5;

  uint uVar6;

  undefined4 *puVar7;

  undefined4 *puVar8;

  

  if ((undefined4 *)param_1[2] != (undefined4 *)0x0) {

    (*(code *)**(undefined4 **)param_1[2])(1);

  }

  uVar6 = param_1[8];

  param_1[2] = 0;

  while (uVar6 != 0) {

    uVar6 = uVar6 - 1;

    if (uVar6 < (uint)param_1[8]) {

      puVar2 = (undefined4 *)(**(code **)(*param_1 + 8))(uVar6);

      if (uVar6 < (uint)param_1[8]) {

        iVar3 = param_1[8] - 1;

        puVar7 = (undefined4 *)(param_1[6] + uVar6 * 4);

        puVar8 = (undefined4 *)(param_1[6] + iVar3 * 4);

        param_1[8] = iVar3;

        if (puVar7 < puVar8) {

          iVar3 = ((uint)((int)puVar8 + (-1 - (int)puVar7)) >> 2) + 1;

          puVar8 = puVar7;

          for (; puVar7 = puVar7 + 1, iVar3 != 0; iVar3 = iVar3 + -1) {

            *puVar8 = *puVar7;

            puVar8 = puVar8 + 1;

          }

        }

        *(undefined4 *)(param_1[6] + param_1[8] * 4) = 0;

      }

      puVar2[0xb] = 0;

      LVar4 = InterlockedDecrement(puVar2 + 1);

      if (LVar4 == 0) {

        (**(code **)*puVar2)(1);

      }

    }

  }

  *(undefined2 *)(param_1 + 3) = 0;

  *(undefined2 *)((int)param_1 + 0xe) = 0;

  puVar1 = (undefined *)param_1[4];

  if (puVar1 != PTR_DAT_00818344) {

    LVar4 = InterlockedDecrement((LONG *)(puVar1 + -0x10));

    if ((LVar4 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {

      (*(code *)**(undefined4 **)(puVar1 + -0x14))(1);

    }

    pLVar5 = (LONG *)(PTR_DAT_00818344 + -0x10);

    param_1[4] = (int)PTR_DAT_00818344;

    InterlockedIncrement(pLVar5);

  }

  *(undefined1 *)(param_1 + 9) = 0;

  puVar2 = (undefined4 *)param_1[10];

  if (((puVar2 != (undefined4 *)0x0) && (LVar4 = InterlockedDecrement(puVar2 + 1), LVar4 == 0)) &&

     (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  param_1[10] = 0;

  puVar1 = (undefined *)param_1[5];

  if (puVar1 != PTR_DAT_00818344) {

    LVar4 = InterlockedDecrement((LONG *)(puVar1 + -0x10));

    if ((LVar4 == 0) && ((undefined4 *)(puVar1 + -0x14) != (undefined4 *)0x0)) {

      (*(code *)**(undefined4 **)(puVar1 + -0x14))(1);

    }

    pLVar5 = (LONG *)(PTR_DAT_00818344 + -0x10);

    param_1[5] = (int)PTR_DAT_00818344;

    InterlockedIncrement(pLVar5);

  }

  return;

}





// --- FUN_0065d360 at 0x0065D360 (size: 139) ---


undefined4 __thiscall FUN_0065d360(int *param_1,undefined4 param_2)



{

  int iVar1;

  int iVar2;

  uint uVar3;

  undefined4 *puVar4;

  LONG LVar5;

  

  iVar1 = param_1[6];

  iVar2 = FUN_0065c880(iVar1,iVar1 + param_1[8] * 4,&param_2,&param_2);

  if ((iVar2 != iVar1 + param_1[8] * 4) && (uVar3 = iVar2 - iVar1 >> 2, uVar3 != 0xffffffff)) {

    if (uVar3 < (uint)param_1[8]) {

      puVar4 = (undefined4 *)(**(code **)(*param_1 + 8))(uVar3);

      FUN_0065c830(uVar3);

      puVar4[0xb] = 0;

      LVar5 = InterlockedDecrement(puVar4 + 1);

      if (LVar5 == 0) {

        (**(code **)*puVar4)(1);

      }

    }

    return 1;

  }

  return 0;

}





// --- FUN_0065d3f0 at 0x0065D3F0 (size: 91) ---


void __thiscall FUN_0065d3f0(int param_1,int *param_2)



{

  int iVar1;

  int iVar2;

  LONG LVar3;

  

  if (*(int *)(param_1 + 0x28) == 0) {

    FUN_0065cfc0();

  }

  iVar1 = *(int *)(param_1 + 0x28);

  if ((iVar1 != 0) && (iVar2 = *(int *)(iVar1 + 8), iVar2 != *param_2)) {

    LVar3 = InterlockedDecrement((LONG *)(iVar2 + -0x10));

    if ((LVar3 == 0) && ((undefined4 *)(iVar2 + -0x14) != (undefined4 *)0x0)) {

      (*(code *)**(undefined4 **)(iVar2 + -0x14))(1);

    }

    iVar2 = *param_2;

    *(int *)(iVar1 + 8) = iVar2;

                    /* WARNING: Could not recover jumptable at 0x0065d440. Too many branches */

                    /* WARNING: Treating indirect jump as call */

    InterlockedIncrement((LONG *)(iVar2 + -0x10));

    return;

  }

  return;

}





// --- FUN_0065d450 at 0x0065D450 (size: 126) ---


void FUN_0065d450(undefined4 param_1,int *param_2,uint param_3)



{

  uint uVar1;

  uint uVar2;

  byte *pbVar3;

  int iVar4;

  

  uVar1 = param_3;

  uVar2 = param_3;

  if ((*(byte *)(param_3 + 4) & 1) != 0) {

    uVar2 = FUN_0065af90(*param_2);

  }

  param_3 = uVar2 & 0xff;

  FUN_0040ad10(1);

  pbVar3 = (byte *)FUN_0040acf0(1);

  if (pbVar3 != (byte *)0x0) {

    if ((*(byte *)(uVar1 + 4) & 1) == 0) {

      param_3 = (uint)*pbVar3;

    }

    else {

      *pbVar3 = (byte)uVar2;

    }

  }

  if ((*(byte *)(uVar1 + 4) & 5) == 0) {

    uVar2 = param_3;

  }

  if ((~*(byte *)(uVar1 + 4) & 1) != 0) {

    iVar4 = FUN_0065b7c0(uVar2);

    *param_2 = iVar4;

  }

  if ((int *)*param_2 != (int *)0x0) {

    (**(code **)(*(int *)*param_2 + 0x18))(uVar1);

  }

  return;

}





// --- FUN_0065d4d0 at 0x0065D4D0 (size: 144) ---


void __fastcall FUN_0065d4d0(undefined4 *param_1)



{

  LONG LVar1;

  undefined4 *puVar2;

  

  *param_1 = &PTR_FUN_007feae0;

  FUN_0065d210();

  puVar2 = (undefined4 *)param_1[10];

  if (puVar2 != (undefined4 *)0x0) {

    LVar1 = InterlockedDecrement(puVar2 + 1);

    if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

      (**(code **)*puVar2)(1);

    }

  }

  if ((param_1[7] & 0x80000000) == 0x80000000) {

    operator_delete__((void *)param_1[6]);

  }

  puVar2 = (undefined4 *)(param_1[5] + -0x14);

  LVar1 = InterlockedDecrement((LONG *)(param_1[5] + -0x10));

  if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  puVar2 = (undefined4 *)(param_1[4] + -0x14);

  LVar1 = InterlockedDecrement((LONG *)(param_1[4] + -0x10));

  if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  *param_1 = &PTR_FUN_007952f4;

  return;

}





// --- FUN_0065d560 at 0x0065D560 (size: 82) ---


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



undefined4 * __fastcall FUN_0065d560(int param_1)



{

  int iVar1;

  

  if ((_DAT_008f8620 & 1) == 0) {

    _DAT_008f8620 = _DAT_008f8620 | 1;

    FUN_00401340("<unknown>");

    _atexit((_func_4879 *)&LAB_0077fd00);

  }

  if (*(int *)(param_1 + 0x2c) == 0) {

    iVar1 = *(int *)(param_1 + 0x28);

  }

  else {

    iVar1 = FUN_0065ca20();

  }

  if (iVar1 != 0) {

    return (undefined4 *)(iVar1 + 8);

  }

  return &DAT_008f861c;

}





// --- FUN_0065d5c0 at 0x0065D5C0 (size: 92) ---


undefined4 FUN_0065d5c0(int *param_1)



{

  uint uVar1;

  int iVar2;

  uint uVar3;

  int *piVar4;

  

  piVar4 = param_1;

  iVar2 = *(int *)(*param_1 + -4);

  if (iVar2 != 1) {

    if (iVar2 != 1) {

      FUN_00404ef0(*param_1,iVar2 + -1);

    }

    uVar3 = *(uint *)(*piVar4 + -4);

    uVar1 = iVar2 - 2;

    if (uVar3 <= uVar1) {

      uVar1 = uVar3 - 1;

    }

    if (*(char *)(uVar1 + *piVar4) != '\n') {

      param_1 = (int *)CONCAT31(param_1._1_3_,10);

      FUN_00404ef0(&param_1,1);

    }

  }

  return 1;

}





// --- FUN_0065d620 at 0x0065D620 (size: 69) ---


void FUN_0065d620(undefined4 param_1,int param_2)



{

  LONG LVar1;

  undefined4 *puVar2;

  

  FUN_00402390(param_2,&stack0x0000000c);

  FUN_0065ced0(&param_2);

  puVar2 = (undefined4 *)(param_2 + -0x14);

  LVar1 = InterlockedDecrement((LONG *)(param_2 + -0x10));

  if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  return;

}





// --- FUN_0065d670 at 0x0065D670 (size: 69) ---


void FUN_0065d670(undefined4 param_1,int param_2)



{

  LONG LVar1;

  undefined4 *puVar2;

  

  FUN_00402390(param_2,&stack0x0000000c);

  FUN_0065cf30(&param_2);

  puVar2 = (undefined4 *)(param_2 + -0x14);

  LVar1 = InterlockedDecrement((LONG *)(param_2 + -0x10));

  if ((LVar1 == 0) && (puVar2 != (undefined4 *)0x0)) {

    (**(code **)*puVar2)(1);

  }

  return;

}





// --- FUN_0065d6c0 at 0x0065D6C0 (size: 107) ---


void FUN_0065d6c0(undefined4 *param_1,undefined4 *param_2,code *param_3)



{

  undefined4 uVar1;

  char cVar2;

  undefined4 *puVar3;

  size_t _Size;

  

  if ((param_1 != param_2) && (puVar3 = param_1 + 1, puVar3 != param_2)) {

    _Size = (int)puVar3 - (int)param_1;

    do {

      uVar1 = *puVar3;

      cVar2 = (*param_3)(uVar1,*param_1);

      if (cVar2 == '\0') {

        FUN_0065c980(puVar3,uVar1,param_3);

      }

      else {

        if (0 < (int)_Size) {

          memmove((void *)((int)puVar3 + (4 - _Size)),param_1,_Size);

        }

        *param_1 = uVar1;

      }

      puVar3 = puVar3 + 1;

      _Size = _Size + 4;

    } while (puVar3 != param_2);

  }

  return;

}





// --- FUN_0065d730 at 0x0065D730 (size: 77) ---


void FUN_0065d730(undefined4 *param_1,int param_2,undefined4 param_3)



{

  undefined4 uVar1;

  uint uVar2;

  

  uVar2 = param_2 - (int)param_1;

  while (4 < (int)(uVar2 & 0xfffffffc)) {

    uVar1 = *(undefined4 *)((int)param_1 + (uVar2 - 4));

    *(undefined4 *)((int)param_1 + (uVar2 - 4)) = *param_1;

    FUN_0065cbd0(param_1,0,(int)(uVar2 - 4) >> 2,uVar1,param_3);

    uVar2 = uVar2 - 4;

  }

  return;

}





// --- FUN_0065d780 at 0x0065D780 (size: 34) ---


undefined4 * __thiscall FUN_0065d780(undefined4 *param_1,byte param_2)



{

  FUN_0065d4d0();

  if ((param_2 & 1) != 0) {

    *param_1 = DAT_008f8638;

    DAT_008f8638 = param_1;

  }

  return param_1;

}





// --- FUN_0065d7b0 at 0x0065D7B0 (size: 73) ---


void __thiscall FUN_0065d7b0(int param_1,int param_2)



{

  char cVar1;

  uint uVar2;

  undefined4 uVar3;

  

  if (param_2 == 0) {

    return;

  }

  uVar2 = *(uint *)(param_1 + 0x1c) & 0x7fffffff;

  if (uVar2 <= *(uint *)(param_1 + 0x20)) {

    uVar3 = FUN_004077f0(uVar2 + 1);

    cVar1 = FUN_00408220(uVar3);

    if (cVar1 == '\0') goto LAB_0065d7f0;

  }

  *(int *)(*(int *)(param_1 + 0x18) + *(int *)(param_1 + 0x20) * 4) = param_2;

  *(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + 1;

LAB_0065d7f0:

  *(int *)(param_2 + 0x2c) = param_1;

  return;

}





// --- FUN_0065d800 at 0x0065D800 (size: 268) ---


void FUN_0065d800(undefined4 param_1,int *param_2,int param_3)



{

  bool bVar1;

  int *piVar2;

  uint uVar3;

  int iVar4;

  uint uVar5;

  int iVar6;

  int *piVar7;

  

  iVar4 = param_3;

  piVar2 = param_2;

  param_2 = (int *)param_2[2];

  FUN_0065bd90(param_1,&param_2,param_3);

  bVar1 = false;

  if ((~*(byte *)(iVar4 + 4) & 1) != 0) {

    uVar5 = FUN_0040a8f0();

    uVar3 = (uint)param_2;

    if (uVar5 < param_2) {

      FUN_0040aa50();

      return;

    }

    if ((uint)piVar2[2] < param_2) {

      FUN_00408220(param_2);

      piVar2[2] = uVar3;

    }

    else if (param_2 < (uint)piVar2[2]) {

      piVar2[2] = (int)param_2;

      FUN_0065d040();

    }

    bVar1 = true;

  }

  piVar7 = (int *)*piVar2;

  if (piVar7 != piVar7 + piVar2[2]) {

    do {

      if ((*(uint *)(iVar4 + 4) >> 2 & 1) == 0) {

        if ((~*(byte *)(iVar4 + 4) & 1) != 0) {

          if (DAT_008f8638 == (undefined4 *)0x0) {

            FUN_00661110();

          }

          DAT_008f8638 = (undefined4 *)*DAT_008f8638;

          iVar6 = FUN_0065d1a0();

          *piVar7 = iVar6;

        }

        if ((int *)*piVar7 == (int *)0x0) {

          FUN_0040aa50();

        }

        else {

          (**(code **)(*(int *)*piVar7 + 0x14))(iVar4);

        }

      }

      if ((*(uint *)(iVar4 + 4) >> 2 & 1) != 0) {

        if (!bVar1) {

          return;

        }

        if (piVar2[2] == 0) {

          return;

        }

        piVar2[2] = 0;

        FUN_0065d040();

        return;

      }

      piVar7 = piVar7 + 1;

    } while (piVar7 != (int *)(*piVar2 + piVar2[2] * 4));

  }

  return;

}





// --- FUN_0065d910 at 0x0065D910 (size: 72) ---


void FUN_0065d910(int param_1,int param_2,undefined4 param_3)



{

  if (0x40 < (int)(param_2 - param_1 & 0xfffffffcU)) {

    FUN_0065d6c0(param_1,param_1 + 0x40,param_3);

    FUN_0065cb70(param_1 + 0x40,param_2,0,param_3);

    return;

  }

  FUN_0065d6c0(param_1,param_2,param_3);

  return;

}





// --- FUN_0065d960 at 0x0065D960 (size: 106) ---


void FUN_0065d960(undefined4 *param_1,undefined4 *param_2,undefined4 *param_3,undefined4 param_4,

                 code *param_5)



{

  undefined4 uVar1;

  char cVar2;

  undefined4 *puVar3;

  

  FUN_0065d140(param_1,param_2,param_5,0,0);

  for (puVar3 = param_2; puVar3 < param_3; puVar3 = puVar3 + 1) {

    cVar2 = (*param_5)(*puVar3,*param_1);

    if (cVar2 != '\0') {

      uVar1 = *puVar3;

      *puVar3 = *param_1;

      FUN_0065cbd0(param_1,0,(int)param_2 - (int)param_1 >> 2,uVar1,param_5);

    }

  }

  FUN_0065d730(param_1,param_2,param_5);

  return;

}





// --- FUN_0065da10 at 0x0065DA10 (size: 103) ---


void __thiscall FUN_0065da10(int param_1,int param_2)



{

  int iVar1;

  uint uVar2;

  uint uVar3;

  

  iVar1 = param_2;

  if ((~*(byte *)(param_2 + 4) & 1) != 0) {

    FUN_0065d210();

    *(undefined4 *)(param_1 + 0x2c) = 0;

  }

  FUN_0065d450(&param_2,param_1 + 8,iVar1);

  FUN_0065d800(&param_2,(int *)(param_1 + 0x18),iVar1);

  if ((~*(byte *)(iVar1 + 4) & 1) != 0) {

    uVar2 = *(uint *)(param_1 + 0x20);

    uVar3 = 0;

    if (uVar2 != 0) {

      do {

        iVar1 = uVar3 * 4;

        uVar3 = uVar3 + 1;

        *(int *)(*(int *)(*(int *)(param_1 + 0x18) + iVar1) + 0x2c) = param_1;

      } while (uVar3 < uVar2);

    }

  }

  return;

}





// --- FUN_0065da80 at 0x0065DA80 (size: 134) ---


void FUN_0065da80(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5)



{

  undefined4 *puVar1;

  int iVar2;

  

  if (0x40 < (int)(param_2 - param_1 & 0xfffffffcU)) {

    while (param_4 != 0) {

      param_4 = param_4 + -1;

      puVar1 = (undefined4 *)

               FUN_0065c900(param_1,param_1 + ((param_2 - param_1 >> 2) -

                                               (param_2 - param_1 >> 0x1f) >> 1) * 4,param_2 + -4);

      iVar2 = FUN_0065d0d0(param_1,param_2,*puVar1,param_5);

      FUN_0065da80(iVar2,param_2,0,param_4,param_5);

      param_2 = iVar2;

      if ((int)(iVar2 - param_1 & 0xfffffffcU) < 0x41) {

        return;

      }

    }

    FUN_0065d960(param_1,param_2,param_2,0,param_5);

  }

  return;

}





// --- FUN_0065db10 at 0x0065DB10 (size: 76) ---


void FUN_0065db10(int param_1,int param_2,undefined4 param_3)



{

  int iVar1;

  int iVar2;

  

  if (param_1 != param_2) {

    iVar2 = 0;

    for (iVar1 = param_2 - param_1 >> 2; iVar1 != 1; iVar1 = iVar1 >> 1) {

      iVar2 = iVar2 + 1;

    }

    FUN_0065da80(param_1,param_2,0,iVar2 * 2,param_3);

    FUN_0065d910(param_1,param_2,param_3);

  }

  return;

}





// --- FUN_0065db80 at 0x0065DB80 (size: 678) ---


/* WARNING: Removing unreachable block (ram,0x0065dce6) */

/* WARNING: Removing unreachable block (ram,0x0065dd89) */



ulonglong FUN_0065db80(byte *param_1,undefined4 *param_2,uint param_3,uint param_4)



{

  ulonglong uVar1;

  int iVar2;

  int iVar3;

  int *piVar4;

  uint extraout_ECX;

  undefined4 unaff_EBX;

  uint uVar5;

  byte *pbVar6;

  ulonglong uVar7;

  longlong lVar8;

  byte local_21;

  int local_20;

  

  local_21 = *param_1;

  uVar1 = 0;

  iVar2 = isspace((uint)local_21);

  pbVar6 = param_1;

  while (pbVar6 = pbVar6 + 1, iVar2 != 0) {

    local_21 = *pbVar6;

    iVar2 = isspace((uint)local_21);

  }

  if (local_21 == 0x2d) {

    local_21 = *pbVar6;

    param_4 = param_4 | 2;

LAB_0065dbe7:

    pbVar6 = pbVar6 + 1;

  }

  else if (local_21 == 0x2b) {

    local_21 = *pbVar6;

    goto LAB_0065dbe7;

  }

  iVar2 = CONCAT31((int3)((uint)unaff_EBX >> 8),local_21);

  if ((((int)param_3 < 0) || (param_3 == 1)) || (0x24 < (int)param_3)) {

    if (param_2 != (undefined4 *)0x0) {

      *param_2 = param_1;

    }

    return 0;

  }

  if (param_3 == 0) {

    if (local_21 != 0x30) {

      param_3 = 10;

      goto LAB_0065dc6a;

    }

    if ((*pbVar6 != 0x78) && (*pbVar6 != 0x58)) {

      param_3 = 8;

      goto LAB_0065dc6a;

    }

    param_3 = 0x10;

  }

  else if ((param_3 != 0x10) || (local_21 != 0x30)) goto LAB_0065dc6a;

  if ((*pbVar6 == 0x78) || (*pbVar6 == 0x58)) {

    local_21 = pbVar6[1];

    pbVar6 = pbVar6 + 2;

  }

LAB_0065dc6a:

  uVar7 = __aulldvrm(0xffffffff,0xffffffff,param_3,(int)param_3 >> 0x1f);

  do {

    iVar3 = isdigit((uint)local_21);

    if (iVar3 == 0) {

      iVar3 = isalpha((uint)local_21);

      if (iVar3 == 0) {

LAB_0065dd50:

        pbVar6 = pbVar6 + -1;

        if ((param_4 & 8) == 0) {

          if (param_2 != (undefined4 *)0x0) {

            pbVar6 = param_1;

          }

          uVar1 = 0;

        }

        else if (((param_4 & 4) != 0) ||

                (((param_4 & 1) == 0 &&

                 ((((param_4 & 2) != 0 && (0x8000000000000000 < uVar1)) ||

                  (((param_4 & 2) == 0 &&

                   ((0x7ffffffeffffffff < uVar1 && (0x7fffffffffffffff < uVar1)))))))))) {

          piVar4 = _errno();

          *piVar4 = 0x22;

          if ((param_4 & 1) == 0) {

            if ((param_4 & 2) == 0) {

              uVar1 = 0x7fffffffffffffff;

            }

            else {

              uVar1 = 0x8000000000000000;

            }

          }

          else {

            uVar1 = 0xffffffffffffffff;

          }

        }

        local_20 = (int)uVar1;

        if (param_2 != (undefined4 *)0x0) {

          *param_2 = pbVar6;

        }

        if ((param_4 & 2) != 0) {

          uVar1 = CONCAT44(-((int)(uVar1 >> 0x20) + (uint)(local_20 != 0)),-local_20);

        }

        return uVar1;

      }

      iVar3 = toupper((int)(char)local_21);

      uVar5 = iVar3 - 0x37;

    }

    else {

      uVar5 = (int)(char)local_21 - 0x30;

    }

    if (param_3 <= uVar5) goto LAB_0065dd50;

    if ((uVar1 < uVar7) || ((uVar7 == uVar1 && ((iVar2 != 0 || (uVar5 <= extraout_ECX)))))) {

      lVar8 = __allmul(param_3,(int)param_3 >> 0x1f,uVar1);

      uVar1 = lVar8 + (ulonglong)uVar5;

      local_21 = *pbVar6;

      pbVar6 = pbVar6 + 1;

      param_4 = param_4 | 8;

    }

    else {

      local_21 = *pbVar6;

      pbVar6 = pbVar6 + 1;

      param_4 = param_4 | 0xc;

    }

  } while( true );

}





// --- FUN_0065de30 at 0x0065DE30 (size: 26) ---


void FUN_0065de30(undefined4 param_1,undefined4 param_2,undefined4 param_3)



{

  FUN_0065db80(param_1,param_2,param_3,0);

  return;

}





// --- FUN_0065de50 at 0x0065DE50 (size: 26) ---


void FUN_0065de50(undefined4 param_1,undefined4 param_2,undefined4 param_3)



{

  FUN_0065db80(param_1,param_2,param_3,1);

  return;

}





// --- FUN_0065de70 at 0x0065DE70 (size: 433) ---


void FUN_0065de70(void)



{

  return;

}





// --- FUN_0065e030 at 0x0065E030 (size: 69) ---


void __thiscall

FUN_0065e030(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)



{

  param_1[3] = 0;

  param_1[2] = 0;

  param_1[1] = 0;

  param_1[7] = 0;

  param_1[6] = 0;

  param_1[4] = 0;

  param_1[0xb] = 0;

  param_1[9] = 0;

  param_1[8] = 0;

  param_1[0xf] = 0x3f800000;

  param_1[10] = 0x3f800000;

  param_1[5] = 0x3f800000;

  *param_1 = 0x3f800000;

  param_1[0xc] = param_2;

  param_1[0xd] = param_3;

  param_1[0xe] = param_4;

  return;

}





// --- FUN_0065e080 at 0x0065E080 (size: 65) ---


void __thiscall FUN_0065e080(undefined4 *param_1,undefined4 param_2,undefined4 param_3)



{

  param_1[3] = 0;

  param_1[2] = 0;

  param_1[1] = 0;

  param_1[7] = 0;

  param_1[6] = 0;

  param_1[4] = 0;

  param_1[0xb] = 0;

  param_1[0xe] = 0;

  param_1[0xd] = 0;

  param_1[0xc] = 0;

  param_1[0xf] = 0x3f800000;

  param_1[10] = 0x3f800000;

  param_1[5] = 0x3f800000;

  *param_1 = 0x3f800000;

  param_1[8] = param_2;

  param_1[9] = param_3;

  return;

}





// --- FUN_0065e0d0 at 0x0065E0D0 (size: 76) ---


void __thiscall FUN_0065e0d0(undefined4 *param_1,float param_2)



{

  float10 fVar1;

  float10 fVar2;

  

  fVar1 = (float10)fcos((float10)param_2);

  param_1[3] = 0;

  param_1[2] = 0;

  param_1[1] = 0;

  param_1[7] = 0;

  param_1[4] = 0;

  param_1[0xb] = 0;

  param_1[8] = 0;

  param_1[0xe] = 0;

  param_1[0xd] = 0;

  param_1[0xc] = 0;

  param_1[0xf] = 0x3f800000;

  *param_1 = 0x3f800000;

  fVar2 = (float10)fsin((float10)param_2);

  param_1[5] = (float)fVar1;

  param_1[6] = (float)fVar2;

  param_1[9] = (float)-fVar2;

  param_1[10] = (float)fVar1;

  return;

}





// --- FUN_0065e120 at 0x0065E120 (size: 75) ---


void __thiscall FUN_0065e120(float *param_1,float param_2)



{

  float10 fVar1;

  float10 fVar2;

  

  fVar1 = (float10)fcos((float10)param_2);

  param_1[3] = 0.0;

  param_1[1] = 0.0;

  param_1[7] = 0.0;

  param_1[6] = 0.0;

  param_1[4] = 0.0;

  param_1[0xb] = 0.0;

  param_1[9] = 0.0;

  param_1[0xe] = 0.0;

  param_1[0xd] = 0.0;

  param_1[0xc] = 0.0;

  param_1[0xf] = 1.0;

  param_1[5] = 1.0;

  fVar2 = (float10)fsin((float10)param_2);

  *param_1 = (float)fVar1;

  param_1[2] = (float)-fVar2;

  param_1[8] = (float)fVar2;

  param_1[10] = (float)fVar1;

  return;

}





// --- FUN_0065e170 at 0x0065E170 (size: 73) ---


void __thiscall FUN_0065e170(float *param_1,float param_2)



{

  float10 fVar1;

  float10 fVar2;

  

  fVar1 = (float10)fcos((float10)param_2);

  param_1[3] = 0.0;

  param_1[2] = 0.0;

  param_1[7] = 0.0;

  param_1[6] = 0.0;

  param_1[0xb] = 0.0;

  param_1[9] = 0.0;

  param_1[8] = 0.0;

  param_1[0xe] = 0.0;

  param_1[0xd] = 0.0;

  param_1[0xc] = 0.0;

  param_1[0xf] = 1.0;

  param_1[10] = 1.0;

  fVar2 = (float10)fsin((float10)param_2);

  *param_1 = (float)fVar1;

  param_1[1] = (float)fVar2;

  param_1[4] = (float)-fVar2;

  param_1[5] = (float)fVar1;

  return;

}





// --- FUN_0065e1c0 at 0x0065E1C0 (size: 68) ---


void __thiscall

FUN_0065e1c0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)



{

  param_1[3] = 0;

  param_1[2] = 0;

  param_1[1] = 0;

  param_1[7] = 0;

  param_1[6] = 0;

  param_1[4] = 0;

  param_1[0xb] = 0;

  param_1[9] = 0;

  param_1[8] = 0;

  param_1[0xe] = 0;

  param_1[0xd] = 0;

  param_1[0xc] = 0;

  *param_1 = param_2;

  param_1[0xf] = 0x3f800000;

  param_1[5] = param_3;

  param_1[10] = param_4;

  return;

}





// --- FUN_0065e210 at 0x0065E210 (size: 901) ---


void __thiscall FUN_0065e210(float *param_1,float *param_2)



{

  float fVar1;

  float fVar2;

  float fVar3;

  float fVar4;

  float fVar5;

  float fVar6;

  float fVar7;

  float fVar8;

  float fVar9;

  float fVar10;

  float fVar11;

  float fVar12;

  float fVar13;

  float fVar14;

  float fVar15;

  float fVar16;

  float fVar17;

  float fVar18;

  float fVar19;

  float fVar20;

  float fVar21;

  float fVar22;

  

  fVar7 = param_2[6];

  fVar1 = *param_2;

  fVar2 = param_2[1];

  fVar8 = param_2[7];

  fVar3 = param_2[2];

  fVar4 = param_2[3];

  fVar9 = param_2[8];

  fVar5 = param_2[4];

  fVar6 = param_2[5];

  fVar10 = param_2[9];

  fVar11 = param_2[10];

  fVar12 = param_2[0xb];

  fVar13 = param_2[0xc];

  fVar14 = param_2[0xd];

  fVar15 = param_2[0xe];

  fVar16 = param_2[0xf];

  fVar17 = fVar16 * fVar11 - fVar15 * fVar12;

  fVar18 = fVar16 * fVar10 - fVar14 * fVar12;

  fVar19 = fVar15 * fVar10 - fVar14 * fVar11;

  *param_1 = fVar19 * fVar8 + (fVar17 * fVar6 - fVar18 * fVar7);

  fVar20 = fVar16 * fVar9 - fVar13 * fVar12;

  fVar21 = fVar15 * fVar9 - fVar13 * fVar11;

  param_1[4] = -(fVar21 * fVar8 + (fVar17 * fVar5 - fVar20 * fVar7));

  fVar22 = fVar14 * fVar9 - fVar13 * fVar10;

  param_1[8] = fVar22 * fVar8 + (fVar18 * fVar5 - fVar20 * fVar6);

  param_1[0xc] = -(fVar22 * fVar7 + (fVar19 * fVar5 - fVar21 * fVar6));

  param_1[1] = -(fVar19 * fVar4 + (fVar17 * fVar2 - fVar18 * fVar3));

  param_1[5] = fVar21 * fVar4 + (fVar17 * fVar1 - fVar20 * fVar3);

  param_1[9] = -(fVar22 * fVar4 + (fVar18 * fVar1 - fVar20 * fVar2));

  param_1[0xd] = fVar22 * fVar3 + (fVar19 * fVar1 - fVar21 * fVar2);

  fVar19 = fVar16 * fVar7 - fVar15 * fVar8;

  fVar18 = fVar16 * fVar6 - fVar14 * fVar8;

  fVar17 = fVar15 * fVar6 - fVar14 * fVar7;

  param_1[2] = fVar17 * fVar4 + (fVar19 * fVar2 - fVar18 * fVar3);

  fVar16 = fVar16 * fVar5 - fVar13 * fVar8;

  fVar15 = fVar15 * fVar5 - fVar13 * fVar7;

  param_1[6] = -(fVar15 * fVar4 + (fVar19 * fVar1 - fVar16 * fVar3));

  fVar13 = fVar14 * fVar5 - fVar13 * fVar6;

  param_1[10] = fVar13 * fVar4 + (fVar18 * fVar1 - fVar16 * fVar2);

  param_1[0xe] = -(fVar13 * fVar3 + (fVar17 * fVar1 - fVar15 * fVar2));

  fVar15 = fVar12 * fVar7 - fVar11 * fVar8;

  fVar14 = fVar12 * fVar6 - fVar10 * fVar8;

  fVar13 = fVar11 * fVar6 - fVar10 * fVar7;

  param_1[3] = -(fVar13 * fVar4 + (fVar15 * fVar2 - fVar14 * fVar3));

  fVar8 = fVar12 * fVar5 - fVar9 * fVar8;

  fVar7 = fVar11 * fVar5 - fVar9 * fVar7;

  param_1[7] = fVar7 * fVar4 + (fVar15 * fVar1 - fVar8 * fVar3);

  fVar5 = fVar10 * fVar5 - fVar9 * fVar6;

  param_1[0xb] = -(fVar5 * fVar4 + (fVar14 * fVar1 - fVar8 * fVar2));

  param_1[0xf] = fVar5 * fVar3 + (fVar13 * fVar1 - fVar7 * fVar2);

  return;

}





// --- FUN_0065e5a0 at 0x0065E5A0 (size: 445) ---


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



undefined4 FUN_0065e5a0(float *param_1,float *param_2)



{

  char cVar1;

  

  if ((((ABS(*param_1 - *param_2) < _DAT_007feaf8 != (ABS(*param_1 - *param_2) == _DAT_007feaf8)) &&

       (ABS(param_1[4] - param_2[4]) < _DAT_007feaf8 !=

        (ABS(param_1[4] - param_2[4]) == _DAT_007feaf8))) &&

      (ABS(param_1[8] - param_2[8]) < _DAT_007feaf8 !=

       (ABS(param_1[8] - param_2[8]) == _DAT_007feaf8))) &&

     ((ABS(param_1[0xc] - param_2[0xc]) < _DAT_007feaf8 !=

       (ABS(param_1[0xc] - param_2[0xc]) == _DAT_007feaf8) &&

      (ABS(param_1[1] - param_2[1]) < _DAT_007feaf8 !=

       (ABS(param_1[1] - param_2[1]) == _DAT_007feaf8))))) {

    cVar1 = FUN_0043d870(param_1[5],param_2[5],0x3951b717);

    if (cVar1 != '\0') {

      cVar1 = FUN_0043d870(param_1[9],param_2[9],0x3951b717);

      if (cVar1 != '\0') {

        cVar1 = FUN_0043d870(param_1[0xd],param_2[0xd],0x3951b717);

        if (cVar1 != '\0') {

          cVar1 = FUN_0043d870(param_1[2],param_2[2],0x3951b717);

          if (cVar1 != '\0') {

            cVar1 = FUN_0043d870(param_1[6],param_2[6],0x3951b717);

            if (cVar1 != '\0') {

              cVar1 = FUN_0043d870(param_1[10],param_2[10],0x3951b717);

              if (cVar1 != '\0') {

                cVar1 = FUN_0043d870(param_1[0xe],param_2[0xe],0x3951b717);

                if (cVar1 != '\0') {

                  cVar1 = FUN_0043d870(param_1[3],param_2[3],0x3951b717);

                  if (cVar1 != '\0') {

                    cVar1 = FUN_0043d870(param_1[7],param_2[7],0x3951b717);

                    if (cVar1 != '\0') {

                      cVar1 = FUN_0043d870(param_1[0xb],param_2[0xb],0x3951b717);

                      if (cVar1 != '\0') {

                        cVar1 = FUN_0043d870(param_1[0xf],param_2[0xf],0x3951b717);

                        if (cVar1 != '\0') {

                          return 1;

                        }

                      }

                    }

                  }

                }

              }

            }

          }

        }

      }

    }

  }

  return 0;

}





// --- FUN_0065e760 at 0x0065E760 (size: 109) ---


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



float10 FUN_0065e760(undefined4 param_1)



{

  float *pfVar1;

  int extraout_ECX;

  int iVar2;

  float10 fVar3;

  float10 fVar4;

  

  FUN_0065e210(param_1);

  fVar3 = (float10)FUN_0065de70();

  if (ABS(fVar3) < (float10)_DAT_007feaf8) {

    return (float10)DAT_00796344;

  }

  fVar4 = (float10)_DAT_007938c0 / fVar3;

  iVar2 = 4;

  pfVar1 = (float *)(extraout_ECX + 8);

  do {

    iVar2 = iVar2 + -1;

    pfVar1[-2] = (float)(fVar4 * (float10)pfVar1[-2]);

    pfVar1[-1] = (float)(fVar4 * (float10)pfVar1[-1]);

    *pfVar1 = (float)(fVar4 * (float10)*pfVar1);

    pfVar1[1] = (float)(fVar4 * (float10)pfVar1[1]);

    pfVar1 = pfVar1 + 4;

  } while (iVar2 != 0);

  return fVar3;

}





// --- FUN_0065e850 at 0x0065E850 (size: 60) ---


void __fastcall FUN_0065e850(int param_1)



{

  char cVar1;

  int local_4;

  

  *(undefined1 *)(param_1 + 0x80) = 1;

  if ((~(byte)(*(uint *)(param_1 + 4) >> 2) & 1) != 0) {

    local_4 = param_1;

    cVar1 = FUN_0040ab90(*(undefined4 *)(param_1 + 0x2c),&local_4);

    if (cVar1 != '\0') {

      FUN_004106f0(*(undefined4 *)(param_1 + 0x28),param_1);

    }

  }

  return;

}





// --- FUN_0065e890 at 0x0065E890 (size: 18) ---


void __thiscall FUN_0065e890(undefined4 *param_1,undefined4 param_2,undefined4 param_3)



{

  *param_1 = param_2;

  param_1[1] = param_3;

  return;

}





// --- FUN_0065e8b0 at 0x0065E8B0 (size: 31) ---


undefined4 * __fastcall FUN_0065e8b0(undefined4 *param_1)



{

  param_1[7] = 0;

  param_1[8] = 0;

  *param_1 = &PTR_FUN_007feb0c;

  InitializeCriticalSection((LPCRITICAL_SECTION)(param_1 + 1));

  return param_1;

}





// --- FUN_0065e8d0 at 0x0065E8D0 (size: 17) ---


void __fastcall FUN_0065e8d0(undefined4 *param_1)



{

  *param_1 = &PTR_FUN_007feb0c;

  DeleteCriticalSection((LPCRITICAL_SECTION)(param_1 + 1));

  return;

}





// --- FUN_0065e8f0 at 0x0065E8F0 (size: 28) ---


void __fastcall FUN_0065e8f0(int param_1)



{

  DWORD DVar1;

  

  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));

  DVar1 = GetCurrentThreadId();

  *(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + 1;

  *(DWORD *)(param_1 + 0x1c) = DVar1;

  return;

}





// --- FUN_0065e910 at 0x0065E910 (size: 24) ---


void __fastcall FUN_0065e910(int param_1)



{

  int *piVar1;

  

  piVar1 = (int *)(param_1 + 0x20);

  *piVar1 = *piVar1 + -1;

  if (*piVar1 == 0) {

    *(undefined4 *)(param_1 + 0x1c) = 0;

  }

  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));

  return;

}





// --- FUN_0065e930 at 0x0065E930 (size: 41) ---


undefined4 * __thiscall FUN_0065e930(undefined4 *param_1,byte param_2)



{

  *param_1 = &PTR_FUN_007feb0c;

  DeleteCriticalSection((LPCRITICAL_SECTION)(param_1 + 1));

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065e960 at 0x0065E960 (size: 52) ---


void __fastcall FUN_0065e960(undefined4 *param_1)



{

  undefined4 *local_4;

  

  *param_1 = &PTR_LAB_007feb14;

  local_4 = param_1;

  if (*(char *)(param_1 + 3) != '\0') {

    local_4 = (undefined4 *)0x0;

    GetExitCodeThread((HANDLE)param_1[1],(LPDWORD)&local_4);

  }

  CloseHandle((HANDLE)param_1[1]);

  return;

}





// --- FUN_0065e9a0 at 0x0065E9A0 (size: 51) ---


undefined4 __fastcall FUN_0065e9a0(int param_1)



{

  char cVar1;

  DWORD DVar2;

  

  DVar2 = ResumeThread(*(HANDLE *)(param_1 + 4));

  if (DVar2 == 1) {

    cVar1 = *(char *)(param_1 + 0xe);

    while (cVar1 == '\0') {

      Sleep(0);

      cVar1 = *(char *)(param_1 + 0xe);

    }

    return 1;

  }

  return 0;

}





// --- FUN_0065ea50 at 0x0065EA50 (size: 57) ---


void FUN_0065ea50(int *param_1)



{

  char cVar1;

  

  *(undefined1 *)(param_1 + 3) = 1;

  *(undefined1 *)((int)param_1 + 0xe) = 1;

  cVar1 = FUN_00405e90(0x400);

  if (cVar1 != '\0') {

    FUN_00405fa0(1,8);

  }

  (**(code **)(*param_1 + 4))();

  *(undefined1 *)(param_1 + 3) = 0;

  return;

}





// --- FUN_0065ea90 at 0x0065EA90 (size: 73) ---


undefined4 * __thiscall FUN_0065ea90(undefined4 *param_1,SIZE_T param_2)



{

  HANDLE pvVar1;

  

  *param_1 = &PTR_LAB_007feb14;

  param_1[1] = 0;

  *(undefined1 *)(param_1 + 3) = 0;

  *(undefined1 *)((int)param_1 + 0xd) = 0;

  *(undefined1 *)((int)param_1 + 0xe) = 0;

  pvVar1 = CreateThread((LPSECURITY_ATTRIBUTES)0x0,param_2,FUN_0065ea50,param_1,4,param_1 + 2);

  param_1[1] = pvVar1;

  if (pvVar1 == (HANDLE)0x0) {

    GetLastError();

    FUN_00661190();

  }

  return param_1;

}





// --- FUN_0065eae0 at 0x0065EAE0 (size: 29) ---


undefined4 * __fastcall FUN_0065eae0(undefined4 *param_1)



{

  HANDLE pvVar1;

  

  *param_1 = 0;

  pvVar1 = CreateEventA((LPSECURITY_ATTRIBUTES)0x0,0,0,(LPCSTR)0x0);

  *param_1 = pvVar1;

  return param_1;

}





// --- FUN_0065eb00 at 0x0065EB00 (size: 24) ---


void __fastcall FUN_0065eb00(undefined4 *param_1)



{

  if ((HANDLE)*param_1 != (HANDLE)0x0) {

    CloseHandle((HANDLE)*param_1);

    *param_1 = 0;

  }

  return;

}





// --- FUN_0065eb20 at 0x0065EB20 (size: 15) ---


bool __fastcall FUN_0065eb20(undefined4 *param_1)



{

  BOOL BVar1;

  

  BVar1 = SetEvent((HANDLE)*param_1);

  return BVar1 != 0;

}





// --- FUN_0065eb30 at 0x0065EB30 (size: 28) ---


undefined4 __thiscall FUN_0065eb30(undefined4 *param_1,DWORD param_2)



{

  DWORD DVar1;

  

  DVar1 = WaitForSingleObject((HANDLE)*param_1,param_2);

  if (DVar1 != 0) {

    return 0;

  }

  return 1;

}





// --- FUN_0065eb50 at 0x0065EB50 (size: 8) ---


void __fastcall FUN_0065eb50(int param_1)



{

                    /* WARNING: Could not recover jumptable at 0x0065eb55. Too many branches */

                    /* WARNING: Treating indirect jump as call */

  (**(code **)(**(int **)(param_1 + 0x14) + 0x18))();

  return;

}





// --- FUN_0065eb60 at 0x0065EB60 (size: 8) ---


void __fastcall FUN_0065eb60(int param_1)



{

                    /* WARNING: Could not recover jumptable at 0x0065eb65. Too many branches */

                    /* WARNING: Treating indirect jump as call */

  (**(code **)(**(int **)(param_1 + 0x14) + 0x1c))();

  return;

}





// --- FUN_0065eb70 at 0x0065EB70 (size: 81) ---


void __thiscall FUN_0065eb70(int param_1,undefined4 *param_2)



{

  undefined4 *puVar1;

  LONG LVar2;

  

  puVar1 = *(undefined4 **)(param_1 + 0x170);

  if (puVar1 != param_2) {

    if (puVar1 != (undefined4 *)0x0) {

      LVar2 = InterlockedDecrement(puVar1 + 1);

      if ((LVar2 == 0) && (puVar1 != (undefined4 *)0x0)) {

        (**(code **)*puVar1)(1);

      }

      *(undefined4 *)(param_1 + 0x170) = 0;

    }

    *(undefined4 **)(param_1 + 0x170) = param_2;

    InterlockedIncrement(param_2 + 1);

  }

  return;

}





// --- FUN_0065ebd0 at 0x0065EBD0 (size: 64) ---


undefined4 * __thiscall FUN_0065ebd0(undefined4 *param_1,byte param_2)



{

  *param_1 = &PTR_FUN_007feb24;

  if ((undefined4 *)param_1[0x18] != param_1 + 1) {

    operator_delete__((undefined4 *)param_1[0x18]);

  }

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065ec10 at 0x0065EC10 (size: 64) ---


undefined4 * __thiscall FUN_0065ec10(undefined4 *param_1,byte param_2)



{

  *param_1 = &PTR_FUN_007feb28;

  if ((undefined4 *)param_1[0x18] != param_1 + 1) {

    operator_delete__((undefined4 *)param_1[0x18]);

  }

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065ec50 at 0x0065EC50 (size: 64) ---


undefined4 * __thiscall FUN_0065ec50(undefined4 *param_1,byte param_2)



{

  *param_1 = &PTR_FUN_007feb2c;

  if ((undefined4 *)param_1[0x18] != param_1 + 1) {

    operator_delete__((undefined4 *)param_1[0x18]);

  }

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065ec90 at 0x0065EC90 (size: 76) ---


void __thiscall FUN_0065ec90(int param_1,uint param_2)



{

  undefined4 *puVar1;

  uint uVar2;

  int iVar3;

  

  *(uint *)(param_1 + 0x68) = param_2;

  if (param_2 < 0x18) {

    puVar1 = (undefined4 *)(param_1 + 4);

  }

  else {

    puVar1 = (undefined4 *)thunk_FUN_005df0f5(param_2 * 4);

  }

  *(undefined4 **)(param_1 + 100) = puVar1 + *(uint *)(param_1 + 0x68);

  *(undefined4 **)(param_1 + 0x60) = puVar1;

  for (uVar2 = *(uint *)(param_1 + 0x68) & 0x3fffffff; uVar2 != 0; uVar2 = uVar2 - 1) {

    *puVar1 = 0;

    puVar1 = puVar1 + 1;

  }

  for (iVar3 = 0; iVar3 != 0; iVar3 = iVar3 + -1) {

    *(undefined1 *)puVar1 = 0;

    puVar1 = (undefined4 *)((int)puVar1 + 1);

  }

  return;

}





// --- FUN_0065ece0 at 0x0065ECE0 (size: 32) ---


void __thiscall FUN_0065ece0(undefined4 *param_1,undefined4 param_2)



{

  param_1[1] = param_2;

  param_1[2] = 0;

  param_1[3] = 0;

  param_1[4] = 0;

  *param_1 = &PTR_FUN_007feb30;

  param_1[5] = 0;

  return;

}





// --- FUN_0065ed80 at 0x0065ED80 (size: 91) ---


void __thiscall FUN_0065ed80(int param_1,int *param_2,int *param_3)



{

  int iVar1;

  uint uVar2;

  int iVar3;

  char cVar4;

  uint uVar5;

  

  iVar1 = *param_3;

  uVar5 = *(uint *)(iVar1 + -8);

  uVar2 = *(uint *)(param_1 + 0x68);

  if (uVar5 == 0xffffffff) {

    uVar5 = FUN_0040a980(iVar1);

    *(uint *)(iVar1 + -8) = uVar5;

  }

  uVar5 = uVar5 % uVar2;

  iVar1 = *(int *)(param_1 + 0x60);

  iVar3 = *(int *)(iVar1 + uVar5 * 4);

  while ((iVar3 != 0 && (cVar4 = FUN_00401920(param_3), cVar4 == '\0'))) {

    iVar3 = *(int *)(iVar3 + 4);

  }

  *param_2 = param_1;

  param_2[2] = iVar3;

  param_2[1] = iVar1 + uVar5 * 4;

  return;

}





// --- FUN_0065ede0 at 0x0065EDE0 (size: 45) ---


undefined4 __thiscall FUN_0065ede0(int param_1,uint *param_2)



{

  uint uVar1;

  int iVar2;

  bool bVar3;

  

  uVar1 = *param_2;

  iVar2 = *(int *)(*(int *)(param_1 + 0x60) + (uVar1 % *(uint *)(param_1 + 0x68)) * 4);

  bVar3 = iVar2 == 0;

  if (!bVar3) {

    do {

      if (*(uint *)(iVar2 + 4) == uVar1) break;

      iVar2 = *(int *)(iVar2 + 8);

    } while (iVar2 != 0);

    bVar3 = iVar2 == 0;

  }

  return CONCAT31((int3)((ulonglong)uVar1 / (ulonglong)*(uint *)(param_1 + 0x68) >> 8),!bVar3);

}





// --- FUN_0065ee10 at 0x0065EE10 (size: 39) ---


undefined4 * __thiscall FUN_0065ee10(undefined4 *param_1,byte param_2)



{

  FUN_004020c0();

  *param_1 = &PTR_FUN_007952f4;

  if ((param_2 & 1) != 0) {

    operator_delete(param_1);

  }

  return param_1;

}





// --- FUN_0065ee40 at 0x0065EE40 (size: 164) ---


undefined4 __thiscall FUN_0065ee40(int *param_1,uint param_2)



{

  undefined8 uVar1;

  int *piVar2;

  undefined4 uVar3;

  int iVar4;

  

  iVar4 = *(int *)(param_1[0x38] + (param_2 % (uint)param_1[0x3a]) * 4);

  if (iVar4 != 0) {

    while (*(uint *)(iVar4 + 8) != param_2) {

      iVar4 = *(int *)(iVar4 + 0xc);

      if (iVar4 == 0) {

        return 5;

      }

    }

    if (iVar4 != 0) {

      uVar1 = *(undefined8 *)(param_1[0x5c] + 0x60);

      *(undefined4 *)(iVar4 + 0x24) = 1;

      *(undefined8 *)(iVar4 + 0x38) = uVar1;

      (**(code **)(*param_1 + 8))(param_2);

      if ((param_1[0x1c] != 0) && (piVar2 = (int *)param_1[0x1d], piVar2 != (int *)0x0)) {

        while (piVar2 + -3 != (int *)0x0) {

          (**(code **)(piVar2[-3] + 4))(param_2);

          piVar2 = (int *)*piVar2;

          if ((piVar2 == (int *)0x0) || (piVar2 == (int *)0x8)) break;

        }

      }

      uVar3 = (**(code **)(*param_1 + 0x18))(param_2,param_2);

      return uVar3;

    }

  }

  return 5;

}





// --- FUN_0065eef0 at 0x0065EEF0 (size: 68) ---


undefined4 __thiscall FUN_0065eef0(int param_1,uint param_2,int param_3)



{

  int iVar1;

  

  iVar1 = *(int *)(*(int *)(param_1 + 0xe0) + (param_2 % *(uint *)(param_1 + 0xe8)) * 4);

  while( true ) {

    if (iVar1 == 0) {

      return 0;

    }

    if (*(uint *)(iVar1 + 8) == param_2) break;

    iVar1 = *(int *)(iVar1 + 0xc);

  }

  if (iVar1 == 0) {

    return 0;

  }

  return *(undefined4 *)(*(int *)(iVar1 + 0x18) + param_3 * 4);

}





// --- FUN_0065ef40 at 0x0065EF40 (size: 74) ---


undefined4 __thiscall FUN_0065ef40(int param_1,uint param_2,int param_3,undefined4 param_4)



{

  int iVar1;

  

  iVar1 = *(int *)(*(int *)(param_1 + 0xe0) + (param_2 % *(uint *)(param_1 + 0xe8)) * 4);

  while( true ) {

    if (iVar1 == 0) {

      return 0;

    }

    if (*(uint *)(iVar1 + 8) == param_2) break;

    iVar1 = *(int *)(iVar1 + 0xc);

  }

  if (iVar1 == 0) {

    return 0;

  }

  *(undefined4 *)(*(int *)(iVar1 + 0x18) + param_3 * 4) = param_4;

  return 1;

}





// --- FUN_0065f170 at 0x0065F170 (size: 82) ---


void __fastcall FUN_0065f170(int param_1)



{

  undefined *puVar1;

  undefined4 *puVar2;

  uint local_8;

  undefined4 local_4;

  

  puVar1 = PTR_DAT_00818558;

  local_4 = *(undefined4 *)(param_1 + 0x68);

  local_8 = local_8 & 0xffffff00;

  puVar2 = (undefined4 *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_8,0);

  if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {

    puVar2 = puVar2 + 1;

  }

  FUN_0065f520(*puVar2);

  return;

}





// --- FUN_0065f1d0 at 0x0065F1D0 (size: 82) ---


void __fastcall FUN_0065f1d0(int param_1)



{

  undefined *puVar1;

  undefined4 *puVar2;

  uint local_8;

  undefined4 local_4;

  

  puVar1 = PTR_DAT_00818558;

  local_4 = *(undefined4 *)(param_1 + 0x68);

  local_8 = local_8 & 0xffffff00;

  puVar2 = (undefined4 *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_8,0);

  if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {

    puVar2 = puVar2 + 1;

  }

  FUN_0065f610(*puVar2);

  return;

}





// --- FUN_0065f230 at 0x0065F230 (size: 8) ---


void FUN_0065f230(void)



{

  FUN_0065eef0();

  return;

}





// --- FUN_0065f240 at 0x0065F240 (size: 8) ---


void FUN_0065f240(void)



{

  FUN_0065ef40();

  return;

}





// --- FUN_0065f250 at 0x0065F250 (size: 67) ---


void __fastcall FUN_0065f250(int *param_1)



{

  int unaff_ESI;

  int *unaff_retaddr;

  int *local_4;

  

  local_4 = param_1;

  (**(code **)(*param_1 + 4))(&local_4);

  if (unaff_ESI != DAT_008f86a0) {

    FUN_0065ee40(unaff_ESI,0x80000100);

    *unaff_retaddr = unaff_ESI;

    return;

  }

  *unaff_retaddr = unaff_ESI;

  return;

}





// --- FUN_0065f2a0 at 0x0065F2A0 (size: 151) ---


undefined4 * __thiscall FUN_0065f2a0(undefined4 *param_1,uint param_2)



{

  undefined *puVar1;

  uint *puVar2;

  undefined4 uVar3;

  uint uVar4;

  int iVar5;

  undefined4 *puVar6;

  uint local_4;

  

  local_4 = param_2;

  param_2 = param_2 & 0xffffff00;

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  *param_1 = &PTR_FUN_007feb24;

  puVar1 = PTR_DAT_00818558;

  puVar2 = (uint *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,param_2,0);

  if (puVar2 == (uint *)puVar1) {

    puVar2 = puVar2 + -1;

  }

  uVar4 = *puVar2;

  param_1[0x1a] = uVar4;

  if (uVar4 < 0x18) {

    param_1[0x18] = param_1 + 1;

  }

  else {

    uVar3 = thunk_FUN_005df0f5(uVar4 * 4);

    param_1[0x18] = uVar3;

  }

  param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];

  puVar6 = (undefined4 *)param_1[0x18];

  for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {

    *puVar6 = 0;

    puVar6 = puVar6 + 1;

  }

  for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {

    *(undefined1 *)puVar6 = 0;

    puVar6 = (undefined4 *)((int)puVar6 + 1);

  }

  return param_1;

}





// --- FUN_0065f340 at 0x0065F340 (size: 151) ---


undefined4 * __thiscall FUN_0065f340(undefined4 *param_1,uint param_2)



{

  undefined *puVar1;

  uint *puVar2;

  undefined4 uVar3;

  uint uVar4;

  int iVar5;

  undefined4 *puVar6;

  uint local_4;

  

  local_4 = param_2;

  param_2 = param_2 & 0xffffff00;

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  *param_1 = &PTR_FUN_007feb28;

  puVar1 = PTR_DAT_00818558;

  puVar2 = (uint *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,param_2,0);

  if (puVar2 == (uint *)puVar1) {

    puVar2 = puVar2 + -1;

  }

  uVar4 = *puVar2;

  param_1[0x1a] = uVar4;

  if (uVar4 < 0x18) {

    param_1[0x18] = param_1 + 1;

  }

  else {

    uVar3 = thunk_FUN_005df0f5(uVar4 * 4);

    param_1[0x18] = uVar3;

  }

  param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];

  puVar6 = (undefined4 *)param_1[0x18];

  for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {

    *puVar6 = 0;

    puVar6 = puVar6 + 1;

  }

  for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {

    *(undefined1 *)puVar6 = 0;

    puVar6 = (undefined4 *)((int)puVar6 + 1);

  }

  return param_1;

}





// --- FUN_0065f3e0 at 0x0065F3E0 (size: 151) ---


undefined4 * __thiscall FUN_0065f3e0(undefined4 *param_1,uint param_2)



{

  undefined *puVar1;

  uint *puVar2;

  undefined4 uVar3;

  uint uVar4;

  int iVar5;

  undefined4 *puVar6;

  uint local_4;

  

  local_4 = param_2;

  param_2 = param_2 & 0xffffff00;

  param_1[0x18] = 0;

  param_1[0x19] = 0;

  param_1[0x1a] = 0;

  param_1[0x1b] = 0;

  *param_1 = &PTR_FUN_007feb2c;

  puVar1 = PTR_DAT_00818558;

  puVar2 = (uint *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,param_2,0);

  if (puVar2 == (uint *)puVar1) {

    puVar2 = puVar2 + -1;

  }

  uVar4 = *puVar2;

  param_1[0x1a] = uVar4;

  if (uVar4 < 0x18) {

    param_1[0x18] = param_1 + 1;

  }

  else {

    uVar3 = thunk_FUN_005df0f5(uVar4 * 4);

    param_1[0x18] = uVar3;

  }

  param_1[0x19] = (undefined4 *)param_1[0x18] + param_1[0x1a];

  puVar6 = (undefined4 *)param_1[0x18];

  for (uVar4 = param_1[0x1a] & 0x3fffffff; uVar4 != 0; uVar4 = uVar4 - 1) {

    *puVar6 = 0;

    puVar6 = puVar6 + 1;

  }

  for (iVar5 = 0; iVar5 != 0; iVar5 = iVar5 + -1) {

    *(undefined1 *)puVar6 = 0;

    puVar6 = (undefined4 *)((int)puVar6 + 1);

  }

  return param_1;

}





// --- FUN_0065f480 at 0x0065F480 (size: 82) ---


void __fastcall FUN_0065f480(int param_1)



{

  undefined *puVar1;

  undefined4 *puVar2;

  uint local_8;

  undefined4 local_4;

  

  puVar1 = PTR_DAT_00818558;

  local_4 = *(undefined4 *)(param_1 + 0x68);

  local_8 = local_8 & 0xffffff00;

  puVar2 = (undefined4 *)FUN_004064a0(PTR_DAT_00818554,PTR_DAT_00818558,&local_4,local_8,0);

  if ((puVar2 != (undefined4 *)puVar1) || (puVar2 = puVar2 + -1, puVar2 != (undefined4 *)puVar1)) {

    puVar2 = puVar2 + 1;

  }

  FUN_0065f770(*puVar2);

  return;

}





// --- FUN_0065f4e0 at 0x0065F4E0 (size: 58) ---


void __thiscall FUN_0065f4e0(int param_1,undefined4 param_2,int *param_3,int param_4)



{

  int iVar1;

  int iVar2;

  

  iVar2 = *param_3;

  if (iVar2 != param_4) {

    do {

      iVar1 = iVar2;

      iVar2 = *(int *)(iVar1 + 0xc);

    } while (iVar2 != param_4);

    if (iVar1 != 0) {

      *(undefined4 *)(iVar1 + 0xc) = *(undefined4 *)(iVar2 + 0xc);

      *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

      return;

    }

  }

  *param_3 = *(int *)(iVar2 + 0xc);

  *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

  return;

}





// --- FUN_0065f520 at 0x0065F520 (size: 235) ---


undefined4 __thiscall FUN_0065f520(int param_1,int param_2)



{

  int iVar1;

  int iVar2;

  int *piVar3;

  uint uVar4;

  int iVar5;

  

  if (param_2 == *(int *)(param_1 + 0x68)) {

    return 0;

  }

  iVar1 = *(int *)(param_1 + 0x6c);

  iVar2 = 0;

  do {

    if (iVar1 == 0) {

      if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {

        operator_delete__(*(void **)(param_1 + 0x60));

      }

      *(undefined4 *)(param_1 + 0x60) = 0;

      *(undefined4 *)(param_1 + 100) = 0;

      *(undefined4 *)(param_1 + 0x68) = 0;

      *(undefined4 *)(param_1 + 0x6c) = 0;

      FUN_0065ec90(param_2);

      while (iVar2 != 0) {

        iVar1 = *(int *)(iVar2 + 8);

        if (*(int *)(param_1 + 0x68) * 2 < *(int *)(param_1 + 0x6c) + 1) {

          FUN_0065f170();

        }

        uVar4 = *(uint *)(iVar2 + 4) % *(uint *)(param_1 + 0x68);

        iVar5 = *(int *)(param_1 + 0x60);

        *(undefined4 *)(iVar2 + 8) = *(undefined4 *)(iVar5 + uVar4 * 4);

        *(int *)(iVar5 + uVar4 * 4) = iVar2;

        uVar4 = iVar5 + uVar4 * 4;

        if (uVar4 < *(uint *)(param_1 + 100)) {

          *(uint *)(param_1 + 100) = uVar4;

        }

        *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

        iVar2 = iVar1;

      }

      return 1;

    }

    piVar3 = *(int **)(param_1 + 100);

    while (piVar3 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {

      if (**(int **)(param_1 + 100) != 0) {

        piVar3 = *(int **)(param_1 + 100);

        iVar5 = *piVar3;

        goto LAB_0065f56e;

      }

      piVar3 = *(int **)(param_1 + 100) + 1;

      *(int **)(param_1 + 100) = piVar3;

    }

    piVar3 = (int *)0x0;

    iVar5 = 0;

LAB_0065f56e:

    FUN_0065fc20(param_1,piVar3,iVar5);

    *(int *)(iVar5 + 8) = iVar2;

    iVar1 = *(int *)(param_1 + 0x6c);

    iVar2 = iVar5;

  } while( true );

}





// --- FUN_0065f610 at 0x0065F610 (size: 248) ---


undefined4 __thiscall FUN_0065f610(int param_1,int param_2)



{

  int iVar1;

  int iVar2;

  int iVar3;

  int iVar4;

  uint uVar5;

  int *piVar6;

  

  if (param_2 == *(int *)(param_1 + 0x68)) {

    return 0;

  }

  iVar3 = *(int *)(param_1 + 0x6c);

  iVar1 = 0;

  do {

    if (iVar3 == 0) {

      if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {

        operator_delete__(*(void **)(param_1 + 0x60));

      }

      *(undefined4 *)(param_1 + 0x60) = 0;

      *(undefined4 *)(param_1 + 100) = 0;

      *(undefined4 *)(param_1 + 0x68) = 0;

      *(undefined4 *)(param_1 + 0x6c) = 0;

      FUN_0065ec90(param_2);

      while (iVar1 != 0) {

        iVar3 = *(int *)(iVar1 + 0xc);

        if (*(int *)(param_1 + 0x68) * 2 < *(int *)(param_1 + 0x6c) + 1) {

          FUN_0065f1d0();

        }

        uVar5 = *(uint *)(iVar1 + 8) % *(uint *)(param_1 + 0x68);

        iVar4 = *(int *)(param_1 + 0x60);

        *(undefined4 *)(iVar1 + 0xc) = *(undefined4 *)(iVar4 + uVar5 * 4);

        *(int *)(iVar4 + uVar5 * 4) = iVar1;

        uVar5 = iVar4 + uVar5 * 4;

        if (uVar5 < *(uint *)(param_1 + 100)) {

          *(uint *)(param_1 + 100) = uVar5;

        }

        *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

        iVar1 = iVar3;

      }

      return 1;

    }

    piVar6 = *(int **)(param_1 + 100);

    while (piVar6 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {

      if (**(int **)(param_1 + 100) != 0) {

        piVar6 = *(int **)(param_1 + 100);

        iVar4 = *piVar6;

        goto LAB_0065f65f;

      }

      piVar6 = *(int **)(param_1 + 100) + 1;

      *(int **)(param_1 + 100) = piVar6;

    }

    piVar6 = (int *)0x0;

    iVar4 = 0;

LAB_0065f65f:

    iVar3 = *piVar6;

    if (iVar3 == iVar4) {

LAB_0065f673:

      *piVar6 = *(int *)(iVar3 + 0xc);

    }

    else {

      do {

        iVar2 = iVar3;

        iVar3 = *(int *)(iVar2 + 0xc);

      } while (iVar3 != iVar4);

      if (iVar2 == 0) goto LAB_0065f673;

      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(iVar3 + 0xc);

    }

    *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

    *(int *)(iVar4 + 0xc) = iVar1;

    iVar3 = *(int *)(param_1 + 0x6c);

    iVar1 = iVar4;

  } while( true );

}





// --- FUN_0065f710 at 0x0065F710 (size: 95) ---


void __thiscall FUN_0065f710(int param_1,int *param_2)



{

  uint uVar1;

  int iVar2;

  uint uVar3;

  

  if (*(int *)(param_1 + 0x68) * 2 < *(int *)(param_1 + 0x6c) + 1) {

    FUN_0065f480();

  }

  uVar1 = *(uint *)(param_1 + 0x68);

  iVar2 = *param_2;

  uVar3 = *(uint *)(iVar2 + -8);

  if (uVar3 == 0xffffffff) {

    uVar3 = FUN_0040a980(iVar2);

    *(uint *)(iVar2 + -8) = uVar3;

  }

  uVar3 = uVar3 % uVar1;

  iVar2 = *(int *)(param_1 + 0x60);

  param_2[1] = *(int *)(iVar2 + uVar3 * 4);

  *(int **)(iVar2 + uVar3 * 4) = param_2;

  uVar1 = iVar2 + uVar3 * 4;

  if (uVar1 < *(uint *)(param_1 + 100)) {

    *(uint *)(param_1 + 100) = uVar1;

  }

  *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

  return;

}





// --- FUN_0065f770 at 0x0065F770 (size: 278) ---


undefined4 __thiscall FUN_0065f770(int param_1,int param_2)



{

  int iVar1;

  uint uVar2;

  int *piVar3;

  int *piVar4;

  uint uVar5;

  int *piVar6;

  int *piVar7;

  int *piVar8;

  

  if (param_2 == *(int *)(param_1 + 0x68)) {

    return 0;

  }

  piVar7 = (int *)0x0;

  if (*(int *)(param_1 + 0x6c) != 0) {

    piVar8 = (int *)0x0;

    do {

      piVar7 = *(int **)(param_1 + 100);

      while (piVar7 != (int *)(*(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x68) * 4)) {

        if (**(int **)(param_1 + 100) != 0) {

          piVar6 = *(int **)(param_1 + 100);

          piVar7 = (int *)*piVar6;

          goto LAB_0065f7be;

        }

        piVar7 = *(int **)(param_1 + 100) + 1;

        *(int **)(param_1 + 100) = piVar7;

      }

      piVar6 = (int *)0x0;

      piVar7 = (int *)0x0;

LAB_0065f7be:

      piVar4 = (int *)*piVar6;

      if (piVar4 == piVar7) {

LAB_0065f7d2:

        *piVar6 = piVar4[1];

      }

      else {

        do {

          piVar3 = piVar4;

          piVar4 = (int *)piVar3[1];

        } while (piVar4 != piVar7);

        if (piVar3 == (int *)0x0) goto LAB_0065f7d2;

        piVar3[1] = piVar4[1];

      }

      *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

      piVar7[1] = (int)piVar8;

      piVar8 = piVar7;

    } while (*(int *)(param_1 + 0x6c) != 0);

  }

  if (*(void **)(param_1 + 0x60) != (void *)(param_1 + 4)) {

    operator_delete__(*(void **)(param_1 + 0x60));

  }

  *(undefined4 *)(param_1 + 0x60) = 0;

  *(undefined4 *)(param_1 + 100) = 0;

  *(undefined4 *)(param_1 + 0x68) = 0;

  *(undefined4 *)(param_1 + 0x6c) = 0;

  FUN_0065ec90(param_2);

  while (piVar7 != (int *)0x0) {

    piVar8 = (int *)piVar7[1];

    if (*(int *)(param_1 + 0x68) * 2 < *(int *)(param_1 + 0x6c) + 1) {

      FUN_0065f480();

    }

    iVar1 = *piVar7;

    uVar5 = *(uint *)(iVar1 + -8);

    uVar2 = *(uint *)(param_1 + 0x68);

    if (uVar5 == 0xffffffff) {

      uVar5 = FUN_0040a980(iVar1);

      *(uint *)(iVar1 + -8) = uVar5;

    }

    uVar5 = uVar5 % uVar2;

    iVar1 = *(int *)(param_1 + 0x60);

    piVar7[1] = *(int *)(iVar1 + uVar5 * 4);

    *(int **)(iVar1 + uVar5 * 4) = piVar7;

    uVar5 = iVar1 + uVar5 * 4;

    if (uVar5 < *(uint *)(param_1 + 100)) {

      *(uint *)(param_1 + 100) = uVar5;

    }

    *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

    piVar7 = piVar8;

  }

  return 1;

}





// --- FUN_0065f890 at 0x0065F890 (size: 119) ---


uint __thiscall FUN_0065f890(int param_1,int param_2)



{

  int iVar1;

  uint uVar2;

  

  iVar1 = *(int *)(*(uint *)(param_1 + 0x60) +

                  (*(uint *)(param_2 + 4) % *(uint *)(param_1 + 0x68)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065f8bc:

      if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {

        FUN_0065f170();

      }

      uVar2 = *(uint *)(param_2 + 4) % *(uint *)(param_1 + 0x68);

      iVar1 = *(int *)(param_1 + 0x60);

      *(undefined4 *)(param_2 + 8) = *(undefined4 *)(iVar1 + uVar2 * 4);

      *(int *)(iVar1 + uVar2 * 4) = param_2;

      uVar2 = iVar1 + uVar2 * 4;

      if (uVar2 < *(uint *)(param_1 + 100)) {

        *(uint *)(param_1 + 100) = uVar2;

      }

      *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

      return CONCAT31((int3)(uVar2 >> 8),1);

    }

    if (*(uint *)(iVar1 + 4) == *(uint *)(param_2 + 4)) {

      if (iVar1 != 0) {

        return *(uint *)(param_1 + 0x60) & 0xffffff00;

      }

      goto LAB_0065f8bc;

    }

    iVar1 = *(int *)(iVar1 + 8);

  } while( true );

}





// --- FUN_0065f910 at 0x0065F910 (size: 119) ---


uint __thiscall FUN_0065f910(int param_1,int param_2)



{

  int iVar1;

  uint uVar2;

  

  iVar1 = *(int *)(*(uint *)(param_1 + 0x60) +

                  (*(uint *)(param_2 + 8) % *(uint *)(param_1 + 0x68)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065f93c:

      if ((int)(*(uint *)(param_1 + 0x68) * 2) < *(int *)(param_1 + 0x6c) + 1) {

        FUN_0065f1d0();

      }

      uVar2 = *(uint *)(param_2 + 8) % *(uint *)(param_1 + 0x68);

      iVar1 = *(int *)(param_1 + 0x60);

      *(undefined4 *)(param_2 + 0xc) = *(undefined4 *)(iVar1 + uVar2 * 4);

      *(int *)(iVar1 + uVar2 * 4) = param_2;

      uVar2 = iVar1 + uVar2 * 4;

      if (uVar2 < *(uint *)(param_1 + 100)) {

        *(uint *)(param_1 + 100) = uVar2;

      }

      *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + 1;

      return CONCAT31((int3)(uVar2 >> 8),1);

    }

    if (*(uint *)(iVar1 + 8) == *(uint *)(param_2 + 8)) {

      if (iVar1 != 0) {

        return *(uint *)(param_1 + 0x60) & 0xffffff00;

      }

      goto LAB_0065f93c;

    }

    iVar1 = *(int *)(iVar1 + 0xc);

  } while( true );

}





// --- FUN_0065f990 at 0x0065F990 (size: 82) ---


int __thiscall FUN_0065f990(int param_1,uint *param_2)



{

  int iVar1;

  uint uVar2;

  

  uVar2 = *param_2 % *(uint *)(param_1 + 0x68);

  iVar1 = *(int *)(*(int *)(param_1 + 0x60) + uVar2 * 4);

  while( true ) {

    if (iVar1 == 0) {

      return 0;

    }

    if (*(uint *)(iVar1 + 8) == *param_2) break;

    iVar1 = *(int *)(iVar1 + 0xc);

  }

  if (iVar1 == 0) {

    return 0;

  }

  FUN_0065f4e0(param_1,*(int *)(param_1 + 0x60) + uVar2 * 4,iVar1);

  return iVar1;

}





// --- FUN_0065f9f0 at 0x0065F9F0 (size: 129) ---


uint __thiscall FUN_0065f9f0(int param_1,int param_2)



{

  int iVar1;

  undefined4 *puVar2;

  undefined3 uVar3;

  

  iVar1 = *(int *)(*(uint *)(param_1 + 0x60) +

                  (*(uint *)(param_2 + 4) % *(uint *)(param_1 + 0x68)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065fa1c:

      FUN_0065f890(param_2);

      if (param_2 == -4) {

        puVar2 = (undefined4 *)0x0;

      }

      else {

        puVar2 = (undefined4 *)(param_2 + 0xc);

      }

      *puVar2 = *(undefined4 *)(param_1 + 0x70);

      uVar3 = (undefined3)((uint)puVar2 >> 8);

      if (*(int *)(param_1 + 0x70) == 0) {

        *(undefined4 **)(param_1 + 0x74) = puVar2;

        *(undefined4 **)(param_1 + 0x70) = puVar2;

        puVar2[1] = 0;

        return CONCAT31(uVar3,1);

      }

      *(undefined4 **)(*(int *)(param_1 + 0x70) + 4) = puVar2;

      *(undefined4 **)(param_1 + 0x70) = puVar2;

      puVar2[1] = 0;

      return CONCAT31(uVar3,1);

    }

    if (*(uint *)(iVar1 + 4) == *(uint *)(param_2 + 4)) {

      if (iVar1 != 0) {

        return *(uint *)(param_1 + 0x60) & 0xffffff00;

      }

      goto LAB_0065fa1c;

    }

    iVar1 = *(int *)(iVar1 + 8);

  } while( true );

}





// --- FUN_0065fa80 at 0x0065FA80 (size: 96) ---


undefined4 __thiscall FUN_0065fa80(int param_1,int param_2)



{

  int iVar1;

  

  iVar1 = *(int *)(*(int *)(param_1 + 0x60) +

                  (*(uint *)(param_2 + 4) % *(uint *)(param_1 + 0x68)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065faac:

      FUN_0065f890(param_2);

      if (param_2 == -4) {

        param_2 = 0;

      }

      else {

        param_2 = param_2 + 0xc;

      }

      FUN_00410820(param_2,*(undefined4 *)(param_1 + 0x74));

      return 1;

    }

    if (*(uint *)(iVar1 + 4) == *(uint *)(param_2 + 4)) {

      if (iVar1 != 0) {

        return 0;

      }

      goto LAB_0065faac;

    }

    iVar1 = *(int *)(iVar1 + 8);

  } while( true );

}





// --- FUN_0065fae0 at 0x0065FAE0 (size: 124) ---


undefined4 FUN_0065fae0(int param_1,int param_2)



{

  char cVar1;

  undefined4 uVar2;

  

  if (param_1 == 0) {

    uVar2 = FUN_0065f9f0(param_2);

    return uVar2;

  }

  cVar1 = FUN_0065ede0(param_2 + 4);

  if (cVar1 != '\0') {

    return 0;

  }

  FUN_0065f890(param_2);

  if (param_1 == -4) {

    param_1 = 0;

  }

  else {

    param_1 = param_1 + 0xc;

  }

  if (param_2 + 4 != 0) {

    FUN_00410820(param_2 + 0xc,param_1);

    return 1;

  }

  FUN_00410820(0,param_1);

  return 1;

}





// --- FUN_0065fb60 at 0x0065FB60 (size: 96) ---


undefined4 __thiscall FUN_0065fb60(int param_1,int param_2)



{

  int iVar1;

  

  iVar1 = *(int *)(*(int *)(param_1 + 0x60) +

                  (*(uint *)(param_2 + 8) % *(uint *)(param_1 + 0x68)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065fb8c:

      FUN_0065f910(param_2);

      if (param_2 == -8) {

        param_2 = 0;

      }

      else {

        param_2 = param_2 + 0x10;

      }

      FUN_00410820(param_2,*(undefined4 *)(param_1 + 0x74));

      return 1;

    }

    if (*(uint *)(iVar1 + 8) == *(uint *)(param_2 + 8)) {

      if (iVar1 != 0) {

        return 0;

      }

      goto LAB_0065fb8c;

    }

    iVar1 = *(int *)(iVar1 + 0xc);

  } while( true );

}





// --- FUN_0065fbc0 at 0x0065FBC0 (size: 95) ---


int __thiscall FUN_0065fbc0(int param_1,uint *param_2)



{

  int iVar1;

  int iVar2;

  

  iVar2 = *(int *)(*(int *)(param_1 + 0x60) + (*param_2 % *(uint *)(param_1 + 0x68)) * 4);

  if (iVar2 != 0) {

    while (*(uint *)(iVar2 + 8) != *param_2) {

      iVar2 = *(int *)(iVar2 + 0xc);

      if (iVar2 == 0) {

        return 0;

      }

    }

    if (iVar2 != 0) {

      if (iVar2 == -8) {

        iVar1 = 0;

      }

      else {

        iVar1 = iVar2 + 0x10;

      }

      FUN_00410880(iVar1);

      FUN_0065f990(param_2);

    }

  }

  return iVar2;

}





// --- FUN_0065fc20 at 0x0065FC20 (size: 58) ---


void __thiscall FUN_0065fc20(int param_1,undefined4 param_2,int *param_3,int param_4)



{

  int iVar1;

  int iVar2;

  

  iVar2 = *param_3;

  if (iVar2 != param_4) {

    do {

      iVar1 = iVar2;

      iVar2 = *(int *)(iVar1 + 8);

    } while (iVar2 != param_4);

    if (iVar1 != 0) {

      *(undefined4 *)(iVar1 + 8) = *(undefined4 *)(iVar2 + 8);

      *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

      return;

    }

  }

  *param_3 = *(int *)(iVar2 + 8);

  *(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;

  return;

}





// --- FUN_0065fc60 at 0x0065FC60 (size: 327) ---


undefined1 __thiscall FUN_0065fc60(int param_1,int *param_2)



{

  int iVar1;

  uint uVar2;

  int iVar3;

  int local_10;

  

  local_10 = 0;

  if (*(int *)(param_1 + 0x70) != 0) {

    if (*(int *)(param_1 + 0x74) == 0) {

      local_10 = 0;

    }

    else {

      local_10 = *(int *)(param_1 + 0x74) + -0xc;

    }

  }

  iVar3 = 0;

  if (*(int *)(param_1 + 0x70) != 0) {

    if (*(int *)(param_1 + 0x78) == 0) {

      iVar3 = 0;

    }

    else {

      iVar3 = *(int *)(param_1 + 0x78) + -0xc;

    }

  }

  uVar2 = param_2[1];

  if ((int)uVar2 < -0x7fffff00) {

    return 0;

  }

  if (0x7ffffeff < (int)uVar2) {

    if (uVar2 == 0x7ffffffd) {

      iVar1 = iVar3;

      for (uVar2 = 0x7ffffeff; (iVar1 != 0 && (*(uint *)(iVar1 + 4) == uVar2)); uVar2 = uVar2 - 1) {

        iVar1 = *(int *)(iVar1 + 0x10);

        if ((iVar1 == 0) || (iVar1 == 8)) {

          iVar1 = 0;

        }

        else {

          iVar1 = iVar1 + -0xc;

        }

      }

      param_2[1] = uVar2;

    }

    if (0x7ffffeff < (int)uVar2) {

      return 0;

    }

  }

  iVar1 = *(int *)(*(int *)(param_1 + 100) + (uVar2 % *(uint *)(param_1 + 0x6c)) * 4);

  do {

    if (iVar1 == 0) {

LAB_0065fd1d:

      if ((iVar3 == 0) || (*(int *)(iVar3 + 4) < (int)uVar2)) {

        FUN_0065fa80(param_2);

      }

      else if ((int)uVar2 < *(int *)(local_10 + 4)) {

        FUN_0065f9f0(param_2);

      }

      else {

        if (local_10 == iVar3) {

          return 0;

        }

        while( true ) {

          iVar3 = *(int *)(iVar3 + 0x10);

          if ((iVar3 == 0) || (iVar3 == 8)) {

            iVar3 = 0;

          }

          else {

            iVar3 = iVar3 + -0xc;

          }

          if (*(int *)(iVar3 + 4) < (int)uVar2) break;

          if (local_10 == iVar3) {

            return 0;

          }

        }

        FUN_0065fae0(iVar3,param_2);

      }

      param_2[5] = param_1;

      (**(code **)(*param_2 + 0x18))();

      return 1;

    }

    if (*(uint *)(iVar1 + 4) == uVar2) {

      if (iVar1 != 0) {

        return 0;

      }

      goto LAB_0065fd1d;

    }

    iVar1 = *(int *)(iVar1 + 8);

  } while( true );

}





// --- FUN_0065fe70 at 0x0065FE70 (size: 316) ---


void __thiscall FUN_0065fe70(int *param_1,uint param_2,undefined4 param_3)



{

  int iVar1;

  LONG LVar2;

  int *unaff_EBP;

  undefined4 *puVar3;

  int *piVar4;

  undefined1 auStack_8 [4];

  int *local_4;

  

  local_4 = param_1 + 0x20;

  puVar3 = *(undefined4 **)(param_1[0x38] + (param_2 % (uint)param_1[0x3a]) * 4);

  if (puVar3 != (undefined4 *)0x0) {

    while (puVar3[2] != param_2) {

      puVar3 = (undefined4 *)puVar3[3];

      if (puVar3 == (undefined4 *)0x0) {

        return;

      }

    }

    if ((puVar3 != (undefined4 *)0x0) && (iVar1 = puVar3[9], iVar1 < 2)) {

      puVar3[9] = param_3;

      if ((iVar1 == 1) && ((int *)puVar3[0xc] != (int *)0x0)) {

        (**(code **)(*(int *)puVar3[0xc] + 0xc))(param_2,param_3);

      }

      piVar4 = (int *)0x0;

      if (param_1[0x1c] != 0) {

        if (param_1[0x1d] == 0) {

          piVar4 = (int *)0x0;

        }

        else {

          piVar4 = (int *)(param_1[0x1d] + -0xc);

        }

      }

      (**(code **)(*param_1 + 0xc))(param_2,param_3);

      while (piVar4 != (int *)0x0) {

        (**(code **)(*piVar4 + 0x10))(param_2,param_3);

        iVar1 = piVar4[3];

        if ((iVar1 == 0) || (iVar1 == 8)) break;

        piVar4 = (int *)(iVar1 + -0xc);

      }

      (**(code **)(*unaff_EBP + 0x10))(param_2);

      piVar4 = (int *)0x0;

      if (local_4[0x1b] != 0) {

        if (local_4[0x1c] == 0) {

          piVar4 = (int *)0x0;

        }

        else {

          piVar4 = (int *)(local_4[0x1c] + -0xc);

        }

      }

      while (piVar4 != (int *)0x0) {

        (**(code **)(*piVar4 + 0x14))(param_2);

        iVar1 = piVar4[3];

        if ((iVar1 == 0) || (iVar1 == 8)) break;

        piVar4 = (int *)(iVar1 + -0xc);

      }

      FUN_0065fbc0(auStack_8);

      LVar2 = InterlockedDecrement(puVar3 + 1);

      if (LVar2 == 0) {

        (**(code **)*puVar3)(1);

      }

    }

  }

  return;

}





// --- FUN_0065ffb0 at 0x0065FFB0 (size: 46) ---


int __thiscall FUN_0065ffb0(int *param_1,undefined4 param_2,undefined4 param_3)



{

  int iVar1;

  

  iVar1 = (**(code **)(*param_1 + 0x14))(param_2,param_3);

  if (iVar1 != 1) {

    FUN_0065fe70(param_2,iVar1);

  }

  return iVar1;

}





// --- FUN_0065fff0 at 0x0065FFF0 (size: 156) ---


undefined4 FUN_0065fff0(int *param_1,int *param_2)



{

  int iVar1;

  int *piVar2;

  LONG LVar3;

  undefined4 *puVar4;

  undefined1 local_c [8];

  int local_4;

  

  piVar2 = (int *)FUN_005df0f5(0xc);

  if (piVar2 == (int *)0x0) {

    piVar2 = (int *)0x0;

  }

  else {

    iVar1 = *param_1;

    *piVar2 = iVar1;

    InterlockedIncrement((LONG *)(iVar1 + -0x10));

    piVar2[1] = 0;

    piVar2[2] = *param_2;

  }

  FUN_0065ed80(local_c,piVar2);

  if (local_4 == 0) {

    FUN_0065f710(piVar2);

    return 1;

  }

  if (piVar2 != (int *)0x0) {

    puVar4 = (undefined4 *)(*piVar2 + -0x14);

    LVar3 = InterlockedDecrement((LONG *)(*piVar2 + -0x10));

    if ((LVar3 == 0) && (puVar4 != (undefined4 *)0x0)) {

      (**(code **)*puVar4)(1);

    }

    operator_delete(piVar2);

  }

  return 0;

}





