#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 drand48();
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ srand48(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int i, beg, len;
  srand48(getpid());
  printf("0: CFF0000 T2  # Red\n");
  printf("1: C00AF00     # Green\n");
  printf("2: CA0A0FF T3  # Blue Mark\n");
  printf("3: CFFAA00 T1  # Linker\n");
  for (i = 0; i < 50; i++) {
    len = drand48() * (650 - 350) + 350;
    beg = drand48() * (10000 - len);
    if (drand48() > .75)
      printf("%d: %d A0 %d  # Comment %d\n", i, beg, beg + len, i);
    else if (drand48() > .66)
      printf("%d: %d A1 %d  # Comment %d\n", i, beg, beg + len, i);
    else if (drand48() > .50)
      printf("%d: %d A2 M%d A0 %d  # Comment %d\n", i, beg, beg + len / 3,
             beg + len, i);
    else
      printf("%d: %d A2 M%d A2 M%d A1 %d  # Comment %d\n", i, beg,
             beg + len / 3, beg + (2 * len) / 3, beg + len, i);
  }
  printf("ATT: 3\n");
  for (i = 50 * .5 / 3.5; i >= 0; i--) {
    int size, chosen[6];
    int k, j, min;
    size = drand48() * 4 + 2;
    printf("LNK: ");
    for (j = 0; j < size; j++)
      chosen[j] = drand48() * (50 - size);
    for (k = 0; k < size - 1; k++) {
      min = k;
      for (j = k + 1; j < size; j++)
        if (chosen[j] < chosen[min])
          min = j;
      if (min != k) {
        j = chosen[k];
        chosen[k] = chosen[min];
        chosen[min] = j;
      }
    }
    for (k = 0; k < size; k++)
      printf(" %d", chosen[k] + k);
    printf("   # Link set %d\n", k);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1050 <srand48@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jge    1319 <main+0x1d9>
mov    $0x0,%al
call   1060 <drand48@plt>
imul   $0x12c,%eax,%eax
add    $0x15e,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1060 <drand48@plt>
mov    $0x2710,%ecx
sub    -0x1c(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <drand48@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1217 <main+0xd7>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x18(%rbp),%ecx
add    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1306 <main+0x1c6>
mov    $0x0,%al
call   1060 <drand48@plt>
cvtsi2sd %eax,%xmm0
movsd  0xdde(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1257 <main+0x117>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x18(%rbp),%ecx
add    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1301 <main+0x1c1>
mov    $0x0,%al
call   1060 <drand48@plt>
cvtsi2sd %eax,%xmm0
movsd  0xda6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12af <main+0x16f>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x3,%edi
cltd
idiv   %edi
mov    -0x50(%rbp),%edx
add    %eax,%ecx
mov    -0x18(%rbp),%r8d
add    -0x1c(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12fc <main+0x1bc>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x3,%edi
cltd
idiv   %edi
add    %eax,%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    $0x3,%edi
cltd
idiv   %edi
mov    -0x54(%rbp),%edx
add    %eax,%r8d
mov    -0x18(%rbp),%r9d
add    -0x1c(%rbp),%r9d
mov    -0x14(%rbp),%eax
lea    0xde4(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1301 <main+0x1c1>
jmp    1306 <main+0x1c6>
jmp    130b <main+0x1cb>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a3 <main+0x63>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x7,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1493 <main+0x353>
mov    $0x0,%al
call   1060 <drand48@plt>
shl    $0x2,%eax
add    $0x2,%eax
mov    %eax,-0x20(%rbp)
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1393 <main+0x253>
mov    $0x0,%al
call   1060 <drand48@plt>
mov    %eax,%ecx
mov    $0x32,%eax
sub    -0x20(%rbp),%eax
imul   %eax,%ecx
movslq -0x48(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    135d <main+0x21d>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    143a <main+0x2fa>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13f5 <main+0x2b5>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
movslq -0x4c(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    13e2 <main+0x2a2>
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    13e7 <main+0x2a7>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    13ba <main+0x27a>
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
je     1427 <main+0x2e7>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x48(%rbp)
movslq -0x4c(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x48(%rbp),%ecx
movslq -0x4c(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    142c <main+0x2ec>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    139a <main+0x25a>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1474 <main+0x334>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
add    -0x44(%rbp),%esi
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1441 <main+0x301>
mov    -0x44(%rbp),%esi
lea    0xc94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    132e <main+0x1ee>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %eax,%edi
call   1060 <srand48@plt>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf37(%rip),%rdi
call   1030 <puts@plt>
lea    0xf42(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5d(%rip),%r13
lea    0xe72(%rip),%r14
xor    %ebp,%ebp
jmp    11d3 <main+0x83>
xchg   %ax,%ax
add    %r12d,%ebx
mov    %r13,%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x32,%ebp
je     1294 <main+0x144>
xor    %eax,%eax
call   1070 <drand48@plt>
imul   $0x12c,%eax,%r15d
lea    0x15e(%r15),%ebx
xor    %eax,%eax
call   1070 <drand48@plt>
mov    $0x25b2,%r12d
sub    %r15d,%r12d
imul   %eax,%r12d
xor    %eax,%eax
call   1070 <drand48@plt>
test   %eax,%eax
jg     11b0 <main+0x60>
xor    %eax,%eax
call   1070 <drand48@plt>
test   %eax,%eax
jle    121a <main+0xca>
add    %r12d,%ebx
mov    %r14,%rdi
jmp    11b6 <main+0x66>
xor    %eax,%eax
call   1070 <drand48@plt>
movslq %ebx,%rcx
imul   $0x55555556,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %r12d,%ecx
test   %eax,%eax
jle    1256 <main+0x106>
add    %r12d,%ebx
lea    0xdef(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%r8d
mov    %ebp,%r9d
jmp    1288 <main+0x138>
lea    (%rbx,%rbx,1),%eax
cltq
imul   $0x55555556,%rax,%r8
mov    %r8,%rax
shr    $0x3f,%rax
shr    $0x20,%r8
add    %eax,%r8d
add    %r12d,%r8d
add    %r12d,%ebx
mov    %ebp,(%rsp)
lea    0xddb(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%r9d
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11c7 <main+0x77>
lea    0xe65(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%ebx
lea    0xddf(%rip),%r12
jmp    12cf <main+0x17f>
xchg   %ax,%ax
xor    %ebp,%ebp
mov    0xc(%rsp),%ebx
lea    0xdd2(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
sub    $0x1,%ebx
jb     13ee <main+0x29e>
mov    %ebx,0xc(%rsp)
xor    %eax,%eax
call   1070 <drand48@plt>
lea    0x2(,%rax,4),%ebp
mov    %eax,%r14d
shl    $0x2,%r14d
lea    0xd96(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%r13d
test   %ebp,%ebp
jle    1328 <main+0x1d8>
mov    $0x32,%r15d
sub    %ebp,%r15d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <drand48@plt>
imul   %r15d,%eax
mov    %eax,0x10(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1310 <main+0x1c0>
mov    %ebp,%r11d
or     $0x1,%r14d
jle    13c0 <main+0x270>
mov    %r14d,%r8d
mov    $0x1,%ebx
mov    $0x1,%edx
sub    %r8,%rdx
xor    %r9d,%r9d
jmp    1359 <main+0x209>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %r8,%r9
je     13c0 <main+0x270>
mov    %r9,%r10
add    $0x1,%r9
mov    %rbx,%rcx
mov    %r10d,%eax
jmp    1384 <main+0x234>
nopl   0x0(%rax,%rax,1)
lea    (%rdx,%rcx,1),%rsi
add    $0x1,%rsi
add    $0x1,%rcx
mov    %ebp,%eax
cmp    $0x2,%rsi
je     13a0 <main+0x250>
mov    0x10(%rsp,%rcx,4),%esi
movslq %eax,%rdi
mov    %ecx,%ebp
cmp    0x10(%rsp,%rdi,4),%esi
jl     1370 <main+0x220>
mov    %eax,%ebp
jmp    1370 <main+0x220>
nopw   0x0(%rax,%rax,1)
mov    %ebp,%eax
cmp    %rax,%r10
je     1350 <main+0x200>
mov    0x10(%rsp,%r10,4),%eax
movslq %ebp,%rcx
mov    0x10(%rsp,%rcx,4),%esi
mov    %esi,0x10(%rsp,%r10,4)
mov    %eax,0x10(%rsp,%rcx,4)
jmp    1350 <main+0x200>
xchg   %ax,%ax
test   %r11d,%r11d
jle    12b0 <main+0x160>
mov    %r11d,%ebp
xor    %ebx,%ebx
xchg   %ax,%ax
mov    0x10(%rsp,%rbx,4),%esi
add    %ebx,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    13d0 <main+0x280>
jmp    12b2 <main+0x162>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"0: CFF0000 T2 # Red\0A\00"
@.str.1 = [24 x i8] c"1: C00AF00 # Green\0A\00"
@.str.2 = [28 x i8] c"2: CA0A0FF T3 # Blue Mark\0A\00"
@.str.3 = [25 x i8] c"3: CFFAA00 T1 # Linker\0A\00"
@.str.4 = [28 x i8] c"%d: %d A0 %d # Comment %d\0A\00"
@.str.5 = [28 x i8] c"%d: %d A1 %d # Comment %d\0A\00"
@.str.6 = [35 x i8] c"%d: %d A2 M%d A0 %d # Comment %d\0A\00"
@.str.7 = [42 x i8] c"%d: %d A2 M%d A2 M%d A1 %d # Comment %d\0A\00"
@.str.8 = [8 x i8] c"ATT: 3\0A\00"
@.str.9 = [6 x i8] c"LNK: \00"
@.str.10 = [4 x i8] c" %d\00"
@.str.11 = [18 x i8] c" # Link set %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [6 x i32]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = call i32 (...) @getpid()
%15 = call i32 @srand48(i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %20
20: ; preds = %90, %2
%21 = load i32, i32* %6
%22 = icmp slt i32 %21, 50
br i1 %22, label %23, label %93
23: ; preds = %20
%24 = call i32 (...) @drand48()
%25 = mul nsw i32 %24, 300
%26 = add nsw i32 %25, 350
store i32 %26, i32* %8
%27 = call i32 (...) @drand48()
%28 = load i32, i32* %8
%29 = sub nsw i32 10000, %28
%30 = mul nsw i32 %27, %29
store i32 %30, i32* %7
%31 = call i32 (...) @drand48()
%32 = sitofp i32 %31 to double
%33 = fcmp ogt double %32, 7.500000e-01
br i1 %33, label %34, label %42
34: ; preds = %23
%35 = load i32, i32* %6
%36 = load i32, i32* %7
%37 = load i32, i32* %7
%38 = load i32, i32* %8
%39 = add nsw i32 %37, %38
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %35, i32 %36, i32 %39, i32 %40)
br label %89
42: ; preds = %23
%43 = call i32 (...) @drand48()
%44 = sitofp i32 %43 to double
%45 = fcmp ogt double %44, 6.600000e-01
br i1 %45, label %46, label %54
46: ; preds = %42
%47 = load i32, i32* %6
%48 = load i32, i32* %7
%49 = load i32, i32* %7
%50 = load i32, i32* %8
%51 = add nsw i32 %49, %50
%52 = load i32, i32* %6
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %47, i32 %48, i32 %51, i32 %52)
br label %88
54: ; preds = %42
%55 = call i32 (...) @drand48()
%56 = sitofp i32 %55 to double
%57 = fcmp ogt double %56, 5.000000e-01
br i1 %57, label %58, label %70
58: ; preds = %54
%59 = load i32, i32* %6
%60 = load i32, i32* %7
%61 = load i32, i32* %7
%62 = load i32, i32* %8
%63 = sdiv i32 %62, 3
%64 = add nsw i32 %61, %63
%65 = load i32, i32* %7
%66 = load i32, i32* %8
%67 = add nsw i32 %65, %66
%68 = load i32, i32* %6
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %59, i32 %60, i32 %64, i32 %67, i32 %68)
br label %87
70: ; preds = %54
%71 = load i32, i32* %6
%72 = load i32, i32* %7
%73 = load i32, i32* %7
%74 = load i32, i32* %8
%75 = sdiv i32 %74, 3
%76 = add nsw i32 %73, %75
%77 = load i32, i32* %7
%78 = load i32, i32* %8
%79 = mul nsw i32 2, %78
%80 = sdiv i32 %79, 3
%81 = add nsw i32 %77, %80
%82 = load i32, i32* %7
%83 = load i32, i32* %8
%84 = add nsw i32 %82, %83
%85 = load i32, i32* %6
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %71, i32 %72, i32 %76, i32 %81, i32 %84, i32 %85)
br label %87
87: ; preds = %70, %58
br label %88
88: ; preds = %87, %46
br label %89
89: ; preds = %88, %34
br label %90
90: ; preds = %89
%91 = load i32, i32* %6
%92 = add nsw i32 %91, 1
store i32 %92, i32* %6
br label %20
93: ; preds = %20
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
store i32 7, i32* %6
br label %95
95: ; preds = %191, %93
%96 = load i32, i32* %6
%97 = icmp sge i32 %96, 0
br i1 %97, label %98, label %194
98: ; preds = %95
%99 = call i32 (...) @drand48()
%100 = mul nsw i32 %99, 4
%101 = add nsw i32 %100, 2
store i32 %101, i32* %9
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %12
br label %103
103: ; preds = %115, %98
%104 = load i32, i32* %12
%105 = load i32, i32* %9
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %118
107: ; preds = %103
%108 = call i32 (...) @drand48()
%109 = load i32, i32* %9
%110 = sub nsw i32 50, %109
%111 = mul nsw i32 %108, %110
%112 = load i32, i32* %12
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %113
store i32 %111, i32* %114
br label %115
115: ; preds = %107
%116 = load i32, i32* %12
%117 = add nsw i32 %116, 1
store i32 %117, i32* %12
br label %103
118: ; preds = %103
store i32 0, i32* %11
br label %119
119: ; preds = %169, %118
%120 = load i32, i32* %11
%121 = load i32, i32* %9
%122 = sub nsw i32 %121, 1
%123 = icmp slt i32 %120, %122
br i1 %123, label %124, label %172
124: ; preds = %119
%125 = load i32, i32* %11
store i32 %125, i32* %13
%126 = load i32, i32* %11
%127 = add nsw i32 %126, 1
store i32 %127, i32* %12
br label %128
128: ; preds = %145, %124
%129 = load i32, i32* %12
%130 = load i32, i32* %9
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %148
132: ; preds = %128
%133 = load i32, i32* %12
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = load i32, i32* %13
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %138
%140 = load i32, i32* %139
%141 = icmp slt i32 %136, %140
br i1 %141, label %142, label %144
142: ; preds = %132
%143 = load i32, i32* %12
store i32 %143, i32* %13
br label %144
144: ; preds = %142, %132
br label %145
145: ; preds = %144
%146 = load i32, i32* %12
%147 = add nsw i32 %146, 1
store i32 %147, i32* %12
br label %128
148: ; preds = %128
%149 = load i32, i32* %13
%150 = load i32, i32* %11
%151 = icmp ne i32 %149, %150
br i1 %151, label %152, label %168
152: ; preds = %148
%153 = load i32, i32* %11
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %154
%156 = load i32, i32* %155
store i32 %156, i32* %12
%157 = load i32, i32* %13
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %158
%160 = load i32, i32* %159
%161 = load i32, i32* %11
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %162
store i32 %160, i32* %163
%164 = load i32, i32* %12
%165 = load i32, i32* %13
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %166
store i32 %164, i32* %167
br label %168
168: ; preds = %152, %148
br label %169
169: ; preds = %168
%170 = load i32, i32* %11
%171 = add nsw i32 %170, 1
store i32 %171, i32* %11
br label %119
172: ; preds = %119
store i32 0, i32* %11
br label %173
173: ; preds = %185, %172
%174 = load i32, i32* %11
%175 = load i32, i32* %9
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %188
177: ; preds = %173
%178 = load i32, i32* %11
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %179
%181 = load i32, i32* %180
%182 = load i32, i32* %11
%183 = add nsw i32 %181, %182
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %183)
br label %185
185: ; preds = %177
%186 = load i32, i32* %11
%187 = add nsw i32 %186, 1
store i32 %187, i32* %11
br label %173
188: ; preds = %173
%189 = load i32, i32* %11
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %189)
br label %191
191: ; preds = %188
%192 = load i32, i32* %6
%193 = add nsw i32 %192, -1
store i32 %193, i32* %6
br label %95
194: ; preds = %95
%195 = load i32, i32* %3
ret i32 %195
}

LLVM IR (-O2):
@.str.4 = [28 x i8] c"%d: %d A0 %d # Comment %d\0A\00"
@.str.5 = [28 x i8] c"%d: %d A1 %d # Comment %d\0A\00"
@.str.6 = [35 x i8] c"%d: %d A2 M%d A0 %d # Comment %d\0A\00"
@.str.7 = [42 x i8] c"%d: %d A2 M%d A2 M%d A1 %d # Comment %d\0A\00"
@.str.9 = [6 x i8] c"LNK: \00"
@.str.10 = [4 x i8] c" %d\00"
@.str.11 = [18 x i8] c" # Link set %d\0A\00"
@str = [21 x i8] c"0: CFF0000 T2 # Red\00"
@str.12 = [23 x i8] c"1: C00AF00 # Green\00"
@str.13 = [27 x i8] c"2: CA0A0FF T3 # Blue Mark\00"
@str.14 = [24 x i8] c"3: CFFAA00 T1 # Linker\00"
@str.15 = [7 x i8] c"ATT: 3\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i32]
%4 = tail call i32 (...) @getpid()
%5 = tail call i32 @srand48(i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.12, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.13, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.14, i64 0, i64 0))
br label %10
10: ; preds = %2, %43
%11 = phi i32 [ 0, %2 ], [ %44, %43 ]
%12 = tail call i32 (...) @drand48()
%13 = mul nsw i32 %12, 300
%14 = add nsw i32 %13, 350
%15 = tail call i32 (...) @drand48()
%16 = sub i32 9650, %13
%17 = mul nsw i32 %16, %15
%18 = tail call i32 (...) @drand48()
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %10
%21 = add nsw i32 %17, %14
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %17, i32 %21, i32 %11)
br label %43
23: ; preds = %10
%24 = tail call i32 (...) @drand48()
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = add nsw i32 %17, %14
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %11, i32 %17, i32 %27, i32 %11)
br label %43
29: ; preds = %23
%30 = tail call i32 (...) @drand48()
%31 = icmp sgt i32 %30, 0
%32 = sdiv i32 %14, 3
%33 = add nsw i32 %17, %32
br i1 %31, label %34, label %37
34: ; preds = %29
%35 = add nsw i32 %17, %14
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %11, i32 %17, i32 %33, i32 %35, i32 %11)
br label %43
37: ; preds = %29
%38 = shl nsw i32 %14, 1
%39 = sdiv i32 %38, 3
%40 = add nsw i32 %39, %17
%41 = add nsw i32 %17, %14
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %11, i32 %17, i32 %33, i32 %40, i32 %41, i32 %11)
br label %43
43: ; preds = %20, %34, %37, %26
%44 = add nuw nsw i32 %11, 1
%45 = icmp eq i32 %44, 50
br i1 %45, label %46, label %10
46: ; preds = %43
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.15, i64 0, i64 0))
%48 = bitcast [6 x i32]* %3 to i8*
br label %49
49: ; preds = %46, %114
%50 = phi i32 [ 7, %46 ], [ %117, %114 ]
%51 = tail call i32 (...) @drand48()
%52 = shl nsw i32 %51, 2
%53 = or i32 %52, 2
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%55 = icmp sgt i32 %53, 0
br i1 %55, label %56, label %59
56: ; preds = %49
%57 = sub nsw i32 50, %53
%58 = zext i32 %53 to i64
br label %65
59: ; preds = %65, %49
%60 = or i32 %52, 1
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %72
62: ; preds = %59
%63 = zext i32 %60 to i64
%64 = zext i32 %53 to i64
br label %75
65: ; preds = %56, %65
%66 = phi i64 [ 0, %56 ], [ %70, %65 ]
%67 = tail call i32 (...) @drand48()
%68 = mul nsw i32 %67, %57
%69 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %66
store i32 %68, i32* %69
%70 = add nuw nsw i64 %66, 1
%71 = icmp eq i64 %70, %58
br i1 %71, label %59, label %65
72: ; preds = %102, %59
br i1 %55, label %73, label %114
73: ; preds = %72
%74 = zext i32 %53 to i64
br label %105
75: ; preds = %102, %62
%76 = phi i64 [ 0, %62 ], [ %78, %102 ]
%77 = phi i64 [ 1, %62 ], [ %103, %102 ]
%78 = add nuw nsw i64 %76, 1
%79 = trunc i64 %76 to i32
br label %80
80: ; preds = %75, %80
%81 = phi i64 [ %77, %75 ], [ %91, %80 ]
%82 = phi i32 [ %79, %75 ], [ %90, %80 ]
%83 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %81
%84 = load i32, i32* %83
%85 = sext i32 %82 to i64
%86 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = icmp slt i32 %84, %87
%89 = trunc i64 %81 to i32
%90 = select i1 %88, i32 %89, i32 %82
%91 = add nuw nsw i64 %81, 1
%92 = icmp eq i64 %91, %64
br i1 %92, label %93, label %80
93: ; preds = %80
%94 = zext i32 %90 to i64
%95 = icmp eq i64 %76, %94
br i1 %95, label %102, label %96
96: ; preds = %93
%97 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %76
%98 = load i32, i32* %97
%99 = sext i32 %90 to i64
%100 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %99
%101 = load i32, i32* %100
store i32 %101, i32* %97
store i32 %98, i32* %100
br label %102
102: ; preds = %93, %96
%103 = add nuw nsw i64 %77, 1
%104 = icmp eq i64 %78, %63
br i1 %104, label %72, label %75
105: ; preds = %73, %105
%106 = phi i64 [ 0, %73 ], [ %112, %105 ]
%107 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %106
%108 = load i32, i32* %107
%109 = trunc i64 %106 to i32
%110 = add nsw i32 %108, %109
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %110)
%112 = add nuw nsw i64 %106, 1
%113 = icmp eq i64 %112, %74
br i1 %113, label %114, label %105
114: ; preds = %105, %72
%115 = phi i32 [ 0, %72 ], [ %53, %105 ]
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %115)
%117 = add nsw i32 %50, -1
%118 = icmp eq i32 %50, 0
br i1 %118, label %119, label %49
119: ; preds = %114
ret i32 0
}