#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*/ __analyzer_dump_exploded_nodes(int /*<<< orphan*/);
int /*<<< orphan*/ __analyzer_eval(int);
void test(int start, int end, int step) {
  int i;
  __analyzer_dump_exploded_nodes(0);
  for (i = start; i > end; i--) {
    __analyzer_eval(i > end);
    __analyzer_eval(i == start);
    __analyzer_eval(i <= start);
    __analyzer_dump_exploded_nodes(0);
  }
  __analyzer_eval(i >= end);
  __analyzer_eval(i == end);
  __analyzer_dump_exploded_nodes(0);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1198 <test+0x78>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <test+0x1e>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r15d
mov    %edi,%r12d
xor    %ebp,%ebp
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
cmp    %r15d,%r12d
jle    117d <test+0x5d>
nopl   0x0(%rax)
lea    (%r12,%rbp,1),%ebx
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
sub    $0x1,%ebp
setb   %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmp    %r12d,%ebx
setle  %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
lea    (%r12,%rbp,1),%eax
cmp    %r15d,%eax
jg     1140 <test+0x20>
mov    %r15d,%r12d
xor    %edi,%edi
xor    %r14d,%r14d
cmp    %r15d,%r12d
setge  %dil
sete   %r14b
call   1030 <__analyzer_eval@plt>
mov    %r14d,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <__analyzer_dump_exploded_nodes@plt>

LLVM IR (-O0):
define void @test(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i32 @__analyzer_dump_exploded_nodes(i32 0)
%9 = load i32, i32* %4
store i32 %9, i32* %7
br label %10
10: ; preds = %31, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %5
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %34
14: ; preds = %10
%15 = load i32, i32* %7
%16 = load i32, i32* %5
%17 = icmp sgt i32 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @__analyzer_eval(i32 %18)
%20 = load i32, i32* %7
%21 = load i32, i32* %4
%22 = icmp eq i32 %20, %21
%23 = zext i1 %22 to i32
%24 = call i32 @__analyzer_eval(i32 %23)
%25 = load i32, i32* %7
%26 = load i32, i32* %4
%27 = icmp sle i32 %25, %26
%28 = zext i1 %27 to i32
%29 = call i32 @__analyzer_eval(i32 %28)
%30 = call i32 @__analyzer_dump_exploded_nodes(i32 0)
br label %31
31: ; preds = %14
%32 = load i32, i32* %7
%33 = add nsw i32 %32, -1
store i32 %33, i32* %7
br label %10
34: ; preds = %10
%35 = load i32, i32* %7
%36 = load i32, i32* %5
%37 = icmp sge i32 %35, %36
%38 = zext i1 %37 to i32
%39 = call i32 @__analyzer_eval(i32 %38)
%40 = load i32, i32* %7
%41 = load i32, i32* %5
%42 = icmp eq i32 %40, %41
%43 = zext i1 %42 to i32
%44 = call i32 @__analyzer_eval(i32 %43)
%45 = call i32 @__analyzer_dump_exploded_nodes(i32 0)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
%5 = icmp sgt i32 %0, %1
br i1 %5, label %6, label %18
6: ; preds = %3, %6
%7 = phi i32 [ %16, %6 ], [ %0, %3 ]
%8 = tail call i32 @__analyzer_eval(i32 1)
%9 = icmp eq i32 %7, %0
%10 = zext i1 %9 to i32
%11 = tail call i32 @__analyzer_eval(i32 %10)
%12 = icmp sle i32 %7, %0
%13 = zext i1 %12 to i32
%14 = tail call i32 @__analyzer_eval(i32 %13)
%15 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
%16 = add nsw i32 %7, -1
%17 = icmp sgt i32 %16, %1
br i1 %17, label %6, label %18
18: ; preds = %6, %3
%19 = phi i32 [ %0, %3 ], [ %1, %6 ]
%20 = icmp sge i32 %19, %1
%21 = zext i1 %20 to i32
%22 = tail call i32 @__analyzer_eval(i32 %21)
%23 = icmp eq i32 %19, %1
%24 = zext i1 %23 to i32
%25 = tail call i32 @__analyzer_eval(i32 %24)
%26 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
ret void
}