#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*/ clang_analyzer_dump(int);
int /*<<< orphan*/ clang_analyzer_numTimesReached();
int /*<<< orphan*/ clang_analyzer_printState();
void foo(int x) {
  clang_analyzer_dump(x);
  clang_analyzer_dump(x + (-1));
  int y = 1;
  for (; y < 3; ++y) {
    clang_analyzer_numTimesReached();
    if (y == 2) {
      int z = x > 13;
      if (!z)
        clang_analyzer_printState();
    }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <clang_analyzer_dump@plt>
mov    -0x4(%rbp),%edi
add    $0xffffffff,%edi
call   1050 <clang_analyzer_dump@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11a8 <foo+0x78>
mov    $0x0,%al
call   1030 <clang_analyzer_numTimesReached@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1195 <foo+0x65>
cmpl   $0xd,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1190 <foo+0x60>
mov    $0x0,%al
call   1040 <clang_analyzer_printState@plt>
jmp    1195 <foo+0x65>
jmp    119a <foo+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <foo+0x25>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %edi,%ebx
call   1050 <clang_analyzer_dump@plt>
lea    -0x1(%rbx),%edi
call   1050 <clang_analyzer_dump@plt>
xor    %eax,%eax
call   1030 <clang_analyzer_numTimesReached@plt>
xor    %eax,%eax
call   1030 <clang_analyzer_numTimesReached@plt>
cmp    $0xd,%ebx
jle    1155 <foo+0x25>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1040 <clang_analyzer_printState@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @clang_analyzer_dump(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
%9 = call i32 @clang_analyzer_dump(i32 %8)
store i32 1, i32* %3
br label %10
10: ; preds = %27, %1
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %30
13: ; preds = %10
%14 = call i32 (...) @clang_analyzer_numTimesReached()
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 13
%20 = zext i1 %19 to i32
store i32 %20, i32* %4
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %17
%24 = call i32 (...) @clang_analyzer_printState()
br label %25
25: ; preds = %23, %17
br label %26
26: ; preds = %25, %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %10
30: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i32 @clang_analyzer_dump(i32 %0)
%3 = add nsw i32 %0, -1
%4 = tail call i32 @clang_analyzer_dump(i32 %3)
%5 = icmp sgt i32 %0, 13
%6 = tail call i32 (...) @clang_analyzer_numTimesReached()
%7 = tail call i32 (...) @clang_analyzer_numTimesReached()
br i1 %5, label %10, label %8
8: ; preds = %1
%9 = tail call i32 (...) @clang_analyzer_printState()
br label %10
10: ; preds = %8, %1
ret void
}