#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 - 1]);
    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     11c0 <main+0x90>
cmpl   $0x4,-0x14(%rbp)
jg     118d <main+0x5d>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%edi
call   1050 <foo@plt>
jmp    11ad <main+0x7d>
cmpl   $0x7,-0x14(%rbp)
jl     11a8 <main+0x78>
cmpl   $0x9,-0x14(%rbp)
jg     11a8 <main+0x78>
mov    $0x0,%al
call   1040 <bar@plt>
jmp    11ad <main+0x7d>
jmp    11b2 <main+0x82>
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    $0xdead,%edi
call   1050 <foo@plt>
mov    $0xbeef,%edi
call   1050 <foo@plt>
mov    $0x1337,%edi
call   1050 <foo@plt>
mov    $0x4242,%edi
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 = %32, %2
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 12
br i1 %11, label %12, label %35
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp sle i32 %13, 4
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @foo(i32 %20)
br label %31
22: ; preds = %12
%23 = load i32, i32* %6
%24 = icmp sge i32 %23, 7
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load i32, i32* %6
%27 = icmp sle i32 %26, 9
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (...) @bar()
br label %30
30: ; preds = %28, %25, %22
br label %31
31: ; preds = %30, %15
br label %32
32: ; preds = %31
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %9
35: ; preds = %9
%36 = call i32 (...) @abort()
unreachable
}

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