#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ getD(int, int, double *, double *);
int /*<<< orphan*/ getInts(int, int *, double *, int *, double *, double *,
                           double *, int *, int *, int *, double *, double *,
                           double *, double *);
int /*<<< orphan*/ getJ(int, double *, double *, double *);
int /*<<< orphan*/ getK(int, double *, double *, double *);
int /*<<< orphan*/ getS(int, int *, double *, int *, double *, double *,
                        double *, int *, int *, int *, double *, double *,
                        double *, double *);
int /*<<< orphan*/ getT(int, int *, double *, int *, double *, double *,
                        double *, int *, int *, int *, double *, double *,
                        double *, double *);
int /*<<< orphan*/ getV(int, int *, double *, int *, double *, double *,
                        double *, int *, int *, int *, double *, double *,
                        double *, int, int *, double *, double *, double *,
                        double *);
int gjacobi(double *, double *, int, double *, double *, double *, double *);
int /*<<< orphan*/ printf(char *, int, double, double, double, double, double);
int main() {
  int i = 0;
  int nat = 2;
  int nbf = 2;
  int nocc = 1, info;
  int iter, maxiter = 5;
  double h[4], S[4], T[4], V[4], Ints[6];
  double D[4], J[4], K[4];
  double orbe[2], orbs[4], temp[4];
  double temp1[2], temp2[2];
  double H[4];
  double energy, eone, ej, ek;
  double enuke = 1.428571;
  int atno[] = {
      1,
      1,
  };
  double x[] = {
      0.0,
      0.0,
  };
  double y[] = {
      0.0,
      0.0,
  };
  double z[] = {
      -0.35,
      0.35,
  };
  double xcenter[] = {
      0.0,
      0.0,
  };
  double ycenter[] = {
      0.0,
      0.0,
  };
  double zcenter[] = {
      -0.35,
      0.35,
  };
  int lpower[] = {
      0,
      0,
  };
  int mpower[] = {
      0,
      0,
  };
  int npower[] = {
      0,
      0,
  };
  double normc[] = {
      0.999999946968,
      0.999999946968,
  };
  int istart[] = {
      0,
      3,
  };
  int nprim[] = {
      3,
      3,
  };
  double alpha[] = {
      3.425251, 0.623914, 0.168855, 3.425251, 0.623914, 0.168855,
  };
  double coef[] = {
      0.154329, 0.535328, 0.444635, 0.154329, 0.535328, 0.444635,
  };
  double normp[] = {
      1.79444186758, 0.500326654719, 0.187735124967,
      1.79444186758, 0.500326654719, 0.187735124967,
  };
  getS(nbf, nprim, normc, istart, xcenter, ycenter, zcenter, lpower, mpower,
       npower, normp, coef, alpha, S);
  getT(nbf, nprim, normc, istart, xcenter, ycenter, zcenter, lpower, mpower,
       npower, normp, coef, alpha, T);
  getV(nbf, nprim, normc, istart, xcenter, ycenter, zcenter, lpower, mpower,
       npower, normp, coef, alpha, nat, atno, x, y, z, V);
  getInts(nbf, nprim, normc, istart, xcenter, ycenter, zcenter, lpower, mpower,
          npower, normp, coef, alpha, Ints);
  for (i = 0; i < nbf * nbf; i++)
    h[i] = T[i] + V[i];
  getD(nbf, nocc, orbs, D);
  for (i = 0; i < nbf * nbf; i++) {
    orbs[i] = h[i];
    H[i] = h[i];
    temp[i] = S[i];
  }
  info = gjacobi(H, temp, nbf, orbe, orbs, temp1, temp2);
  for (iter = 0; iter < maxiter; iter++) {
    getD(nbf, nocc, orbs, D);
    getJ(nbf, D, Ints, J);
    getK(nbf, D, Ints, K);
    for (i = 0; i < nbf * nbf; i++) {
      H[i] = h[i] + 2 * J[i] - K[i];
      temp[i] = S[i];
    };
    info = gjacobi(H, temp, nbf, orbe, orbs, temp1, temp2);
    eone = 0.;
    for (i = 0; i < nbf * nbf; i++)
      eone += h[i] * D[i];
    ej = 0.;
    for (i = 0; i < nbf * nbf; i++)
      ej += D[i] * J[i];
    ek = 0.;
    for (i = 0; i < nbf * nbf; i++)
      ek += D[i] * K[i];
    energy = enuke + 2 * eone + 2 * ej - ek;
    printf("%d %f %f %f %f %f\n", iter, energy, enuke, eone, ej, ek);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3c8,%rsp
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x2,-0x34(%rbp)
movl   $0x2,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
movl   $0x5,-0x48(%rbp)
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x218(%rbp)
ff
mov    0xe5b(%rip),%rax
mov    %rax,-0x220(%rbp)
lea    -0x230(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <memset@plt>
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <memset@plt>
mov    0xe47(%rip),%rax
mov    %rax,-0x250(%rbp)
mov    0xe41(%rip),%rax
mov    %rax,-0x248(%rbp)
lea    -0x260(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <memset@plt>
lea    -0x270(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <memset@plt>
mov    0xe05(%rip),%rax
mov    %rax,-0x280(%rbp)
mov    0xdff(%rip),%rax
mov    %rax,-0x278(%rbp)
lea    -0x288(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
lea    -0x290(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
lea    -0x298(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
mov    0xdc0(%rip),%rax
mov    %rax,-0x2b0(%rbp)
mov    0xdba(%rip),%rax
mov    %rax,-0x2a8(%rbp)
mov    0xd7c(%rip),%rax
mov    %rax,-0x2b8(%rbp)
mov    0xd76(%rip),%rax
mov    %rax,-0x2c0(%rbp)
lea    -0x2f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1080 <memset@plt>
movsd  0xd34(%rip),%xmm0
movsd  %xmm0,-0x2f0(%rbp)
ff
movsd  0xd1c(%rip),%xmm0
movsd  %xmm0,-0x2e8(%rbp)
ff
movsd  0xd04(%rip),%xmm0
movsd  %xmm0,-0x2e0(%rbp)
ff
movsd  0xd04(%rip),%xmm0
movsd  %xmm0,-0x2d8(%rbp)
ff
movsd  0xcec(%rip),%xmm0
movsd  %xmm0,-0x2d0(%rbp)
ff
movsd  0xcd4(%rip),%xmm0
movsd  %xmm0,-0x2c8(%rbp)
ff
lea    -0x320(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1080 <memset@plt>
movsd  0xca9(%rip),%xmm0
movsd  %xmm0,-0x320(%rbp)
ff
movsd  0xc91(%rip),%xmm0
movsd  %xmm0,-0x318(%rbp)
ff
movsd  0xc79(%rip),%xmm0
movsd  %xmm0,-0x310(%rbp)
ff
movsd  0xc79(%rip),%xmm0
movsd  %xmm0,-0x308(%rbp)
ff
movsd  0xc61(%rip),%xmm0
movsd  %xmm0,-0x300(%rbp)
ff
movsd  0xc49(%rip),%xmm0
movsd  %xmm0,-0x2f8(%rbp)
ff
lea    -0x350(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1080 <memset@plt>
movsd  0xc1e(%rip),%xmm0
movsd  %xmm0,-0x350(%rbp)
ff
movsd  0xc06(%rip),%xmm0
movsd  %xmm0,-0x348(%rbp)
ff
movsd  0xbee(%rip),%xmm0
movsd  %xmm0,-0x340(%rbp)
ff
movsd  0xbee(%rip),%xmm0
movsd  %xmm0,-0x338(%rbp)
ff
movsd  0xbd6(%rip),%xmm0
movsd  %xmm0,-0x330(%rbp)
ff
movsd  0xbbe(%rip),%xmm0
movsd  %xmm0,-0x328(%rbp)
ff
mov    -0x38(%rbp),%edi
lea    -0x2c0(%rbp),%rsi
lea    -0x2b0(%rbp),%rdx
lea    -0x2b8(%rbp),%rcx
lea    -0x260(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    -0x280(%rbp),%r13
lea    -0x288(%rbp),%r12
lea    -0x290(%rbp),%r15
lea    -0x298(%rbp),%r14
lea    -0x350(%rbp),%rbx
lea    -0x320(%rbp),%r11
lea    -0x2f0(%rbp),%r10
lea    -0x90(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   10c0 <getS@plt>
mov    -0x38(%rbp),%edi
lea    -0x2c0(%rbp),%rsi
lea    -0x2b0(%rbp),%rdx
lea    -0x2b8(%rbp),%rcx
lea    -0x260(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    -0x280(%rbp),%r13
lea    -0x288(%rbp),%r12
lea    -0x290(%rbp),%r15
lea    -0x298(%rbp),%r14
lea    -0x350(%rbp),%rbx
lea    -0x320(%rbp),%r11
lea    -0x2f0(%rbp),%r10
lea    -0xb0(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1050 <getT@plt>
mov    -0x38(%rbp),%edi
lea    -0x2c0(%rbp),%rsi
lea    -0x2b0(%rbp),%rdx
lea    -0x2b8(%rbp),%rcx
lea    -0x260(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    -0x280(%rbp),%rax
mov    %rax,-0x380(%rbp)
lea    -0x288(%rbp),%rax
mov    %rax,-0x378(%rbp)
lea    -0x290(%rbp),%rax
mov    %rax,-0x370(%rbp)
lea    -0x298(%rbp),%rax
mov    %rax,-0x368(%rbp)
lea    -0x350(%rbp),%rax
mov    %rax,-0x360(%rbp)
lea    -0x320(%rbp),%r13
lea    -0x2f0(%rbp),%r12
mov    -0x34(%rbp),%r15d
lea    -0x220(%rbp),%r14
lea    -0x230(%rbp),%rbx
lea    -0x240(%rbp),%r11
lea    -0x250(%rbp),%r10
lea    -0xd0(%rbp),%rax
mov    %rax,-0x358(%rbp)
mov    -0x380(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x378(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x370(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x368(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x360(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x358(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15d,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %rax,0x60(%rsp)
call   1060 <getV@plt>
mov    -0x38(%rbp),%edi
lea    -0x2c0(%rbp),%rsi
lea    -0x2b0(%rbp),%rdx
lea    -0x2b8(%rbp),%rcx
lea    -0x260(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    -0x280(%rbp),%r13
lea    -0x288(%rbp),%r12
lea    -0x290(%rbp),%r15
lea    -0x298(%rbp),%r14
lea    -0x350(%rbp),%rbx
lea    -0x320(%rbp),%r11
lea    -0x2f0(%rbp),%r10
lea    -0x100(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1090 <getInts@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    174a <main+0x5aa>
movslq -0x30(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
addsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1706 <main+0x566>
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
lea    -0x190(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1040 <getD@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    17d2 <main+0x632>
movslq -0x30(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x190(%rbp,%rax,8)
ff ff
movslq -0x30(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x1f0(%rbp,%rax,8)
ff ff
movslq -0x30(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    176a <main+0x5ca>
lea    -0x1f0(%rbp),%rdi
lea    -0x1b0(%rbp),%rsi
mov    -0x38(%rbp),%edx
lea    -0x170(%rbp),%rcx
lea    -0x190(%rbp),%r8
lea    -0x1c0(%rbp),%r9
lea    -0x1d0(%rbp),%rax
mov    %rax,(%rsp)
call   10b0 <gjacobi@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1aca <main+0x92a>
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
lea    -0x190(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1040 <getD@plt>
mov    -0x38(%rbp),%edi
lea    -0x120(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x140(%rbp),%rcx
call   1030 <getJ@plt>
mov    -0x38(%rbp),%edi
lea    -0x120(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x160(%rbp),%rcx
call   10a0 <getK@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    18eb <main+0x74b>
movslq -0x30(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm1
movslq -0x30(%rbp),%rax
movsd  -0x140(%rbp,%rax,8),%xmm0
ff ff
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movslq -0x30(%rbp),%rax
subsd  -0x160(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x1f0(%rbp,%rax,8)
ff ff
movslq -0x30(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1878 <main+0x6d8>
lea    -0x1f0(%rbp),%rdi
lea    -0x1b0(%rbp),%rsi
mov    -0x38(%rbp),%edx
lea    -0x170(%rbp),%rcx
lea    -0x190(%rbp),%r8
lea    -0x1c0(%rbp),%r9
lea    -0x1d0(%rbp),%rax
mov    %rax,(%rsp)
call   10b0 <gjacobi@plt>
mov    %eax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    1985 <main+0x7e5>
movslq -0x30(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x30(%rbp),%rax
movsd  -0x120(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x200(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1936 <main+0x796>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    19e9 <main+0x849>
movslq -0x30(%rbp),%rax
movsd  -0x120(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  -0x140(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x208(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1997 <main+0x7f7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x38(%rbp),%ecx
imul   -0x38(%rbp),%ecx
cmp    %ecx,%eax
jge    1a4d <main+0x8ad>
movslq -0x30(%rbp),%rax
movsd  -0x120(%rbp,%rax,8),%xmm0
ff ff
movslq -0x30(%rbp),%rax
movsd  -0x160(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x210(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    19fb <main+0x85b>
movsd  -0x218(%rbp),%xmm0
ff
movsd  -0x200(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x208(%rbp),%xmm0
ff
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x210(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f8(%rbp)
ff
mov    -0x44(%rbp),%esi
movsd  -0x1f8(%rbp),%xmm0
ff
movsd  -0x218(%rbp),%xmm1
ff
movsd  -0x200(%rbp),%xmm2
ff
movsd  -0x208(%rbp),%xmm3
ff
movsd  -0x210(%rbp),%xmm4
ff
lea    0x5d9(%rip),%rdi
call   1070 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1812 <main+0x672>
xor    %eax,%eax
add    $0x3c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2f8,%rsp
movabs $0x100000001,%rax
mov    %rax,0x78(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps 0xed6(%rip),%xmm1
movaps %xmm1,0x200(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm1,0x1f0(%rsp)
movq   $0x0,0x70(%rsp)
movq   $0x0,0x68(%rsp)
movq   $0x0,0x60(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x300000000,%rax
mov    %rax,0x8(%rsp)
or     $0x3,%rax
mov    %rax,(%rsp)
movaps 0xdd7(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xdd8(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xdd9(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xdda(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xddb(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xddc(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movaps 0xddd(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xdde(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xddf(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
lea    0x120(%rsp),%r10
lea    0x140(%rsp),%rax
lea    0x1c0(%rsp),%r12
lea    0x190(%rsp),%rbx
lea    0x60(%rsp),%rbp
lea    0x68(%rsp),%r13
lea    0x70(%rsp),%r14
lea    0x1f0(%rsp),%r11
mov    %rsp,%rsi
lea    0x30(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0x50(%rsp),%r8
lea    0x40(%rsp),%r9
mov    $0x2,%edi
push   %r10
push   %rax
push   %r12
push   %rbx
mov    %rbx,%r15
push   %rbp
push   %r13
mov    %r13,%rbx
push   %r14
push   %r11
mov    %r11,%r13
call   10b0 <getS@plt>
add    $0x40,%rsp
lea    0x2a0(%rsp),%rax
mov    $0x2,%edi
mov    %rsp,%rsi
lea    0x30(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0x50(%rsp),%r8
lea    0x40(%rsp),%r9
push   %rax
lea    0x148(%rsp),%rax
push   %rax
push   %r12
push   %r15
push   %rbp
mov    %rbp,%r12
push   %rbx
mov    %rbx,%r15
push   %r14
push   %r13
call   1050 <getT@plt>
add    $0x38,%rsp
lea    0x288(%rsp),%rax
lea    0x208(%rsp),%rbx
lea    0x218(%rsp),%rbp
lea    0x228(%rsp),%r10
lea    0x80(%rsp),%r11
mov    $0x2,%edi
lea    0x8(%rsp),%rsi
lea    0x38(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x48(%rsp),%r9
push   %rax
push   %rbx
push   %rbp
push   %r10
push   %r11
push   $0x2
lea    0x178(%rsp),%rax
push   %rax
lea    0x200(%rsp),%rax
push   %rax
lea    0x1d8(%rsp),%rax
push   %rax
push   %r12
push   %r15
push   %r14
mov    %r14,%rbx
push   %r13
call   1060 <getV@plt>
add    $0x70,%rsp
lea    0x2c0(%rsp),%r14
mov    $0x2,%edi
mov    %rsp,%rsi
lea    0x30(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0x50(%rsp),%r8
lea    0x40(%rsp),%r9
push   %r14
lea    0x148(%rsp),%rax
push   %rax
lea    0x1d0(%rsp),%rax
push   %rax
lea    0x1a8(%rsp),%rax
push   %rax
push   %r12
push   %r15
push   %rbx
push   %r13
call   1080 <getInts@plt>
add    $0x40,%rsp
movapd 0x2a0(%rsp),%xmm1
movapd 0x2b0(%rsp),%xmm0
addpd  0x280(%rsp),%xmm1
movapd %xmm1,0x20(%rsp)
addpd  0x290(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
lea    0x260(%rsp),%r15
lea    0x100(%rsp),%rbx
mov    $0x2,%edi
mov    $0x1,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1040 <getD@plt>
movaps 0x20(%rsp),%xmm1
movaps %xmm1,0x260(%rsp)
movaps 0x10(%rsp),%xmm0
movaps %xmm0,0x270(%rsp)
movaps %xmm1,0xc0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps 0x120(%rsp),%xmm0
movaps 0x130(%rsp),%xmm1
movaps %xmm0,0xe0(%rsp)
movaps %xmm1,0xf0(%rsp)
sub    $0x8,%rsp
lea    0x238(%rsp),%rax
lea    0xc8(%rsp),%rdi
lea    0xe8(%rsp),%rsi
lea    0x258(%rsp),%rcx
lea    0x248(%rsp),%r9
mov    $0x2,%edx
mov    %r15,%r8
push   %rax
call   10a0 <gjacobi@plt>
add    $0x10,%rsp
movaps 0x20(%rsp),%xmm0
movhlps %xmm0,%xmm0
movaps %xmm0,0x180(%rsp)
movapd 0x10(%rsp),%xmm0
unpckhpd %xmm0,%xmm0
movapd %xmm0,0x170(%rsp)
xor    %r13d,%r13d
lea    0x80(%rsp),%r12
lea    0xb8d(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2,%edi
mov    $0x1,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1040 <getD@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
lea    0xa0(%rsp),%rcx
call   1030 <getJ@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
call   1090 <getK@plt>
movaps 0x120(%rsp),%xmm0
movaps 0x130(%rsp),%xmm1
movaps %xmm0,0xe0(%rsp)
movaps %xmm1,0xf0(%rsp)
movapd 0xa0(%rsp),%xmm0
movapd 0xb0(%rsp),%xmm1
addpd  %xmm0,%xmm0
addpd  0x20(%rsp),%xmm0
subpd  0x80(%rsp),%xmm0
movapd %xmm0,0xc0(%rsp)
addpd  %xmm1,%xmm1
addpd  0x10(%rsp),%xmm1
subpd  0x90(%rsp),%xmm1
movapd %xmm1,0xd0(%rsp)
sub    $0x8,%rsp
lea    0xc8(%rsp),%rdi
lea    0xe8(%rsp),%rsi
mov    $0x2,%edx
lea    0x258(%rsp),%rcx
mov    %r15,%r8
lea    0x248(%rsp),%r9
lea    0x238(%rsp),%rax
push   %rax
call   10a0 <gjacobi@plt>
add    $0x10,%rsp
movsd  0x100(%rsp),%xmm3
movsd  0x108(%rsp),%xmm2
movsd  0x110(%rsp),%xmm1
movsd  0x118(%rsp),%xmm0
movapd 0x20(%rsp),%xmm4
mulsd  %xmm3,%xmm4
xorpd  %xmm7,%xmm7
addsd  %xmm7,%xmm4
movapd 0x180(%rsp),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
movapd 0x10(%rsp),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm5,%xmm4
movsd  0x80(%rsp),%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm7,%xmm5
movsd  0x88(%rsp),%xmm6
mulsd  %xmm2,%xmm6
addsd  %xmm5,%xmm6
movapd 0x9d9(%rip),%xmm5
unpcklpd %xmm6,%xmm5
mulsd  0xa0(%rsp),%xmm3
addsd  %xmm7,%xmm3
mulsd  0xa8(%rsp),%xmm2
addsd  %xmm3,%xmm2
movsd  0xb0(%rsp),%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm2,%xmm6
movsd  0xb8(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm6,%xmm3
movapd 0x170(%rsp),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm2,%xmm4
unpcklpd %xmm1,%xmm4
movsd  0x9a8(%rip),%xmm6
movapd %xmm6,%xmm1
movhpd 0x90(%rsp),%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm5,%xmm1
movapd %xmm3,%xmm4
unpcklpd %xmm0,%xmm4
movapd %xmm6,%xmm0
movhpd 0x98(%rsp),%xmm0
mulpd  %xmm4,%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,%xmm4
unpckhpd %xmm0,%xmm4
subsd  %xmm4,%xmm0
mov    %rbp,%rdi
mov    %r13d,%esi
movsd  0x964(%rip),%xmm1
call   1070 <printf@plt>
add    $0x1,%r13d
cmp    $0x5,%r13d
jne    1550 <main+0x3c0>
xor    %eax,%eax
add    $0x2f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@__const.main.zcenter = [2 x double] [double -3.500000e-01, double 3.500000e-01]
@__const.main.normc = [2 x double] [double 0x3FEFFFFFE3875661, double 0x3FEFFFFFE3875661]
@.str = [19 x i8] c"%d %f %f %f %f %f\0A\00"
define i32 @main() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [6 x double]
%6 = alloca [4 x double]
%7 = alloca [4 x double]
%8 = alloca [4 x double]
%9 = alloca [2 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = bitcast [4 x double]* %11 to i8*
%13 = alloca [2 x double]
%14 = alloca [2 x double]
%15 = alloca [4 x double]
%16 = alloca i64
%17 = alloca [2 x double]
%18 = alloca [2 x double]
%19 = alloca [2 x double]
%20 = alloca [2 x double]
%21 = alloca [2 x double]
%22 = alloca [2 x double]
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca [2 x double]
%27 = alloca i64
%28 = alloca i64
%29 = alloca [6 x double]
%30 = alloca [6 x double]
%31 = alloca [6 x double]
%32 = bitcast [4 x double]* %3 to i8*
%33 = bitcast [4 x double]* %4 to i8*
%34 = bitcast [6 x double]* %5 to i8*
%35 = bitcast [4 x double]* %6 to i8*
%36 = bitcast [4 x double]* %7 to i8*
%37 = bitcast [4 x double]* %8 to i8*
%38 = bitcast [2 x double]* %9 to i8*
%39 = bitcast [4 x double]* %10 to i8*
%40 = bitcast [2 x double]* %13 to i8*
%41 = bitcast [2 x double]* %14 to i8*
%42 = bitcast [4 x double]* %15 to i8*
%43 = bitcast i64* %16 to i8*
store i64 4294967297, i64* %16
%44 = bitcast [2 x double]* %17 to i8*
%45 = bitcast [2 x double]* %18 to i8*
%46 = bitcast [2 x double]* %19 to i8*
%47 = bitcast [2 x double]* %20 to i8*
%48 = bitcast [2 x double]* %21 to i8*
%49 = bitcast [2 x double]* %22 to i8*
%50 = bitcast i64* %23 to i8*
store i64 0, i64* %23
%51 = bitcast i64* %24 to i8*
store i64 0, i64* %24
%52 = bitcast i64* %25 to i8*
store i64 0, i64* %25
%53 = bitcast [2 x double]* %26 to i8*
%54 = bitcast i64* %27 to i8*
store i64 12884901888, i64* %27
%55 = bitcast i64* %28 to i8*
store i64 12884901891, i64* %28
%56 = bitcast [6 x double]* %29 to i8*
%57 = getelementptr inbounds [6 x double], [6 x double]* %29, i64 0, i64 0
%58 = bitcast [6 x double]* %29 to <2 x double>*
store <2 x double> <double 0x400B66E9FF0CBAF9, double 6.239140e-01>, <2 x double>* %58
%59 = getelementptr inbounds [6 x double], [6 x double]* %29, i64 0, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> <double 1.688550e-01, double 0x400B66E9FF0CBAF9>, <2 x double>* %60
%61 = getelementptr inbounds [6 x double], [6 x double]* %29, i64 0, i64 4
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 6.239140e-01, double 1.688550e-01>, <2 x double>* %62
%63 = bitcast [6 x double]* %30 to i8*
%64 = getelementptr inbounds [6 x double], [6 x double]* %30, i64 0, i64 0
%65 = bitcast [6 x double]* %30 to <2 x double>*
store <2 x double> <double 1.543290e-01, double 5.353280e-01>, <2 x double>* %65
%66 = getelementptr inbounds [6 x double], [6 x double]* %30, i64 0, i64 2
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> <double 4.446350e-01, double 1.543290e-01>, <2 x double>* %67
%68 = getelementptr inbounds [6 x double], [6 x double]* %30, i64 0, i64 4
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> <double 5.353280e-01, double 4.446350e-01>, <2 x double>* %69
%70 = bitcast [6 x double]* %31 to i8*
%71 = getelementptr inbounds [6 x double], [6 x double]* %31, i64 0, i64 0
%72 = bitcast [6 x double]* %31 to <2 x double>*
store <2 x double> <double 0x3FFCB608ACFD44A9, double 0x3FE002AD0B6AB9DE>, <2 x double>* %72
%73 = getelementptr inbounds [6 x double], [6 x double]* %31, i64 0, i64 2
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> <double 0x3FC807B45F059936, double 0x3FFCB608ACFD44A9>, <2 x double>* %74
%75 = getelementptr inbounds [6 x double], [6 x double]* %31, i64 0, i64 4
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> <double 0x3FE002AD0B6AB9DE, double 0x3FC807B45F059936>, <2 x double>* %76
%77 = bitcast i64* %28 to i32*
%78 = getelementptr inbounds [2 x double], [2 x double]* %26, i64 0, i64 0
%79 = bitcast i64* %27 to i32*
%80 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 0
%81 = getelementptr inbounds [2 x double], [2 x double]* %21, i64 0, i64 0
%82 = getelementptr inbounds [2 x double], [2 x double]* %22, i64 0, i64 0
%83 = bitcast i64* %23 to i32*
%84 = bitcast i64* %24 to i32*
%85 = bitcast i64* %25 to i32*
%86 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%87 = call i32 @getS(i32 2, i32* %77, double* %78, i32* %79, double* %80, double* %81, double* %82, i32* %83, i32* %84, i32* %85, double* %71, double* %64, double* %57, double* %86)
%88 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%89 = call i32 @getT(i32 2, i32* %77, double* %78, i32* %79, double* %80, double* %81, double* %82, i32* %83, i32* %84, i32* %85, double* %71, double* %64, double* %57, double* %88)
%90 = bitcast i64* %16 to i32*
%91 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%92 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
%93 = getelementptr inbounds [2 x double], [2 x double]* %19, i64 0, i64 0
%94 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%95 = call i32 @getV(i32 2, i32* %77, double* %78, i32* %79, double* %80, double* %81, double* %82, i32* %83, i32* %84, i32* %85, double* %71, double* %64, double* %57, i32 2, i32* %90, double* %91, double* %92, double* %93, double* %94)
%96 = getelementptr inbounds [6 x double], [6 x double]* %5, i64 0, i64 0
%97 = call i32 @getInts(i32 2, i32* %77, double* %78, i32* %79, double* %80, double* %81, double* %82, i32* %83, i32* %84, i32* %85, double* %71, double* %64, double* %57, double* %96)
%98 = bitcast [4 x double]* %3 to <2 x double>*
%99 = load <2 x double>, <2 x double>* %98
%100 = bitcast [4 x double]* %4 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = fadd <2 x double> %99, %101
%103 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
%104 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%105 = bitcast double* %103 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = bitcast double* %104 to <2 x double>*
%108 = load <2 x double>, <2 x double>* %107
%109 = fadd <2 x double> %106, %108
%110 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%111 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%112 = call i32 @getD(i32 2, i32 1, double* %110, double* %111)
%113 = bitcast [4 x double]* %10 to <2 x double>*
store <2 x double> %102, <2 x double>* %113
%114 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
%115 = bitcast double* %114 to <2 x double>*
store <2 x double> %109, <2 x double>* %115
%116 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 0
%117 = bitcast [4 x double]* %15 to <2 x double>*
store <2 x double> %102, <2 x double>* %117
%118 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 2
%119 = bitcast double* %118 to <2 x double>*
store <2 x double> %109, <2 x double>* %119
%120 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%121 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%122 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 0
%123 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%124 = call i32 @gjacobi(double* %116, double* %120, i32 2, double* %121, double* %110, double* %122, double* %123)
%125 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%126 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%127 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 1
%128 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 1
%129 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 2
%130 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 2
%131 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 3
%132 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 3
%133 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%134 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 2
%135 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 3
%136 = bitcast [4 x double]* %7 to <2 x double>*
%137 = bitcast [4 x double]* %8 to <2 x double>*
%138 = bitcast [4 x double]* %15 to <2 x double>*
%139 = bitcast double* %129 to <2 x double>*
%140 = bitcast double* %130 to <2 x double>*
%141 = bitcast double* %118 to <2 x double>*
%142 = extractelement <2 x double> %102, i64 0
%143 = extractelement <2 x double> %102, i64 1
%144 = extractelement <2 x double> %109, i64 0
%145 = extractelement <2 x double> %109, i64 1
br label %146
146: ; preds = %0, %146
%147 = phi i32 [ 0, %0 ], [ %195, %146 ]
%148 = call i32 @getD(i32 2, i32 1, double* %110, double* %111)
%149 = call i32 @getJ(i32 2, double* %111, double* %96, double* %125)
%150 = call i32 @getK(i32 2, double* %111, double* %96, double* %126)
%151 = load <2 x double>, <2 x double>* %136
%152 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %151, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %102)
%153 = load <2 x double>, <2 x double>* %137
%154 = fsub <2 x double> %152, %153
store <2 x double> %154, <2 x double>* %138
%155 = load <2 x double>, <2 x double>* %139
%156 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %155, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %109)
%157 = load <2 x double>, <2 x double>* %140
%158 = fsub <2 x double> %156, %157
store <2 x double> %158, <2 x double>* %141
%159 = call i32 @gjacobi(double* %116, double* %120, i32 2, double* %121, double* %110, double* %122, double* %123)
%160 = load double, double* %111
%161 = load double, double* %133
%162 = load double, double* %134
%163 = load double, double* %135
%164 = load double, double* %125
%165 = load double, double* %127
%166 = load double, double* %129
%167 = load double, double* %131
%168 = call double @llvm.fmuladd.f64(double %142, double %160, double 0.000000e+00)
%169 = call double @llvm.fmuladd.f64(double %143, double %161, double %168)
%170 = call double @llvm.fmuladd.f64(double %144, double %162, double %169)
%171 = load double, double* %126
%172 = call double @llvm.fmuladd.f64(double %160, double %171, double 0.000000e+00)
%173 = load double, double* %128
%174 = call double @llvm.fmuladd.f64(double %161, double %173, double %172)
%175 = load double, double* %130
%176 = load double, double* %132
%177 = call double @llvm.fmuladd.f64(double %160, double %164, double 0.000000e+00)
%178 = call double @llvm.fmuladd.f64(double %161, double %165, double %177)
%179 = call double @llvm.fmuladd.f64(double %162, double %166, double %178)
%180 = call double @llvm.fmuladd.f64(double %163, double %167, double %179)
%181 = call double @llvm.fmuladd.f64(double %145, double %163, double %170)
%182 = insertelement <2 x double> poison, double %181, i64 0
%183 = insertelement <2 x double> %182, double %162, i64 1
%184 = insertelement <2 x double> <double 2.000000e+00, double poison>, double %175, i64 1
%185 = insertelement <2 x double> <double 0x3FF6DB6D43D03969, double poison>, double %174, i64 1
%186 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %183, <2 x double> %184, <2 x double> %185)
%187 = insertelement <2 x double> poison, double %180, i64 0
%188 = insertelement <2 x double> %187, double %163, i64 1
%189 = insertelement <2 x double> <double 2.000000e+00, double poison>, double %176, i64 1
%190 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %188, <2 x double> %189, <2 x double> %186)
%191 = extractelement <2 x double> %190, i64 0
%192 = extractelement <2 x double> %190, i64 1
%193 = fsub double %191, %192
%194 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %147, double %193, double 0x3FF6DB6D43D03969, double %181, double %180, double %192)
%195 = add nuw nsw i32 %147, 1
%196 = icmp eq i32 %195, 5
br i1 %196, label %197, label %146
197: ; preds = %146
ret i32 0
}