#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*/ __CRAB_assert(int);
int __CRAB_intrinsic_foo(int, int);
int main() {
  int x, y, z, i;
  x = 0;
  y = 0;
  z = 0;
  for (i = 0; i < 10; i++) {
    x++;
    y++;
    z = __CRAB_intrinsic_foo(x, y);
  }
  __CRAB_assert(x >= y);
  __CRAB_assert(y >= x);
  __CRAB_assert(z >= x);
  return x + y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1183 <main+0x63>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <main+0x2b>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x3,%edi
mov    $0x3,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x5,%edi
mov    $0x5,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x6,%edi
mov    $0x6,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x7,%edi
mov    $0x7,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0x9,%edi
mov    $0x9,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1030 <__CRAB_intrinsic_foo@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1040 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1040 <__CRAB_assert@plt>
xor    %edi,%edi
cmp    $0xa,%ebx
setge  %dil
call   1040 <__CRAB_assert@plt>
mov    $0x14,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @__CRAB_intrinsic_foo(i32 %14, i32 %15)
store i32 %16, i32* %4
br label %17
17: ; preds = %9
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp sge i32 %21, %22
%24 = zext i1 %23 to i32
%25 = call i32 @__CRAB_assert(i32 %24)
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp sge i32 %26, %27
%29 = zext i1 %28 to i32
%30 = call i32 @__CRAB_assert(i32 %29)
%31 = load i32, i32* %4
%32 = load i32, i32* %2
%33 = icmp sge i32 %31, %32
%34 = zext i1 %33 to i32
%35 = call i32 @__CRAB_assert(i32 %34)
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__CRAB_intrinsic_foo(i32 1, i32 1)
%2 = tail call i32 @__CRAB_intrinsic_foo(i32 2, i32 2)
%3 = tail call i32 @__CRAB_intrinsic_foo(i32 3, i32 3)
%4 = tail call i32 @__CRAB_intrinsic_foo(i32 4, i32 4)
%5 = tail call i32 @__CRAB_intrinsic_foo(i32 5, i32 5)
%6 = tail call i32 @__CRAB_intrinsic_foo(i32 6, i32 6)
%7 = tail call i32 @__CRAB_intrinsic_foo(i32 7, i32 7)
%8 = tail call i32 @__CRAB_intrinsic_foo(i32 8, i32 8)
%9 = tail call i32 @__CRAB_intrinsic_foo(i32 9, i32 9)
%10 = tail call i32 @__CRAB_intrinsic_foo(i32 10, i32 10)
%11 = tail call i32 @__CRAB_assert(i32 1)
%12 = tail call i32 @__CRAB_assert(i32 1)
%13 = icmp sgt i32 %10, 9
%14 = zext i1 %13 to i32
%15 = tail call i32 @__CRAB_assert(i32 %14)
ret i32 20
}