#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*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i;
  int n = 20;
  for (i = 0; - i < n; i--) {
    printf("- %d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x14,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
sub    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x14(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffd,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffc,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffb,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffa,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff0,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffef,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffee,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffed,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"- %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %7
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = sub nsw i32 0, %9
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i32, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13
%17 = load i32, i32* %6
%18 = add nsw i32 %17, -1
store i32 %18, i32* %6
br label %8
19: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"- %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -5)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -6)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -7)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -8)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -9)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -10)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -11)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -12)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -13)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -14)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -15)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -16)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -17)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -18)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -19)
ret i32 0
}