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