Showing error 1644

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