// clang-format off
int f1(int *arr)
  __CPROVER_assigns(*arr)
  __CPROVER_ensures(__CPROVER_exists {
    int i;
    (0 <= i && i < 10) && arr[i] == i
  })
// clang-format on
{
  arr[0] = 0;
  arr[1] = 1;
  arr[2] = 2;
  arr[3] = 3;
  arr[4] = 4;
  arr[5] = 5;
  arr[6] = 6;
  arr[7] = 7;
  arr[8] = 8;
  arr[9] = 9;

  return 0;
}

// clang-format off
int f2(int *arr)
  __CPROVER_assigns(*arr)
  __CPROVER_ensures(__CPROVER_exists {
    int i;
    (0 <= i && i < 10) && arr[i] != 0
  })
// clang-format on
{
  arr[0] = 0;
  arr[1] = 1;
  arr[2] = 2;
  arr[3] = 3;
  arr[4] = 4;
  arr[5] = 5;
  arr[6] = 6;
  arr[7] = 7;
  arr[8] = 8;
  arr[9] = 9;

  return 0;
}

int main()
{
  int arr[10];
  f2(arr);
  f1(arr);
}
