#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 atoi(char *);
int /*<<< orphan*/ iquicksort_I(int *, int *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int *vrandi(int, int, int);
int main(int argc, char *argv[]) {
  srand(time(NULL));
  for (int i = 0; i < argc; ++i)
    printf("argv[%d]: %s   ", i, argv[i]);
  putchar('\n');
  printf("breaking ties with average rank\n");
  int max = atoi(argv[1]);
  int n = atoi(argv[2]);
  printf("random vector:  max: %d   n: %d\n", max, n);
  int *x = vrandi(10, max, n);
  for (int i = 0; i < n; ++i)
    printf("%d    ", x[i]);
  putchar('\n');
  int *indx = (int *)malloc(n * sizeof(int));
  for (int i = 0; i < n; ++i)
    indx[i] = i;
  iquicksort_I(x, indx, n);
  double *result = (double *)malloc(n * sizeof(double));
  double *ranks = (double *)malloc(n * sizeof(double));
  int b = x[0];
  int ib = 0;
  int i;
  for (i = 1; i < n; ++i) {
    if (x[i] != b) {
      if (ib < i - 1) {
        double rnk = (i - 1 + ib + 2) / 2.0;
        for (int j = ib; j <= i - 1; ++j)
          ranks[j] = rnk;
      } else {
        ranks[ib] = ib + 1;
      }
      b = x[i];
      ib = i;
    }
  }
  if (ib == i - 1)
    ranks[ib] = i;
  else {
    double rnk = (i - 1 + ib + 2) / 2.0;
    for (int j = ib; j <= i - 1; ++j)
      ranks[j] = rnk;
  }
  for (int i = 0; i < n; ++i)
    result[indx[i]] = ranks[i];
  printf("reorder ranks into original order of vector:\n");
  for (int i = 0; i < n; ++i)
    printf("%.1f   ", result[i]);
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e7 <main+0x67>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11b0 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    $0xa,%edi
call   1060 <vrandi@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1281 <main+0x101>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    124e <main+0xce>
mov    $0xa,%edi
call   1030 <putchar@plt>
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12cd <main+0x14d>
mov    -0x3c(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12a5 <main+0x125>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <iquicksort_I@plt>
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x1,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13e6 <main+0x266>
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x54(%rbp),%eax
je     13d3 <main+0x253>
mov    -0x58(%rbp),%eax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13a8 <main+0x228>
mov    -0x5c(%rbp),%eax
sub    $0x1,%eax
add    -0x58(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movsd  0xc9d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13a3 <main+0x223>
movsd  -0x68(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1372 <main+0x1f2>
jmp    13bf <main+0x23f>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x54(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    13d8 <main+0x258>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    131a <main+0x19a>
mov    -0x58(%rbp),%eax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    140e <main+0x28e>
cvtsi2sdl -0x5c(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    146b <main+0x2eb>
mov    -0x5c(%rbp),%eax
sub    $0x1,%eax
add    -0x58(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movsd  0xbda(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1466 <main+0x2e6>
movsd  -0x78(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1435 <main+0x2b5>
jmp    146b <main+0x2eb>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14ae <main+0x32e>
mov    -0x50(%rbp),%rax
movslq -0x80(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x80(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1472 <main+0x2f2>
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1507 <main+0x387>
mov    -0x48(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xba3(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    14c6 <main+0x346>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r15
mov    %edi,%ebx
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
test   %ebx,%ebx
jle    11d9 <main+0x49>
mov    %ebx,%ebp
lea    0xeda(%rip),%r14
xor    %ebx,%ebx
mov    (%r15,%rbx,8),%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11c0 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeee(%rip),%rdi
call   1050 <puts@plt>
mov    0x8(%r15),%rdi
call   10b0 <atoi@plt>
mov    %eax,%ebx
mov    0x10(%r15),%rdi
call   10b0 <atoi@plt>
mov    %eax,%r15d
lea    0xe9b(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
mov    %ebx,%esi
mov    %r15d,%edx
call   1070 <vrandi@plt>
mov    %rax,%r12
mov    %r15d,%r14d
test   %r15d,%r15d
jle    1257 <main+0xc7>
lea    0xe90(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1240 <main+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x0(,%r15,4),%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
test   %r15d,%r15d
jle    13fe <main+0x26e>
cmp    $0x8,%r15d
jae    1287 <main+0xf7>
xor    %eax,%eax
jmp    13f0 <main+0x260>
mov    %r14d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0x18,%rsi
jae    12b6 <main+0x126>
movdqa 0xd51(%rip),%xmm0
xor    %esi,%esi
jmp    1395 <main+0x205>
and    $0xfffffffffffffffc,%rdx
movdqa 0xd3e(%rip),%xmm0
xor    %esi,%esi
movdqa 0xd43(%rip),%xmm8
movdqa 0xd4a(%rip),%xmm9
movdqa 0xd51(%rip),%xmm10
movdqa 0xd59(%rip),%xmm4
movdqa 0xd61(%rip),%xmm5
movdqa 0xd69(%rip),%xmm6
movdqa 0xd71(%rip),%xmm7
movdqa 0xd79(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,0x0(%r13,%rsi,4)
movdqu %xmm2,0x10(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%r13,%rsi,4)
movdqu %xmm3,0x30(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%r13,%rsi,4)
movdqu %xmm3,0x50(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%r13,%rsi,4)
movdqu %xmm3,0x70(%r13,%rsi,4)
add    $0x20,%rsi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rdx
jne    1310 <main+0x180>
test   %rcx,%rcx
je     13e0 <main+0x250>
lea    0x10(,%rsi,4),%rdx
add    %r13,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movdqa 0xc5d(%rip),%xmm1
movdqa 0xc65(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rdx,%rsi,1)
movdqu %xmm3,(%rdx,%rsi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    13c0 <main+0x230>
cmp    %r14,%rax
je     13fe <main+0x26e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,0x0(%r13,%rax,4)
add    $0x1,%rax
cmp    %rax,%r14
jne    13f0 <main+0x260>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1040 <iquicksort_I@plt>
lea    0x0(,%r15,8),%ebx
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %r15,%rbp
mov    %rax,%r15
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rbp,0x8(%rsp)
cmp    $0x2,%ebp
jl     15a5 <main+0x415>
mov    (%r12),%edx
lea    0x70(%rax),%rcx
mov    %rcx,0x10(%rsp)
lea    0x10(%rax),%r9
xor    %ecx,%ecx
mov    $0x1,%esi
movsd  0xc3a(%rip),%xmm0
jmp    1471 <main+0x2e1>
nopl   0x0(%rax,%rax,1)
mov    %edx,%edi
add    $0x1,%rsi
mov    %edi,%edx
cmp    %r14,%rsi
je     15ae <main+0x41e>
mov    (%r12,%rsi,4),%edi
cmp    %edx,%edi
je     1460 <main+0x2d0>
lea    -0x1(%rsi),%rdx
movslq %ecx,%rcx
cmp    %rcx,%rdx
jle    14d0 <main+0x340>
add    %ecx,%edx
add    $0x2,%edx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm0,%xmm1
mov    %rsi,%r11
sub    %rcx,%r11
cmp    $0x4,%r11
jb     1590 <main+0x400>
mov    %r11,%r10
and    $0xfffffffffffffffc,%r10
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
lea    -0x4(%r10),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
cmp    $0xc,%rdx
jae    14e4 <main+0x354>
xor    %edx,%edx
jmp    1539 <main+0x3a9>
nopl   (%rax)
lea    0x1(%rcx),%edx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
movsd  %xmm1,(%rax,%rcx,8)
jmp    159e <main+0x40e>
mov    0x10(%rsp),%rdx
lea    (%rdx,%rcx,8),%rbx
mov    %r8,%rbp
and    $0xfffffffffffffffc,%rbp
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd %xmm2,-0x70(%rbx,%rdx,8)
movupd %xmm2,-0x60(%rbx,%rdx,8)
movupd %xmm2,-0x50(%rbx,%rdx,8)
movupd %xmm2,-0x40(%rbx,%rdx,8)
movupd %xmm2,-0x30(%rbx,%rdx,8)
movupd %xmm2,-0x20(%rbx,%rdx,8)
movupd %xmm2,-0x10(%rbx,%rdx,8)
movupd %xmm2,(%rbx,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rbp
jne    1500 <main+0x370>
test   $0x3,%r8b
je     1585 <main+0x3f5>
add    %rcx,%rdx
lea    (%r9,%rdx,8),%rbp
mov    %esi,%edx
sub    %ecx,%edx
and    $0xc,%dl
add    $0xfc,%dl
shr    $0x2,%dl
add    $0x1,%dl
movzbl %dl,%edx
and    $0x3,%edx
shl    $0x5,%rdx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm2,-0x10(%rbp,%rbx,1)
movupd %xmm2,0x0(%rbp,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%rdx
jne    1570 <main+0x3e0>
cmp    %r10,%r11
je     159e <main+0x40e>
add    %r10,%rcx
nopl   (%rax)
movsd  %xmm1,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1590 <main+0x400>
mov    %esi,%ecx
jmp    1462 <main+0x2d2>
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    15b3 <main+0x423>
mov    0x8(%rsp),%rdx
lea    -0x1(%rdx),%esi
cmp    %esi,%ecx
jne    15ce <main+0x43e>
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    16be <main+0x52e>
cmp    %edx,%ecx
jge    16be <main+0x52e>
add    %ecx,%esi
add    $0x2,%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
mulsd  0xaa6(%rip),%xmm0
movslq %ecx,%rcx
movslq %edx,%rdx
mov    %rdx,%r9
sub    %rcx,%r9
cmp    $0x4,%r9
jb     16b0 <main+0x520>
mov    %r9,%r8
and    $0xfffffffffffffffc,%r8
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%r8),%rsi
mov    %rsi,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%ebp
and    $0x3,%ebp
cmp    $0xc,%rsi
jae    162d <main+0x49d>
xor    %esi,%esi
jmp    1679 <main+0x4e9>
and    $0xfffffffffffffffc,%rdi
lea    (%rax,%rcx,8),%rbx
add    $0x70,%rbx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd %xmm1,-0x70(%rbx,%rsi,8)
movupd %xmm1,-0x60(%rbx,%rsi,8)
movupd %xmm1,-0x50(%rbx,%rsi,8)
movupd %xmm1,-0x40(%rbx,%rsi,8)
movupd %xmm1,-0x30(%rbx,%rsi,8)
movupd %xmm1,-0x20(%rbx,%rsi,8)
movupd %xmm1,-0x10(%rbx,%rsi,8)
movupd %xmm1,(%rbx,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdi
jne    1640 <main+0x4b0>
test   %rbp,%rbp
je     16a4 <main+0x514>
add    %rcx,%rsi
lea    (%rax,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rbp
xor    %edi,%edi
nop
movupd %xmm1,-0x10(%rsi,%rdi,1)
movupd %xmm1,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbp
jne    1690 <main+0x500>
cmp    %r8,%r9
je     16be <main+0x52e>
add    %r8,%rcx
nopl   0x0(%rax)
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    16b0 <main+0x520>
cmpl   $0x0,0x8(%rsp)
jle    16d9 <main+0x549>
lea    -0x1(%r14),%rdx
mov    %r14d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    16ea <main+0x55a>
xor    %edx,%edx
jmp    174c <main+0x5bc>
lea    0xa18(%rip),%rdi
call   1050 <puts@plt>
jmp    17c9 <main+0x639>
mov    %r14d,%esi
and    $0xfffffffc,%esi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rax,%rdx,8),%xmm0
movslq 0x0(%r13,%rdx,4),%rdi
movsd  %xmm0,(%r15,%rdi,8)
movsd  0x8(%rax,%rdx,8),%xmm0
movslq 0x4(%r13,%rdx,4),%rdi
movsd  %xmm0,(%r15,%rdi,8)
movsd  0x10(%rax,%rdx,8),%xmm0
movslq 0x8(%r13,%rdx,4),%rdi
movsd  %xmm0,(%r15,%rdi,8)
movq   0x18(%rax,%rdx,8),%xmm0
movslq 0xc(%r13,%rdx,4),%rdi
movq   %xmm0,(%r15,%rdi,8)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1700 <main+0x570>
test   %rcx,%rcx
je     1788 <main+0x5f8>
lea    0x0(,%rdx,4),%rsi
add    %r13,%rsi
lea    (%rax,%rdx,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movq   (%rax,%rdx,8),%xmm0
movslq (%rsi,%rdx,4),%rdi
movq   %xmm0,(%r15,%rdi,8)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1770 <main+0x5e0>
lea    0x969(%rip),%rdi
call   1050 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    17c9 <main+0x639>
xor    %ebp,%ebp
lea    0x92c(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movq   (%r15,%rbp,8),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    17b0 <main+0x620>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"argv[%d]: %s \00"
@.str.1 = [33 x i8] c"breaking ties with average rank\0A\00"
@.str.2 = [33 x i8] c"random vector: max: %d n: %d\0A\00"
@.str.3 = [7 x i8] c"%d \00"
@.str.4 = [46 x i8] c"reorder ranks into original order of vector:\0A\00"
@.str.5 = [8 x i8] c"%.1f \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 double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca i32
%20 = alloca double
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = call i32 @time(i32* null)
%25 = call i32 @srand(i32 %24)
store i32 0, i32* %6
br label %26
26: ; preds = %38, %2
%27 = load i32, i32* %6
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %41
30: ; preds = %26
%31 = load i32, i32* %6
%32 = load i8**, i8*** %5
%33 = load i32, i32* %6
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %31, i8* %36)
br label %38
38: ; preds = %30
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
br label %26
41: ; preds = %26
%42 = call i32 @putchar(i8 signext 10)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call i32 @atoi(i8* %46)
store i32 %47, i32* %7
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = call i32 @atoi(i8* %50)
store i32 %51, i32* %8
%52 = load i32, i32* %7
%53 = load i32, i32* %8
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %52, i32 %53)
%55 = load i32, i32* %7
%56 = load i32, i32* %8
%57 = call i32* @vrandi(i32 10, i32 %55, i32 %56)
store i32* %57, i32** %9
store i32 0, i32* %10
br label %58
58: ; preds = %69, %41
%59 = load i32, i32* %10
%60 = load i32, i32* %8
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %72
62: ; preds = %58
%63 = load i32*, i32** %9
%64 = load i32, i32* %10
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %63, i64 %65
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %62
%70 = load i32, i32* %10
%71 = add nsw i32 %70, 1
store i32 %71, i32* %10
br label %58
72: ; preds = %58
%73 = call i32 @putchar(i8 signext 10)
%74 = load i32, i32* %8
%75 = sext i32 %74 to i64
%76 = mul i64 %75, 4
%77 = trunc i64 %76 to i32
%78 = call i64 @malloc(i32 %77)
%79 = inttoptr i64 %78 to i32*
store i32* %79, i32** %11
store i32 0, i32* %12
br label %80
80: ; preds = %90, %72
%81 = load i32, i32* %12
%82 = load i32, i32* %8
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %93
84: ; preds = %80
%85 = load i32, i32* %12
%86 = load i32*, i32** %11
%87 = load i32, i32* %12
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %86, i64 %88
store i32 %85, i32* %89
br label %90
90: ; preds = %84
%91 = load i32, i32* %12
%92 = add nsw i32 %91, 1
store i32 %92, i32* %12
br label %80
93: ; preds = %80
%94 = load i32*, i32** %9
%95 = load i32*, i32** %11
%96 = load i32, i32* %8
%97 = call i32 @iquicksort_I(i32* %94, i32* %95, i32 %96)
%98 = load i32, i32* %8
%99 = sext i32 %98 to i64
%100 = mul i64 %99, 8
%101 = trunc i64 %100 to i32
%102 = call i64 @malloc(i32 %101)
%103 = inttoptr i64 %102 to double*
store double* %103, double** %13
%104 = load i32, i32* %8
%105 = sext i32 %104 to i64
%106 = mul i64 %105, 8
%107 = trunc i64 %106 to i32
%108 = call i64 @malloc(i32 %107)
%109 = inttoptr i64 %108 to double*
store double* %109, double** %14
%110 = load i32*, i32** %9
%111 = getelementptr inbounds i32, i32* %110, i64 0
%112 = load i32, i32* %111
store i32 %112, i32* %15
store i32 0, i32* %16
store i32 1, i32* %17
br label %113
113: ; preds = %170, %93
%114 = load i32, i32* %17
%115 = load i32, i32* %8
%116 = icmp slt i32 %114, %115
br i1 %116, label %117, label %173
117: ; preds = %113
%118 = load i32*, i32** %9
%119 = load i32, i32* %17
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %118, i64 %120
%122 = load i32, i32* %121
%123 = load i32, i32* %15
%124 = icmp ne i32 %122, %123
br i1 %124, label %125, label %169
125: ; preds = %117
%126 = load i32, i32* %16
%127 = load i32, i32* %17
%128 = sub nsw i32 %127, 1
%129 = icmp slt i32 %126, %128
br i1 %129, label %130, label %154
130: ; preds = %125
%131 = load i32, i32* %17
%132 = sub nsw i32 %131, 1
%133 = load i32, i32* %16
%134 = add nsw i32 %132, %133
%135 = add nsw i32 %134, 2
%136 = sitofp i32 %135 to double
%137 = fdiv double %136, 2.000000e+00
store double %137, double* %18
%138 = load i32, i32* %16
store i32 %138, i32* %19
br label %139
139: ; preds = %150, %130
%140 = load i32, i32* %19
%141 = load i32, i32* %17
%142 = sub nsw i32 %141, 1
%143 = icmp sle i32 %140, %142
br i1 %143, label %144, label %153
144: ; preds = %139
%145 = load double, double* %18
%146 = load double*, double** %14
%147 = load i32, i32* %19
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
store double %145, double* %149
br label %150
150: ; preds = %144
%151 = load i32, i32* %19
%152 = add nsw i32 %151, 1
store i32 %152, i32* %19
br label %139
153: ; preds = %139
br label %162
154: ; preds = %125
%155 = load i32, i32* %16
%156 = add nsw i32 %155, 1
%157 = sitofp i32 %156 to double
%158 = load double*, double** %14
%159 = load i32, i32* %16
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
store double %157, double* %161
br label %162
162: ; preds = %154, %153
%163 = load i32*, i32** %9
%164 = load i32, i32* %17
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i32, i32* %163, i64 %165
%167 = load i32, i32* %166
store i32 %167, i32* %15
%168 = load i32, i32* %17
store i32 %168, i32* %16
br label %169
169: ; preds = %162, %117
br label %170
170: ; preds = %169
%171 = load i32, i32* %17
%172 = add nsw i32 %171, 1
store i32 %172, i32* %17
br label %113
173: ; preds = %113
%174 = load i32, i32* %16
%175 = load i32, i32* %17
%176 = sub nsw i32 %175, 1
%177 = icmp eq i32 %174, %176
br i1 %177, label %178, label %185
178: ; preds = %173
%179 = load i32, i32* %17
%180 = sitofp i32 %179 to double
%181 = load double*, double** %14
%182 = load i32, i32* %16
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds double, double* %181, i64 %183
store double %180, double* %184
br label %209
185: ; preds = %173
%186 = load i32, i32* %17
%187 = sub nsw i32 %186, 1
%188 = load i32, i32* %16
%189 = add nsw i32 %187, %188
%190 = add nsw i32 %189, 2
%191 = sitofp i32 %190 to double
%192 = fdiv double %191, 2.000000e+00
store double %192, double* %20
%193 = load i32, i32* %16
store i32 %193, i32* %21
br label %194
194: ; preds = %205, %185
%195 = load i32, i32* %21
%196 = load i32, i32* %17
%197 = sub nsw i32 %196, 1
%198 = icmp sle i32 %195, %197
br i1 %198, label %199, label %208
199: ; preds = %194
%200 = load double, double* %20
%201 = load double*, double** %14
%202 = load i32, i32* %21
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds double, double* %201, i64 %203
store double %200, double* %204
br label %205
205: ; preds = %199
%206 = load i32, i32* %21
%207 = add nsw i32 %206, 1
store i32 %207, i32* %21
br label %194
208: ; preds = %194
br label %209
209: ; preds = %208, %178
store i32 0, i32* %22
br label %210
210: ; preds = %228, %209
%211 = load i32, i32* %22
%212 = load i32, i32* %8
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %231
214: ; preds = %210
%215 = load double*, double** %14
%216 = load i32, i32* %22
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %215, i64 %217
%219 = load double, double* %218
%220 = load double*, double** %13
%221 = load i32*, i32** %11
%222 = load i32, i32* %22
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds i32, i32* %221, i64 %223
%225 = load i32, i32* %224
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %220, i64 %226
store double %219, double* %227
br label %228
228: ; preds = %214
%229 = load i32, i32* %22
%230 = add nsw i32 %229, 1
store i32 %230, i32* %22
br label %210
231: ; preds = %210
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %23
br label %233
233: ; preds = %244, %231
%234 = load i32, i32* %23
%235 = load i32, i32* %8
%236 = icmp slt i32 %234, %235
br i1 %236, label %237, label %247
237: ; preds = %233
%238 = load double*, double** %13
%239 = load i32, i32* %23
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double, double* %238, i64 %240
%242 = load double, double* %241
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %242)
br label %244
244: ; preds = %237
%245 = load i32, i32* %23
%246 = add nsw i32 %245, 1
store i32 %246, i32* %23
br label %233
247: ; preds = %233
%248 = call i32 @putchar(i8 signext 10)
%249 = load i32, i32* %3
ret i32 %249
}

LLVM IR (-O2):
@.str = [16 x i8] c"argv[%d]: %s \00"
@.str.2 = [33 x i8] c"random vector: max: %d n: %d\0A\00"
@.str.3 = [7 x i8] c"%d \00"
@.str.5 = [8 x i8] c"%.1f \00"
@str = [32 x i8] c"breaking ties with average rank\00"
@str.6 = [45 x i8] c"reorder ranks into original order of vector:\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %22
8: ; preds = %22, %2
%9 = tail call i32 @putchar(i8 signext 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %16)
%18 = tail call i32* @vrandi(i32 10, i32 %13, i32 %16)
%19 = icmp sgt i32 %16, 0
br i1 %19, label %20, label %30
20: ; preds = %8
%21 = zext i32 %16 to i64
br label %102
22: ; preds = %6, %22
%23 = phi i64 [ 0, %6 ], [ %28, %22 ]
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = trunc i64 %23 to i32
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %26, i8* %25)
%28 = add nuw nsw i64 %23, 1
%29 = icmp eq i64 %28, %7
br i1 %29, label %8, label %22
30: ; preds = %102, %8
%31 = tail call i32 @putchar(i8 signext 10)
%32 = shl i32 %16, 2
%33 = tail call i64 @malloc(i32 %32)
%34 = inttoptr i64 %33 to i32*
br i1 %19, label %35, label %109
35: ; preds = %30
%36 = zext i32 %16 to i64
%37 = icmp ult i32 %16, 8
br i1 %37, label %100, label %38
38: ; preds = %35
%39 = and i64 %36, 4294967288
%40 = add nsw i64 %39, -8
%41 = lshr exact i64 %40, 3
%42 = add nuw nsw i64 %41, 1
%43 = and i64 %42, 3
%44 = icmp ult i64 %40, 24
br i1 %44, label %81, label %45
45: ; preds = %38
%46 = and i64 %42, 4611686018427387900
br label %47
47: ; preds = %47, %45
%48 = phi i64 [ 0, %45 ], [ %77, %47 ]
%49 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %45 ], [ %78, %47 ]
%50 = phi i64 [ 0, %45 ], [ %79, %47 ]
%51 = add <4 x i32> %49, <i32 4, i32 4, i32 4, i32 4>
%52 = getelementptr inbounds i32, i32* %34, i64 %48
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> %49, <4 x i32>* %53
%54 = getelementptr inbounds i32, i32* %52, i64 4
%55 = bitcast i32* %54 to <4 x i32>*
store <4 x i32> %51, <4 x i32>* %55
%56 = or i64 %48, 8
%57 = add <4 x i32> %49, <i32 8, i32 8, i32 8, i32 8>
%58 = add <4 x i32> %49, <i32 12, i32 12, i32 12, i32 12>
%59 = getelementptr inbounds i32, i32* %34, i64 %56
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> %57, <4 x i32>* %60
%61 = getelementptr inbounds i32, i32* %59, i64 4
%62 = bitcast i32* %61 to <4 x i32>*
store <4 x i32> %58, <4 x i32>* %62
%63 = or i64 %48, 16
%64 = add <4 x i32> %49, <i32 16, i32 16, i32 16, i32 16>
%65 = add <4 x i32> %49, <i32 20, i32 20, i32 20, i32 20>
%66 = getelementptr inbounds i32, i32* %34, i64 %63
%67 = bitcast i32* %66 to <4 x i32>*
store <4 x i32> %64, <4 x i32>* %67
%68 = getelementptr inbounds i32, i32* %66, i64 4
%69 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> %65, <4 x i32>* %69
%70 = or i64 %48, 24
%71 = add <4 x i32> %49, <i32 24, i32 24, i32 24, i32 24>
%72 = add <4 x i32> %49, <i32 28, i32 28, i32 28, i32 28>
%73 = getelementptr inbounds i32, i32* %34, i64 %70
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> %71, <4 x i32>* %74
%75 = getelementptr inbounds i32, i32* %73, i64 4
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> %72, <4 x i32>* %76
%77 = add nuw i64 %48, 32
%78 = add <4 x i32> %49, <i32 32, i32 32, i32 32, i32 32>
%79 = add i64 %50, 4
%80 = icmp eq i64 %79, %46
br i1 %80, label %81, label %47
81: ; preds = %47, %38
%82 = phi i64 [ 0, %38 ], [ %77, %47 ]
%83 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %38 ], [ %78, %47 ]
%84 = icmp eq i64 %43, 0
br i1 %84, label %98, label %85
85: ; preds = %81, %85
%86 = phi i64 [ %94, %85 ], [ %82, %81 ]
%87 = phi <4 x i32> [ %95, %85 ], [ %83, %81 ]
%88 = phi i64 [ %96, %85 ], [ 0, %81 ]
%89 = add <4 x i32> %87, <i32 4, i32 4, i32 4, i32 4>
%90 = getelementptr inbounds i32, i32* %34, i64 %86
%91 = bitcast i32* %90 to <4 x i32>*
store <4 x i32> %87, <4 x i32>* %91
%92 = getelementptr inbounds i32, i32* %90, i64 4
%93 = bitcast i32* %92 to <4 x i32>*
store <4 x i32> %89, <4 x i32>* %93
%94 = add nuw i64 %86, 8
%95 = add <4 x i32> %87, <i32 8, i32 8, i32 8, i32 8>
%96 = add i64 %88, 1
%97 = icmp eq i64 %96, %43
br i1 %97, label %98, label %85
98: ; preds = %85, %81
%99 = icmp eq i64 %39, %36
br i1 %99, label %109, label %100
100: ; preds = %35, %98
%101 = phi i64 [ 0, %35 ], [ %39, %98 ]
br label %120
102: ; preds = %20, %102
%103 = phi i64 [ 0, %20 ], [ %107, %102 ]
%104 = getelementptr inbounds i32, i32* %18, i64 %103
%105 = load i32, i32* %104
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %105)
%107 = add nuw nsw i64 %103, 1
%108 = icmp eq i64 %107, %21
br i1 %108, label %30, label %102
109: ; preds = %120, %98, %30
%110 = tail call i32 @iquicksort_I(i32* %18, i32* %34, i32 %16)
%111 = shl i32 %16, 3
%112 = tail call i64 @malloc(i32 %111)
%113 = inttoptr i64 %112 to double*
%114 = tail call i64 @malloc(i32 %111)
%115 = inttoptr i64 %114 to double*
%116 = icmp sgt i32 %16, 1
br i1 %116, label %117, label %221
117: ; preds = %109
%118 = load i32, i32* %18
%119 = zext i32 %16 to i64
br label %126
120: ; preds = %100, %120
%121 = phi i64 [ %124, %120 ], [ %101, %100 ]
%122 = getelementptr inbounds i32, i32* %34, i64 %121
%123 = trunc i64 %121 to i32
store i32 %123, i32* %122
%124 = add nuw nsw i64 %121, 1
%125 = icmp eq i64 %124, %36
br i1 %125, label %109, label %120
126: ; preds = %117, %216
%127 = phi i64 [ 1, %117 ], [ %219, %216 ]
%128 = phi i32 [ 0, %117 ], [ %218, %216 ]
%129 = phi i32 [ %118, %117 ], [ %217, %216 ]
%130 = getelementptr inbounds i32, i32* %18, i64 %127
%131 = load i32, i32* %130
%132 = icmp eq i32 %131, %129
br i1 %132, label %216, label %133
133: ; preds = %126
%134 = add nsw i64 %127, -1
%135 = sext i32 %128 to i64
%136 = icmp sgt i64 %134, %135
%137 = trunc i64 %127 to i32
br i1 %136, label %138, label %212
138: ; preds = %133
%139 = add i32 %128, 2
%140 = trunc i64 %134 to i32
%141 = add i32 %139, %140
%142 = sitofp i32 %141 to double
%143 = fmul double %142, 5.000000e-01
%144 = sub i64 %127, %135
%145 = icmp ult i64 %144, 4
br i1 %145, label %205, label %146
146: ; preds = %138
%147 = and i64 %144, -4
%148 = add i64 %147, %135
%149 = insertelement <2 x double> poison, double %143, i64 0
%150 = shufflevector <2 x double> %149, <2 x double> poison, <2 x i32> zeroinitializer
%151 = insertelement <2 x double> poison, double %143, i64 0
%152 = shufflevector <2 x double> %151, <2 x double> poison, <2 x i32> zeroinitializer
%153 = add i64 %147, -4
%154 = lshr exact i64 %153, 2
%155 = add nuw nsw i64 %154, 1
%156 = and i64 %155, 3
%157 = icmp ult i64 %153, 12
br i1 %157, label %189, label %158
158: ; preds = %146
%159 = and i64 %155, 9223372036854775804
br label %160
160: ; preds = %160, %158
%161 = phi i64 [ 0, %158 ], [ %186, %160 ]
%162 = phi i64 [ 0, %158 ], [ %187, %160 ]
%163 = add i64 %161, %135
%164 = getelementptr inbounds double, double* %115, i64 %163
%165 = bitcast double* %164 to <2 x double>*
store <2 x double> %150, <2 x double>* %165
%166 = getelementptr inbounds double, double* %164, i64 2
%167 = bitcast double* %166 to <2 x double>*
store <2 x double> %152, <2 x double>* %167
%168 = or i64 %161, 4
%169 = add i64 %168, %135
%170 = getelementptr inbounds double, double* %115, i64 %169
%171 = bitcast double* %170 to <2 x double>*
store <2 x double> %150, <2 x double>* %171
%172 = getelementptr inbounds double, double* %170, i64 2
%173 = bitcast double* %172 to <2 x double>*
store <2 x double> %152, <2 x double>* %173
%174 = or i64 %161, 8
%175 = add i64 %174, %135
%176 = getelementptr inbounds double, double* %115, i64 %175
%177 = bitcast double* %176 to <2 x double>*
store <2 x double> %150, <2 x double>* %177
%178 = getelementptr inbounds double, double* %176, i64 2
%179 = bitcast double* %178 to <2 x double>*
store <2 x double> %152, <2 x double>* %179
%180 = or i64 %161, 12
%181 = add i64 %180, %135
%182 = getelementptr inbounds double, double* %115, i64 %181
%183 = bitcast double* %182 to <2 x double>*
store <2 x double> %150, <2 x double>* %183
%184 = getelementptr inbounds double, double* %182, i64 2
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> %152, <2 x double>* %185
%186 = add nuw i64 %161, 16
%187 = add nuw i64 %162, 4
%188 = icmp eq i64 %187, %159
br i1 %188, label %189, label %160
189: ; preds = %160, %146
%190 = phi i64 [ 0, %146 ], [ %186, %160 ]
%191 = icmp eq i64 %156, 0
br i1 %191, label %203, label %192
192: ; preds = %189, %192
%193 = phi i64 [ %200, %192 ], [ %190, %189 ]
%194 = phi i64 [ %201, %192 ], [ 0, %189 ]
%195 = add i64 %193, %135
%196 = getelementptr inbounds double, double* %115, i64 %195
%197 = bitcast double* %196 to <2 x double>*
store <2 x double> %150, <2 x double>* %197
%198 = getelementptr inbounds double, double* %196, i64 2
%199 = bitcast double* %198 to <2 x double>*
store <2 x double> %152, <2 x double>* %199
%200 = add nuw i64 %193, 4
%201 = add i64 %194, 1
%202 = icmp eq i64 %201, %156
br i1 %202, label %203, label %192
203: ; preds = %192, %189
%204 = icmp eq i64 %144, %147
br i1 %204, label %216, label %205
205: ; preds = %138, %203
%206 = phi i64 [ %135, %138 ], [ %148, %203 ]
br label %207
207: ; preds = %205, %207
%208 = phi i64 [ %210, %207 ], [ %206, %205 ]
%209 = getelementptr inbounds double, double* %115, i64 %208
store double %143, double* %209
%210 = add nsw i64 %208, 1
%211 = icmp eq i64 %210, %127
br i1 %211, label %216, label %207
212: ; preds = %133
%213 = add nsw i32 %128, 1
%214 = sitofp i32 %213 to double
%215 = getelementptr inbounds double, double* %115, i64 %135
store double %214, double* %215
br label %216
216: ; preds = %207, %203, %212, %126
%217 = phi i32 [ %129, %126 ], [ %131, %212 ], [ %131, %203 ], [ %131, %207 ]
%218 = phi i32 [ %128, %126 ], [ %137, %212 ], [ %137, %203 ], [ %137, %207 ]
%219 = add nuw nsw i64 %127, 1
%220 = icmp eq i64 %219, %119
br i1 %220, label %221, label %126
221: ; preds = %216, %109
%222 = phi i32 [ 0, %109 ], [ %218, %216 ]
%223 = phi i32 [ 1, %109 ], [ %16, %216 ]
%224 = add nsw i32 %223, -1
%225 = icmp eq i32 %222, %224
br i1 %225, label %226, label %230
226: ; preds = %221
%227 = sitofp i32 %223 to double
%228 = sext i32 %222 to i64
%229 = getelementptr inbounds double, double* %115, i64 %228
store double %227, double* %229
br label %307
230: ; preds = %221
%231 = add i32 %222, 2
%232 = add i32 %231, %224
%233 = sitofp i32 %232 to double
%234 = fmul double %233, 5.000000e-01
%235 = icmp slt i32 %222, %223
br i1 %235, label %236, label %307
236: ; preds = %230
%237 = sext i32 %222 to i64
%238 = sext i32 %223 to i64
%239 = sub nsw i64 %238, %237
%240 = icmp ult i64 %239, 4
br i1 %240, label %300, label %241
241: ; preds = %236
%242 = and i64 %239, -4
%243 = add nsw i64 %242, %237
%244 = insertelement <2 x double> poison, double %234, i64 0
%245 = shufflevector <2 x double> %244, <2 x double> poison, <2 x i32> zeroinitializer
%246 = insertelement <2 x double> poison, double %234, i64 0
%247 = shufflevector <2 x double> %246, <2 x double> poison, <2 x i32> zeroinitializer
%248 = add nsw i64 %242, -4
%249 = lshr exact i64 %248, 2
%250 = add nuw nsw i64 %249, 1
%251 = and i64 %250, 3
%252 = icmp ult i64 %248, 12
br i1 %252, label %284, label %253
253: ; preds = %241
%254 = and i64 %250, 9223372036854775804
br label %255
255: ; preds = %255, %253
%256 = phi i64 [ 0, %253 ], [ %281, %255 ]
%257 = phi i64 [ 0, %253 ], [ %282, %255 ]
%258 = add i64 %256, %237
%259 = getelementptr inbounds double, double* %115, i64 %258
%260 = bitcast double* %259 to <2 x double>*
store <2 x double> %245, <2 x double>* %260
%261 = getelementptr inbounds double, double* %259, i64 2
%262 = bitcast double* %261 to <2 x double>*
store <2 x double> %247, <2 x double>* %262
%263 = or i64 %256, 4
%264 = add i64 %263, %237
%265 = getelementptr inbounds double, double* %115, i64 %264
%266 = bitcast double* %265 to <2 x double>*
store <2 x double> %245, <2 x double>* %266
%267 = getelementptr inbounds double, double* %265, i64 2
%268 = bitcast double* %267 to <2 x double>*
store <2 x double> %247, <2 x double>* %268
%269 = or i64 %256, 8
%270 = add i64 %269, %237
%271 = getelementptr inbounds double, double* %115, i64 %270
%272 = bitcast double* %271 to <2 x double>*
store <2 x double> %245, <2 x double>* %272
%273 = getelementptr inbounds double, double* %271, i64 2
%274 = bitcast double* %273 to <2 x double>*
store <2 x double> %247, <2 x double>* %274
%275 = or i64 %256, 12
%276 = add i64 %275, %237
%277 = getelementptr inbounds double, double* %115, i64 %276
%278 = bitcast double* %277 to <2 x double>*
store <2 x double> %245, <2 x double>* %278
%279 = getelementptr inbounds double, double* %277, i64 2
%280 = bitcast double* %279 to <2 x double>*
store <2 x double> %247, <2 x double>* %280
%281 = add nuw i64 %256, 16
%282 = add nuw i64 %257, 4
%283 = icmp eq i64 %282, %254
br i1 %283, label %284, label %255
284: ; preds = %255, %241
%285 = phi i64 [ 0, %241 ], [ %281, %255 ]
%286 = icmp eq i64 %251, 0
br i1 %286, label %298, label %287
287: ; preds = %284, %287
%288 = phi i64 [ %295, %287 ], [ %285, %284 ]
%289 = phi i64 [ %296, %287 ], [ 0, %284 ]
%290 = add i64 %288, %237
%291 = getelementptr inbounds double, double* %115, i64 %290
%292 = bitcast double* %291 to <2 x double>*
store <2 x double> %245, <2 x double>* %292
%293 = getelementptr inbounds double, double* %291, i64 2
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> %247, <2 x double>* %294
%295 = add nuw i64 %288, 4
%296 = add i64 %289, 1
%297 = icmp eq i64 %296, %251
br i1 %297, label %298, label %287
298: ; preds = %287, %284
%299 = icmp eq i64 %239, %242
br i1 %299, label %307, label %300
300: ; preds = %236, %298
%301 = phi i64 [ %237, %236 ], [ %243, %298 ]
br label %302
302: ; preds = %300, %302
%303 = phi i64 [ %305, %302 ], [ %301, %300 ]
%304 = getelementptr inbounds double, double* %115, i64 %303
store double %234, double* %304
%305 = add nsw i64 %303, 1
%306 = icmp eq i64 %305, %238
br i1 %306, label %307, label %302
307: ; preds = %302, %298, %230, %226
br i1 %19, label %310, label %308
308: ; preds = %307
%309 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.6, i64 0, i64 0))
br label %369
310: ; preds = %307
%311 = zext i32 %16 to i64
%312 = add nsw i64 %311, -1
%313 = and i64 %311, 3
%314 = icmp ult i64 %312, 3
br i1 %314, label %317, label %315
315: ; preds = %310
%316 = and i64 %311, 4294967292
br label %336
317: ; preds = %336, %310
%318 = phi i64 [ 0, %310 ], [ %366, %336 ]
%319 = icmp eq i64 %313, 0
br i1 %319, label %332, label %320
320: ; preds = %317, %320
%321 = phi i64 [ %329, %320 ], [ %318, %317 ]
%322 = phi i64 [ %330, %320 ], [ 0, %317 ]
%323 = getelementptr inbounds double, double* %115, i64 %321
%324 = load double, double* %323
%325 = getelementptr inbounds i32, i32* %34, i64 %321
%326 = load i32, i32* %325
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds double, double* %113, i64 %327
store double %324, double* %328
%329 = add nuw nsw i64 %321, 1
%330 = add i64 %322, 1
%331 = icmp eq i64 %330, %313
br i1 %331, label %332, label %320
332: ; preds = %320, %317
%333 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.6, i64 0, i64 0))
br i1 %19, label %334, label %369
334: ; preds = %332
%335 = zext i32 %16 to i64
br label %371
336: ; preds = %336, %315
%337 = phi i64 [ 0, %315 ], [ %366, %336 ]
%338 = phi i64 [ 0, %315 ], [ %367, %336 ]
%339 = getelementptr inbounds double, double* %115, i64 %337
%340 = load double, double* %339
%341 = getelementptr inbounds i32, i32* %34, i64 %337
%342 = load i32, i32* %341
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds double, double* %113, i64 %343
store double %340, double* %344
%345 = or i64 %337, 1
%346 = getelementptr inbounds double, double* %115, i64 %345
%347 = load double, double* %346
%348 = getelementptr inbounds i32, i32* %34, i64 %345
%349 = load i32, i32* %348
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds double, double* %113, i64 %350
store double %347, double* %351
%352 = or i64 %337, 2
%353 = getelementptr inbounds double, double* %115, i64 %352
%354 = load double, double* %353
%355 = getelementptr inbounds i32, i32* %34, i64 %352
%356 = load i32, i32* %355
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds double, double* %113, i64 %357
store double %354, double* %358
%359 = or i64 %337, 3
%360 = getelementptr inbounds double, double* %115, i64 %359
%361 = load double, double* %360
%362 = getelementptr inbounds i32, i32* %34, i64 %359
%363 = load i32, i32* %362
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds double, double* %113, i64 %364
store double %361, double* %365
%366 = add nuw nsw i64 %337, 4
%367 = add i64 %338, 4
%368 = icmp eq i64 %367, %316
br i1 %368, label %317, label %336
369: ; preds = %371, %308, %332
%370 = tail call i32 @putchar(i8 signext 10)
ret i32 0
371: ; preds = %334, %371
%372 = phi i64 [ 0, %334 ], [ %376, %371 ]
%373 = getelementptr inbounds double, double* %113, i64 %372
%374 = load double, double* %373
%375 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %374)
%376 = add nuw nsw i64 %372, 1
%377 = icmp eq i64 %376, %335
br i1 %377, label %369, label %371
}