#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 */
double fabs(double);
void prediction_em(double *uam, int *nmethod, double *bet, double *gam,
                   double *dtime, int *ithermal, int *nk, double *veold,
                   double *v, int *iinc, int *idiscon, double *vold,
                   int *nactdof, int *mi) {
  int j, k, mt = mi[1] + 1, jstart;
  double dextrapol;
  uam[0] = 0.;
  uam[1] = 0.;
  if (*ithermal < 2) {
    jstart = 1;
  } else {
    jstart = 0;
  }
  if (*nmethod == 4) {
    for (k = 0; k < *nk; ++k) {
      for (j = jstart; j < mt; j++) {
        dextrapol = *dtime * veold[mt * k + j];
        if (fabs(dextrapol) > 100.)
          dextrapol = 100. * dextrapol / fabs(dextrapol);
        if (j == 0) {
          if ((fabs(dextrapol) > uam[1]) && (nactdof[mt * k] > 0)) {
            uam[1] = fabs(dextrapol);
          }
        }
        v[mt * k + j] = vold[mt * k + j] + dextrapol;
      }
    }
  } else {
    if (*iinc > 1) {
      for (k = 0; k < *nk; ++k) {
        for (j = jstart; j < mt; j++) {
          if (*idiscon == 0) {
            dextrapol = *dtime * veold[mt * k + j];
            if (fabs(dextrapol) > 100.)
              dextrapol = 100. * dextrapol / fabs(dextrapol);
            if (j == 0) {
              if ((fabs(dextrapol) > uam[1]) && (nactdof[mt * k] > 0)) {
                uam[1] = fabs(dextrapol);
              }
            }
            v[mt * k + j] = vold[mt * k + j] + dextrapol;
          } else {
            v[mt * k + j] = vold[mt * k + j];
          }
        }
      }
    } else {
      for (k = 0; k < *nk; ++k) {
        for (j = jstart; j < mt; j++) {
          v[mt * k + j] = vold[mt * k + j];
        }
      }
    }
  }
  *idiscon = 0;
  return;
}


x86 assembly (clang, -O0):
<prediction_em>:
push   %rbp
mov    %rsp,%rbp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x48(%rbp),%rax
mov    0x4(%rax),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x30(%rbp),%rax
cmpl   $0x2,(%rax)
jge    1179 <prediction_em+0x79>
movl   $0x1,-0x40(%rbp)
jmp    1180 <prediction_em+0x80>
movl   $0x0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x4,(%rax)
jne    12d6 <prediction_em+0x1d6>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    12d1 <prediction_em+0x1d1>
mov    -0x40(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12be <prediction_em+0x1be>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movaps 0xe2c(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe10(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1220 <prediction_em+0x120>
movsd  0xdfe(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movaps 0xdfd(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    127f <prediction_em+0x17f>
movsd  -0x48(%rbp),%xmm0
movaps 0xdda(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    127a <prediction_em+0x17a>
mov    0x40(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    127a <prediction_em+0x17a>
movsd  -0x48(%rbp),%xmm0
movaps 0xda3(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    127f <prediction_em+0x17f>
mov    0x38(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a9 <prediction_em+0xa9>
jmp    12c3 <prediction_em+0x1c3>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1194 <prediction_em+0x94>
jmp    14ee <prediction_em+0x3ee>
mov    0x28(%rbp),%rax
cmpl   $0x1,(%rax)
jle    146f <prediction_em+0x36f>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    146a <prediction_em+0x36a>
mov    -0x40(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1457 <prediction_em+0x357>
mov    0x30(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1418 <prediction_em+0x318>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movaps 0xcc9(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xcad(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1383 <prediction_em+0x283>
movsd  0xc9b(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movaps 0xc9a(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    13e2 <prediction_em+0x2e2>
movsd  -0x48(%rbp),%xmm0
movaps 0xc77(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    13dd <prediction_em+0x2dd>
mov    0x40(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    13dd <prediction_em+0x2dd>
movsd  -0x48(%rbp),%xmm0
movaps 0xc40(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13e2 <prediction_em+0x2e2>
mov    0x38(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1444 <prediction_em+0x344>
mov    0x38(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1449 <prediction_em+0x349>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ff <prediction_em+0x1ff>
jmp    145c <prediction_em+0x35c>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12ea <prediction_em+0x1ea>
jmp    14e9 <prediction_em+0x3e9>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    14e4 <prediction_em+0x3e4>
mov    -0x40(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    14d1 <prediction_em+0x3d1>
mov    0x38(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    148b <prediction_em+0x38b>
jmp    14d6 <prediction_em+0x3d6>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1476 <prediction_em+0x376>
jmp    14e9 <prediction_em+0x3e9>
jmp    14ee <prediction_em+0x3ee>
mov    0x30(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<prediction_em>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    0x68(%rsp),%r13
mov    0x60(%rsp),%r14
mov    0x48(%rsp),%r10
mov    0x40(%rsp),%rax
mov    0x38(%rsp),%rbp
mov    0x70(%rsp),%rcx
mov    0x4(%rcx),%ecx
mov    %rcx,-0x28(%rsp)
lea    0x1(%rcx),%edx
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rdi)
mov    (%r9),%ecx
xor    %ebx,%ebx
cmp    $0x2,%ecx
setl   %bl
mov    %ebx,-0x3c(%rsp)
cmpl   $0x4,(%rsi)
jne    1218 <prediction_em+0x118>
mov    0x0(%rbp),%r11d
test   %r11d,%r11d
jle    150c <prediction_em+0x40c>
xor    %r12d,%r12d
cmp    $0x2,%ecx
setl   %r12b
movslq %edx,%r15
mov    %edx,%ebp
lea    0x0(,%r15,8),%rsi
xor    %edx,%edx
movapd 0xe7f(%rip),%xmm0
movsd  0xe87(%rip),%xmm1
jmp    11a6 <prediction_em+0xa6>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
add    %rsi,%rax
add    %rsi,%r14
add    %rsi,%r10
cmp    %r11,%rdx
je     150c <prediction_em+0x40c>
mov    -0x3c(%rsp),%ecx
cmp    %ecx,-0x28(%rsp)
jl     1190 <prediction_em+0x90>
mov    %rdx,%rbx
imul   %r15,%rbx
mov    %r12,%rcx
jmp    11d5 <prediction_em+0xd5>
nopl   0x0(%rax)
addsd  (%r14,%rcx,8),%xmm2
movsd  %xmm2,(%r10,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rbp
je     1190 <prediction_em+0x90>
movsd  (%r8),%xmm2
mulsd  (%rax,%rcx,8),%xmm2
movapd %xmm2,%xmm3
andpd  %xmm0,%xmm3
ucomisd %xmm1,%xmm3
jbe    11f5 <prediction_em+0xf5>
mulsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
test   %rcx,%rcx
jne    11c0 <prediction_em+0xc0>
movapd %xmm2,%xmm3
andpd  %xmm0,%xmm3
ucomisd 0x8(%rdi),%xmm3
jbe    11c0 <prediction_em+0xc0>
cmpl   $0x0,0x0(%r13,%rbx,4)
jle    11c0 <prediction_em+0xc0>
movsd  %xmm3,0x8(%rdi)
jmp    11c0 <prediction_em+0xc0>
mov    0x50(%rsp),%rsi
cmpl   $0x1,(%rsi)
mov    0x0(%rbp),%esi
jle    131c <prediction_em+0x21c>
mov    %rsi,-0x30(%rsp)
test   %esi,%esi
jle    150c <prediction_em+0x40c>
xor    %esi,%esi
cmp    $0x2,%ecx
setl   %sil
mov    %rsi,-0x38(%rsp)
movslq %edx,%rbx
mov    %edx,%ebp
lea    0x0(,%rbx,8),%rcx
xor    %esi,%esi
movapd 0xda5(%rip),%xmm0
movsd  0xdad(%rip),%xmm1
xor    %r12d,%r12d
jmp    1288 <prediction_em+0x188>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
add    %rbx,%rsi
add    %rcx,%r14
add    %rcx,%rax
cmp    -0x30(%rsp),%r12
je     150c <prediction_em+0x40c>
mov    -0x3c(%rsp),%edx
cmp    %edx,-0x28(%rsp)
jl     1270 <prediction_em+0x170>
mov    0x58(%rsp),%rdx
mov    (%rdx),%r15d
mov    %r12,%rdx
imul   %rbx,%rdx
mov    -0x38(%rsp),%r11
jmp    12c9 <prediction_em+0x1c9>
nopl   0x0(%rax,%rax,1)
lea    (%rsi,%r11,1),%r9
movsd  (%r14,%r11,8),%xmm2
movsd  %xmm2,(%r10,%r9,8)
add    $0x1,%r11
cmp    %r11,%rbp
je     1270 <prediction_em+0x170>
test   %r15d,%r15d
jne    12b0 <prediction_em+0x1b0>
movsd  (%r8),%xmm2
mulsd  (%rax,%r11,8),%xmm2
movapd %xmm2,%xmm3
andpd  %xmm0,%xmm3
ucomisd %xmm1,%xmm3
jbe    12ef <prediction_em+0x1ef>
mulsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
test   %r11,%r11
jne    1310 <prediction_em+0x210>
movapd %xmm2,%xmm3
andpd  %xmm0,%xmm3
ucomisd 0x8(%rdi),%xmm3
jbe    1310 <prediction_em+0x210>
cmpl   $0x0,0x0(%r13,%rdx,4)
jle    1310 <prediction_em+0x210>
movsd  %xmm3,0x8(%rdi)
lea    (%r11,%rdx,1),%r9
addsd  (%r14,%r11,8),%xmm2
jmp    12ba <prediction_em+0x1ba>
test   %esi,%esi
jle    150c <prediction_em+0x40c>
mov    %rsi,%r8
xor    %r9d,%r9d
cmp    $0x2,%ecx
setl   %r9b
movslq %edx,%rax
mov    %eax,%r11d
mov    %r11,%r15
sub    %r9,%r15
lea    -0x4(%r15),%rcx
mov    %rcx,-0x38(%rsp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %r15,%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rsp)
add    %r9,%rcx
mov    %rcx,-0x18(%rsp)
mov    %rdx,%rcx
mov    %rdx,-0x8(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,-0x20(%rsp)
mov    %rax,-0x30(%rsp)
lea    0x0(,%rax,8),%r13
xor    %edi,%edi
mov    %r14,%rcx
mov    %r10,%rdx
jmp    13a3 <prediction_em+0x2a3>
nopl   (%rax)
add    $0x1,%rdi
add    %r13,%rdx
add    %r13,%rcx
cmp    %r8,%rdi
je     150c <prediction_em+0x40c>
mov    -0x3c(%rsp),%eax
cmp    %eax,-0x28(%rsp)
jl     1390 <prediction_em+0x290>
mov    %r9,%rax
cmp    $0x4,%r15
jb     1490 <prediction_em+0x390>
mov    %rdi,%rbp
imul   -0x30(%rsp),%rbp
lea    (%r9,%rbp,1),%rax
lea    (%r11,%rbp,1),%rbx
lea    (%r10,%rax,8),%r12
lea    (%r14,%rbx,8),%rsi
cmp    %rsi,%r12
jae    13ec <prediction_em+0x2ec>
lea    (%r10,%rbx,8),%rsi
lea    (%r14,%rax,8),%rbx
mov    %r9,%rax
cmp    %rsi,%rbx
jb     1490 <prediction_em+0x390>
cmpq   $0x4,-0x38(%rsp)
jae    13f8 <prediction_em+0x2f8>
xor    %eax,%eax
jmp    144b <prediction_em+0x34b>
mov    -0x20(%rsp),%r12
xor    %eax,%eax
nop
mov    %rax,%rsi
or     %r9,%rsi
lea    (%rsi,%rbp,1),%rbx
movups (%r14,%rbx,8),%xmm0
movups 0x10(%r14,%rbx,8),%xmm1
movups %xmm0,(%r10,%rbx,8)
movups %xmm1,0x10(%r10,%rbx,8)
or     $0x4,%rsi
add    %rbp,%rsi
movupd (%r14,%rsi,8),%xmm0
movupd 0x10(%r14,%rsi,8),%xmm1
movupd %xmm0,(%r10,%rsi,8)
movupd %xmm1,0x10(%r10,%rsi,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%r12
jne    1400 <prediction_em+0x300>
testb  $0x1,-0x8(%rsp)
je     1472 <prediction_em+0x372>
or     %r9,%rax
add    %rbp,%rax
movupd (%r14,%rax,8),%xmm0
movupd 0x10(%r14,%rax,8),%xmm1
movupd %xmm0,(%r10,%rax,8)
movupd %xmm1,0x10(%r10,%rax,8)
mov    -0x18(%rsp),%rax
cmp    -0x10(%rsp),%r15
je     1390 <prediction_em+0x290>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r11d,%ebx
sub    %eax,%ebx
mov    %rax,%rbp
not    %rbp
add    %r11,%rbp
and    $0x3,%rbx
je     14c4 <prediction_em+0x3c4>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rbx
jne    14b0 <prediction_em+0x3b0>
cmp    $0x3,%rbp
jb     1390 <prediction_em+0x290>
xchg   %ax,%ax
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
movsd  0x8(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rdx,%rax,8)
movsd  0x10(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x10(%rdx,%rax,8)
movsd  0x18(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x18(%rdx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r11
jne    14d0 <prediction_em+0x3d0>
jmp    1390 <prediction_em+0x290>
mov    0x58(%rsp),%rax
movl   $0x0,(%rax)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @prediction_em(double* %0, i32* %1, double* %2, double* %3, double* %4, i32* %5, i32* %6, double* %7, double* %8, i32* %9, i32* %10, double* %11, i32* %12, i32* %13) {
%15 = alloca double*
%16 = alloca i32*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca double*
%23 = alloca double*
%24 = alloca i32*
%25 = alloca i32*
%26 = alloca double*
%27 = alloca i32*
%28 = alloca i32*
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca double
store double* %0, double** %15
store i32* %1, i32** %16
store double* %2, double** %17
store double* %3, double** %18
store double* %4, double** %19
store i32* %5, i32** %20
store i32* %6, i32** %21
store double* %7, double** %22
store double* %8, double** %23
store i32* %9, i32** %24
store i32* %10, i32** %25
store double* %11, double** %26
store i32* %12, i32** %27
store i32* %13, i32** %28
%34 = load i32*, i32** %28
%35 = getelementptr inbounds i32, i32* %34, i64 1
%36 = load i32, i32* %35
%37 = add nsw i32 %36, 1
store i32 %37, i32* %31
%38 = load double*, double** %15
%39 = getelementptr inbounds double, double* %38, i64 0
store double 0.000000e+00, double* %39
%40 = load double*, double** %15
%41 = getelementptr inbounds double, double* %40, i64 1
store double 0.000000e+00, double* %41
%42 = load i32*, i32** %20
%43 = load i32, i32* %42
%44 = icmp slt i32 %43, 2
br i1 %44, label %45, label %46
45: ; preds = %14
store i32 1, i32* %32
br label %47
46: ; preds = %14
store i32 0, i32* %32
br label %47
47: ; preds = %46, %45
%48 = load i32*, i32** %16
%49 = load i32, i32* %48
%50 = icmp eq i32 %49, 4
br i1 %50, label %51, label %138
51: ; preds = %47
store i32 0, i32* %30
br label %52
52: ; preds = %134, %51
%53 = load i32, i32* %30
%54 = load i32*, i32** %21
%55 = load i32, i32* %54
%56 = icmp slt i32 %53, %55
br i1 %56, label %57, label %137
57: ; preds = %52
%58 = load i32, i32* %32
store i32 %58, i32* %29
br label %59
59: ; preds = %130, %57
%60 = load i32, i32* %29
%61 = load i32, i32* %31
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %133
63: ; preds = %59
%64 = load double*, double** %19
%65 = load double, double* %64
%66 = load double*, double** %22
%67 = load i32, i32* %31
%68 = load i32, i32* %30
%69 = mul nsw i32 %67, %68
%70 = load i32, i32* %29
%71 = add nsw i32 %69, %70
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %66, i64 %72
%74 = load double, double* %73
%75 = fmul double %65, %74
store double %75, double* %33
%76 = load double, double* %33
%77 = call double @llvm.fabs.f64(double %76)
%78 = fcmp ogt double %77, 1.000000e+02
br i1 %78, label %79, label %85
79: ; preds = %63
%80 = load double, double* %33
%81 = fmul double 1.000000e+02, %80
%82 = load double, double* %33
%83 = call double @llvm.fabs.f64(double %82)
%84 = fdiv double %81, %83
store double %84, double* %33
br label %85
85: ; preds = %79, %63
%86 = load i32, i32* %29
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %110
88: ; preds = %85
%89 = load double, double* %33
%90 = call double @llvm.fabs.f64(double %89)
%91 = load double*, double** %15
%92 = getelementptr inbounds double, double* %91, i64 1
%93 = load double, double* %92
%94 = fcmp ogt double %90, %93
br i1 %94, label %95, label %109
95: ; preds = %88
%96 = load i32*, i32** %27
%97 = load i32, i32* %31
%98 = load i32, i32* %30
%99 = mul nsw i32 %97, %98
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %96, i64 %100
%102 = load i32, i32* %101
%103 = icmp sgt i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %95
%105 = load double, double* %33
%106 = call double @llvm.fabs.f64(double %105)
%107 = load double*, double** %15
%108 = getelementptr inbounds double, double* %107, i64 1
store double %106, double* %108
br label %109
109: ; preds = %104, %95, %88
br label %110
110: ; preds = %109, %85
%111 = load double*, double** %26
%112 = load i32, i32* %31
%113 = load i32, i32* %30
%114 = mul nsw i32 %112, %113
%115 = load i32, i32* %29
%116 = add nsw i32 %114, %115
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %111, i64 %117
%119 = load double, double* %118
%120 = load double, double* %33
%121 = fadd double %119, %120
%122 = load double*, double** %23
%123 = load i32, i32* %31
%124 = load i32, i32* %30
%125 = mul nsw i32 %123, %124
%126 = load i32, i32* %29
%127 = add nsw i32 %125, %126
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %122, i64 %128
store double %121, double* %129
br label %130
130: ; preds = %110
%131 = load i32, i32* %29
%132 = add nsw i32 %131, 1
store i32 %132, i32* %29
br label %59
133: ; preds = %59
br label %134
134: ; preds = %133
%135 = load i32, i32* %30
%136 = add nsw i32 %135, 1
store i32 %136, i32* %30
br label %52
137: ; preds = %52
br label %291
138: ; preds = %47
%139 = load i32*, i32** %24
%140 = load i32, i32* %139
%141 = icmp sgt i32 %140, 1
br i1 %141, label %142, label %252
142: ; preds = %138
store i32 0, i32* %30
br label %143
143: ; preds = %248, %142
%144 = load i32, i32* %30
%145 = load i32*, i32** %21
%146 = load i32, i32* %145
%147 = icmp slt i32 %144, %146
br i1 %147, label %148, label %251
148: ; preds = %143
%149 = load i32, i32* %32
store i32 %149, i32* %29
br label %150
150: ; preds = %244, %148
%151 = load i32, i32* %29
%152 = load i32, i32* %31
%153 = icmp slt i32 %151, %152
br i1 %153, label %154, label %247
154: ; preds = %150
%155 = load i32*, i32** %25
%156 = load i32, i32* %155
%157 = icmp eq i32 %156, 0
br i1 %157, label %158, label %225
158: ; preds = %154
%159 = load double*, double** %19
%160 = load double, double* %159
%161 = load double*, double** %22
%162 = load i32, i32* %31
%163 = load i32, i32* %30
%164 = mul nsw i32 %162, %163
%165 = load i32, i32* %29
%166 = add nsw i32 %164, %165
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds double, double* %161, i64 %167
%169 = load double, double* %168
%170 = fmul double %160, %169
store double %170, double* %33
%171 = load double, double* %33
%172 = call double @llvm.fabs.f64(double %171)
%173 = fcmp ogt double %172, 1.000000e+02
br i1 %173, label %174, label %180
174: ; preds = %158
%175 = load double, double* %33
%176 = fmul double 1.000000e+02, %175
%177 = load double, double* %33
%178 = call double @llvm.fabs.f64(double %177)
%179 = fdiv double %176, %178
store double %179, double* %33
br label %180
180: ; preds = %174, %158
%181 = load i32, i32* %29
%182 = icmp eq i32 %181, 0
br i1 %182, label %183, label %205
183: ; preds = %180
%184 = load double, double* %33
%185 = call double @llvm.fabs.f64(double %184)
%186 = load double*, double** %15
%187 = getelementptr inbounds double, double* %186, i64 1
%188 = load double, double* %187
%189 = fcmp ogt double %185, %188
br i1 %189, label %190, label %204
190: ; preds = %183
%191 = load i32*, i32** %27
%192 = load i32, i32* %31
%193 = load i32, i32* %30
%194 = mul nsw i32 %192, %193
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i32, i32* %191, i64 %195
%197 = load i32, i32* %196
%198 = icmp sgt i32 %197, 0
br i1 %198, label %199, label %204
199: ; preds = %190
%200 = load double, double* %33
%201 = call double @llvm.fabs.f64(double %200)
%202 = load double*, double** %15
%203 = getelementptr inbounds double, double* %202, i64 1
store double %201, double* %203
br label %204
204: ; preds = %199, %190, %183
br label %205
205: ; preds = %204, %180
%206 = load double*, double** %26
%207 = load i32, i32* %31
%208 = load i32, i32* %30
%209 = mul nsw i32 %207, %208
%210 = load i32, i32* %29
%211 = add nsw i32 %209, %210
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %206, i64 %212
%214 = load double, double* %213
%215 = load double, double* %33
%216 = fadd double %214, %215
%217 = load double*, double** %23
%218 = load i32, i32* %31
%219 = load i32, i32* %30
%220 = mul nsw i32 %218, %219
%221 = load i32, i32* %29
%222 = add nsw i32 %220, %221
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double, double* %217, i64 %223
store double %216, double* %224
br label %243
225: ; preds = %154
%226 = load double*, double** %26
%227 = load i32, i32* %31
%228 = load i32, i32* %30
%229 = mul nsw i32 %227, %228
%230 = load i32, i32* %29
%231 = add nsw i32 %229, %230
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %226, i64 %232
%234 = load double, double* %233
%235 = load double*, double** %23
%236 = load i32, i32* %31
%237 = load i32, i32* %30
%238 = mul nsw i32 %236, %237
%239 = load i32, i32* %29
%240 = add nsw i32 %238, %239
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %235, i64 %241
store double %234, double* %242
br label %243
243: ; preds = %225, %205
br label %244
244: ; preds = %243
%245 = load i32, i32* %29
%246 = add nsw i32 %245, 1
store i32 %246, i32* %29
br label %150
247: ; preds = %150
br label %248
248: ; preds = %247
%249 = load i32, i32* %30
%250 = add nsw i32 %249, 1
store i32 %250, i32* %30
br label %143
251: ; preds = %143
br label %290
252: ; preds = %138
store i32 0, i32* %30
br label %253
253: ; preds = %286, %252
%254 = load i32, i32* %30
%255 = load i32*, i32** %21
%256 = load i32, i32* %255
%257 = icmp slt i32 %254, %256
br i1 %257, label %258, label %289
258: ; preds = %253
%259 = load i32, i32* %32
store i32 %259, i32* %29
br label %260
260: ; preds = %282, %258
%261 = load i32, i32* %29
%262 = load i32, i32* %31
%263 = icmp slt i32 %261, %262
br i1 %263, label %264, label %285
264: ; preds = %260
%265 = load double*, double** %26
%266 = load i32, i32* %31
%267 = load i32, i32* %30
%268 = mul nsw i32 %266, %267
%269 = load i32, i32* %29
%270 = add nsw i32 %268, %269
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %265, i64 %271
%273 = load double, double* %272
%274 = load double*, double** %23
%275 = load i32, i32* %31
%276 = load i32, i32* %30
%277 = mul nsw i32 %275, %276
%278 = load i32, i32* %29
%279 = add nsw i32 %277, %278
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double, double* %274, i64 %280
store double %273, double* %281
br label %282
282: ; preds = %264
%283 = load i32, i32* %29
%284 = add nsw i32 %283, 1
store i32 %284, i32* %29
br label %260
285: ; preds = %260
br label %286
286: ; preds = %285
%287 = load i32, i32* %30
%288 = add nsw i32 %287, 1
store i32 %288, i32* %30
br label %253
289: ; preds = %253
br label %290
290: ; preds = %289, %251
br label %291
291: ; preds = %290, %137
%292 = load i32*, i32** %25
store i32 0, i32* %292
ret void
}

LLVM IR (-O2):
define void @prediction_em(double* nocapture %0, i32* nocapture %1, double* nocapture readnone %2, double* nocapture readnone %3, double* nocapture %4, i32* nocapture %5, i32* nocapture %6, double* nocapture %7, double* nocapture writeonly %8, i32* nocapture %9, i32* nocapture %10, double* nocapture %11, i32* nocapture %12, i32* nocapture %13) {
%15 = getelementptr inbounds i32, i32* %13, i64 1
%16 = load i32, i32* %15
%17 = add i32 %16, 1
%18 = getelementptr inbounds double, double* %0, i64 1
%19 = bitcast double* %0 to i8*
%20 = load i32, i32* %5
%21 = icmp slt i32 %20, 2
%22 = zext i1 %21 to i32
%23 = load i32, i32* %1
%24 = icmp eq i32 %23, 4
br i1 %24, label %25, label %72
25: ; preds = %14
%26 = load i32, i32* %6
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %260
28: ; preds = %25
%29 = icmp slt i32 %16, %22
%30 = zext i1 %21 to i64
%31 = sext i32 %17 to i64
%32 = zext i32 %26 to i64
%33 = zext i32 %17 to i64
br label %34
34: ; preds = %28, %69
%35 = phi i64 [ 0, %28 ], [ %70, %69 ]
br i1 %29, label %69, label %36
36: ; preds = %34
%37 = mul nsw i64 %35, %31
%38 = getelementptr inbounds i32, i32* %12, i64 %37
br label %39
39: ; preds = %36, %62
%40 = phi i64 [ %30, %36 ], [ %67, %62 ]
%41 = load double, double* %4
%42 = add nsw i64 %40, %37
%43 = getelementptr inbounds double, double* %7, i64 %42
%44 = load double, double* %43
%45 = fmul double %41, %44
%46 = tail call double @llvm.fabs.f64(double %45)
%47 = fcmp ogt double %46, 1.000000e+02
br i1 %47, label %48, label %51
48: ; preds = %39
%49 = fmul double %45, 1.000000e+02
%50 = fdiv double %49, %46
br label %51
51: ; preds = %48, %39
%52 = phi double [ %50, %48 ], [ %45, %39 ]
%53 = icmp eq i64 %40, 0
br i1 %53, label %54, label %62
54: ; preds = %51
%55 = tail call double @llvm.fabs.f64(double %52)
%56 = load double, double* %18
%57 = fcmp ogt double %55, %56
br i1 %57, label %58, label %62
58: ; preds = %54
%59 = load i32, i32* %38
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %58
store double %55, double* %18
br label %62
62: ; preds = %54, %58, %61, %51
%63 = getelementptr inbounds double, double* %11, i64 %42
%64 = load double, double* %63
%65 = fadd double %52, %64
%66 = getelementptr inbounds double, double* %8, i64 %42
store double %65, double* %66
%67 = add nuw nsw i64 %40, 1
%68 = icmp eq i64 %67, %33
br i1 %68, label %69, label %39
69: ; preds = %62, %34
%70 = add nuw nsw i64 %35, 1
%71 = icmp eq i64 %70, %32
br i1 %71, label %260, label %34
72: ; preds = %14
%73 = load i32, i32* %9
%74 = icmp sgt i32 %73, 1
%75 = load i32, i32* %6
%76 = icmp sgt i32 %75, 0
br i1 %74, label %96, label %77
77: ; preds = %72
br i1 %76, label %78, label %260
78: ; preds = %77
%79 = icmp slt i32 %16, %22
%80 = zext i1 %21 to i64
%81 = sext i32 %17 to i64
%82 = zext i32 %75 to i64
%83 = zext i32 %17 to i64
%84 = sub nsw i64 %83, %80
%85 = add nsw i64 %84, -4
%86 = lshr i64 %85, 2
%87 = add nuw nsw i64 %86, 1
%88 = icmp ult i64 %84, 4
%89 = and i64 %84, -4
%90 = or i64 %89, %80
%91 = and i64 %87, 1
%92 = icmp ult i64 %85, 4
%93 = and i64 %87, 9223372036854775806
%94 = icmp eq i64 %91, 0
%95 = icmp eq i64 %84, %89
br label %151
96: ; preds = %72
br i1 %76, label %97, label %260
97: ; preds = %96
%98 = icmp slt i32 %16, %22
%99 = zext i1 %21 to i64
%100 = sext i32 %17 to i64
%101 = zext i32 %75 to i64
%102 = zext i32 %17 to i64
br label %103
103: ; preds = %97, %148
%104 = phi i64 [ 0, %97 ], [ %149, %148 ]
br i1 %98, label %148, label %105
105: ; preds = %103
%106 = load i32, i32* %10
%107 = icmp eq i32 %106, 0
%108 = mul nsw i64 %104, %100
%109 = getelementptr inbounds i32, i32* %12, i64 %108
br label %110
110: ; preds = %105, %142
%111 = phi i64 [ %99, %105 ], [ %146, %142 ]
br i1 %107, label %112, label %138
112: ; preds = %110
%113 = load double, double* %4
%114 = add nsw i64 %111, %108
%115 = getelementptr inbounds double, double* %7, i64 %114
%116 = load double, double* %115
%117 = fmul double %113, %116
%118 = tail call double @llvm.fabs.f64(double %117)
%119 = fcmp ogt double %118, 1.000000e+02
br i1 %119, label %120, label %123
120: ; preds = %112
%121 = fmul double %117, 1.000000e+02
%122 = fdiv double %121, %118
br label %123
123: ; preds = %120, %112
%124 = phi double [ %122, %120 ], [ %117, %112 ]
%125 = icmp eq i64 %111, 0
br i1 %125, label %126, label %134
126: ; preds = %123
%127 = tail call double @llvm.fabs.f64(double %124)
%128 = load double, double* %18
%129 = fcmp ogt double %127, %128
br i1 %129, label %130, label %134
130: ; preds = %126
%131 = load i32, i32* %109
%132 = icmp sgt i32 %131, 0
br i1 %132, label %133, label %134
133: ; preds = %130
store double %127, double* %18
br label %134
134: ; preds = %126, %130, %133, %123
%135 = getelementptr inbounds double, double* %11, i64 %114
%136 = load double, double* %135
%137 = fadd double %124, %136
br label %142
138: ; preds = %110
%139 = add nsw i64 %111, %108
%140 = getelementptr inbounds double, double* %11, i64 %139
%141 = load double, double* %140
br label %142
142: ; preds = %134, %138
%143 = phi i64 [ %114, %134 ], [ %139, %138 ]
%144 = phi double [ %137, %134 ], [ %141, %138 ]
%145 = getelementptr inbounds double, double* %8, i64 %143
store double %144, double* %145
%146 = add nuw nsw i64 %111, 1
%147 = icmp eq i64 %146, %102
br i1 %147, label %148, label %110
148: ; preds = %142, %103
%149 = add nuw nsw i64 %104, 1
%150 = icmp eq i64 %149, %101
br i1 %150, label %260, label %103
151: ; preds = %78, %257
%152 = phi i64 [ 0, %78 ], [ %258, %257 ]
%153 = mul i64 %152, %81
%154 = add i64 %153, %80
%155 = getelementptr double, double* %8, i64 %154
%156 = add i64 %153, %83
%157 = getelementptr double, double* %8, i64 %156
%158 = getelementptr double, double* %11, i64 %154
%159 = getelementptr double, double* %11, i64 %156
br i1 %79, label %257, label %160
160: ; preds = %151
%161 = mul nsw i64 %152, %81
br i1 %88, label %214, label %162
162: ; preds = %160
%163 = icmp ult double* %155, %159
%164 = icmp ult double* %158, %157
%165 = and i1 %163, %164
br i1 %165, label %214, label %166
166: ; preds = %162
br i1 %92, label %198, label %167
167: ; preds = %166, %167
%168 = phi i64 [ %195, %167 ], [ 0, %166 ]
%169 = phi i64 [ %196, %167 ], [ 0, %166 ]
%170 = or i64 %168, %80
%171 = add nsw i64 %170, %161
%172 = getelementptr inbounds double, double* %11, i64 %171
%173 = bitcast double* %172 to <2 x double>*
%174 = load <2 x double>, <2 x double>* %173
%175 = getelementptr inbounds double, double* %172, i64 2
%176 = bitcast double* %175 to <2 x double>*
%177 = load <2 x double>, <2 x double>* %176
%178 = getelementptr inbounds double, double* %8, i64 %171
%179 = bitcast double* %178 to <2 x double>*
store <2 x double> %174, <2 x double>* %179
%180 = getelementptr inbounds double, double* %178, i64 2
%181 = bitcast double* %180 to <2 x double>*
store <2 x double> %177, <2 x double>* %181
%182 = or i64 %168, %80
%183 = or i64 %182, 4
%184 = add nsw i64 %183, %161
%185 = getelementptr inbounds double, double* %11, i64 %184
%186 = bitcast double* %185 to <2 x double>*
%187 = load <2 x double>, <2 x double>* %186
%188 = getelementptr inbounds double, double* %185, i64 2
%189 = bitcast double* %188 to <2 x double>*
%190 = load <2 x double>, <2 x double>* %189
%191 = getelementptr inbounds double, double* %8, i64 %184
%192 = bitcast double* %191 to <2 x double>*
store <2 x double> %187, <2 x double>* %192
%193 = getelementptr inbounds double, double* %191, i64 2
%194 = bitcast double* %193 to <2 x double>*
store <2 x double> %190, <2 x double>* %194
%195 = add nuw i64 %168, 8
%196 = add i64 %169, 2
%197 = icmp eq i64 %196, %93
br i1 %197, label %198, label %167
198: ; preds = %167, %166
%199 = phi i64 [ 0, %166 ], [ %195, %167 ]
br i1 %94, label %213, label %200
200: ; preds = %198
%201 = or i64 %199, %80
%202 = add nsw i64 %201, %161
%203 = getelementptr inbounds double, double* %11, i64 %202
%204 = bitcast double* %203 to <2 x double>*
%205 = load <2 x double>, <2 x double>* %204
%206 = getelementptr inbounds double, double* %203, i64 2
%207 = bitcast double* %206 to <2 x double>*
%208 = load <2 x double>, <2 x double>* %207
%209 = getelementptr inbounds double, double* %8, i64 %202
%210 = bitcast double* %209 to <2 x double>*
store <2 x double> %205, <2 x double>* %210
%211 = getelementptr inbounds double, double* %209, i64 2
%212 = bitcast double* %211 to <2 x double>*
store <2 x double> %208, <2 x double>* %212
br label %213
213: ; preds = %198, %200
br i1 %95, label %257, label %214
214: ; preds = %162, %160, %213
%215 = phi i64 [ %80, %162 ], [ %80, %160 ], [ %90, %213 ]
%216 = sub nsw i64 %83, %215
%217 = xor i64 %215, -1
%218 = add nsw i64 %217, %83
%219 = and i64 %216, 3
%220 = icmp eq i64 %219, 0
br i1 %220, label %231, label %221
221: ; preds = %214, %221
%222 = phi i64 [ %228, %221 ], [ %215, %214 ]
%223 = phi i64 [ %229, %221 ], [ 0, %214 ]
%224 = add nsw i64 %222, %161
%225 = getelementptr inbounds double, double* %11, i64 %224
%226 = load double, double* %225
%227 = getelementptr inbounds double, double* %8, i64 %224
store double %226, double* %227
%228 = add nuw nsw i64 %222, 1
%229 = add i64 %223, 1
%230 = icmp eq i64 %229, %219
br i1 %230, label %231, label %221
231: ; preds = %221, %214
%232 = phi i64 [ %215, %214 ], [ %228, %221 ]
%233 = icmp ult i64 %218, 3
br i1 %233, label %257, label %234
234: ; preds = %231, %234
%235 = phi i64 [ %255, %234 ], [ %232, %231 ]
%236 = add nsw i64 %235, %161
%237 = getelementptr inbounds double, double* %11, i64 %236
%238 = load double, double* %237
%239 = getelementptr inbounds double, double* %8, i64 %236
store double %238, double* %239
%240 = add nuw nsw i64 %235, 1
%241 = add nsw i64 %240, %161
%242 = getelementptr inbounds double, double* %11, i64 %241
%243 = load double, double* %242
%244 = getelementptr inbounds double, double* %8, i64 %241
store double %243, double* %244
%245 = add nuw nsw i64 %235, 2
%246 = add nsw i64 %245, %161
%247 = getelementptr inbounds double, double* %11, i64 %246
%248 = load double, double* %247
%249 = getelementptr inbounds double, double* %8, i64 %246
store double %248, double* %249
%250 = add nuw nsw i64 %235, 3
%251 = add nsw i64 %250, %161
%252 = getelementptr inbounds double, double* %11, i64 %251
%253 = load double, double* %252
%254 = getelementptr inbounds double, double* %8, i64 %251
store double %253, double* %254
%255 = add nuw nsw i64 %235, 4
%256 = icmp eq i64 %255, %83
br i1 %256, label %257, label %234
257: ; preds = %231, %234, %213, %151
%258 = add nuw nsw i64 %152, 1
%259 = icmp eq i64 %258, %82
br i1 %259, label %260, label %151
260: ; preds = %257, %148, %69, %77, %96, %25
store i32 0, i32* %10
ret void
}