Showing error 49

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: heap-manipulation/bubble_sort_linux_safe.cil.c
Line in file: 30
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

   1/* Generated by CIL v. 1.3.7 */
   2/* print_CIL_Input is true */
   3
   4#line 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h"
   5typedef unsigned int size_t;
   6#line 17 "test-0179.c"
   7struct list_head {
   8   struct list_head *next ;
   9   struct list_head *prev ;
  10};
  11#line 33 "test-0179.c"
  12struct node {
  13   int value ;
  14   struct list_head linkage ;
  15   struct list_head nested ;
  16};
  17#line 471 "/usr/include/stdlib.h"
  18extern  __attribute__((__nothrow__)) void *malloc(size_t __size )  __attribute__((__malloc__)) ;
  19#line 488
  20extern  __attribute__((__nothrow__)) void free(void *__ptr ) ;
  21#line 514
  22extern  __attribute__((__nothrow__, __noreturn__)) void abort(void) ;
  23#line 5 "test-0179.c"
  24extern int __VERIFIER_nondet_int(void) ;
  25#line 7 "test-0179.c"
  26static void fail(void) 
  27{ 
  28
  29  {
  30  ERROR: 
  31  goto ERROR;
  32}
  33}
  34#line 39 "test-0179.c"
  35struct list_head gl_list  =    {& gl_list, & gl_list};
  36#line 41 "test-0179.c"
  37static void inspect(struct list_head  const  *head ) 
  38{ struct node  const  *node ;
  39  unsigned int __cil_tmp3 ;
  40  struct list_head *__cil_tmp4 ;
  41  unsigned int __cil_tmp5 ;
  42  int __cil_tmp6 ;
  43  unsigned int __cil_tmp7 ;
  44  unsigned int __cil_tmp8 ;
  45  unsigned int __cil_tmp9 ;
  46  struct list_head *__cil_tmp10 ;
  47  unsigned int __cil_tmp11 ;
  48  int __cil_tmp12 ;
  49  unsigned int __cil_tmp13 ;
  50  unsigned int __cil_tmp14 ;
  51  struct list_head *__cil_tmp15 ;
  52  unsigned int __cil_tmp16 ;
  53  struct list_head *__cil_tmp17 ;
  54  unsigned int __cil_tmp18 ;
  55  int __cil_tmp19 ;
  56  unsigned int __cil_tmp20 ;
  57  unsigned int __cil_tmp21 ;
  58  unsigned int __cil_tmp22 ;
  59  struct list_head *__cil_tmp23 ;
  60  unsigned int __cil_tmp24 ;
  61  int __cil_tmp25 ;
  62  struct node *__cil_tmp26 ;
  63  unsigned int __cil_tmp27 ;
  64  unsigned int __cil_tmp28 ;
  65  struct list_head *__cil_tmp29 ;
  66  unsigned long __cil_tmp30 ;
  67  char *__cil_tmp31 ;
  68  char *__cil_tmp32 ;
  69  struct node *__cil_tmp33 ;
  70  unsigned int __cil_tmp34 ;
  71  unsigned int __cil_tmp35 ;
  72  struct list_head  const  *__cil_tmp36 ;
  73  unsigned int __cil_tmp37 ;
  74  unsigned int __cil_tmp38 ;
  75  unsigned int __cil_tmp39 ;
  76  struct list_head *__cil_tmp40 ;
  77  unsigned int __cil_tmp41 ;
  78  int __cil_tmp42 ;
  79  unsigned int __cil_tmp43 ;
  80  unsigned int __cil_tmp44 ;
  81  struct list_head  const  *__cil_tmp45 ;
  82  unsigned int __cil_tmp46 ;
  83  unsigned int __cil_tmp47 ;
  84  unsigned int __cil_tmp48 ;
  85  unsigned int __cil_tmp49 ;
  86  struct list_head *__cil_tmp50 ;
  87  unsigned int __cil_tmp51 ;
  88  int __cil_tmp52 ;
  89  unsigned int __cil_tmp53 ;
  90  unsigned int __cil_tmp54 ;
  91  struct list_head  const  *__cil_tmp55 ;
  92  unsigned int __cil_tmp56 ;
  93  unsigned int __cil_tmp57 ;
  94  unsigned int __cil_tmp58 ;
  95  struct list_head *__cil_tmp59 ;
  96  unsigned int __cil_tmp60 ;
  97  int __cil_tmp61 ;
  98  unsigned int __cil_tmp62 ;
  99  unsigned int __cil_tmp63 ;
 100  struct list_head  const  *__cil_tmp64 ;
 101  unsigned int __cil_tmp65 ;
 102  unsigned int __cil_tmp66 ;
 103  unsigned int __cil_tmp67 ;
 104  unsigned int __cil_tmp68 ;
 105  struct list_head *__cil_tmp69 ;
 106  unsigned int __cil_tmp70 ;
 107  int __cil_tmp71 ;
 108  struct node  const  *__cil_tmp72 ;
 109  unsigned int __cil_tmp73 ;
 110  unsigned int __cil_tmp74 ;
 111  int __cil_tmp75 ;
 112  unsigned int __cil_tmp76 ;
 113  unsigned int __cil_tmp77 ;
 114  struct list_head  const  *__cil_tmp78 ;
 115  struct node  const  *__cil_tmp79 ;
 116  unsigned int __cil_tmp80 ;
 117  unsigned int __cil_tmp81 ;
 118  int __cil_tmp82 ;
 119  int const   *__cil_tmp83 ;
 120  struct node  const  *__cil_tmp84 ;
 121  unsigned int __cil_tmp85 ;
 122  unsigned int __cil_tmp86 ;
 123  int __cil_tmp87 ;
 124  unsigned int __cil_tmp88 ;
 125  unsigned int __cil_tmp89 ;
 126  struct list_head *__cil_tmp90 ;
 127  unsigned int __cil_tmp91 ;
 128  unsigned int __cil_tmp92 ;
 129  struct list_head *__cil_tmp93 ;
 130  unsigned int __cil_tmp94 ;
 131  unsigned int __cil_tmp95 ;
 132  int __cil_tmp96 ;
 133  unsigned int __cil_tmp97 ;
 134  unsigned int __cil_tmp98 ;
 135  unsigned int __cil_tmp99 ;
 136  struct list_head *__cil_tmp100 ;
 137  struct list_head *__cil_tmp101 ;
 138  unsigned int __cil_tmp102 ;
 139  unsigned int __cil_tmp103 ;
 140  int __cil_tmp104 ;
 141  struct list_head *__cil_tmp105 ;
 142  unsigned int __cil_tmp106 ;
 143  unsigned int __cil_tmp107 ;
 144  unsigned int __cil_tmp108 ;
 145  struct list_head  const  *__cil_tmp109 ;
 146  unsigned int __cil_tmp110 ;
 147  struct list_head *__cil_tmp111 ;
 148  unsigned int __cil_tmp112 ;
 149  struct node *__cil_tmp113 ;
 150  unsigned int __cil_tmp114 ;
 151  unsigned int __cil_tmp115 ;
 152  struct list_head *__cil_tmp116 ;
 153  unsigned long __cil_tmp117 ;
 154  char *__cil_tmp118 ;
 155  char *__cil_tmp119 ;
 156  struct node *__cil_tmp120 ;
 157  unsigned int __cil_tmp121 ;
 158  int __cil_tmp122 ;
 159
 160  {
 161  {
 162#line 44
 163  while (1) {
 164    while_0_continue: /* CIL Label */ ;
 165#line 44
 166    if (! head) {
 167      {
 168#line 44
 169      fail();
 170      }
 171    } else {
 172
 173    }
 174    goto while_0_break;
 175  }
 176  while_0_break: /* CIL Label */ ;
 177  }
 178  {
 179#line 45
 180  while (1) {
 181    while_1_continue: /* CIL Label */ ;
 182    {
 183#line 45
 184    __cil_tmp3 = (unsigned int )head;
 185#line 45
 186    __cil_tmp4 = *((struct list_head * const  *)head);
 187#line 45
 188    __cil_tmp5 = (unsigned int )__cil_tmp4;
 189#line 45
 190    __cil_tmp6 = __cil_tmp5 != __cil_tmp3;
 191#line 45
 192    if (! __cil_tmp6) {
 193      {
 194#line 45
 195      fail();
 196      }
 197    } else {
 198
 199    }
 200    }
 201    goto while_1_break;
 202  }
 203  while_1_break: /* CIL Label */ ;
 204  }
 205  {
 206#line 46
 207  while (1) {
 208    while_2_continue: /* CIL Label */ ;
 209    {
 210#line 46
 211    __cil_tmp7 = (unsigned int )head;
 212#line 46
 213    __cil_tmp8 = (unsigned int )head;
 214#line 46
 215    __cil_tmp9 = __cil_tmp8 + 4;
 216#line 46
 217    __cil_tmp10 = *((struct list_head * const  *)__cil_tmp9);
 218#line 46
 219    __cil_tmp11 = (unsigned int )__cil_tmp10;
 220#line 46
 221    __cil_tmp12 = __cil_tmp11 != __cil_tmp7;
 222#line 46
 223    if (! __cil_tmp12) {
 224      {
 225#line 46
 226      fail();
 227      }
 228    } else {
 229
 230    }
 231    }
 232    goto while_2_break;
 233  }
 234  while_2_break: /* CIL Label */ ;
 235  }
 236#line 49
 237  __cil_tmp13 = (unsigned int )head;
 238#line 49
 239  __cil_tmp14 = __cil_tmp13 + 4;
 240#line 49
 241  __cil_tmp15 = *((struct list_head * const  *)__cil_tmp14);
 242#line 49
 243  head = (struct list_head  const  *)__cil_tmp15;
 244  {
 245#line 50
 246  while (1) {
 247    while_3_continue: /* CIL Label */ ;
 248#line 50
 249    if (! head) {
 250      {
 251#line 50
 252      fail();
 253      }
 254    } else {
 255
 256    }
 257    goto while_3_break;
 258  }
 259  while_3_break: /* CIL Label */ ;
 260  }
 261  {
 262#line 51
 263  while (1) {
 264    while_4_continue: /* CIL Label */ ;
 265    {
 266#line 51
 267    __cil_tmp16 = (unsigned int )head;
 268#line 51
 269    __cil_tmp17 = *((struct list_head * const  *)head);
 270#line 51
 271    __cil_tmp18 = (unsigned int )__cil_tmp17;
 272#line 51
 273    __cil_tmp19 = __cil_tmp18 != __cil_tmp16;
 274#line 51
 275    if (! __cil_tmp19) {
 276      {
 277#line 51
 278      fail();
 279      }
 280    } else {
 281
 282    }
 283    }
 284    goto while_4_break;
 285  }
 286  while_4_break: /* CIL Label */ ;
 287  }
 288  {
 289#line 52
 290  while (1) {
 291    while_5_continue: /* CIL Label */ ;
 292    {
 293#line 52
 294    __cil_tmp20 = (unsigned int )head;
 295#line 52
 296    __cil_tmp21 = (unsigned int )head;
 297#line 52
 298    __cil_tmp22 = __cil_tmp21 + 4;
 299#line 52
 300    __cil_tmp23 = *((struct list_head * const  *)__cil_tmp22);
 301#line 52
 302    __cil_tmp24 = (unsigned int )__cil_tmp23;
 303#line 52
 304    __cil_tmp25 = __cil_tmp24 != __cil_tmp20;
 305#line 52
 306    if (! __cil_tmp25) {
 307      {
 308#line 52
 309      fail();
 310      }
 311    } else {
 312
 313    }
 314    }
 315    goto while_5_break;
 316  }
 317  while_5_break: /* CIL Label */ ;
 318  }
 319#line 55
 320  __cil_tmp26 = (struct node *)0;
 321#line 55
 322  __cil_tmp27 = (unsigned int )__cil_tmp26;
 323#line 55
 324  __cil_tmp28 = __cil_tmp27 + 4;
 325#line 55
 326  __cil_tmp29 = (struct list_head *)__cil_tmp28;
 327#line 55
 328  __cil_tmp30 = (unsigned long )__cil_tmp29;
 329#line 55
 330  __cil_tmp31 = (char *)head;
 331#line 55
 332  __cil_tmp32 = __cil_tmp31 - __cil_tmp30;
 333#line 55
 334  __cil_tmp33 = (struct node *)__cil_tmp32;
 335#line 55
 336  node = (struct node  const  *)__cil_tmp33;
 337  {
 338#line 56
 339  while (1) {
 340    while_6_continue: /* CIL Label */ ;
 341#line 56
 342    if (! node) {
 343      {
 344#line 56
 345      fail();
 346      }
 347    } else {
 348
 349    }
 350    goto while_6_break;
 351  }
 352  while_6_break: /* CIL Label */ ;
 353  }
 354  {
 355#line 57
 356  while (1) {
 357    while_7_continue: /* CIL Label */ ;
 358    {
 359#line 57
 360    __cil_tmp34 = (unsigned int )node;
 361#line 57
 362    __cil_tmp35 = __cil_tmp34 + 12;
 363#line 57
 364    __cil_tmp36 = (struct list_head  const  *)__cil_tmp35;
 365#line 57
 366    __cil_tmp37 = (unsigned int )__cil_tmp36;
 367#line 57
 368    __cil_tmp38 = (unsigned int )node;
 369#line 57
 370    __cil_tmp39 = __cil_tmp38 + 12;
 371#line 57
 372    __cil_tmp40 = *((struct list_head * const  *)__cil_tmp39);
 373#line 57
 374    __cil_tmp41 = (unsigned int )__cil_tmp40;
 375#line 57
 376    __cil_tmp42 = __cil_tmp41 == __cil_tmp37;
 377#line 57
 378    if (! __cil_tmp42) {
 379      {
 380#line 57
 381      fail();
 382      }
 383    } else {
 384
 385    }
 386    }
 387    goto while_7_break;
 388  }
 389  while_7_break: /* CIL Label */ ;
 390  }
 391  {
 392#line 58
 393  while (1) {
 394    while_8_continue: /* CIL Label */ ;
 395    {
 396#line 58
 397    __cil_tmp43 = (unsigned int )node;
 398#line 58
 399    __cil_tmp44 = __cil_tmp43 + 12;
 400#line 58
 401    __cil_tmp45 = (struct list_head  const  *)__cil_tmp44;
 402#line 58
 403    __cil_tmp46 = (unsigned int )__cil_tmp45;
 404#line 58
 405    __cil_tmp47 = 12 + 4;
 406#line 58
 407    __cil_tmp48 = (unsigned int )node;
 408#line 58
 409    __cil_tmp49 = __cil_tmp48 + __cil_tmp47;
 410#line 58
 411    __cil_tmp50 = *((struct list_head * const  *)__cil_tmp49);
 412#line 58
 413    __cil_tmp51 = (unsigned int )__cil_tmp50;
 414#line 58
 415    __cil_tmp52 = __cil_tmp51 == __cil_tmp46;
 416#line 58
 417    if (! __cil_tmp52) {
 418      {
 419#line 58
 420      fail();
 421      }
 422    } else {
 423
 424    }
 425    }
 426    goto while_8_break;
 427  }
 428  while_8_break: /* CIL Label */ ;
 429  }
 430  {
 431#line 59
 432  while (1) {
 433    while_9_continue: /* CIL Label */ ;
 434    {
 435#line 59
 436    __cil_tmp53 = (unsigned int )node;
 437#line 59
 438    __cil_tmp54 = __cil_tmp53 + 4;
 439#line 59
 440    __cil_tmp55 = (struct list_head  const  *)__cil_tmp54;
 441#line 59
 442    __cil_tmp56 = (unsigned int )__cil_tmp55;
 443#line 59
 444    __cil_tmp57 = (unsigned int )node;
 445#line 59
 446    __cil_tmp58 = __cil_tmp57 + 12;
 447#line 59
 448    __cil_tmp59 = *((struct list_head * const  *)__cil_tmp58);
 449#line 59
 450    __cil_tmp60 = (unsigned int )__cil_tmp59;
 451#line 59
 452    __cil_tmp61 = __cil_tmp60 != __cil_tmp56;
 453#line 59
 454    if (! __cil_tmp61) {
 455      {
 456#line 59
 457      fail();
 458      }
 459    } else {
 460
 461    }
 462    }
 463    goto while_9_break;
 464  }
 465  while_9_break: /* CIL Label */ ;
 466  }
 467  {
 468#line 60
 469  while (1) {
 470    while_10_continue: /* CIL Label */ ;
 471    {
 472#line 60
 473    __cil_tmp62 = (unsigned int )node;
 474#line 60
 475    __cil_tmp63 = __cil_tmp62 + 4;
 476#line 60
 477    __cil_tmp64 = (struct list_head  const  *)__cil_tmp63;
 478#line 60
 479    __cil_tmp65 = (unsigned int )__cil_tmp64;
 480#line 60
 481    __cil_tmp66 = 12 + 4;
 482#line 60
 483    __cil_tmp67 = (unsigned int )node;
 484#line 60
 485    __cil_tmp68 = __cil_tmp67 + __cil_tmp66;
 486#line 60
 487    __cil_tmp69 = *((struct list_head * const  *)__cil_tmp68);
 488#line 60
 489    __cil_tmp70 = (unsigned int )__cil_tmp69;
 490#line 60
 491    __cil_tmp71 = __cil_tmp70 != __cil_tmp65;
 492#line 60
 493    if (! __cil_tmp71) {
 494      {
 495#line 60
 496      fail();
 497      }
 498    } else {
 499
 500    }
 501    }
 502    goto while_10_break;
 503  }
 504  while_10_break: /* CIL Label */ ;
 505  }
 506  {
 507#line 63
 508  while (1) {
 509    while_11_continue: /* CIL Label */ ;
 510    {
 511#line 63
 512    __cil_tmp72 = (struct node  const  *)head;
 513#line 63
 514    __cil_tmp73 = (unsigned int )__cil_tmp72;
 515#line 63
 516    __cil_tmp74 = (unsigned int )node;
 517#line 63
 518    __cil_tmp75 = __cil_tmp74 != __cil_tmp73;
 519#line 63
 520    if (! __cil_tmp75) {
 521      {
 522#line 63
 523      fail();
 524      }
 525    } else {
 526
 527    }
 528    }
 529    goto while_11_break;
 530  }
 531  while_11_break: /* CIL Label */ ;
 532  }
 533  {
 534#line 64
 535  while (1) {
 536    while_12_continue: /* CIL Label */ ;
 537    {
 538#line 64
 539    __cil_tmp76 = (unsigned int )node;
 540#line 64
 541    __cil_tmp77 = __cil_tmp76 + 4;
 542#line 64
 543    __cil_tmp78 = (struct list_head  const  *)__cil_tmp77;
 544#line 64
 545    __cil_tmp79 = (struct node  const  *)__cil_tmp78;
 546#line 64
 547    __cil_tmp80 = (unsigned int )__cil_tmp79;
 548#line 64
 549    __cil_tmp81 = (unsigned int )node;
 550#line 64
 551    __cil_tmp82 = __cil_tmp81 != __cil_tmp80;
 552#line 64
 553    if (! __cil_tmp82) {
 554      {
 555#line 64
 556      fail();
 557      }
 558    } else {
 559
 560    }
 561    }
 562    goto while_12_break;
 563  }
 564  while_12_break: /* CIL Label */ ;
 565  }
 566  {
 567#line 65
 568  while (1) {
 569    while_13_continue: /* CIL Label */ ;
 570    {
 571#line 65
 572    __cil_tmp83 = (int const   *)node;
 573#line 65
 574    __cil_tmp84 = (struct node  const  *)__cil_tmp83;
 575#line 65
 576    __cil_tmp85 = (unsigned int )__cil_tmp84;
 577#line 65
 578    __cil_tmp86 = (unsigned int )node;
 579#line 65
 580    __cil_tmp87 = __cil_tmp86 == __cil_tmp85;
 581#line 65
 582    if (! __cil_tmp87) {
 583      {
 584#line 65
 585      fail();
 586      }
 587    } else {
 588
 589    }
 590    }
 591    goto while_13_break;
 592  }
 593  while_13_break: /* CIL Label */ ;
 594  }
 595  {
 596#line 66
 597  while (1) {
 598    while_14_continue: /* CIL Label */ ;
 599    {
 600#line 66
 601    __cil_tmp88 = (unsigned int )node;
 602#line 66
 603    __cil_tmp89 = __cil_tmp88 + 4;
 604#line 66
 605    __cil_tmp90 = *((struct list_head * const  *)__cil_tmp89);
 606#line 66
 607    __cil_tmp91 = (unsigned int )__cil_tmp90;
 608#line 66
 609    __cil_tmp92 = __cil_tmp91 + 4;
 610#line 66
 611    __cil_tmp93 = *((struct list_head **)__cil_tmp92);
 612#line 66
 613    __cil_tmp94 = (unsigned int )__cil_tmp93;
 614#line 66
 615    __cil_tmp95 = (unsigned int )head;
 616#line 66
 617    __cil_tmp96 = __cil_tmp95 == __cil_tmp94;
 618#line 66
 619    if (! __cil_tmp96) {
 620      {
 621#line 66
 622      fail();
 623      }
 624    } else {
 625
 626    }
 627    }
 628    goto while_14_break;
 629  }
 630  while_14_break: /* CIL Label */ ;
 631  }
 632  {
 633#line 67
 634  while (1) {
 635    while_15_continue: /* CIL Label */ ;
 636    {
 637#line 67
 638    __cil_tmp97 = 4 + 4;
 639#line 67
 640    __cil_tmp98 = (unsigned int )node;
 641#line 67
 642    __cil_tmp99 = __cil_tmp98 + __cil_tmp97;
 643#line 67
 644    __cil_tmp100 = *((struct list_head * const  *)__cil_tmp99);
 645#line 67
 646    __cil_tmp101 = *((struct list_head **)__cil_tmp100);
 647#line 67
 648    __cil_tmp102 = (unsigned int )__cil_tmp101;
 649#line 67
 650    __cil_tmp103 = (unsigned int )head;
 651#line 67
 652    __cil_tmp104 = __cil_tmp103 == __cil_tmp102;
 653#line 67
 654    if (! __cil_tmp104) {
 655      {
 656#line 67
 657      fail();
 658      }
 659    } else {
 660
 661    }
 662    }
 663    goto while_15_break;
 664  }
 665  while_15_break: /* CIL Label */ ;
 666  }
 667#line 70
 668  __cil_tmp105 = *((struct list_head * const  *)head);
 669#line 70
 670  head = (struct list_head  const  *)__cil_tmp105;
 671  {
 672#line 70
 673  while (1) {
 674    while_16_continue: /* CIL Label */ ;
 675    {
 676#line 70
 677    __cil_tmp106 = (unsigned int )head;
 678#line 70
 679    __cil_tmp107 = (unsigned int )node;
 680#line 70
 681    __cil_tmp108 = __cil_tmp107 + 4;
 682#line 70
 683    __cil_tmp109 = (struct list_head  const  *)__cil_tmp108;
 684#line 70
 685    __cil_tmp110 = (unsigned int )__cil_tmp109;
 686#line 70
 687    if (__cil_tmp110 != __cil_tmp106) {
 688
 689    } else {
 690      goto while_16_break;
 691    }
 692    }
 693#line 70
 694    __cil_tmp111 = *((struct list_head * const  *)head);
 695#line 70
 696    head = (struct list_head  const  *)__cil_tmp111;
 697  }
 698  while_16_break: /* CIL Label */ ;
 699  }
 700  {
 701#line 71
 702  while (1) {
 703    while_17_continue: /* CIL Label */ ;
 704    {
 705#line 71
 706    __cil_tmp112 = (unsigned int )node;
 707#line 71
 708    __cil_tmp113 = (struct node *)0;
 709#line 71
 710    __cil_tmp114 = (unsigned int )__cil_tmp113;
 711#line 71
 712    __cil_tmp115 = __cil_tmp114 + 4;
 713#line 71
 714    __cil_tmp116 = (struct list_head *)__cil_tmp115;
 715#line 71
 716    __cil_tmp117 = (unsigned long )__cil_tmp116;
 717#line 71
 718    __cil_tmp118 = (char *)head;
 719#line 71
 720    __cil_tmp119 = __cil_tmp118 - __cil_tmp117;
 721#line 71
 722    __cil_tmp120 = (struct node *)__cil_tmp119;
 723#line 71
 724    __cil_tmp121 = (unsigned int )__cil_tmp120;
 725#line 71
 726    __cil_tmp122 = __cil_tmp121 == __cil_tmp112;
 727#line 71
 728    if (! __cil_tmp122) {
 729      {
 730#line 71
 731      fail();
 732      }
 733    } else {
 734
 735    }
 736    }
 737    goto while_17_break;
 738  }
 739  while_17_break: /* CIL Label */ ;
 740  }
 741#line 72
 742  return;
 743}
 744}
 745#line 74 "test-0179.c"
 746__inline static void __list_add(struct list_head *new , struct list_head *prev , struct list_head *next ) 
 747{ unsigned int __cil_tmp4 ;
 748  unsigned int __cil_tmp5 ;
 749  unsigned int __cil_tmp6 ;
 750  unsigned int __cil_tmp7 ;
 751
 752  {
 753#line 78
 754  __cil_tmp4 = (unsigned int )next;
 755#line 78
 756  __cil_tmp5 = __cil_tmp4 + 4;
 757#line 78
 758  *((struct list_head **)__cil_tmp5) = new;
 759#line 79
 760  *((struct list_head **)new) = next;
 761#line 80
 762  __cil_tmp6 = (unsigned int )new;
 763#line 80
 764  __cil_tmp7 = __cil_tmp6 + 4;
 765#line 80
 766  *((struct list_head **)__cil_tmp7) = prev;
 767#line 81
 768  *((struct list_head **)prev) = new;
 769#line 82
 770  return;
 771}
 772}
 773#line 84 "test-0179.c"
 774__inline static void __list_del(struct list_head *prev , struct list_head *next ) 
 775{ unsigned int __cil_tmp3 ;
 776  unsigned int __cil_tmp4 ;
 777
 778  {
 779#line 86
 780  __cil_tmp3 = (unsigned int )next;
 781#line 86
 782  __cil_tmp4 = __cil_tmp3 + 4;
 783#line 86
 784  *((struct list_head **)__cil_tmp4) = prev;
 785#line 87
 786  *((struct list_head **)prev) = next;
 787#line 88
 788  return;
 789}
 790}
 791#line 90 "test-0179.c"
 792__inline static void list_add(struct list_head *new , struct list_head *head ) 
 793{ struct list_head *__cil_tmp3 ;
 794
 795  {
 796  {
 797#line 92
 798  __cil_tmp3 = *((struct list_head **)head);
 799#line 92
 800  __list_add(new, head, __cil_tmp3);
 801  }
 802#line 93
 803  return;
 804}
 805}
 806#line 95 "test-0179.c"
 807__inline static void list_move(struct list_head *list , struct list_head *head ) 
 808{ unsigned int __cil_tmp3 ;
 809  unsigned int __cil_tmp4 ;
 810  struct list_head *__cil_tmp5 ;
 811  struct list_head *__cil_tmp6 ;
 812
 813  {
 814  {
 815#line 97
 816  __cil_tmp3 = (unsigned int )list;
 817#line 97
 818  __cil_tmp4 = __cil_tmp3 + 4;
 819#line 97
 820  __cil_tmp5 = *((struct list_head **)__cil_tmp4);
 821#line 97
 822  __cil_tmp6 = *((struct list_head **)list);
 823#line 97
 824  __list_del(__cil_tmp5, __cil_tmp6);
 825#line 98
 826  list_add(list, head);
 827  }
 828#line 99
 829  return;
 830}
 831}
 832#line 101 "test-0179.c"
 833static void gl_insert(int value ) 
 834{ struct node *node ;
 835  void *tmp ;
 836  unsigned int __cil_tmp4 ;
 837  unsigned int __cil_tmp5 ;
 838  unsigned int __cil_tmp6 ;
 839  struct list_head *__cil_tmp7 ;
 840  unsigned int __cil_tmp8 ;
 841  unsigned int __cil_tmp9 ;
 842  unsigned int __cil_tmp10 ;
 843  unsigned int __cil_tmp11 ;
 844  unsigned int __cil_tmp12 ;
 845  unsigned int __cil_tmp13 ;
 846  unsigned int __cil_tmp14 ;
 847  unsigned int __cil_tmp15 ;
 848  unsigned int __cil_tmp16 ;
 849
 850  {
 851  {
 852#line 103
 853  __cil_tmp4 = (unsigned int )20UL;
 854#line 103
 855  tmp = malloc(__cil_tmp4);
 856#line 103
 857  node = (struct node *)tmp;
 858  }
 859#line 104
 860  if (! node) {
 861    {
 862#line 105
 863    abort();
 864    }
 865  } else {
 866
 867  }
 868  {
 869#line 107
 870  *((int *)node) = value;
 871#line 108
 872  __cil_tmp5 = (unsigned int )node;
 873#line 108
 874  __cil_tmp6 = __cil_tmp5 + 4;
 875#line 108
 876  __cil_tmp7 = (struct list_head *)__cil_tmp6;
 877#line 108
 878  list_add(__cil_tmp7, & gl_list);
 879  }
 880  {
 881#line 109
 882  while (1) {
 883    while_18_continue: /* CIL Label */ ;
 884#line 109
 885    __cil_tmp8 = (unsigned int )node;
 886#line 109
 887    __cil_tmp9 = __cil_tmp8 + 12;
 888#line 109
 889    __cil_tmp10 = (unsigned int )node;
 890#line 109
 891    __cil_tmp11 = __cil_tmp10 + 12;
 892#line 109
 893    *((struct list_head **)__cil_tmp9) = (struct list_head *)__cil_tmp11;
 894#line 109
 895    __cil_tmp12 = 12 + 4;
 896#line 109
 897    __cil_tmp13 = (unsigned int )node;
 898#line 109
 899    __cil_tmp14 = __cil_tmp13 + __cil_tmp12;
 900#line 109
 901    __cil_tmp15 = (unsigned int )node;
 902#line 109
 903    __cil_tmp16 = __cil_tmp15 + 12;
 904#line 109
 905    *((struct list_head **)__cil_tmp14) = (struct list_head *)__cil_tmp16;
 906    goto while_18_break;
 907  }
 908  while_18_break: /* CIL Label */ ;
 909  }
 910#line 110
 911  return;
 912}
 913}
 914#line 112 "test-0179.c"
 915static void gl_read(void) 
 916{ int tmp ;
 917  int tmp___0 ;
 918
 919  {
 920  {
 921#line 114
 922  while (1) {
 923    while_19_continue: /* CIL Label */ ;
 924    {
 925#line 115
 926    tmp = __VERIFIER_nondet_int();
 927#line 115
 928    gl_insert(tmp);
 929#line 114
 930    tmp___0 = __VERIFIER_nondet_int();
 931    }
 932#line 114
 933    if (tmp___0) {
 934
 935    } else {
 936      goto while_19_break;
 937    }
 938  }
 939  while_19_break: /* CIL Label */ ;
 940  }
 941#line 118
 942  return;
 943}
 944}
 945#line 120 "test-0179.c"
 946static void gl_destroy(void) 
 947{ struct list_head *next ;
 948  struct list_head *__cil_tmp2 ;
 949  unsigned int __cil_tmp3 ;
 950  unsigned int __cil_tmp4 ;
 951  struct list_head *__cil_tmp5 ;
 952  struct node *__cil_tmp6 ;
 953  unsigned int __cil_tmp7 ;
 954  unsigned int __cil_tmp8 ;
 955  struct list_head *__cil_tmp9 ;
 956  unsigned long __cil_tmp10 ;
 957  char *__cil_tmp11 ;
 958  char *__cil_tmp12 ;
 959  struct node *__cil_tmp13 ;
 960  void *__cil_tmp14 ;
 961
 962  {
 963  {
 964#line 123
 965  while (1) {
 966    while_20_continue: /* CIL Label */ ;
 967#line 123
 968    __cil_tmp2 = & gl_list;
 969#line 123
 970    next = *((struct list_head **)__cil_tmp2);
 971    {
 972#line 123
 973    __cil_tmp3 = (unsigned int )next;
 974#line 123
 975    __cil_tmp4 = (unsigned int )(& gl_list);
 976#line 123
 977    if (__cil_tmp4 != __cil_tmp3) {
 978
 979    } else {
 980      goto while_20_break;
 981    }
 982    }
 983    {
 984#line 124
 985    __cil_tmp5 = & gl_list;
 986#line 124
 987    *((struct list_head **)__cil_tmp5) = *((struct list_head **)next);
 988#line 125
 989    __cil_tmp6 = (struct node *)0;
 990#line 125
 991    __cil_tmp7 = (unsigned int )__cil_tmp6;
 992#line 125
 993    __cil_tmp8 = __cil_tmp7 + 4;
 994#line 125
 995    __cil_tmp9 = (struct list_head *)__cil_tmp8;
 996#line 125
 997    __cil_tmp10 = (unsigned long )__cil_tmp9;
 998#line 125
 999    __cil_tmp11 = (char *)next;
1000#line 125
1001    __cil_tmp12 = __cil_tmp11 - __cil_tmp10;
1002#line 125
1003    __cil_tmp13 = (struct node *)__cil_tmp12;
1004#line 125
1005    __cil_tmp14 = (void *)__cil_tmp13;
1006#line 125
1007    free(__cil_tmp14);
1008    }
1009  }
1010  while_20_break: /* CIL Label */ ;
1011  }
1012#line 127
1013  return;
1014}
1015}
1016#line 129 "test-0179.c"
1017static int val_from_node(struct list_head *head ) 
1018{ struct node *entry ;
1019  struct node *__cil_tmp3 ;
1020  unsigned int __cil_tmp4 ;
1021  unsigned int __cil_tmp5 ;
1022  struct list_head *__cil_tmp6 ;
1023  unsigned long __cil_tmp7 ;
1024  char *__cil_tmp8 ;
1025  char *__cil_tmp9 ;
1026
1027  {
1028#line 130
1029  __cil_tmp3 = (struct node *)0;
1030#line 130
1031  __cil_tmp4 = (unsigned int )__cil_tmp3;
1032#line 130
1033  __cil_tmp5 = __cil_tmp4 + 4;
1034#line 130
1035  __cil_tmp6 = (struct list_head *)__cil_tmp5;
1036#line 130
1037  __cil_tmp7 = (unsigned long )__cil_tmp6;
1038#line 130
1039  __cil_tmp8 = (char *)head;
1040#line 130
1041  __cil_tmp9 = __cil_tmp8 - __cil_tmp7;
1042#line 130
1043  entry = (struct node *)__cil_tmp9;
1044#line 131
1045  return (*((int *)entry));
1046}
1047}
1048#line 134 "test-0179.c"
1049static _Bool gl_sort_pass(void) 
1050{ _Bool any_change ;
1051  struct list_head *pos0 ;
1052  struct list_head *pos1 ;
1053  int val0 ;
1054  int tmp ;
1055  int val1 ;
1056  int tmp___0 ;
1057  struct list_head *__cil_tmp8 ;
1058  unsigned int __cil_tmp9 ;
1059  unsigned int __cil_tmp10 ;
1060
1061  {
1062#line 136
1063  any_change = (_Bool)0;
1064#line 138
1065  __cil_tmp8 = & gl_list;
1066#line 138
1067  pos0 = *((struct list_head **)__cil_tmp8);
1068  {
1069#line 140
1070  while (1) {
1071    while_21_continue: /* CIL Label */ ;
1072#line 140
1073    pos1 = *((struct list_head **)pos0);
1074    {
1075#line 140
1076    __cil_tmp9 = (unsigned int )pos1;
1077#line 140
1078    __cil_tmp10 = (unsigned int )(& gl_list);
1079#line 140
1080    if (__cil_tmp10 != __cil_tmp9) {
1081
1082    } else {
1083      goto while_21_break;
1084    }
1085    }
1086    {
1087#line 141
1088    tmp = val_from_node(pos0);
1089#line 141
1090    val0 = tmp;
1091#line 142
1092    tmp___0 = val_from_node(pos1);
1093#line 142
1094    val1 = tmp___0;
1095    }
1096#line 143
1097    if (val0 <= val1) {
1098#line 145
1099      pos0 = pos1;
1100      goto while_21_continue;
1101    } else {
1102
1103    }
1104    {
1105#line 149
1106    any_change = (_Bool)1;
1107#line 150
1108    list_move(pos0, pos1);
1109    }
1110  }
1111  while_21_break: /* CIL Label */ ;
1112  }
1113#line 153
1114  return (any_change);
1115}
1116}
1117#line 156 "test-0179.c"
1118static void gl_sort(void) 
1119{ _Bool tmp ;
1120
1121  {
1122  {
1123#line 158
1124  while (1) {
1125    while_22_continue: /* CIL Label */ ;
1126    {
1127#line 158
1128    tmp = gl_sort_pass();
1129    }
1130#line 158
1131    if (tmp) {
1132
1133    } else {
1134      goto while_22_break;
1135    }
1136  }
1137  while_22_break: /* CIL Label */ ;
1138  }
1139#line 160
1140  return;
1141}
1142}
1143#line 162 "test-0179.c"
1144int main(void) 
1145{ struct list_head  const  *__cil_tmp1 ;
1146  struct list_head  const  *__cil_tmp2 ;
1147
1148  {
1149  {
1150#line 164
1151  gl_read();
1152#line 165
1153  __cil_tmp1 = (struct list_head  const  *)(& gl_list);
1154#line 165
1155  inspect(__cil_tmp1);
1156#line 167
1157  gl_sort();
1158#line 168
1159  __cil_tmp2 = (struct list_head  const  *)(& gl_list);
1160#line 168
1161  inspect(__cil_tmp2);
1162#line 170
1163  gl_destroy();
1164  }
1165#line 172
1166  return (0);
1167}
1168}