#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 time(int /*<<< orphan*/ *);
int main() {
  int i = time(NULL);
  while (i < 100 || i < 20 || i < 10 || i < 5) {
    if (i == 55)
      printf("1\n");
    else {
      printf("2\n");
      break;
    }
    i++;
  }
  printf("3\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x64,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1172 <main+0x52>
mov    $0x1,%al
cmpl   $0x14,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1172 <main+0x52>
mov    $0x1,%al
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1172 <main+0x52>
cmpl   $0x5,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1182 <main+0x62>
jmp    11bc <main+0x9c>
cmpl   $0x37,-0x8(%rbp)
jne    119d <main+0x7d>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    11ae <main+0x8e>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0x9c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x1b>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
cmp    $0x63,%eax
jg     114a <main+0x2a>
cmp    $0x37,%eax
jne    113e <main+0x1e>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\0A\00"
@.str.2 = [3 x i8] c"3\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
store i32 %3, i32* %2
br label %4
4: ; preds = %25, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %16, label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 20
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 10
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 5
br label %16
16: ; preds = %13, %10, %7, %4
%17 = phi i1 [ true, %10 ], [ true, %7 ], [ true, %4 ], [ %15, %13 ]
br i1 %17, label %18, label %28
18: ; preds = %16
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 55
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %25
23: ; preds = %18
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %28
25: ; preds = %21
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %4
28: ; preds = %23, %16
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"3\00"
@str.3 = [2 x i8] c"2\00"
@str.4 = [2 x i8] c"1\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = icmp slt i32 %1, 100
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = icmp eq i32 %1, 55
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}