1extern int __VERIFIER_nondet_int(void);
2
3
4
5#line 2 "libacc.c"
6struct JoinPoint {
7 void **(*fp)(struct JoinPoint * ) ;
8 void **args ;
9 int argsCount ;
10 char const **argsType ;
11 void *(*arg)(int , struct JoinPoint * ) ;
12 char const *(*argType)(int , struct JoinPoint * ) ;
13 void **retValue ;
14 char const *retType ;
15 char const *funcName ;
16 char const *targetName ;
17 char const *fileName ;
18 char const *kind ;
19 void *excep_return ;
20};
21#line 18 "libacc.c"
22struct __UTAC__CFLOW_FUNC {
23 int (*func)(int , int ) ;
24 int val ;
25 struct __UTAC__CFLOW_FUNC *next ;
26};
27#line 18 "libacc.c"
28struct __UTAC__EXCEPTION {
29 void *jumpbuf ;
30 unsigned long long prtValue ;
31 int pops ;
32 struct __UTAC__CFLOW_FUNC *cflowfuncs ;
33};
34#line 211 "/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h"
35typedef unsigned long size_t;
36#line 76 "libacc.c"
37struct __ACC__ERR {
38 void *v ;
39 struct __ACC__ERR *next ;
40};
41#line 1 "featureselect.o"
42#pragma merger(0,"featureselect.i","")
43#line 8 "featureselect.h"
44int __SELECTED_FEATURE_Base ;
45#line 11 "featureselect.h"
46int __SELECTED_FEATURE_Keys ;
47#line 14 "featureselect.h"
48int __SELECTED_FEATURE_Encrypt ;
49#line 17 "featureselect.h"
50int __SELECTED_FEATURE_AutoResponder ;
51#line 20 "featureselect.h"
52int __SELECTED_FEATURE_AddressBook ;
53#line 23 "featureselect.h"
54int __SELECTED_FEATURE_Sign ;
55#line 26 "featureselect.h"
56int __SELECTED_FEATURE_Forward ;
57#line 29 "featureselect.h"
58int __SELECTED_FEATURE_Verify ;
59#line 32 "featureselect.h"
60int __SELECTED_FEATURE_Decrypt ;
61#line 35 "featureselect.h"
62int __GUIDSL_ROOT_PRODUCTION ;
63#line 37 "featureselect.h"
64int __GUIDSL_NON_TERMINAL_main ;
65#line 41
66int select_one(void) ;
67#line 43
68void select_features(void) ;
69#line 45
70void select_helpers(void) ;
71#line 47
72int valid_product(void) ;
73#line 8 "featureselect.c"
74int select_one(void)
75{ int retValue_acc ;
76 int choice = __VERIFIER_nondet_int();
77
78 {
79#line 84 "featureselect.c"
80 retValue_acc = choice;
81#line 86
82 return (retValue_acc);
83#line 93
84 return (retValue_acc);
85}
86}
87#line 14 "featureselect.c"
88void select_features(void)
89{
90
91 {
92#line 115 "featureselect.c"
93 return;
94}
95}
96#line 20 "featureselect.c"
97void select_helpers(void)
98{
99
100 {
101#line 133 "featureselect.c"
102 return;
103}
104}
105#line 25 "featureselect.c"
106int valid_product(void)
107{ int retValue_acc ;
108
109 {
110#line 151 "featureselect.c"
111 retValue_acc = 1;
112#line 153
113 return (retValue_acc);
114#line 160
115 return (retValue_acc);
116}
117}
118#line 1 "ClientLib.o"
119#pragma merger(0,"ClientLib.i","")
120#line 4 "ClientLib.h"
121int initClient(void) ;
122#line 6
123char *getClientName(int handle ) ;
124#line 8
125void setClientName(int handle , char *value ) ;
126#line 10
127int getClientOutbuffer(int handle ) ;
128#line 12
129void setClientOutbuffer(int handle , int value ) ;
130#line 14
131int getClientAddressBookSize(int handle ) ;
132#line 16
133void setClientAddressBookSize(int handle , int value ) ;
134#line 18
135int createClientAddressBookEntry(int handle ) ;
136#line 20
137int getClientAddressBookAlias(int handle , int index ) ;
138#line 22
139void setClientAddressBookAlias(int handle , int index , int value ) ;
140#line 24
141int getClientAddressBookAddress(int handle , int index ) ;
142#line 26
143void setClientAddressBookAddress(int handle , int index , int value ) ;
144#line 29
145int getClientAutoResponse(int handle ) ;
146#line 31
147void setClientAutoResponse(int handle , int value ) ;
148#line 33
149int getClientPrivateKey(int handle ) ;
150#line 35
151void setClientPrivateKey(int handle , int value ) ;
152#line 37
153int getClientKeyringSize(int handle ) ;
154#line 39
155int createClientKeyringEntry(int handle ) ;
156#line 41
157int getClientKeyringUser(int handle , int index ) ;
158#line 43
159void setClientKeyringUser(int handle , int index , int value ) ;
160#line 45
161int getClientKeyringPublicKey(int handle , int index ) ;
162#line 47
163void setClientKeyringPublicKey(int handle , int index , int value ) ;
164#line 49
165int getClientForwardReceiver(int handle ) ;
166#line 51
167void setClientForwardReceiver(int handle , int value ) ;
168#line 53
169int getClientId(int handle ) ;
170#line 55
171void setClientId(int handle , int value ) ;
172#line 57
173int findPublicKey(int handle , int userid ) ;
174#line 59
175int findClientAddressBookAlias(int handle , int userid ) ;
176#line 5 "ClientLib.c"
177int __ste_Client_counter = 0;
178#line 7 "ClientLib.c"
179int initClient(void)
180{ int retValue_acc ;
181
182 {
183#line 12 "ClientLib.c"
184 if (__ste_Client_counter < 3) {
185#line 684
186 __ste_Client_counter = __ste_Client_counter + 1;
187#line 684
188 retValue_acc = __ste_Client_counter;
189#line 686
190 return (retValue_acc);
191 } else {
192#line 692 "ClientLib.c"
193 retValue_acc = -1;
194#line 694
195 return (retValue_acc);
196 }
197#line 701 "ClientLib.c"
198 return (retValue_acc);
199}
200}
201#line 15 "ClientLib.c"
202char *__ste_client_name0 = (char *)0;
203#line 17 "ClientLib.c"
204char *__ste_client_name1 = (char *)0;
205#line 19 "ClientLib.c"
206char *__ste_client_name2 = (char *)0;
207#line 22 "ClientLib.c"
208char *getClientName(int handle )
209{ char *retValue_acc ;
210 void *__cil_tmp3 ;
211
212 {
213#line 31 "ClientLib.c"
214 if (handle == 1) {
215#line 732
216 retValue_acc = __ste_client_name0;
217#line 734
218 return (retValue_acc);
219 } else {
220#line 736
221 if (handle == 2) {
222#line 741
223 retValue_acc = __ste_client_name1;
224#line 743
225 return (retValue_acc);
226 } else {
227#line 745
228 if (handle == 3) {
229#line 750
230 retValue_acc = __ste_client_name2;
231#line 752
232 return (retValue_acc);
233 } else {
234#line 758 "ClientLib.c"
235 __cil_tmp3 = (void *)0;
236#line 758
237 retValue_acc = (char *)__cil_tmp3;
238#line 760
239 return (retValue_acc);
240 }
241 }
242 }
243#line 767 "ClientLib.c"
244 return (retValue_acc);
245}
246}
247#line 34 "ClientLib.c"
248void setClientName(int handle , char *value )
249{
250
251 {
252#line 42
253 if (handle == 1) {
254#line 36
255 __ste_client_name0 = value;
256 } else {
257#line 37
258 if (handle == 2) {
259#line 38
260 __ste_client_name1 = value;
261 } else {
262#line 39
263 if (handle == 3) {
264#line 40
265 __ste_client_name2 = value;
266 } else {
267
268 }
269 }
270 }
271#line 802 "ClientLib.c"
272 return;
273}
274}
275#line 44 "ClientLib.c"
276int __ste_client_outbuffer0 = 0;
277#line 46 "ClientLib.c"
278int __ste_client_outbuffer1 = 0;
279#line 48 "ClientLib.c"
280int __ste_client_outbuffer2 = 0;
281#line 50 "ClientLib.c"
282int __ste_client_outbuffer3 = 0;
283#line 53 "ClientLib.c"
284int getClientOutbuffer(int handle )
285{ int retValue_acc ;
286
287 {
288#line 62 "ClientLib.c"
289 if (handle == 1) {
290#line 831
291 retValue_acc = __ste_client_outbuffer0;
292#line 833
293 return (retValue_acc);
294 } else {
295#line 835
296 if (handle == 2) {
297#line 840
298 retValue_acc = __ste_client_outbuffer1;
299#line 842
300 return (retValue_acc);
301 } else {
302#line 844
303 if (handle == 3) {
304#line 849
305 retValue_acc = __ste_client_outbuffer2;
306#line 851
307 return (retValue_acc);
308 } else {
309#line 857 "ClientLib.c"
310 retValue_acc = 0;
311#line 859
312 return (retValue_acc);
313 }
314 }
315 }
316#line 866 "ClientLib.c"
317 return (retValue_acc);
318}
319}
320#line 65 "ClientLib.c"
321void setClientOutbuffer(int handle , int value )
322{
323
324 {
325#line 73
326 if (handle == 1) {
327#line 67
328 __ste_client_outbuffer0 = value;
329 } else {
330#line 68
331 if (handle == 2) {
332#line 69
333 __ste_client_outbuffer1 = value;
334 } else {
335#line 70
336 if (handle == 3) {
337#line 71
338 __ste_client_outbuffer2 = value;
339 } else {
340
341 }
342 }
343 }
344#line 901 "ClientLib.c"
345 return;
346}
347}
348#line 77 "ClientLib.c"
349int __ste_ClientAddressBook_size0 = 0;
350#line 79 "ClientLib.c"
351int __ste_ClientAddressBook_size1 = 0;
352#line 81 "ClientLib.c"
353int __ste_ClientAddressBook_size2 = 0;
354#line 84 "ClientLib.c"
355int getClientAddressBookSize(int handle )
356{ int retValue_acc ;
357
358 {
359#line 93 "ClientLib.c"
360 if (handle == 1) {
361#line 928
362 retValue_acc = __ste_ClientAddressBook_size0;
363#line 930
364 return (retValue_acc);
365 } else {
366#line 932
367 if (handle == 2) {
368#line 937
369 retValue_acc = __ste_ClientAddressBook_size1;
370#line 939
371 return (retValue_acc);
372 } else {
373#line 941
374 if (handle == 3) {
375#line 946
376 retValue_acc = __ste_ClientAddressBook_size2;
377#line 948
378 return (retValue_acc);
379 } else {
380#line 954 "ClientLib.c"
381 retValue_acc = 0;
382#line 956
383 return (retValue_acc);
384 }
385 }
386 }
387#line 963 "ClientLib.c"
388 return (retValue_acc);
389}
390}
391#line 96 "ClientLib.c"
392void setClientAddressBookSize(int handle , int value )
393{
394
395 {
396#line 104
397 if (handle == 1) {
398#line 98
399 __ste_ClientAddressBook_size0 = value;
400 } else {
401#line 99
402 if (handle == 2) {
403#line 100
404 __ste_ClientAddressBook_size1 = value;
405 } else {
406#line 101
407 if (handle == 3) {
408#line 102
409 __ste_ClientAddressBook_size2 = value;
410 } else {
411
412 }
413 }
414 }
415#line 998 "ClientLib.c"
416 return;
417}
418}
419#line 106 "ClientLib.c"
420int createClientAddressBookEntry(int handle )
421{ int retValue_acc ;
422 int size ;
423 int tmp ;
424 int __cil_tmp5 ;
425
426 {
427 {
428#line 107
429 tmp = getClientAddressBookSize(handle);
430#line 107
431 size = tmp;
432 }
433#line 108 "ClientLib.c"
434 if (size < 3) {
435 {
436#line 109 "ClientLib.c"
437 __cil_tmp5 = size + 1;
438#line 109
439 setClientAddressBookSize(handle, __cil_tmp5);
440#line 1025 "ClientLib.c"
441 retValue_acc = size + 1;
442 }
443#line 1027
444 return (retValue_acc);
445 } else {
446#line 1031 "ClientLib.c"
447 retValue_acc = -1;
448#line 1033
449 return (retValue_acc);
450 }
451#line 1040 "ClientLib.c"
452 return (retValue_acc);
453}
454}
455#line 115 "ClientLib.c"
456int __ste_Client_AddressBook0_Alias0 = 0;
457#line 117 "ClientLib.c"
458int __ste_Client_AddressBook0_Alias1 = 0;
459#line 119 "ClientLib.c"
460int __ste_Client_AddressBook0_Alias2 = 0;
461#line 121 "ClientLib.c"
462int __ste_Client_AddressBook1_Alias0 = 0;
463#line 123 "ClientLib.c"
464int __ste_Client_AddressBook1_Alias1 = 0;
465#line 125 "ClientLib.c"
466int __ste_Client_AddressBook1_Alias2 = 0;
467#line 127 "ClientLib.c"
468int __ste_Client_AddressBook2_Alias0 = 0;
469#line 129 "ClientLib.c"
470int __ste_Client_AddressBook2_Alias1 = 0;
471#line 131 "ClientLib.c"
472int __ste_Client_AddressBook2_Alias2 = 0;
473#line 134 "ClientLib.c"
474int getClientAddressBookAlias(int handle , int index )
475{ int retValue_acc ;
476
477 {
478#line 167
479 if (handle == 1) {
480#line 144 "ClientLib.c"
481 if (index == 0) {
482#line 1086
483 retValue_acc = __ste_Client_AddressBook0_Alias0;
484#line 1088
485 return (retValue_acc);
486 } else {
487#line 1090
488 if (index == 1) {
489#line 1095
490 retValue_acc = __ste_Client_AddressBook0_Alias1;
491#line 1097
492 return (retValue_acc);
493 } else {
494#line 1099
495 if (index == 2) {
496#line 1104
497 retValue_acc = __ste_Client_AddressBook0_Alias2;
498#line 1106
499 return (retValue_acc);
500 } else {
501#line 1112
502 retValue_acc = 0;
503#line 1114
504 return (retValue_acc);
505 }
506 }
507 }
508 } else {
509#line 1116 "ClientLib.c"
510 if (handle == 2) {
511#line 154 "ClientLib.c"
512 if (index == 0) {
513#line 1124
514 retValue_acc = __ste_Client_AddressBook1_Alias0;
515#line 1126
516 return (retValue_acc);
517 } else {
518#line 1128
519 if (index == 1) {
520#line 1133
521 retValue_acc = __ste_Client_AddressBook1_Alias1;
522#line 1135
523 return (retValue_acc);
524 } else {
525#line 1137
526 if (index == 2) {
527#line 1142
528 retValue_acc = __ste_Client_AddressBook1_Alias2;
529#line 1144
530 return (retValue_acc);
531 } else {
532#line 1150
533 retValue_acc = 0;
534#line 1152
535 return (retValue_acc);
536 }
537 }
538 }
539 } else {
540#line 1154 "ClientLib.c"
541 if (handle == 3) {
542#line 164 "ClientLib.c"
543 if (index == 0) {
544#line 1162
545 retValue_acc = __ste_Client_AddressBook2_Alias0;
546#line 1164
547 return (retValue_acc);
548 } else {
549#line 1166
550 if (index == 1) {
551#line 1171
552 retValue_acc = __ste_Client_AddressBook2_Alias1;
553#line 1173
554 return (retValue_acc);
555 } else {
556#line 1175
557 if (index == 2) {
558#line 1180
559 retValue_acc = __ste_Client_AddressBook2_Alias2;
560#line 1182
561 return (retValue_acc);
562 } else {
563#line 1188
564 retValue_acc = 0;
565#line 1190
566 return (retValue_acc);
567 }
568 }
569 }
570 } else {
571#line 1196 "ClientLib.c"
572 retValue_acc = 0;
573#line 1198
574 return (retValue_acc);
575 }
576 }
577 }
578#line 1205 "ClientLib.c"
579 return (retValue_acc);
580}
581}
582#line 171 "ClientLib.c"
583int findClientAddressBookAlias(int handle , int userid )
584{ int retValue_acc ;
585
586 {
587#line 204
588 if (handle == 1) {
589#line 181 "ClientLib.c"
590 if (userid == __ste_Client_AddressBook0_Alias0) {
591#line 1233
592 retValue_acc = 0;
593#line 1235
594 return (retValue_acc);
595 } else {
596#line 1237
597 if (userid == __ste_Client_AddressBook0_Alias1) {
598#line 1242
599 retValue_acc = 1;
600#line 1244
601 return (retValue_acc);
602 } else {
603#line 1246
604 if (userid == __ste_Client_AddressBook0_Alias2) {
605#line 1251
606 retValue_acc = 2;
607#line 1253
608 return (retValue_acc);
609 } else {
610#line 1259
611 retValue_acc = -1;
612#line 1261
613 return (retValue_acc);
614 }
615 }
616 }
617 } else {
618#line 1263 "ClientLib.c"
619 if (handle == 2) {
620#line 191 "ClientLib.c"
621 if (userid == __ste_Client_AddressBook1_Alias0) {
622#line 1271
623 retValue_acc = 0;
624#line 1273
625 return (retValue_acc);
626 } else {
627#line 1275
628 if (userid == __ste_Client_AddressBook1_Alias1) {
629#line 1280
630 retValue_acc = 1;
631#line 1282
632 return (retValue_acc);
633 } else {
634#line 1284
635 if (userid == __ste_Client_AddressBook1_Alias2) {
636#line 1289
637 retValue_acc = 2;
638#line 1291
639 return (retValue_acc);
640 } else {
641#line 1297
642 retValue_acc = -1;
643#line 1299
644 return (retValue_acc);
645 }
646 }
647 }
648 } else {
649#line 1301 "ClientLib.c"
650 if (handle == 3) {
651#line 201 "ClientLib.c"
652 if (userid == __ste_Client_AddressBook2_Alias0) {
653#line 1309
654 retValue_acc = 0;
655#line 1311
656 return (retValue_acc);
657 } else {
658#line 1313
659 if (userid == __ste_Client_AddressBook2_Alias1) {
660#line 1318
661 retValue_acc = 1;
662#line 1320
663 return (retValue_acc);
664 } else {
665#line 1322
666 if (userid == __ste_Client_AddressBook2_Alias2) {
667#line 1327
668 retValue_acc = 2;
669#line 1329
670 return (retValue_acc);
671 } else {
672#line 1335
673 retValue_acc = -1;
674#line 1337
675 return (retValue_acc);
676 }
677 }
678 }
679 } else {
680#line 1343 "ClientLib.c"
681 retValue_acc = -1;
682#line 1345
683 return (retValue_acc);
684 }
685 }
686 }
687#line 1352 "ClientLib.c"
688 return (retValue_acc);
689}
690}
691#line 208 "ClientLib.c"
692void setClientAddressBookAlias(int handle , int index , int value )
693{
694
695 {
696#line 234
697 if (handle == 1) {
698#line 217
699 if (index == 0) {
700#line 211
701 __ste_Client_AddressBook0_Alias0 = value;
702 } else {
703#line 212
704 if (index == 1) {
705#line 213
706 __ste_Client_AddressBook0_Alias1 = value;
707 } else {
708#line 214
709 if (index == 2) {
710#line 215
711 __ste_Client_AddressBook0_Alias2 = value;
712 } else {
713
714 }
715 }
716 }
717 } else {
718#line 216
719 if (handle == 2) {
720#line 225
721 if (index == 0) {
722#line 219
723 __ste_Client_AddressBook1_Alias0 = value;
724 } else {
725#line 220
726 if (index == 1) {
727#line 221
728 __ste_Client_AddressBook1_Alias1 = value;
729 } else {
730#line 222
731 if (index == 2) {
732#line 223
733 __ste_Client_AddressBook1_Alias2 = value;
734 } else {
735
736 }
737 }
738 }
739 } else {
740#line 224
741 if (handle == 3) {
742#line 233
743 if (index == 0) {
744#line 227
745 __ste_Client_AddressBook2_Alias0 = value;
746 } else {
747#line 228
748 if (index == 1) {
749#line 229
750 __ste_Client_AddressBook2_Alias1 = value;
751 } else {
752#line 230
753 if (index == 2) {
754#line 231
755 __ste_Client_AddressBook2_Alias2 = value;
756 } else {
757
758 }
759 }
760 }
761 } else {
762
763 }
764 }
765 }
766#line 1420 "ClientLib.c"
767 return;
768}
769}
770#line 236 "ClientLib.c"
771int __ste_Client_AddressBook0_Address0 = 0;
772#line 238 "ClientLib.c"
773int __ste_Client_AddressBook0_Address1 = 0;
774#line 240 "ClientLib.c"
775int __ste_Client_AddressBook0_Address2 = 0;
776#line 242 "ClientLib.c"
777int __ste_Client_AddressBook1_Address0 = 0;
778#line 244 "ClientLib.c"
779int __ste_Client_AddressBook1_Address1 = 0;
780#line 246 "ClientLib.c"
781int __ste_Client_AddressBook1_Address2 = 0;
782#line 248 "ClientLib.c"
783int __ste_Client_AddressBook2_Address0 = 0;
784#line 250 "ClientLib.c"
785int __ste_Client_AddressBook2_Address1 = 0;
786#line 252 "ClientLib.c"
787int __ste_Client_AddressBook2_Address2 = 0;
788#line 255 "ClientLib.c"
789int getClientAddressBookAddress(int handle , int index )
790{ int retValue_acc ;
791
792 {
793#line 288
794 if (handle == 1) {
795#line 265 "ClientLib.c"
796 if (index == 0) {
797#line 1462
798 retValue_acc = __ste_Client_AddressBook0_Address0;
799#line 1464
800 return (retValue_acc);
801 } else {
802#line 1466
803 if (index == 1) {
804#line 1471
805 retValue_acc = __ste_Client_AddressBook0_Address1;
806#line 1473
807 return (retValue_acc);
808 } else {
809#line 1475
810 if (index == 2) {
811#line 1480
812 retValue_acc = __ste_Client_AddressBook0_Address2;
813#line 1482
814 return (retValue_acc);
815 } else {
816#line 1488
817 retValue_acc = 0;
818#line 1490
819 return (retValue_acc);
820 }
821 }
822 }
823 } else {
824#line 1492 "ClientLib.c"
825 if (handle == 2) {
826#line 275 "ClientLib.c"
827 if (index == 0) {
828#line 1500
829 retValue_acc = __ste_Client_AddressBook1_Address0;
830#line 1502
831 return (retValue_acc);
832 } else {
833#line 1504
834 if (index == 1) {
835#line 1509
836 retValue_acc = __ste_Client_AddressBook1_Address1;
837#line 1511
838 return (retValue_acc);
839 } else {
840#line 1513
841 if (index == 2) {
842#line 1518
843 retValue_acc = __ste_Client_AddressBook1_Address2;
844#line 1520
845 return (retValue_acc);
846 } else {
847#line 1526
848 retValue_acc = 0;
849#line 1528
850 return (retValue_acc);
851 }
852 }
853 }
854 } else {
855#line 1530 "ClientLib.c"
856 if (handle == 3) {
857#line 285 "ClientLib.c"
858 if (index == 0) {
859#line 1538
860 retValue_acc = __ste_Client_AddressBook2_Address0;
861#line 1540
862 return (retValue_acc);
863 } else {
864#line 1542
865 if (index == 1) {
866#line 1547
867 retValue_acc = __ste_Client_AddressBook2_Address1;
868#line 1549
869 return (retValue_acc);
870 } else {
871#line 1551
872 if (index == 2) {
873#line 1556
874 retValue_acc = __ste_Client_AddressBook2_Address2;
875#line 1558
876 return (retValue_acc);
877 } else {
878#line 1564
879 retValue_acc = 0;
880#line 1566
881 return (retValue_acc);
882 }
883 }
884 }
885 } else {
886#line 1572 "ClientLib.c"
887 retValue_acc = 0;
888#line 1574
889 return (retValue_acc);
890 }
891 }
892 }
893#line 1581 "ClientLib.c"
894 return (retValue_acc);
895}
896}
897#line 291 "ClientLib.c"
898void setClientAddressBookAddress(int handle , int index , int value )
899{
900
901 {
902#line 317
903 if (handle == 1) {
904#line 300
905 if (index == 0) {
906#line 294
907 __ste_Client_AddressBook0_Address0 = value;
908 } else {
909#line 295
910 if (index == 1) {
911#line 296
912 __ste_Client_AddressBook0_Address1 = value;
913 } else {
914#line 297
915 if (index == 2) {
916#line 298
917 __ste_Client_AddressBook0_Address2 = value;
918 } else {
919
920 }
921 }
922 }
923 } else {
924#line 299
925 if (handle == 2) {
926#line 308
927 if (index == 0) {
928#line 302
929 __ste_Client_AddressBook1_Address0 = value;
930 } else {
931#line 303
932 if (index == 1) {
933#line 304
934 __ste_Client_AddressBook1_Address1 = value;
935 } else {
936#line 305
937 if (index == 2) {
938#line 306
939 __ste_Client_AddressBook1_Address2 = value;
940 } else {
941
942 }
943 }
944 }
945 } else {
946#line 307
947 if (handle == 3) {
948#line 316
949 if (index == 0) {
950#line 310
951 __ste_Client_AddressBook2_Address0 = value;
952 } else {
953#line 311
954 if (index == 1) {
955#line 312
956 __ste_Client_AddressBook2_Address1 = value;
957 } else {
958#line 313
959 if (index == 2) {
960#line 314
961 __ste_Client_AddressBook2_Address2 = value;
962 } else {
963
964 }
965 }
966 }
967 } else {
968
969 }
970 }
971 }
972#line 1649 "ClientLib.c"
973 return;
974}
975}
976#line 319 "ClientLib.c"
977int __ste_client_autoResponse0 = 0;
978#line 321 "ClientLib.c"
979int __ste_client_autoResponse1 = 0;
980#line 323 "ClientLib.c"
981int __ste_client_autoResponse2 = 0;
982#line 326 "ClientLib.c"
983int getClientAutoResponse(int handle )
984{ int retValue_acc ;
985
986 {
987#line 335 "ClientLib.c"
988 if (handle == 1) {
989#line 1676
990 retValue_acc = __ste_client_autoResponse0;
991#line 1678
992 return (retValue_acc);
993 } else {
994#line 1680
995 if (handle == 2) {
996#line 1685
997 retValue_acc = __ste_client_autoResponse1;
998#line 1687
999 return (retValue_acc);
1000 } else {
1001#line 1689
1002 if (handle == 3) {
1003#line 1694
1004 retValue_acc = __ste_client_autoResponse2;
1005#line 1696
1006 return (retValue_acc);
1007 } else {
1008#line 1702 "ClientLib.c"
1009 retValue_acc = -1;
1010#line 1704
1011 return (retValue_acc);
1012 }
1013 }
1014 }
1015#line 1711 "ClientLib.c"
1016 return (retValue_acc);
1017}
1018}
1019#line 338 "ClientLib.c"
1020void setClientAutoResponse(int handle , int value )
1021{
1022
1023 {
1024#line 346
1025 if (handle == 1) {
1026#line 340
1027 __ste_client_autoResponse0 = value;
1028 } else {
1029#line 341
1030 if (handle == 2) {
1031#line 342
1032 __ste_client_autoResponse1 = value;
1033 } else {
1034#line 343
1035 if (handle == 3) {
1036#line 344
1037 __ste_client_autoResponse2 = value;
1038 } else {
1039
1040 }
1041 }
1042 }
1043#line 1746 "ClientLib.c"
1044 return;
1045}
1046}
1047#line 348 "ClientLib.c"
1048int __ste_client_privateKey0 = 0;
1049#line 350 "ClientLib.c"
1050int __ste_client_privateKey1 = 0;
1051#line 352 "ClientLib.c"
1052int __ste_client_privateKey2 = 0;
1053#line 355 "ClientLib.c"
1054int getClientPrivateKey(int handle )
1055{ int retValue_acc ;
1056
1057 {
1058#line 364 "ClientLib.c"
1059 if (handle == 1) {
1060#line 1773
1061 retValue_acc = __ste_client_privateKey0;
1062#line 1775
1063 return (retValue_acc);
1064 } else {
1065#line 1777
1066 if (handle == 2) {
1067#line 1782
1068 retValue_acc = __ste_client_privateKey1;
1069#line 1784
1070 return (retValue_acc);
1071 } else {
1072#line 1786
1073 if (handle == 3) {
1074#line 1791
1075 retValue_acc = __ste_client_privateKey2;
1076#line 1793
1077 return (retValue_acc);
1078 } else {
1079#line 1799 "ClientLib.c"
1080 retValue_acc = 0;
1081#line 1801
1082 return (retValue_acc);
1083 }
1084 }
1085 }
1086#line 1808 "ClientLib.c"
1087 return (retValue_acc);
1088}
1089}
1090#line 367 "ClientLib.c"
1091void setClientPrivateKey(int handle , int value )
1092{
1093
1094 {
1095#line 375
1096 if (handle == 1) {
1097#line 369
1098 __ste_client_privateKey0 = value;
1099 } else {
1100#line 370
1101 if (handle == 2) {
1102#line 371
1103 __ste_client_privateKey1 = value;
1104 } else {
1105#line 372
1106 if (handle == 3) {
1107#line 373
1108 __ste_client_privateKey2 = value;
1109 } else {
1110
1111 }
1112 }
1113 }
1114#line 1843 "ClientLib.c"
1115 return;
1116}
1117}
1118#line 377 "ClientLib.c"
1119int __ste_ClientKeyring_size0 = 0;
1120#line 379 "ClientLib.c"
1121int __ste_ClientKeyring_size1 = 0;
1122#line 381 "ClientLib.c"
1123int __ste_ClientKeyring_size2 = 0;
1124#line 384 "ClientLib.c"
1125int getClientKeyringSize(int handle )
1126{ int retValue_acc ;
1127
1128 {
1129#line 393 "ClientLib.c"
1130 if (handle == 1) {
1131#line 1870
1132 retValue_acc = __ste_ClientKeyring_size0;
1133#line 1872
1134 return (retValue_acc);
1135 } else {
1136#line 1874
1137 if (handle == 2) {
1138#line 1879
1139 retValue_acc = __ste_ClientKeyring_size1;
1140#line 1881
1141 return (retValue_acc);
1142 } else {
1143#line 1883
1144 if (handle == 3) {
1145#line 1888
1146 retValue_acc = __ste_ClientKeyring_size2;
1147#line 1890
1148 return (retValue_acc);
1149 } else {
1150#line 1896 "ClientLib.c"
1151 retValue_acc = 0;
1152#line 1898
1153 return (retValue_acc);
1154 }
1155 }
1156 }
1157#line 1905 "ClientLib.c"
1158 return (retValue_acc);
1159}
1160}
1161#line 396 "ClientLib.c"
1162void setClientKeyringSize(int handle , int value )
1163{
1164
1165 {
1166#line 404
1167 if (handle == 1) {
1168#line 398
1169 __ste_ClientKeyring_size0 = value;
1170 } else {
1171#line 399
1172 if (handle == 2) {
1173#line 400
1174 __ste_ClientKeyring_size1 = value;
1175 } else {
1176#line 401
1177 if (handle == 3) {
1178#line 402
1179 __ste_ClientKeyring_size2 = value;
1180 } else {
1181
1182 }
1183 }
1184 }
1185#line 1940 "ClientLib.c"
1186 return;
1187}
1188}
1189#line 406 "ClientLib.c"
1190int createClientKeyringEntry(int handle )
1191{ int retValue_acc ;
1192 int size ;
1193 int tmp ;
1194 int __cil_tmp5 ;
1195
1196 {
1197 {
1198#line 407
1199 tmp = getClientKeyringSize(handle);
1200#line 407
1201 size = tmp;
1202 }
1203#line 408 "ClientLib.c"
1204 if (size < 2) {
1205 {
1206#line 409 "ClientLib.c"
1207 __cil_tmp5 = size + 1;
1208#line 409
1209 setClientKeyringSize(handle, __cil_tmp5);
1210#line 1967 "ClientLib.c"
1211 retValue_acc = size + 1;
1212 }
1213#line 1969
1214 return (retValue_acc);
1215 } else {
1216#line 1973 "ClientLib.c"
1217 retValue_acc = -1;
1218#line 1975
1219 return (retValue_acc);
1220 }
1221#line 1982 "ClientLib.c"
1222 return (retValue_acc);
1223}
1224}
1225#line 414 "ClientLib.c"
1226int __ste_Client_Keyring0_User0 = 0;
1227#line 416 "ClientLib.c"
1228int __ste_Client_Keyring0_User1 = 0;
1229#line 418 "ClientLib.c"
1230int __ste_Client_Keyring0_User2 = 0;
1231#line 420 "ClientLib.c"
1232int __ste_Client_Keyring1_User0 = 0;
1233#line 422 "ClientLib.c"
1234int __ste_Client_Keyring1_User1 = 0;
1235#line 424 "ClientLib.c"
1236int __ste_Client_Keyring1_User2 = 0;
1237#line 426 "ClientLib.c"
1238int __ste_Client_Keyring2_User0 = 0;
1239#line 428 "ClientLib.c"
1240int __ste_Client_Keyring2_User1 = 0;
1241#line 430 "ClientLib.c"
1242int __ste_Client_Keyring2_User2 = 0;
1243#line 433 "ClientLib.c"
1244int getClientKeyringUser(int handle , int index )
1245{ int retValue_acc ;
1246
1247 {
1248#line 466
1249 if (handle == 1) {
1250#line 443 "ClientLib.c"
1251 if (index == 0) {
1252#line 2028
1253 retValue_acc = __ste_Client_Keyring0_User0;
1254#line 2030
1255 return (retValue_acc);
1256 } else {
1257#line 2032
1258 if (index == 1) {
1259#line 2037
1260 retValue_acc = __ste_Client_Keyring0_User1;
1261#line 2039
1262 return (retValue_acc);
1263 } else {
1264#line 2045
1265 retValue_acc = 0;
1266#line 2047
1267 return (retValue_acc);
1268 }
1269 }
1270 } else {
1271#line 2049 "ClientLib.c"
1272 if (handle == 2) {
1273#line 453 "ClientLib.c"
1274 if (index == 0) {
1275#line 2057
1276 retValue_acc = __ste_Client_Keyring1_User0;
1277#line 2059
1278 return (retValue_acc);
1279 } else {
1280#line 2061
1281 if (index == 1) {
1282#line 2066
1283 retValue_acc = __ste_Client_Keyring1_User1;
1284#line 2068
1285 return (retValue_acc);
1286 } else {
1287#line 2074
1288 retValue_acc = 0;
1289#line 2076
1290 return (retValue_acc);
1291 }
1292 }
1293 } else {
1294#line 2078 "ClientLib.c"
1295 if (handle == 3) {
1296#line 463 "ClientLib.c"
1297 if (index == 0) {
1298#line 2086
1299 retValue_acc = __ste_Client_Keyring2_User0;
1300#line 2088
1301 return (retValue_acc);
1302 } else {
1303#line 2090
1304 if (index == 1) {
1305#line 2095
1306 retValue_acc = __ste_Client_Keyring2_User1;
1307#line 2097
1308 return (retValue_acc);
1309 } else {
1310#line 2103
1311 retValue_acc = 0;
1312#line 2105
1313 return (retValue_acc);
1314 }
1315 }
1316 } else {
1317#line 2111 "ClientLib.c"
1318 retValue_acc = 0;
1319#line 2113
1320 return (retValue_acc);
1321 }
1322 }
1323 }
1324#line 2120 "ClientLib.c"
1325 return (retValue_acc);
1326}
1327}
1328#line 473 "ClientLib.c"
1329void setClientKeyringUser(int handle , int index , int value )
1330{
1331
1332 {
1333#line 499
1334 if (handle == 1) {
1335#line 482
1336 if (index == 0) {
1337#line 476
1338 __ste_Client_Keyring0_User0 = value;
1339 } else {
1340#line 477
1341 if (index == 1) {
1342#line 478
1343 __ste_Client_Keyring0_User1 = value;
1344 } else {
1345
1346 }
1347 }
1348 } else {
1349#line 479
1350 if (handle == 2) {
1351#line 490
1352 if (index == 0) {
1353#line 484
1354 __ste_Client_Keyring1_User0 = value;
1355 } else {
1356#line 485
1357 if (index == 1) {
1358#line 486
1359 __ste_Client_Keyring1_User1 = value;
1360 } else {
1361
1362 }
1363 }
1364 } else {
1365#line 487
1366 if (handle == 3) {
1367#line 498
1368 if (index == 0) {
1369#line 492
1370 __ste_Client_Keyring2_User0 = value;
1371 } else {
1372#line 493
1373 if (index == 1) {
1374#line 494
1375 __ste_Client_Keyring2_User1 = value;
1376 } else {
1377
1378 }
1379 }
1380 } else {
1381
1382 }
1383 }
1384 }
1385#line 2176 "ClientLib.c"
1386 return;
1387}
1388}
1389#line 501 "ClientLib.c"
1390int __ste_Client_Keyring0_PublicKey0 = 0;
1391#line 503 "ClientLib.c"
1392int __ste_Client_Keyring0_PublicKey1 = 0;
1393#line 505 "ClientLib.c"
1394int __ste_Client_Keyring0_PublicKey2 = 0;
1395#line 507 "ClientLib.c"
1396int __ste_Client_Keyring1_PublicKey0 = 0;
1397#line 509 "ClientLib.c"
1398int __ste_Client_Keyring1_PublicKey1 = 0;
1399#line 511 "ClientLib.c"
1400int __ste_Client_Keyring1_PublicKey2 = 0;
1401#line 513 "ClientLib.c"
1402int __ste_Client_Keyring2_PublicKey0 = 0;
1403#line 515 "ClientLib.c"
1404int __ste_Client_Keyring2_PublicKey1 = 0;
1405#line 517 "ClientLib.c"
1406int __ste_Client_Keyring2_PublicKey2 = 0;
1407#line 520 "ClientLib.c"
1408int getClientKeyringPublicKey(int handle , int index )
1409{ int retValue_acc ;
1410
1411 {
1412#line 553
1413 if (handle == 1) {
1414#line 530 "ClientLib.c"
1415 if (index == 0) {
1416#line 2218
1417 retValue_acc = __ste_Client_Keyring0_PublicKey0;
1418#line 2220
1419 return (retValue_acc);
1420 } else {
1421#line 2222
1422 if (index == 1) {
1423#line 2227
1424 retValue_acc = __ste_Client_Keyring0_PublicKey1;
1425#line 2229
1426 return (retValue_acc);
1427 } else {
1428#line 2235
1429 retValue_acc = 0;
1430#line 2237
1431 return (retValue_acc);
1432 }
1433 }
1434 } else {
1435#line 2239 "ClientLib.c"
1436 if (handle == 2) {
1437#line 540 "ClientLib.c"
1438 if (index == 0) {
1439#line 2247
1440 retValue_acc = __ste_Client_Keyring1_PublicKey0;
1441#line 2249
1442 return (retValue_acc);
1443 } else {
1444#line 2251
1445 if (index == 1) {
1446#line 2256
1447 retValue_acc = __ste_Client_Keyring1_PublicKey1;
1448#line 2258
1449 return (retValue_acc);
1450 } else {
1451#line 2264
1452 retValue_acc = 0;
1453#line 2266
1454 return (retValue_acc);
1455 }
1456 }
1457 } else {
1458#line 2268 "ClientLib.c"
1459 if (handle == 3) {
1460#line 550 "ClientLib.c"
1461 if (index == 0) {
1462#line 2276
1463 retValue_acc = __ste_Client_Keyring2_PublicKey0;
1464#line 2278
1465 return (retValue_acc);
1466 } else {
1467#line 2280
1468 if (index == 1) {
1469#line 2285
1470 retValue_acc = __ste_Client_Keyring2_PublicKey1;
1471#line 2287
1472 return (retValue_acc);
1473 } else {
1474#line 2293
1475 retValue_acc = 0;
1476#line 2295
1477 return (retValue_acc);
1478 }
1479 }
1480 } else {
1481#line 2301 "ClientLib.c"
1482 retValue_acc = 0;
1483#line 2303
1484 return (retValue_acc);
1485 }
1486 }
1487 }
1488#line 2310 "ClientLib.c"
1489 return (retValue_acc);
1490}
1491}
1492#line 557 "ClientLib.c"
1493int findPublicKey(int handle , int userid )
1494{ int retValue_acc ;
1495
1496 {
1497#line 591
1498 if (handle == 1) {
1499#line 568 "ClientLib.c"
1500 if (userid == __ste_Client_Keyring0_User0) {
1501#line 2338
1502 retValue_acc = __ste_Client_Keyring0_PublicKey0;
1503#line 2340
1504 return (retValue_acc);
1505 } else {
1506#line 2342
1507 if (userid == __ste_Client_Keyring0_User1) {
1508#line 2347
1509 retValue_acc = __ste_Client_Keyring0_PublicKey1;
1510#line 2349
1511 return (retValue_acc);
1512 } else {
1513#line 2355
1514 retValue_acc = 0;
1515#line 2357
1516 return (retValue_acc);
1517 }
1518 }
1519 } else {
1520#line 2359 "ClientLib.c"
1521 if (handle == 2) {
1522#line 578 "ClientLib.c"
1523 if (userid == __ste_Client_Keyring1_User0) {
1524#line 2367
1525 retValue_acc = __ste_Client_Keyring1_PublicKey0;
1526#line 2369
1527 return (retValue_acc);
1528 } else {
1529#line 2371
1530 if (userid == __ste_Client_Keyring1_User1) {
1531#line 2376
1532 retValue_acc = __ste_Client_Keyring1_PublicKey1;
1533#line 2378
1534 return (retValue_acc);
1535 } else {
1536#line 2384
1537 retValue_acc = 0;
1538#line 2386
1539 return (retValue_acc);
1540 }
1541 }
1542 } else {
1543#line 2388 "ClientLib.c"
1544 if (handle == 3) {
1545#line 588 "ClientLib.c"
1546 if (userid == __ste_Client_Keyring2_User0) {
1547#line 2396
1548 retValue_acc = __ste_Client_Keyring2_PublicKey0;
1549#line 2398
1550 return (retValue_acc);
1551 } else {
1552#line 2400
1553 if (userid == __ste_Client_Keyring2_User1) {
1554#line 2405
1555 retValue_acc = __ste_Client_Keyring2_PublicKey1;
1556#line 2407
1557 return (retValue_acc);
1558 } else {
1559#line 2413
1560 retValue_acc = 0;
1561#line 2415
1562 return (retValue_acc);
1563 }
1564 }
1565 } else {
1566#line 2421 "ClientLib.c"
1567 retValue_acc = 0;
1568#line 2423
1569 return (retValue_acc);
1570 }
1571 }
1572 }
1573#line 2430 "ClientLib.c"
1574 return (retValue_acc);
1575}
1576}
1577#line 595 "ClientLib.c"
1578void setClientKeyringPublicKey(int handle , int index , int value )
1579{
1580
1581 {
1582#line 621
1583 if (handle == 1) {
1584#line 604
1585 if (index == 0) {
1586#line 598
1587 __ste_Client_Keyring0_PublicKey0 = value;
1588 } else {
1589#line 599
1590 if (index == 1) {
1591#line 600
1592 __ste_Client_Keyring0_PublicKey1 = value;
1593 } else {
1594
1595 }
1596 }
1597 } else {
1598#line 601
1599 if (handle == 2) {
1600#line 612
1601 if (index == 0) {
1602#line 606
1603 __ste_Client_Keyring1_PublicKey0 = value;
1604 } else {
1605#line 607
1606 if (index == 1) {
1607#line 608
1608 __ste_Client_Keyring1_PublicKey1 = value;
1609 } else {
1610
1611 }
1612 }
1613 } else {
1614#line 609
1615 if (handle == 3) {
1616#line 620
1617 if (index == 0) {
1618#line 614
1619 __ste_Client_Keyring2_PublicKey0 = value;
1620 } else {
1621#line 615
1622 if (index == 1) {
1623#line 616
1624 __ste_Client_Keyring2_PublicKey1 = value;
1625 } else {
1626
1627 }
1628 }
1629 } else {
1630
1631 }
1632 }
1633 }
1634#line 2486 "ClientLib.c"
1635 return;
1636}
1637}
1638#line 623 "ClientLib.c"
1639int __ste_client_forwardReceiver0 = 0;
1640#line 625 "ClientLib.c"
1641int __ste_client_forwardReceiver1 = 0;
1642#line 627 "ClientLib.c"
1643int __ste_client_forwardReceiver2 = 0;
1644#line 629 "ClientLib.c"
1645int __ste_client_forwardReceiver3 = 0;
1646#line 631 "ClientLib.c"
1647int getClientForwardReceiver(int handle )
1648{ int retValue_acc ;
1649
1650 {
1651#line 640 "ClientLib.c"
1652 if (handle == 1) {
1653#line 2515
1654 retValue_acc = __ste_client_forwardReceiver0;
1655#line 2517
1656 return (retValue_acc);
1657 } else {
1658#line 2519
1659 if (handle == 2) {
1660#line 2524
1661 retValue_acc = __ste_client_forwardReceiver1;
1662#line 2526
1663 return (retValue_acc);
1664 } else {
1665#line 2528
1666 if (handle == 3) {
1667#line 2533
1668 retValue_acc = __ste_client_forwardReceiver2;
1669#line 2535
1670 return (retValue_acc);
1671 } else {
1672#line 2541 "ClientLib.c"
1673 retValue_acc = 0;
1674#line 2543
1675 return (retValue_acc);
1676 }
1677 }
1678 }
1679#line 2550 "ClientLib.c"
1680 return (retValue_acc);
1681}
1682}
1683#line 643 "ClientLib.c"
1684void setClientForwardReceiver(int handle , int value )
1685{
1686
1687 {
1688#line 651
1689 if (handle == 1) {
1690#line 645
1691 __ste_client_forwardReceiver0 = value;
1692 } else {
1693#line 646
1694 if (handle == 2) {
1695#line 647
1696 __ste_client_forwardReceiver1 = value;
1697 } else {
1698#line 648
1699 if (handle == 3) {
1700#line 649
1701 __ste_client_forwardReceiver2 = value;
1702 } else {
1703
1704 }
1705 }
1706 }
1707#line 2585 "ClientLib.c"
1708 return;
1709}
1710}
1711#line 653 "ClientLib.c"
1712int __ste_client_idCounter0 = 0;
1713#line 655 "ClientLib.c"
1714int __ste_client_idCounter1 = 0;
1715#line 657 "ClientLib.c"
1716int __ste_client_idCounter2 = 0;
1717#line 660 "ClientLib.c"
1718int getClientId(int handle )
1719{ int retValue_acc ;
1720
1721 {
1722#line 669 "ClientLib.c"
1723 if (handle == 1) {
1724#line 2612
1725 retValue_acc = __ste_client_idCounter0;
1726#line 2614
1727 return (retValue_acc);
1728 } else {
1729#line 2616
1730 if (handle == 2) {
1731#line 2621
1732 retValue_acc = __ste_client_idCounter1;
1733#line 2623
1734 return (retValue_acc);
1735 } else {
1736#line 2625
1737 if (handle == 3) {
1738#line 2630
1739 retValue_acc = __ste_client_idCounter2;
1740#line 2632
1741 return (retValue_acc);
1742 } else {
1743#line 2638 "ClientLib.c"
1744 retValue_acc = 0;
1745#line 2640
1746 return (retValue_acc);
1747 }
1748 }
1749 }
1750#line 2647 "ClientLib.c"
1751 return (retValue_acc);
1752}
1753}
1754#line 672 "ClientLib.c"
1755void setClientId(int handle , int value )
1756{
1757
1758 {
1759#line 680
1760 if (handle == 1) {
1761#line 674
1762 __ste_client_idCounter0 = value;
1763 } else {
1764#line 675
1765 if (handle == 2) {
1766#line 676
1767 __ste_client_idCounter1 = value;
1768 } else {
1769#line 677
1770 if (handle == 3) {
1771#line 678
1772 __ste_client_idCounter2 = value;
1773 } else {
1774
1775 }
1776 }
1777 }
1778#line 2682 "ClientLib.c"
1779 return;
1780}
1781}
1782#line 1 "Test.o"
1783#pragma merger(0,"Test.i","")
1784#line 359 "/usr/include/stdio.h"
1785extern int printf(char const * __restrict __format , ...) ;
1786#line 688
1787extern int puts(char const *__s ) ;
1788#line 17 "Client.h"
1789int is_queue_empty(void) ;
1790#line 19
1791int get_queued_client(void) ;
1792#line 21
1793int get_queued_email(void) ;
1794#line 26
1795void outgoing(int client , int msg ) ;
1796#line 35
1797void sendEmail(int sender , int receiver ) ;
1798#line 44
1799void generateKeyPair(int client , int seed ) ;
1800#line 2 "Test.h"
1801int bob ;
1802#line 5 "Test.h"
1803int rjh ;
1804#line 8 "Test.h"
1805int chuck ;
1806#line 11
1807void setup_bob(int bob___0 ) ;
1808#line 14
1809void setup_rjh(int rjh___0 ) ;
1810#line 17
1811void setup_chuck(int chuck___0 ) ;
1812#line 23
1813void bobToRjh(void) ;
1814#line 26
1815void rjhToBob(void) ;
1816#line 29
1817void test(void) ;
1818#line 32
1819void setup(void) ;
1820#line 35
1821int main(void) ;
1822#line 36
1823void bobKeyAdd(void) ;
1824#line 39
1825void bobKeyAddChuck(void) ;
1826#line 42
1827void rjhKeyAdd(void) ;
1828#line 45
1829void rjhKeyAddChuck(void) ;
1830#line 48
1831void chuckKeyAdd(void) ;
1832#line 51
1833void bobKeyChange(void) ;
1834#line 54
1835void rjhKeyChange(void) ;
1836#line 57
1837void rjhDeletePrivateKey(void) ;
1838#line 60
1839void chuckKeyAddRjh(void) ;
1840#line 61
1841void rjhSetAutoRespond(void) ;
1842#line 18 "Test.c"
1843void setup_bob__wrappee__Base(int bob___0 )
1844{
1845
1846 {
1847 {
1848#line 19
1849 setClientId(bob___0, bob___0);
1850 }
1851#line 1330 "Test.c"
1852 return;
1853}
1854}
1855#line 23 "Test.c"
1856void setup_bob(int bob___0 )
1857{
1858
1859 {
1860 {
1861#line 24
1862 setup_bob__wrappee__Base(bob___0);
1863#line 25
1864 setClientPrivateKey(bob___0, 123);
1865 }
1866#line 1352 "Test.c"
1867 return;
1868}
1869}
1870#line 33 "Test.c"
1871void setup_rjh__wrappee__Base(int rjh___0 )
1872{
1873
1874 {
1875 {
1876#line 34
1877 setClientId(rjh___0, rjh___0);
1878 }
1879#line 1372 "Test.c"
1880 return;
1881}
1882}
1883#line 40 "Test.c"
1884void setup_rjh(int rjh___0 )
1885{
1886
1887 {
1888 {
1889#line 42
1890 setup_rjh__wrappee__Base(rjh___0);
1891#line 43
1892 setClientPrivateKey(rjh___0, 456);
1893 }
1894#line 1394 "Test.c"
1895 return;
1896}
1897}
1898#line 50 "Test.c"
1899void setup_chuck__wrappee__Base(int chuck___0 )
1900{
1901
1902 {
1903 {
1904#line 51
1905 setClientId(chuck___0, chuck___0);
1906 }
1907#line 1414 "Test.c"
1908 return;
1909}
1910}
1911#line 57 "Test.c"
1912void setup_chuck(int chuck___0 )
1913{
1914
1915 {
1916 {
1917#line 58
1918 setup_chuck__wrappee__Base(chuck___0);
1919#line 59
1920 setClientPrivateKey(chuck___0, 789);
1921 }
1922#line 1436 "Test.c"
1923 return;
1924}
1925}
1926#line 69 "Test.c"
1927void bobToRjh(void)
1928{ int tmp ;
1929 int tmp___0 ;
1930 int tmp___1 ;
1931
1932 {
1933 {
1934#line 71
1935 puts("Please enter a subject and a message body.\n");
1936#line 72
1937 sendEmail(bob, rjh);
1938#line 73
1939 tmp___1 = is_queue_empty();
1940 }
1941#line 73
1942 if (tmp___1) {
1943
1944 } else {
1945 {
1946#line 74
1947 tmp = get_queued_email();
1948#line 74
1949 tmp___0 = get_queued_client();
1950#line 74
1951 outgoing(tmp___0, tmp);
1952 }
1953 }
1954#line 1463 "Test.c"
1955 return;
1956}
1957}
1958#line 81 "Test.c"
1959void rjhToBob(void)
1960{
1961
1962 {
1963 {
1964#line 83
1965 puts("Please enter a subject and a message body.\n");
1966#line 84
1967 sendEmail(rjh, bob);
1968 }
1969#line 1485 "Test.c"
1970 return;
1971}
1972}
1973#line 88 "Test.c"
1974#line 95 "Test.c"
1975void setup(void)
1976{ char const * __restrict __cil_tmp1 ;
1977 char const * __restrict __cil_tmp2 ;
1978 char const * __restrict __cil_tmp3 ;
1979
1980 {
1981 {
1982#line 96
1983 bob = 1;
1984#line 97
1985 setup_bob(bob);
1986#line 98
1987 __cil_tmp1 = (char const * __restrict )"bob: %d\n";
1988#line 98
1989 printf(__cil_tmp1, bob);
1990#line 100
1991 rjh = 2;
1992#line 101
1993 setup_rjh(rjh);
1994#line 102
1995 __cil_tmp2 = (char const * __restrict )"rjh: %d\n";
1996#line 102
1997 printf(__cil_tmp2, rjh);
1998#line 104
1999 chuck = 3;
2000#line 105
2001 setup_chuck(chuck);
2002#line 106
2003 __cil_tmp3 = (char const * __restrict )"chuck: %d\n";
2004#line 106
2005 printf(__cil_tmp3, chuck);
2006 }
2007#line 1556 "Test.c"
2008 return;
2009}
2010}
2011#line 112 "Test.c"
2012int main(void)
2013{ int retValue_acc ;
2014 int tmp ;
2015
2016 {
2017 {
2018#line 113
2019 select_helpers();
2020#line 114
2021 select_features();
2022#line 115
2023 tmp = valid_product();
2024 }
2025#line 115
2026 if (tmp) {
2027 {
2028#line 116
2029 setup();
2030#line 117
2031 test();
2032 }
2033 } else {
2034
2035 }
2036#line 1587 "Test.c"
2037 return (retValue_acc);
2038}
2039}
2040#line 125 "Test.c"
2041void bobKeyAdd(void)
2042{ int tmp ;
2043 int tmp___0 ;
2044 char const * __restrict __cil_tmp3 ;
2045 char const * __restrict __cil_tmp4 ;
2046
2047 {
2048 {
2049#line 126
2050 createClientKeyringEntry(bob);
2051#line 127
2052 setClientKeyringUser(bob, 0, 2);
2053#line 128
2054 setClientKeyringPublicKey(bob, 0, 456);
2055#line 129
2056 puts("bob added rjhs key");
2057#line 130
2058 tmp = getClientKeyringUser(bob, 0);
2059#line 130
2060 __cil_tmp3 = (char const * __restrict )"%d\n";
2061#line 130
2062 printf(__cil_tmp3, tmp);
2063#line 131
2064 tmp___0 = getClientKeyringPublicKey(bob, 0);
2065#line 131
2066 __cil_tmp4 = (char const * __restrict )"%d\n";
2067#line 131
2068 printf(__cil_tmp4, tmp___0);
2069 }
2070#line 1621 "Test.c"
2071 return;
2072}
2073}
2074#line 137 "Test.c"
2075void rjhKeyAdd(void)
2076{
2077
2078 {
2079 {
2080#line 138
2081 createClientKeyringEntry(rjh);
2082#line 139
2083 setClientKeyringUser(rjh, 0, 1);
2084#line 140
2085 setClientKeyringPublicKey(rjh, 0, 123);
2086 }
2087#line 1645 "Test.c"
2088 return;
2089}
2090}
2091#line 146 "Test.c"
2092void rjhKeyAddChuck(void)
2093{
2094
2095 {
2096 {
2097#line 147
2098 createClientKeyringEntry(rjh);
2099#line 148
2100 setClientKeyringUser(rjh, 0, 3);
2101#line 149
2102 setClientKeyringPublicKey(rjh, 0, 789);
2103 }
2104#line 1669 "Test.c"
2105 return;
2106}
2107}
2108#line 156 "Test.c"
2109void bobKeyAddChuck(void)
2110{
2111
2112 {
2113 {
2114#line 157
2115 createClientKeyringEntry(bob);
2116#line 158
2117 setClientKeyringUser(bob, 1, 3);
2118#line 159
2119 setClientKeyringPublicKey(bob, 1, 789);
2120 }
2121#line 1693 "Test.c"
2122 return;
2123}
2124}
2125#line 165 "Test.c"
2126void chuckKeyAdd(void)
2127{
2128
2129 {
2130 {
2131#line 166
2132 createClientKeyringEntry(chuck);
2133#line 167
2134 setClientKeyringUser(chuck, 0, 1);
2135#line 168
2136 setClientKeyringPublicKey(chuck, 0, 123);
2137 }
2138#line 1717 "Test.c"
2139 return;
2140}
2141}
2142#line 174 "Test.c"
2143void chuckKeyAddRjh(void)
2144{
2145
2146 {
2147 {
2148#line 175
2149 createClientKeyringEntry(chuck);
2150#line 176
2151 setClientKeyringUser(chuck, 0, 2);
2152#line 177
2153 setClientKeyringPublicKey(chuck, 0, 456);
2154 }
2155#line 1741 "Test.c"
2156 return;
2157}
2158}
2159#line 183 "Test.c"
2160void rjhDeletePrivateKey(void)
2161{
2162
2163 {
2164 {
2165#line 184
2166 setClientPrivateKey(rjh, 0);
2167 }
2168#line 1761 "Test.c"
2169 return;
2170}
2171}
2172#line 190 "Test.c"
2173void bobKeyChange(void)
2174{
2175
2176 {
2177 {
2178#line 191
2179 generateKeyPair(bob, 777);
2180 }
2181#line 1781 "Test.c"
2182 return;
2183}
2184}
2185#line 197 "Test.c"
2186void rjhKeyChange(void)
2187{
2188
2189 {
2190 {
2191#line 198
2192 generateKeyPair(rjh, 666);
2193 }
2194#line 1801 "Test.c"
2195 return;
2196}
2197}
2198#line 204 "Test.c"
2199void rjhSetAutoRespond(void)
2200{
2201
2202 {
2203 {
2204#line 205
2205 setClientAutoResponse(rjh, 1);
2206 }
2207#line 1821 "Test.c"
2208 return;
2209}
2210}
2211#line 1 "libacc.o"
2212#pragma merger(0,"libacc.i","")
2213#line 73 "/usr/include/assert.h"
2214extern __attribute__((__nothrow__, __noreturn__)) void __assert_fail(char const *__assertion ,
2215 char const *__file ,
2216 unsigned int __line ,
2217 char const *__function ) ;
2218#line 471 "/usr/include/stdlib.h"
2219extern __attribute__((__nothrow__)) void *malloc(size_t __size ) __attribute__((__malloc__)) ;
2220#line 488
2221extern __attribute__((__nothrow__)) void free(void *__ptr ) ;
2222#line 32 "libacc.c"
2223void __utac__exception__cf_handler_set(void *exception , int (*cflow_func)(int ,
2224 int ) ,
2225 int val )
2226{ struct __UTAC__EXCEPTION *excep ;
2227 struct __UTAC__CFLOW_FUNC *cf ;
2228 void *tmp ;
2229 unsigned long __cil_tmp7 ;
2230 unsigned long __cil_tmp8 ;
2231 unsigned long __cil_tmp9 ;
2232 unsigned long __cil_tmp10 ;
2233 unsigned long __cil_tmp11 ;
2234 unsigned long __cil_tmp12 ;
2235 unsigned long __cil_tmp13 ;
2236 unsigned long __cil_tmp14 ;
2237 int (**mem_15)(int , int ) ;
2238 int *mem_16 ;
2239 struct __UTAC__CFLOW_FUNC **mem_17 ;
2240 struct __UTAC__CFLOW_FUNC **mem_18 ;
2241 struct __UTAC__CFLOW_FUNC **mem_19 ;
2242
2243 {
2244 {
2245#line 33
2246 excep = (struct __UTAC__EXCEPTION *)exception;
2247#line 34
2248 tmp = malloc(24UL);
2249#line 34
2250 cf = (struct __UTAC__CFLOW_FUNC *)tmp;
2251#line 36
2252 mem_15 = (int (**)(int , int ))cf;
2253#line 36
2254 *mem_15 = cflow_func;
2255#line 37
2256 __cil_tmp7 = (unsigned long )cf;
2257#line 37
2258 __cil_tmp8 = __cil_tmp7 + 8;
2259#line 37
2260 mem_16 = (int *)__cil_tmp8;
2261#line 37
2262 *mem_16 = val;
2263#line 38
2264 __cil_tmp9 = (unsigned long )cf;
2265#line 38
2266 __cil_tmp10 = __cil_tmp9 + 16;
2267#line 38
2268 __cil_tmp11 = (unsigned long )excep;
2269#line 38
2270 __cil_tmp12 = __cil_tmp11 + 24;
2271#line 38
2272 mem_17 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp10;
2273#line 38
2274 mem_18 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp12;
2275#line 38
2276 *mem_17 = *mem_18;
2277#line 39
2278 __cil_tmp13 = (unsigned long )excep;
2279#line 39
2280 __cil_tmp14 = __cil_tmp13 + 24;
2281#line 39
2282 mem_19 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp14;
2283#line 39
2284 *mem_19 = cf;
2285 }
2286#line 654 "libacc.c"
2287 return;
2288}
2289}
2290#line 44 "libacc.c"
2291void __utac__exception__cf_handler_free(void *exception )
2292{ struct __UTAC__EXCEPTION *excep ;
2293 struct __UTAC__CFLOW_FUNC *cf ;
2294 struct __UTAC__CFLOW_FUNC *tmp ;
2295 unsigned long __cil_tmp5 ;
2296 unsigned long __cil_tmp6 ;
2297 struct __UTAC__CFLOW_FUNC *__cil_tmp7 ;
2298 unsigned long __cil_tmp8 ;
2299 unsigned long __cil_tmp9 ;
2300 unsigned long __cil_tmp10 ;
2301 unsigned long __cil_tmp11 ;
2302 void *__cil_tmp12 ;
2303 unsigned long __cil_tmp13 ;
2304 unsigned long __cil_tmp14 ;
2305 struct __UTAC__CFLOW_FUNC **mem_15 ;
2306 struct __UTAC__CFLOW_FUNC **mem_16 ;
2307 struct __UTAC__CFLOW_FUNC **mem_17 ;
2308
2309 {
2310#line 45
2311 excep = (struct __UTAC__EXCEPTION *)exception;
2312#line 46
2313 __cil_tmp5 = (unsigned long )excep;
2314#line 46
2315 __cil_tmp6 = __cil_tmp5 + 24;
2316#line 46
2317 mem_15 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp6;
2318#line 46
2319 cf = *mem_15;
2320 {
2321#line 49
2322 while (1) {
2323 while_0_continue: ;
2324 {
2325#line 49
2326 __cil_tmp7 = (struct __UTAC__CFLOW_FUNC *)0;
2327#line 49
2328 __cil_tmp8 = (unsigned long )__cil_tmp7;
2329#line 49
2330 __cil_tmp9 = (unsigned long )cf;
2331#line 49
2332 if (__cil_tmp9 != __cil_tmp8) {
2333
2334 } else {
2335 goto while_0_break;
2336 }
2337 }
2338 {
2339#line 50
2340 tmp = cf;
2341#line 51
2342 __cil_tmp10 = (unsigned long )cf;
2343#line 51
2344 __cil_tmp11 = __cil_tmp10 + 16;
2345#line 51
2346 mem_16 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp11;
2347#line 51
2348 cf = *mem_16;
2349#line 52
2350 __cil_tmp12 = (void *)tmp;
2351#line 52
2352 free(__cil_tmp12);
2353 }
2354 }
2355 while_0_break: ;
2356 }
2357#line 55
2358 __cil_tmp13 = (unsigned long )excep;
2359#line 55
2360 __cil_tmp14 = __cil_tmp13 + 24;
2361#line 55
2362 mem_17 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp14;
2363#line 55
2364 *mem_17 = (struct __UTAC__CFLOW_FUNC *)0;
2365#line 694 "libacc.c"
2366 return;
2367}
2368}
2369#line 59 "libacc.c"
2370void __utac__exception__cf_handler_reset(void *exception )
2371{ struct __UTAC__EXCEPTION *excep ;
2372 struct __UTAC__CFLOW_FUNC *cf ;
2373 unsigned long __cil_tmp5 ;
2374 unsigned long __cil_tmp6 ;
2375 struct __UTAC__CFLOW_FUNC *__cil_tmp7 ;
2376 unsigned long __cil_tmp8 ;
2377 unsigned long __cil_tmp9 ;
2378 int (*__cil_tmp10)(int , int ) ;
2379 unsigned long __cil_tmp11 ;
2380 unsigned long __cil_tmp12 ;
2381 int __cil_tmp13 ;
2382 unsigned long __cil_tmp14 ;
2383 unsigned long __cil_tmp15 ;
2384 struct __UTAC__CFLOW_FUNC **mem_16 ;
2385 int (**mem_17)(int , int ) ;
2386 int *mem_18 ;
2387 struct __UTAC__CFLOW_FUNC **mem_19 ;
2388
2389 {
2390#line 60
2391 excep = (struct __UTAC__EXCEPTION *)exception;
2392#line 61
2393 __cil_tmp5 = (unsigned long )excep;
2394#line 61
2395 __cil_tmp6 = __cil_tmp5 + 24;
2396#line 61
2397 mem_16 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp6;
2398#line 61
2399 cf = *mem_16;
2400 {
2401#line 64
2402 while (1) {
2403 while_1_continue: ;
2404 {
2405#line 64
2406 __cil_tmp7 = (struct __UTAC__CFLOW_FUNC *)0;
2407#line 64
2408 __cil_tmp8 = (unsigned long )__cil_tmp7;
2409#line 64
2410 __cil_tmp9 = (unsigned long )cf;
2411#line 64
2412 if (__cil_tmp9 != __cil_tmp8) {
2413
2414 } else {
2415 goto while_1_break;
2416 }
2417 }
2418 {
2419#line 65
2420 mem_17 = (int (**)(int , int ))cf;
2421#line 65
2422 __cil_tmp10 = *mem_17;
2423#line 65
2424 __cil_tmp11 = (unsigned long )cf;
2425#line 65
2426 __cil_tmp12 = __cil_tmp11 + 8;
2427#line 65
2428 mem_18 = (int *)__cil_tmp12;
2429#line 65
2430 __cil_tmp13 = *mem_18;
2431#line 65
2432 (*__cil_tmp10)(4, __cil_tmp13);
2433#line 66
2434 __cil_tmp14 = (unsigned long )cf;
2435#line 66
2436 __cil_tmp15 = __cil_tmp14 + 16;
2437#line 66
2438 mem_19 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp15;
2439#line 66
2440 cf = *mem_19;
2441 }
2442 }
2443 while_1_break: ;
2444 }
2445 {
2446#line 69
2447 __utac__exception__cf_handler_free(exception);
2448 }
2449#line 732 "libacc.c"
2450 return;
2451}
2452}
2453#line 80 "libacc.c"
2454void *__utac__error_stack_mgt(void *env , int mode , int count ) ;
2455#line 80 "libacc.c"
2456static struct __ACC__ERR *head = (struct __ACC__ERR *)0;
2457#line 79 "libacc.c"
2458void *__utac__error_stack_mgt(void *env , int mode , int count )
2459{ void *retValue_acc ;
2460 struct __ACC__ERR *new ;
2461 void *tmp ;
2462 struct __ACC__ERR *temp ;
2463 struct __ACC__ERR *next ;
2464 void *excep ;
2465 unsigned long __cil_tmp10 ;
2466 unsigned long __cil_tmp11 ;
2467 unsigned long __cil_tmp12 ;
2468 unsigned long __cil_tmp13 ;
2469 void *__cil_tmp14 ;
2470 unsigned long __cil_tmp15 ;
2471 unsigned long __cil_tmp16 ;
2472 void *__cil_tmp17 ;
2473 void **mem_18 ;
2474 struct __ACC__ERR **mem_19 ;
2475 struct __ACC__ERR **mem_20 ;
2476 void **mem_21 ;
2477 struct __ACC__ERR **mem_22 ;
2478 void **mem_23 ;
2479 void **mem_24 ;
2480
2481 {
2482#line 82 "libacc.c"
2483 if (count == 0) {
2484#line 758 "libacc.c"
2485 return (retValue_acc);
2486 } else {
2487
2488 }
2489#line 86 "libacc.c"
2490 if (mode == 0) {
2491 {
2492#line 87
2493 tmp = malloc(16UL);
2494#line 87
2495 new = (struct __ACC__ERR *)tmp;
2496#line 88
2497 mem_18 = (void **)new;
2498#line 88
2499 *mem_18 = env;
2500#line 89
2501 __cil_tmp10 = (unsigned long )new;
2502#line 89
2503 __cil_tmp11 = __cil_tmp10 + 8;
2504#line 89
2505 mem_19 = (struct __ACC__ERR **)__cil_tmp11;
2506#line 89
2507 *mem_19 = head;
2508#line 90
2509 head = new;
2510#line 776 "libacc.c"
2511 retValue_acc = (void *)new;
2512 }
2513#line 778
2514 return (retValue_acc);
2515 } else {
2516
2517 }
2518#line 94 "libacc.c"
2519 if (mode == 1) {
2520#line 95
2521 temp = head;
2522 {
2523#line 98
2524 while (1) {
2525 while_2_continue: ;
2526#line 98
2527 if (count > 1) {
2528
2529 } else {
2530 goto while_2_break;
2531 }
2532 {
2533#line 99
2534 __cil_tmp12 = (unsigned long )temp;
2535#line 99
2536 __cil_tmp13 = __cil_tmp12 + 8;
2537#line 99
2538 mem_20 = (struct __ACC__ERR **)__cil_tmp13;
2539#line 99
2540 next = *mem_20;
2541#line 100
2542 mem_21 = (void **)temp;
2543#line 100
2544 excep = *mem_21;
2545#line 101
2546 __cil_tmp14 = (void *)temp;
2547#line 101
2548 free(__cil_tmp14);
2549#line 102
2550 __utac__exception__cf_handler_reset(excep);
2551#line 103
2552 temp = next;
2553#line 104
2554 count = count - 1;
2555 }
2556 }
2557 while_2_break: ;
2558 }
2559 {
2560#line 107
2561 __cil_tmp15 = (unsigned long )temp;
2562#line 107
2563 __cil_tmp16 = __cil_tmp15 + 8;
2564#line 107
2565 mem_22 = (struct __ACC__ERR **)__cil_tmp16;
2566#line 107
2567 head = *mem_22;
2568#line 108
2569 mem_23 = (void **)temp;
2570#line 108
2571 excep = *mem_23;
2572#line 109
2573 __cil_tmp17 = (void *)temp;
2574#line 109
2575 free(__cil_tmp17);
2576#line 110
2577 __utac__exception__cf_handler_reset(excep);
2578#line 820 "libacc.c"
2579 retValue_acc = excep;
2580 }
2581#line 822
2582 return (retValue_acc);
2583 } else {
2584
2585 }
2586#line 114
2587 if (mode == 2) {
2588#line 118 "libacc.c"
2589 if (head) {
2590#line 831
2591 mem_24 = (void **)head;
2592#line 831
2593 retValue_acc = *mem_24;
2594#line 833
2595 return (retValue_acc);
2596 } else {
2597#line 837 "libacc.c"
2598 retValue_acc = (void *)0;
2599#line 839
2600 return (retValue_acc);
2601 }
2602 } else {
2603
2604 }
2605#line 846 "libacc.c"
2606 return (retValue_acc);
2607}
2608}
2609#line 122 "libacc.c"
2610void *__utac__get_this_arg(int i , struct JoinPoint *this )
2611{ void *retValue_acc ;
2612 unsigned long __cil_tmp4 ;
2613 unsigned long __cil_tmp5 ;
2614 int __cil_tmp6 ;
2615 int __cil_tmp7 ;
2616 unsigned long __cil_tmp8 ;
2617 unsigned long __cil_tmp9 ;
2618 void **__cil_tmp10 ;
2619 void **__cil_tmp11 ;
2620 int *mem_12 ;
2621 void ***mem_13 ;
2622
2623 {
2624#line 123
2625 if (i > 0) {
2626 {
2627#line 123
2628 __cil_tmp4 = (unsigned long )this;
2629#line 123
2630 __cil_tmp5 = __cil_tmp4 + 16;
2631#line 123
2632 mem_12 = (int *)__cil_tmp5;
2633#line 123
2634 __cil_tmp6 = *mem_12;
2635#line 123
2636 if (i <= __cil_tmp6) {
2637
2638 } else {
2639 {
2640#line 123
2641 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
2642 123U, "__utac__get_this_arg");
2643 }
2644 }
2645 }
2646 } else {
2647 {
2648#line 123
2649 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
2650 123U, "__utac__get_this_arg");
2651 }
2652 }
2653#line 870 "libacc.c"
2654 __cil_tmp7 = i - 1;
2655#line 870
2656 __cil_tmp8 = (unsigned long )this;
2657#line 870
2658 __cil_tmp9 = __cil_tmp8 + 8;
2659#line 870
2660 mem_13 = (void ***)__cil_tmp9;
2661#line 870
2662 __cil_tmp10 = *mem_13;
2663#line 870
2664 __cil_tmp11 = __cil_tmp10 + __cil_tmp7;
2665#line 870
2666 retValue_acc = *__cil_tmp11;
2667#line 872
2668 return (retValue_acc);
2669#line 879
2670 return (retValue_acc);
2671}
2672}
2673#line 129 "libacc.c"
2674char const *__utac__get_this_argtype(int i , struct JoinPoint *this )
2675{ char const *retValue_acc ;
2676 unsigned long __cil_tmp4 ;
2677 unsigned long __cil_tmp5 ;
2678 int __cil_tmp6 ;
2679 int __cil_tmp7 ;
2680 unsigned long __cil_tmp8 ;
2681 unsigned long __cil_tmp9 ;
2682 char const **__cil_tmp10 ;
2683 char const **__cil_tmp11 ;
2684 int *mem_12 ;
2685 char const ***mem_13 ;
2686
2687 {
2688#line 131
2689 if (i > 0) {
2690 {
2691#line 131
2692 __cil_tmp4 = (unsigned long )this;
2693#line 131
2694 __cil_tmp5 = __cil_tmp4 + 16;
2695#line 131
2696 mem_12 = (int *)__cil_tmp5;
2697#line 131
2698 __cil_tmp6 = *mem_12;
2699#line 131
2700 if (i <= __cil_tmp6) {
2701
2702 } else {
2703 {
2704#line 131
2705 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
2706 131U, "__utac__get_this_argtype");
2707 }
2708 }
2709 }
2710 } else {
2711 {
2712#line 131
2713 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
2714 131U, "__utac__get_this_argtype");
2715 }
2716 }
2717#line 903 "libacc.c"
2718 __cil_tmp7 = i - 1;
2719#line 903
2720 __cil_tmp8 = (unsigned long )this;
2721#line 903
2722 __cil_tmp9 = __cil_tmp8 + 24;
2723#line 903
2724 mem_13 = (char const ***)__cil_tmp9;
2725#line 903
2726 __cil_tmp10 = *mem_13;
2727#line 903
2728 __cil_tmp11 = __cil_tmp10 + __cil_tmp7;
2729#line 903
2730 retValue_acc = *__cil_tmp11;
2731#line 905
2732 return (retValue_acc);
2733#line 912
2734 return (retValue_acc);
2735}
2736}
2737#line 1 "wsllib_check.o"
2738#pragma merger(0,"wsllib_check.i","")
2739#line 3 "wsllib_check.c"
2740void __automaton_fail(void)
2741{
2742
2743 {
2744 goto ERROR;
2745 ERROR: ;
2746#line 53 "wsllib_check.c"
2747 return;
2748}
2749}
2750#line 1 "Client.o"
2751#pragma merger(0,"Client.i","")
2752#line 10 "EmailLib.h"
2753int getEmailFrom(int handle ) ;
2754#line 12
2755void setEmailFrom(int handle , int value ) ;
2756#line 14
2757int getEmailTo(int handle ) ;
2758#line 16
2759void setEmailTo(int handle , int value ) ;
2760#line 34
2761int isSigned(int handle ) ;
2762#line 36
2763void setEmailIsSigned(int handle , int value ) ;
2764#line 38
2765int getEmailSignKey(int handle ) ;
2766#line 40
2767void setEmailSignKey(int handle , int value ) ;
2768#line 44
2769void setEmailIsSignatureVerified(int handle , int value ) ;
2770#line 9 "Email.h"
2771int isReadable(int msg ) ;
2772#line 12
2773int createEmail(int from , int to ) ;
2774#line 14 "Client.h"
2775void queue(int client , int msg ) ;
2776#line 24
2777void mail(int client , int msg ) ;
2778#line 28
2779void deliver(int client , int msg ) ;
2780#line 30
2781void incoming(int client , int msg ) ;
2782#line 32
2783int createClient(char *name ) ;
2784#line 40
2785int isKeyPairValid(int publicKey , int privateKey ) ;
2786#line 45
2787void autoRespond(int client , int msg ) ;
2788#line 47
2789void sign(int client , int msg ) ;
2790#line 49
2791void verify(int client , int msg ) ;
2792#line 6 "Client.c"
2793int queue_empty = 1;
2794#line 9 "Client.c"
2795int queued_message ;
2796#line 12 "Client.c"
2797int queued_client ;
2798#line 13
2799void __utac_acc__SignVerify_spec__1(int msg ) ;
2800#line 18 "Client.c"
2801void mail(int client , int msg )
2802{ int __utac__ad__arg1 ;
2803 int tmp ;
2804
2805 {
2806 {
2807#line 726 "Client.c"
2808 __utac__ad__arg1 = msg;
2809#line 727
2810 __utac_acc__SignVerify_spec__1(__utac__ad__arg1);
2811#line 19 "Client.c"
2812 puts("mail sent");
2813#line 20
2814 tmp = getEmailTo(msg);
2815#line 20
2816 incoming(tmp, msg);
2817 }
2818#line 744 "Client.c"
2819 return;
2820}
2821}
2822#line 27 "Client.c"
2823void outgoing__wrappee__AutoResponder(int client , int msg )
2824{ int tmp ;
2825
2826 {
2827 {
2828#line 28
2829 tmp = getClientId(client);
2830#line 28
2831 setEmailFrom(msg, tmp);
2832#line 29
2833 mail(client, msg);
2834 }
2835#line 766 "Client.c"
2836 return;
2837}
2838}
2839#line 35 "Client.c"
2840void outgoing(int client , int msg )
2841{
2842
2843 {
2844 {
2845#line 36
2846 sign(client, msg);
2847#line 37
2848 outgoing__wrappee__AutoResponder(client, msg);
2849 }
2850#line 788 "Client.c"
2851 return;
2852}
2853}
2854#line 44 "Client.c"
2855void deliver(int client , int msg )
2856{
2857
2858 {
2859 {
2860#line 45
2861 puts("mail delivered\n");
2862 }
2863#line 808 "Client.c"
2864 return;
2865}
2866}
2867#line 52 "Client.c"
2868void incoming__wrappee__Keys(int client , int msg )
2869{
2870
2871 {
2872 {
2873#line 53
2874 deliver(client, msg);
2875 }
2876#line 828 "Client.c"
2877 return;
2878}
2879}
2880#line 59 "Client.c"
2881void incoming__wrappee__Sign(int client , int msg )
2882{ int tmp ;
2883
2884 {
2885 {
2886#line 60
2887 incoming__wrappee__Keys(client, msg);
2888#line 61
2889 tmp = getClientAutoResponse(client);
2890 }
2891#line 61
2892 if (tmp) {
2893 {
2894#line 62
2895 autoRespond(client, msg);
2896 }
2897 } else {
2898
2899 }
2900#line 853 "Client.c"
2901 return;
2902}
2903}
2904#line 69 "Client.c"
2905void incoming(int client , int msg )
2906{
2907
2908 {
2909 {
2910#line 70
2911 verify(client, msg);
2912#line 71
2913 incoming__wrappee__Sign(client, msg);
2914 }
2915#line 875 "Client.c"
2916 return;
2917}
2918}
2919#line 75 "Client.c"
2920int createClient(char *name )
2921{ int retValue_acc ;
2922 int client ;
2923 int tmp ;
2924
2925 {
2926 {
2927#line 76
2928 tmp = initClient();
2929#line 76
2930 client = tmp;
2931#line 897 "Client.c"
2932 retValue_acc = client;
2933 }
2934#line 899
2935 return (retValue_acc);
2936#line 906
2937 return (retValue_acc);
2938}
2939}
2940#line 83 "Client.c"
2941void sendEmail(int sender , int receiver )
2942{ int email ;
2943 int tmp ;
2944
2945 {
2946 {
2947#line 84
2948 tmp = createEmail(0, receiver);
2949#line 84
2950 email = tmp;
2951#line 85
2952 outgoing(sender, email);
2953 }
2954#line 934 "Client.c"
2955 return;
2956}
2957}
2958#line 93 "Client.c"
2959void queue(int client , int msg )
2960{
2961
2962 {
2963#line 94
2964 queue_empty = 0;
2965#line 95
2966 queued_message = msg;
2967#line 96
2968 queued_client = client;
2969#line 958 "Client.c"
2970 return;
2971}
2972}
2973#line 102 "Client.c"
2974int is_queue_empty(void)
2975{ int retValue_acc ;
2976
2977 {
2978#line 976 "Client.c"
2979 retValue_acc = queue_empty;
2980#line 978
2981 return (retValue_acc);
2982#line 985
2983 return (retValue_acc);
2984}
2985}
2986#line 109 "Client.c"
2987int get_queued_client(void)
2988{ int retValue_acc ;
2989
2990 {
2991#line 1007 "Client.c"
2992 retValue_acc = queued_client;
2993#line 1009
2994 return (retValue_acc);
2995#line 1016
2996 return (retValue_acc);
2997}
2998}
2999#line 116 "Client.c"
3000int get_queued_email(void)
3001{ int retValue_acc ;
3002
3003 {
3004#line 1038 "Client.c"
3005 retValue_acc = queued_message;
3006#line 1040
3007 return (retValue_acc);
3008#line 1047
3009 return (retValue_acc);
3010}
3011}
3012#line 122 "Client.c"
3013int isKeyPairValid(int publicKey , int privateKey )
3014{ int retValue_acc ;
3015 char const * __restrict __cil_tmp4 ;
3016
3017 {
3018 {
3019#line 123
3020 __cil_tmp4 = (char const * __restrict )"keypair valid %d %d";
3021#line 123
3022 printf(__cil_tmp4, publicKey, privateKey);
3023 }
3024#line 124 "Client.c"
3025 if (! publicKey) {
3026#line 1072 "Client.c"
3027 retValue_acc = 0;
3028#line 1074
3029 return (retValue_acc);
3030 } else {
3031#line 124 "Client.c"
3032 if (! privateKey) {
3033#line 1072 "Client.c"
3034 retValue_acc = 0;
3035#line 1074
3036 return (retValue_acc);
3037 } else {
3038
3039 }
3040 }
3041#line 1079 "Client.c"
3042 retValue_acc = privateKey == publicKey;
3043#line 1081
3044 return (retValue_acc);
3045#line 1088
3046 return (retValue_acc);
3047}
3048}
3049#line 132 "Client.c"
3050void generateKeyPair(int client , int seed )
3051{
3052
3053 {
3054 {
3055#line 133
3056 setClientPrivateKey(client, seed);
3057 }
3058#line 1112 "Client.c"
3059 return;
3060}
3061}
3062#line 139 "Client.c"
3063void autoRespond(int client , int msg )
3064{ int sender ;
3065 int tmp ;
3066
3067 {
3068 {
3069#line 140
3070 puts("sending autoresponse\n");
3071#line 141
3072 tmp = getEmailFrom(msg);
3073#line 141
3074 sender = tmp;
3075#line 142
3076 setEmailTo(msg, sender);
3077#line 143
3078 queue(client, msg);
3079 }
3080#line 1254 "Client.c"
3081 return;
3082}
3083}
3084#line 148 "Client.c"
3085void sign(int client , int msg )
3086{ int privkey ;
3087 int tmp ;
3088
3089 {
3090 {
3091#line 149
3092 tmp = getClientPrivateKey(client);
3093#line 149
3094 privkey = tmp;
3095 }
3096#line 150
3097 if (! privkey) {
3098#line 151
3099 return;
3100 } else {
3101
3102 }
3103 {
3104#line 152
3105 setEmailIsSigned(msg, 1);
3106#line 153
3107 setEmailSignKey(msg, privkey);
3108 }
3109#line 1284 "Client.c"
3110 return;
3111}
3112}
3113#line 1286
3114void __utac_acc__SignVerify_spec__2(int client , int msg ) ;
3115#line 158 "Client.c"
3116void verify(int client , int msg )
3117{ int __utac__ad__arg1 ;
3118 int __utac__ad__arg2 ;
3119 int tmp ;
3120 int tmp___0 ;
3121 int pubkey ;
3122 int tmp___1 ;
3123 int tmp___2 ;
3124 int tmp___3 ;
3125 int tmp___4 ;
3126
3127 {
3128 {
3129#line 1297 "Client.c"
3130 __utac__ad__arg1 = client;
3131#line 1298
3132 __utac__ad__arg2 = msg;
3133#line 1299
3134 __utac_acc__SignVerify_spec__2(__utac__ad__arg1, __utac__ad__arg2);
3135#line 163 "Client.c"
3136 tmp = isReadable(msg);
3137 }
3138#line 163
3139 if (tmp) {
3140 {
3141#line 163
3142 tmp___0 = isSigned(msg);
3143 }
3144#line 163
3145 if (tmp___0) {
3146
3147 } else {
3148#line 164
3149 return;
3150 }
3151 } else {
3152#line 164
3153 return;
3154 }
3155 {
3156#line 163
3157 tmp___1 = getEmailFrom(msg);
3158#line 163
3159 tmp___2 = findPublicKey(client, tmp___1);
3160#line 163
3161 pubkey = tmp___2;
3162 }
3163#line 164
3164 if (pubkey) {
3165 {
3166#line 164
3167 tmp___3 = getEmailSignKey(msg);
3168#line 164
3169 tmp___4 = isKeyPairValid(tmp___3, pubkey);
3170 }
3171#line 164
3172 if (tmp___4) {
3173 {
3174#line 165
3175 setEmailIsSignatureVerified(msg, 1);
3176 }
3177 } else {
3178
3179 }
3180 } else {
3181
3182 }
3183#line 1325 "Client.c"
3184 return;
3185}
3186}
3187#line 1 "EmailLib.o"
3188#pragma merger(0,"EmailLib.i","")
3189#line 4 "EmailLib.h"
3190int initEmail(void) ;
3191#line 6
3192int getEmailId(int handle ) ;
3193#line 8
3194void setEmailId(int handle , int value ) ;
3195#line 18
3196char *getEmailSubject(int handle ) ;
3197#line 20
3198void setEmailSubject(int handle , char *value ) ;
3199#line 22
3200char *getEmailBody(int handle ) ;
3201#line 24
3202void setEmailBody(int handle , char *value ) ;
3203#line 26
3204int isEncrypted(int handle ) ;
3205#line 28
3206void setEmailIsEncrypted(int handle , int value ) ;
3207#line 30
3208int getEmailEncryptionKey(int handle ) ;
3209#line 32
3210void setEmailEncryptionKey(int handle , int value ) ;
3211#line 42
3212int isVerified(int handle ) ;
3213#line 5 "EmailLib.c"
3214int __ste_Email_counter = 0;
3215#line 7 "EmailLib.c"
3216int initEmail(void)
3217{ int retValue_acc ;
3218
3219 {
3220#line 12 "EmailLib.c"
3221 if (__ste_Email_counter < 2) {
3222#line 670
3223 __ste_Email_counter = __ste_Email_counter + 1;
3224#line 670
3225 retValue_acc = __ste_Email_counter;
3226#line 672
3227 return (retValue_acc);
3228 } else {
3229#line 678 "EmailLib.c"
3230 retValue_acc = -1;
3231#line 680
3232 return (retValue_acc);
3233 }
3234#line 687 "EmailLib.c"
3235 return (retValue_acc);
3236}
3237}
3238#line 15 "EmailLib.c"
3239int __ste_email_id0 = 0;
3240#line 17 "EmailLib.c"
3241int __ste_email_id1 = 0;
3242#line 19 "EmailLib.c"
3243int getEmailId(int handle )
3244{ int retValue_acc ;
3245
3246 {
3247#line 26 "EmailLib.c"
3248 if (handle == 1) {
3249#line 716
3250 retValue_acc = __ste_email_id0;
3251#line 718
3252 return (retValue_acc);
3253 } else {
3254#line 720
3255 if (handle == 2) {
3256#line 725
3257 retValue_acc = __ste_email_id1;
3258#line 727
3259 return (retValue_acc);
3260 } else {
3261#line 733 "EmailLib.c"
3262 retValue_acc = 0;
3263#line 735
3264 return (retValue_acc);
3265 }
3266 }
3267#line 742 "EmailLib.c"
3268 return (retValue_acc);
3269}
3270}
3271#line 29 "EmailLib.c"
3272void setEmailId(int handle , int value )
3273{
3274
3275 {
3276#line 35
3277 if (handle == 1) {
3278#line 31
3279 __ste_email_id0 = value;
3280 } else {
3281#line 32
3282 if (handle == 2) {
3283#line 33
3284 __ste_email_id1 = value;
3285 } else {
3286
3287 }
3288 }
3289#line 773 "EmailLib.c"
3290 return;
3291}
3292}
3293#line 37 "EmailLib.c"
3294int __ste_email_from0 = 0;
3295#line 39 "EmailLib.c"
3296int __ste_email_from1 = 0;
3297#line 41 "EmailLib.c"
3298int getEmailFrom(int handle )
3299{ int retValue_acc ;
3300
3301 {
3302#line 48 "EmailLib.c"
3303 if (handle == 1) {
3304#line 798
3305 retValue_acc = __ste_email_from0;
3306#line 800
3307 return (retValue_acc);
3308 } else {
3309#line 802
3310 if (handle == 2) {
3311#line 807
3312 retValue_acc = __ste_email_from1;
3313#line 809
3314 return (retValue_acc);
3315 } else {
3316#line 815 "EmailLib.c"
3317 retValue_acc = 0;
3318#line 817
3319 return (retValue_acc);
3320 }
3321 }
3322#line 824 "EmailLib.c"
3323 return (retValue_acc);
3324}
3325}
3326#line 51 "EmailLib.c"
3327void setEmailFrom(int handle , int value )
3328{
3329
3330 {
3331#line 57
3332 if (handle == 1) {
3333#line 53
3334 __ste_email_from0 = value;
3335 } else {
3336#line 54
3337 if (handle == 2) {
3338#line 55
3339 __ste_email_from1 = value;
3340 } else {
3341
3342 }
3343 }
3344#line 855 "EmailLib.c"
3345 return;
3346}
3347}
3348#line 59 "EmailLib.c"
3349int __ste_email_to0 = 0;
3350#line 61 "EmailLib.c"
3351int __ste_email_to1 = 0;
3352#line 63 "EmailLib.c"
3353int getEmailTo(int handle )
3354{ int retValue_acc ;
3355
3356 {
3357#line 70 "EmailLib.c"
3358 if (handle == 1) {
3359#line 880
3360 retValue_acc = __ste_email_to0;
3361#line 882
3362 return (retValue_acc);
3363 } else {
3364#line 884
3365 if (handle == 2) {
3366#line 889
3367 retValue_acc = __ste_email_to1;
3368#line 891
3369 return (retValue_acc);
3370 } else {
3371#line 897 "EmailLib.c"
3372 retValue_acc = 0;
3373#line 899
3374 return (retValue_acc);
3375 }
3376 }
3377#line 906 "EmailLib.c"
3378 return (retValue_acc);
3379}
3380}
3381#line 73 "EmailLib.c"
3382void setEmailTo(int handle , int value )
3383{
3384
3385 {
3386#line 79
3387 if (handle == 1) {
3388#line 75
3389 __ste_email_to0 = value;
3390 } else {
3391#line 76
3392 if (handle == 2) {
3393#line 77
3394 __ste_email_to1 = value;
3395 } else {
3396
3397 }
3398 }
3399#line 937 "EmailLib.c"
3400 return;
3401}
3402}
3403#line 81 "EmailLib.c"
3404char *__ste_email_subject0 ;
3405#line 83 "EmailLib.c"
3406char *__ste_email_subject1 ;
3407#line 85 "EmailLib.c"
3408char *getEmailSubject(int handle )
3409{ char *retValue_acc ;
3410 void *__cil_tmp3 ;
3411
3412 {
3413#line 92 "EmailLib.c"
3414 if (handle == 1) {
3415#line 962
3416 retValue_acc = __ste_email_subject0;
3417#line 964
3418 return (retValue_acc);
3419 } else {
3420#line 966
3421 if (handle == 2) {
3422#line 971
3423 retValue_acc = __ste_email_subject1;
3424#line 973
3425 return (retValue_acc);
3426 } else {
3427#line 979 "EmailLib.c"
3428 __cil_tmp3 = (void *)0;
3429#line 979
3430 retValue_acc = (char *)__cil_tmp3;
3431#line 981
3432 return (retValue_acc);
3433 }
3434 }
3435#line 988 "EmailLib.c"
3436 return (retValue_acc);
3437}
3438}
3439#line 95 "EmailLib.c"
3440void setEmailSubject(int handle , char *value )
3441{
3442
3443 {
3444#line 101
3445 if (handle == 1) {
3446#line 97
3447 __ste_email_subject0 = value;
3448 } else {
3449#line 98
3450 if (handle == 2) {
3451#line 99
3452 __ste_email_subject1 = value;
3453 } else {
3454
3455 }
3456 }
3457#line 1019 "EmailLib.c"
3458 return;
3459}
3460}
3461#line 103 "EmailLib.c"
3462char *__ste_email_body0 = (char *)0;
3463#line 105 "EmailLib.c"
3464char *__ste_email_body1 = (char *)0;
3465#line 107 "EmailLib.c"
3466char *getEmailBody(int handle )
3467{ char *retValue_acc ;
3468 void *__cil_tmp3 ;
3469
3470 {
3471#line 114 "EmailLib.c"
3472 if (handle == 1) {
3473#line 1044
3474 retValue_acc = __ste_email_body0;
3475#line 1046
3476 return (retValue_acc);
3477 } else {
3478#line 1048
3479 if (handle == 2) {
3480#line 1053
3481 retValue_acc = __ste_email_body1;
3482#line 1055
3483 return (retValue_acc);
3484 } else {
3485#line 1061 "EmailLib.c"
3486 __cil_tmp3 = (void *)0;
3487#line 1061
3488 retValue_acc = (char *)__cil_tmp3;
3489#line 1063
3490 return (retValue_acc);
3491 }
3492 }
3493#line 1070 "EmailLib.c"
3494 return (retValue_acc);
3495}
3496}
3497#line 117 "EmailLib.c"
3498void setEmailBody(int handle , char *value )
3499{
3500
3501 {
3502#line 123
3503 if (handle == 1) {
3504#line 119
3505 __ste_email_body0 = value;
3506 } else {
3507#line 120
3508 if (handle == 2) {
3509#line 121
3510 __ste_email_body1 = value;
3511 } else {
3512
3513 }
3514 }
3515#line 1101 "EmailLib.c"
3516 return;
3517}
3518}
3519#line 125 "EmailLib.c"
3520int __ste_email_isEncrypted0 = 0;
3521#line 127 "EmailLib.c"
3522int __ste_email_isEncrypted1 = 0;
3523#line 129 "EmailLib.c"
3524int isEncrypted(int handle )
3525{ int retValue_acc ;
3526
3527 {
3528#line 136 "EmailLib.c"
3529 if (handle == 1) {
3530#line 1126
3531 retValue_acc = __ste_email_isEncrypted0;
3532#line 1128
3533 return (retValue_acc);
3534 } else {
3535#line 1130
3536 if (handle == 2) {
3537#line 1135
3538 retValue_acc = __ste_email_isEncrypted1;
3539#line 1137
3540 return (retValue_acc);
3541 } else {
3542#line 1143 "EmailLib.c"
3543 retValue_acc = 0;
3544#line 1145
3545 return (retValue_acc);
3546 }
3547 }
3548#line 1152 "EmailLib.c"
3549 return (retValue_acc);
3550}
3551}
3552#line 139 "EmailLib.c"
3553void setEmailIsEncrypted(int handle , int value )
3554{
3555
3556 {
3557#line 145
3558 if (handle == 1) {
3559#line 141
3560 __ste_email_isEncrypted0 = value;
3561 } else {
3562#line 142
3563 if (handle == 2) {
3564#line 143
3565 __ste_email_isEncrypted1 = value;
3566 } else {
3567
3568 }
3569 }
3570#line 1183 "EmailLib.c"
3571 return;
3572}
3573}
3574#line 147 "EmailLib.c"
3575int __ste_email_encryptionKey0 = 0;
3576#line 149 "EmailLib.c"
3577int __ste_email_encryptionKey1 = 0;
3578#line 151 "EmailLib.c"
3579int getEmailEncryptionKey(int handle )
3580{ int retValue_acc ;
3581
3582 {
3583#line 158 "EmailLib.c"
3584 if (handle == 1) {
3585#line 1208
3586 retValue_acc = __ste_email_encryptionKey0;
3587#line 1210
3588 return (retValue_acc);
3589 } else {
3590#line 1212
3591 if (handle == 2) {
3592#line 1217
3593 retValue_acc = __ste_email_encryptionKey1;
3594#line 1219
3595 return (retValue_acc);
3596 } else {
3597#line 1225 "EmailLib.c"
3598 retValue_acc = 0;
3599#line 1227
3600 return (retValue_acc);
3601 }
3602 }
3603#line 1234 "EmailLib.c"
3604 return (retValue_acc);
3605}
3606}
3607#line 161 "EmailLib.c"
3608void setEmailEncryptionKey(int handle , int value )
3609{
3610
3611 {
3612#line 167
3613 if (handle == 1) {
3614#line 163
3615 __ste_email_encryptionKey0 = value;
3616 } else {
3617#line 164
3618 if (handle == 2) {
3619#line 165
3620 __ste_email_encryptionKey1 = value;
3621 } else {
3622
3623 }
3624 }
3625#line 1265 "EmailLib.c"
3626 return;
3627}
3628}
3629#line 169 "EmailLib.c"
3630int __ste_email_isSigned0 = 0;
3631#line 171 "EmailLib.c"
3632int __ste_email_isSigned1 = 0;
3633#line 173 "EmailLib.c"
3634int isSigned(int handle )
3635{ int retValue_acc ;
3636
3637 {
3638#line 180 "EmailLib.c"
3639 if (handle == 1) {
3640#line 1290
3641 retValue_acc = __ste_email_isSigned0;
3642#line 1292
3643 return (retValue_acc);
3644 } else {
3645#line 1294
3646 if (handle == 2) {
3647#line 1299
3648 retValue_acc = __ste_email_isSigned1;
3649#line 1301
3650 return (retValue_acc);
3651 } else {
3652#line 1307 "EmailLib.c"
3653 retValue_acc = 0;
3654#line 1309
3655 return (retValue_acc);
3656 }
3657 }
3658#line 1316 "EmailLib.c"
3659 return (retValue_acc);
3660}
3661}
3662#line 183 "EmailLib.c"
3663void setEmailIsSigned(int handle , int value )
3664{
3665
3666 {
3667#line 189
3668 if (handle == 1) {
3669#line 185
3670 __ste_email_isSigned0 = value;
3671 } else {
3672#line 186
3673 if (handle == 2) {
3674#line 187
3675 __ste_email_isSigned1 = value;
3676 } else {
3677
3678 }
3679 }
3680#line 1347 "EmailLib.c"
3681 return;
3682}
3683}
3684#line 191 "EmailLib.c"
3685int __ste_email_signKey0 = 0;
3686#line 193 "EmailLib.c"
3687int __ste_email_signKey1 = 0;
3688#line 195 "EmailLib.c"
3689int getEmailSignKey(int handle )
3690{ int retValue_acc ;
3691
3692 {
3693#line 202 "EmailLib.c"
3694 if (handle == 1) {
3695#line 1372
3696 retValue_acc = __ste_email_signKey0;
3697#line 1374
3698 return (retValue_acc);
3699 } else {
3700#line 1376
3701 if (handle == 2) {
3702#line 1381
3703 retValue_acc = __ste_email_signKey1;
3704#line 1383
3705 return (retValue_acc);
3706 } else {
3707#line 1389 "EmailLib.c"
3708 retValue_acc = 0;
3709#line 1391
3710 return (retValue_acc);
3711 }
3712 }
3713#line 1398 "EmailLib.c"
3714 return (retValue_acc);
3715}
3716}
3717#line 205 "EmailLib.c"
3718void setEmailSignKey(int handle , int value )
3719{
3720
3721 {
3722#line 211
3723 if (handle == 1) {
3724#line 207
3725 __ste_email_signKey0 = value;
3726 } else {
3727#line 208
3728 if (handle == 2) {
3729#line 209
3730 __ste_email_signKey1 = value;
3731 } else {
3732
3733 }
3734 }
3735#line 1429 "EmailLib.c"
3736 return;
3737}
3738}
3739#line 213 "EmailLib.c"
3740int __ste_email_isSignatureVerified0 ;
3741#line 215 "EmailLib.c"
3742int __ste_email_isSignatureVerified1 ;
3743#line 217 "EmailLib.c"
3744int isVerified(int handle )
3745{ int retValue_acc ;
3746
3747 {
3748#line 224 "EmailLib.c"
3749 if (handle == 1) {
3750#line 1454
3751 retValue_acc = __ste_email_isSignatureVerified0;
3752#line 1456
3753 return (retValue_acc);
3754 } else {
3755#line 1458
3756 if (handle == 2) {
3757#line 1463
3758 retValue_acc = __ste_email_isSignatureVerified1;
3759#line 1465
3760 return (retValue_acc);
3761 } else {
3762#line 1471 "EmailLib.c"
3763 retValue_acc = 0;
3764#line 1473
3765 return (retValue_acc);
3766 }
3767 }
3768#line 1480 "EmailLib.c"
3769 return (retValue_acc);
3770}
3771}
3772#line 227 "EmailLib.c"
3773void setEmailIsSignatureVerified(int handle , int value )
3774{
3775
3776 {
3777#line 233
3778 if (handle == 1) {
3779#line 229
3780 __ste_email_isSignatureVerified0 = value;
3781 } else {
3782#line 230
3783 if (handle == 2) {
3784#line 231
3785 __ste_email_isSignatureVerified1 = value;
3786 } else {
3787
3788 }
3789 }
3790#line 1511 "EmailLib.c"
3791 return;
3792}
3793}
3794#line 1 "SignVerify_spec.o"
3795#pragma merger(0,"SignVerify_spec.i","")
3796#line 9 "SignVerify_spec.c"
3797int sent_signed = -1;
3798#line 13 "SignVerify_spec.c"
3799void __utac_acc__SignVerify_spec__1(int msg )
3800{ char const * __restrict __cil_tmp2 ;
3801
3802 {
3803 {
3804#line 15
3805 puts("before mail\n");
3806#line 16
3807 sent_signed = isSigned(msg);
3808#line 17
3809 __cil_tmp2 = (char const * __restrict )"sent_signed=%d\n";
3810#line 17
3811 printf(__cil_tmp2, sent_signed);
3812 }
3813#line 17
3814 return;
3815}
3816}
3817#line 21 "SignVerify_spec.c"
3818void __utac_acc__SignVerify_spec__2(int client , int msg )
3819{ int pubkey ;
3820 int tmp ;
3821 int tmp___0 ;
3822 int tmp___1 ;
3823 int tmp___2 ;
3824 char const * __restrict __cil_tmp8 ;
3825
3826 {
3827 {
3828#line 23
3829 puts("before verify\n");
3830#line 24
3831 __cil_tmp8 = (char const * __restrict )"sent_signed=%d\n";
3832#line 24
3833 printf(__cil_tmp8, sent_signed);
3834 }
3835#line 25
3836 if (sent_signed == 1) {
3837 {
3838#line 27
3839 tmp = getEmailFrom(msg);
3840#line 27
3841 tmp___0 = findPublicKey(client, tmp);
3842#line 27
3843 pubkey = tmp___0;
3844 }
3845#line 28
3846 if (pubkey == 0) {
3847 {
3848#line 29
3849 __automaton_fail();
3850 }
3851 } else {
3852 {
3853#line 28
3854 tmp___1 = getEmailSignKey(msg);
3855#line 28
3856 tmp___2 = isKeyPairValid(tmp___1, pubkey);
3857 }
3858#line 28
3859 if (tmp___2) {
3860
3861 } else {
3862 {
3863#line 29
3864 __automaton_fail();
3865 }
3866 }
3867 }
3868 } else {
3869
3870 }
3871#line 29
3872 return;
3873}
3874}
3875#line 1 "scenario.o"
3876#pragma merger(0,"scenario.i","")
3877#line 1 "scenario.c"
3878void test(void)
3879{ int op1 ;
3880 int op2 ;
3881 int op3 ;
3882 int op4 ;
3883 int op5 ;
3884 int op6 ;
3885 int op7 ;
3886 int op8 ;
3887 int op9 ;
3888 int op10 ;
3889 int op11 ;
3890 int splverifierCounter ;
3891 int tmp ;
3892 int tmp___0 ;
3893 int tmp___1 ;
3894 int tmp___2 ;
3895 int tmp___3 ;
3896 int tmp___4 ;
3897 int tmp___5 ;
3898 int tmp___6 ;
3899 int tmp___7 ;
3900 int tmp___8 ;
3901 int tmp___9 ;
3902
3903 {
3904#line 2
3905 op1 = 0;
3906#line 3
3907 op2 = 0;
3908#line 4
3909 op3 = 0;
3910#line 5
3911 op4 = 0;
3912#line 6
3913 op5 = 0;
3914#line 7
3915 op6 = 0;
3916#line 8
3917 op7 = 0;
3918#line 9
3919 op8 = 0;
3920#line 10
3921 op9 = 0;
3922#line 11
3923 op10 = 0;
3924#line 12
3925 op11 = 0;
3926#line 13
3927 splverifierCounter = 0;
3928 {
3929#line 14
3930 while (1) {
3931 while_3_continue: ;
3932#line 14
3933 if (splverifierCounter < 4) {
3934
3935 } else {
3936 goto while_3_break;
3937 }
3938#line 15
3939 splverifierCounter = splverifierCounter + 1;
3940#line 16
3941 if (! op1) {
3942 {
3943#line 16
3944 tmp___9 = __VERIFIER_nondet_int();
3945 }
3946#line 16
3947 if (tmp___9) {
3948 {
3949#line 17
3950 bobKeyAdd();
3951#line 18
3952 op1 = 1;
3953 }
3954 } else {
3955 goto _L___8;
3956 }
3957 } else {
3958 _L___8:
3959#line 19
3960 if (! op2) {
3961 {
3962#line 19
3963 tmp___8 = __VERIFIER_nondet_int();
3964 }
3965#line 19
3966 if (tmp___8) {
3967 {
3968#line 21
3969 rjhSetAutoRespond();
3970#line 22
3971 op2 = 1;
3972 }
3973 } else {
3974 goto _L___7;
3975 }
3976 } else {
3977 _L___7:
3978#line 23
3979 if (! op3) {
3980 {
3981#line 23
3982 tmp___7 = __VERIFIER_nondet_int();
3983 }
3984#line 23
3985 if (tmp___7) {
3986 {
3987#line 25
3988 rjhDeletePrivateKey();
3989#line 26
3990 op3 = 1;
3991 }
3992 } else {
3993 goto _L___6;
3994 }
3995 } else {
3996 _L___6:
3997#line 27
3998 if (! op4) {
3999 {
4000#line 27
4001 tmp___6 = __VERIFIER_nondet_int();
4002 }
4003#line 27
4004 if (tmp___6) {
4005 {
4006#line 29
4007 rjhKeyAdd();
4008#line 30
4009 op4 = 1;
4010 }
4011 } else {
4012 goto _L___5;
4013 }
4014 } else {
4015 _L___5:
4016#line 31
4017 if (! op5) {
4018 {
4019#line 31
4020 tmp___5 = __VERIFIER_nondet_int();
4021 }
4022#line 31
4023 if (tmp___5) {
4024 {
4025#line 33
4026 chuckKeyAddRjh();
4027#line 34
4028 op5 = 1;
4029 }
4030 } else {
4031 goto _L___4;
4032 }
4033 } else {
4034 _L___4:
4035#line 35
4036 if (! op6) {
4037 {
4038#line 35
4039 tmp___4 = __VERIFIER_nondet_int();
4040 }
4041#line 35
4042 if (tmp___4) {
4043#line 37
4044 op6 = 1;
4045 } else {
4046 goto _L___3;
4047 }
4048 } else {
4049 _L___3:
4050#line 38
4051 if (! op7) {
4052 {
4053#line 38
4054 tmp___3 = __VERIFIER_nondet_int();
4055 }
4056#line 38
4057 if (tmp___3) {
4058 {
4059#line 40
4060 rjhKeyChange();
4061#line 41
4062 op7 = 1;
4063 }
4064 } else {
4065 goto _L___2;
4066 }
4067 } else {
4068 _L___2:
4069#line 42
4070 if (! op8) {
4071 {
4072#line 42
4073 tmp___2 = __VERIFIER_nondet_int();
4074 }
4075#line 42
4076 if (tmp___2) {
4077#line 44
4078 op8 = 1;
4079 } else {
4080 goto _L___1;
4081 }
4082 } else {
4083 _L___1:
4084#line 45
4085 if (! op9) {
4086 {
4087#line 45
4088 tmp___1 = __VERIFIER_nondet_int();
4089 }
4090#line 45
4091 if (tmp___1) {
4092 {
4093#line 47
4094 chuckKeyAdd();
4095#line 48
4096 op9 = 1;
4097 }
4098 } else {
4099 goto _L___0;
4100 }
4101 } else {
4102 _L___0:
4103#line 49
4104 if (! op10) {
4105 {
4106#line 49
4107 tmp___0 = __VERIFIER_nondet_int();
4108 }
4109#line 49
4110 if (tmp___0) {
4111 {
4112#line 51
4113 bobKeyChange();
4114#line 52
4115 op10 = 1;
4116 }
4117 } else {
4118 goto _L;
4119 }
4120 } else {
4121 _L:
4122#line 53
4123 if (! op11) {
4124 {
4125#line 53
4126 tmp = __VERIFIER_nondet_int();
4127 }
4128#line 53
4129 if (tmp) {
4130 {
4131#line 55
4132 chuckKeyAdd();
4133#line 56
4134 op11 = 1;
4135 }
4136 } else {
4137 goto while_3_break;
4138 }
4139 } else {
4140 goto while_3_break;
4141 }
4142 }
4143 }
4144 }
4145 }
4146 }
4147 }
4148 }
4149 }
4150 }
4151 }
4152 }
4153 while_3_break: ;
4154 }
4155 {
4156#line 60
4157 bobToRjh();
4158 }
4159#line 167 "scenario.c"
4160 return;
4161}
4162}
4163#line 1 "Email.o"
4164#pragma merger(0,"Email.i","")
4165#line 6 "Email.h"
4166void printMail(int msg ) ;
4167#line 15
4168int cloneEmail(int msg ) ;
4169#line 9 "Email.c"
4170void printMail__wrappee__AutoResponder(int msg )
4171{ int tmp ;
4172 int tmp___0 ;
4173 int tmp___1 ;
4174 int tmp___2 ;
4175 char const * __restrict __cil_tmp6 ;
4176 char const * __restrict __cil_tmp7 ;
4177 char const * __restrict __cil_tmp8 ;
4178 char const * __restrict __cil_tmp9 ;
4179
4180 {
4181 {
4182#line 10
4183 tmp = getEmailId(msg);
4184#line 10
4185 __cil_tmp6 = (char const * __restrict )"ID:\n %i\n";
4186#line 10
4187 printf(__cil_tmp6, tmp);
4188#line 11
4189 tmp___0 = getEmailFrom(msg);
4190#line 11
4191 __cil_tmp7 = (char const * __restrict )"FROM:\n %i\n";
4192#line 11
4193 printf(__cil_tmp7, tmp___0);
4194#line 12
4195 tmp___1 = getEmailTo(msg);
4196#line 12
4197 __cil_tmp8 = (char const * __restrict )"TO:\n %i\n";
4198#line 12
4199 printf(__cil_tmp8, tmp___1);
4200#line 13
4201 tmp___2 = isReadable(msg);
4202#line 13
4203 __cil_tmp9 = (char const * __restrict )"IS_READABLE\n %i\n";
4204#line 13
4205 printf(__cil_tmp9, tmp___2);
4206 }
4207#line 601 "Email.c"
4208 return;
4209}
4210}
4211#line 19 "Email.c"
4212void printMail__wrappee__Sign(int msg )
4213{ int tmp ;
4214 int tmp___0 ;
4215 char const * __restrict __cil_tmp4 ;
4216 char const * __restrict __cil_tmp5 ;
4217
4218 {
4219 {
4220#line 20
4221 printMail__wrappee__AutoResponder(msg);
4222#line 21
4223 tmp = isSigned(msg);
4224#line 21
4225 __cil_tmp4 = (char const * __restrict )"SIGNED\n %i\n";
4226#line 21
4227 printf(__cil_tmp4, tmp);
4228#line 22
4229 tmp___0 = getEmailSignKey(msg);
4230#line 22
4231 __cil_tmp5 = (char const * __restrict )"SIGNATURE\n %i\n";
4232#line 22
4233 printf(__cil_tmp5, tmp___0);
4234 }
4235#line 625 "Email.c"
4236 return;
4237}
4238}
4239#line 26 "Email.c"
4240void printMail(int msg )
4241{ int tmp ;
4242 char const * __restrict __cil_tmp3 ;
4243
4244 {
4245 {
4246#line 27
4247 printMail__wrappee__Sign(msg);
4248#line 28
4249 tmp = isVerified(msg);
4250#line 28
4251 __cil_tmp3 = (char const * __restrict )"SIGNATURE VERIFIED\n %d\n";
4252#line 28
4253 printf(__cil_tmp3, tmp);
4254 }
4255#line 647 "Email.c"
4256 return;
4257}
4258}
4259#line 34 "Email.c"
4260int isReadable(int msg )
4261{ int retValue_acc ;
4262
4263 {
4264#line 665 "Email.c"
4265 retValue_acc = 1;
4266#line 667
4267 return (retValue_acc);
4268#line 674
4269 return (retValue_acc);
4270}
4271}
4272#line 39 "Email.c"
4273int cloneEmail(int msg )
4274{ int retValue_acc ;
4275
4276 {
4277#line 696 "Email.c"
4278 retValue_acc = msg;
4279#line 698
4280 return (retValue_acc);
4281#line 705
4282 return (retValue_acc);
4283}
4284}
4285#line 44 "Email.c"
4286int createEmail(int from , int to )
4287{ int retValue_acc ;
4288 int msg ;
4289
4290 {
4291 {
4292#line 45
4293 msg = 1;
4294#line 46
4295 setEmailFrom(msg, from);
4296#line 47
4297 setEmailTo(msg, to);
4298#line 735 "Email.c"
4299 retValue_acc = msg;
4300 }
4301#line 737
4302 return (retValue_acc);
4303#line 744
4304 return (retValue_acc);
4305}
4306}
4307#line 1 "Util.o"
4308#pragma merger(0,"Util.i","")
4309#line 1 "Util.h"
4310int prompt(char *msg ) ;
4311#line 9 "Util.c"
4312int prompt(char *msg )
4313{ int retValue_acc ;
4314 int retval ;
4315 char const * __restrict __cil_tmp4 ;
4316
4317 {
4318 {
4319#line 10
4320 __cil_tmp4 = (char const * __restrict )"%s\n";
4321#line 10
4322 printf(__cil_tmp4, msg);
4323#line 518 "Util.c"
4324 retValue_acc = retval;
4325 }
4326#line 520
4327 return (retValue_acc);
4328#line 527
4329 return (retValue_acc);
4330}
4331}