#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) {
    printf("1\n");
    i++;
  }
  printf("2\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    119c <main+0x7c>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x1b>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
cmp    $0x63,%eax
jg     114c <main+0x2c>
mov    %eax,%ebx
add    $0xffffff9c,%ebx
lea    0xec6(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
inc    %ebx
jne    1140 <main+0x20>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\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 = %18, %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 %22
18: ; preds = %16
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"2\00"
@str.2 = [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 %8
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.2, i64 0, i64 0))
%6 = add i32 %4, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %3
8: ; preds = %3, %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}