int main(int argc, char *argv[]) {
  int *next, *prev;
  double *halves, *n_vec, *opt, *d_vec;
  int *perm, r;
  int m, d, i, j, k;
  int status = 3, type;
  double *work;
  int repeat;
  if (argc > 1) {
    repeat = atoi(argv[1]);
  } else {
    repeat = 1;
  }
  if (read_lp(&halves, &d, &m, &n_vec, &d_vec, &type)) {
    perm = (int *)malloc((unsigned)(m - 1) * sizeof(int));
    next = (int *)malloc((unsigned)(m) * sizeof(int));
    prev = (int *)malloc((unsigned)(m) * sizeof(int));
    printf("dimension: %d, number of planes: %d, repeat: %d\n", d, m, repeat);
    opt = (double *)malloc((unsigned)(d + 1) * sizeof(double));
    work = (double *)malloc((unsigned)(m + 3) * (d + 2) * (d - 1) / 2 *
                            sizeof(double));
    for (r = 0; r < repeat; r++) {
      randperm(m - 1, perm);
      prev[0] = 1234567890;
      next[0] = perm[0] + 1;
      prev[perm[0] + 1] = 0;
      for (i = 0; i < m - 2; i++) {
        next[perm[i] + 1] = perm[i + 1] + 1;
        prev[perm[i + 1] + 1] = perm[i] + 1;
      }
      next[perm[m - 2] + 1] = m;
      status =
          dlinprog(halves, 0, m, n_vec, d_vec, d, opt, work, next, prev, m);
    }
    switch (status) {
    case 0:
      (void)printf("no feasible solution\n");
      break;
    case 1:
      (void)printf("minimum attained at\n");
      break;
    case 2:
      (void)printf("region is unbounded: last vertex is\n");
      break;
    case 3:
      (void)printf("region is bounded by plane orthogonal\n");
      (void)printf("to minimization vector: one vertex is\n");
      break;
    default:
      (void)printf("unknown case returned from linprog\n");
    }
    if (status != 0) {
      if (type == 1) {
        (void)printf("(");
        for (i = 0; i < d; i++) {
          if (opt[d] == 0.0) {
            (void)printf("%f", opt[i]);
          } else {
            (void)printf("%f", opt[i] / opt[d]);
          }
          if (i != d - 1)
            (void)printf(",");
        }
        (void)printf(")\n");
        if (opt[d] == 0.0)
          (void)printf("at infinite\n");
        for (j = 0; j != m; j = next[j]) {
          double val = 0.0;
          for (k = 0; k <= d; k++)
            val += opt[k] * halves[j * (d + 1) + k];
          if (val < -d * 2.0e-16) {
            printf("error\n");
            exit(1);
          }
        }
      } else {
        (void)printf("(");
        for (i = 0; i <= d; i++) {
          (void)printf("%f", opt[i]);
          if (i != d)
            (void)printf(",");
        }
        (void)printf(")\n");
      }
    }
    free((char *)halves);
    free((char *)next);
    free((char *)prev);
    free((char *)perm);
    free((char *)n_vec);
    free((char *)opt);
    free((char *)work);
  } else {
    (void)printf("parse error\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xb0,%rsp
movl   $0x0,-0x14(%rbp)
mov    %edi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movl   $0x3,-0x74(%rbp)
cmpl   $0x1,-0x18(%rbp)
jle    11c7 <main+0x47>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1070 <atoi@plt>
mov    %eax,-0x84(%rbp)
jmp    11d1 <main+0x51>
movl   $0x1,-0x84(%rbp)
lea    -0x38(%rbp),%rdi
lea    -0x64(%rbp),%rsi
lea    -0x60(%rbp),%rdx
lea    -0x40(%rbp),%rcx
lea    -0x50(%rbp),%r8
lea    -0x78(%rbp),%r9
mov    $0x0,%al
call   10a0 <read_lp@plt>
cmp    $0x0,%eax
je     1714 <main+0x594>
mov    -0x60(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,%edi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,%edi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x64(%rbp),%esi
mov    -0x60(%rbp),%edx
mov    -0x84(%rbp),%ecx
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x60(%rbp),%eax
add    $0x3,%eax
mov    -0x64(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
shr    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    13db <main+0x25b>
mov    -0x60(%rbp),%edi
sub    $0x1,%edi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1090 <randperm@plt>
mov    -0x30(%rbp),%rax
movl   $0x499602d2,(%rax)
mov    -0x58(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    -0x60(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    1364 <main+0x1e4>
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    -0x28(%rbp),%rax
mov    -0x58(%rbp),%rcx
movslq -0x68(%rbp),%rsi
mov    (%rcx,%rsi,4),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    -0x68(%rbp),%esi
add    $0x1,%esi
movslq %esi,%rsi
mov    (%rcx,%rsi,4),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    12ef <main+0x16f>
mov    -0x60(%rbp),%edx
mov    -0x28(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    -0x60(%rbp),%esi
sub    $0x2,%esi
movslq %esi,%rsi
mov    (%rcx,%rsi,4),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%rdi
mov    -0x60(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x64(%rbp),%r9d
mov    -0x48(%rbp),%r14
mov    -0x80(%rbp),%rbx
mov    -0x28(%rbp),%r11
mov    -0x30(%rbp),%r10
mov    -0x60(%rbp),%eax
xor    %esi,%esi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x0,%al
call   1060 <dlinprog@plt>
mov    %eax,-0x74(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1298 <main+0x118>
mov    -0x74(%rbp),%eax
mov    %rax,-0x98(%rbp)
sub    $0x3,%rax
ja     1460 <main+0x2e0>
mov    -0x98(%rbp),%rax
lea    0xc0b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xc3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    146e <main+0x2ee>
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    146e <main+0x2ee>
lea    0xc41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    146e <main+0x2ee>
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    146e <main+0x2ee>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x74(%rbp)
je     16d0 <main+0x550>
cmpl   $0x1,-0x78(%rbp)
jne    1654 <main+0x4d4>
lea    0xc82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    153d <main+0x3bd>
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14e3 <main+0x363>
jp     14e3 <main+0x363>
mov    -0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc36(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    150b <main+0x38b>
mov    -0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
lea    0xc09(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x68(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     152a <main+0x3aa>
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    152f <main+0x3af>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1497 <main+0x317>
lea    0xbce(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1579 <main+0x3f9>
jp     1579 <main+0x3f9>
lea    0xba3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x60(%rbp),%eax
je     164f <main+0x4cf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x64(%rbp),%eax
jg     15f8 <main+0x478>
mov    -0x48(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mov    -0x64(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    159e <main+0x41e>
movsd  -0x90(%rbp),%xmm1
ff
xor    %eax,%eax
sub    -0x64(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0x9ef(%rip),%xmm2
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1637 <main+0x4b7>
lea    0xb02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    163c <main+0x4bc>
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x6c(%rbp)
jmp    1580 <main+0x400>
jmp    16cb <main+0x54b>
lea    0xab0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jg     16bd <main+0x53d>
mov    -0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xa84(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
je     16aa <main+0x52a>
lea    0xa6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16af <main+0x52f>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1669 <main+0x4e9>
lea    0xa4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16d0 <main+0x550>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
jmp    1722 <main+0x5a2>
lea    0xa07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     11c5 <main+0x25>
mov    0x8(%rsi),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,%ebp
lea    0x18(%rsp),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x40(%rsp),%r8
lea    0x24(%rsp),%r9
xor    %eax,%eax
call   10c0 <read_lp@plt>
test   %eax,%eax
je     13db <main+0x23b>
mov    0x4(%rsp),%r13d
lea    -0x1(%r13),%edi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %r13,%rbx
shl    $0x2,%rbx
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    (%rsp),%esi
lea    0xdf8(%rip),%rdi
mov    %r13d,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebp,0x10(%rsp)
mov    (%rsp),%ebp
lea    0x1(%rbp),%edi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    0x4(%rsp),%r13d
lea    0x3(%r13),%eax
lea    0x2(%rbp),%ecx
add    $0xffffffff,%ebp
imul   %ecx,%ebp
imul   %eax,%ebp
shr    %ebp
shl    $0x3,%rbp
mov    %rbp,%rdi
mov    0x10(%rsp),%ebp
call   1070 <malloc@plt>
test   %ebp,%ebp
mov    %rax,0x8(%rsp)
jle    13ec <main+0x24c>
mov    %rax,%rbx
xor    %r15d,%r15d
nopl   0x0(%rax)
add    $0xffffffff,%r13d
mov    %r13d,%edi
mov    0x30(%rsp),%r13
mov    %r13,%rsi
xor    %eax,%eax
call   10b0 <randperm@plt>
mov    0x28(%rsp),%r10
movl   $0x499602d2,(%r10)
movslq 0x0(%r13),%rax
lea    0x1(%rax),%rcx
mov    %ecx,(%r12)
movl   $0x0,0x4(%r10,%rax,4)
mov    0x4(%rsp),%edx
lea    -0x2(%rdx),%r9d
cmp    $0x3,%edx
jl     135d <main+0x1bd>
mov    %r9d,%r8d
cmp    $0x1,%r9d
jne    12f0 <main+0x150>
xor    %edi,%edi
jmp    1335 <main+0x195>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r8d,%esi
and    $0xfffffffe,%esi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movslq 0x4(%r13,%rdi,4),%rcx
lea    0x1(%rcx),%rbx
movslq %eax,%rbp
add    $0x1,%eax
mov    %ebx,0x4(%r12,%rbp,4)
mov    %eax,0x4(%r10,%rcx,4)
movslq 0x8(%r13,%rdi,4),%rax
add    $0x2,%rdi
lea    0x1(%rax),%rbp
mov    %ebp,0x4(%r12,%rcx,4)
mov    %ebx,0x4(%r10,%rax,4)
cmp    %rdi,%rsi
jne    1300 <main+0x160>
test   $0x1,%r8b
mov    0x8(%rsp),%rbx
mov    0x10(%rsp),%ebp
je     135d <main+0x1bd>
movslq 0x4(%r13,%rdi,4),%rcx
lea    0x1(%rcx),%rsi
movslq %eax,%rdi
add    $0x1,%eax
mov    %esi,0x4(%r12,%rdi,4)
mov    %eax,0x4(%r10,%rcx,4)
movslq %r9d,%rax
movslq 0x0(%r13,%rax,4),%rax
mov    %edx,0x4(%r12,%rax,4)
mov    0x18(%rsp),%rdi
mov    0x38(%rsp),%rcx
mov    0x40(%rsp),%r8
mov    (%rsp),%r9d
sub    $0x8,%rsp
xor    %esi,%esi
xor    %eax,%eax
push   %rdx
push   %r10
push   %r12
push   %rbx
push   %r14
call   1080 <dlinprog@plt>
add    $0x30,%rsp
add    $0x1,%r15d
cmp    %ebp,%r15d
je     13a9 <main+0x209>
mov    0x4(%rsp),%r13d
jmp    1290 <main+0xf0>
cmp    $0x3,%eax
ja     16cd <main+0x52d>
lea    0xd2d(%rip),%rdi
lea    0xd3a(%rip),%r15
mov    %eax,%eax
lea    0xc4f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xce9(%rip),%rdi
jmp    13ff <main+0x25f>
lea    0xc7a(%rip),%rdi
call   1050 <puts@plt>
jmp    16bc <main+0x51c>
lea    0xc75(%rip),%rdi
call   1050 <puts@plt>
lea    0xc8f(%rip),%rdi
call   1050 <puts@plt>
mov    0x24(%rsp),%ebx
mov    $0x28,%edi
call   1040 <putchar@plt>
mov    (%rsp),%eax
cmp    $0x1,%ebx
jne    14ab <main+0x30b>
test   %eax,%eax
mov    0x8(%rsp),%rbx
jle    1509 <main+0x369>
xor    %ebp,%ebp
lea    0xc25(%rip),%r13
jmp    1450 <main+0x2b0>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
movslq %eax,%rcx
cmp    %rcx,%rbp
jge    1509 <main+0x369>
cltq
movsd  (%r14,%rax,8),%xmm1
movsd  (%r14,%rbp,8),%xmm0
movapd %xmm1,%xmm2
cmpeqsd 0xba5(%rip),%xmm2
movapd %xmm2,%xmm3
andnpd %xmm1,%xmm3
movsd  0xb85(%rip),%xmm1
andpd  %xmm1,%xmm2
orpd   %xmm3,%xmm2
divsd  %xmm2,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    %rcx,%rbp
je     1440 <main+0x2a0>
mov    $0x2c,%edi
call   1040 <putchar@plt>
mov    (%rsp),%eax
jmp    1440 <main+0x2a0>
lea    0xc02(%rip),%r15
test   %eax,%eax
js     166f <main+0x4cf>
xor    %r13d,%r13d
lea    0xb95(%rip),%rbp
mov    0x8(%rsp),%rbx
jmp    14e2 <main+0x342>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r13),%rcx
cltq
cmp    %rax,%r13
mov    %rcx,%r13
jge    1674 <main+0x4d4>
movsd  (%r14,%r13,8),%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    (%rsp),%eax
cmp    %rax,%r13
je     14d0 <main+0x330>
mov    $0x2c,%edi
call   1040 <putchar@plt>
mov    (%rsp),%eax
jmp    14d0 <main+0x330>
lea    0xba4(%rip),%rdi
call   1050 <puts@plt>
movslq (%rsp),%rax
movsd  (%r14,%rax,8),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1537 <main+0x397>
jp     1537 <main+0x397>
lea    0xb84(%rip),%rdi
call   1050 <puts@plt>
mov    0x4(%rsp),%r13d
test   %r13d,%r13d
je     167c <main+0x4dc>
mov    (%rsp),%r8d
mov    0x18(%rsp),%r15
mov    %r8d,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0x1(%r8),%r11d
mulsd  0xaa2(%rip),%xmm0
lea    -0x1(%r11),%r10
mov    %r11d,%esi
and    $0x3,%esi
mov    %r11d,%ebp
and    $0xfffffffc,%ebp
lea    0x18(%r15),%rax
mov    %rax,0x10(%rsp)
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %r8d,%r8d
js     15b0 <main+0x410>
mov    %r11d,%eax
imul   %edi,%eax
movslq %eax,%rdx
cmp    $0x3,%r10
jae    15c0 <main+0x420>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
jmp    161f <main+0x47f>
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
jmp    1657 <main+0x4b7>
nopl   0x0(%rax)
mov    0x10(%rsp),%rax
lea    (%rax,%rdx,8),%r9
xorpd  %xmm1,%xmm1
xor    %eax,%eax
nop
movsd  (%r14,%rax,8),%xmm2
movsd  0x8(%r14,%rax,8),%xmm3
mulsd  -0x18(%r9,%rax,8),%xmm2
mulsd  -0x10(%r9,%rax,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x10(%r14,%rax,8),%xmm4
mulsd  -0x8(%r9,%rax,8),%xmm4
addsd  %xmm2,%xmm3
movsd  0x18(%r14,%rax,8),%xmm1
mulsd  (%r9,%rax,8),%xmm1
addsd  %xmm3,%xmm4
addsd  %xmm4,%xmm1
add    $0x4,%rax
cmp    %rax,%rbp
jne    15d0 <main+0x430>
test   %rsi,%rsi
je     1657 <main+0x4b7>
add    %rax,%rdx
lea    (%r15,%rdx,8),%rdx
lea    (%r14,%rax,8),%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rcx,8),%xmm2
mulsd  (%rdx,%rcx,8),%xmm2
addsd  %xmm2,%xmm1
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1640 <main+0x4a0>
ucomisd %xmm1,%xmm0
ja     16d9 <main+0x539>
movslq %edi,%rax
mov    (%r12,%rax,4),%edi
cmp    %r13d,%edi
jne    1590 <main+0x3f0>
jmp    167c <main+0x4dc>
mov    0x8(%rsp),%rbx
mov    %r15,%rdi
call   1050 <puts@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa3b(%rip),%rdi
jmp    13ff <main+0x25f>
lea    0x982(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"dimension: %d, number of planes: %d, repeat: %d\0A\00"
@.str.1 = [22 x i8] c"no feasible solution\0A\00"
@.str.2 = [21 x i8] c"minimum attained at\0A\00"
@.str.3 = [37 x i8] c"region is unbounded: last vertex is\0A\00"
@.str.4 = [39 x i8] c"region is bounded by plane orthogonal\0A\00"
@.str.5 = [39 x i8] c"to minimization vector: one vertex is\0A\00"
@.str.6 = [36 x i8] c"unknown case returned from linprog\0A\00"
@.str.7 = [2 x i8] c"(\00"
@.str.8 = [3 x i8] c"%f\00"
@.str.9 = [2 x i8] c",\00"
@.str.10 = [3 x i8] c")\0A\00"
@.str.11 = [13 x i8] c"at infinite\0A\00"
@.str.12 = [7 x i8] c"error\0A\00"
@.str.13 = [13 x i8] c"parse error\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 double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double*
%22 = alloca i32
%23 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %19
%24 = load i32, i32* %4
%25 = icmp sgt i32 %24, 1
br i1 %25, label %26, label %31
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %29)
store i32 %30, i32* %22
br label %32
31: ; preds = %2
store i32 1, i32* %22
br label %32
32: ; preds = %31, %26
%33 = call i32 (double**, i32*, i32*, double**, double**, i32*, ...) bitcast (i32 (...)* @read_lp to i32 (double**, i32*, i32*, double**, double**, i32*, ...)*)(double** %8, i32* %15, i32* %14, double** %9, double** %11, i32* %20)
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %327
35: ; preds = %32
%36 = load i32, i32* %14
%37 = sub nsw i32 %36, 1
%38 = zext i32 %37 to i64
%39 = mul i64 %38, 4
%40 = call i8* @malloc(i64 %39)
%41 = bitcast i8* %40 to i32*
store i32* %41, i32** %12
%42 = load i32, i32* %14
%43 = zext i32 %42 to i64
%44 = mul i64 %43, 4
%45 = call i8* @malloc(i64 %44)
%46 = bitcast i8* %45 to i32*
store i32* %46, i32** %6
%47 = load i32, i32* %14
%48 = zext i32 %47 to i64
%49 = mul i64 %48, 4
%50 = call i8* @malloc(i64 %49)
%51 = bitcast i8* %50 to i32*
store i32* %51, i32** %7
%52 = load i32, i32* %15
%53 = load i32, i32* %14
%54 = load i32, i32* %22
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %52, i32 %53, i32 %54)
%56 = load i32, i32* %15
%57 = add nsw i32 %56, 1
%58 = zext i32 %57 to i64
%59 = mul i64 %58, 8
%60 = call i8* @malloc(i64 %59)
%61 = bitcast i8* %60 to double*
store double* %61, double** %10
%62 = load i32, i32* %14
%63 = add nsw i32 %62, 3
%64 = load i32, i32* %15
%65 = add nsw i32 %64, 2
%66 = mul i32 %63, %65
%67 = load i32, i32* %15
%68 = sub nsw i32 %67, 1
%69 = mul i32 %66, %68
%70 = udiv i32 %69, 2
%71 = zext i32 %70 to i64
%72 = mul i64 %71, 8
%73 = call i8* @malloc(i64 %72)
%74 = bitcast i8* %73 to double*
store double* %74, double** %21
store i32 0, i32* %13
br label %75
75: ; preds = %163, %35
%76 = load i32, i32* %13
%77 = load i32, i32* %22
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %166
79: ; preds = %75
%80 = load i32, i32* %14
%81 = sub nsw i32 %80, 1
%82 = load i32*, i32** %12
%83 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @randperm to i32 (i32, i32*, ...)*)(i32 %81, i32* %82)
%84 = load i32*, i32** %7
%85 = getelementptr inbounds i32, i32* %84, i64 0
store i32 1234567890, i32* %85
%86 = load i32*, i32** %12
%87 = getelementptr inbounds i32, i32* %86, i64 0
%88 = load i32, i32* %87
%89 = add nsw i32 %88, 1
%90 = load i32*, i32** %6
%91 = getelementptr inbounds i32, i32* %90, i64 0
store i32 %89, i32* %91
%92 = load i32*, i32** %7
%93 = load i32*, i32** %12
%94 = getelementptr inbounds i32, i32* %93, i64 0
%95 = load i32, i32* %94
%96 = add nsw i32 %95, 1
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %92, i64 %97
store i32 0, i32* %98
store i32 0, i32* %16
br label %99
99: ; preds = %137, %79
%100 = load i32, i32* %16
%101 = load i32, i32* %14
%102 = sub nsw i32 %101, 2
%103 = icmp slt i32 %100, %102
br i1 %103, label %104, label %140
104: ; preds = %99
%105 = load i32*, i32** %12
%106 = load i32, i32* %16
%107 = add nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i32, i32* %105, i64 %108
%110 = load i32, i32* %109
%111 = add nsw i32 %110, 1
%112 = load i32*, i32** %6
%113 = load i32*, i32** %12
%114 = load i32, i32* %16
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %113, i64 %115
%117 = load i32, i32* %116
%118 = add nsw i32 %117, 1
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i32, i32* %112, i64 %119
store i32 %111, i32* %120
%121 = load i32*, i32** %12
%122 = load i32, i32* %16
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %121, i64 %123
%125 = load i32, i32* %124
%126 = add nsw i32 %125, 1
%127 = load i32*, i32** %7
%128 = load i32*, i32** %12
%129 = load i32, i32* %16
%130 = add nsw i32 %129, 1
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i32, i32* %128, i64 %131
%133 = load i32, i32* %132
%134 = add nsw i32 %133, 1
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %127, i64 %135
store i32 %126, i32* %136
br label %137
137: ; preds = %104
%138 = load i32, i32* %16
%139 = add nsw i32 %138, 1
store i32 %139, i32* %16
br label %99
140: ; preds = %99
%141 = load i32, i32* %14
%142 = load i32*, i32** %6
%143 = load i32*, i32** %12
%144 = load i32, i32* %14
%145 = sub nsw i32 %144, 2
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i32, i32* %143, i64 %146
%148 = load i32, i32* %147
%149 = add nsw i32 %148, 1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %142, i64 %150
store i32 %141, i32* %151
%152 = load double*, double** %8
%153 = load i32, i32* %14
%154 = load double*, double** %9
%155 = load double*, double** %11
%156 = load i32, i32* %15
%157 = load double*, double** %10
%158 = load double*, double** %21
%159 = load i32*, i32** %6
%160 = load i32*, i32** %7
%161 = load i32, i32* %14
%162 = call i32 (double*, i32, i32, double*, double*, i32, double*, double*, i32*, i32*, i32, ...) bitcast (i32 (...)* @dlinprog to i32 (double*, i32, i32, double*, double*, i32, double*, double*, i32*, i32*, i32, ...)*)(double* %152, i32 0, i32 %153, double* %154, double* %155, i32 %156, double* %157, double* %158, i32* %159, i32* %160, i32 %161)
store i32 %162, i32* %19
br label %163
163: ; preds = %140
%164 = load i32, i32* %13
%165 = add nsw i32 %164, 1
store i32 %165, i32* %13
br label %75
166: ; preds = %75
%167 = load i32, i32* %19
switch i32 %167, label %177 [
i32 0, label %168
i32 1, label %170
i32 2, label %172
i32 3, label %174
]
168: ; preds = %166
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %179
170: ; preds = %166
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %179
172: ; preds = %166
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %179
174: ; preds = %166
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
br label %179
177: ; preds = %166
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %179
179: ; preds = %177, %174, %172, %170, %168
%180 = load i32, i32* %19
%181 = icmp ne i32 %180, 0
br i1 %181, label %182, label %312
182: ; preds = %179
%183 = load i32, i32* %20
%184 = icmp eq i32 %183, 1
br i1 %184, label %185, label %287
185: ; preds = %182
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %16
br label %187
187: ; preds = %226, %185
%188 = load i32, i32* %16
%189 = load i32, i32* %15
%190 = icmp slt i32 %188, %189
br i1 %190, label %191, label %229
191: ; preds = %187
%192 = load double*, double** %10
%193 = load i32, i32* %15
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
%196 = load double, double* %195
%197 = fcmp oeq double %196, 0.000000e+00
br i1 %197, label %198, label %205
198: ; preds = %191
%199 = load double*, double** %10
%200 = load i32, i32* %16
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), double %203)
br label %218
205: ; preds = %191
%206 = load double*, double** %10
%207 = load i32, i32* %16
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %10
%212 = load i32, i32* %15
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = fdiv double %210, %215
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), double %216)
br label %218
218: ; preds = %205, %198
%219 = load i32, i32* %16
%220 = load i32, i32* %15
%221 = sub nsw i32 %220, 1
%222 = icmp ne i32 %219, %221
br i1 %222, label %223, label %225
223: ; preds = %218
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %225
225: ; preds = %223, %218
br label %226
226: ; preds = %225
%227 = load i32, i32* %16
%228 = add nsw i32 %227, 1
store i32 %228, i32* %16
br label %187
229: ; preds = %187
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%231 = load double*, double** %10
%232 = load i32, i32* %15
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds double, double* %231, i64 %233
%235 = load double, double* %234
%236 = fcmp oeq double %235, 0.000000e+00
br i1 %236, label %237, label %239
237: ; preds = %229
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
br label %239
239: ; preds = %237, %229
store i32 0, i32* %17
br label %240
240: ; preds = %280, %239
%241 = load i32, i32* %17
%242 = load i32, i32* %14
%243 = icmp ne i32 %241, %242
br i1 %243, label %244, label %286
244: ; preds = %240
store double 0.000000e+00, double* %23
store i32 0, i32* %18
br label %245
245: ; preds = %267, %244
%246 = load i32, i32* %18
%247 = load i32, i32* %15
%248 = icmp sle i32 %246, %247
br i1 %248, label %249, label %270
249: ; preds = %245
%250 = load double*, double** %10
%251 = load i32, i32* %18
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double, double* %250, i64 %252
%254 = load double, double* %253
%255 = load double*, double** %8
%256 = load i32, i32* %17
%257 = load i32, i32* %15
%258 = add nsw i32 %257, 1
%259 = mul nsw i32 %256, %258
%260 = load i32, i32* %18
%261 = add nsw i32 %259, %260
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds double, double* %255, i64 %262
%264 = load double, double* %263
%265 = load double, double* %23
%266 = call double @llvm.fmuladd.f64(double %254, double %264, double %265)
store double %266, double* %23
br label %267
267: ; preds = %249
%268 = load i32, i32* %18
%269 = add nsw i32 %268, 1
store i32 %269, i32* %18
br label %245
270: ; preds = %245
%271 = load double, double* %23
%272 = load i32, i32* %15
%273 = sub nsw i32 0, %272
%274 = sitofp i32 %273 to double
%275 = fmul double %274, 2.000000e-16
%276 = fcmp olt double %271, %275
br i1 %276, label %277, label %279
277: ; preds = %270
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
unreachable
279: ; preds = %270
br label %280
280: ; preds = %279
%281 = load i32*, i32** %6
%282 = load i32, i32* %17
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds i32, i32* %281, i64 %283
%285 = load i32, i32* %284
store i32 %285, i32* %17
br label %240
286: ; preds = %240
br label %311
287: ; preds = %182
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %16
br label %289
289: ; preds = %306, %287
%290 = load i32, i32* %16
%291 = load i32, i32* %15
%292 = icmp sle i32 %290, %291
br i1 %292, label %293, label %309
293: ; preds = %289
%294 = load double*, double** %10
%295 = load i32, i32* %16
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds double, double* %294, i64 %296
%298 = load double, double* %297
%299 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), double %298)
%300 = load i32, i32* %16
%301 = load i32, i32* %15
%302 = icmp ne i32 %300, %301
br i1 %302, label %303, label %305
303: ; preds = %293
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %305
305: ; preds = %303, %293
br label %306
306: ; preds = %305
%307 = load i32, i32* %16
%308 = add nsw i32 %307, 1
store i32 %308, i32* %16
br label %289
309: ; preds = %289
%310 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %311
311: ; preds = %309, %286
br label %312
312: ; preds = %311, %179
%313 = load double*, double** %8
%314 = bitcast double* %313 to i8*
%315 = load i32*, i32** %6
%316 = bitcast i32* %315 to i8*
%317 = load i32*, i32** %7
%318 = bitcast i32* %317 to i8*
%319 = load i32*, i32** %12
%320 = bitcast i32* %319 to i8*
%321 = load double*, double** %9
%322 = bitcast double* %321 to i8*
%323 = load double*, double** %10
%324 = bitcast double* %323 to i8*
%325 = load double*, double** %21
%326 = bitcast double* %325 to i8*
br label %329
327: ; preds = %32
%328 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %329
329: ; preds = %327, %312
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"dimension: %d, number of planes: %d, repeat: %d\0A\00"
@.str.8 = [3 x i8] c"%f\00"
@str = [12 x i8] c"parse error\00"
@str.14 = [38 x i8] c"region is bounded by plane orthogonal\00"
@str.15 = [38 x i8] c"to minimization vector: one vertex is\00"
@str.17 = [2 x i8] c")\00"
@str.18 = [6 x i8] c"error\00"
@str.19 = [12 x i8] c"at infinite\00"
@str.20 = [36 x i8] c"region is unbounded: last vertex is\00"
@str.21 = [20 x i8] c"minimum attained at\00"
@str.22 = [21 x i8] c"no feasible solution\00"
@str.23 = [35 x i8] c"unknown case returned from linprog\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast double** %3 to i8*
%10 = bitcast double** %4 to i8*
%11 = bitcast double** %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = bitcast i32* %7 to i8*
%14 = bitcast i32* %8 to i8*
%15 = icmp sgt i32 %0, 1
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %18)
br label %20
20: ; preds = %2, %16
%21 = phi i32 [ %19, %16 ], [ 1, %2 ]
%22 = call i32 (double**, i32*, i32*, double**, double**, i32*, ...) bitcast (i32 (...)* @read_lp to i32 (double**, i32*, i32*, double**, double**, i32*, ...)*)(double** %3, i32* %7, i32* %6, double** %4, double** %5, i32* %8)
%23 = icmp eq i32 %22, 0
br i1 %23, label %285, label %24
24: ; preds = %20
%25 = load i32, i32* %6
%26 = add nsw i32 %25, -1
%27 = zext i32 %26 to i64
%28 = shl nuw nsw i64 %27, 2
%29 = call i8* @malloc(i64 %28)
%30 = bitcast i8* %29 to i32*
%31 = zext i32 %25 to i64
%32 = shl nuw nsw i64 %31, 2
%33 = call i8* @malloc(i64 %32)
%34 = bitcast i8* %33 to i32*
%35 = call i8* @malloc(i64 %32)
%36 = bitcast i8* %35 to i32*
%37 = load i32, i32* %7
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %37, i32 %25, i32 %21)
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
%41 = zext i32 %40 to i64
%42 = shl nuw nsw i64 %41, 3
%43 = call i8* @malloc(i64 %42)
%44 = bitcast i8* %43 to double*
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 3
%47 = add nsw i32 %39, 2
%48 = add nsw i32 %39, -1
%49 = mul i32 %48, %47
%50 = mul i32 %49, %46
%51 = lshr i32 %50, 1
%52 = zext i32 %51 to i64
%53 = shl nuw nsw i64 %52, 3
%54 = call i8* @malloc(i64 %53)
%55 = bitcast i8* %54 to double*
%56 = icmp sgt i32 %21, 0
br i1 %56, label %57, label %131
57: ; preds = %24, %127
%58 = phi i32 [ %128, %127 ], [ %45, %24 ]
%59 = phi i32 [ %125, %127 ], [ 0, %24 ]
%60 = add nsw i32 %58, -1
%61 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @randperm to i32 (i32, i32*, ...)*)(i32 %60, i32* %30)
store i32 1234567890, i32* %36
%62 = load i32, i32* %30
%63 = add nsw i32 %62, 1
store i32 %63, i32* %34
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %36, i64 %64
store i32 0, i32* %65
%66 = load i32, i32* %6
%67 = add i32 %66, -2
%68 = icmp sgt i32 %66, 2
br i1 %68, label %69, label %113
69: ; preds = %57
%70 = zext i32 %67 to i64
%71 = and i64 %70, 1
%72 = icmp eq i32 %67, 1
br i1 %72, label %99, label %73
73: ; preds = %69
%74 = and i64 %70, 4294967294
br label %75
75: ; preds = %75, %73
%76 = phi i32 [ %62, %73 ], [ %90, %75 ]
%77 = phi i64 [ 0, %73 ], [ %88, %75 ]
%78 = phi i64 [ 0, %73 ], [ %97, %75 ]
%79 = or i64 %77, 1
%80 = getelementptr inbounds i32, i32* %30, i64 %79
%81 = load i32, i32* %80
%82 = add nsw i32 %81, 1
%83 = add nsw i32 %76, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32, i32* %34, i64 %84
store i32 %82, i32* %85
%86 = sext i32 %82 to i64
%87 = getelementptr inbounds i32, i32* %36, i64 %86
store i32 %83, i32* %87
%88 = add nuw nsw i64 %77, 2
%89 = getelementptr inbounds i32, i32* %30, i64 %88
%90 = load i32, i32* %89
%91 = add nsw i32 %90, 1
%92 = add nsw i32 %81, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %34, i64 %93
store i32 %91, i32* %94
%95 = sext i32 %91 to i64
%96 = getelementptr inbounds i32, i32* %36, i64 %95
store i32 %92, i32* %96
%97 = add i64 %78, 2
%98 = icmp eq i64 %97, %74
br i1 %98, label %99, label %75
99: ; preds = %75, %69
%100 = phi i32 [ %62, %69 ], [ %90, %75 ]
%101 = phi i64 [ 0, %69 ], [ %88, %75 ]
%102 = icmp eq i64 %71, 0
br i1 %102, label %113, label %103
103: ; preds = %99
%104 = add nuw nsw i64 %101, 1
%105 = getelementptr inbounds i32, i32* %30, i64 %104
%106 = load i32, i32* %105
%107 = add nsw i32 %106, 1
%108 = add nsw i32 %100, 1
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i32, i32* %34, i64 %109
store i32 %107, i32* %110
%111 = sext i32 %107 to i64
%112 = getelementptr inbounds i32, i32* %36, i64 %111
store i32 %108, i32* %112
br label %113
113: ; preds = %103, %99, %57
%114 = sext i32 %67 to i64
%115 = getelementptr inbounds i32, i32* %30, i64 %114
%116 = load i32, i32* %115
%117 = add nsw i32 %116, 1
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %34, i64 %118
store i32 %66, i32* %119
%120 = load double*, double** %3
%121 = load double*, double** %4
%122 = load double*, double** %5
%123 = load i32, i32* %7
%124 = call i32 (double*, i32, i32, double*, double*, i32, double*, double*, i32*, i32*, i32, ...) bitcast (i32 (...)* @dlinprog to i32 (double*, i32, i32, double*, double*, i32, double*, double*, i32*, i32*, i32, ...)*)(double* %120, i32 0, i32 %66, double* %121, double* %122, i32 %123, double* %44, double* %55, i32* %34, i32* %36, i32 %66)
%125 = add nuw nsw i32 %59, 1
%126 = icmp eq i32 %125, %21
br i1 %126, label %129, label %127
127: ; preds = %113
%128 = load i32, i32* %6
br label %57
129: ; preds = %113
switch i32 %124, label %133 [
i32 0, label %277
i32 1, label %134
i32 2, label %130
i32 3, label %131
]
130: ; preds = %129
br label %134
131: ; preds = %24, %129
%132 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.14, i64 0, i64 0))
br label %134
133: ; preds = %129
br label %134
134: ; preds = %129, %133, %131, %130
%135 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @str.23, i64 0, i64 0), %133 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @str.15, i64 0, i64 0), %131 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @str.20, i64 0, i64 0), %130 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.21, i64 0, i64 0), %129 ]
%136 = call i32 @puts(i8* dereferenceable(1) %135)
%137 = load i32, i32* %8
%138 = icmp eq i32 %137, 1
%139 = call i32 @putchar(i32 40)
%140 = load i32, i32* %7
br i1 %138, label %141, label %259
141: ; preds = %134
%142 = icmp sgt i32 %140, 0
br i1 %142, label %143, label %167
143: ; preds = %141, %162
%144 = phi i64 [ %164, %162 ], [ 0, %141 ]
%145 = phi i32 [ %163, %162 ], [ %140, %141 ]
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds double, double* %44, i64 %146
%148 = load double, double* %147
%149 = fcmp oeq double %148, 0.000000e+00
%150 = getelementptr inbounds double, double* %44, i64 %144
%151 = load double, double* %150
%152 = select i1 %149, double 1.000000e+00, double %148
%153 = fdiv double %151, %152
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), double %153)
%155 = load i32, i32* %7
%156 = add nsw i32 %155, -1
%157 = zext i32 %156 to i64
%158 = icmp eq i64 %144, %157
br i1 %158, label %162, label %159
159: ; preds = %143
%160 = call i32 @putchar(i32 44)
%161 = load i32, i32* %7
br label %162
162: ; preds = %143, %159
%163 = phi i32 [ %155, %143 ], [ %161, %159 ]
%164 = add nuw nsw i64 %144, 1
%165 = sext i32 %163 to i64
%166 = icmp slt i64 %164, %165
br i1 %166, label %143, label %167
167: ; preds = %162, %141
%168 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.17, i64 0, i64 0))
%169 = load i32, i32* %7
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %44, i64 %170
%172 = load double, double* %171
%173 = fcmp oeq double %172, 0.000000e+00
br i1 %173, label %174, label %176
174: ; preds = %167
%175 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.19, i64 0, i64 0))
br label %176
176: ; preds = %174, %167
%177 = load i32, i32* %6
%178 = icmp eq i32 %177, 0
br i1 %178, label %280, label %179
179: ; preds = %176
%180 = load i32, i32* %7
%181 = icmp slt i32 %180, 0
%182 = load double*, double** %3
%183 = add i32 %180, 1
%184 = sub nsw i32 0, %180
%185 = sitofp i32 %184 to double
%186 = fmul double %185, 2.000000e-16
%187 = zext i32 %183 to i64
%188 = add nsw i64 %187, -1
%189 = and i64 %187, 3
%190 = icmp ult i64 %188, 3
%191 = and i64 %187, 4294967292
%192 = icmp eq i64 %189, 0
br label %193
193: ; preds = %179, %254
%194 = phi i32 [ 0, %179 ], [ %257, %254 ]
br i1 %181, label %249, label %195
195: ; preds = %193
%196 = mul nsw i32 %183, %194
%197 = sext i32 %196 to i64
br i1 %190, label %232, label %198
198: ; preds = %195, %198
%199 = phi i64 [ %229, %198 ], [ 0, %195 ]
%200 = phi double [ %228, %198 ], [ 0.000000e+00, %195 ]
%201 = phi i64 [ %230, %198 ], [ 0, %195 ]
%202 = getelementptr inbounds double, double* %44, i64 %199
%203 = load double, double* %202
%204 = add nsw i64 %199, %197
%205 = getelementptr inbounds double, double* %182, i64 %204
%206 = load double, double* %205
%207 = call double @llvm.fmuladd.f64(double %203, double %206, double %200)
%208 = or i64 %199, 1
%209 = getelementptr inbounds double, double* %44, i64 %208
%210 = load double, double* %209
%211 = add nsw i64 %208, %197
%212 = getelementptr inbounds double, double* %182, i64 %211
%213 = load double, double* %212
%214 = call double @llvm.fmuladd.f64(double %210, double %213, double %207)
%215 = or i64 %199, 2
%216 = getelementptr inbounds double, double* %44, i64 %215
%217 = load double, double* %216
%218 = add nsw i64 %215, %197
%219 = getelementptr inbounds double, double* %182, i64 %218
%220 = load double, double* %219
%221 = call double @llvm.fmuladd.f64(double %217, double %220, double %214)
%222 = or i64 %199, 3
%223 = getelementptr inbounds double, double* %44, i64 %222
%224 = load double, double* %223
%225 = add nsw i64 %222, %197
%226 = getelementptr inbounds double, double* %182, i64 %225
%227 = load double, double* %226
%228 = call double @llvm.fmuladd.f64(double %224, double %227, double %221)
%229 = add nuw nsw i64 %199, 4
%230 = add i64 %201, 4
%231 = icmp eq i64 %230, %191
br i1 %231, label %232, label %198
232: ; preds = %198, %195
%233 = phi double [ undef, %195 ], [ %228, %198 ]
%234 = phi i64 [ 0, %195 ], [ %229, %198 ]
%235 = phi double [ 0.000000e+00, %195 ], [ %228, %198 ]
br i1 %192, label %249, label %236
236: ; preds = %232, %236
%237 = phi i64 [ %246, %236 ], [ %234, %232 ]
%238 = phi double [ %245, %236 ], [ %235, %232 ]
%239 = phi i64 [ %247, %236 ], [ 0, %232 ]
%240 = getelementptr inbounds double, double* %44, i64 %237
%241 = load double, double* %240
%242 = add nsw i64 %237, %197
%243 = getelementptr inbounds double, double* %182, i64 %242
%244 = load double, double* %243
%245 = call double @llvm.fmuladd.f64(double %241, double %244, double %238)
%246 = add nuw nsw i64 %237, 1
%247 = add i64 %239, 1
%248 = icmp eq i64 %247, %189
br i1 %248, label %249, label %236
249: ; preds = %232, %236, %193
%250 = phi double [ 0.000000e+00, %193 ], [ %233, %232 ], [ %245, %236 ]
%251 = fcmp olt double %250, %186
br i1 %251, label %252, label %254
252: ; preds = %249
%253 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.18, i64 0, i64 0))
unreachable
254: ; preds = %249
%255 = sext i32 %194 to i64
%256 = getelementptr inbounds i32, i32* %34, i64 %255
%257 = load i32, i32* %256
%258 = icmp eq i32 %257, %177
br i1 %258, label %280, label %193
259: ; preds = %134
%260 = icmp slt i32 %140, 0
br i1 %260, label %277, label %261
261: ; preds = %259, %272
%262 = phi i64 [ %274, %272 ], [ 0, %259 ]
%263 = getelementptr inbounds double, double* %44, i64 %262
%264 = load double, double* %263
%265 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), double %264)
%266 = load i32, i32* %7
%267 = zext i32 %266 to i64
%268 = icmp eq i64 %262, %267
br i1 %268, label %272, label %269
269: ; preds = %261
%270 = call i32 @putchar(i32 44)
%271 = load i32, i32* %7
br label %272
272: ; preds = %261, %269
%273 = phi i32 [ %266, %261 ], [ %271, %269 ]
%274 = add nuw nsw i64 %262, 1
%275 = sext i32 %273 to i64
%276 = icmp slt i64 %262, %275
br i1 %276, label %261, label %277
277: ; preds = %272, %259, %129
%278 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0), %129 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.17, i64 0, i64 0), %259 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.17, i64 0, i64 0), %272 ]
%279 = call i32 @puts(i8* dereferenceable(1) %278)
br label %280
280: ; preds = %254, %277, %176
%281 = bitcast double** %3 to i8**
%282 = load i8*, i8** %281
%283 = bitcast double** %4 to i8**
%284 = load i8*, i8** %283
br label %287
285: ; preds = %20
%286 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %287
287: ; preds = %285, %280
ret i32 0
}