Showing error 1773

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: product-lines/email_spec6_product12_unsafe.cil.c
Line in file: 3511
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

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