Showing error 1608

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