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