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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int gmresm(int, int, int, double, double *, double *, int *, int *, double *,
           int *, int *, double *, double *, double *, int *, int *,
           int /*<<< orphan*/ *);
int /*<<< orphan*/ ilutp_(int *, double *, int *, int *, int *, double *,
                          double *, int *, double *, int *, int *, int *,
                          double *, double *, int *, int *, int *, int *,
                          int *);
int /*<<< orphan*/ lusol_(int *, double *, double *, double *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stderr;
void calcDeterminantILUGMRES(int *movedParticle, int *size,
                             int *passedArrLength, double u[], int Arp[],
                             int Ari[], double Arx[], int ArpNew[],
                             int AriNew[], double ArxNew[],
                             double *detRatio_ILU) {
  fprintf(stderr, "check\n");
  int n = *size;
  int i;
  int status;
  double b[n];
  double x[n];
  for (i = 0; i < n; i++) {
    b[i] = 0;
    x[i] = 0;
  }
  fprintf(stderr, "Moved particel si %i\n", *movedParticle);
  if (*movedParticle >= n) {
    fprintf(stderr, "Above n error");
    exit(1);
  }
  b[*movedParticle] = 1;
  int arrLength = *passedArrLength;
  fprintf(stderr, "GMRES done\n");
  for (i = 0; i < n + 1; i++)
    Arp[i] = Arp[i] + 1;
  fprintf(stderr, "A done %i\n", arrLength);
  for (i = 0; i < arrLength; i++)
    Ari[i] = Ari[i] + 1;
  fprintf(stderr, "B done\n");
  int lfil = n;
  double droptol = 0.01;
  double permtol = 0.0;
  int mbloc = n;
  int iwk = arrLength + 2 * lfil * n + 2;
  fprintf(stderr, "C done %i %i %i %i\n", iwk, arrLength, lfil, n);
  double testMe[1411790];
  int testMe2[1411790];
  fprintf(stderr, "Cp\n");
  double alu[iwk];
  int jlu[iwk];
  fprintf(stderr, "CC done\n");
  int ju[n];
  double wu[n + 1];
  double wl[n];
  fprintf(stderr, "CCC done\n");
  int jr[n];
  int jwl[n];
  int jwu[n];
  fprintf(stderr, "D done\n");
  int iperm[2 * n];
  int ierr;
  fprintf(stderr, "hi\n");
  ilutp_(&n, Arx, Ari, Arp, &lfil, &droptol, &permtol, &mbloc, alu, jlu, ju,
         &iwk, wu, wl, jr, jwl, jwu, iperm, &ierr);
  int nnzLU = jlu[n] - 2 + n;
  printf("nnzLU = %d \n", nnzLU);
  fprintf(stderr, "ilutp done\n");
  int restart = n;
  int maxItn = 1;
  double tol = 1e-12;
  double res[n];
  double resnorm[maxItn + 1];
  int nit;
  int nmv;
  FILE *outFile = NULL;
  outFile = fopen("gmres-results.txt", "w");
  int flag = gmresm(n, restart, maxItn, tol, x, ArxNew, AriNew, ArpNew, alu,
                    jlu, ju, b, res, resnorm, &nit, &nmv, outFile);
  fclose(outFile);
  printf("GMRES itn = %d \n", nmv);
  lusol_(&n, x, x, alu, jlu, ju);
  *detRatio_ILU = 0;
  for (i = 0; i < n; i++)
    *detRatio_ILU = *detRatio_ILU + x[i] * u[i];
}


x86 assembly (clang, -O0):
<calcDeterminantILUGMRES>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1028318,%rsp
mov    0x30(%rbp),%rax
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)
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
lea    0xe38(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x70(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x10282e8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x78(%rbp)
mov    -0x5c(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x10282e0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1274 <calcDeterminantILUGMRES+0xf4>
mov    -0x10282e0(%rbp),%rax
mov    -0x10282e8(%rbp),%rcx
movslq -0x60(%rbp),%rdx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
movslq -0x60(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1234 <calcDeterminantILUGMRES+0xb4>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
mov    (%rax),%edx
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
cmp    -0x5c(%rbp),%eax
jl     12c1 <calcDeterminantILUGMRES+0x141>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10282e8(%rbp),%rax
mov    -0x30(%rbp),%rcx
movslq (%rcx),%rcx
movsd  0xd29(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x84(%rbp)
mov    0x2cf1(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    133e <calcDeterminantILUGMRES+0x1be>
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    -0x50(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1306 <calcDeterminantILUGMRES+0x186>
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
mov    -0x84(%rbp),%edx
lea    0xceb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    1398 <calcDeterminantILUGMRES+0x218>
mov    -0x58(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    -0x58(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1362 <calcDeterminantILUGMRES+0x1e2>
mov    0x2c41(%rip),%rax
mov    %rax,-0x1028310(%rbp)
mov    (%rax),%edi
lea    0xc9b(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x1028301(%rbp)
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    -0x5c(%rbp),%edx
mov    %edx,-0x88(%rbp)
movabs $0x3f847ae147ae147b,%rdx
7a 84 3f
mov    %rdx,-0x90(%rbp)
movq   $0x0,-0x98(%rbp)
mov    -0x5c(%rbp),%edx
mov    %edx,-0x9c(%rbp)
mov    -0x84(%rbp),%esi
mov    -0x88(%rbp),%edi
mov    -0x5c(%rbp),%edx
imul   %edx,%edi
mov    %esi,%edx
mov    %edi,%esi
lea    0x2(%rdx,%rsi,2),%edx
mov    %edx,-0xa0(%rbp)
mov    (%rcx),%edi
mov    -0xa0(%rbp),%edx
mov    -0x84(%rbp),%ecx
mov    -0x88(%rbp),%r8d
mov    -0x5c(%rbp),%r9d
lea    0xc1b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    (%rcx),%edi
lea    0xc14(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    -0xa0(%rbp),%edx
lea    0xf(,%rdx,8),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x1028300(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x1028258(%rbp)
mov    -0xa0(%rbp),%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%r13
sub    %rsi,%r13
mov    %r13,-0x10282f8(%rbp)
mov    %r13,%rsp
mov    %rdx,-0x1028260(%rbp)
mov    (%rcx),%edi
lea    0xbac(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    -0x5c(%rbp),%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%r12
sub    %rsi,%r12
mov    %r12,-0x10282f0(%rbp)
mov    %r12,%rsp
mov    %rdx,-0x1028268(%rbp)
mov    -0x5c(%rbp),%edx
add    $0x1,%edx
lea    0xf(,%rdx,8),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x1028320(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x1028270(%rbp)
mov    -0x5c(%rbp),%edx
lea    0xf(,%rdx,8),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x1028328(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x1028278(%rbp)
mov    (%rcx),%edi
lea    0xb1b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    -0x5c(%rbp),%edx
lea    0xf(,%rdx,4),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x1028330(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x1028280(%rbp)
mov    -0x5c(%rbp),%edx
lea    0xf(,%rdx,4),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x1028338(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x1028288(%rbp)
mov    -0x5c(%rbp),%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rbx
sub    %rsi,%rbx
mov    %rbx,%rsp
mov    %rdx,-0x1028290(%rbp)
mov    (%rcx),%edi
lea    0xa9f(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    -0x5c(%rbp),%edx
add    %edx,%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%r14
sub    %rsi,%r14
mov    %r14,%rsp
mov    %rdx,-0x1028298(%rbp)
mov    (%rcx),%edi
lea    0xa6b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x1028338(%rbp),%r11
mov    -0x1028330(%rbp),%r10
mov    -0x1028328(%rbp),%r9
mov    -0x1028320(%rbp),%r8
mov    -0x1028300(%rbp),%rdi
mov    0x10(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x50(%rbp),%rcx
sub    $0x70,%rsp
mov    %rsp,%rax
mov    %rax,-0x1028318(%rbp)
lea    -0x102829c(%rbp),%r15
mov    %r15,0x60(%rax)
mov    %r14,0x58(%rax)
mov    %rbx,0x50(%rax)
mov    %r11,0x48(%rax)
mov    %r10,0x40(%rax)
mov    %r9,0x38(%rax)
mov    %r8,0x30(%rax)
lea    -0xa0(%rbp),%r8
mov    %r8,0x28(%rax)
mov    %r12,0x20(%rax)
mov    %r13,0x18(%rax)
mov    %rdi,0x10(%rax)
lea    -0x9c(%rbp),%rdi
mov    %rdi,0x8(%rax)
lea    -0x98(%rbp),%rdi
mov    %rdi,(%rax)
lea    -0x5c(%rbp),%rdi
lea    -0x88(%rbp),%r8
lea    -0x90(%rbp),%r9
call   1080 <ilutp_@plt>
add    $0x70,%rsp
movslq -0x5c(%rbp),%rcx
mov    %ecx,%eax
mov    0x0(%r13,%rcx,4),%edx
mov    %eax,%ecx
mov    %edx,%eax
lea    -0x2(%rax,%rcx,1),%eax
mov    %eax,-0x10282a0(%rbp)
mov    -0x10282a0(%rbp),%esi
lea    0x99d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1028310(%rbp),%rcx
mov    -0x1028301(%rbp),%al
mov    (%rcx),%edi
lea    0x98f(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x10282a4(%rbp)
movl   $0x1,-0x10282a8(%rbp)
movabs $0x3d719799812dea11,%rax
97 71 3d
mov    %rax,-0x10282b0(%rbp)
mov    -0x5c(%rbp),%eax
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r14
sub    %rcx,%r14
mov    %r14,%rsp
mov    %rax,-0x10282b8(%rbp)
mov    -0x10282a8(%rbp),%eax
add    $0x1,%eax
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rbx
sub    %rcx,%rbx
mov    %rbx,%rsp
mov    %rax,-0x10282c0(%rbp)
movq   $0x0,-0x10282d0(%rbp)
lea    0x91c(%rip),%rdi
lea    0x927(%rip),%rsi
call   1090 <fopen@plt>
mov    -0x10282e0(%rbp),%rcx
mov    %rax,-0x10282d0(%rbp)
mov    -0x5c(%rbp),%edi
mov    -0x10282a4(%rbp),%esi
mov    -0x10282a8(%rbp),%edx
movsd  -0x10282b0(%rbp),%xmm0
fe
mov    0x28(%rbp),%r8
mov    0x20(%rbp),%r9
mov    0x18(%rbp),%r15
mov    -0x10282d0(%rbp),%rax
lea    -0x10282c4(%rbp),%r11
lea    -0x10282c8(%rbp),%r10
sub    $0x50,%rsp
mov    %r15,(%rsp)
mov    -0x1028300(%rbp),%r15
mov    %r15,0x8(%rsp)
mov    -0x10282e8(%rbp),%r15
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1070 <gmresm@plt>
add    $0x50,%rsp
mov    %eax,-0x10282d4(%rbp)
mov    -0x10282d0(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10282c8(%rbp),%esi
lea    0x873(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10282e0(%rbp),%rdx
mov    -0x1028300(%rbp),%rcx
mov    -0x10282f8(%rbp),%r8
mov    -0x10282f0(%rbp),%r9
lea    -0x5c(%rbp),%rdi
mov    %rdx,%rsi
call   1050 <lusol_@plt>
mov    0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    18c8 <calcDeterminantILUGMRES+0x748>
mov    -0x10282e0(%rbp),%rax
mov    0x30(%rbp),%rcx
movsd  (%rcx),%xmm1
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1879 <calcDeterminantILUGMRES+0x6f9>
mov    -0x70(%rbp),%rax
mov    %rax,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcDeterminantILUGMRES>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%r13
mov    %r8,%rbx
mov    %rcx,-0x98(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rsi,%r14
mov    %rdi,-0x40(%rbp)
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0xe3c(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rsp,-0xa0(%rbp)
mov    (%r14),%r12d
mov    %r12d,-0x2c(%rbp)
mov    %rsp,%r15
lea    0xf(,%r12,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%r14
mov    %rax,-0x50(%rbp)
sub    %rax,%r14
mov    %r14,%rsp
test   %r12d,%r12d
jle    122c <calcDeterminantILUGMRES+0x9c>
lea    0x0(,%r12,8),%rdx
mov    %rdx,-0x48(%rbp)
mov    %r15,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    -0x48(%rbp),%rdx
call   1050 <memset@plt>
mov    %r14,-0x90(%rbp)
mov    %r15,-0x48(%rbp)
mov    0x2da2(%rip),%r14
mov    (%r14),%edi
mov    -0x40(%rbp),%r15
mov    (%r15),%edx
lea    0xdc0(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
movslq (%r15),%rax
cmp    %r12d,%eax
jge    1842 <calcDeterminantILUGMRES+0x6b2>
movabs $0x3ff0000000000000,%rcx
mov    -0x48(%rbp),%rdx
mov    %rcx,(%rdx,%rax,8)
mov    -0x38(%rbp),%rax
mov    (%rax),%r15d
mov    (%r14),%edi
lea    0xdae(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %r12d,%r12d
js     136d <calcDeterminantILUGMRES+0x1dd>
lea    0x1(%r12),%rax
cmp    $0x7,%r12d
jae    12a7 <calcDeterminantILUGMRES+0x117>
xor    %ecx,%ecx
jmp    1360 <calcDeterminantILUGMRES+0x1d0>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     1821 <calcDeterminantILUGMRES+0x691>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
pcmpeqd %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqu (%rbx,%rdx,4),%xmm1
movdqu 0x10(%rbx,%rdx,4),%xmm2
movdqu 0x20(%rbx,%rdx,4),%xmm3
movdqu 0x30(%rbx,%rdx,4),%xmm4
psubd  %xmm0,%xmm1
psubd  %xmm0,%xmm2
movdqu %xmm1,(%rbx,%rdx,4)
movdqu %xmm2,0x10(%rbx,%rdx,4)
psubd  %xmm0,%xmm3
psubd  %xmm0,%xmm4
movdqu %xmm3,0x20(%rbx,%rdx,4)
movdqu %xmm4,0x30(%rbx,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rdi
jne    12e0 <calcDeterminantILUGMRES+0x150>
test   $0x1,%sil
je     1350 <calcDeterminantILUGMRES+0x1c0>
movdqu (%rbx,%rdx,4),%xmm0
movdqu 0x10(%rbx,%rdx,4),%xmm1
pcmpeqd %xmm2,%xmm2
psubd  %xmm2,%xmm0
psubd  %xmm2,%xmm1
movdqu %xmm0,(%rbx,%rdx,4)
movdqu %xmm1,0x10(%rbx,%rdx,4)
cmp    %rax,%rcx
je     136d <calcDeterminantILUGMRES+0x1dd>
cs nopw 0x0(%rax,%rax,1)
nop
addl   $0x1,(%rbx,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1360 <calcDeterminantILUGMRES+0x1d0>
mov    (%r14),%edi
lea    0xcc8(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %r15d,%r15d
jle    146f <calcDeterminantILUGMRES+0x2df>
cmp    $0x8,%r15d
jae    1397 <calcDeterminantILUGMRES+0x207>
xor    %eax,%eax
jmp    1460 <calcDeterminantILUGMRES+0x2d0>
mov    %r15d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rcx
mov    %rcx,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1832 <calcDeterminantILUGMRES+0x6a2>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
pcmpeqd %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movdqu 0x0(%r13,%rcx,4),%xmm1
movdqu 0x10(%r13,%rcx,4),%xmm2
movdqu 0x20(%r13,%rcx,4),%xmm3
movdqu 0x30(%r13,%rcx,4),%xmm4
psubd  %xmm0,%xmm1
psubd  %xmm0,%xmm2
movdqu %xmm1,0x0(%r13,%rcx,4)
movdqu %xmm2,0x10(%r13,%rcx,4)
psubd  %xmm0,%xmm3
psubd  %xmm0,%xmm4
movdqu %xmm3,0x20(%r13,%rcx,4)
movdqu %xmm4,0x30(%r13,%rcx,4)
add    $0x10,%rcx
add    $0xfffffffffffffffe,%rsi
jne    13d0 <calcDeterminantILUGMRES+0x240>
test   $0x1,%dl
je     144f <calcDeterminantILUGMRES+0x2bf>
movdqu 0x0(%r13,%rcx,4),%xmm0
movdqu 0x10(%r13,%rcx,4),%xmm1
pcmpeqd %xmm2,%xmm2
psubd  %xmm2,%xmm0
psubd  %xmm2,%xmm1
movdqu %xmm0,0x0(%r13,%rcx,4)
movdqu %xmm1,0x10(%r13,%rcx,4)
cmp    %r15,%rax
je     146f <calcDeterminantILUGMRES+0x2df>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addl   $0x1,0x0(%r13,%rax,4)
add    $0x1,%rax
cmp    %rax,%r15
jne    1460 <calcDeterminantILUGMRES+0x2d0>
mov    (%r14),%edi
lea    0xbd1(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r12d,-0x60(%rbp)
movabs $0x3f847ae147ae147b,%rax
7a 84 3f
mov    %rax,-0xb0(%rbp)
movq   $0x0,-0xa8(%rbp)
mov    %r12d,-0x5c(%rbp)
lea    (%r12,%r12,1),%eax
mov    %rax,-0x88(%rbp)
imul   %r12d,%eax
mov    %r14,%rcx
lea    (%r15,%rax,1),%r14d
add    $0x2,%r14d
mov    %r14d,-0x58(%rbp)
mov    (%rcx),%edi
lea    0xb87(%rip),%rsi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2afb(%rip),%r15
mov    (%r15),%edi
lea    0xb77(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xf(,%r14,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
lea    0xf(,%r14,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    (%r15),%edi
mov    %r15,%r14
lea    0xb36(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rsp,%rax
lea    0xf(,%r12,4),%r15
and    $0xfffffffffffffff0,%r15
sub    %r15,%rax
mov    %rax,-0x38(%rbp)
mov    %rax,%rsp
add    $0x1,%r12d
mov    %rsp,%rcx
lea    0xf(,%r12,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rax
sub    -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    %rax,%rsp
mov    %r14,%r12
mov    (%r14),%edi
lea    0xadd(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rsp,%rax
sub    %r15,%rax
mov    %rax,-0x78(%rbp)
mov    %rax,%rsp
mov    %rsp,%rax
sub    %r15,%rax
mov    %rax,-0x70(%rbp)
mov    %rax,%rsp
mov    %rsp,%r14
sub    %r15,%r14
mov    %r14,%rsp
mov    (%r12),%edi
lea    0xab2(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rsp,%r15
mov    -0x88(%rbp),%rax
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    (%r12),%edi
lea    0xa8c(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
sub    $0x8,%rsp
lea    -0xb8(%rbp),%rax
lea    -0x58(%rbp),%r10
lea    -0x5c(%rbp),%r11
lea    -0x2c(%rbp),%rdi
lea    -0x60(%rbp),%r8
lea    -0xb0(%rbp),%r9
mov    0x10(%rbp),%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
push   %rax
push   %r15
push   %r14
push   -0x70(%rbp)
push   -0x78(%rbp)
push   -0x50(%rbp)
push   -0x80(%rbp)
push   %r10
push   -0x38(%rbp)
mov    -0x68(%rbp),%rbx
push   %rbx
push   -0x40(%rbp)
push   %r11
lea    -0xa8(%rbp),%rax
push   %rax
call   1090 <ilutp_@plt>
add    $0x70,%rsp
movslq -0x2c(%rbp),%rax
mov    (%rbx,%rax,4),%ecx
lea    (%rax,%rcx,1),%esi
add    $0xfffffffe,%esi
lea    0xa18(%rip),%rdi
call   1040 <printf@plt>
mov    (%r12),%edi
lea    0xa15(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%r14d
mov    %rsp,%r13
lea    0xf(,%r14,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    %rsp,%r12
add    $0xfffffffffffffff0,%r12
mov    %r12,%rsp
lea    0x9f0(%rip),%rdi
lea    0x9fb(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
mov    -0x2c(%rbp),%edi
lea    -0x54(%rbp),%rax
lea    -0xb4(%rbp),%r10
movsd  0x932(%rip),%xmm0
mov    %r14d,%esi
mov    $0x1,%edx
mov    -0x90(%rbp),%rbx
mov    %rbx,%rcx
mov    0x28(%rbp),%r8
mov    0x20(%rbp),%r9
push   %r15
push   %rax
push   %r10
push   %r12
push   %r13
push   -0x48(%rbp)
mov    -0x38(%rbp),%r12
push   %r12
mov    -0x68(%rbp),%r13
push   %r13
mov    -0x40(%rbp),%r14
push   %r14
push   0x18(%rbp)
call   1080 <gmresm@plt>
add    $0x50,%rsp
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    -0x54(%rbp),%esi
lea    0x989(%rip),%rdi
call   1040 <printf@plt>
lea    -0x2c(%rbp),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r13,%r8
mov    %r12,%r9
call   1060 <lusol_@plt>
mov    0x30(%rbp),%rdi
movq   $0x0,(%rdi)
mov    -0x2c(%rbp),%ecx
test   %ecx,%ecx
mov    -0x98(%rbp),%rsi
jle    180b <calcDeterminantILUGMRES+0x67b>
lea    -0x1(%rcx),%rdx
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    1775 <calcDeterminantILUGMRES+0x5e5>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    17d7 <calcDeterminantILUGMRES+0x647>
and    $0xfffffffc,%ecx
xorpd  %xmm0,%xmm0
xor    %edx,%edx
xchg   %ax,%ax
movsd  (%rbx,%rdx,8),%xmm1
mulsd  (%rsi,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rbx,%rdx,8),%xmm0
mulsd  0x8(%rsi,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movsd  0x10(%rbx,%rdx,8),%xmm1
mulsd  0x10(%rsi,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x18(%rbx,%rdx,8),%xmm0
mulsd  0x18(%rsi,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
add    $0x4,%rdx
cmp    %rdx,%rcx
jne    1780 <calcDeterminantILUGMRES+0x5f0>
test   %rax,%rax
je     180b <calcDeterminantILUGMRES+0x67b>
lea    (%rsi,%rdx,8),%rcx
lea    (%rbx,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,8),%xmm1
mulsd  (%rcx,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
add    $0x1,%rsi
cmp    %rsi,%rax
jne    17f0 <calcDeterminantILUGMRES+0x660>
mov    -0xa0(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    132e <calcDeterminantILUGMRES+0x19e>
jmp    1350 <calcDeterminantILUGMRES+0x1c0>
xor    %ecx,%ecx
test   $0x1,%dl
jne    1427 <calcDeterminantILUGMRES+0x297>
jmp    144f <calcDeterminantILUGMRES+0x2bf>
mov    (%r14),%edi
lea    0x7d9(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"check\0A\00"
@.str.1 = [22 x i8] c"Moved particel si %i\0A\00"
@.str.2 = [14 x i8] c"Above n error\00"
@.str.3 = [12 x i8] c"GMRES done\0A\00"
@.str.4 = [11 x i8] c"A done %i\0A\00"
@.str.5 = [8 x i8] c"B done\0A\00"
@.str.6 = [20 x i8] c"C done %i %i %i %i\0A\00"
@.str.7 = [4 x i8] c"Cp\0A\00"
@.str.8 = [9 x i8] c"CC done\0A\00"
@.str.9 = [10 x i8] c"CCC done\0A\00"
@.str.10 = [8 x i8] c"D done\0A\00"
@.str.11 = [4 x i8] c"hi\0A\00"
@.str.12 = [13 x i8] c"nnzLU = %d \0A\00"
@.str.13 = [12 x i8] c"ilutp done\0A\00"
@.str.14 = [18 x i8] c"gmres-results.txt\00"
@.str.15 = [2 x i8] c"w\00"
@.str.16 = [17 x i8] c"GMRES itn = %d \0A\00"
define void @calcDeterminantILUGMRES(i32* %0, i32* %1, i32* %2, double* %3, i32* %4, i32* %5, double* %6, i32* %7, i32* %8, double* %9, double* %10) {
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca double*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca double*
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i8*
%27 = alloca i64
%28 = alloca i64
%29 = alloca i32
%30 = alloca i32
%31 = alloca double
%32 = alloca double
%33 = alloca i32
%34 = alloca i32
%35 = alloca [1411790 x double]
%36 = alloca [1411790 x i32]
%37 = alloca i64
%38 = alloca i64
%39 = alloca i64
%40 = alloca i64
%41 = alloca i64
%42 = alloca i64
%43 = alloca i64
%44 = alloca i64
%45 = alloca i64
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca double
%51 = alloca i64
%52 = alloca i64
%53 = alloca i32
%54 = alloca i32
%55 = alloca i32*
%56 = alloca i32
store i32* %0, i32** %12
store i32* %1, i32** %13
store i32* %2, i32** %14
store double* %3, double** %15
store i32* %4, i32** %16
store i32* %5, i32** %17
store double* %6, double** %18
store i32* %7, i32** %19
store i32* %8, i32** %20
store double* %9, double** %21
store double* %10, double** %22
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%59 = load i32*, i32** %13
%60 = load i32, i32* %59
store i32 %60, i32* %23
%61 = load i32, i32* %23
%62 = zext i32 %61 to i64
%63 = call i8* @llvm.stacksave()
store i8* %63, i8** %26
%64 = alloca double, i64 %62
store i64 %62, i64* %27
%65 = load i32, i32* %23
%66 = zext i32 %65 to i64
%67 = alloca double, i64 %66
store i64 %66, i64* %28
store i32 0, i32* %24
br label %68
68: ; preds = %79, %11
%69 = load i32, i32* %24
%70 = load i32, i32* %23
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %82
72: ; preds = %68
%73 = load i32, i32* %24
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %64, i64 %74
store double 0.000000e+00, double* %75
%76 = load i32, i32* %24
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %67, i64 %77
store double 0.000000e+00, double* %78
br label %79
79: ; preds = %72
%80 = load i32, i32* %24
%81 = add nsw i32 %80, 1
store i32 %81, i32* %24
br label %68
82: ; preds = %68
%83 = load i32, i32* @stderr
%84 = load i32*, i32** %12
%85 = load i32, i32* %84
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %85)
%87 = load i32*, i32** %12
%88 = load i32, i32* %87
%89 = load i32, i32* %23
%90 = icmp sge i32 %88, %89
br i1 %90, label %91, label %95
91: ; preds = %82
%92 = load i32, i32* @stderr
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %82
%96 = load i32*, i32** %12
%97 = load i32, i32* %96
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %64, i64 %98
store double 1.000000e+00, double* %99
%100 = load i32*, i32** %14
%101 = load i32, i32* %100
store i32 %101, i32* %29
%102 = load i32, i32* @stderr
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %24
br label %104
104: ; preds = %120, %95
%105 = load i32, i32* %24
%106 = load i32, i32* %23
%107 = add nsw i32 %106, 1
%108 = icmp slt i32 %105, %107
br i1 %108, label %109, label %123
109: ; preds = %104
%110 = load i32*, i32** %16
%111 = load i32, i32* %24
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %110, i64 %112
%114 = load i32, i32* %113
%115 = add nsw i32 %114, 1
%116 = load i32*, i32** %16
%117 = load i32, i32* %24
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %116, i64 %118
store i32 %115, i32* %119
br label %120
120: ; preds = %109
%121 = load i32, i32* %24
%122 = add nsw i32 %121, 1
store i32 %122, i32* %24
br label %104
123: ; preds = %104
%124 = load i32, i32* @stderr
%125 = load i32, i32* %29
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %125)
store i32 0, i32* %24
br label %127
127: ; preds = %142, %123
%128 = load i32, i32* %24
%129 = load i32, i32* %29
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %145
131: ; preds = %127
%132 = load i32*, i32** %17
%133 = load i32, i32* %24
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i32, i32* %132, i64 %134
%136 = load i32, i32* %135
%137 = add nsw i32 %136, 1
%138 = load i32*, i32** %17
%139 = load i32, i32* %24
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i32, i32* %138, i64 %140
store i32 %137, i32* %141
br label %142
142: ; preds = %131
%143 = load i32, i32* %24
%144 = add nsw i32 %143, 1
store i32 %144, i32* %24
br label %127
145: ; preds = %127
%146 = load i32, i32* @stderr
%147 = call i32 (i32, i8*, ...) @fprintf(i32 %146, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%148 = load i32, i32* %23
store i32 %148, i32* %30
store double 1.000000e-02, double* %31
store double 0.000000e+00, double* %32
%149 = load i32, i32* %23
store i32 %149, i32* %33
%150 = load i32, i32* %29
%151 = load i32, i32* %30
%152 = mul nsw i32 2, %151
%153 = load i32, i32* %23
%154 = mul nsw i32 %152, %153
%155 = add nsw i32 %150, %154
%156 = add nsw i32 %155, 2
store i32 %156, i32* %34
%157 = load i32, i32* @stderr
%158 = load i32, i32* %34
%159 = load i32, i32* %29
%160 = load i32, i32* %30
%161 = load i32, i32* %23
%162 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %158, i32 %159, i32 %160, i32 %161)
%163 = load i32, i32* @stderr
%164 = call i32 (i32, i8*, ...) @fprintf(i32 %163, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%165 = load i32, i32* %34
%166 = zext i32 %165 to i64
%167 = alloca double, i64 %166
store i64 %166, i64* %37
%168 = load i32, i32* %34
%169 = zext i32 %168 to i64
%170 = alloca i32, i64 %169
store i64 %169, i64* %38
%171 = load i32, i32* @stderr
%172 = call i32 (i32, i8*, ...) @fprintf(i32 %171, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%173 = load i32, i32* %23
%174 = zext i32 %173 to i64
%175 = alloca i32, i64 %174
store i64 %174, i64* %39
%176 = load i32, i32* %23
%177 = add nsw i32 %176, 1
%178 = zext i32 %177 to i64
%179 = alloca double, i64 %178
store i64 %178, i64* %40
%180 = load i32, i32* %23
%181 = zext i32 %180 to i64
%182 = alloca double, i64 %181
store i64 %181, i64* %41
%183 = load i32, i32* @stderr
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%185 = load i32, i32* %23
%186 = zext i32 %185 to i64
%187 = alloca i32, i64 %186
store i64 %186, i64* %42
%188 = load i32, i32* %23
%189 = zext i32 %188 to i64
%190 = alloca i32, i64 %189
store i64 %189, i64* %43
%191 = load i32, i32* %23
%192 = zext i32 %191 to i64
%193 = alloca i32, i64 %192
store i64 %192, i64* %44
%194 = load i32, i32* @stderr
%195 = call i32 (i32, i8*, ...) @fprintf(i32 %194, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%196 = load i32, i32* %23
%197 = mul nsw i32 2, %196
%198 = zext i32 %197 to i64
%199 = alloca i32, i64 %198
store i64 %198, i64* %45
%200 = load i32, i32* @stderr
%201 = call i32 (i32, i8*, ...) @fprintf(i32 %200, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%202 = load double*, double** %18
%203 = load i32*, i32** %17
%204 = load i32*, i32** %16
%205 = call i32 @ilutp_(i32* %23, double* %202, i32* %203, i32* %204, i32* %30, double* %31, double* %32, i32* %33, double* %167, i32* %170, i32* %175, i32* %34, double* %179, double* %182, i32* %187, i32* %190, i32* %193, i32* %199, i32* %46)
%206 = load i32, i32* %23
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds i32, i32* %170, i64 %207
%209 = load i32, i32* %208
%210 = sub nsw i32 %209, 2
%211 = load i32, i32* %23
%212 = add nsw i32 %210, %211
store i32 %212, i32* %47
%213 = load i32, i32* %47
%214 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i32 %213)
%215 = load i32, i32* @stderr
%216 = call i32 (i32, i8*, ...) @fprintf(i32 %215, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%217 = load i32, i32* %23
store i32 %217, i32* %48
store i32 1, i32* %49
store double 0x3D719799812DEA11, double* %50
%218 = load i32, i32* %23
%219 = zext i32 %218 to i64
%220 = alloca double, i64 %219
store i64 %219, i64* %51
%221 = load i32, i32* %49
%222 = add nsw i32 %221, 1
%223 = zext i32 %222 to i64
%224 = alloca double, i64 %223
store i64 %223, i64* %52
store i32* null, i32** %55
%225 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
store i32* %225, i32** %55
%226 = load i32, i32* %23
%227 = load i32, i32* %48
%228 = load i32, i32* %49
%229 = load double, double* %50
%230 = load double*, double** %21
%231 = load i32*, i32** %20
%232 = load i32*, i32** %19
%233 = load i32*, i32** %55
%234 = call i32 @gmresm(i32 %226, i32 %227, i32 %228, double %229, double* %67, double* %230, i32* %231, i32* %232, double* %167, i32* %170, i32* %175, double* %64, double* %220, double* %224, i32* %53, i32* %54, i32* %233)
store i32 %234, i32* %56
%235 = load i32*, i32** %55
%236 = call i32 @fclose(i32* %235)
%237 = load i32, i32* %54
%238 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i32 %237)
%239 = call i32 @lusol_(i32* %23, double* %67, double* %67, double* %167, i32* %170, i32* %175)
%240 = load double*, double** %22
store double 0.000000e+00, double* %240
store i32 0, i32* %24
br label %241
241: ; preds = %259, %145
%242 = load i32, i32* %24
%243 = load i32, i32* %23
%244 = icmp slt i32 %242, %243
br i1 %244, label %245, label %262
245: ; preds = %241
%246 = load double*, double** %22
%247 = load double, double* %246
%248 = load i32, i32* %24
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %67, i64 %249
%251 = load double, double* %250
%252 = load double*, double** %15
%253 = load i32, i32* %24
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %252, i64 %254
%256 = load double, double* %255
%257 = call double @llvm.fmuladd.f64(double %251, double %256, double %247)
%258 = load double*, double** %22
store double %257, double* %258
br label %259
259: ; preds = %245
%260 = load i32, i32* %24
%261 = add nsw i32 %260, 1
store i32 %261, i32* %24
br label %241
262: ; preds = %241
%263 = load i8*, i8** %26
ret void
}

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