#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*/ abort();
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo(int);
int main(int argc, char *argv[]) {
  int i;
  int numbers[4] = {0xdead, 0xbeef, 0x1337, 0x4242};
  for (i = 1; i <= 12; i++) {
    if (i <= 4)
      foo(numbers[i]);
    else if (i >= 7 && i <= 9)
      bar();
  }
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jg     11bc <main+0x8c>
cmpl   $0x4,-0x14(%rbp)
jg     1189 <main+0x59>
movslq -0x14(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
call   1050 <foo@plt>
jmp    11a9 <main+0x79>
cmpl   $0x7,-0x14(%rbp)
jl     11a4 <main+0x74>
cmpl   $0x9,-0x14(%rbp)
jg     11a4 <main+0x74>
mov    $0x0,%al
call   1040 <bar@plt>
jmp    11a9 <main+0x79>
jmp    11ae <main+0x7e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <main+0x33>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xbeef,%edi
call   1050 <foo@plt>
mov    $0x1337,%edi
call   1050 <foo@plt>
mov    $0x4242,%edi
call   1050 <foo@plt>
call   1050 <foo@plt>
xor    %eax,%eax
call   1040 <bar@plt>
xor    %eax,%eax
call   1040 <bar@plt>
xor    %eax,%eax
call   1040 <bar@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.numbers = [4 x i32] [i32 57005, i32 48879, i32 4919, i32 16962]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [4 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i32]* %7 to i8*
store i32 1, i32* %6
br label %9
9: ; preds = %31, %2
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 12
br i1 %11, label %12, label %34
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp sle i32 %13, 4
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = call i32 @foo(i32 %19)
br label %30
21: ; preds = %12
%22 = load i32, i32* %6
%23 = icmp sge i32 %22, 7
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %6
%26 = icmp sle i32 %25, 9
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (...) @bar()
br label %29
29: ; preds = %27, %24, %21
br label %30
30: ; preds = %29, %15
br label %31
31: ; preds = %30
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %9
34: ; preds = %9
%35 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 48879)
%4 = tail call i32 @foo(i32 4919)
%5 = tail call i32 @foo(i32 16962)
%6 = tail call i32 @foo(i32 undef)
%7 = tail call i32 (...) @bar()
%8 = tail call i32 (...) @bar()
%9 = tail call i32 (...) @bar()
%10 = tail call i32 (...) @abort()
unreachable
}