Showing error 1642

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