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