#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*/ dummy(int, int, int, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i = 6;
  printf("Start.\n");
  while (argc > 6) {
    printf("i = %d\n", i);
  }
  if (argc > 1) {
    if (i > 0) {
      i--;
      printf("i = %d\n", i);
      if (i + argc > 7) {
        printf("here\n");
      }
    }
  }
  printf("Finished.\n");
  dummy(1, 3, 4, 5, "hello");
  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   $0x6,-0x14(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x6,-0x8(%rbp)
jle    116b <main+0x4b>
mov    -0x14(%rbp),%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    114b <main+0x2b>
cmpl   $0x1,-0x8(%rbp)
jle    11c0 <main+0xa0>
cmpl   $0x0,-0x14(%rbp)
jle    11bb <main+0x9b>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x7,%eax
jle    11b6 <main+0x96>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11bb <main+0x9b>
jmp    11c0 <main+0xa0>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
lea    0xe38(%rip),%r8
call   1030 <dummy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x7,%ebx
jl     1171 <main+0x41>
lea    0xeb5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1160 <main+0x30>
cmp    $0x2,%ebx
jl     119a <main+0x6a>
lea    0xe83(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x2,%ebx
je     119a <main+0x6a>
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe74(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5b(%rip),%r8
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
call   1030 <dummy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Start.\0A\00"
@.str.1 = [8 x i8] c"i = %d\0A\00"
@.str.2 = [6 x i8] c"here\0A\00"
@.str.3 = [11 x i8] c"Finished.\0A\00"
@.str.4 = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 6, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %11, %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 6
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %8
14: ; preds = %8
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 1
br i1 %16, label %17, label %33
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %32
20: ; preds = %17
%21 = load i32, i32* %6
%22 = add nsw i32 %21, -1
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %6
%26 = load i32, i32* %4
%27 = add nsw i32 %25, %26
%28 = icmp sgt i32 %27, 7
br i1 %28, label %29, label %31
29: ; preds = %20
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %20
br label %32
32: ; preds = %31, %17
br label %33
33: ; preds = %32, %14
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 @dummy(i32 1, i32 3, i32 4, i32 5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"i = %d\0A\00"
@.str.4 = [6 x i8] c"hello\00"
@str = [7 x i8] c"Start.\00"
@str.5 = [10 x i8] c"Finished.\00"
@str.6 = [5 x i8] c"here\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 6
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 6)
br label %7
7: ; preds = %7, %5
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 6)
br label %7
9: ; preds = %2
%10 = icmp sgt i32 %0, 1
br i1 %10, label %11, label %16
11: ; preds = %9
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 5)
%13 = icmp eq i32 %0, 2
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.6, i64 0, i64 0))
br label %16
16: ; preds = %14, %11, %9
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
%18 = tail call i32 @dummy(i32 1, i32 3, i32 4, i32 5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}