#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 /*<<< orphan*/ equiv;

/* Variables and functions */
int /*<<< orphan*/ f2xact(int *, int *, double *, int *, double *, double *,
                          double *, double *, double *, int /*<<< orphan*/,
                          int *, int *, int *, int *, int *, int *, int *,
                          int *, int /*<<< orphan*/, int *, int *,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int *, int *, int /*<<< orphan*/);
int /*<<< orphan*/ free(double *);
int iwork(int, int *, int, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ prterr(int, char *);
void fexact(int *nrow, int *ncol, double *table, int *ldtabl, double *expect,
            double *percnt, double *emin, double *prt, double *pre,
            int *workspace) {
  const int mult = 30;
  const double amiss = -12345.;
  int ikh;
  int nco, nro, ntot, numb, iiwk, irwk;
  int i, j, k, kk, ldkey, ldstp, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10;
  int i3a, i3b, i3c, i9a, iwkmax, iwkpt;
  double *equiv;
  iwkmax = 2 * (int)(*workspace / 2);
  equiv = (double *)malloc((iwkmax / 2) * sizeof(double));
  table -= *ldtabl + 1;
  iwkpt = 0;
  if (*nrow > *ldtabl)
    prterr(1, "NROW must be less than or equal to LDTABL.");
  ntot = 0;
  for (i = 1; i <= *nrow; ++i) {
    for (j = 1; j <= *ncol; ++j) {
      if (table[i + j * *ldtabl] < 0.)
        prterr(2, "All elements of TABLE must be positive.");
      ntot = (int)(ntot + table[i + j * *ldtabl]);
    }
  }
  if (ntot == 0) {
    prterr(3, "All elements of TABLE are zero.\n"
              "PRT and PRE are set to missing values.");
    *prt = amiss;
    *pre = amiss;
    goto L_End;
  }
  nco = ((*nrow) < (*ncol) ? (*ncol) : (*nrow));
  nro = *nrow + *ncol - nco;
  k = *nrow + *ncol + 1;
  kk = k * nco;
  ikh = ntot + 1;
  i1 = iwork(iwkmax, &iwkpt, ikh, 4);
  i2 = iwork(iwkmax, &iwkpt, nco, 2);
  i3 = iwork(iwkmax, &iwkpt, nco, 2);
  i3a = iwork(iwkmax, &iwkpt, nco, 2);
  i3b = iwork(iwkmax, &iwkpt, nro, 2);
  i3c = iwork(iwkmax, &iwkpt, nro, 2);
  ikh = ((k * 5 + (kk << 1)) < (nco * 7 + 800) ? (nco * 7 + 800)
                                               : (k * 5 + (kk << 1)));
  iiwk = iwork(iwkmax, &iwkpt, ikh, 2);
  ikh = ((nco + 401) < (k) ? (k) : (nco + 401));
  irwk = iwork(iwkmax, &iwkpt, ikh, 4);
  if (4 == 4) {
    numb = 18 + 10 * mult;
  } else {
    numb = (mult << 3) + 12;
  }
  ldkey = (iwkmax - iwkpt) / numb - 1;
  ldstp = mult * ldkey;
  ikh = ldkey << 1;
  i4 = iwork(iwkmax, &iwkpt, ikh, 2);
  ikh = ldkey << 1;
  i5 = iwork(iwkmax, &iwkpt, ikh, 2);
  ikh = ldstp << 1;
  i6 = iwork(iwkmax, &iwkpt, ikh, 4);
  ikh = ldstp * 6;
  i7 = iwork(iwkmax, &iwkpt, ikh, 2);
  ikh = ldkey << 1;
  i8 = iwork(iwkmax, &iwkpt, ikh, 4);
  ikh = ldkey << 1;
  i9 = iwork(iwkmax, &iwkpt, ikh, 4);
  ikh = ldkey << 1;
  i9a = iwork(iwkmax, &iwkpt, ikh, 4);
  ikh = ldkey << 1;
  i10 = iwork(iwkmax, &iwkpt, ikh, 2);
  f2xact(nrow, ncol, &table[*ldtabl + 1], ldtabl, expect, percnt, emin, prt,
         pre, (equiv) + i1, ((int *)equiv) + i2, ((int *)equiv) + i3,
         ((int *)equiv) + i3a, ((int *)equiv) + i3b, ((int *)equiv) + i3c,
         ((int *)equiv) + i4, &ldkey, ((int *)equiv) + i5, (equiv) + i6, &ldstp,
         ((int *)equiv) + i7, (equiv) + i8, (equiv) + i9, (equiv) + i9a,
         ((int *)equiv) + i10, ((int *)equiv) + iiwk, (equiv) + irwk);
L_End:
  free(equiv);
  return;
}


x86 assembly (clang, -O0):
<fexact>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movl   $0x1e,-0x5c(%rbp)
movsd  0xe65(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
mov    %eax,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0xe8(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0xdc(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    -0x48(%rbp),%rcx
cmp    (%rcx),%eax
jle    1226 <fexact+0xd6>
mov    $0x1,%edi
lea    0xde7(%rip),%rsi
call   1040 <prterr@plt>
movl   $0x0,-0x78(%rbp)
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x30(%rbp),%rcx
cmp    (%rcx),%eax
jg     12fa <fexact+0x1aa>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    -0x38(%rbp),%rcx
cmp    (%rcx),%eax
jg     12e1 <fexact+0x191>
mov    -0x40(%rbp),%rax
mov    -0x88(%rbp),%ecx
mov    -0x8c(%rbp),%edx
mov    -0x48(%rbp),%rsi
imul   (%rsi),%edx
add    %edx,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    12a0 <fexact+0x150>
mov    $0x2,%edi
lea    0xd98(%rip),%rsi
call   1040 <prterr@plt>
cvtsi2sdl -0x78(%rbp),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x88(%rbp),%ecx
mov    -0x8c(%rbp),%edx
mov    -0x48(%rbp),%rsi
imul   (%rsi),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x78(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1253 <fexact+0x103>
jmp    12e6 <fexact+0x196>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1237 <fexact+0xe7>
cmpl   $0x0,-0x78(%rbp)
jne    133a <fexact+0x1ea>
mov    $0x3,%edi
lea    0xd4b(%rip),%rsi
call   1040 <prterr@plt>
mov    0x18(%rbp),%rax
movsd  0xcdf(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
movsd  0xccf(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    199f <fexact+0x84f>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    -0x38(%rbp),%rcx
cmp    (%rcx),%eax
jge    135d <fexact+0x20d>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xec(%rbp)
jmp    1369 <fexact+0x219>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xec(%rbp)
mov    -0xec(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    -0x38(%rbp),%rcx
add    (%rcx),%eax
sub    -0x70(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    -0x38(%rbp),%rcx
add    (%rcx),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
imul   -0x70(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xa0(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x70(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xa4(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x70(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xa8(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x70(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xc8(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x74(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xcc(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x74(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xd0(%rbp)
imul   $0x5,-0x90(%rbp),%eax
mov    -0x94(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
imul   $0x7,-0x70(%rbp),%ecx
add    $0x320,%ecx
cmp    %ecx,%eax
jge    14aa <fexact+0x35a>
imul   $0x7,-0x70(%rbp),%eax
add    $0x320,%eax
mov    %eax,-0xf0(%rbp)
jmp    14c2 <fexact+0x372>
imul   $0x5,-0x90(%rbp),%eax
mov    -0x94(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0x80(%rbp)
mov    -0x70(%rbp),%eax
add    $0x191,%eax
cmp    -0x90(%rbp),%eax
jge    150d <fexact+0x3bd>
mov    -0x90(%rbp),%eax
mov    %eax,-0xf4(%rbp)
jmp    151b <fexact+0x3cb>
mov    -0x70(%rbp),%eax
add    $0x191,%eax
mov    %eax,-0xf4(%rbp)
mov    -0xf4(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0x84(%rbp)
movl   $0x13e,-0x7c(%rbp)
mov    -0xd8(%rbp),%eax
sub    -0xdc(%rbp),%eax
cltd
idivl  -0x7c(%rbp)
sub    $0x1,%eax
mov    %eax,-0x98(%rbp)
imul   $0x1e,-0x98(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xac(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xb0(%rbp)
mov    -0x9c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xb4(%rbp)
imul   $0x6,-0x9c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xb8(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xbc(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xc0(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xd4(%rbp)
mov    -0x98(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xd8(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    -0xdc(%rbp),%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,-0xc4(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    0x20(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xa0(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
mov    %eax,-0x144(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xa4(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x140(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xa8(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x138(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xc8(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x130(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xcc(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x128(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xd0(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x120(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xac(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x118(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xb0(%rbp),%r10
shl    $0x2,%r10
add    %r10,%rax
mov    %rax,-0x108(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xb4(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
mov    %eax,-0xfc(%rbp)
mov    -0xe8(%rbp),%r12
movslq -0xb8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r12
mov    -0xe8(%rbp),%rax
movslq -0xbc(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
mov    %eax,%r15d
mov    -0xe8(%rbp),%rax
movslq -0xc0(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
mov    %eax,%r14d
mov    -0xe8(%rbp),%rax
movslq -0xd4(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
mov    %eax,%ebx
mov    -0xe8(%rbp),%r11
movslq -0xc4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r11
mov    -0xe8(%rbp),%r10
movslq -0x80(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r10
mov    -0xe8(%rbp),%r13
movslq -0x84(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r13
mov    -0x160(%rbp),%rax
mov    %r13d,-0xf8(%rbp)
lea    -0x98(%rbp),%r13
mov    %r13,-0x110(%rbp)
lea    -0x9c(%rbp),%r13
mov    %rax,(%rsp)
mov    -0x158(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x150(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x144(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0x140(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x138(%rbp),%rax
mov    %rax,0x28(%rsp)
mov    -0x130(%rbp),%rax
mov    %rax,0x30(%rsp)
mov    -0x128(%rbp),%rax
mov    %rax,0x38(%rsp)
mov    -0x120(%rbp),%rax
mov    %rax,0x40(%rsp)
mov    -0x118(%rbp),%rax
mov    %rax,0x48(%rsp)
mov    -0x110(%rbp),%rax
mov    %rax,0x50(%rsp)
mov    -0x108(%rbp),%rax
mov    %rax,0x58(%rsp)
mov    -0xfc(%rbp),%eax
mov    %eax,0x60(%rsp)
mov    -0xf8(%rbp),%eax
mov    %r13,0x68(%rsp)
mov    %r12,0x70(%rsp)
mov    %r15d,0x78(%rsp)
mov    %r14d,0x80(%rsp)
mov    %ebx,0x88(%rsp)
mov    %r11,0x90(%rsp)
mov    %r10,0x98(%rsp)
mov    %eax,0xa0(%rsp)
call   1070 <f2xact@plt>
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<fexact>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9,0xa0(%rsp)
mov    %r8,0x98(%rsp)
mov    %rcx,%rbp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r12
mov    0xf8(%rsp),%rax
mov    (%rax),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
mov    %edi,0x8(%rsp)
sar    %edi
shl    $0x3,%edi
call   1060 <malloc@plt>
mov    %rax,%r15
mov    %rbp,0x60(%rsp)
mov    0x0(%rbp),%ebp
movl   $0x0,0x4(%rsp)
mov    %r12,0x58(%rsp)
mov    (%r12),%ecx
cmp    %ebp,%ecx
jle    11d4 <fexact+0x84>
lea    0xe3d(%rip),%rsi
mov    $0x1,%edi
call   1040 <prterr@plt>
mov    0x58(%rsp),%rax
mov    (%rax),%ecx
mov    %r15,0x78(%rsp)
test   %ecx,%ecx
jle    1606 <fexact+0x4b6>
not    %ebp
movslq %ebp,%rax
andl   $0xfffffffe,0x8(%rsp)
lea    (%r14,%rax,8),%r14
mov    (%rbx),%eax
mov    $0x1,%ebp
xor    %r15d,%r15d
xorpd  %xmm1,%xmm1
lea    0xe27(%rip),%r12
jmp    1220 <fexact+0xd0>
cs nopw 0x0(%rax,%rax,1)
mov    0x58(%rsp),%rcx
mov    (%rcx),%ecx
lea    0x1(%rbp),%edx
cmp    %ecx,%ebp
mov    %edx,%ebp
jge    1299 <fexact+0x149>
test   %eax,%eax
jle    1217 <fexact+0xc7>
mov    0x60(%rsp),%rcx
mov    (%rcx),%ecx
mov    $0x1,%r13d
jmp    125f <fexact+0x10f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
addsd  (%r14,%rdx,8),%xmm0
cvttsd2si %xmm0,%r15d
lea    0x1(%r13),%edx
cmp    %eax,%r13d
mov    %edx,%r13d
jge    1210 <fexact+0xc0>
mov    %ecx,%edx
imul   %r13d,%edx
add    %ebp,%edx
movslq %edx,%rdx
ucomisd (%r14,%rdx,8),%xmm1
jbe    1240 <fexact+0xf0>
mov    $0x2,%edi
mov    %r12,%rsi
call   1040 <prterr@plt>
xorpd  %xmm1,%xmm1
mov    0x60(%rsp),%rax
mov    (%rax),%ecx
mov    (%rbx),%eax
mov    %ecx,%edx
imul   %r13d,%edx
add    %ebp,%edx
movslq %edx,%rdx
jmp    1240 <fexact+0xf0>
test   %r15d,%r15d
je     1606 <fexact+0x4b6>
mov    %rbx,0x90(%rsp)
mov    (%rbx),%eax
cmp    %eax,%ecx
mov    %ecx,%ebp
cmovl  %eax,%ebp
lea    (%rax,%rcx,1),%r12d
sub    %ebp,%r12d
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x20(%rsp)
add    $0x1,%r15d
lea    0x4(%rsp),%r13
mov    0x8(%rsp),%ebx
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %rax,0x50(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x48(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x40(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x38(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r12d,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x30(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r12d,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x28(%rsp)
lea    0x5(%rbp,%rbp,1),%eax
mov    0x20(%rsp),%r15d
imul   %r15d,%eax
lea    0x0(,%rbp,8),%edx
sub    %ebp,%edx
add    $0x320,%edx
cmp    %edx,%eax
cmovge %eax,%edx
mov    %ebx,%edi
mov    %r13,%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x6c(%rsp)
add    $0x191,%ebp
cmp    %r15d,%ebp
cmovl  %r15d,%ebp
mov    %ebx,%edi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %rax,0x20(%rsp)
mov    %ebx,%eax
sub    0x4(%rsp),%eax
cltq
imul   $0x19c2d14f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
lea    (%rax,%rcx,1),%edx
lea    (%rax,%rcx,1),%ebp
add    $0xffffffff,%ebp
mov    %ebp,0x74(%rsp)
mov    %ebp,%eax
shl    $0x5,%eax
sub    %ebp,%eax
sub    %ebp,%eax
mov    %eax,0x70(%rsp)
lea    (%rdx,%rdx,1),%r15d
add    $0xfffffffe,%r15d
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x18(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x10(%rsp)
imul   $0x3c,%ebp,%edx
mov    %ebx,%edi
mov    %r13,%rsi
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %rax,0x88(%rsp)
imul   $0xb4,%ebp,%edx
mov    %ebx,%edi
mov    %r13,%rbp
mov    %r13,%rsi
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    %eax,0x68(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %rax,0x80(%rsp)
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x4,%ecx
call   1050 <iwork@plt>
mov    %eax,%r13d
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15d,%edx
mov    $0x2,%ecx
call   1050 <iwork@plt>
mov    0x60(%rsp),%rbx
movslq (%rbx),%rcx
lea    (%r14,%rcx,8),%rdx
add    $0x8,%rdx
mov    0x78(%rsp),%r15
mov    0x50(%rsp),%rcx
lea    (%r15,%rcx,8),%ecx
mov    %rcx,0x8(%rsp)
movslq 0x48(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x50(%rsp)
movslq 0x40(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x48(%rsp)
movslq 0x38(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x40(%rsp)
movslq 0x30(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x38(%rsp)
movslq 0x28(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x30(%rsp)
movslq 0x18(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x28(%rsp)
movslq 0x10(%rsp),%rcx
lea    (%r15,%rcx,4),%rcx
mov    %rcx,0x18(%rsp)
mov    0x88(%rsp),%rcx
lea    (%r15,%rcx,8),%ecx
mov    %rcx,0x10(%rsp)
movslq 0x68(%rsp),%rcx
lea    (%r15,%rcx,4),%r10
mov    0x80(%rsp),%rcx
lea    (%r15,%rcx,8),%r11d
lea    (%r15,%r12,8),%r12d
lea    (%r15,%r13,8),%ebp
cltq
lea    (%r15,%rax,4),%rax
movslq 0x6c(%rsp),%rcx
lea    (%r15,%rcx,4),%r13
mov    0x20(%rsp),%rcx
lea    (%r15,%rcx,8),%r14d
sub    $0x8,%rsp
mov    0x60(%rsp),%rdi
mov    0x98(%rsp),%rsi
mov    %rbx,%rcx
mov    0xa0(%rsp),%r8
mov    0xa8(%rsp),%r9
push   %r14
push   %r13
push   %rax
push   %rbp
push   %r12
push   %r11
push   %r10
lea    0xb0(%rsp),%rax
push   %rax
push   0x58(%rsp)
push   0x68(%rsp)
lea    0xcc(%rsp),%rax
push   %rax
push   0x88(%rsp)
push   0x98(%rsp)
push   0xa8(%rsp)
push   0xb8(%rsp)
push   0xc8(%rsp)
push   0xd8(%rsp)
push   0x98(%rsp)
push   0x188(%rsp)
push   0x188(%rsp)
push   0x188(%rsp)
call   1070 <f2xact@plt>
add    $0xb0,%rsp
jmp    163c <fexact+0x4ec>
lea    0xa46(%rip),%rsi
mov    $0x3,%edi
call   1040 <prterr@plt>
movabs $0xc0c81c8000000000,%rax
1c c8 c0
mov    0xe8(%rsp),%rcx
mov    %rax,(%rcx)
mov    0xf0(%rsp),%rcx
mov    %rax,(%rcx)
mov    0x78(%rsp),%r15
mov    %r15,%rdi
call   1030 <free@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [43 x i8] c"NROW must be less than or equal to LDTABL.\00"
@.str.1 = [40 x i8] c"All elements of TABLE must be positive.\00"
@.str.2 = [71 x i8] c"All elements of TABLE are zero.\0APRT and PRE are set to missing values.\00"
define void @fexact(i32* %0, i32* %1, double* %2, i32* %3, double* %4, double* %5, double* %6, double* %7, double* %8, i32* nocapture %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = bitcast i32* %11 to i8*
%15 = bitcast i32* %12 to i8*
%16 = bitcast i32* %13 to i8*
%17 = load i32, i32* %9
%18 = sdiv i32 %17, 2
%19 = shl nsw i32 %18, 1
%20 = shl i32 %18, 3
%21 = tail call i64 @malloc(i32 %20)
%22 = inttoptr i64 %21 to double*
%23 = load i32, i32* %3
%24 = xor i32 %23, -1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %2, i64 %25
store i32 0, i32* %13
%27 = load i32, i32* %0
%28 = icmp sgt i32 %27, %23
br i1 %28, label %29, label %32
29: ; preds = %10
%30 = tail call i32 @prterr(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%31 = load i32, i32* %0
br label %32
32: ; preds = %29, %10
%33 = phi i32 [ %31, %29 ], [ %27, %10 ]
%34 = icmp slt i32 %33, 1
br i1 %34, label %86, label %35
35: ; preds = %32
%36 = load i32, i32* %1
br label %37
37: ; preds = %35, %77
%38 = phi i32 [ %78, %77 ], [ %33, %35 ]
%39 = phi i32 [ %79, %77 ], [ %36, %35 ]
%40 = phi i32 [ %80, %77 ], [ %36, %35 ]
%41 = phi i32 [ %81, %77 ], [ 0, %35 ]
%42 = phi i32 [ %82, %77 ], [ 1, %35 ]
%43 = icmp slt i32 %40, 1
br i1 %43, label %77, label %44
44: ; preds = %37
%45 = load i32, i32* %3
br label %46
46: ; preds = %44, %64
%47 = phi i32 [ %66, %64 ], [ %39, %44 ]
%48 = phi i32 [ %67, %64 ], [ %45, %44 ]
%49 = phi i32 [ %72, %64 ], [ %41, %44 ]
%50 = phi i32 [ %73, %64 ], [ 1, %44 ]
%51 = mul nsw i32 %48, %50
%52 = add nsw i32 %51, %42
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %26, i64 %53
%55 = load double, double* %54
%56 = fcmp olt double %55, 0.000000e+00
br i1 %56, label %57, label %64
57: ; preds = %46
%58 = tail call i32 @prterr(i32 2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%59 = load i32, i32* %3
%60 = load i32, i32* %1
%61 = mul nsw i32 %59, %50
%62 = add nsw i32 %61, %42
%63 = sext i32 %62 to i64
br label %64
64: ; preds = %57, %46
%65 = phi i64 [ %63, %57 ], [ %53, %46 ]
%66 = phi i32 [ %60, %57 ], [ %47, %46 ]
%67 = phi i32 [ %59, %57 ], [ %48, %46 ]
%68 = sitofp i32 %49 to double
%69 = getelementptr inbounds double, double* %26, i64 %65
%70 = load double, double* %69
%71 = fadd double %70, %68
%72 = fptosi double %71 to i32
%73 = add nuw nsw i32 %50, 1
%74 = icmp slt i32 %50, %66
br i1 %74, label %46, label %75
75: ; preds = %64
%76 = load i32, i32* %0
br label %77
77: ; preds = %75, %37
%78 = phi i32 [ %38, %37 ], [ %76, %75 ]
%79 = phi i32 [ %39, %37 ], [ %66, %75 ]
%80 = phi i32 [ %40, %37 ], [ %66, %75 ]
%81 = phi i32 [ %41, %37 ], [ %72, %75 ]
%82 = add nuw nsw i32 %42, 1
%83 = icmp slt i32 %42, %78
br i1 %83, label %37, label %84
84: ; preds = %77
%85 = icmp eq i32 %81, 0
br i1 %85, label %86, label %88
86: ; preds = %32, %84
%87 = tail call i32 @prterr(i32 3, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.2, i64 0, i64 0))
store double -1.234500e+04, double* %7
store double -1.234500e+04, double* %8
br label %180
88: ; preds = %84
%89 = load i32, i32* %1
%90 = icmp slt i32 %78, %89
%91 = select i1 %90, i32 %89, i32 %78
%92 = add nsw i32 %89, %78
%93 = sub nsw i32 %92, %91
%94 = add nsw i32 %92, 1
%95 = add nsw i32 %81, 1
%96 = call i32 @iwork(i32 %19, i32* %13, i32 %95, i32 4)
%97 = call i32 @iwork(i32 %19, i32* %13, i32 %91, i32 2)
%98 = call i32 @iwork(i32 %19, i32* %13, i32 %91, i32 2)
%99 = call i32 @iwork(i32 %19, i32* %13, i32 %91, i32 2)
%100 = call i32 @iwork(i32 %19, i32* %13, i32 %93, i32 2)
%101 = call i32 @iwork(i32 %19, i32* %13, i32 %93, i32 2)
%102 = shl i32 %91, 1
%103 = add i32 %102, 5
%104 = mul i32 %103, %94
%105 = mul nsw i32 %91, 7
%106 = add nsw i32 %105, 800
%107 = icmp slt i32 %104, %106
%108 = select i1 %107, i32 %106, i32 %104
%109 = call i32 @iwork(i32 %19, i32* %13, i32 %108, i32 2)
%110 = add nsw i32 %91, 401
%111 = icmp slt i32 %110, %94
%112 = select i1 %111, i32 %94, i32 %110
%113 = call i32 @iwork(i32 %19, i32* %13, i32 %112, i32 4)
%114 = load i32, i32* %13
%115 = sub nsw i32 %19, %114
%116 = sdiv i32 %115, 318
%117 = add nsw i32 %116, -1
store i32 %117, i32* %11
%118 = mul nsw i32 %117, 30
store i32 %118, i32* %12
%119 = shl nsw i32 %117, 1
%120 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 2)
%121 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 2)
%122 = mul nsw i32 %117, 60
%123 = call i32 @iwork(i32 %19, i32* %13, i32 %122, i32 4)
%124 = mul nsw i32 %117, 180
%125 = call i32 @iwork(i32 %19, i32* %13, i32 %124, i32 2)
%126 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 4)
%127 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 4)
%128 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 4)
%129 = call i32 @iwork(i32 %19, i32* %13, i32 %119, i32 2)
%130 = load i32, i32* %3
%131 = add nsw i32 %130, 1
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %26, i64 %132
%134 = sext i32 %96 to i64
%135 = getelementptr inbounds double, double* %22, i64 %134
%136 = ptrtoint double* %135 to i64
%137 = trunc i64 %136 to i32
%138 = inttoptr i64 %21 to i32*
%139 = sext i32 %97 to i64
%140 = getelementptr inbounds i32, i32* %138, i64 %139
%141 = sext i32 %98 to i64
%142 = getelementptr inbounds i32, i32* %138, i64 %141
%143 = sext i32 %99 to i64
%144 = getelementptr inbounds i32, i32* %138, i64 %143
%145 = sext i32 %100 to i64
%146 = getelementptr inbounds i32, i32* %138, i64 %145
%147 = sext i32 %101 to i64
%148 = getelementptr inbounds i32, i32* %138, i64 %147
%149 = sext i32 %120 to i64
%150 = getelementptr inbounds i32, i32* %138, i64 %149
%151 = sext i32 %121 to i64
%152 = getelementptr inbounds i32, i32* %138, i64 %151
%153 = sext i32 %123 to i64
%154 = getelementptr inbounds double, double* %22, i64 %153
%155 = ptrtoint double* %154 to i64
%156 = trunc i64 %155 to i32
%157 = sext i32 %125 to i64
%158 = getelementptr inbounds i32, i32* %138, i64 %157
%159 = sext i32 %126 to i64
%160 = getelementptr inbounds double, double* %22, i64 %159
%161 = ptrtoint double* %160 to i64
%162 = trunc i64 %161 to i32
%163 = sext i32 %127 to i64
%164 = getelementptr inbounds double, double* %22, i64 %163
%165 = ptrtoint double* %164 to i64
%166 = trunc i64 %165 to i32
%167 = sext i32 %128 to i64
%168 = getelementptr inbounds double, double* %22, i64 %167
%169 = ptrtoint double* %168 to i64
%170 = trunc i64 %169 to i32
%171 = sext i32 %129 to i64
%172 = getelementptr inbounds i32, i32* %138, i64 %171
%173 = sext i32 %109 to i64
%174 = getelementptr inbounds i32, i32* %138, i64 %173
%175 = sext i32 %113 to i64
%176 = getelementptr inbounds double, double* %22, i64 %175
%177 = ptrtoint double* %176 to i64
%178 = trunc i64 %177 to i32
%179 = call i32 @f2xact(i32* %0, i32* %1, double* %133, i32* %3, double* %4, double* %5, double* %6, double* %7, double* %8, i32 %137, i32* %140, i32* %142, i32* %144, i32* %146, i32* %148, i32* %150, i32* %11, i32* %152, i32 %156, i32* %12, i32* %158, i32 %162, i32 %166, i32 %170, i32* %172, i32* %174, i32 %178)
br label %180
180: ; preds = %88, %86
%181 = call i32 @free(double* %22)
ret void
}