Showing error 1764

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_spec4_product28_safe.cil.c
Line in file: 631
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

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