extern void abort(void); extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "sorting_bubblesort_ground-1.c", 3, __extension__ __PRETTY_FUNCTION__); })); } void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } } extern int __VERIFIER_nondet_int(); int main( ) { int a[ 100000 ]; for(int j = 0; j < 100000; j++) { a[j] = __VERIFIER_nondet_int(); } int swapped = 1; while ( swapped ) { swapped = 0; int i = 1; while ( i < 100000 ) { if ( a[i - 1] > a[i] ) { int t = a[i]; a[i] = a[i - 1]; a[i-1] = t; swapped = 1; } i = i + 1; } } int x; int y; for ( x = 0 ; x < 100000 ; x++ ) { for ( y = x+1 ; y < 100000 ; y++ ) { __VERIFIER_assert( a[x] <= a[y] ); } } return 0; }