if col
isn't an array of 64-bit types, your shifts are causing undefined behaviour. Cast before shifting:
(__int64)col[7] << 56
It's also undefined behaviour if the shift would cause a sign change, so be careful for that when using signed types (like you are).
From C11 6.5.7 Bitwise shift operators (emphasis mine):
The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.
The result of
E1 << E2
isE1
left-shiftedE2
bit positions; vacated bits are filled with zeros. ... IfE1
has a signed type and nonnegative value, andE1
× 2E2 is representable in the result type, then that is the resulting value; otherwise, the behavior is undefined.