#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 */
typedef int time_t;
struct timeval {
  int dummy;
};
struct rusage {
  struct timeval ru_stime;
  struct timeval ru_utime;
};
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ *member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int atoi(char *);
int /*<<< orphan*/ call_sort(int, int *, int, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(int *);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ no_argument;
char *optarg;
int /*<<< orphan*/ printf(char *, ...);
int random();
int /*<<< orphan*/ required_argument;
int /*<<< orphan*/ srandom(int);
int /*<<< orphan*/ stderr;
int time(int /*<<< orphan*/ *);
int to_usec(struct timeval);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  int opt, parallelism = 1;
  int size = 0, i, ressources = 0;
  int *vector;
  int verbose = 0;
  struct timeval s_time, e_time;
  char *arg = NULL;
  struct rusage rusage;
  time_t system, user;
  int seed = 0, seed_set = 0;
  struct option longopts[] = {{"help", required_argument, NULL, 'h'},
                              {"parallelism", required_argument, NULL, 'p'},
                              {"nsize", required_argument, NULL, 'n'},
                              {"verbose", no_argument, NULL, 'v'},
                              {"rusage", no_argument, NULL, 'r'},
                              {"seed", required_argument, NULL, 's'},
                              {"arg", required_argument, NULL, 'a'},
                              {NULL, 0, NULL, 0}};
  while ((opt = getopt_long(argc, argv, "hp:s:n:vra:", longopts, NULL)) != -1) {
    switch (opt) {
    case 'p':
      parallelism = atoi(optarg);
      break;
    case 'v':
      verbose = 1;
      break;
    case 'a':
      arg = optarg;
      break;
    case 'r':
      ressources = 1;
      break;
    case 'n':
      size = atoi(optarg);
      break;
    case 's':
      seed = atoi(optarg);
      seed_set = 1;
      break;
    case 'h':
    default:
      usage(argv[0]);
    }
  }
  if (size <= 0) {
    fprintf(stderr, "invalid size of vector %d\n", size);
    usage(argv[0]);
    exit(1);
  }
  vector = (int *)malloc(size * sizeof(int));
  if (vector == NULL) {
    fprintf(stderr, "malloc error\n");
    exit(3);
  }
  if (seed_set != 1) {
    seed = time(NULL);
  }
  srandom(seed);
  for (i = 0; i < size; i++) {
    vector[i] = random() % size;
  }
  getrusage(RUSAGE_SELF, &rusage);
  user = to_usec(rusage.ru_utime);
  system = to_usec(rusage.ru_stime);
  gettimeofday(&s_time, NULL);
  call_sort(parallelism, vector, size, arg);
  gettimeofday(&e_time, NULL);
  getrusage(RUSAGE_SELF, &rusage);
  user = to_usec(rusage.ru_utime) - user;
  system = to_usec(rusage.ru_stime) - system;
  printf("p: %d\n", parallelism);
  printf("n: %d\n", size);
  printf("total time: %lld\n", to_usec(e_time) - to_usec(s_time));
  if (1 == verbose) {
    printf("Sorted vector :\n");
    for (i = 0; i < size; i++)
      printf("%d ", vector[i]);
    printf("\n");
  }
  if (ressources) {
    printf("user       : %ld\n", user);
    printf("system     : %ld\n", system);
    printf("tot (u+s)  : %ld\n", user + system);
  }
  free(vector);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x34(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
lea    -0x160(%rbp),%rdi
lea    0xdff(%rip),%rax
mov    %rax,-0x160(%rbp)
mov    0x2d79(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x158(%rbp)
movq   $0x0,-0x150(%rbp)
movl   $0x68,-0x148(%rbp)
add    $0x20,%rdi
lea    0xdce(%rip),%rax
mov    %rax,-0x140(%rbp)
mov    0x2d43(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x138(%rbp)
movq   $0x0,-0x130(%rbp)
movl   $0x70,-0x128(%rbp)
add    $0x20,%rdi
lea    0xda4(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0x2d0d(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x118(%rbp)
movq   $0x0,-0x110(%rbp)
movl   $0x6e,-0x108(%rbp)
add    $0x20,%rdi
lea    0xd74(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0x2cb7(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xf8(%rbp)
movq   $0x0,-0xf0(%rbp)
movl   $0x76,-0xe8(%rbp)
add    $0x20,%rdi
lea    0xd46(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0x2c81(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xd8(%rbp)
movq   $0x0,-0xd0(%rbp)
movl   $0x72,-0xc8(%rbp)
add    $0x20,%rdi
lea    0xd17(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2c6b(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xb8(%rbp)
movq   $0x0,-0xb0(%rbp)
movl   $0x73,-0xa8(%rbp)
add    $0x20,%rdi
lea    0xce6(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2c35(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x98(%rbp)
movq   $0x0,-0x90(%rbp)
movl   $0x61,-0x88(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1080 <memset@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x160(%rbp),%rcx
lea    0xc9a(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1050 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     14bf <main+0x2bf>
mov    -0x14(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x168(%rbp)
sub    $0x15,%eax
ja     14ae <main+0x2ae>
mov    -0x168(%rbp),%rax
lea    0xbd7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2bbf(%rip),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    14ba <main+0x2ba>
movl   $0x1,-0x34(%rbp)
jmp    14ba <main+0x2ba>
mov    0x2b9c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    14ba <main+0x2ba>
movl   $0x1,-0x24(%rbp)
jmp    14ba <main+0x2ba>
mov    0x2b7d(%rip),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %eax,-0x1c(%rbp)
jmp    14ba <main+0x2ba>
mov    0x2b66(%rip),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %eax,-0x5c(%rbp)
movl   $0x1,-0x60(%rbp)
jmp    14ba <main+0x2ba>
jmp    14ae <main+0x2ae>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10d0 <usage@plt>
jmp    13d8 <main+0x1d8>
cmpl   $0x0,-0x1c(%rbp)
jg     14f9 <main+0x2f9>
mov    0x2b00(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
lea    0xbb7(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10d0 <usage@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1538 <main+0x338>
mov    0x2ab2(%rip),%rax
mov    (%rax),%edi
lea    0xb87(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x3,%edi
call   1110 <exit@plt>
cmpl   $0x1,-0x60(%rbp)
je     154e <main+0x34e>
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
call   1040 <srandom@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    158d <main+0x38d>
mov    $0x0,%al
call   10b0 <random@plt>
cltd
idivl  -0x1c(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    155d <main+0x35d>
mov    0x2a34(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
call   10f0 <getrusage@plt>
mov    -0x4c(%rbp),%edi
call   1120 <to_usec@plt>
mov    %eax,-0x58(%rbp)
mov    -0x50(%rbp),%edi
call   1120 <to_usec@plt>
mov    %eax,-0x54(%rbp)
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x18(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x48(%rbp),%rcx
call   10e0 <call_sort@plt>
lea    -0x40(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    0x29df(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
call   10f0 <getrusage@plt>
mov    -0x4c(%rbp),%edi
call   1120 <to_usec@plt>
sub    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x50(%rbp),%edi
call   1120 <to_usec@plt>
sub    -0x54(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x18(%rbp),%esi
lea    0xaa2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xa98(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x40(%rbp),%edi
call   1120 <to_usec@plt>
mov    %eax,-0x16c(%rbp)
mov    -0x38(%rbp),%edi
call   1120 <to_usec@plt>
mov    -0x16c(%rbp),%esi
sub    %eax,%esi
lea    0xa73(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%eax
cmp    -0x34(%rbp),%eax
jne    16c2 <main+0x4c2>
lea    0xa69(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    16b4 <main+0x4b4>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xa4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1681 <main+0x481>
lea    0xa30(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
je     1702 <main+0x502>
mov    -0x58(%rbp),%esi
lea    0xa1b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x54(%rbp),%esi
lea    0xa1c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x58(%rbp),%esi
add    -0x54(%rbp),%esi
lea    0xa1a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
lea    0xe2b(%rip),%rax
mov    %rax,0x40(%rsp)
mov    0x2da7(%rip),%rax
mov    (%rax),%al
mov    %al,0x48(%rsp)
movq   $0x0,0x50(%rsp)
movl   $0x68,0x58(%rsp)
lea    0xe06(%rip),%rcx
mov    %rcx,0x60(%rsp)
mov    %al,0x68(%rsp)
movq   $0x0,0x70(%rsp)
movl   $0x70,0x78(%rsp)
lea    0xdf1(%rip),%rcx
mov    %rcx,0x80(%rsp)
mov    %al,0x88(%rsp)
movq   $0x0,0x90(%rsp)
movl   $0x6e,0x98(%rsp)
lea    0xdca(%rip),%rcx
mov    %rcx,0xa0(%rsp)
mov    0x2d0c(%rip),%rcx
mov    (%rcx),%cl
mov    %cl,0xa8(%rsp)
movq   $0x0,0xb0(%rsp)
movl   $0x76,0xb8(%rsp)
lea    0xd9c(%rip),%rdx
mov    %rdx,0xc0(%rsp)
mov    %cl,0xc8(%rsp)
movq   $0x0,0xd0(%rsp)
movl   $0x72,0xd8(%rsp)
lea    0xd76(%rip),%rcx
mov    %rcx,0xe0(%rsp)
mov    %al,0xe8(%rsp)
movq   $0x0,0xf0(%rsp)
movl   $0x73,0xf8(%rsp)
lea    0xd4e(%rip),%rcx
mov    %rcx,0x100(%rsp)
mov    %al,0x108(%rsp)
movq   $0x0,0x110(%rsp)
movl   $0x61,0x118(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movl   $0x1,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x38(%rsp)
lea    0xd03(%rip),%r14
lea    0x40(%rsp),%r15
lea    0xc70(%rip),%r13
xor    %r12d,%r12d
movl   $0x0,0x14(%rsp)
xor    %eax,%eax
mov    %rax,0x30(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
jmp    13d2 <main+0x1c2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xffffffff,%eax
je     146a <main+0x25a>
mov    0x0(%rbp),%rdi
call   10e0 <usage@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   1070 <getopt_long@plt>
lea    -0x61(%rax),%ecx
cmp    $0x15,%ecx
ja     13c0 <main+0x1b0>
movslq 0x0(%r13,%rcx,4),%rax
add    %r13,%rax
jmp    *%rax
mov    0x2bfa(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x30(%rsp)
jmp    13d2 <main+0x1c2>
mov    0x2be9(%rip),%rax
mov    (%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,%r12d
jmp    13d2 <main+0x1c2>
mov    0x2bd5(%rip),%rax
mov    (%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,0x10(%rsp)
jmp    13d2 <main+0x1c2>
mov    $0x1,%eax
mov    %rax,0x38(%rsp)
jmp    13d2 <main+0x1c2>
mov    0x2bb4(%rip),%rax
mov    (%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,0xc(%rsp)
movl   $0x1,0x8(%rsp)
jmp    13d2 <main+0x1c2>
movl   $0x1,0x14(%rsp)
jmp    13d2 <main+0x1c2>
test   %r12d,%r12d
jle    1634 <main+0x424>
lea    0x0(,%r12,4),%edi
call   10d0 <malloc@plt>
test   %rax,%rax
mov    0xc(%rsp),%edi
je     1661 <main+0x451>
mov    %rax,%rbp
cmpl   $0x1,0x8(%rsp)
je     14a0 <main+0x290>
xor    %edi,%edi
call   10b0 <time@plt>
mov    %eax,%edi
call   1050 <srandom@plt>
mov    %r12d,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <random@plt>
cltd
idiv   %r12d
mov    %edx,0x0(%rbp,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    14b0 <main+0x2a0>
mov    0x2af9(%rip),%r14
mov    (%r14),%edi
lea    0x18(%rsp),%r13
mov    %r13,%rsi
call   1100 <getrusage@plt>
mov    0x1c(%rsp),%edi
call   1130 <to_usec@plt>
mov    %eax,0xc(%rsp)
mov    0x18(%rsp),%edi
call   1130 <to_usec@plt>
mov    %eax,0x8(%rsp)
lea    0x28(%rsp),%rdi
xor    %esi,%esi
call   1090 <gettimeofday@plt>
mov    0x10(%rsp),%ebx
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r12d,%edx
mov    0x30(%rsp),%rcx
call   10f0 <call_sort@plt>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1090 <gettimeofday@plt>
mov    (%r14),%edi
mov    %r13,%rsi
call   1100 <getrusage@plt>
mov    0x1c(%rsp),%edi
call   1130 <to_usec@plt>
mov    %eax,%r13d
mov    0x18(%rsp),%edi
call   1130 <to_usec@plt>
mov    %eax,%r14d
lea    0xb6b(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xb62(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x20(%rsp),%edi
call   1130 <to_usec@plt>
mov    %eax,%ebx
mov    0x28(%rsp),%edi
call   1130 <to_usec@plt>
sub    %eax,%ebx
lea    0xb42(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
cmpl   $0x1,0x14(%rsp)
jne    15d1 <main+0x3c1>
lea    0xb77(%rip),%rdi
call   1060 <puts@plt>
lea    0xb31(%rip),%r12
xor    %ebx,%ebx
nopl   (%rax)
mov    0x0(%rbp,%rbx,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    15b0 <main+0x3a0>
mov    $0xa,%edi
call   1040 <putchar@plt>
cmpl   $0x0,0x38(%rsp)
je     1618 <main+0x408>
sub    0xc(%rsp),%r13d
sub    0x8(%rsp),%r14d
lea    0xaf7(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xaf8(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
add    %r13d,%r14d
lea    0xaf6(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2995(%rip),%rax
mov    (%rax),%edi
lea    0xa4f(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   10e0 <usage@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    0x2968(%rip),%rax
mov    (%rax),%edi
lea    0xa3d(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x3,%edi
call   1120 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.rusage = type { %struct.timeval, %struct.timeval }
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [5 x i8] c"help\00"
@required_argument = global i32 0
@.str.1 = [12 x i8] c"parallelism\00"
@.str.2 = [6 x i8] c"nsize\00"
@.str.3 = [8 x i8] c"verbose\00"
@no_argument = global i32 0
@.str.4 = [7 x i8] c"rusage\00"
@.str.5 = [5 x i8] c"seed\00"
@.str.6 = [4 x i8] c"arg\00"
@.str.7 = [12 x i8] c"hp:s:n:vra:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.8 = [27 x i8] c"invalid size of vector %d\0A\00"
@.str.9 = [14 x i8] c"malloc error\0A\00"
@RUSAGE_SELF = global i32 0
@.str.10 = [7 x i8] c"p: %d\0A\00"
@.str.11 = [7 x i8] c"n: %d\0A\00"
@.str.12 = [18 x i8] c"total time: %lld\0A\00"
@.str.13 = [17 x i8] c"Sorted vector :\0A\00"
@.str.14 = [4 x i8] c"%d \00"
@.str.15 = [2 x i8] c"\0A\00"
@.str.16 = [18 x i8] c"user : %ld\0A\00"
@.str.17 = [18 x i8] c"system : %ld\0A\00"
@.str.18 = [18 x i8] c"tot (u+s) : %ld\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 %struct.timeval
%14 = alloca %struct.timeval
%15 = alloca i8*
%16 = alloca %struct.rusage
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca [8 x %struct.option]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
store i32 0, i32* %8
store i32 0, i32* %10
store i32 0, i32* %12
store i8* null, i8** %15
store i32 0, i32* %19
store i32 0, i32* %20
%22 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %21, i64 0, i64 0
%23 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %23
%24 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 1
%25 = load i32, i32* @required_argument
%26 = trunc i32 %25 to i8
store i8 %26, i8* %24
%27 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 2
store i32* null, i32** %27
%28 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 3
store i32 104, i32* %28
%29 = getelementptr inbounds %struct.option, %struct.option* %22, i64 1
%30 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %30
%31 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 1
%32 = load i32, i32* @required_argument
%33 = trunc i32 %32 to i8
store i8 %33, i8* %31
%34 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 2
store i32* null, i32** %34
%35 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 3
store i32 112, i32* %35
%36 = getelementptr inbounds %struct.option, %struct.option* %29, i64 1
%37 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %37
%38 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 1
%39 = load i32, i32* @required_argument
%40 = trunc i32 %39 to i8
store i8 %40, i8* %38
%41 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 2
store i32* null, i32** %41
%42 = getelementptr inbounds %struct.option, %struct.option* %36, i32 0, i32 3
store i32 110, i32* %42
%43 = getelementptr inbounds %struct.option, %struct.option* %36, i64 1
%44 = getelementptr inbounds %struct.option, %struct.option* %43, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %44
%45 = getelementptr inbounds %struct.option, %struct.option* %43, i32 0, i32 1
%46 = load i32, i32* @no_argument
%47 = trunc i32 %46 to i8
store i8 %47, i8* %45
%48 = getelementptr inbounds %struct.option, %struct.option* %43, i32 0, i32 2
store i32* null, i32** %48
%49 = getelementptr inbounds %struct.option, %struct.option* %43, i32 0, i32 3
store i32 118, i32* %49
%50 = getelementptr inbounds %struct.option, %struct.option* %43, i64 1
%51 = getelementptr inbounds %struct.option, %struct.option* %50, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %51
%52 = getelementptr inbounds %struct.option, %struct.option* %50, i32 0, i32 1
%53 = load i32, i32* @no_argument
%54 = trunc i32 %53 to i8
store i8 %54, i8* %52
%55 = getelementptr inbounds %struct.option, %struct.option* %50, i32 0, i32 2
store i32* null, i32** %55
%56 = getelementptr inbounds %struct.option, %struct.option* %50, i32 0, i32 3
store i32 114, i32* %56
%57 = getelementptr inbounds %struct.option, %struct.option* %50, i64 1
%58 = getelementptr inbounds %struct.option, %struct.option* %57, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %58
%59 = getelementptr inbounds %struct.option, %struct.option* %57, i32 0, i32 1
%60 = load i32, i32* @required_argument
%61 = trunc i32 %60 to i8
store i8 %61, i8* %59
%62 = getelementptr inbounds %struct.option, %struct.option* %57, i32 0, i32 2
store i32* null, i32** %62
%63 = getelementptr inbounds %struct.option, %struct.option* %57, i32 0, i32 3
store i32 115, i32* %63
%64 = getelementptr inbounds %struct.option, %struct.option* %57, i64 1
%65 = getelementptr inbounds %struct.option, %struct.option* %64, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %65
%66 = getelementptr inbounds %struct.option, %struct.option* %64, i32 0, i32 1
%67 = load i32, i32* @required_argument
%68 = trunc i32 %67 to i8
store i8 %68, i8* %66
%69 = getelementptr inbounds %struct.option, %struct.option* %64, i32 0, i32 2
store i32* null, i32** %69
%70 = getelementptr inbounds %struct.option, %struct.option* %64, i32 0, i32 3
store i32 97, i32* %70
%71 = getelementptr inbounds %struct.option, %struct.option* %64, i64 1
%72 = bitcast %struct.option* %71 to i8*
br label %73
73: ; preds = %100, %2
%74 = load i32, i32* %4
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %21, i64 0, i64 0
%77 = call i32 @getopt_long(i32 %74, i8** %75, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), %struct.option* %76, i32* null)
store i32 %77, i32* %6
%78 = icmp ne i32 %77, -1
br i1 %78, label %79, label %101
79: ; preds = %73
%80 = load i32, i32* %6
switch i32 %80, label %95 [
i32 112, label %81
i32 118, label %84
i32 97, label %85
i32 114, label %87
i32 110, label %88
i32 115, label %91
i32 104, label %94
]
81: ; preds = %79
%82 = load i8*, i8** @optarg
%83 = call i32 @atoi(i8* %82)
store i32 %83, i32* %7
br label %100
84: ; preds = %79
store i32 1, i32* %12
br label %100
85: ; preds = %79
%86 = load i8*, i8** @optarg
store i8* %86, i8** %15
br label %100
87: ; preds = %79
store i32 1, i32* %10
br label %100
88: ; preds = %79
%89 = load i8*, i8** @optarg
%90 = call i32 @atoi(i8* %89)
store i32 %90, i32* %8
br label %100
91: ; preds = %79
%92 = load i8*, i8** @optarg
%93 = call i32 @atoi(i8* %92)
store i32 %93, i32* %19
store i32 1, i32* %20
br label %100
94: ; preds = %79
br label %95
95: ; preds = %79, %94
%96 = load i8**, i8*** %5
%97 = getelementptr inbounds i8*, i8** %96, i64 0
%98 = load i8*, i8** %97
%99 = call i32 @usage(i8* %98)
br label %100
100: ; preds = %95, %91, %88, %87, %85, %84, %81
br label %73
101: ; preds = %73
%102 = load i32, i32* %8
%103 = icmp sle i32 %102, 0
br i1 %103, label %104, label %113
104: ; preds = %101
%105 = load i32, i32* @stderr
%106 = load i32, i32* %8
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %106)
%108 = load i8**, i8*** %5
%109 = getelementptr inbounds i8*, i8** %108, i64 0
%110 = load i8*, i8** %109
%111 = call i32 @usage(i8* %110)
%112 = call i32 @exit(i32 1)
unreachable
113: ; preds = %101
%114 = load i32, i32* %8
%115 = sext i32 %114 to i64
%116 = mul i64 %115, 4
%117 = trunc i64 %116 to i32
%118 = call i64 @malloc(i32 %117)
%119 = inttoptr i64 %118 to i32*
store i32* %119, i32** %11
%120 = load i32*, i32** %11
%121 = icmp eq i32* %120, null
br i1 %121, label %122, label %126
122: ; preds = %113
%123 = load i32, i32* @stderr
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%125 = call i32 @exit(i32 3)
unreachable
126: ; preds = %113
%127 = load i32, i32* %20
%128 = icmp ne i32 %127, 1
br i1 %128, label %129, label %131
129: ; preds = %126
%130 = call i32 @time(i32* null)
store i32 %130, i32* %19
br label %131
131: ; preds = %129, %126
%132 = load i32, i32* %19
%133 = call i32 @srandom(i32 %132)
store i32 0, i32* %9
br label %134
134: ; preds = %146, %131
%135 = load i32, i32* %9
%136 = load i32, i32* %8
%137 = icmp slt i32 %135, %136
br i1 %137, label %138, label %149
138: ; preds = %134
%139 = call i32 (...) @random()
%140 = load i32, i32* %8
%141 = srem i32 %139, %140
%142 = load i32*, i32** %11
%143 = load i32, i32* %9
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i32, i32* %142, i64 %144
store i32 %141, i32* %145
br label %146
146: ; preds = %138
%147 = load i32, i32* %9
%148 = add nsw i32 %147, 1
store i32 %148, i32* %9
br label %134
149: ; preds = %134
%150 = load i32, i32* @RUSAGE_SELF
%151 = call i32 @getrusage(i32 %150, %struct.rusage* %16)
%152 = getelementptr inbounds %struct.rusage, %struct.rusage* %16, i32 0, i32 1
%153 = getelementptr inbounds %struct.timeval, %struct.timeval* %152, i32 0, i32 0
%154 = load i32, i32* %153
%155 = call i32 @to_usec(i32 %154)
store i32 %155, i32* %18
%156 = getelementptr inbounds %struct.rusage, %struct.rusage* %16, i32 0, i32 0
%157 = getelementptr inbounds %struct.timeval, %struct.timeval* %156, i32 0, i32 0
%158 = load i32, i32* %157
%159 = call i32 @to_usec(i32 %158)
store i32 %159, i32* %17
%160 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%161 = load i32, i32* %7
%162 = load i32*, i32** %11
%163 = load i32, i32* %8
%164 = load i8*, i8** %15
%165 = call i32 @call_sort(i32 %161, i32* %162, i32 %163, i8* %164)
%166 = call i32 @gettimeofday(%struct.timeval* %14, i32* null)
%167 = load i32, i32* @RUSAGE_SELF
%168 = call i32 @getrusage(i32 %167, %struct.rusage* %16)
%169 = getelementptr inbounds %struct.rusage, %struct.rusage* %16, i32 0, i32 1
%170 = getelementptr inbounds %struct.timeval, %struct.timeval* %169, i32 0, i32 0
%171 = load i32, i32* %170
%172 = call i32 @to_usec(i32 %171)
%173 = load i32, i32* %18
%174 = sub nsw i32 %172, %173
store i32 %174, i32* %18
%175 = getelementptr inbounds %struct.rusage, %struct.rusage* %16, i32 0, i32 0
%176 = getelementptr inbounds %struct.timeval, %struct.timeval* %175, i32 0, i32 0
%177 = load i32, i32* %176
%178 = call i32 @to_usec(i32 %177)
%179 = load i32, i32* %17
%180 = sub nsw i32 %178, %179
store i32 %180, i32* %17
%181 = load i32, i32* %7
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %181)
%183 = load i32, i32* %8
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %183)
%185 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 0
%186 = load i32, i32* %185
%187 = call i32 @to_usec(i32 %186)
%188 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%189 = load i32, i32* %188
%190 = call i32 @to_usec(i32 %189)
%191 = sub nsw i32 %187, %190
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %191)
%193 = load i32, i32* %12
%194 = icmp eq i32 1, %193
br i1 %194, label %195, label %213
195: ; preds = %149
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %9
br label %197
197: ; preds = %208, %195
%198 = load i32, i32* %9
%199 = load i32, i32* %8
%200 = icmp slt i32 %198, %199
br i1 %200, label %201, label %211
201: ; preds = %197
%202 = load i32*, i32** %11
%203 = load i32, i32* %9
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i32, i32* %202, i64 %204
%206 = load i32, i32* %205
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %206)
br label %208
208: ; preds = %201
%209 = load i32, i32* %9
%210 = add nsw i32 %209, 1
store i32 %210, i32* %9
br label %197
211: ; preds = %197
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %213
213: ; preds = %211, %149
%214 = load i32, i32* %10
%215 = icmp ne i32 %214, 0
br i1 %215, label %216, label %225
216: ; preds = %213
%217 = load i32, i32* %18
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i32 %217)
%219 = load i32, i32* %17
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %219)
%221 = load i32, i32* %18
%222 = load i32, i32* %17
%223 = add nsw i32 %221, %222
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i32 %223)
br label %225
225: ; preds = %216, %213
%226 = load i32*, i32** %11
%227 = call i32 @free(i32* %226)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.rusage = type { %struct.timeval, %struct.timeval }
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [5 x i8] c"help\00"
@required_argument = global i32 0
@.str.1 = [12 x i8] c"parallelism\00"
@.str.2 = [6 x i8] c"nsize\00"
@.str.3 = [8 x i8] c"verbose\00"
@no_argument = global i32 0
@.str.4 = [7 x i8] c"rusage\00"
@.str.5 = [5 x i8] c"seed\00"
@.str.6 = [4 x i8] c"arg\00"
@.str.7 = [12 x i8] c"hp:s:n:vra:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.8 = [27 x i8] c"invalid size of vector %d\0A\00"
@.str.9 = [14 x i8] c"malloc error\0A\00"
@RUSAGE_SELF = global i32 0
@.str.10 = [7 x i8] c"p: %d\0A\00"
@.str.11 = [7 x i8] c"n: %d\0A\00"
@.str.12 = [18 x i8] c"total time: %lld\0A\00"
@.str.14 = [4 x i8] c"%d \00"
@.str.16 = [18 x i8] c"user : %ld\0A\00"
@.str.17 = [18 x i8] c"system : %ld\0A\00"
@.str.18 = [18 x i8] c"tot (u+s) : %ld\0A\00"
@str = [16 x i8] c"Sorted vector :\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.rusage
%6 = alloca [8 x %struct.option]
%7 = bitcast %struct.timeval* %3 to i8*
%8 = bitcast %struct.timeval* %4 to i8*
%9 = bitcast %struct.rusage* %5 to i8*
%10 = bitcast [8 x %struct.option]* %6 to i8*
%11 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 0
%12 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 0, i32 1
%14 = load i32, i32* @required_argument
%15 = trunc i32 %14 to i8
store i8 %15, i8* %13
%16 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 0, i32 2
store i32* null, i32** %16
%17 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 0, i32 3
store i32 104, i32* %17
%18 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %18
%19 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 1, i32 1
store i8 %15, i8* %19
%20 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 1, i32 2
store i32* null, i32** %20
%21 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 1, i32 3
store i32 112, i32* %21
%22 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %22
%23 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 2, i32 1
store i8 %15, i8* %23
%24 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 2, i32 2
store i32* null, i32** %24
%25 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 2, i32 3
store i32 110, i32* %25
%26 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 3, i32 1
%28 = load i32, i32* @no_argument
%29 = trunc i32 %28 to i8
store i8 %29, i8* %27
%30 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 3, i32 2
store i32* null, i32** %30
%31 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 3, i32 3
store i32 118, i32* %31
%32 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %32
%33 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 4, i32 1
store i8 %29, i8* %33
%34 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 4, i32 2
store i32* null, i32** %34
%35 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 4, i32 3
store i32 114, i32* %35
%36 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %36
%37 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 5, i32 1
store i8 %15, i8* %37
%38 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 5, i32 2
store i32* null, i32** %38
%39 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 5, i32 3
store i32 115, i32* %39
%40 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 6, i32 1
store i8 %15, i8* %41
%42 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 6, i32 2
store i32* null, i32** %42
%43 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 6, i32 3
store i32 97, i32* %43
%44 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %6, i64 0, i64 7
%45 = bitcast %struct.option* %44 to i8*
br label %46
46: ; preds = %86, %2
%47 = phi i32 [ %88, %86 ], [ 0, %2 ]
%48 = phi i32 [ %55, %86 ], [ 0, %2 ]
%49 = phi i32 [ %62, %86 ], [ 1, %2 ]
%50 = phi i32 [ %68, %86 ], [ 0, %2 ]
%51 = phi i8* [ %73, %86 ], [ null, %2 ]
%52 = phi i32 [ %77, %86 ], [ 0, %2 ]
%53 = phi i32 [ %78, %86 ], [ 0, %2 ]
br label %54
54: ; preds = %79, %46
%55 = phi i32 [ %48, %46 ], [ 1, %79 ]
%56 = phi i32 [ %49, %46 ], [ %62, %79 ]
%57 = phi i32 [ %50, %46 ], [ %68, %79 ]
%58 = phi i8* [ %51, %46 ], [ %73, %79 ]
%59 = phi i32 [ %52, %46 ], [ %77, %79 ]
%60 = phi i32 [ %53, %46 ], [ %78, %79 ]
br label %61
61: ; preds = %54, %81
%62 = phi i32 [ %56, %54 ], [ %83, %81 ]
%63 = phi i32 [ %57, %54 ], [ %68, %81 ]
%64 = phi i8* [ %58, %54 ], [ %73, %81 ]
%65 = phi i32 [ %59, %54 ], [ %77, %81 ]
%66 = phi i32 [ %60, %54 ], [ %78, %81 ]
br label %67
67: ; preds = %79, %61
%68 = phi i32 [ %63, %61 ], [ 1, %79 ]
%69 = phi i8* [ %64, %61 ], [ %73, %79 ]
%70 = phi i32 [ %65, %61 ], [ %77, %79 ]
%71 = phi i32 [ %66, %61 ], [ %78, %79 ]
br label %72
72: ; preds = %67, %84
%73 = phi i8* [ %69, %67 ], [ %85, %84 ]
%74 = phi i32 [ %70, %67 ], [ %77, %84 ]
%75 = phi i32 [ %71, %67 ], [ %78, %84 ]
br label %76
76: ; preds = %72, %89
%77 = phi i32 [ %74, %72 ], [ %91, %89 ]
%78 = phi i32 [ %75, %72 ], [ 1, %89 ]
br label %79
79: ; preds = %76, %92
%80 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), %struct.option* %11, i32* null)
switch i32 %80, label %92 [
i32 -1, label %95
i32 112, label %81
i32 118, label %67
i32 97, label %84
i32 114, label %54
i32 110, label %86
i32 115, label %89
]
81: ; preds = %79
%82 = load i8*, i8** @optarg
%83 = call i32 @atoi(i8* %82)
br label %61
84: ; preds = %79
%85 = load i8*, i8** @optarg
br label %72
86: ; preds = %79
%87 = load i8*, i8** @optarg
%88 = call i32 @atoi(i8* %87)
br label %46
89: ; preds = %79
%90 = load i8*, i8** @optarg
%91 = call i32 @atoi(i8* %90)
br label %76
92: ; preds = %79
%93 = load i8*, i8** %1
%94 = call i32 @usage(i8* %93)
br label %79
95: ; preds = %79
%96 = icmp slt i32 %47, 1
br i1 %96, label %97, label %103
97: ; preds = %95
%98 = load i32, i32* @stderr
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %47)
%100 = load i8*, i8** %1
%101 = call i32 @usage(i8* %100)
%102 = call i32 @exit(i32 1)
unreachable
103: ; preds = %95
%104 = shl i32 %47, 2
%105 = call i64 @malloc(i32 %104)
%106 = inttoptr i64 %105 to i32*
%107 = icmp eq i64 %105, 0
br i1 %107, label %108, label %112
108: ; preds = %103
%109 = load i32, i32* @stderr
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%111 = call i32 @exit(i32 3)
unreachable
112: ; preds = %103
%113 = icmp eq i32 %78, 1
br i1 %113, label %116, label %114
114: ; preds = %112
%115 = call i32 @time(i32* null)
br label %116
116: ; preds = %112, %114
%117 = phi i32 [ %115, %114 ], [ %77, %112 ]
%118 = call i32 @srandom(i32 %117)
%119 = zext i32 %47 to i64
br label %120
120: ; preds = %116, %120
%121 = phi i64 [ 0, %116 ], [ %125, %120 ]
%122 = call i32 (...) @random()
%123 = srem i32 %122, %47
%124 = getelementptr inbounds i32, i32* %106, i64 %121
store i32 %123, i32* %124
%125 = add nuw nsw i64 %121, 1
%126 = icmp eq i64 %125, %119
br i1 %126, label %127, label %120
127: ; preds = %120
%128 = load i32, i32* @RUSAGE_SELF
%129 = call i32 @getrusage(i32 %128, %struct.rusage* %5)
%130 = getelementptr inbounds %struct.rusage, %struct.rusage* %5, i64 0, i32 1, i32 0
%131 = load i32, i32* %130
%132 = call i32 @to_usec(i32 %131)
%133 = getelementptr inbounds %struct.rusage, %struct.rusage* %5, i64 0, i32 0, i32 0
%134 = load i32, i32* %133
%135 = call i32 @to_usec(i32 %134)
%136 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%137 = call i32 @call_sort(i32 %62, i32* %106, i32 %47, i8* %73)
%138 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%139 = load i32, i32* @RUSAGE_SELF
%140 = call i32 @getrusage(i32 %139, %struct.rusage* %5)
%141 = load i32, i32* %130
%142 = call i32 @to_usec(i32 %141)
%143 = sub nsw i32 %142, %132
%144 = load i32, i32* %133
%145 = call i32 @to_usec(i32 %144)
%146 = sub nsw i32 %145, %135
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %62)
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %47)
%149 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%150 = load i32, i32* %149
%151 = call i32 @to_usec(i32 %150)
%152 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%153 = load i32, i32* %152
%154 = call i32 @to_usec(i32 %153)
%155 = sub nsw i32 %151, %154
%156 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %155)
%157 = icmp eq i32 %68, 1
br i1 %157, label %158, label %170
158: ; preds = %127
%159 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%160 = zext i32 %47 to i64
br label %161
161: ; preds = %158, %161
%162 = phi i64 [ 0, %158 ], [ %166, %161 ]
%163 = getelementptr inbounds i32, i32* %106, i64 %162
%164 = load i32, i32* %163
%165 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %164)
%166 = add nuw nsw i64 %162, 1
%167 = icmp eq i64 %166, %160
br i1 %167, label %168, label %161
168: ; preds = %161
%169 = call i32 @putchar(i32 10)
br label %170
170: ; preds = %168, %127
%171 = icmp eq i32 %55, 0
br i1 %171, label %177, label %172
172: ; preds = %170
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i32 %143)
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %146)
%175 = add nsw i32 %146, %143
%176 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i32 %175)
br label %177
177: ; preds = %172, %170
%178 = call i32 @free(i32* %106)
ret i32 0
}