int main() {
  unsigned int SIZE = 3;
  int i = -2147483640;
  int j = -2147483640;
  int k = -2147483640;
  int key = -2147483640;
  int v[SIZE];
  for (j = 1; j < SIZE; j++) {
    key = 135266328;
    i = 0;
    while ((i >= 0) && (v[i] > key)) {
      if (i < 2) {
        v[i + 1] = v[i];
      }
      i = i - 1;
    }
    v[i + 1] = key;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x80000008,-0xc(%rbp)
movl   $0x80000008,-0x10(%rbp)
movl   $0x80000008,-0x14(%rbp)
movl   $0x80000008,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    11fd <main+0xfd>
movl   $0x8100018,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x31(%rbp)
jl     119d <main+0x9d>
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
setg   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    11ad <main+0xad>
jmp    11dc <main+0xdc>
cmpl   $0x2,-0xc(%rbp)
jge    11ce <main+0xce>
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    117a <main+0x7a>
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1160 <main+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i32 0, i32* %1
store i32 3, i32* %2
store i32 -2147483640, i32* %3
store i32 -2147483640, i32* %4
store i32 -2147483640, i32* %5
store i32 -2147483640, i32* %6
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca i32, i64 %10
store i64 %10, i64* %8
store i32 1, i32* %4
br label %13
13: ; preds = %51, %0
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %54
17: ; preds = %13
store i32 135266328, i32* %6
store i32 0, i32* %3
br label %18
18: ; preds = %42, %17
%19 = load i32, i32* %3
%20 = icmp sge i32 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %12, i64 %23
%25 = load i32, i32* %24
%26 = load i32, i32* %6
%27 = icmp sgt i32 %25, %26
br label %28
28: ; preds = %21, %18
%29 = phi i1 [ false, %18 ], [ %27, %21 ]
br i1 %29, label %30, label %45
30: ; preds = %28
%31 = load i32, i32* %3
%32 = icmp slt i32 %31, 2
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %12, i64 %35
%37 = load i32, i32* %36
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %12, i64 %40
store i32 %37, i32* %41
br label %42
42: ; preds = %33, %30
%43 = load i32, i32* %3
%44 = sub nsw i32 %43, 1
store i32 %44, i32* %3
br label %18
45: ; preds = %28
%46 = load i32, i32* %6
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %12, i64 %49
store i32 %46, i32* %50
br label %51
51: ; preds = %45
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %13
54: ; preds = %13
store i32 0, i32* %1
%55 = load i8*, i8** %7
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}