#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*/ EXIT_FAILURE;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ prtv(int *, int);
int *rendrv(int, int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("mergeatt: A simple integer table vector program.\n");
    printf("One arg: random number seed.\n");
    exit(EXIT_FAILURE);
  }
  srand(atoi(argv[1]));
  int i, j, k;
  int maxisz = 100;
  int vsz = 16;
  int *v = rendrv(maxisz, vsz);
  printf("Here's the random vector:\n");
  for (i = 0; i < vsz; ++i)
    printf("%i ", v[i]);
  printf("\n");
  int tmp, j0, j2, m;
  for (j = 0; j < vsz; j += 2) {
    j2 = j + 1;
    if (v[j] > v[j2]) {
      tmp = v[j2];
      v[j2] = v[j], v[j] = tmp;
    }
  }
  for (j = 0; j < vsz; j += 4) {
    for (k = 0; k < 2; k++) {
      j0 = j + k;
      j2 = j + k + 2;
      printf("%i,%i \n", j0, j2);
      if (v[j0] > v[j2]) {
        tmp = v[j2];
        v[j2] = v[j0], v[j0] = tmp;
      }
    }
  }
  prtv(v, vsz);
  for (j = 0; j < vsz; j += 8) {
    k = 0;
    m = 0;
    while ((k < 4) | (m < 4)) {
      j0 = j + m;
      j2 = j + k + 4;
      printf("%i,%i \n", j0, j2);
      if (v[j0] > v[j2]) {
        tmp = v[j2];
        v[j2] = v[j0], v[j0] = tmp;
      } else {
        m++;
        continue;
      }
      k++;
    }
  }
  prtv(v, vsz);
  free(v);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11ba <main+0x4a>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x64,-0x20(%rbp)
movl   $0x10,-0x24(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <rendrv@plt>
mov    %rax,-0x30(%rbp)
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1233 <main+0xc3>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1200 <main+0x90>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12be <main+0x14e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    12ab <main+0x13b>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    12b0 <main+0x140>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    1248 <main+0xd8>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    137f <main+0x20f>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    136c <main+0x1fc>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1359 <main+0x1e9>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    135e <main+0x1ee>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12d8 <main+0x168>
jmp    1371 <main+0x201>
mov    -0x18(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
jmp    12c5 <main+0x155>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <prtv@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    147b <main+0x30b>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x40(%rbp)
cmpl   $0x4,-0x1c(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x4,-0x40(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1468 <main+0x2f8>
mov    -0x18(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    144c <main+0x2dc>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    145a <main+0x2ea>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13ac <main+0x23c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13ac <main+0x23c>
jmp    146d <main+0x2fd>
mov    -0x18(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x18(%rbp)
jmp    1392 <main+0x222>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <prtv@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    15d9 <main+0x449>
mov    0x8(%rsi),%rdi
call   10a0 <atoi@plt>
mov    %eax,%edi
call   1080 <srand@plt>
mov    $0x64,%edi
mov    $0x10,%esi
call   1090 <rendrv@plt>
mov    %rax,%r15
lea    0xe3f(%rip),%rdi
call   1060 <puts@plt>
mov    (%r15),%esi
lea    0xe24(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x4(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0xc(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x14(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x18(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x1c(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x20(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x24(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x28(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2c(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x30(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x34(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x38(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x3c(%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    (%r15),%eax
mov    0x4(%r15),%ecx
cmp    %ecx,%eax
jle    12d4 <main+0x144>
mov    %eax,0x4(%r15)
mov    %ecx,(%r15)
mov    0x8(%r15),%eax
mov    0xc(%r15),%ecx
cmp    %ecx,%eax
jle    12e8 <main+0x158>
mov    %eax,0xc(%r15)
mov    %ecx,0x8(%r15)
mov    0x10(%r15),%eax
mov    0x14(%r15),%ecx
cmp    %ecx,%eax
jle    12fc <main+0x16c>
mov    %eax,0x14(%r15)
mov    %ecx,0x10(%r15)
mov    0x18(%r15),%eax
mov    0x1c(%r15),%ecx
cmp    %ecx,%eax
jle    1310 <main+0x180>
mov    %eax,0x1c(%r15)
mov    %ecx,0x18(%r15)
mov    0x20(%r15),%eax
mov    0x24(%r15),%ecx
cmp    %ecx,%eax
jle    1324 <main+0x194>
mov    %eax,0x24(%r15)
mov    %ecx,0x20(%r15)
mov    0x28(%r15),%eax
mov    0x2c(%r15),%ecx
cmp    %ecx,%eax
jle    1338 <main+0x1a8>
mov    %eax,0x2c(%r15)
mov    %ecx,0x28(%r15)
mov    0x30(%r15),%eax
mov    0x34(%r15),%ecx
cmp    %ecx,%eax
jle    134c <main+0x1bc>
mov    %eax,0x34(%r15)
mov    %ecx,0x30(%r15)
mov    0x38(%r15),%eax
mov    0x3c(%r15),%ecx
cmp    %ecx,%eax
jle    1360 <main+0x1d0>
mov    %eax,0x3c(%r15)
mov    %ecx,0x38(%r15)
lea    0xc9d(%rip),%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r15),%eax
mov    0x8(%r15),%ecx
cmp    %ecx,%eax
jle    1387 <main+0x1f7>
mov    %eax,0x8(%r15)
mov    %ecx,(%r15)
lea    0xc76(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x4(%r15),%eax
mov    0xc(%r15),%ecx
cmp    %ecx,%eax
jle    13b3 <main+0x223>
mov    %eax,0xc(%r15)
mov    %ecx,0x4(%r15)
lea    0xc4a(%rip),%rdi
mov    $0x4,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%r15),%eax
mov    0x18(%r15),%ecx
cmp    %ecx,%eax
jle    13df <main+0x24f>
mov    %eax,0x18(%r15)
mov    %ecx,0x10(%r15)
lea    0xc1e(%rip),%rdi
mov    $0x5,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x14(%r15),%eax
mov    0x1c(%r15),%ecx
cmp    %ecx,%eax
jle    140b <main+0x27b>
mov    %eax,0x1c(%r15)
mov    %ecx,0x14(%r15)
lea    0xbf2(%rip),%rdi
mov    $0x8,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x20(%r15),%eax
mov    0x28(%r15),%ecx
cmp    %ecx,%eax
jle    1437 <main+0x2a7>
mov    %eax,0x28(%r15)
mov    %ecx,0x20(%r15)
lea    0xbc6(%rip),%rdi
mov    $0x9,%esi
mov    $0xb,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x24(%r15),%eax
mov    0x2c(%r15),%ecx
cmp    %ecx,%eax
jle    1463 <main+0x2d3>
mov    %eax,0x2c(%r15)
mov    %ecx,0x24(%r15)
lea    0xb9a(%rip),%rdi
mov    $0xc,%esi
mov    $0xe,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x30(%r15),%eax
mov    0x38(%r15),%ecx
cmp    %ecx,%eax
jle    148f <main+0x2ff>
mov    %eax,0x38(%r15)
mov    %ecx,0x30(%r15)
lea    0xb6e(%rip),%rdi
mov    $0xd,%esi
mov    $0xf,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x34(%r15),%eax
mov    0x3c(%r15),%ecx
cmp    %ecx,%eax
jle    14bb <main+0x32b>
mov    %eax,0x3c(%r15)
mov    %ecx,0x34(%r15)
mov    %r15,%rdi
mov    $0x10,%esi
call   1050 <prtv@plt>
mov    $0x1,%bpl
lea    0xb32(%rip),%r14
xor    %r13d,%r13d
xor    %ebx,%ebx
lea    0x4(%r13),%eax
movslq %eax,%r12
movslq %ebx,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r15,%rbx,4),%eax
mov    (%r15,%r12,4),%ecx
cmp    %ecx,%eax
jg     1520 <main+0x390>
cmp    $0x3,%rbx
lea    0x1(%rbx),%rbx
setl   %al
or     %bpl,%al
test   $0x1,%al
jne    14f0 <main+0x360>
jmp    1541 <main+0x3b1>
nop
mov    %eax,(%r15,%r12,4)
mov    %ecx,(%r15,%rbx,4)
lea    0x1(%r13),%rax
cmp    $0x3,%r13
setb   %bpl
mov    %rax,%r13
jb     14d7 <main+0x347>
mov    %rax,%r13
cmp    $0x4,%ebx
jl     14d7 <main+0x347>
mov    $0x1,%r13b
lea    0xab9(%rip),%r14
xor    %r12d,%r12d
xor    %ebp,%ebp
lea    0xc(%r12),%eax
movslq %eax,%rbx
movslq %ebp,%rbp
nopl   0x0(%rax,%rax,1)
lea    0x8(%rbp),%esi
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x20(%r15,%rbp,4),%eax
mov    (%r15,%rbx,4),%ecx
cmp    %ecx,%eax
jg     1590 <main+0x400>
cmp    $0x3,%rbp
lea    0x1(%rbp),%rbp
setl   %al
or     %r13b,%al
test   $0x1,%al
jne    1560 <main+0x3d0>
jmp    15b3 <main+0x423>
mov    %eax,(%r15,%rbx,4)
mov    %ecx,0x20(%r15,%rbp,4)
lea    0x1(%r12),%rax
cmp    $0x3,%r12
setb   %r13b
mov    %rax,%r12
jb     1550 <main+0x3c0>
mov    %rax,%r12
cmp    $0x4,%ebp
jl     1550 <main+0x3c0>
mov    %r15,%rdi
mov    $0x10,%esi
call   1050 <prtv@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa46(%rip),%rdi
call   1060 <puts@plt>
lea    0xa6b(%rip),%rdi
call   1060 <puts@plt>
mov    0x29e8(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"mergeatt: A simple integer table vector program.\0A\00"
@.str.1 = [30 x i8] c"One arg: random number seed.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [27 x i8] c"Here's the random vector:\0A\00"
@.str.3 = [4 x i8] c"%i \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [8 x i8] c"%i,%i \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 i32
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 2
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* @EXIT_FAILURE
%22 = call i32 @exit(i32 %21)
unreachable
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
%28 = call i32 @srand(i32 %27)
store i32 100, i32* %9
store i32 16, i32* %10
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = call i32* @rendrv(i32 %29, i32 %30)
store i32* %31, i32** %11
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %33
33: ; preds = %44, %23
%34 = load i32, i32* %6
%35 = load i32, i32* %10
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %47
37: ; preds = %33
%38 = load i32*, i32** %11
%39 = load i32, i32* %6
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %38, i64 %40
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %37
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %33
47: ; preds = %33
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %49
49: ; preds = %88, %47
%50 = load i32, i32* %7
%51 = load i32, i32* %10
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %91
53: ; preds = %49
%54 = load i32, i32* %7
%55 = add nsw i32 %54, 1
store i32 %55, i32* %14
%56 = load i32*, i32** %11
%57 = load i32, i32* %7
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %56, i64 %58
%60 = load i32, i32* %59
%61 = load i32*, i32** %11
%62 = load i32, i32* %14
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %61, i64 %63
%65 = load i32, i32* %64
%66 = icmp sgt i32 %60, %65
br i1 %66, label %67, label %87
67: ; preds = %53
%68 = load i32*, i32** %11
%69 = load i32, i32* %14
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i32, i32* %68, i64 %70
%72 = load i32, i32* %71
store i32 %72, i32* %12
%73 = load i32*, i32** %11
%74 = load i32, i32* %7
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %73, i64 %75
%77 = load i32, i32* %76
%78 = load i32*, i32** %11
%79 = load i32, i32* %14
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i32, i32* %78, i64 %80
store i32 %77, i32* %81
%82 = load i32, i32* %12
%83 = load i32*, i32** %11
%84 = load i32, i32* %7
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %83, i64 %85
store i32 %82, i32* %86
br label %87
87: ; preds = %67, %53
br label %88
88: ; preds = %87
%89 = load i32, i32* %7
%90 = add nsw i32 %89, 2
store i32 %90, i32* %7
br label %49
91: ; preds = %49
store i32 0, i32* %7
br label %92
92: ; preds = %147, %91
%93 = load i32, i32* %7
%94 = load i32, i32* %10
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %150
96: ; preds = %92
store i32 0, i32* %8
br label %97
97: ; preds = %143, %96
%98 = load i32, i32* %8
%99 = icmp slt i32 %98, 2
br i1 %99, label %100, label %146
100: ; preds = %97
%101 = load i32, i32* %7
%102 = load i32, i32* %8
%103 = add nsw i32 %101, %102
store i32 %103, i32* %13
%104 = load i32, i32* %7
%105 = load i32, i32* %8
%106 = add nsw i32 %104, %105
%107 = add nsw i32 %106, 2
store i32 %107, i32* %14
%108 = load i32, i32* %13
%109 = load i32, i32* %14
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %108, i32 %109)
%111 = load i32*, i32** %11
%112 = load i32, i32* %13
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i32, i32* %111, i64 %113
%115 = load i32, i32* %114
%116 = load i32*, i32** %11
%117 = load i32, i32* %14
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %116, i64 %118
%120 = load i32, i32* %119
%121 = icmp sgt i32 %115, %120
br i1 %121, label %122, label %142
122: ; preds = %100
%123 = load i32*, i32** %11
%124 = load i32, i32* %14
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i32, i32* %123, i64 %125
%127 = load i32, i32* %126
store i32 %127, i32* %12
%128 = load i32*, i32** %11
%129 = load i32, i32* %13
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i32, i32* %128, i64 %130
%132 = load i32, i32* %131
%133 = load i32*, i32** %11
%134 = load i32, i32* %14
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %133, i64 %135
store i32 %132, i32* %136
%137 = load i32, i32* %12
%138 = load i32*, i32** %11
%139 = load i32, i32* %13
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i32, i32* %138, i64 %140
store i32 %137, i32* %141
br label %142
142: ; preds = %122, %100
br label %143
143: ; preds = %142
%144 = load i32, i32* %8
%145 = add nsw i32 %144, 1
store i32 %145, i32* %8
br label %97
146: ; preds = %97
br label %147
147: ; preds = %146
%148 = load i32, i32* %7
%149 = add nsw i32 %148, 4
store i32 %149, i32* %7
br label %92
150: ; preds = %92
%151 = load i32*, i32** %11
%152 = load i32, i32* %10
%153 = call i32 @prtv(i32* %151, i32 %152)
store i32 0, i32* %7
br label %154
154: ; preds = %217, %150
%155 = load i32, i32* %7
%156 = load i32, i32* %10
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %220
158: ; preds = %154
store i32 0, i32* %8
store i32 0, i32* %15
br label %159
159: ; preds = %213, %210, %158
%160 = load i32, i32* %8
%161 = icmp slt i32 %160, 4
%162 = zext i1 %161 to i32
%163 = load i32, i32* %15
%164 = icmp slt i32 %163, 4
%165 = zext i1 %164 to i32
%166 = or i32 %162, %165
%167 = icmp ne i32 %166, 0
br i1 %167, label %168, label %216
168: ; preds = %159
%169 = load i32, i32* %7
%170 = load i32, i32* %15
%171 = add nsw i32 %169, %170
store i32 %171, i32* %13
%172 = load i32, i32* %7
%173 = load i32, i32* %8
%174 = add nsw i32 %172, %173
%175 = add nsw i32 %174, 4
store i32 %175, i32* %14
%176 = load i32, i32* %13
%177 = load i32, i32* %14
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %176, i32 %177)
%179 = load i32*, i32** %11
%180 = load i32, i32* %13
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i32, i32* %179, i64 %181
%183 = load i32, i32* %182
%184 = load i32*, i32** %11
%185 = load i32, i32* %14
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i32, i32* %184, i64 %186
%188 = load i32, i32* %187
%189 = icmp sgt i32 %183, %188
br i1 %189, label %190, label %210
190: ; preds = %168
%191 = load i32*, i32** %11
%192 = load i32, i32* %14
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds i32, i32* %191, i64 %193
%195 = load i32, i32* %194
store i32 %195, i32* %12
%196 = load i32*, i32** %11
%197 = load i32, i32* %13
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds i32, i32* %196, i64 %198
%200 = load i32, i32* %199
%201 = load i32*, i32** %11
%202 = load i32, i32* %14
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds i32, i32* %201, i64 %203
store i32 %200, i32* %204
%205 = load i32, i32* %12
%206 = load i32*, i32** %11
%207 = load i32, i32* %13
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %206, i64 %208
store i32 %205, i32* %209
br label %213
210: ; preds = %168
%211 = load i32, i32* %15
%212 = add nsw i32 %211, 1
store i32 %212, i32* %15
br label %159
213: ; preds = %190
%214 = load i32, i32* %8
%215 = add nsw i32 %214, 1
store i32 %215, i32* %8
br label %159
216: ; preds = %159
br label %217
217: ; preds = %216
%218 = load i32, i32* %7
%219 = add nsw i32 %218, 8
store i32 %219, i32* %7
br label %154
220: ; preds = %154
%221 = load i32*, i32** %11
%222 = load i32, i32* %10
%223 = call i32 @prtv(i32* %221, i32 %222)
%224 = load i32*, i32** %11
%225 = call i32 @free(i32* %224)
ret i32 0
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str.3 = [4 x i8] c"%i \00"
@.str.5 = [8 x i8] c"%i,%i \0A\00"
@str = [26 x i8] c"Here's the random vector:\00"
@str.6 = [49 x i8] c"mergeatt: A simple integer table vector program.\00"
@str.7 = [29 x i8] c"One arg: random number seed.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.6, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.7, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = tail call i32 @srand(i32 %12)
%14 = tail call i32* @rendrv(i32 100, i32 16)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%16 = load i32, i32* %14
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds i32, i32* %14, i64 1
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds i32, i32* %14, i64 2
%22 = load i32, i32* %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds i32, i32* %14, i64 3
%25 = load i32, i32* %24
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds i32, i32* %14, i64 4
%28 = load i32, i32* %27
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds i32, i32* %14, i64 5
%31 = load i32, i32* %30
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds i32, i32* %14, i64 6
%34 = load i32, i32* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds i32, i32* %14, i64 7
%37 = load i32, i32* %36
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i32, i32* %14, i64 8
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds i32, i32* %14, i64 9
%43 = load i32, i32* %42
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds i32, i32* %14, i64 10
%46 = load i32, i32* %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds i32, i32* %14, i64 11
%49 = load i32, i32* %48
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds i32, i32* %14, i64 12
%52 = load i32, i32* %51
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds i32, i32* %14, i64 13
%55 = load i32, i32* %54
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %55)
%57 = getelementptr inbounds i32, i32* %14, i64 14
%58 = load i32, i32* %57
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %58)
%60 = getelementptr inbounds i32, i32* %14, i64 15
%61 = load i32, i32* %60
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %61)
%63 = tail call i32 @putchar(i32 10)
%64 = load i32, i32* %14
%65 = load i32, i32* %18
%66 = icmp sgt i32 %64, %65
br i1 %66, label %67, label %68
67: ; preds = %9
store i32 %64, i32* %18
store i32 %65, i32* %14
br label %68
68: ; preds = %9, %67
%69 = load i32, i32* %21
%70 = load i32, i32* %24
%71 = icmp sgt i32 %69, %70
br i1 %71, label %72, label %73
72: ; preds = %68
store i32 %69, i32* %24
store i32 %70, i32* %21
br label %73
73: ; preds = %72, %68
%74 = load i32, i32* %27
%75 = load i32, i32* %30
%76 = icmp sgt i32 %74, %75
br i1 %76, label %77, label %78
77: ; preds = %73
store i32 %74, i32* %30
store i32 %75, i32* %27
br label %78
78: ; preds = %77, %73
%79 = load i32, i32* %33
%80 = load i32, i32* %36
%81 = icmp sgt i32 %79, %80
br i1 %81, label %82, label %83
82: ; preds = %78
store i32 %79, i32* %36
store i32 %80, i32* %33
br label %83
83: ; preds = %82, %78
%84 = load i32, i32* %39
%85 = load i32, i32* %42
%86 = icmp sgt i32 %84, %85
br i1 %86, label %87, label %88
87: ; preds = %83
store i32 %84, i32* %42
store i32 %85, i32* %39
br label %88
88: ; preds = %87, %83
%89 = load i32, i32* %45
%90 = load i32, i32* %48
%91 = icmp sgt i32 %89, %90
br i1 %91, label %92, label %93
92: ; preds = %88
store i32 %89, i32* %48
store i32 %90, i32* %45
br label %93
93: ; preds = %92, %88
%94 = load i32, i32* %51
%95 = load i32, i32* %54
%96 = icmp sgt i32 %94, %95
br i1 %96, label %97, label %98
97: ; preds = %93
store i32 %94, i32* %54
store i32 %95, i32* %51
br label %98
98: ; preds = %97, %93
%99 = load i32, i32* %57
%100 = load i32, i32* %60
%101 = icmp sgt i32 %99, %100
br i1 %101, label %102, label %103
102: ; preds = %98
store i32 %99, i32* %60
store i32 %100, i32* %57
br label %103
103: ; preds = %102, %98
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 2)
%105 = load i32, i32* %14
%106 = load i32, i32* %21
%107 = icmp sgt i32 %105, %106
br i1 %107, label %108, label %109
108: ; preds = %103
store i32 %105, i32* %21
store i32 %106, i32* %14
br label %109
109: ; preds = %103, %108
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 3)
%111 = load i32, i32* %18
%112 = load i32, i32* %24
%113 = icmp sgt i32 %111, %112
br i1 %113, label %114, label %115
114: ; preds = %109
store i32 %111, i32* %24
store i32 %112, i32* %18
br label %115
115: ; preds = %114, %109
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 4, i32 6)
%117 = load i32, i32* %27
%118 = load i32, i32* %33
%119 = icmp sgt i32 %117, %118
br i1 %119, label %120, label %121
120: ; preds = %115
store i32 %117, i32* %33
store i32 %118, i32* %27
br label %121
121: ; preds = %120, %115
%122 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 5, i32 7)
%123 = load i32, i32* %30
%124 = load i32, i32* %36
%125 = icmp sgt i32 %123, %124
br i1 %125, label %126, label %127
126: ; preds = %121
store i32 %123, i32* %36
store i32 %124, i32* %30
br label %127
127: ; preds = %126, %121
%128 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 8, i32 10)
%129 = load i32, i32* %39
%130 = load i32, i32* %45
%131 = icmp sgt i32 %129, %130
br i1 %131, label %132, label %133
132: ; preds = %127
store i32 %129, i32* %45
store i32 %130, i32* %39
br label %133
133: ; preds = %132, %127
%134 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 9, i32 11)
%135 = load i32, i32* %42
%136 = load i32, i32* %48
%137 = icmp sgt i32 %135, %136
br i1 %137, label %138, label %139
138: ; preds = %133
store i32 %135, i32* %48
store i32 %136, i32* %42
br label %139
139: ; preds = %138, %133
%140 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 12, i32 14)
%141 = load i32, i32* %51
%142 = load i32, i32* %57
%143 = icmp sgt i32 %141, %142
br i1 %143, label %144, label %145
144: ; preds = %139
store i32 %141, i32* %57
store i32 %142, i32* %51
br label %145
145: ; preds = %144, %139
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 13, i32 15)
%147 = load i32, i32* %54
%148 = load i32, i32* %60
%149 = icmp sgt i32 %147, %148
br i1 %149, label %150, label %151
150: ; preds = %145
store i32 %147, i32* %60
store i32 %148, i32* %54
br label %151
151: ; preds = %150, %145
%152 = tail call i32 @prtv(i32* %14, i32 16)
br label %153
153: ; preds = %151, %171
%154 = phi i64 [ 0, %151 ], [ %174, %171 ]
%155 = phi i1 [ true, %151 ], [ %175, %171 ]
%156 = phi i64 [ 0, %151 ], [ %164, %171 ]
%157 = trunc i64 %154 to i32
%158 = add i32 %157, 4
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %14, i64 %159
%161 = shl i64 %156, 32
%162 = ashr exact i64 %161, 32
br label %163
163: ; preds = %153, %178
%164 = phi i64 [ %162, %153 ], [ %179, %178 ]
%165 = trunc i64 %164 to i32
%166 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %165, i32 %158)
%167 = getelementptr inbounds i32, i32* %14, i64 %164
%168 = load i32, i32* %167
%169 = load i32, i32* %160
%170 = icmp sgt i32 %168, %169
br i1 %170, label %171, label %178
171: ; preds = %163
%172 = trunc i64 %164 to i32
%173 = getelementptr inbounds i32, i32* %14, i64 %164
store i32 %168, i32* %160
store i32 %169, i32* %173
%174 = add nuw i64 %154, 1
%175 = icmp ult i64 %154, 3
%176 = icmp slt i32 %172, 4
%177 = or i1 %175, %176
br i1 %177, label %153, label %182
178: ; preds = %163
%179 = add i64 %164, 1
%180 = icmp slt i64 %164, 3
%181 = or i1 %155, %180
br i1 %181, label %163, label %182
182: ; preds = %171, %178
br label %183
183: ; preds = %182, %206
%184 = phi i64 [ %209, %206 ], [ 0, %182 ]
%185 = phi i1 [ %210, %206 ], [ true, %182 ]
%186 = phi i64 [ %194, %206 ], [ 0, %182 ]
%187 = trunc i64 %184 to i32
%188 = add i32 %187, 12
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i32, i32* %14, i64 %189
%191 = shl i64 %186, 32
%192 = ashr exact i64 %191, 32
br label %193
193: ; preds = %202, %183
%194 = phi i64 [ %192, %183 ], [ %203, %202 ]
%195 = add nsw i64 %194, 8
%196 = trunc i64 %195 to i32
%197 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %196, i32 %188)
%198 = getelementptr inbounds i32, i32* %14, i64 %195
%199 = load i32, i32* %198
%200 = load i32, i32* %190
%201 = icmp sgt i32 %199, %200
br i1 %201, label %206, label %202
202: ; preds = %193
%203 = add i64 %194, 1
%204 = icmp slt i64 %194, 3
%205 = or i1 %185, %204
br i1 %205, label %193, label %213
206: ; preds = %193
%207 = getelementptr inbounds i32, i32* %14, i64 %195
%208 = trunc i64 %194 to i32
store i32 %199, i32* %190
store i32 %200, i32* %207
%209 = add nuw i64 %184, 1
%210 = icmp ult i64 %184, 3
%211 = icmp slt i32 %208, 4
%212 = or i1 %210, %211
br i1 %212, label %183, label %213
213: ; preds = %206, %202
%214 = tail call i32 @prtv(i32* %14, i32 16)
%215 = tail call i32 @free(i32* %14)
ret i32 0
}