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