Showing error 1728

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