loff_t seq_lseek(struct file *arg0, loff_t arg1, int arg2) { // Typedef type // Real type: __kernel_loff_t // Typedef type // Real type: long long // Simple type return __VERIFIER_nondet_long(); }
ssize_t pci_read_vpd(struct pci_dev *arg0, loff_t arg1, size_t arg2, void *arg3) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t simple_read_from_buffer(void *arg0, size_t arg1, loff_t *arg2, const void *arg3, size_t arg4) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t seq_read(struct file *arg0, char *arg1, size_t arg2, loff_t *arg3) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *arg0, const u8 *arg1, size_t arg2) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *arg0) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t videobuf_read_stream(struct videobuf_queue *arg0, char *arg1, size_t arg2, loff_t *arg3, int arg4, int arg5) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
ssize_t generic_file_aio_write(struct kiocb *arg0, const struct iovec *arg1, unsigned long arg2, loff_t arg3) { // Typedef type // Real type: __kernel_ssize_t // Typedef type // Real type: __kernel_long_t // Typedef type // Real type: long // Simple type return __VERIFIER_nondet_long(); }
int pthread_join(pthread_t __th, void **__thread_return) { pthread_t calling_tid = pthread_self(); // Print the tid of the thread being joined to SMACK traces int joining_tid = __th; // Check for self-joining deadlock if(calling_tid == __th) return 35; // This is EDEADLK // Wait for the thread to terminate __SMACK_code("assume $pthreadStatus[@][0] == $pthread_stopped;", __th); // Get the thread's return value void* tmp_thread_return_pointer = (void*)__VERIFIER_nondet_long(); __SMACK_code("@ := $pthreadStatus[@][1];", tmp_thread_return_pointer, __th); *__thread_return = tmp_thread_return_pointer; // Print return pointer value to SMACK traces void* actual_thread_return_pointer = *__thread_return; return 0; }
int main() { SIZE = __VERIFIER_nondet_long(); if(SIZE > 1 && SIZE < MAX) { int i; long *a = malloc(sizeof(long)*SIZE); long long sum=0; for(i = 0; i < SIZE; i++ ) { a[i] = 1; } for(i = 0; i < SIZE; i++ ) { sum = sum + a[i]; } for(i = 0; i < SIZE; i++ ) { sum = sum + a[i]; } for(i = 0; i < SIZE; i++) { sum = sum - a[i]; } for(i = 0; i < SIZE; i++) { sum = sum - a[i]; } __VERIFIER_assert(sum == 0); } return 1; }
//////////////////////////////////////////////////////////////// // // Below are alternate definitions for pthread_join(), // __call_wrapper(), and pthread_create(), to illlustrate // failure when `assume(ctid == *__newthread)` is not present // in __call_wrapper(). // //////////////////////////////////////////////////////////////// int pthread_join2(pthread_t __th, void **__thread_return) { pthread_t calling_tid = pthread_self(); // Print the tid of the thread being joined to SMACK traces int joining_tid = __th; // Check for self-joining deadlock if(calling_tid == __th) return 35; // This is EDEADLK // When verifying join_self.c, this next `assert(0)` should never be // reached if the pthread model is correct beacuse calling_tid should // be equal to __th in this function, so the if branch should always // be taken, returning 35. // // However, when `assume(ctid == *__newthread)` is not present in // __call_wrapper(), then it is possible that parent thread hasn't set // the child thread ID in the original pthread_t struct, so calling_tid // won't match the passed in argument, __th, and so this assert(0) is // reachable in this case (of course, this is all specifically for // join_self()). assert(0); // Wait for the thread to terminate __SMACK_code("assume $pthreadStatus[@][0] == $pthread_stopped;", __th); // Get the thread's return value void* tmp_thread_return_pointer = (void*)__VERIFIER_nondet_long(); __SMACK_code("@ := $pthreadStatus[@][1];", tmp_thread_return_pointer, __th); *__thread_return = tmp_thread_return_pointer; // Print return pointer value to SMACK traces void* actual_thread_return_pointer = *__thread_return; return 0; }
int ssl3_accept(int initial_state ) { int s__info_callback = __VERIFIER_nondet_int() ; int s__in_handshake = __VERIFIER_nondet_int() ; int s__state ; int s__new_session ; int s__server ; int s__version = __VERIFIER_nondet_int() ; int s__type ; int s__init_num ; int s__hit = __VERIFIER_nondet_int() ; int s__rwstate ; int s__init_buf___0 ; int s__debug = __VERIFIER_nondet_int() ; int s__shutdown ; int s__cert = __VERIFIER_nondet_int() ; int s__options = __VERIFIER_nondet_int() ; int s__verify_mode = __VERIFIER_nondet_int() ; int s__session__peer = __VERIFIER_nondet_int() ; int s__cert__pkeys__AT0__privatekey = __VERIFIER_nondet_int() ; int s__ctx__info_callback = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_renegotiate = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_good = __VERIFIER_nondet_int() ; int s__s3__tmp__cert_request ; int s__s3__tmp__reuse_message = __VERIFIER_nondet_int() ; int s__s3__tmp__use_rsa_tmp ; int s__s3__tmp__new_cipher = __VERIFIER_nondet_int() ; int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int() ; int s__s3__tmp__next_state___0 ; int s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int() ; int s__session__cipher ; int buf ; unsigned long l ; unsigned long Time ; unsigned long tmp ; int cb ; long num1 ; int ret ; int new_state ; int state ; int skip ; int got_new_session ; int tmp___1 = __VERIFIER_nondet_int() ; int tmp___2 = __VERIFIER_nondet_int() ; int tmp___3 = __VERIFIER_nondet_int() ; int tmp___4 = __VERIFIER_nondet_int() ; int tmp___5 = __VERIFIER_nondet_int() ; int tmp___6 = __VERIFIER_nondet_int() ; int tmp___7 ; long tmp___8 = __VERIFIER_nondet_long() ; int tmp___9 = __VERIFIER_nondet_int() ; int tmp___10 = __VERIFIER_nondet_int() ; int blastFlag ; int __cil_tmp55 ; unsigned long __cil_tmp56 ; unsigned long __cil_tmp57 ; unsigned long __cil_tmp58 ; unsigned long __cil_tmp59 ; int __cil_tmp60 ; unsigned long __cil_tmp61 ; { #line 60 ; s__state = initial_state; #line 61 blastFlag = 0; #line 62 tmp = __VERIFIER_nondet_int(); #line 63 Time = tmp; #line 64 cb = 0; #line 65 ret = -1; #line 66 skip = 0; #line 67 got_new_session = 0; #line 68 if (s__info_callback != 0) { #line 69 cb = s__info_callback; } else { #line 71 if (s__ctx__info_callback != 0) { #line 72 cb = s__ctx__info_callback; } } #line 77 s__in_handshake ++; #line 78 if (tmp___1 + 12288) { #line 79 if (tmp___2 + 16384) { } } #line 87 if (s__cert == 0) { #line 88 return (-1); } { #line 93 while (1) { while_0_continue: /* CIL Label */ ; #line 95 state = s__state; #line 96 if (s__state == 12292) { goto switch_1_12292; } else { #line 99 if (s__state == 16384) { goto switch_1_16384; } else { #line 102 if (s__state == 8192) { goto switch_1_8192; } else { #line 105 if (s__state == 24576) { goto switch_1_24576; } else { #line 108 if (s__state == 8195) { goto switch_1_8195; } else { #line 111 if (s__state == 8480) { goto switch_1_8480; } else { #line 114 if (s__state == 8481) { goto switch_1_8481; } else { #line 117 if (s__state == 8482) { goto switch_1_8482; } else { #line 120 if (s__state == 8464) { goto switch_1_8464; } else { #line 123 if (s__state == 8465) { goto switch_1_8465; } else { #line 126 if (s__state == 8466) { goto switch_1_8466; } else { #line 129 if (s__state == 8496) { goto switch_1_8496; } else { #line 132 if (s__state == 8497) { goto switch_1_8497; } else { #line 135 if (s__state == 8512) { goto switch_1_8512; } else { #line 138 if (s__state == 8513) { goto switch_1_8513; } else { #line 141 if (s__state == 8528) { goto switch_1_8528; } else { #line 144 if (s__state == 8529) { goto switch_1_8529; } else { #line 147 if (s__state == 8544) { goto switch_1_8544; } else { #line 150 if (s__state == 8545) { goto switch_1_8545; } else { #line 153 if (s__state == 8560) { goto switch_1_8560; } else { #line 156 if (s__state == 8561) { goto switch_1_8561; } else { #line 159 if (s__state == 8448) { goto switch_1_8448; } else { #line 162 if (s__state == 8576) { goto switch_1_8576; } else { #line 165 if (s__state == 8577) { goto switch_1_8577; } else { #line 168 if (s__state == 8592) { goto switch_1_8592; } else { #line 171 if (s__state == 8593) { goto switch_1_8593; } else { #line 174 if (s__state == 8608) { goto switch_1_8608; } else { #line 177 if (s__state == 8609) { goto switch_1_8609; } else { #line 180 if (s__state == 8640) { goto switch_1_8640; } else { #line 183 if (s__state == 8641) { goto switch_1_8641; } else { #line 186 if (s__state == 8656) { goto switch_1_8656; } else { #line 189 if (s__state == 8657) { goto switch_1_8657; } else { #line 192 if (s__state == 8672) { goto switch_1_8672; } else { #line 195 if (s__state == 8673) { goto switch_1_8673; } else { #line 198 if (s__state == 3) { goto switch_1_3; } else { goto switch_1_default; #line 203 if (0) { switch_1_12292: #line 205 s__new_session = 1; switch_1_16384: ; switch_1_8192: ; switch_1_24576: ; switch_1_8195: #line 210 s__server = 1; #line 211 if (cb != 0) { } { #line 216 __cil_tmp55 = s__version * 8; #line 216 if (__cil_tmp55 != 3) { #line 217 return (-1); } } #line 221 s__type = 8192; #line 222 if (s__init_buf___0 == 0) { #line 223 buf = __VERIFIER_nondet_int(); #line 224 if (buf == 0) { #line 225 ret = -1; goto end; } #line 230 if (! tmp___3) { #line 231 ret = -1; goto end; } #line 236 s__init_buf___0 = buf; } #line 240 if (! tmp___4) { #line 241 ret = -1; goto end; } #line 246 s__init_num = 0; #line 247 if (s__state != 12292) { #line 248 if (! tmp___5) { #line 249 ret = -1; goto end; } #line 254 s__state = 8464; #line 255 s__ctx__stats__sess_accept ++; } else { #line 257 s__ctx__stats__sess_accept_renegotiate ++; #line 258 s__state = 8480; } goto switch_1_break; switch_1_8480: ; switch_1_8481: #line 263 s__shutdown = 0; #line 264 ret = __VERIFIER_nondet_int(); #line 265 if (ret <= 0) { goto end; } #line 270 s__s3__tmp__next_state___0 = 8482; #line 271 s__state = 8448; #line 272 s__init_num = 0; goto switch_1_break; switch_1_8482: #line 275 s__state = 3; goto switch_1_break; switch_1_8464: ; switch_1_8465: ; switch_1_8466: #line 280 s__shutdown = 0; #line 281 ret = __VERIFIER_nondet_int(); #line 282 if (blastFlag == 0) { #line 283 blastFlag = 1; } #line 287 if (ret <= 0) { goto end; } #line 292 got_new_session = 1; #line 293 s__state = 8496; #line 294 s__init_num = 0; goto switch_1_break; switch_1_8496: ; switch_1_8497: #line 298 ret = __VERIFIER_nondet_int(); #line 299 if (blastFlag == 1) { #line 300 blastFlag = 2; } else { #line 302 if (blastFlag == 3) { #line 303 blastFlag = 4; } } #line 308 if (ret <= 0) { goto end; } #line 313 if (s__hit) { #line 314 s__state = 8656; } else { #line 316 s__state = 8512; } #line 318 s__init_num = 0; goto switch_1_break; switch_1_8512: ; switch_1_8513: ; { #line 322 __cil_tmp56 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 322 if (__cil_tmp56 + 256UL) { #line 323 skip = 1; } else { #line 325 ret = __VERIFIER_nondet_int(); #line 326 if (ret <= 0) { goto end; } } } #line 332 s__state = 8528; #line 333 s__init_num = 0; goto switch_1_break; switch_1_8528: ; switch_1_8529: #line 337 l = (unsigned long )s__s3__tmp__new_cipher__algorithms; { #line 338 __cil_tmp57 = (unsigned long )s__options; #line 338 if (__cil_tmp57 + 2097152UL) { #line 339 s__s3__tmp__use_rsa_tmp = 1; } else { #line 341 s__s3__tmp__use_rsa_tmp = 0; } } #line 343 if (s__s3__tmp__use_rsa_tmp) { goto _L___0; } else { #line 346 if (l + 30UL) { goto _L___0; } else { #line 349 if (l + 1UL) { #line 350 if (s__cert__pkeys__AT0__privatekey == 0) { goto _L___0; } else { { #line 353 __cil_tmp58 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 353 if (__cil_tmp58 + 2UL) { { #line 354 __cil_tmp59 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 354 if (__cil_tmp59 + 4UL) { #line 355 tmp___7 = 512; } else { #line 357 tmp___7 = 1024; } } { #line 359 __cil_tmp60 = tmp___6 * 8; #line 359 if (__cil_tmp60 > tmp___7) { _L___0: #line 361 ret = __VERIFIER_nondet_int(); #line 362 if (ret <= 0) { goto end; } } else { #line 368 skip = 1; } } } else { #line 371 skip = 1; } } } } else { #line 375 skip = 1; } } } #line 379 s__state = 8544; #line 380 s__init_num = 0; goto switch_1_break; switch_1_8544: ; switch_1_8545: ; #line 384 if (s__verify_mode + 1) { #line 385 if (s__session__peer != 0) { #line 386 if (s__verify_mode + 4) { #line 387 skip = 1; #line 388 s__s3__tmp__cert_request = 0; #line 389 s__state = 8560; } else { goto _L___2; } } else { _L___2: { #line 395 __cil_tmp61 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 395 if (__cil_tmp61 + 256UL) { #line 396 if (s__verify_mode + 2) { goto _L___1; } else { #line 399 skip = 1; #line 400 s__s3__tmp__cert_request = 0; #line 401 s__state = 8560; } } else { _L___1: #line 405 s__s3__tmp__cert_request = 1; #line 406 ret = __VERIFIER_nondet_int(); #line 407 if (ret <= 0) { goto end; } #line 412 s__state = 8448; #line 413 s__s3__tmp__next_state___0 = 8576; #line 414 s__init_num = 0; } } } } else { #line 418 skip = 1; #line 419 s__s3__tmp__cert_request = 0; #line 420 s__state = 8560; } goto switch_1_break; switch_1_8560: ; switch_1_8561: #line 425 ret = __VERIFIER_nondet_int(); #line 426 if (ret <= 0) { goto end; } #line 431 s__s3__tmp__next_state___0 = 8576; #line 432 s__state = 8448; #line 433 s__init_num = 0; goto switch_1_break; switch_1_8448: #line 436 if (num1 > 0L) { #line 437 s__rwstate = 2; #line 438 num1 = tmp___8; #line 439 if (num1 <= 0L) { #line 440 ret = -1; goto end; } #line 445 s__rwstate = 1; } #line 449 s__state = s__s3__tmp__next_state___0; goto switch_1_break; switch_1_8576: ; switch_1_8577: #line 453 ret = __VERIFIER_nondet_int(); #line 454 if (ret <= 0) { goto end; } #line 459 if (ret == 2) { #line 460 s__state = 8466; } else { #line 462 ret = __VERIFIER_nondet_int(); #line 463 if (ret <= 0) { goto end; } #line 468 s__init_num = 0; #line 469 s__state = 8592; } goto switch_1_break; switch_1_8592: ; switch_1_8593: #line 474 ret = __VERIFIER_nondet_int(); #line 475 if (ret <= 0) { goto end; } #line 480 s__state = 8608; #line 481 s__init_num = 0; goto switch_1_break; switch_1_8608: ; switch_1_8609: #line 485 ret = __VERIFIER_nondet_int(); #line 486 if (ret <= 0) { goto end; } #line 491 s__state = 8640; #line 492 s__init_num = 0; goto switch_1_break; switch_1_8640: ; switch_1_8641: #line 496 ret = __VERIFIER_nondet_int(); #line 497 if (ret <= 0) { goto end; } #line 502 if (s__hit) { #line 503 s__state = 3; } else { #line 505 s__state = 8656; } #line 507 s__init_num = 0; goto switch_1_break; switch_1_8656: ; switch_1_8657: #line 511 s__session__cipher = s__s3__tmp__new_cipher; #line 512 if (! tmp___9) { #line 513 ret = -1; goto end; } #line 518 ret = __VERIFIER_nondet_int(); #line 519 if (blastFlag == 2) { #line 520 blastFlag = 3; } #line 524 if (ret <= 0) { goto end; } #line 529 s__state = 8672; #line 530 s__init_num = 0; #line 531 if (! tmp___10) { #line 532 ret = -1; goto end; } goto switch_1_break; switch_1_8672: ; switch_1_8673: #line 540 ret = __VERIFIER_nondet_int(); #line 541 if (blastFlag == 3) { goto ERROR; } #line 546 if (ret <= 0) { goto end; } #line 551 s__state = 8448; #line 552 if (s__hit) { #line 553 s__s3__tmp__next_state___0 = 8640; } else { #line 555 s__s3__tmp__next_state___0 = 3; } #line 557 s__init_num = 0; goto switch_1_break; switch_1_3: #line 560 s__init_buf___0 = 0; #line 561 s__init_num = 0; #line 562 if (got_new_session) { #line 563 s__new_session = 0; #line 564 s__ctx__stats__sess_accept_good ++; #line 565 if (cb != 0) { } } #line 573 ret = 1; goto end; switch_1_default: #line 576 ret = -1; goto end; } else { switch_1_break: ; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } #line 617 if (! s__s3__tmp__reuse_message) { #line 618 if (! skip) { #line 619 if (s__debug) { #line 620 ret = __VERIFIER_nondet_int(); #line 621 if (ret <= 0) { goto end; } } #line 629 if (cb != 0) { #line 630 if (s__state != state) { #line 631 new_state = s__state; #line 632 s__state = state; #line 633 s__state = new_state; } } } } #line 646 skip = 0; } while_0_break: /* CIL Label */ ; } end: #line 651 s__in_handshake --; #line 652 if (cb != 0) { } #line 657 return (ret); ERROR:assert(0); #line 659 return (-1); } }
// This is a simplified version of s3_srvr_1.cil.c int main() { int s__state ; int s__hit = __VERIFIER_nondet_int() ; int s__verify_mode = __VERIFIER_nondet_int() ; int s__session__peer = __VERIFIER_nondet_int() ; unsigned long s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_long() ; int buf ; int cb ; int blastFlag ; int tmp___1; s__state = 8466; blastFlag = 0; while (1) { if (s__state <= 8512 && blastFlag > 2) { goto ERROR; } { { { { { if (s__state == 8466) { goto switch_1_8466; } else { if (s__state == 8496) { goto switch_1_8496; } else { { if (s__state == 8512) { goto switch_1_8512; } else { { if (s__state == 8528) { goto switch_1_8528; } else { { if (s__state == 8544) { goto switch_1_8544; } else { { if (s__state == 8560) { goto switch_1_8560; } else { { if (s__state == 8576) { goto switch_1_8576; } else { { if (s__state == 8592) { goto switch_1_8592; } else { { if (s__state == 8608) { goto switch_1_8608; } else { { if (s__state == 8640) { goto switch_1_8640; } else { { if (s__state == 8656) { goto switch_1_8656; } else { { if (s__state == 8672) { goto switch_1_8672; } else { goto end; switch_1_8466: if (blastFlag == 0) { blastFlag = 1; } s__state = 8496; goto switch_1_break; switch_1_8496: if (blastFlag == 1) { blastFlag = 2; } if (s__hit) { s__state = 8656; } else { s__state = 8512; } goto switch_1_break; switch_1_8512: s__state = 8528; goto switch_1_break; switch_1_8528: s__state = 8544; goto switch_1_break; switch_1_8544: if (s__verify_mode + 1) { if (s__session__peer != 0) { if (s__verify_mode + 4) { s__state = 8560; } else { goto _L___2; } } else { _L___2: if (s__s3__tmp__new_cipher__algorithms + 256UL) { if (s__verify_mode + 2) { goto _L___1; } else { s__state = 8560; } } else { _L___1: s__state = 8576; } } } else { s__state = 8560; } goto switch_1_break; switch_1_8560: s__state = 8576; goto switch_1_break; switch_1_8576: tmp___1 = __VERIFIER_nondet_int(); if (tmp___1 == 2) { s__state = 8466; } else { s__state = 8592; } goto switch_1_break; switch_1_8592: s__state = 8608; goto switch_1_break; switch_1_8608: s__state = 8640; goto switch_1_break; switch_1_8640: if (blastFlag == 3) { blastFlag = 4; } if (s__hit) { goto end; } else { s__state = 8656; } goto switch_1_break; switch_1_8656: if (blastFlag == 2) { blastFlag = 3; } s__state = 8672; goto switch_1_break; switch_1_8672: if (blastFlag == 4) { blastFlag = 5; } else { if (blastFlag == 5) { goto ERROR; } } if (s__hit) { s__state = 8640; } else { goto end; } goto switch_1_break; } } } } } } } } } } } } } } } } } } } } } } } } } } } switch_1_break: ; } end: return (-1); ERROR: return (-1); }
int ssl3_accept(int initial_state ) { int s__info_callback = __VERIFIER_nondet_int(); int s__in_handshake = __VERIFIER_nondet_int(); int s__state ; int s__new_session ; int s__server ; int s__version = __VERIFIER_nondet_int(); int s__type ; int s__init_num ; int s__hit = __VERIFIER_nondet_int(); int s__rwstate ; int s__init_buf___0 ; int s__debug = __VERIFIER_nondet_int(); int s__shutdown ; int s__cert = __VERIFIER_nondet_int(); int s__options = __VERIFIER_nondet_int(); int s__verify_mode = __VERIFIER_nondet_int(); int s__session__peer = __VERIFIER_nondet_int(); int s__cert__pkeys__AT0__privatekey = __VERIFIER_nondet_int(); int s__ctx__info_callback = __VERIFIER_nondet_int(); int s__ctx__stats__sess_accept_renegotiate ; int s__ctx__stats__sess_accept ; int s__ctx__stats__sess_accept_good = __VERIFIER_nondet_int(); int s__s3__tmp__cert_request ; int s__s3__tmp__reuse_message = __VERIFIER_nondet_int(); int s__s3__tmp__use_rsa_tmp ; int s__s3__tmp__new_cipher = __VERIFIER_nondet_int(); int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int(); int s__s3__tmp__next_state___0 ; int s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int(); int s__session__cipher ; int buf ; unsigned long l ; unsigned long Time ; unsigned long tmp ; int cb ; long num1 ; int ret ; int new_state ; int state ; int skip ; int got_new_session ; int tmp___1 = __VERIFIER_nondet_int(); int tmp___2 = __VERIFIER_nondet_int(); int tmp___3 = __VERIFIER_nondet_int(); int tmp___4 = __VERIFIER_nondet_int(); int tmp___5 = __VERIFIER_nondet_int(); int tmp___6 = __VERIFIER_nondet_int(); int tmp___7 ; long tmp___8 = __VERIFIER_nondet_long(); int tmp___9 = __VERIFIER_nondet_int(); int tmp___10 = __VERIFIER_nondet_int(); int blastFlag ; int ag_X ; int ag_Y ; int __retres69 ; { s__state = initial_state; blastFlag = 0; tmp = __VERIFIER_nondet_int(); Time = tmp; cb = 0; ret = -1; skip = 0; got_new_session = 0; if (s__info_callback != 0) { cb = s__info_callback; } else { if (s__ctx__info_callback != 0) { cb = s__ctx__info_callback; } else { } } s__in_handshake = s__in_handshake + 1; if (tmp___1 + 12288) { if (tmp___2 + 16384) { } else { } } else { } if (s__cert == 0) { __retres69 = -1; goto return_label; } else { } { while (1) { while_0_continue: /* CIL Label */ ; state = s__state; if (s__state == 12292) { goto switch_1_12292; } else { if (s__state == 16384) { goto switch_1_16384; } else { if (s__state == 8192) { goto switch_1_8192; } else { if (s__state == 24576) { goto switch_1_24576; } else { if (s__state == 8195) { goto switch_1_8195; } else { if (s__state == 8480) { goto switch_1_8480; } else { if (s__state == 8481) { goto switch_1_8481; } else { if (s__state == 8482) { goto switch_1_8482; } else { if (s__state == 8464) { goto switch_1_8464; } else { if (s__state == 8465) { goto switch_1_8465; } else { if (s__state == 8466) { goto switch_1_8466; } else { if (s__state == 8496) { goto switch_1_8496; } else { if (s__state == 8497) { goto switch_1_8497; } else { if (s__state == 8512) { goto switch_1_8512; } else { if (s__state == 8513) { goto switch_1_8513; } else { if (s__state == 8528) { goto switch_1_8528; } else { if (s__state == 8529) { goto switch_1_8529; } else { if (s__state == 8544) { goto switch_1_8544; } else { if (s__state == 8545) { goto switch_1_8545; } else { if (s__state == 8560) { goto switch_1_8560; } else { if (s__state == 8561) { goto switch_1_8561; } else { if (s__state == 8448) { goto switch_1_8448; } else { if (s__state == 8576) { goto switch_1_8576; } else { if (s__state == 8577) { goto switch_1_8577; } else { if (s__state == 8592) { goto switch_1_8592; } else { if (s__state == 8593) { goto switch_1_8593; } else { if (s__state == 8608) { goto switch_1_8608; } else { if (s__state == 8609) { goto switch_1_8609; } else { if (s__state == 8640) { goto switch_1_8640; } else { if (s__state == 8641) { goto switch_1_8641; } else { if (s__state == 8656) { goto switch_1_8656; } else { if (s__state == 8657) { goto switch_1_8657; } else { if (s__state == 8672) { goto switch_1_8672; } else { if (s__state == 8673) { goto switch_1_8673; } else { if (s__state == 3) { goto switch_1_3; } else { { goto switch_1_default; if (0) { switch_1_12292: /* CIL Label */ s__new_session = 1; switch_1_16384: /* CIL Label */ ; switch_1_8192: /* CIL Label */ ; switch_1_24576: /* CIL Label */ ; switch_1_8195: /* CIL Label */ s__server = 1; if (cb != 0) { } else { } if (s__version * 8 != 3) { __retres69 = -1; goto return_label; } else { } s__type = 8192; if (s__init_buf___0 == 0) { buf = __VERIFIER_nondet_int(); if (buf == 0) { ret = -1; goto end; } else { } if (! tmp___3) { ret = -1; goto end; } else { } s__init_buf___0 = buf; } else { } if (! tmp___4) { ret = -1; goto end; } else { } s__init_num = 0; if (s__state != 12292) { if (! tmp___5) { ret = -1; goto end; } else { } s__state = 8464; ag_X = 4248; ag_Y = 1 << 31U; s__ctx__stats__sess_accept = s__ctx__stats__sess_accept + 1; } else { s__ctx__stats__sess_accept_renegotiate = s__ctx__stats__sess_accept_renegotiate + 1; s__state = 8480; } goto switch_1_break; switch_1_8480: /* CIL Label */ ; switch_1_8481: /* CIL Label */ s__shutdown = 0; ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__s3__tmp__next_state___0 = 8482; s__state = 8448; s__init_num = 0; goto switch_1_break; switch_1_8482: /* CIL Label */ s__state = 3; goto switch_1_break; switch_1_8464: /* CIL Label */ ; switch_1_8465: /* CIL Label */ ; switch_1_8466: /* CIL Label */ s__shutdown = 0; ret = __VERIFIER_nondet_int(); if (blastFlag == 0) { blastFlag = 1; } else { } if (ret <= 0) { goto end; } else { } got_new_session = 1; s__state = (ag_X + ag_Y) * 2; s__init_num = 0; goto switch_1_break; switch_1_8496: /* CIL Label */ ; switch_1_8497: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (blastFlag == 1) { blastFlag = 2; } else { if (blastFlag == 3) { blastFlag = 4; } else { } } if (ret <= 0) { goto end; } else { } if (s__hit) { s__state = 8656; } else { s__state = 8512; } s__init_num = 0; goto switch_1_break; switch_1_8512: /* CIL Label */ ; switch_1_8513: /* CIL Label */ ; if ((unsigned long )s__s3__tmp__new_cipher__algorithms + 256UL) { skip = 1; } else { ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } } s__state = 8528; s__init_num = 0; goto switch_1_break; switch_1_8528: /* CIL Label */ ; switch_1_8529: /* CIL Label */ l = s__s3__tmp__new_cipher__algorithms; if ((unsigned long )s__options + 2097152UL) { s__s3__tmp__use_rsa_tmp = 1; } else { s__s3__tmp__use_rsa_tmp = 0; } if (s__s3__tmp__use_rsa_tmp) { goto _L___0; } else { if (l + 30UL) { goto _L___0; } else { if (l + 1UL) { if (s__cert__pkeys__AT0__privatekey == 0) { goto _L___0; } else { if ((unsigned long )s__s3__tmp__new_cipher__algo_strength + 2UL) { if ((unsigned long )s__s3__tmp__new_cipher__algo_strength + 4UL) { tmp___7 = 512; } else { tmp___7 = 1024; } if (tmp___6 * 8 > tmp___7) { _L___0: ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } } else { skip = 1; } } else { skip = 1; } } } else { skip = 1; } } } s__state = 8544; s__init_num = 0; goto switch_1_break; switch_1_8544: /* CIL Label */ ; switch_1_8545: /* CIL Label */ ; if (s__verify_mode + 1) { if (s__session__peer != 0) { if (s__verify_mode + 4) { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } else { goto _L___2; } } else { _L___2: if ((unsigned long )s__s3__tmp__new_cipher__algorithms + 256UL) { if (s__verify_mode + 2) { goto _L___1; } else { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } } else { _L___1: s__s3__tmp__cert_request = 1; ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__state = 8448; s__s3__tmp__next_state___0 = 8576; s__init_num = 0; } } } else { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } goto switch_1_break; switch_1_8560: /* CIL Label */ ; switch_1_8561: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__s3__tmp__next_state___0 = 8576; s__state = 8448; s__init_num = 0; goto switch_1_break; switch_1_8448: /* CIL Label */ if (num1 > 0L) { s__rwstate = 2; num1 = tmp___8; if (num1 <= 0L) { ret = -1; goto end; } else { } s__rwstate = 1; } else { } s__state = s__s3__tmp__next_state___0; goto switch_1_break; switch_1_8576: /* CIL Label */ ; switch_1_8577: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } if (ret == 2) { s__state = 8466; } else { ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__init_num = 0; s__state = 8592; } goto switch_1_break; switch_1_8592: /* CIL Label */ ; switch_1_8593: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__state = 8608; s__init_num = 0; goto switch_1_break; switch_1_8608: /* CIL Label */ ; switch_1_8609: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } s__state = 8640; s__init_num = 0; goto switch_1_break; switch_1_8640: /* CIL Label */ ; switch_1_8641: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } if (s__hit) { s__state = 3; } else { s__state = 8656; } s__init_num = 0; goto switch_1_break; switch_1_8656: /* CIL Label */ ; switch_1_8657: /* CIL Label */ s__session__cipher = s__s3__tmp__new_cipher; if (! tmp___9) { ret = -1; goto end; } else { } ret = __VERIFIER_nondet_int(); if (blastFlag == 2) { blastFlag = 3; } else { } if (ret <= 0) { goto end; } else { } s__state = 8672; s__init_num = 0; if (! tmp___10) { ret = -1; goto end; } else { } goto switch_1_break; switch_1_8672: /* CIL Label */ ; switch_1_8673: /* CIL Label */ ret = __VERIFIER_nondet_int(); if (blastFlag == 4) { goto ERROR; } else { } if (ret <= 0) { goto end; } else { } s__state = 8448; if (s__hit) { s__s3__tmp__next_state___0 = 8640; } else { s__s3__tmp__next_state___0 = 3; } s__init_num = 0; goto switch_1_break; switch_1_3: /* CIL Label */ s__init_buf___0 = 0; s__init_num = 0; if (got_new_session) { s__new_session = 0; s__ctx__stats__sess_accept_good = s__ctx__stats__sess_accept_good + 1; if (cb != 0) { } else { } } else { } ret = 1; goto end; switch_1_default: /* CIL Label */ ret = -1; goto end; } else { switch_1_break: /* CIL Label */ ; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } if (! s__s3__tmp__reuse_message) { if (! skip) { if (s__debug) { ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } else { } } else { } if (cb != 0) { if (s__state != state) { new_state = s__state; s__state = state; s__state = new_state; } else { } } else { } } else { } } else { } skip = 0; } while_0_break: /* CIL Label */ ; } end: s__in_handshake = s__in_handshake - 1; if (cb != 0) { } else { } __retres69 = ret; goto return_label; ERROR: { } __retres69 = -1; return_label: /* CIL Label */ return (__retres69); } }
long int schedule_timeout_uninterruptible(long arg0) { // Simple type return __VERIFIER_nondet_long(); }
long int video_ioctl2(struct file *arg0, unsigned int arg1, unsigned long arg2) { // Simple type return __VERIFIER_nondet_long(); }
int ssl3_accept(int initial_state ) { int s__info_callback = __VERIFIER_nondet_int() ; int s__in_handshake = __VERIFIER_nondet_int() ; int s__state ; int s__new_session ; int s__server ; int s__version = __VERIFIER_nondet_int() ; int s__type ; int s__init_num ; int s__hit = __VERIFIER_nondet_int() ; int s__rwstate ; int s__init_buf___0 ; int s__debug = __VERIFIER_nondet_int() ; int s__shutdown ; int s__cert = __VERIFIER_nondet_int() ; int s__options = __VERIFIER_nondet_int() ; int s__verify_mode = __VERIFIER_nondet_int() ; int s__session__peer = __VERIFIER_nondet_int() ; int s__cert__pkeys__AT0__privatekey = __VERIFIER_nondet_int() ; int s__ctx__info_callback = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_renegotiate = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_good = __VERIFIER_nondet_int() ; int s__s3__tmp__cert_request ; int s__s3__tmp__reuse_message ; int s__s3__tmp__use_rsa_tmp ; int s__s3__tmp__new_cipher = __VERIFIER_nondet_int() ; int s__s3__tmp__new_cipher__algorithms ; int s__s3__tmp__next_state___0 ; int s__s3__tmp__new_cipher__algo_strength ; int s__session__cipher ; int buf ; unsigned long l ; unsigned long Time ; unsigned long tmp ; int cb ; long num1 ; int ret ; int new_state ; int state ; int skip ; int got_new_session ; int tmp___1 = __VERIFIER_nondet_int() ; int tmp___2 = __VERIFIER_nondet_int() ; int tmp___3 = __VERIFIER_nondet_int() ; int tmp___4 = __VERIFIER_nondet_int() ; int tmp___5 = __VERIFIER_nondet_int() ; int tmp___6 = __VERIFIER_nondet_int() ; int tmp___7 ; long tmp___8 = __VERIFIER_nondet_long() ; int tmp___9 = __VERIFIER_nondet_int() ; int tmp___10 = __VERIFIER_nondet_int() ; int blastFlag ; int __cil_tmp55 ; unsigned long __cil_tmp56 ; unsigned long __cil_tmp57 ; unsigned long __cil_tmp58 ; unsigned long __cil_tmp59 ; int __cil_tmp60 ; unsigned long __cil_tmp61 ; { #line 60 s__state = initial_state; #line 61 blastFlag = 0; #line 62 tmp = __VERIFIER_nondet_int(); #line 63 Time = tmp; #line 64 cb = 0; #line 65 ret = -1; #line 66 skip = 0; #line 67 got_new_session = 0; #line 68 if (s__info_callback != 0) { #line 69 cb = s__info_callback; } else { #line 71 if (s__ctx__info_callback != 0) { #line 72 cb = s__ctx__info_callback; } } #line 77 s__in_handshake ++; #line 78 if (tmp___1 + 12288) { #line 79 if (tmp___2 + 16384) { } } #line 87 if (s__cert == 0) { #line 88 return (-1); } { #line 93 while (1) { while_0_continue: /* CIL Label */ ; #line 95 state = s__state; #line 96 if (s__state == 12292) { goto switch_1_12292; } else { #line 99 if (s__state == 16384) { goto switch_1_16384; } else { #line 102 if (s__state == 8192) { goto switch_1_8192; } else { #line 105 if (s__state == 24576) { goto switch_1_24576; } else { #line 108 if (s__state == 8195) { goto switch_1_8195; } else { #line 111 if (s__state == 8480) { goto switch_1_8480; } else { #line 114 if (s__state == 8481) { goto switch_1_8481; } else { #line 117 if (s__state == 8482) { goto switch_1_8482; } else { #line 120 if (s__state == 8464) { goto switch_1_8464; } else { #line 123 if (s__state == 8465) { goto switch_1_8465; } else { #line 126 if (s__state == 8466) { goto switch_1_8466; } else { #line 129 if (s__state == 8496) { goto switch_1_8496; } else { #line 132 if (s__state == 8497) { goto switch_1_8497; } else { #line 135 if (s__state == 8512) { goto switch_1_8512; } else { #line 138 if (s__state == 8513) { goto switch_1_8513; } else { #line 141 if (s__state == 8528) { goto switch_1_8528; } else { #line 144 if (s__state == 8529) { goto switch_1_8529; } else { #line 147 if (s__state == 8544) { goto switch_1_8544; } else { #line 150 if (s__state == 8545) { goto switch_1_8545; } else { #line 153 if (s__state == 8560) { goto switch_1_8560; } else { #line 156 if (s__state == 8561) { goto switch_1_8561; } else { #line 159 if (s__state == 8448) { goto switch_1_8448; } else { #line 162 if (s__state == 8576) { goto switch_1_8576; } else { #line 165 if (s__state == 8577) { goto switch_1_8577; } else { #line 168 if (s__state == 8592) { goto switch_1_8592; } else { #line 171 if (s__state == 8593) { goto switch_1_8593; } else { #line 174 if (s__state == 8608) { goto switch_1_8608; } else { #line 177 if (s__state == 8609) { goto switch_1_8609; } else { #line 180 if (s__state == 8640) { goto switch_1_8640; } else { #line 183 if (s__state == 8641) { goto switch_1_8641; } else { #line 186 if (s__state == 8656) { goto switch_1_8656; } else { #line 189 if (s__state == 8657) { goto switch_1_8657; } else { #line 192 if (s__state == 8672) { goto switch_1_8672; } else { #line 195 if (s__state == 8673) { goto switch_1_8673; } else { #line 198 if (s__state == 3) { goto switch_1_3; } else { goto switch_1_default; #line 203 if (0) { switch_1_12292: #line 205 s__new_session = 1; switch_1_16384: ; switch_1_8192: ; switch_1_24576: ; switch_1_8195: #line 210 s__server = 1; #line 211 if (cb != 0) { } { #line 216 __cil_tmp55 = s__version * 8; #line 216 if (__cil_tmp55 != 3) { #line 217 return (-1); } } #line 221 s__type = 8192; #line 222 if (s__init_buf___0 == 0) { #line 223 buf = __VERIFIER_nondet_int(); #line 224 if (buf == 0) { #line 225 ret = -1; goto end; } #line 230 if (! tmp___3) { #line 231 ret = -1; goto end; } #line 236 s__init_buf___0 = buf; } #line 240 if (! tmp___4) { #line 241 ret = -1; goto end; } #line 246 s__init_num = 0; #line 247 if (s__state != 12292) { #line 248 if (! tmp___5) { #line 249 ret = -1; goto end; } #line 254 s__state = 8464; #line 255 s__ctx__stats__sess_accept ++; } else { #line 257 s__ctx__stats__sess_accept_renegotiate ++; #line 258 s__state = 8480; } goto switch_1_break; switch_1_8480: ; switch_1_8481: #line 263 s__shutdown = 0; #line 264 ret = __VERIFIER_nondet_int(); #line 265 if (ret <= 0) { goto end; } #line 270 s__s3__tmp__next_state___0 = 8482; #line 271 s__state = 8448; #line 272 s__init_num = 0; goto switch_1_break; switch_1_8482: #line 275 s__state = 3; goto switch_1_break; switch_1_8464: ; switch_1_8465: ; switch_1_8466: #line 280 s__shutdown = 0; #line 281 ret = __VERIFIER_nondet_int(); #line 282 if (blastFlag == 0) { #line 283 blastFlag = 1; } #line 287 if (ret <= 0) { goto end; } #line 292 got_new_session = 1; #line 293 s__state = 8496; #line 294 s__init_num = 0; goto switch_1_break; switch_1_8496: ; switch_1_8497: #line 298 ret = __VERIFIER_nondet_int(); #line 299 if (blastFlag == 1) { #line 300 blastFlag = 2; } #line 304 if (ret <= 0) { goto end; } #line 309 if (s__hit) { #line 310 s__state = 8656; } else { #line 312 s__state = 8512; } #line 314 s__init_num = 0; goto switch_1_break; switch_1_8512: ; switch_1_8513: ; { s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int(); __cil_tmp56 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 318 if (__cil_tmp56 + 256UL) { #line 319 skip = 1; } else { #line 321 ret = __VERIFIER_nondet_int(); #line 322 if (blastFlag == 2) { #line 323 blastFlag = 6; } #line 327 if (ret <= 0) { goto end; } } } #line 333 s__state = 8528; #line 334 s__init_num = 0; goto switch_1_break; switch_1_8528: ; switch_1_8529: s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int(); l = (unsigned long )s__s3__tmp__new_cipher__algorithms; { #line 339 __cil_tmp57 = (unsigned long )s__options; #line 339 if (__cil_tmp57 + 2097152UL) { #line 340 s__s3__tmp__use_rsa_tmp = 1; } else { #line 342 s__s3__tmp__use_rsa_tmp = 0; } } #line 344 if (s__s3__tmp__use_rsa_tmp) { goto _L___0; } else { #line 347 if (l + 30UL) { goto _L___0; } else { #line 350 if (l + 1UL) { #line 351 if (s__cert__pkeys__AT0__privatekey == 0) { goto _L___0; } else { { s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int(); __cil_tmp58 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 354 if (__cil_tmp58 + 2UL) { { s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int(); __cil_tmp59 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 355 if (__cil_tmp59 + 4UL) { #line 356 tmp___7 = 512; } else { #line 358 tmp___7 = 1024; } } { #line 360 __cil_tmp60 = tmp___6 * 8; #line 360 if (__cil_tmp60 > tmp___7) { _L___0: #line 362 ret = __VERIFIER_nondet_int(); #line 363 if (blastFlag == 6) { #line 364 blastFlag = 7; } #line 368 if (ret <= 0) { goto end; } } else { #line 374 skip = 1; } } } else { #line 377 skip = 1; } } } } else { #line 381 skip = 1; } } } #line 385 s__state = 8544; #line 386 s__init_num = 0; goto switch_1_break; switch_1_8544: ; switch_1_8545: ; #line 390 if (s__verify_mode + 1) { #line 391 if (s__session__peer != 0) { #line 392 if (s__verify_mode + 4) { #line 393 skip = 1; #line 394 s__s3__tmp__cert_request = 0; #line 395 s__state = 8560; } else { goto _L___2; } } else { _L___2: { s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int(); __cil_tmp61 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 401 if (__cil_tmp61 + 256UL) { #line 402 if (s__verify_mode + 2) { goto _L___1; } else { #line 405 skip = 1; #line 406 s__s3__tmp__cert_request = 0; #line 407 s__state = 8560; } } else { _L___1: #line 411 s__s3__tmp__cert_request = 1; #line 412 ret = __VERIFIER_nondet_int(); #line 413 if (blastFlag == 8) { goto ERROR; } #line 418 if (ret <= 0) { goto end; } #line 423 s__state = 8448; #line 424 s__s3__tmp__next_state___0 = 8576; #line 425 s__init_num = 0; } } } } else { #line 429 skip = 1; #line 430 s__s3__tmp__cert_request = 0; #line 431 s__state = 8560; } goto switch_1_break; switch_1_8560: ; switch_1_8561: #line 436 ret = __VERIFIER_nondet_int(); #line 437 if (ret <= 0) { goto end; } #line 442 s__s3__tmp__next_state___0 = 8576; #line 443 s__state = 8448; #line 444 s__init_num = 0; goto switch_1_break; switch_1_8448: #line 447 if (num1 > 0L) { #line 448 s__rwstate = 2; #line 449 num1 = tmp___8; #line 450 if (num1 <= 0L) { #line 451 ret = -1; goto end; } #line 456 s__rwstate = 1; } #line 460 s__state = s__s3__tmp__next_state___0; goto switch_1_break; switch_1_8576: ; switch_1_8577: #line 464 ret = __VERIFIER_nondet_int(); #line 465 if (ret <= 0) { goto end; } #line 470 if (ret == 2) { #line 471 s__state = 8466; } else { #line 473 ret = __VERIFIER_nondet_int(); #line 474 if (ret <= 0) { goto end; } #line 479 s__init_num = 0; #line 480 s__state = 8592; } goto switch_1_break; switch_1_8592: ; switch_1_8593: #line 485 ret = __VERIFIER_nondet_int(); #line 486 if (ret <= 0) { goto end; } #line 491 s__state = 8608; #line 492 s__init_num = 0; goto switch_1_break; switch_1_8608: ; switch_1_8609: #line 496 ret = __VERIFIER_nondet_int(); #line 497 if (ret <= 0) { goto end; } #line 502 s__state = 8640; #line 503 s__init_num = 0; goto switch_1_break; switch_1_8640: ; switch_1_8641: #line 507 ret = __VERIFIER_nondet_int(); #line 508 if (blastFlag == 5) { goto ERROR; } #line 513 if (ret <= 0) { goto end; } #line 518 if (s__hit) { #line 519 s__state = 3; } else { #line 521 s__state = 8656; } #line 523 s__init_num = 0; goto switch_1_break; switch_1_8656: ; switch_1_8657: #line 527 s__session__cipher = s__s3__tmp__new_cipher; #line 528 if (! tmp___9) { #line 529 ret = -1; goto end; } #line 534 ret = __VERIFIER_nondet_int(); #line 535 if (blastFlag == 2) { #line 536 blastFlag = 3; } else { #line 538 if (blastFlag == 4) { #line 539 blastFlag = 5; } else { #line 541 if (blastFlag == 7) { #line 542 blastFlag = 8; } } } #line 548 if (ret <= 0) { goto end; } #line 553 s__state = 8672; #line 554 s__init_num = 0; #line 555 if (! tmp___10) { #line 556 ret = -1; goto end; } goto switch_1_break; switch_1_8672: ; switch_1_8673: #line 564 ret = __VERIFIER_nondet_int(); #line 565 if (blastFlag == 3) { #line 566 blastFlag = 4; } #line 570 if (ret <= 0) { goto end; } #line 575 s__state = 8448; #line 576 if (s__hit) { #line 577 s__s3__tmp__next_state___0 = 8640; } else { #line 579 s__s3__tmp__next_state___0 = 3; } #line 581 s__init_num = 0; goto switch_1_break; switch_1_3: #line 584 s__init_buf___0 = 0; #line 585 s__init_num = 0; #line 586 if (got_new_session) { #line 587 s__new_session = 0; #line 588 s__ctx__stats__sess_accept_good ++; #line 589 if (cb != 0) { } } #line 597 ret = 1; goto end; switch_1_default: #line 600 ret = -1; goto end; } else { switch_1_break: ; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } s__s3__tmp__reuse_message = __VERIFIER_nondet_int(); if (! s__s3__tmp__reuse_message) { #line 642 if (! skip) { if(state == 8528){ if(s__state == 8544){ if(tmp___7 != 1024){ if(tmp___7 != 512){ if(__cil_tmp58 != 4294967294){ if(l != 4294967266){ goto ERROR; } } } } } } if (s__debug) { #line 644 ret = __VERIFIER_nondet_int(); #line 645 if (ret <= 0) { goto end; } } #line 653 if (cb != 0) { #line 654 if (s__state != state) { #line 655 new_state = s__state; #line 656 s__state = state; #line 657 s__state = new_state; } } } } #line 670 skip = 0; } while_0_break: /* CIL Label */ ; } end: #line 675 s__in_handshake --; #line 676 if (cb != 0) { } #line 681 return (ret); ERROR: __VERIFIER_error(); #line 683 return (-1); } }
int main(void) { char x1 = __VERIFIER_nondet_char(); assert(x1 >= SCHAR_MIN && x1 <= SCHAR_MAX); signed char x2 = __VERIFIER_nondet_signed_char(); assert(x2 >= SCHAR_MIN && x2 <= SCHAR_MAX); unsigned char x3 = __VERIFIER_nondet_unsigned_char(); assert(x3 >= 0 && x3 <= UCHAR_MAX); short x4 = __VERIFIER_nondet_short(); assert(x4 >= SHRT_MIN && x4 <= SHRT_MAX); signed short x5 = __VERIFIER_nondet_signed_short(); assert(x5 >= SHRT_MIN && x5 <= SHRT_MAX); signed short int x6 = __VERIFIER_nondet_signed_short_int(); assert(x6 >= SHRT_MIN && x6 <= SHRT_MAX); unsigned short x7 = __VERIFIER_nondet_unsigned_short(); assert(x7 >= 0 && x7 <= USHRT_MAX); unsigned short int x8 = __VERIFIER_nondet_unsigned_short_int(); assert(x8 >= 0 && x8 <= USHRT_MAX); int x9 = __VERIFIER_nondet_int(); assert(x9 >= INT_MIN && x9 <= INT_MAX); signed int x10 = __VERIFIER_nondet_signed_int(); assert(x10 >= INT_MIN && x10 <= INT_MAX); unsigned x11 = __VERIFIER_nondet_unsigned(); assert(x11 >= 0 && x11 <= UINT_MAX); unsigned int x12 = __VERIFIER_nondet_unsigned_int(); assert(x12 >= 0 && x12 <= UINT_MAX); long x13 = __VERIFIER_nondet_long(); assert(x13 >= LONG_MIN && x13 <= LONG_MAX); long int x14 = __VERIFIER_nondet_long_int(); assert(x14 >= LONG_MIN && x14 <= LONG_MAX); signed long x15 = __VERIFIER_nondet_signed_long(); assert(x15 >= LONG_MIN && x15 <= LONG_MAX); signed long int x16 = __VERIFIER_nondet_signed_long_int(); assert(x16 >= LONG_MIN && x16 <= LONG_MAX); unsigned long x17 = __VERIFIER_nondet_unsigned_long(); assert(x17 >= 0 && x17 <= ULONG_MAX); unsigned long int x18 = __VERIFIER_nondet_unsigned_long_int(); assert(x18 >= 0 && x18 <= ULONG_MAX); long long x19 = __VERIFIER_nondet_long_long(); assert(x19 >= LLONG_MIN && x19 <= LLONG_MAX); long long int x20 = __VERIFIER_nondet_long_long_int(); assert(x20 >= LLONG_MIN && x20 <= LLONG_MAX); signed long long x21 = __VERIFIER_nondet_signed_long_long(); assert(x21 >= LLONG_MIN && x21 <= LLONG_MAX); signed long long int x22 = __VERIFIER_nondet_signed_long_long_int(); assert(x22 >= LLONG_MIN && x22 <= LLONG_MAX); unsigned long long x23 = __VERIFIER_nondet_unsigned_long_long(); assert(x23 >= 0 && x23 <= ULLONG_MAX); unsigned long long int x24 = __VERIFIER_nondet_unsigned_long_long_int(); assert(x24 >= 0 && x24 <= ULLONG_MAX); // Used in SVCCOMP benchmarks _Bool x25 = __VERIFIER_nondet_bool(); assert(x25 == 0 || x25 == 1); unsigned char x26 = __VERIFIER_nondet_uchar(); assert(x26 >= 0 && x26 <= UCHAR_MAX); unsigned short x27 = __VERIFIER_nondet_ushort(); assert(x27 >= 0 && x27 <= USHRT_MAX); unsigned int x28 = __VERIFIER_nondet_uint(); assert(x28 >= 0 && x28 <= UINT_MAX); unsigned long x29 = __VERIFIER_nondet_ulong(); assert(x29 >= 0 && x29 <= ULONG_MAX); return 0; }
int ssl3_accept(int initial_state ) { int s__info_callback = __VERIFIER_nondet_int() ; int s__in_handshake = __VERIFIER_nondet_int() ; int s__state ; int s__new_session ; int s__server ; int s__version = __VERIFIER_nondet_int() ; int s__type ; int s__init_num ; int s__hit = __VERIFIER_nondet_int() ; int s__rwstate ; int s__init_buf___0 ; int s__debug = __VERIFIER_nondet_int() ; int s__shutdown ; int s__cert = __VERIFIER_nondet_int() ; int s__options = __VERIFIER_nondet_int() ; int s__verify_mode = __VERIFIER_nondet_int() ; int s__session__peer = __VERIFIER_nondet_int() ; int s__cert__pkeys__AT0__privatekey = __VERIFIER_nondet_int() ; int s__ctx__info_callback = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_renegotiate = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_good = __VERIFIER_nondet_int() ; int s__s3__tmp__cert_request ; int s__s3__tmp__reuse_message = __VERIFIER_nondet_int() ; int s__s3__tmp__use_rsa_tmp ; int s__s3__tmp__new_cipher = __VERIFIER_nondet_int() ; int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int() ; int s__s3__tmp__next_state___0 ; int s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int() ; int s__session__cipher ; int buf = __VERIFIER_nondet_int() ; unsigned long l ; unsigned long Time ; unsigned long tmp = __VERIFIER_nondet_long() ; int cb ; long num1 ; int ret ; int new_state ; int state ; int skip ; int got_new_session ; int tmp___1 = __VERIFIER_nondet_int() ; int tmp___2 = __VERIFIER_nondet_int() ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; long tmp___8 = __VERIFIER_nondet_long() ; int tmp___9 ; int tmp___10 ; int blastFlag ; int __cil_tmp55 ; unsigned long __cil_tmp56 ; unsigned long __cil_tmp57 ; unsigned long __cil_tmp58 ; unsigned long __cil_tmp59 ; int __cil_tmp60 ; unsigned long __cil_tmp61 ; { #line 60 ; s__state = initial_state; #line 61 blastFlag = 0; #line 62 Time = tmp; #line 63 cb = 0; #line 64 ret = -1; #line 65 skip = 0; #line 66 got_new_session = 0; #line 67 if (s__info_callback != 0) { #line 68 cb = s__info_callback; } else { #line 70 if (s__ctx__info_callback != 0) { #line 71 cb = s__ctx__info_callback; } } #line 76 s__in_handshake ++; #line 77 if (tmp___1 + 12288) { #line 78 if (tmp___2 + 16384) { } } #line 86 if (s__cert == 0) { #line 87 return (-1); } { #line 92 while (1) { while_0_continue: /* CIL Label */ ; #line 94 state = s__state; #line 95 if (s__state == 12292) { goto switch_1_12292; } else { #line 98 if (s__state == 16384) { goto switch_1_16384; } else { #line 101 if (s__state == 8192) { goto switch_1_8192; } else { #line 104 if (s__state == 24576) { goto switch_1_24576; } else { #line 107 if (s__state == 8195) { goto switch_1_8195; } else { #line 110 if (s__state == 8480) { goto switch_1_8480; } else { #line 113 if (s__state == 8481) { goto switch_1_8481; } else { #line 116 if (s__state == 8482) { goto switch_1_8482; } else { #line 119 if (s__state == 8464) { goto switch_1_8464; } else { #line 122 if (s__state == 8465) { goto switch_1_8465; } else { #line 125 if (s__state == 8466) { goto switch_1_8466; } else { #line 128 if (s__state == 8496) { goto switch_1_8496; } else { #line 131 if (s__state == 8497) { goto switch_1_8497; } else { #line 134 if (s__state == 8512) { goto switch_1_8512; } else { #line 137 if (s__state == 8513) { goto switch_1_8513; } else { #line 140 if (s__state == 8528) { goto switch_1_8528; } else { #line 143 if (s__state == 8529) { goto switch_1_8529; } else { #line 146 if (s__state == 8544) { goto switch_1_8544; } else { #line 149 if (s__state == 8545) { goto switch_1_8545; } else { #line 152 if (s__state == 8560) { goto switch_1_8560; } else { #line 155 if (s__state == 8561) { goto switch_1_8561; } else { #line 158 if (s__state == 8448) { goto switch_1_8448; } else { #line 161 if (s__state == 8576) { goto switch_1_8576; } else { #line 164 if (s__state == 8577) { goto switch_1_8577; } else { #line 167 if (s__state == 8592) { goto switch_1_8592; } else { #line 170 if (s__state == 8593) { goto switch_1_8593; } else { #line 173 if (s__state == 8608) { goto switch_1_8608; } else { #line 176 if (s__state == 8609) { goto switch_1_8609; } else { #line 179 if (s__state == 8640) { goto switch_1_8640; } else { #line 182 if (s__state == 8641) { goto switch_1_8641; } else { #line 185 if (s__state == 8656) { goto switch_1_8656; } else { #line 188 if (s__state == 8657) { goto switch_1_8657; } else { #line 191 if (s__state == 8672) { goto switch_1_8672; } else { #line 194 if (s__state == 8673) { goto switch_1_8673; } else { #line 197 if (s__state == 3) { goto switch_1_3; } else { goto switch_1_default; #line 202 if (0) { switch_1_12292: #line 204 s__new_session = 1; switch_1_16384: ; switch_1_8192: ; switch_1_24576: ; switch_1_8195: #line 209 s__server = 1; #line 210 if (cb != 0) { } { #line 215 __cil_tmp55 = s__version * 8; #line 215 if (__cil_tmp55 != 3) { #line 216 return (-1); } } #line 220 s__type = 8192; #line 221 if (s__init_buf___0 == 0) { #line 222 tmp___3 = __VERIFIER_nondet_int(); #line 223 if (! tmp___3) { #line 224 ret = -1; goto end; } #line 229 s__init_buf___0 = buf; } #line 233 tmp___4 = __VERIFIER_nondet_int(); #line 234 if (! tmp___4) { #line 235 ret = -1; goto end; } #line 240 s__init_num = 0; #line 241 if (s__state != 12292) { #line 242 tmp___5 = __VERIFIER_nondet_int(); #line 243 if (! tmp___5) { #line 244 ret = -1; goto end; } #line 249 s__state = 8464; #line 250 s__ctx__stats__sess_accept ++; } else { #line 252 s__ctx__stats__sess_accept_renegotiate ++; #line 253 s__state = 8480; } goto switch_1_break; switch_1_8480: ; switch_1_8481: #line 258 s__shutdown = 0; #line 259 ret = __VERIFIER_nondet_int(); #line 260 if (ret <= 0) { goto end; } #line 265 s__s3__tmp__next_state___0 = 8482; #line 266 s__state = 8448; #line 267 s__init_num = 0; goto switch_1_break; switch_1_8482: #line 270 s__state = 3; goto switch_1_break; switch_1_8464: ; switch_1_8465: ; switch_1_8466: #line 275 s__shutdown = 0; #line 276 ret = __VERIFIER_nondet_int(); #line 277 if (blastFlag == 0) { #line 278 blastFlag = 1; } #line 282 if (ret <= 0) { goto end; } #line 287 got_new_session = 1; #line 288 s__state = 8496; #line 289 s__init_num = 0; goto switch_1_break; switch_1_8496: ; switch_1_8497: #line 293 ret = __VERIFIER_nondet_int(); #line 294 if (blastFlag == 1) { #line 295 blastFlag = 2; } #line 299 if (ret <= 0) { goto end; } #line 304 if (s__hit) { #line 305 s__state = 8656; } else { #line 307 s__state = 8512; } #line 309 s__init_num = 0; goto switch_1_break; switch_1_8512: ; switch_1_8513: ; { #line 313 __cil_tmp56 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 313 if (__cil_tmp56 + 256UL) { #line 314 skip = 1; } else { #line 316 ret = __VERIFIER_nondet_int(); #line 317 if (ret <= 0) { goto end; } } } #line 323 s__state = 8528; #line 324 s__init_num = 0; goto switch_1_break; switch_1_8528: ; switch_1_8529: #line 328 l = (unsigned long )s__s3__tmp__new_cipher__algorithms; { #line 329 __cil_tmp57 = (unsigned long )s__options; #line 329 if (__cil_tmp57 + 2097152UL) { #line 330 s__s3__tmp__use_rsa_tmp = 1; } else { #line 332 s__s3__tmp__use_rsa_tmp = 0; } } #line 334 if (s__s3__tmp__use_rsa_tmp) { goto _L___0; } else { #line 337 if (l + 30UL) { goto _L___0; } else { #line 340 if (l + 1UL) { #line 341 if (s__cert__pkeys__AT0__privatekey == 0) { goto _L___0; } else { { #line 344 __cil_tmp58 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 344 if (__cil_tmp58 + 2UL) { #line 345 tmp___6 = __VERIFIER_nondet_int(); { #line 346 __cil_tmp59 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; #line 346 if (__cil_tmp59 + 4UL) { #line 347 tmp___7 = 512; } else { #line 349 tmp___7 = 1024; } } { #line 351 __cil_tmp60 = tmp___6 * 8; #line 351 if (__cil_tmp60 > tmp___7) { _L___0: #line 353 ret = __VERIFIER_nondet_int(); #line 354 if (ret <= 0) { goto end; } } else { #line 360 skip = 1; } } } else { #line 363 skip = 1; } } } } else { #line 367 skip = 1; } } } #line 371 s__state = 8544; #line 372 s__init_num = 0; goto switch_1_break; switch_1_8544: ; switch_1_8545: ; #line 376 if (s__verify_mode + 1) { #line 377 if (s__session__peer != 0) { #line 378 if (s__verify_mode + 4) { #line 379 skip = 1; #line 380 s__s3__tmp__cert_request = 0; #line 381 s__state = 8560; } else { goto _L___2; } } else { _L___2: { #line 387 __cil_tmp61 = (unsigned long )s__s3__tmp__new_cipher__algorithms; #line 387 if (__cil_tmp61 + 256UL) { #line 388 if (s__verify_mode + 2) { goto _L___1; } else { #line 391 skip = 1; #line 392 s__s3__tmp__cert_request = 0; #line 393 s__state = 8560; } } else { _L___1: #line 397 s__s3__tmp__cert_request = 1; #line 398 ret = __VERIFIER_nondet_int(); #line 399 if (ret <= 0) { goto end; } #line 404 s__state = 8448; #line 405 s__s3__tmp__next_state___0 = 8576; #line 406 s__init_num = 0; } } } } else { #line 410 skip = 1; #line 411 s__s3__tmp__cert_request = 0; #line 412 s__state = 8560; } goto switch_1_break; switch_1_8560: ; switch_1_8561: #line 417 ret = __VERIFIER_nondet_int(); #line 418 if (ret <= 0) { goto end; } #line 423 s__s3__tmp__next_state___0 = 8576; #line 424 s__state = 8448; #line 425 s__init_num = 0; goto switch_1_break; switch_1_8448: #line 428 num1 = __VERIFIER_nondet_int(); #line 429 if (num1 > 0L) { #line 430 s__rwstate = 2; #line 431 num1 = tmp___8; #line 432 if (num1 <= 0L) { #line 433 ret = -1; goto end; } #line 438 s__rwstate = 1; } #line 442 s__state = s__s3__tmp__next_state___0; goto switch_1_break; switch_1_8576: ; switch_1_8577: #line 446 ret = __VERIFIER_nondet_int(); #line 447 if (ret <= 0) { goto end; } #line 452 if (ret == 2) { #line 453 s__state = 8466; } else { #line 455 ret = __VERIFIER_nondet_int(); #line 456 if (ret <= 0) { goto end; } #line 461 s__init_num = 0; #line 462 s__state = 8592; } goto switch_1_break; switch_1_8592: ; switch_1_8593: #line 467 ret = __VERIFIER_nondet_int(); #line 468 if (ret <= 0) { goto end; } #line 473 s__state = 8608; #line 474 s__init_num = 0; goto switch_1_break; switch_1_8608: ; switch_1_8609: #line 478 ret = __VERIFIER_nondet_int(); #line 479 if (ret <= 0) { goto end; } #line 484 s__state = 8640; #line 485 s__init_num = 0; goto switch_1_break; switch_1_8640: ; switch_1_8641: #line 489 ret = __VERIFIER_nondet_int(); #line 490 if (blastFlag == 3) { #line 491 blastFlag = 4; } #line 495 if (ret <= 0) { goto end; } #line 500 if (s__hit) { #line 501 s__state = 3; } else { #line 503 s__state = 8656; } #line 505 s__init_num = 0; goto switch_1_break; switch_1_8656: ; switch_1_8657: #line 509 s__session__cipher = s__s3__tmp__new_cipher; #line 510 tmp___9 = __VERIFIER_nondet_int(); #line 511 if (! tmp___9) { #line 512 ret = -1; goto end; } #line 517 ret = __VERIFIER_nondet_int(); #line 518 if (blastFlag == 2) { #line 519 blastFlag = 3; } #line 523 if (ret <= 0) { goto end; } #line 528 s__state = 8672; #line 529 s__init_num = 0; #line 530 tmp___10 = __VERIFIER_nondet_int(); #line 531 if (! tmp___10) { #line 532 ret = -1; goto end; } goto switch_1_break; switch_1_8672: ; switch_1_8673: #line 540 ret = __VERIFIER_nondet_int(); #line 541 if (blastFlag == 4) { #line 542 blastFlag = 5; } else { #line 544 if (blastFlag == 3) { goto ERROR; } } #line 550 if (ret <= 0) { goto end; } #line 555 s__state = 8448; #line 556 if (s__hit) { #line 557 s__s3__tmp__next_state___0 = 8640; } else { #line 559 s__s3__tmp__next_state___0 = 3; } #line 561 s__init_num = 0; goto switch_1_break; switch_1_3: #line 564 s__init_buf___0 = 0; #line 565 s__init_num = 0; #line 566 if (got_new_session) { #line 567 s__new_session = 0; #line 568 s__ctx__stats__sess_accept_good ++; #line 569 if (cb != 0) { } } #line 577 ret = 1; goto end; switch_1_default: #line 580 ret = -1; goto end; } else { switch_1_break: ; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } #line 621 if (! s__s3__tmp__reuse_message) { #line 622 if (! skip) { #line 623 if (s__debug) { #line 624 ret = __VERIFIER_nondet_int(); #line 625 if (ret <= 0) { goto end; } } #line 633 if (cb != 0) { #line 634 if (s__state != state) { #line 635 new_state = s__state; #line 636 s__state = state; #line 637 s__state = new_state; } } } } #line 650 skip = 0; } while_0_break: /* CIL Label */ ; } end: #line 655 s__in_handshake --; #line 656 if (cb != 0) { } #line 661 return (ret); ERROR:assert(0); #line 663 return (-1); } }
long int schedule_timeout(long arg0) { // Simple type return __VERIFIER_nondet_long(); }
long int simple_strtol(const char *arg0, char **arg1, unsigned int arg2) { // Simple type return __VERIFIER_nondet_long(); }
long int prepare_to_wait_event(wait_queue_head_t *arg0, wait_queue_t *arg1, int arg2) { // Simple type return __VERIFIER_nondet_long(); }
void *whoop_wrapper_nvram_llseek(void* args) { nvram_llseek(whoop_file_3, __VERIFIER_nondet_long(), whoop_int); return NULL; }
int ssl3_accept(int initial_state ) { int s__info_callback = __VERIFIER_nondet_int() ; int s__in_handshake = __VERIFIER_nondet_int() ; int s__state ; int s__new_session ; int s__server ; int s__version = __VERIFIER_nondet_int() ; int s__type ; int s__init_num ; int s__hit = __VERIFIER_nondet_int() ; int s__rwstate ; int s__init_buf___0 ; int s__debug = __VERIFIER_nondet_int() ; int s__shutdown ; int s__cert = __VERIFIER_nondet_int() ; int s__options = __VERIFIER_nondet_int() ; int s__verify_mode = __VERIFIER_nondet_int() ; int s__session__peer = __VERIFIER_nondet_int() ; int s__cert__pkeys__AT0__privatekey = __VERIFIER_nondet_int() ; int s__ctx__info_callback = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_renegotiate = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept = __VERIFIER_nondet_int() ; int s__ctx__stats__sess_accept_good = __VERIFIER_nondet_int() ; int s__s3__tmp__cert_request ; int s__s3__tmp__reuse_message = __VERIFIER_nondet_int() ; int s__s3__tmp__use_rsa_tmp ; int s__s3__tmp__new_cipher = __VERIFIER_nondet_int() ; int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int() ; int s__s3__tmp__next_state___0 ; int s__s3__tmp__new_cipher__algo_strength = __VERIFIER_nondet_int() ; int s__session__cipher ; int buf ; unsigned long l ; unsigned long Time ; unsigned long tmp ; int cb ; long num1 = __VERIFIER_nondet_long() ; int ret ; int new_state ; int state ; int skip ; int got_new_session ; int tmp___1 = __VERIFIER_nondet_int() ; int tmp___2 = __VERIFIER_nondet_int() ; int tmp___3 = __VERIFIER_nondet_int() ; int tmp___4 = __VERIFIER_nondet_int() ; int tmp___5 = __VERIFIER_nondet_int() ; int tmp___6 = __VERIFIER_nondet_int() ; int tmp___7 ; long tmp___8 = __VERIFIER_nondet_long() ; int tmp___9 = __VERIFIER_nondet_int() ; int tmp___10 = __VERIFIER_nondet_int() ; int blastFlag ; int __cil_tmp55 ; unsigned long __cil_tmp56 ; unsigned long __cil_tmp57 ; unsigned long __cil_tmp58 ; unsigned long __cil_tmp59 ; int __cil_tmp60 ; unsigned long __cil_tmp61 ; { ; s__state = initial_state; blastFlag = 0; tmp = __VERIFIER_nondet_int(); Time = tmp; cb = 0; ret = -1; skip = 0; got_new_session = 0; if (s__info_callback != 0) { cb = s__info_callback; } else { if (s__ctx__info_callback != 0) { cb = s__ctx__info_callback; } if (cb != 0) { goto ERROR; } } s__in_handshake ++; if (tmp___1 + 12288) { if (tmp___2 + 16384) { } } if (s__cert == 0) { return (-1); } { while (1) { while_0_continue: /* CIL Label */ ; state = s__state; if (s__state == 12292) { goto switch_1_12292; } else { if (s__state == 16384) { goto switch_1_16384; } else { if (s__state == 8192) { goto switch_1_8192; } else { if (s__state == 24576) { goto switch_1_24576; } else { if (s__state == 8195) { goto switch_1_8195; } else { if (s__state == 8480) { goto switch_1_8480; } else { if (s__state == 8481) { goto switch_1_8481; } else { if (s__state == 8482) { goto switch_1_8482; } else { if (s__state == 8464) { goto switch_1_8464; } else { if (s__state == 8465) { goto switch_1_8465; } else { if (s__state == 8466) { goto switch_1_8466; } else { if (s__state == 8496) { goto switch_1_8496; } else { if (s__state == 8497) { goto switch_1_8497; } else { if (s__state == 8512) { goto switch_1_8512; } else { if (s__state == 8513) { goto switch_1_8513; } else { if (s__state == 8528) { goto switch_1_8528; } else { if (s__state == 8529) { goto switch_1_8529; } else { if (s__state == 8544) { goto switch_1_8544; } else { if (s__state == 8545) { goto switch_1_8545; } else { if (s__state == 8560) { goto switch_1_8560; } else { if (s__state == 8561) { goto switch_1_8561; } else { if (s__state == 8448) { goto switch_1_8448; } else { if (s__state == 8576) { goto switch_1_8576; } else { if (s__state == 8577) { goto switch_1_8577; } else { if (s__state == 8592) { goto switch_1_8592; } else { if (s__state == 8593) { goto switch_1_8593; } else { if (s__state == 8608) { goto switch_1_8608; } else { if (s__state == 8609) { goto switch_1_8609; } else { if (s__state == 8640) { goto switch_1_8640; } else { if (s__state == 8641) { goto switch_1_8641; } else { if (s__state == 8656) { goto switch_1_8656; } else { if (s__state == 8657) { goto switch_1_8657; } else { if (s__state == 8672) { goto switch_1_8672; } else { if (s__state == 8673) { goto switch_1_8673; } else { if (s__state == 3) { goto switch_1_3; } else { goto switch_1_default; if (0) { switch_1_12292: s__new_session = 1; switch_1_16384: ; switch_1_8192: ; switch_1_24576: ; switch_1_8195: s__server = 1; if (cb != 0) { } { __cil_tmp55 = s__version * 8; if (__cil_tmp55 != 3) { return (-1); } } s__type = 8192; if (s__init_buf___0 == 0) { buf = __VERIFIER_nondet_int(); if (buf == 0) { ret = -1; goto end; } if (! tmp___3) { ret = -1; goto end; } s__init_buf___0 = buf; } if (! tmp___4) { ret = -1; goto end; } s__init_num = 0; if (s__state != 12292) { if (! tmp___5) { ret = -1; goto end; } s__state = 8464; s__ctx__stats__sess_accept ++; } else { s__ctx__stats__sess_accept_renegotiate ++; s__state = 8480; } goto switch_1_break; switch_1_8480: ; switch_1_8481: s__shutdown = 0; ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } s__s3__tmp__next_state___0 = 8482; s__state = 8448; s__init_num = 0; goto switch_1_break; switch_1_8482: s__state = 3; goto switch_1_break; switch_1_8464: ; switch_1_8465: ; switch_1_8466: s__shutdown = 0; ret = __VERIFIER_nondet_int(); if (blastFlag == 0) { blastFlag = 1; } if (ret <= 0) { goto end; } got_new_session = 1; s__state = 8496; s__init_num = 0; goto switch_1_break; switch_1_8496: ; switch_1_8497: ret = __VERIFIER_nondet_int(); if (blastFlag == 1) { blastFlag = 2; } if (ret <= 0) { goto end; } if (s__hit) { s__state = 8656; } else { s__state = 8512; } s__init_num = 0; goto switch_1_break; switch_1_8512: ; switch_1_8513: ; { __cil_tmp56 = (unsigned long )s__s3__tmp__new_cipher__algorithms; if (__cil_tmp56 + 256UL) { skip = 1; } else { ret = __VERIFIER_nondet_int(); if (blastFlag == 2) { blastFlag = 3; } if (ret <= 0) { goto end; } } } s__state = 8528; s__init_num = 0; goto switch_1_break; switch_1_8528: ; switch_1_8529: l = (unsigned long )s__s3__tmp__new_cipher__algorithms; { __cil_tmp57 = (unsigned long )s__options; if (__cil_tmp57 + 2097152UL) { s__s3__tmp__use_rsa_tmp = 1; } else { s__s3__tmp__use_rsa_tmp = 0; } } if (s__s3__tmp__use_rsa_tmp) { goto _L___0; } else { if (l + 30UL) { goto _L___0; } else { if (l + 1UL) { if (s__cert__pkeys__AT0__privatekey == 0) { goto _L___0; } else { { __cil_tmp58 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; if (__cil_tmp58 + 2UL) { { __cil_tmp59 = (unsigned long )s__s3__tmp__new_cipher__algo_strength; if (__cil_tmp59 + 4UL) { tmp___7 = 512; } else { tmp___7 = 1024; } } { __cil_tmp60 = tmp___6 * 8; if (__cil_tmp60 > tmp___7) { _L___0: ret = __VERIFIER_nondet_int(); if (blastFlag == 3) { blastFlag = 4; } if (ret <= 0) { goto end; } } else { skip = 1; } } } else { skip = 1; } } } } else { skip = 1; } } } s__state = 8544; s__init_num = 0; goto switch_1_break; switch_1_8544: ; switch_1_8545: ; if (s__verify_mode + 1) { if (s__session__peer != 0) { if (s__verify_mode + 4) { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } else { goto _L___2; } } else { _L___2: { __cil_tmp61 = (unsigned long )s__s3__tmp__new_cipher__algorithms; if (__cil_tmp61 + 256UL) { if (s__verify_mode + 2) { goto _L___1; } else { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } } else { _L___1: s__s3__tmp__cert_request = 1; ret = __VERIFIER_nondet_int(); if (blastFlag == 4) { blastFlag = 5; } if (ret <= 0) { goto end; } s__state = 8448; s__s3__tmp__next_state___0 = 8576; s__init_num = 0; } } } } else { skip = 1; s__s3__tmp__cert_request = 0; s__state = 8560; } goto switch_1_break; switch_1_8560: ; switch_1_8561: ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } s__s3__tmp__next_state___0 = 8576; s__state = 8448; s__init_num = 0; goto switch_1_break; switch_1_8448: if (num1 > 0L) { s__rwstate = 2; num1 = tmp___8; if (num1 <= 0L) { ret = -1; goto end; } s__rwstate = 1; } s__state = s__s3__tmp__next_state___0; goto switch_1_break; switch_1_8576: ; switch_1_8577: ret = __VERIFIER_nondet_int(); if (blastFlag == 5) { blastFlag = 6; } if (ret <= 0) { goto end; } if (ret == 2) { s__state = 8466; } else { ret = __VERIFIER_nondet_int(); if (blastFlag == 6) { blastFlag = 7; } if (ret <= 0) { goto end; } s__init_num = 0; s__state = 8592; } goto switch_1_break; switch_1_8592: ; switch_1_8593: ret = __VERIFIER_nondet_int(); if (blastFlag == 7) { blastFlag = 8; } if (ret <= 0) { goto end; } s__state = 8608; s__init_num = 0; goto switch_1_break; switch_1_8608: ; switch_1_8609: ret = __VERIFIER_nondet_int(); if (blastFlag == 8) { blastFlag = 9; } if (ret <= 0) { goto end; } s__state = 8640; s__init_num = 0; goto switch_1_break; switch_1_8640: ; switch_1_8641: ret = __VERIFIER_nondet_int(); if (blastFlag == 9) { blastFlag = 10; } else { if (blastFlag == 12) { blastFlag = 13; } else { if (blastFlag == 15) { blastFlag = 16; } else { if (blastFlag == 18) { blastFlag = 19; } else { if (blastFlag == 21) { goto ERROR; } } } } } if (ret <= 0) { goto end; } if (s__hit) { s__state = 3; } else { s__state = 8656; } s__init_num = 0; goto switch_1_break; switch_1_8656: ; switch_1_8657: s__session__cipher = s__s3__tmp__new_cipher; if (! tmp___9) { ret = -1; goto end; } ret = __VERIFIER_nondet_int(); if (blastFlag == 10) { blastFlag = 11; } else { if (blastFlag == 13) { blastFlag = 14; } else { if (blastFlag == 16) { blastFlag = 17; } else { if (blastFlag == 19) { blastFlag = 20; } } } } if (ret <= 0) { goto end; } s__state = 8672; s__init_num = 0; if (! tmp___10) { ret = -1; goto end; } goto switch_1_break; switch_1_8672: ; switch_1_8673: ret = __VERIFIER_nondet_int(); if (blastFlag == 11) { blastFlag = 12; } else { if (blastFlag == 14) { blastFlag = 15; } else { if (blastFlag == 17) { blastFlag = 18; } else { if (blastFlag == 20) { blastFlag = 21; } } } } if (ret <= 0) { goto end; } s__state = 8448; if (s__hit) { s__s3__tmp__next_state___0 = 8640; } else { s__s3__tmp__next_state___0 = 3; } s__init_num = 0; goto switch_1_break; switch_1_3: s__init_buf___0 = 0; s__init_num = 0; if (got_new_session) { s__new_session = 0; s__ctx__stats__sess_accept_good ++; if (cb != 0) { } } ret = 1; goto end; switch_1_default: ret = -1; goto end; } else { switch_1_break: ; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } if (! s__s3__tmp__reuse_message) { if (! skip) { if (s__debug) { ret = __VERIFIER_nondet_int(); if (ret <= 0) { goto end; } } if (cb != 0) { if (s__state != state) { new_state = s__state; s__state = state; s__state = new_state; } } } } skip = 0; } while_0_break: /* CIL Label */ ; } end: s__in_handshake --; if (cb != 0) { } return (ret); ERROR: __VERIFIER_error(); return (-1); } }
long int wait_for_completion_interruptible_timeout(struct completion *arg0, unsigned long arg1) { // Simple type return __VERIFIER_nondet_long(); }