Tim's ISAAC module.
[ccan] / ccan / isaac / test / run.c
1 #include "isaac/isaac.h"
2 #include "isaac/isaac64.h"
3 #include "tap/tap.h"
4 #include <stddef.h>
5
6 static const uint32_t STATEVEC[ISAAC_SZ<<1]={
7   0xF650E4C8, 0xE448E96D, 0x98DB2FB4, 0xF5FAD54F,
8   0x433F1AFB, 0xEDEC154A, 0xD8370487, 0x46CA4F9A,
9   0x5DE3743E, 0x88381097, 0xF1D444EB, 0x823CEDB6,
10   0x6A83E1E0, 0x4A5F6355, 0xC7442433, 0x25890E2E,
11   0x7452E319, 0x57161DF6, 0x38A824F3, 0x002ED713,
12   0x29F55449, 0x51C08D83, 0xD78CB99E, 0xA0CC74F3,
13   0x8F651659, 0xCBC8B7C2, 0xF5F71C69, 0x12AD6419,
14   0xE5792E1B, 0x860536B8, 0x09B3CE98, 0xD45D6D81,
15   0xF3B26129, 0x17E38F85, 0x29CF72CE, 0x349947B0,
16   0xC998F9FF, 0xB5E13DAE, 0x32AE2A2B, 0xF7CF814C,
17   0x8EBFA303, 0xCF22E064, 0x0B923200, 0xECA4D58A,
18   0xEF53CEC4, 0xD0F7B37D, 0x9C411A2A, 0xFFDF8A80,
19   0xB40E27BC, 0xB4D2F976, 0x44B89B08, 0xF37C71D5,
20   0x1A70E7E9, 0x0BDB9C30, 0x60DC5207, 0xB3C3F24B,
21   0xD7386806, 0x229749B5, 0x4E232CD0, 0x91DABC65,
22   0xA70E1101, 0x8B87437E, 0x5781414F, 0xCDBC62E2,
23   0x8107C9FF, 0x69D2E4AE, 0x3B18E752, 0xB143B688,
24   0x6F4E0772, 0x95138769, 0x943C3C74, 0xAFC17A97,
25   0x0FD43963, 0x6A529B0B, 0xD8C58A6A, 0xA8BCC22D,
26   0x2DB35DFE, 0xA7A2F402, 0x6CB167DB, 0x538E1F4E,
27   0x7275E277, 0x1D3B8E97, 0xECC5DC91, 0x15E3A5B9,
28   0x03696614, 0x30AB93EC, 0xAC9FE69D, 0x7BC76811,
29   0x60EDA8DA, 0x28833522, 0xD5295EBC, 0x5ADB60E7,
30   0xF7E1CDD0, 0x97166D14, 0xB67EC13A, 0x210F3925,
31   0x64AF0FEF, 0x0D028684, 0x3AEA3DEC, 0xB058BAFB,
32   0xB8B0CCFC, 0xF2B5CC05, 0xE3A662D9, 0x814BC24C,
33   0x2364A1AA, 0x37C0ED05, 0x2B36505C, 0x451E7EC8,
34   0x5D2A542F, 0xE43D0FBB, 0x91C8D925, 0x60D4D5F8,
35   0x12A0594B, 0x9E8A51DA, 0xCD49EBDB, 0x1B0DCDC1,
36   0xCD57C7F7, 0xE6344451, 0x7DED386F, 0x2F36FA86,
37   0xA6D12101, 0x33BC405D, 0xB388D96C, 0xDB6DBE96,
38   0xFE29661C, 0x13EDC0CB, 0xCB0EEE4A, 0x70CC94AE,
39   0xDE11ED34, 0x0606CF9F, 0x3A6CE389, 0x23D74F4E,
40   0xA37F63FF, 0x917BDEC2, 0xD73F72D4, 0x0E7E0E67,
41   0x3D77D9A2, 0x13ADD922, 0x8891B3DB, 0x01A9BD70,
42   0x56A001E3, 0xD51F093D, 0xCC033CE3, 0x5AD0D3B0,
43   0x34105A8C, 0x6A123F57, 0xBD2E5024, 0x7364944B,
44   0xE89B1A3B, 0x21835C4D, 0x9F39E2D9, 0xD405DED8,
45   0x294D37E5, 0xBCCAAEED, 0x35A124B5, 0x6708A2BC,
46   0xB00960BA, 0x2A98121A, 0x4D8FAE82, 0x0BB3263F,
47   0x12595A19, 0x6A107589, 0x0809E494, 0x21C171EC,
48   0x884D6825, 0x14C8009B, 0xB0B84E7B, 0x03FB88F4,
49   0x28E7CB78, 0x9388B13B, 0xDD2DC1D5, 0x848F520A,
50   0x07C28CD1, 0x68A39358, 0x72C9137D, 0x127DD430,
51   0xC613F157, 0x8C2F0D55, 0xF7D3F39F, 0x309BFB78,
52   0x8406B137, 0x46C0A6F5, 0x3718D597, 0x08607F04,
53   0x76904B6D, 0x04DB4E13, 0xCD7411A7, 0xB510CE0E,
54   0xBFC7F7CC, 0xB83F957A, 0xFDFEF62D, 0xC35E4580,
55   0x3FF1E524, 0x4112D96C, 0x02C9B944, 0xD5990DFB,
56   0xE7E26581, 0x0D9C7E7E, 0x826DFA89, 0x66F1E0AB,
57   0x30BCC764, 0xEADEBEAC, 0xED35E5EE, 0x0C571A7D,
58   0xE4F3A26A, 0xF7F58F7B, 0xADF6BC23, 0x5D023E65,
59   0x1ED3FF4E, 0xEC46B0B6, 0xD2A93B51, 0xE75B41C9,
60   0x7E315AEB, 0x61119A5A, 0x53245B79, 0x33F6D7B1,
61   0xCAE8DEBA, 0x50FC8194, 0xAFA92A6D, 0xC87C8006,
62   0x4188BFCD, 0x8BACE62E, 0x78FFA568, 0x5597EC0F,
63   0xB4415F7D, 0x08294766, 0xAD567643, 0x09C36F90,
64   0x3DDE9F39, 0x4A0A283C, 0x18080C8E, 0x080C79EC,
65   0x79AE4C10, 0xCB9E1563, 0x7CDD662F, 0x62D31911,
66   0xA4CA0CF1, 0x5CF824CD, 0x3B708F99, 0x1E16614C,
67   0xB6B9D766, 0x5DE87ABB, 0x7229EA81, 0xD5B2D750,
68   0x56E6CD21, 0xFE1E42D5, 0x96DA2655, 0xC2B9AA36,
69   0xB8F6FD4A, 0x6A158D10, 0x01913FD3, 0xAF7D1FB8,
70   0x0B5E435F, 0x90C10757, 0x6554ABDA, 0x7A68710F,
71   0x82AC484F, 0xD7E1C7BE, 0x95C85EAA, 0x94A302F4,
72   0x4D3CFBDA, 0x786B2908, 0x1010B275, 0x82D53D12,
73   0x21E2A51C, 0x3D1E9150, 0xB059261D, 0xD0638E1A,
74   0x31860F05, 0x81F2864D, 0xFF4CFC35, 0x0451516D,
75   0xBD086F26, 0xBC5654C1, 0x65DFA427, 0xA82427F5,
76   0x582E3014, 0xB8D2486D, 0xC79A1749, 0x9A1D7745,
77   0x8766BB54, 0x1E04A7F7, 0x3D3DFF8A, 0xD5EC6BF4,
78   0xDBEF7D9F, 0x36EC0EA3, 0x1FEB2E4F, 0x15CFCC5C,
79   0xD8C423FB, 0xD0EF3CC9, 0xEB244925, 0xBA5590C8,
80   0xA5F48AC4, 0x33C5321C, 0x613B67B2, 0x479C3A22,
81   0xE21339CC, 0x10D210AA, 0x931DD7E2, 0xEF05EE06,
82   0xB82F2703, 0xA385CB2C, 0x5D67133C, 0x877EB7B4,
83   0x1E3437F7, 0x5AFB43AE, 0x53C078F3, 0x94D90481,
84   0x1D964589, 0x08063A85, 0xE1322228, 0x1956B1E5,
85   0x31860F13, 0x2E7B022F, 0x21182CA3, 0x96F703AC,
86   0x46819E2E, 0x0D28FE52, 0x3724D4DC, 0xA0EABE6B,
87   0xC66699FD, 0xC6112FDD, 0x19C1E69C, 0x04D3658A,
88   0x4B55DD99, 0x31907D62, 0xF854B522, 0x4D678F26,
89   0x22AE0582, 0xEAFED133, 0xE4A51D21, 0x84BD6DD6,
90   0xC1A51375, 0x3F28EE63, 0xFB737B1A, 0x70A1660E,
91   0x8A8DFAA3, 0x1BE79937, 0xF7476978, 0x513C1764,
92   0x531AC6BF, 0x12C06908, 0x001CDB95, 0x1A4B6A53,
93   0xD067FCE5, 0x12B2CFB6, 0x9DDB477F, 0x740E0066,
94   0x39DDF25A, 0xCC8BFA2D, 0xF1B20EAF, 0x64F2632C,
95   0x9783CDEE, 0x63BFD4D8, 0x0084CFE5, 0x75F4E9E2,
96   0x19B48FD0, 0x6C48DDD8, 0x7A36AF93, 0x71865C4C,
97   0x9CE0199D, 0x867027D7, 0x2CB7B77F, 0x84EF01DA,
98   0x72F5972F, 0x040F7074, 0xDF9AFA29, 0xC921F94E,
99   0x75C08A36, 0x18C1EF9A, 0xD649A428, 0xC5B71937,
100   0x8A30738A, 0xD97CD348, 0x858129A6, 0x239E3B0A,
101   0xBBB8ABC4, 0x80FAC4C2, 0xECFCF20B, 0xD9D711F9,
102   0xE2A4EF71, 0xB5FE87C0, 0xBE8B06B2, 0xAAFEF5A7,
103   0x9C15DB3B, 0x0AEB8165, 0x4389A84A, 0x253B1D7A,
104   0x19047C79, 0x7CDC78A2, 0xD20ADF03, 0x56F55A71,
105   0x3E730FA8, 0xFD8650D8, 0x959E234E, 0xB7546681,
106   0xDAD1B22A, 0x142A6E85, 0x8EF4BCE6, 0x68235B9D,
107   0x85A13F85, 0x74096AE7, 0xA949BEA2, 0x29322D0D,
108   0xD5683858, 0x82846526, 0x403DAE08, 0x6DD1943A,
109   0xE1279BFF, 0x9E7E4F04, 0x1C3A4524, 0x484525E4,
110   0x81D4CC5F, 0xE24124C0, 0x037464C0, 0xBF1BD691,
111   0x26CEB003, 0x275EAD3A, 0xC5BDE908, 0x26414FF3,
112   0xA30519AD, 0xD7B43ABE, 0x2CE5D3D5, 0x88412761,
113   0x97CA2070, 0xE5FBB9C7, 0x276DF0B4, 0x308F751F,
114   0x37A97DF6, 0xC9CD808C, 0xFE4CB380, 0x3D469303,
115   0xAEE19096, 0xC0D5D42A, 0x4E823AD3, 0xF5F9CC3B,
116   0x4286619C, 0x9CA45E1C, 0x66C97340, 0x891AEC49,
117   0x45BAE606, 0xC798F047, 0x52649D6C, 0xCE86FDFC,
118   0x80C6E402, 0xD6EC2F2B, 0x27C82282, 0x1FE26CE0,
119   0x92F57EA7, 0xDE462F4D, 0x07497CAE, 0x5A48755C,
120   0x721502DD, 0x6CBE7935, 0x836D8003, 0x9EAD7F70,
121   0x9AB3A42F, 0x4C8652D6, 0x32E39273, 0xE8FA3860,
122   0x1DA4F25A, 0x0CD6EF81, 0x02503F7D, 0x8854A0A1,
123   0x9A30C4E8, 0x88157153, 0x05EFE294, 0x57C4C925,
124   0x2887D96F, 0xC1A71E3C, 0xE9F84163, 0x2D0985DE,
125   0xD21E796C, 0x6FB5CE56, 0x02614ABF, 0xC3C7BE2C,
126   0xB54FED6F, 0xA617A083, 0xC3142D8F, 0x6079E4CE,
127   0xCEFFC147, 0x1D0CB81B, 0xDC153E5F, 0xE36EF5BB,
128   0xD531161A, 0x165B1015, 0x7AA114ED, 0x3F7579B3,
129   0xF7F395F1, 0xBC6172C7, 0xA86F875E, 0x0E6C51B3,
130   0xCDFEC2AF, 0x73C0E762, 0x824C2009, 0xC5A87748,
131   0x94D40125, 0x8ABA3FFB, 0xD32BE060, 0x8C17EFF0,
132   0x21E2547E, 0x07CFFAD9, 0x05340E15, 0xF3310C92,
133   0x9D8D1908, 0x86BA527F, 0xF943F672, 0xEF73FBF0,
134   0x46D95CA5, 0xC54CD95B, 0x9D855E89, 0x4BB5AF29
135 };
136
137 static const uint64_t STATEVEC64[ISAAC64_SZ<<1]={
138   0x12A8F216AF9418C2ULL, 0xD4490AD526F14431ULL,
139   0xB49C3B3995091A36ULL, 0x5B45E522E4B1B4EFULL,
140   0xA1E9300CD8520548ULL, 0x49787FEF17AF9924ULL,
141   0x03219A39EE587A30ULL, 0xEBE9EA2ADF4321C7ULL,
142   0x804456AF10F5FB53ULL, 0xD74BBE77E6116AC7ULL,
143   0x7C0828DD624EC390ULL, 0x14A195640116F336ULL,
144   0x2EAB8CA63CE802D7ULL, 0xC6E57A78FBD986E0ULL,
145   0x58EFC10B06A2068DULL, 0xABEEDDB2DDE06FF1ULL,
146   0x0B090A7560A968E3ULL, 0x2CF9C8CA052F6E9FULL,
147   0x116D0016CB948F09ULL, 0xA59E0BD101731A28ULL,
148   0x63767572AE3D6174ULL, 0xAB4F6451CC1D45ECULL,
149   0xC2A1E7B5B459AEB5ULL, 0x2472F6207C2D0484ULL,
150   0xE699ED85B0DFB40DULL, 0xD4347F66EC8941C3ULL,
151   0xF4D14597E660F855ULL, 0x8B889D624D44885DULL,
152   0x258E5A80C7204C4BULL, 0xAF0C317D32ADAA8AULL,
153   0x9C4CD6257C5A3603ULL, 0xEB3593803173E0CEULL,
154   0x36F60E2BA4FA6800ULL, 0x38B6525C21A42B0EULL,
155   0xF4F5D05C10CAB243ULL, 0xCF3F4688801EB9AAULL,
156   0x1DDC0325259B27DEULL, 0xB9571FA04DC089C8ULL,
157   0xD7504DFA8816EDBBULL, 0x1FE2CCA76517DB90ULL,
158   0x261E4E4C0A333A9DULL, 0x219B97E26FFC81BDULL,
159   0x66B4835D9EAFEA22ULL, 0x4CC317FB9CDDD023ULL,
160   0x50B704CAB602C329ULL, 0xEDB454E7BADC0805ULL,
161   0x9E17E49642A3E4C1ULL, 0x66C1A2A1A60CD889ULL,
162   0x7983EED3740847D5ULL, 0x298AF231C85BAFABULL,
163   0x2680B122BAA28D97ULL, 0x734DE8181F6EC39AULL,
164   0x53898E4C3910DA55ULL, 0x1761F93A44D5AEFEULL,
165   0xE4DBF0634473F5D2ULL, 0x4ED0FE7E9DC91335ULL,
166   0xD18D8549D140CAEAULL, 0x1CFC8BED0D681639ULL,
167   0xCA1E3785A9E724E5ULL, 0xB67C1FA481680AF8ULL,
168   0xDFEA21EA9E7557E3ULL, 0xD6B6D0ECC617C699ULL,
169   0xFA7E393983325753ULL, 0xA09E8C8C35AB96DEULL,
170   0x8FE88B57305E2AB6ULL, 0x89039D79D6FC5C5CULL,
171   0x9BFB227EBDF4C5CEULL, 0x7F7CC39420A3A545ULL,
172   0x3F6C6AF859D80055ULL, 0xC8763C5B08D1908CULL,
173   0x469356C504EC9F9DULL, 0x26E6DB8FFDF5ADFEULL,
174   0x3A938FEE32D29981ULL, 0x2C5E9DEB57EF4743ULL,
175   0x1E99B96E70A9BE8BULL, 0x764DBEAE7FA4F3A6ULL,
176   0xAAC40A2703D9BEA0ULL, 0x1A8C1E992B941148ULL,
177   0x73AA8A564FB7AC9EULL, 0x604D51B25FBF70E2ULL,
178   0xDD69A0D8AB3B546DULL, 0x65CA5B96B7552210ULL,
179   0x2FD7E4B9E72CD38CULL, 0x51D2B1AB2DDFB636ULL,
180   0x9D1D84FCCE371425ULL, 0xA44CFE79AE538BBEULL,
181   0xDE68A2355B93CAE6ULL, 0x9FC10D0F989993E0ULL,
182   0x94EBC8ABCFB56DAEULL, 0xD7A023A73260B45CULL,
183   0x72C8834A5957B511ULL, 0x8F8419A348F296BFULL,
184   0x1E152328F3318DEAULL, 0x4838D65F6EF6748FULL,
185   0xD6BF7BAEE43CAC40ULL, 0x13328503DF48229FULL,
186   0x7440FB816508C4FEULL, 0x9D266D6A1CC0542CULL,
187   0x4DDA48153C94938AULL, 0x74C04BF1790C0EFEULL,
188   0xE1925C71285279F5ULL, 0x8A8E849EB32781A5ULL,
189   0x073973751F12DD5EULL, 0xA319CE15B0B4DB31ULL,
190   0x6DD856D94D259236ULL, 0x67378D8ECCEF96CBULL,
191   0x9FC477DE4ED681DAULL, 0xF3B8B6675A6507FFULL,
192   0xC3A9DC228CAAC9E9ULL, 0xC37B45B3F8D6F2BAULL,
193   0xB559EB1D04E5E932ULL, 0x1B0CAB936E65C744ULL,
194   0xAF08DA9177DDA93DULL, 0xAC12FB171817EEE7ULL,
195   0x1FFF7AC80904BF45ULL, 0xA9119B60369FFEBDULL,
196   0xBFCED1B0048EAC50ULL, 0xB67B7896167B4C84ULL,
197   0x9B3CDB65F82CA382ULL, 0xDBC27AB5447822BFULL,
198   0x10DCD78E3851A492ULL, 0xB438C2B67F98E5E9ULL,
199   0x43954B3252DC25E5ULL, 0xAB9090168DD05F34ULL,
200   0xCE68341F79893389ULL, 0x36833336D068F707ULL,
201   0xDCDD7D20903D0C25ULL, 0xDA3A361B1C5157B1ULL,
202   0x7F9D1A2E1EBE1327ULL, 0x5D0A12F27AD310D1ULL,
203   0x3BC36E078F7515D7ULL, 0x4DA8979A0041E8A9ULL,
204   0x950113646D1D6E03ULL, 0x7B4A38E32537DF62ULL,
205   0x8A1B083821F40CB4ULL, 0x3D5774A11D31AB39ULL,
206   0x7A76956C3EAFB413ULL, 0x7F5126DBBA5E0CA7ULL,
207   0x12153635B2C0CF57ULL, 0x7B3F0195FC6F290FULL,
208   0x5544F7D774B14AEFULL, 0x56C074A581EA17FEULL,
209   0xE7F28ECD2D49EECDULL, 0xE479EE5B9930578CULL,
210   0x9FF38FED72E9052FULL, 0x9F65789A6509A440ULL,
211   0x0981DCD296A8736DULL, 0x5873888850659AE7ULL,
212   0xC678B6D860284A1CULL, 0x63E22C147B9C3403ULL,
213   0x92FAE24291F2B3F1ULL, 0x829626E3892D95D7ULL,
214   0xCFFE1939438E9B24ULL, 0x79999CDFF70902CBULL,
215   0x8547EDDFB81CCB94ULL, 0x7B77497B32503B12ULL,
216   0x97FCAACBF030BC24ULL, 0x6CED1983376FA72BULL,
217   0x7E75D99D94A70F4DULL, 0xD2733C4335C6A72FULL,
218   0xDBC0D2B6AB90A559ULL, 0x94628D38D0C20584ULL,
219   0x64972D68DEE33360ULL, 0xB9C11D5B1E43A07EULL,
220   0x2DE0966DAF2F8B1CULL, 0x2E18BC1AD9704A68ULL,
221   0xD4DBA84729AF48ADULL, 0xB7A0B174CFF6F36EULL,
222   0xE94C39A54A98307FULL, 0xAA70B5B4F89695A2ULL,
223   0x3BDBB92C43B17F26ULL, 0xCCCB7005C6B9C28DULL,
224   0x18A6A990C8B35EBDULL, 0xFC7C95D827357AFAULL,
225   0x1FCA8A92FD719F85ULL, 0x1DD01AAFCD53486AULL,
226   0x49353FEA39BA63B1ULL, 0xF85B2B4FBCDE44B7ULL,
227   0xBE7444E39328A0ACULL, 0x3E2B8BCBF016D66DULL,
228   0x964E915CD5E2B207ULL, 0x1725CABFCB045B00ULL,
229   0x7FBF21EC8A1F45ECULL, 0x11317BA87905E790ULL,
230   0x2FE4B17170E59750ULL, 0xE8D9ECBE2CF3D73FULL,
231   0xB57D2E985E1419C7ULL, 0x0572B974F03CE0BBULL,
232   0xA8D7E4DAB780A08DULL, 0x4715ED43E8A45C0AULL,
233   0xC330DE426430F69DULL, 0x23B70EDB1955C4BFULL,
234   0x098954D51FFF6580ULL, 0x8107FCCF064FCF56ULL,
235   0x852F54934DA55CC9ULL, 0x09C7E552BC76492FULL,
236   0xE9F6760E32CD8021ULL, 0xA3BC941D0A5061CBULL,
237   0xBA89142E007503B8ULL, 0xDC842B7E2819E230ULL,
238   0xBBE83F4ECC2BDECBULL, 0xCD454F8F19C5126AULL,
239   0xC62C58F97DD949BFULL, 0x693501D628297551ULL,
240   0xB9AB4CE57F2D34F3ULL, 0x9255ABB50D532280ULL,
241   0xEBFAFA33D7254B59ULL, 0xE9F6082B05542E4EULL,
242   0x35DD37D5871448AFULL, 0xB03031A8B4516E84ULL,
243   0xB3F256D8ACA0B0B9ULL, 0x0FD22063EDC29FCAULL,
244   0xD9A11FBB3D9808E4ULL, 0x3A9BF55BA91F81CAULL,
245   0xC8C93882F9475F5FULL, 0x947AE053EE56E63CULL,
246   0xC7D9F16864A76E94ULL, 0x7BD94E1D8E17DEBCULL,
247   0xD873DB391292ED4FULL, 0x30F5611484119414ULL,
248   0x565C31F7DE89EA27ULL, 0xD0E4366228B03343ULL,
249   0x325928EE6E6F8794ULL, 0x6F423357E7C6A9F9ULL,
250   0x99170A5DC3115544ULL, 0x59B97885E2F2EA28ULL,
251   0xBC4097B116C524D2ULL, 0x7A13F18BBEDC4FF5ULL,
252   0x071582401C38434DULL, 0xB422061193D6F6A7ULL,
253   0xB4B81B3FA97511E2ULL, 0x65D34954DAF3CEBDULL,
254   0xB344C470397BBA52ULL, 0xBAC7A9A18531294BULL,
255   0xECB53939887E8175ULL, 0x565601C0364E3228ULL,
256   0xEF1955914B609F93ULL, 0x16F50EDF91E513AFULL,
257   0x56963B0DCA418FC0ULL, 0xD60F6DCEDC314222ULL,
258   0x364F6FFA464EE52EULL, 0x6C3B8E3E336139D3ULL,
259   0xF943AEE7FEBF21B8ULL, 0x088E049589C432E0ULL,
260   0xD49503536ABCA345ULL, 0x3A6C27934E31188AULL,
261   0x957BAF61700CFF4EULL, 0x37624AE5A48FA6E9ULL,
262   0x501F65EDB3034D07ULL, 0x907F30421D78C5DEULL,
263   0x1A804AADB9CFA741ULL, 0x0CE2A38C344A6EEDULL,
264   0xD363EFF5F0977996ULL, 0x2CD16E2ABD791E33ULL,
265   0x58627E1A149BBA21ULL, 0x7F9B6AF1EBF78BAFULL,
266   0xD20D8C88C8FFE65FULL, 0x917F1DD5F8886C61ULL,
267   0x56986E2EF3ED091BULL, 0x5FA7867CAF35E149ULL,
268   0x81A1549FD6573DA5ULL, 0x96FBF83A12884624ULL,
269   0xE728E8C83C334074ULL, 0xF1BCC3D275AFE51AULL,
270   0x71F1CE2490D20B07ULL, 0xE6C42178C4BBB92EULL,
271   0x0A9C32D5EAE45305ULL, 0x0C335248857FA9E7ULL,
272   0x142DE49FFF7A7C3DULL, 0x64A53DC924FE7AC9ULL,
273   0x9F6A419D382595F4ULL, 0x150F361DAB9DEC26ULL,
274   0xC61BB3A141E50E8CULL, 0x2785338347F2BA08ULL,
275   0x7CA9723FBB2E8988ULL, 0xCE2F8642CA0712DCULL,
276   0x59300222B4561E00ULL, 0xC2B5A03F71471A6FULL,
277   0xD5F9E858292504D5ULL, 0x65FA4F227A2B6D79ULL,
278   0x93CBE0B699C2585DULL, 0x1D95B0A5FCF90BC6ULL,
279   0x17EFEE45B0DEE640ULL, 0x9E4C1269BAA4BF37ULL,
280   0xD79476A84EE20D06ULL, 0x0A56A5F0BFE39272ULL,
281   0x7EBA726D8C94094BULL, 0x5E5637885F29BC2BULL,
282   0xD586BD01C5C217F6ULL, 0x233003B5A6CFE6ADULL,
283   0x24C0E332B70019B0ULL, 0x9DA058C67844F20CULL,
284   0xE4D9429322CD065AULL, 0x1FAB64EA29A2DDF7ULL,
285   0x8AF38731C02BA980ULL, 0x7DC7785B8EFDFC80ULL,
286   0x486289DDCC3D6780ULL, 0x222BBFAE61725606ULL,
287   0x2BC60A63A6F3B3F2ULL, 0x177E00F9FC32F791ULL,
288   0x522E23F3925E319EULL, 0x9C2ED44081CE5FBDULL,
289   0x964781CE734B3C84ULL, 0xF05D129681949A4CULL,
290   0x046E3ECAAF453CE9ULL, 0x962ACEEFA82E1C84ULL,
291   0xF5B4B0B0D2DEEEB4ULL, 0x1AF3DBE25D8F45DAULL,
292   0xF9F4892ED96BD438ULL, 0xC4C118BFE78FEAAEULL,
293   0x07A69AFDCC42261AULL, 0xF8549E1A3AA5E00DULL,
294   0x2102AE466EBB1148ULL, 0xE87FBB46217A360EULL,
295   0x310CB380DB6F7503ULL, 0xB5FDFC5D3132C498ULL,
296   0xDAF8E9829FE96B5FULL, 0xCAC09AFBDDD2CDB4ULL,
297   0xB862225B055B6960ULL, 0x55B6344CF97AAFAEULL,
298   0xFF577222C14F0A3AULL, 0x4E4B705B92903BA4ULL,
299   0x730499AF921549FFULL, 0x13AE978D09FE5557ULL,
300   0xD9E92AA246BF719EULL, 0x7A4C10EC2158C4A6ULL,
301   0x49CAD48CEBF4A71EULL, 0xCF05DAF5AC8D77B0ULL,
302   0xABBDCDD7ED5C0860ULL, 0x9853EAB63B5E0B35ULL,
303   0x352787BAA0D7C22FULL, 0xC7F6AA2DE59AEA61ULL,
304   0x03727073C2E134B1ULL, 0x5A0F544DD2B1FB18ULL,
305   0x74F85198B05A2E7DULL, 0x963EF2C96B33BE31ULL,
306   0x4659D2B743848A2CULL, 0x19EBB029435DCB0FULL,
307   0x4E9D2827355FC492ULL, 0xCCEC0A73B49C9921ULL,
308   0x46C9FEB55D120902ULL, 0x8D2636B81555A786ULL,
309   0x30C05B1BA332F41CULL, 0xF6F7FD1431714200ULL,
310   0x1A4FF12616EEFC89ULL, 0x990A98FD5071D263ULL,
311   0x84547DDC3E203C94ULL, 0x07A3AEC79624C7DAULL,
312   0x8A328A1CEDFE552CULL, 0xD1E649DE1E7F268BULL,
313   0x2D8D5432157064C8ULL, 0x4AE7D6A36EB5DBCBULL,
314   0x57E3306D881EDB4FULL, 0x0A804D18B7097475ULL,
315   0xE74733427B72F0C1ULL, 0x24B33C9D7ED25117ULL,
316   0xE805A1E290CF2456ULL, 0x3B544EBE544C19F9ULL,
317   0x3E666E6F69AE2C15ULL, 0xFB152FE3FF26DA89ULL,
318   0xB49B52E587A1EE60ULL, 0xAC042E70F8B383F2ULL,
319   0x89C350C893AE7DC1ULL, 0xB592BF39B0364963ULL,
320   0x190E714FADA5156EULL, 0xEC8177F83F900978ULL,
321   0x91B534F885818A06ULL, 0x81536D601170FC20ULL,
322   0xD4C718BC4AE8AE5FULL, 0x9EEDECA8E272B933ULL,
323   0x10E8B35AF3EEAB37ULL, 0x0E09B88E1914F7AFULL,
324   0x3FA9DDFB67E2F199ULL, 0xB10BB459132D0A26ULL,
325   0x2C046F22062DC67DULL, 0x5E90277E7CB39E2DULL,
326   0xD6B04D3B7651DD7EULL, 0xE34A1D250E7A8D6BULL,
327   0x53C065C6C8E63528ULL, 0x1BDEA12E35F6A8C9ULL,
328   0x21874B8B4D2DBC4FULL, 0x3A88A0FBBCB05C63ULL,
329   0x43ED7F5A0FAE657DULL, 0x230E343DFBA08D33ULL,
330   0xB5B4071DBFC73A66ULL, 0x8F9887E6078735A1ULL,
331   0x08DE8A1C7797DA9BULL, 0xFCB6BE43A9F2FE9BULL,
332   0x049A7F41061A9E60ULL, 0x9F91508BFFCFC14AULL,
333   0xE3273522064480CAULL, 0xCD04F3FF001A4778ULL,
334   0x6BFA9AAE5EC05779ULL, 0x371F77E76BB8417EULL,
335   0x3550C2321FD6109CULL, 0xFB4A3D794A9A80D2ULL,
336   0xF43C732873F24C13ULL, 0xAA9119FF184CCCF4ULL,
337   0xB69E38A8965C6B65ULL, 0x1F2B1D1F15F6DC9CULL,
338   0x67FEF95D92607890ULL, 0x31865CED6120F37DULL,
339   0x3A6853C7E70757A7ULL, 0x32AB0EDB696703D3ULL,
340   0xEE97F453F06791EDULL, 0x6DC93D9526A50E68ULL,
341   0x78EDEFD694AF1EEDULL, 0x9C1169FA2777B874ULL,
342   0x50065E535A213CF6ULL, 0xDE0C89A556B9AE70ULL,
343   0xD1E0CCD25BB9C169ULL, 0x6B17B224BAD6BF27ULL,
344   0x6B02E63195AD0CF8ULL, 0x455A4B4CFE30E3F5ULL,
345   0x9338E69C052B8E7BULL, 0x5092EF950A16DA0BULL,
346   0x7C45D833AFF07862ULL, 0xA5B1CFDBA0AB4067ULL,
347   0x6AD047C430A12104ULL, 0x6C47BEC883A7DE39ULL,
348   0x944F6DE09134DFB6ULL, 0x9AEBA33AC6ECC6B0ULL,
349   0x52E762596BF68235ULL, 0x22AF003AB672E811ULL,
350   0xB5635C95FF7296E2ULL, 0xED2DF21216235097ULL,
351   0x4A29C6465A314CD1ULL, 0xD83CC2687A19255FULL,
352   0x506C11B9D90E8B1DULL, 0x57277707199B8175ULL,
353   0xCAF21ECD4377B28CULL, 0xC0C0F5A60EF4CDCFULL,
354   0x93B633ABFA3469F8ULL, 0xE846963877671A17ULL,
355   0x59AC2C7873F910A3ULL, 0x660D3257380841EEULL,
356   0xD813F2FAB7F5C5CAULL, 0x4112CF68649A260EULL,
357   0x443F64EC5A371195ULL, 0xB0774D261CC609DBULL,
358   0x720BF5F26F4D2EAAULL, 0x1C2559E30F0946BEULL,
359   0xE328E230E3E2B3FBULL, 0x087E79E5A57D1D13ULL,
360   0x08DD9BDFD96B9F63ULL, 0x64D0E29EEA8838B3ULL,
361   0xDDF957BC36D8B9CAULL, 0x6FFE73E81B637FB3ULL,
362   0x1A4E4822EB4D7A59ULL, 0x5D94337FBFAF7F5BULL,
363   0xD30C088BA61EA5EFULL, 0x9D765E419FB69F6DULL,
364   0x9E21F4F903B33FD9ULL, 0xB4D8F77BC3E56167ULL,
365   0x733EA705FAE4FA77ULL, 0xA4EC0132764CA04BULL,
366   0x7976033A39F7D952ULL, 0x106F72FE81E2C590ULL,
367   0x8C90FD9B083F4558ULL, 0xFD080D236DA814BAULL,
368   0x7B64978555326F9FULL, 0x60E8ED72C0DFF5D1ULL,
369   0xB063E962E045F54DULL, 0x959F587D507A8359ULL,
370   0x758F450C88572E0BULL, 0x1B6BACA2AE4E125BULL,
371   0x61CF4F94C97DF93DULL, 0x2738259634305C14ULL,
372   0xD39BB9C3A48DB6CFULL, 0x8215E577001332C8ULL,
373   0xA1082C0466DF6C0AULL, 0xEF02CDD06FFDB432ULL,
374   0xFC87614BAF287E07ULL, 0x240AB57A8B888B20ULL,
375   0xBF8D5108E27E0D48ULL, 0x61BDD1307C66E300ULL,
376   0xB925A6CD0421AFF3ULL, 0x3E003E616A6591E9ULL,
377   0x94C3251F06F90CF3ULL, 0xBF84470805E69B5FULL,
378   0x98F076A4F7A2322EULL, 0x70CB6AF7C2D5BCF0ULL,
379   0xB64BE8D8B25396C1ULL, 0xA9AA4D20DB084E9BULL,
380   0x2E6D02C36017F67FULL, 0xEFED53D75FD64E6BULL,
381   0xD9F1F30CCD97FB09ULL, 0xA2EBEE47E2FBFCE1ULL,
382   0xB8D91274B9E9D4FBULL, 0x1DB956E450275779ULL,
383   0x4FC8E9560F91B123ULL, 0x63573FF03E224774ULL,
384   0x0647DFEDCD894A29ULL, 0x7884D9BC6CB569D8ULL,
385   0x7FBA195410E5CA30ULL, 0x106C09B972D2E822ULL,
386   0x241260ED4AD1E87DULL, 0x64C8E531BFF53B55ULL,
387   0xCA672B91E9E4FA16ULL, 0x3871700761B3F743ULL,
388   0xF95CFFA23AF5F6F4ULL, 0x8D14DEDB30BE846EULL,
389   0x3B097ADAF088F94EULL, 0x21E0BD5026C619BFULL,
390   0x1BDA0492E7E4586EULL, 0xD23C8E176D113600ULL,
391   0x252F59CF0D9F04BBULL, 0xB3598080CE64A656ULL,
392   0x993E1DE72D36D310ULL, 0xA2853B80F17F58EEULL,
393   0x1877B51E57A764D5ULL, 0x001F837CC7350524ULL
394 };
395
396 int main(int _argc,const char *_argv[]){
397   isaac_ctx   isaac;
398   isaac64_ctx isaac64;
399   int         i;
400   int         j;
401   /*This is how many tests you plan to run.*/
402   plan_tests(4);
403   isaac_init(&isaac,NULL,0);
404   for(j=0;j<ISAAC_SZ;j++)isaac_next_uint32(&isaac);
405   for(i=0;i<2;i++){
406     int nmatches;
407     nmatches=0;
408     for(j=0;j<ISAAC_SZ;j++){
409       nmatches+=isaac_next_uint32(&isaac)==STATEVEC[(i+1)*ISAAC_SZ-j-1];
410     }
411     ok1(nmatches==ISAAC_SZ);
412   }
413   isaac64_init(&isaac64,NULL,0);
414   for(j=0;j<ISAAC64_SZ;j++)isaac64_next_uint64(&isaac64);
415   for(i=0;i<2;i++){
416     int nmatches;
417     nmatches=0;
418     for(j=0;j<ISAAC64_SZ;j++){
419       nmatches+=isaac64_next_uint64(&isaac64)==STATEVEC64[(i+1)*ISAAC64_SZ-j-1];
420     }
421     ok1(nmatches==ISAAC64_SZ);
422   }
423   /*TODO: We should test the random float/double routines, but they are not
424      guaranteed to return the same values on all platforms, because the number
425      of bits in the mantissa may be different.
426     Perhaps some simple statistical tests would suffice.*/
427   return exit_status();
428 }