#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ __CPROVER_assume(int);
int /*<<< orphan*/ assert(int);
unsigned int nondet_uint();
int main() {
  int array[3][3] = {{0, 0, 0}, {1, 1, 1}, {2, 2, 2}};
  unsigned int a, b;
  a = nondet_uint();
  b = nondet_uint();
  __CPROVER_assume(a < 3 && b < 3);
  array[a][a] = array[b][b];
  array[a][a] = array[b][b];
  assert(array[a][a] >= 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
movl   $0x1,-0x24(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x2,-0x10(%rbp)
mov    $0x0,%al
call   1060 <nondet_uint@plt>
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1060 <nondet_uint@plt>
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x34(%rbp)
mov    %al,-0x39(%rbp)
jae    11b6 <main+0x76>
cmpl   $0x3,-0x38(%rbp)
setb   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
mov    -0x38(%rbp),%eax
mov    %eax,%ecx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
mov    %eax,%ecx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x34(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x1,0x10(%rsp)
movl   $0x2,0x20(%rsp)
xor    %eax,%eax
call   1050 <nondet_uint@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <nondet_uint@plt>
mov    %eax,%ebp
cmp    $0x3,%ebx
setb   %al
cmp    $0x3,%ebp
setb   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
mov    %ebp,%eax
lea    (%rax,%rax,2),%rcx
lea    (%rsp,%rcx,4),%rcx
mov    (%rcx,%rax,4),%edx
mov    %ebx,%esi
lea    (%rsi,%rsi,2),%rdi
lea    (%rsp,%rdi,4),%rdi
mov    %edx,(%rdi,%rsi,4)
mov    (%rcx,%rax,4),%edi
not    %edi
shr    $0x1f,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i32]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [3 x [3 x i32]]* %2 to i8*
%6 = bitcast i8* %5 to [3 x [3 x i32]]*
%7 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %6, i32 0, i32 1
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i32 0, i32 0
store i32 1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i32 0, i32 1
store i32 1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i32 0, i32 2
store i32 1, i32* %10
%11 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %6, i32 0, i32 2
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i32 0, i32 0
store i32 2, i32* %12
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i32 0, i32 1
store i32 2, i32* %13
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i32 0, i32 2
store i32 2, i32* %14
%15 = call i32 (...) @nondet_uint()
store i32 %15, i32* %3
%16 = call i32 (...) @nondet_uint()
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = icmp ult i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %0
%20 = load i32, i32* %4
%21 = icmp ult i32 %20, 3
br label %22
22: ; preds = %19, %0
%23 = phi i1 [ false, %0 ], [ %21, %19 ]
%24 = zext i1 %23 to i32
%25 = call i32 @__CPROVER_assume(i32 %24)
%26 = load i32, i32* %4
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %27
%29 = load i32, i32* %4
%30 = zext i32 %29 to i64
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %28, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = load i32, i32* %3
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %34
%36 = load i32, i32* %3
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %35, i64 0, i64 %37
store i32 %32, i32* %38
%39 = load i32, i32* %4
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %40
%42 = load i32, i32* %4
%43 = zext i32 %42 to i64
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %41, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = load i32, i32* %3
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %47
%49 = load i32, i32* %3
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds [3 x i32], [3 x i32]* %48, i64 0, i64 %50
store i32 %45, i32* %51
%52 = load i32, i32* %3
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %53
%55 = load i32, i32* %3
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds [3 x i32], [3 x i32]* %54, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = icmp sge i32 %58, 0
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = load i32, i32* %1
ret i32 %62
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = bitcast [3 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 1
store i32 1, i32* %3
%4 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 2
store i32 2, i32* %4
%5 = tail call i32 (...) @nondet_uint()
%6 = tail call i32 (...) @nondet_uint()
%7 = icmp ult i32 %5, 3
%8 = icmp ult i32 %6, 3
%9 = select i1 %7, i1 %8, i1 false
%10 = zext i1 %9 to i32
%11 = tail call i32 @__CPROVER_assume(i32 %10)
%12 = zext i32 %6 to i64
%13 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 %12, i64 %12
%14 = load i32, i32* %13
%15 = zext i32 %5 to i64
%16 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 %15, i64 %15
store i32 %14, i32* %16
%17 = load i32, i32* %13
%18 = xor i32 %17, -1
%19 = lshr i32 %18, 31
%20 = tail call i32 @assert(i32 %19)
ret i32 0
}