void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)

{

#if defined(__x86_64__)

    __asm__ ("imul %0\n\t"

             : "=d" (*phigh), "=a" (*plow)

             : "a" (a), "0" (b)

             );

#else

    int64_t ph;

    uint64_t pm1, pm2, pl;



    pl = (uint64_t)((uint32_t)a) * (uint64_t)((uint32_t)b);

    pm1 = (a >> 32) * (uint32_t)b;

    pm2 = (uint32_t)a * (b >> 32);

    ph = (a >> 32) * (b >> 32);



    ph += (int64_t)pm1 >> 32;

    pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);



    *phigh = ph + ((int64_t)pm1 >> 32);

    *plow = (pm1 << 32) + (uint32_t)pl;

#endif

}

void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)

{

#if defined(__x86_64__)

    __asm__ ("imul %0\n\t"

             : "=d" (*phigh), "=a" (*plow)

             : "a" (a), "0" (b)

             );

#else

    int64_t ph;

    uint64_t pm1, pm2, pl;



    pl = (uint64_t)((uint32_t)a) * (uint64_t)((uint32_t)b);

    pm1 = (a >> 32) * (uint32_t)b;

    pm2 = (uint32_t)a * (b >> 32);

    ph = (a >> 32) * (b >> 32);



    ph += (int64_t)pm1 >> 32;

    pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);



    *phigh = ph + ((int64_t)pm1 >> 32);

    *plow = (pm1 << 32) + (uint32_t)pl;

#endif

}

    pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);     pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);
void FUNC_0(int64_t *VAR_0, int64_t *VAR_1, int64_t VAR_2, int64_t VAR_3)

{

#if defined(__x86_64__)

    __asm__ ("imul %0\n\t"

             : "=d" (*VAR_0), "=VAR_2" (*VAR_1)

             : "VAR_2" (VAR_2), "0" (VAR_3)

             );

#else

    int64_t ph;

    uint64_t pm1, pm2, pl;



    pl = (uint64_t)((uint32_t)VAR_2) * (uint64_t)((uint32_t)VAR_3);

    pm1 = (VAR_2 >> 32) * (uint32_t)VAR_3;

    pm2 = (uint32_t)VAR_2 * (VAR_3 >> 32);

    ph = (VAR_2 >> 32) * (VAR_3 >> 32);



    ph += (int64_t)pm1 >> 32;

    pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);



    *VAR_0 = ph + ((int64_t)pm1 >> 32);

    *VAR_1 = (pm1 << 32) + (uint32_t)pl;

#endif

}

void FUNC_0(int64_t *VAR_0, int64_t *VAR_1, int64_t VAR_2, int64_t VAR_3)
{ #if defined(__x86_64__)
__asm__ ("imul %0\n\t"
: "=d" (*VAR_0), "=VAR_2" (*VAR_1)
: "VAR_2" (VAR_2), "0" (VAR_3)
); #else
int64_t ph; uint64_t pm1, pm2, pl; pl = (uint64_t)((uint32_t)VAR_2) * (uint64_t)((uint32_t)VAR_3); pm1 = (VAR_2 >> 32) * (uint32_t)VAR_3; pm2 = (uint32_t)VAR_2 * (VAR_3 >> 32); ph = (VAR_2 >> 32) * (VAR_3 >> 32); ph += (int64_t)pm1 >> 32; pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32); *VAR_0 = ph + ((int64_t)pm1 >> 32); *VAR_1 = (pm1 << 32) + (uint32_t)pl; #endif
}