#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*/ zyWeightedSums;
typedef int /*<<< orphan*/ zhWeightedSums;
typedef int /*<<< orphan*/ outputs;
typedef int /*<<< orphan*/ inputs;
typedef int /*<<< orphan*/ hActivationValues;

/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ displayVectorOrMatrix(char *, float *, int, int);
float exp(float);
float log(float);
int /*<<< orphan*/ memcpy(float *, float *, int);
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
int pow(float, int);
int /*<<< orphan*/ printf(char *, int, ...);
scalar_t__ rand();
float tanh(float);
int main(int argc, char **argv) {
  float inputs[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
  float outputs[3][3] = {{0, 1, 0}, {0, 0, 1}, {1, 0, 0}};
  float learningrate = 0.01;
  int iterations = 2000;
  int debug = 1;
  float Wxh[3 + 1][3];
  float Why[3 + 1][3];
  int t, i, h, o;
  for (i = 0; i < 3 + 1; i++)
    for (h = 0; h < 3; h++)
      Wxh[i][h] = ((float)rand() / (double)RAND_MAX) * 0.2 - 0.1;
  for (h = 0; h < 3 + 1; h++)
    for (o = 0; o < 3; o++)
      Why[h][o] = ((float)rand() / (double)RAND_MAX) * 0.2 - 0.1;
  float x[3 + 1];
  float y[3];
  float zhWeightedSums[3];
  float hActivationValues[3 + 1];
  float zyWeightedSums[3];
  float probabilities[3];
  float outputErrors[3];
  float deltaWxh[3 + 1][3];
  float deltaWhy[3 + 1][3];
  float loss, sum;
  for (t = 0; t < iterations; t++) {
    if (debug >= 2)
      printf("--------------------------------Iteration "
             "%4d--------------------------------\n",
             t + 1);
    x[0] = 1;
    memcpy(&x[1], inputs[t % 3], sizeof(inputs[0]));
    if (debug >= 2)
      displayVectorOrMatrix("inputs", x, 3 + 1, 1);
    memcpy(y, outputs[t % 3], sizeof(outputs[0]));
    if (debug >= 2)
      displayVectorOrMatrix("outputs", y, 3, 1);
    memset(zhWeightedSums, 0, sizeof(zhWeightedSums));
    for (h = 0; h < 3; h++)
      for (i = 0; i < 3 + 1; i++)
        zhWeightedSums[h] += x[i] * Wxh[i][h];
    if (debug >= 2)
      displayVectorOrMatrix("input/hidden weights", (float *)Wxh, 3 + 1, 3);
    if (debug >= 2)
      displayVectorOrMatrix("hidden weighted sums", zhWeightedSums, 3, 1);
    hActivationValues[0] = 1;
    for (h = 0; h < 3; h++)
      hActivationValues[h + 1] = tanh(zhWeightedSums[h]);
    if (debug >= 2)
      displayVectorOrMatrix("hidden node activation values", hActivationValues,
                            3 + 1, 1);
    memset(zyWeightedSums, 0, sizeof(zyWeightedSums));
    for (o = 0; o < 3; o++)
      for (h = 0; h < 3 + 1; h++)
        zyWeightedSums[o] += hActivationValues[h] * Why[h][o];
    if (debug >= 2)
      displayVectorOrMatrix("hidden/output weights", (float *)Why, 3 + 1, 3);
    if (debug >= 2)
      displayVectorOrMatrix("output weighted sums", zyWeightedSums, 3, 1);
    for (sum = 0, o = 0; o < 3; o++) {
      probabilities[o] = exp(zyWeightedSums[o]);
      sum += probabilities[o];
    }
    for (o = 0; o < 3; o++)
      probabilities[o] /= sum;
    if (debug >= 2)
      displayVectorOrMatrix("softmax probabilities", probabilities, 3, 1);
    for (o = 0; o < 3; o++)
      outputErrors[o] = probabilities[o] - y[o];
    if (debug >= 2)
      displayVectorOrMatrix("output error", outputErrors, 3, 1);
    for (loss = 0, o = 0; o < 3; o++)
      loss -= y[o] * log(probabilities[o]);
    if (debug >= 1)
      printf("Iteration: %10d, loss: %10.5f\n", t + 1, loss);
    for (h = 0; h < 3 + 1; h++)
      for (int o = 0; o < 3; o++)
        deltaWhy[h][o] = hActivationValues[h] * outputErrors[o];
    if (debug >= 2)
      displayVectorOrMatrix("hidden/output weights gradient", (float *)deltaWhy,
                            3 + 1, 3);
    memset(hActivationValues, 0, sizeof(hActivationValues));
    for (h = 1; h < 3 + 1; h++)
      for (o = 0; o < 3; o++)
        hActivationValues[h] += Why[h][o] * outputErrors[o];
    if (debug >= 2)
      displayVectorOrMatrix("back propagated error values", hActivationValues,
                            3 + 1, 1);
    for (h = 0; h < 3; h++)
      zhWeightedSums[h] =
          hActivationValues[h + 1] * (1 - pow(tanh(zhWeightedSums[h]), 2));
    if (debug >= 2)
      displayVectorOrMatrix("hidden weighted sums after gradient",
                            zhWeightedSums, 3, 1);
    for (int i = 0; i < 3 + 1; i++)
      for (int h = 0; h < 3; h++)
        deltaWxh[i][h] = x[i] * zhWeightedSums[h];
    if (debug >= 2)
      displayVectorOrMatrix("input/hidden weights gradient", (float *)deltaWxh,
                            3 + 1, 3);
    for (int h = 0; h < 3 + 1; h++)
      for (int o = 0; o < 3; o++)
        Why[h][o] -= learningrate * deltaWhy[h][o];
    for (int i = 0; i < 3 + 1; i++)
      for (int h = 0; h < 3; h++)
        Wxh[i][h] -= learningrate * deltaWxh[i][h];
  }
  displayVectorOrMatrix("input/hidden weights", (float *)Wxh, 3 + 1, 3);
  displayVectorOrMatrix("hidden/output weights", (float *)Why, 3 + 1, 3);
  displayVectorOrMatrix("last input", &x[1], 3, 1);
  displayVectorOrMatrix("last output", y, 3, 1);
  displayVectorOrMatrix("predicted output", probabilities, 3, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
movss  0xe43(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  0xe36(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xe29(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
movss  0xe0c(%rip),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  0xdff(%rip),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  0xdf2(%rip),%xmm0
movss  %xmm0,-0x58(%rbp)
movss  0xde1(%rip),%xmm0
movss  %xmm0,-0x74(%rbp)
movl   $0x7d0,-0x78(%rbp)
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0xe8(%rbp)
cmpl   $0x4,-0xe8(%rbp)
jge    12ea <main+0x15a>
movl   $0x0,-0xec(%rbp)
cmpl   $0x3,-0xec(%rbp)
jge    12d1 <main+0x141>
mov    $0x0,%al
call   10b0 <rand@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x2d71(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd80(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd7c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0xe8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xec(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1253 <main+0xc3>
jmp    12d6 <main+0x146>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    123c <main+0xac>
movl   $0x0,-0xec(%rbp)
cmpl   $0x4,-0xec(%rbp)
jge    13a2 <main+0x212>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    1389 <main+0x1f9>
mov    $0x0,%al
call   10b0 <rand@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x2cb9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xcc8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcc4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    130b <main+0x17b>
jmp    138e <main+0x1fe>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    12f4 <main+0x164>
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1e29 <main+0xc99>
cmpl   $0x2,-0x7c(%rbp)
jl     13dc <main+0x24c>
mov    -0xe4(%rbp),%esi
add    $0x1,%esi
lea    0xc43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  0xc20(%rip),%xmm0
movss  %xmm0,-0x100(%rbp)
ff
lea    -0x100(%rbp),%rdi
add    $0x4,%rdi
mov    -0xe4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
lea    -0x40(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
mov    $0xc,%edx
call   1060 <memcpy@plt>
cmpl   $0x2,-0x7c(%rbp)
jl     1444 <main+0x2b4>
lea    -0x100(%rbp),%rsi
lea    0xc32(%rip),%rdi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x10c(%rbp),%rdi
mov    -0xe4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
lea    -0x70(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
mov    $0xc,%edx
call   1060 <memcpy@plt>
cmpl   $0x2,-0x7c(%rbp)
jl     1498 <main+0x308>
lea    -0x10c(%rbp),%rsi
lea    0xbe5(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x118(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
movl   $0x0,-0xec(%rbp)
cmpl   $0x3,-0xec(%rbp)
jge    1558 <main+0x3c8>
movl   $0x0,-0xe8(%rbp)
cmpl   $0x4,-0xe8(%rbp)
jge    153f <main+0x3af>
movslq -0xe8(%rbp),%rax
movss  -0x100(%rbp,%rax,4),%xmm0
ff ff
movslq -0xe8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xec(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movslq -0xec(%rbp),%rax
movss  -0x118(%rbp,%rax,4),%xmm1
ff ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x118(%rbp,%rax,4)
ff ff
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    14cc <main+0x33c>
jmp    1544 <main+0x3b4>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    14b5 <main+0x325>
cmpl   $0x2,-0x7c(%rbp)
jl     157f <main+0x3ef>
lea    -0xb0(%rbp),%rsi
lea    0xb06(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
cmpl   $0x2,-0x7c(%rbp)
jl     15a6 <main+0x416>
lea    -0x118(%rbp),%rsi
lea    0xaf4(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
movss  0xa56(%rip),%xmm0
movss  %xmm0,-0x130(%rbp)
ff
movl   $0x0,-0xec(%rbp)
cmpl   $0x3,-0xec(%rbp)
jge    160a <main+0x47a>
movslq -0xec(%rbp),%rax
movss  -0x118(%rbp,%rax,4),%xmm0
ff ff
call   1030 <tanh@plt>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
cltq
movss  %xmm0,-0x130(%rbp,%rax,4)
ff ff
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    15c0 <main+0x430>
cmpl   $0x2,-0x7c(%rbp)
jl     1631 <main+0x4a1>
lea    -0x130(%rbp),%rsi
lea    0xa7e(%rip),%rdi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x13c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    16f1 <main+0x561>
movl   $0x0,-0xec(%rbp)
cmpl   $0x4,-0xec(%rbp)
jge    16d8 <main+0x548>
movslq -0xec(%rbp),%rax
movss  -0x130(%rbp,%rax,4),%xmm0
ff ff
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movslq -0xf0(%rbp),%rax
movss  -0x13c(%rbp,%rax,4),%xmm1
ff ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x13c(%rbp,%rax,4)
ff ff
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1665 <main+0x4d5>
jmp    16dd <main+0x54d>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    164e <main+0x4be>
cmpl   $0x2,-0x7c(%rbp)
jl     1718 <main+0x588>
lea    -0xe0(%rbp),%rsi
lea    0x9b5(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
cmpl   $0x2,-0x7c(%rbp)
jl     173f <main+0x5af>
lea    -0x13c(%rbp),%rsi
lea    0x9a4(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c8(%rbp)
ff
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    17ba <main+0x62a>
movslq -0xf0(%rbp),%rax
movss  -0x13c(%rbp,%rax,4),%xmm0
ff ff
call   1070 <exp@plt>
movslq -0xf0(%rbp),%rax
movss  %xmm0,-0x148(%rbp,%rax,4)
ff ff
movslq -0xf0(%rbp),%rax
movss  -0x148(%rbp,%rax,4),%xmm0
ff ff
addss  -0x1c8(%rbp),%xmm0
ff
movss  %xmm0,-0x1c8(%rbp)
ff
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    1754 <main+0x5c4>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    180a <main+0x67a>
movss  -0x1c8(%rbp),%xmm1
ff
movslq -0xf0(%rbp),%rax
movss  -0x148(%rbp,%rax,4),%xmm0
ff ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x148(%rbp,%rax,4)
ff ff
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    17c4 <main+0x634>
cmpl   $0x2,-0x7c(%rbp)
jl     1831 <main+0x6a1>
lea    -0x148(%rbp),%rsi
lea    0x8c7(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    188c <main+0x6fc>
movslq -0xf0(%rbp),%rax
movss  -0x148(%rbp,%rax,4),%xmm0
ff ff
movslq -0xf0(%rbp),%rax
subss  -0x10c(%rbp,%rax,4),%xmm0
ff ff
movslq -0xf0(%rbp),%rax
movss  %xmm0,-0x154(%rbp,%rax,4)
ff ff
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    183b <main+0x6ab>
cmpl   $0x2,-0x7c(%rbp)
jl     18b3 <main+0x723>
lea    -0x154(%rbp),%rsi
lea    0x85b(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c4(%rbp)
ff
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    1946 <main+0x7b6>
movslq -0xf0(%rbp),%rax
movss  -0x10c(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x1e8(%rbp)
ff
movslq -0xf0(%rbp),%rax
movss  -0x148(%rbp,%rax,4),%xmm0
ff ff
call   1090 <log@plt>
movaps %xmm0,%xmm2
movss  -0x1e8(%rbp),%xmm0
ff
movss  -0x1c4(%rbp),%xmm1
ff
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c4(%rbp)
ff
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    18c8 <main+0x738>
cmpl   $0x1,-0x7c(%rbp)
jl     1973 <main+0x7e3>
mov    -0xe4(%rbp),%esi
add    $0x1,%esi
movss  -0x1c4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0x7a0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0xec(%rbp)
cmpl   $0x4,-0xec(%rbp)
jge    1a0f <main+0x87f>
movl   $0x0,-0x1cc(%rbp)
cmpl   $0x3,-0x1cc(%rbp)
jge    19f6 <main+0x866>
movslq -0xec(%rbp),%rax
movss  -0x130(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1cc(%rbp),%rax
mulss  -0x154(%rbp,%rax,4),%xmm0
ff ff
movslq -0xec(%rbp),%rcx
lea    -0x1c0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1cc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1cc(%rbp)
jmp    1994 <main+0x804>
jmp    19fb <main+0x86b>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    197d <main+0x7ed>
cmpl   $0x2,-0x7c(%rbp)
jl     1a36 <main+0x8a6>
lea    -0x1c0(%rbp),%rsi
lea    0x704(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
movl   $0x1,-0xec(%rbp)
cmpl   $0x4,-0xec(%rbp)
jge    1af6 <main+0x966>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x3,-0xf0(%rbp)
jge    1add <main+0x94d>
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0xf0(%rbp),%rax
movss  -0x154(%rbp,%rax,4),%xmm2
ff ff
movslq -0xec(%rbp),%rax
movss  -0x130(%rbp,%rax,4),%xmm1
ff ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x130(%rbp,%rax,4)
ff ff
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    1a6a <main+0x8da>
jmp    1ae2 <main+0x952>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1a53 <main+0x8c3>
cmpl   $0x2,-0x7c(%rbp)
jl     1b1d <main+0x98d>
lea    -0x130(%rbp),%rsi
lea    0x63c(%rip),%rdi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
movl   $0x0,-0xec(%rbp)
cmpl   $0x3,-0xec(%rbp)
jge    1bac <main+0xa1c>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
cltq
movss  -0x130(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x1ec(%rbp)
ff
movslq -0xec(%rbp),%rax
movss  -0x118(%rbp,%rax,4),%xmm0
ff ff
call   1030 <tanh@plt>
mov    $0x2,%edi
call   10a0 <pow@plt>
movss  -0x1ec(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movslq -0xec(%rbp),%rax
movss  %xmm0,-0x118(%rbp,%rax,4)
ff ff
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1b27 <main+0x997>
cmpl   $0x2,-0x7c(%rbp)
jl     1bd3 <main+0xa43>
lea    -0x118(%rbp),%rsi
lea    0x5a3(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
movl   $0x0,-0x1d0(%rbp)
cmpl   $0x4,-0x1d0(%rbp)
jge    1c6f <main+0xadf>
movl   $0x0,-0x1d4(%rbp)
cmpl   $0x3,-0x1d4(%rbp)
jge    1c56 <main+0xac6>
movslq -0x1d0(%rbp),%rax
movss  -0x100(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1d4(%rbp),%rax
mulss  -0x118(%rbp,%rax,4),%xmm0
ff ff
movslq -0x1d0(%rbp),%rcx
lea    -0x190(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1d4(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4(%rbp)
jmp    1bf4 <main+0xa64>
jmp    1c5b <main+0xacb>
mov    -0x1d0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d0(%rbp)
jmp    1bdd <main+0xa4d>
cmpl   $0x2,-0x7c(%rbp)
jl     1c96 <main+0xb06>
lea    -0x190(%rbp),%rsi
lea    0x504(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
movl   $0x0,-0x1d8(%rbp)
cmpl   $0x4,-0x1d8(%rbp)
jge    1d53 <main+0xbc3>
movl   $0x0,-0x1dc(%rbp)
cmpl   $0x3,-0x1dc(%rbp)
jge    1d3a <main+0xbaa>
movss  -0x74(%rbp),%xmm0
movslq -0x1d8(%rbp),%rcx
lea    -0x1c0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1dc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movslq -0x1d8(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1dc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movd   %xmm0,%edx
xor    $0x80000000,%edx
movd   %edx,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1dc(%rbp)
jmp    1cb7 <main+0xb27>
jmp    1d3f <main+0xbaf>
mov    -0x1d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d8(%rbp)
jmp    1ca0 <main+0xb10>
movl   $0x0,-0x1e0(%rbp)
cmpl   $0x4,-0x1e0(%rbp)
jge    1e10 <main+0xc80>
movl   $0x0,-0x1e4(%rbp)
cmpl   $0x3,-0x1e4(%rbp)
jge    1df7 <main+0xc67>
movss  -0x74(%rbp),%xmm0
movslq -0x1e0(%rbp),%rcx
lea    -0x190(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1e4(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movslq -0x1e0(%rbp),%rcx
lea    -0xb0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x1e4(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movd   %xmm0,%edx
xor    $0x80000000,%edx
movd   %edx,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1e4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e4(%rbp)
jmp    1d74 <main+0xbe4>
jmp    1dfc <main+0xc6c>
mov    -0x1e0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    1d5d <main+0xbcd>
jmp    1e15 <main+0xc85>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    13ac <main+0x21c>
lea    -0xb0(%rbp),%rsi
lea    0x23f(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0xe0(%rbp),%rsi
lea    0x26a(%rip),%rdi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x100(%rbp),%rsi
add    $0x4,%rsi
lea    0x334(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x10c(%rbp),%rsi
lea    0x322(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    -0x148(%rbp),%rsi
lea    0x311(%rip),%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
xor    %eax,%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x188,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x140(%rsp)
movl   $0x3f800000,0x130(%rsp)
movl   $0x3f800000,0x140(%rsp)
movl   $0x3f800000,0x150(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0x110(%rsp)
movl   $0x0,0x120(%rsp)
movl   $0x3f800000,0x104(%rsp)
movabs $0x3f8000003f800000,%rax
mov    %rax,0x114(%rsp)
mov    $0x8,%ebp
mov    0x2dcf(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xdb9(%rip),%xmm0
addsd  0xdb9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x98(%rsp,%rbp,1)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xd7d(%rip),%xmm0
addsd  0xd7d(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x9c(%rsp,%rbp,1)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd41(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd3d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xa0(%rsp,%rbp,1)
add    $0xc,%rbp
cmp    $0x38,%rbp
jne    1220 <main+0x90>
mov    $0x8,%ebp
nop
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xce9(%rip),%xmm0
addsd  0xce9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x48(%rsp,%rbp,1)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xcb0(%rip),%xmm0
addsd  0xcb0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4c(%rsp,%rbp,1)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xc77(%rip),%xmm0
addsd  0xc77(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x50(%rsp,%rbp,1)
add    $0xc,%rbp
cmp    $0x38,%rbp
jne    12f0 <main+0x160>
mov    $0x1,%ebp
lea    0x130(%rsp),%r13
lea    0x100(%rsp),%r14
xor    %ebx,%ebx
lea    0x10(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
add    %rdx,%rdx
and    $0xfffffffffffffffc,%rdx
lea    (%rdx,%rdx,8),%rax
mov    %r13,%rsi
sub    %rax,%rsi
mov    %r14,%r12
sub    %rax,%r12
movl   $0x3f800000,0x80(%rsp)
lea    0x84(%rsp),%rdi
mov    $0xc,%edx
call   1060 <memcpy@plt>
lea    0x94(%rsp),%rdi
mov    %r12,%rsi
mov    $0xc,%edx
call   1060 <memcpy@plt>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
movss  0x80(%rsp),%xmm2
movss  0x84(%rsp),%xmm1
movss  0xa0(%rsp),%xmm0
mulss  %xmm2,%xmm0
addss  (%rsp),%xmm0
movss  0xac(%rsp),%xmm4
mulss  %xmm1,%xmm4
addss  %xmm0,%xmm4
movss  0x88(%rsp),%xmm3
movss  0xb8(%rsp),%xmm5
mulss  %xmm3,%xmm5
addss  %xmm4,%xmm5
movss  0x8c(%rsp),%xmm4
movss  0xc4(%rsp),%xmm0
mulss  %xmm4,%xmm0
addss  %xmm5,%xmm0
movss  %xmm0,(%rsp)
movss  0xa4(%rsp),%xmm5
mulss  %xmm2,%xmm5
addss  0x4(%rsp),%xmm5
movss  0xb0(%rsp),%xmm6
mulss  %xmm1,%xmm6
addss  %xmm5,%xmm6
movss  0xbc(%rsp),%xmm5
mulss  %xmm3,%xmm5
addss  %xmm6,%xmm5
movss  0xc8(%rsp),%xmm6
mulss  %xmm4,%xmm6
addss  %xmm5,%xmm6
movss  %xmm6,0x4(%rsp)
mulss  0xa8(%rsp),%xmm2
addss  0x8(%rsp),%xmm2
mulss  0xb4(%rsp),%xmm1
addss  %xmm2,%xmm1
mulss  0xc0(%rsp),%xmm3
mulss  0xcc(%rsp),%xmm4
addss  %xmm1,%xmm3
addss  %xmm3,%xmm4
movss  %xmm4,0x8(%rsp)
movl   $0x3f800000,0x10(%rsp)
3f
call   1030 <tanh@plt>
movss  %xmm0,0x14(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <tanh@plt>
movss  %xmm0,0x18(%rsp)
movss  0x8(%rsp),%xmm0
call   1030 <tanh@plt>
movss  %xmm0,0x1c(%rsp)
lea    0x44(%rsp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm1
movss  0x50(%rsp),%xmm0
mulss  %xmm2,%xmm0
addss  0x44(%rsp),%xmm0
movss  0x5c(%rsp),%xmm4
mulss  %xmm1,%xmm4
addss  %xmm0,%xmm4
movss  0x18(%rsp),%xmm3
movss  0x68(%rsp),%xmm5
mulss  %xmm3,%xmm5
addss  %xmm4,%xmm5
movss  0x1c(%rsp),%xmm4
movss  0x74(%rsp),%xmm0
mulss  %xmm4,%xmm0
addss  %xmm5,%xmm0
movss  %xmm0,0x44(%rsp)
movss  0x54(%rsp),%xmm5
mulss  %xmm2,%xmm5
addss  0x48(%rsp),%xmm5
movss  0x60(%rsp),%xmm6
mulss  %xmm1,%xmm6
addss  %xmm5,%xmm6
movss  0x6c(%rsp),%xmm5
mulss  %xmm3,%xmm5
addss  %xmm6,%xmm5
movss  0x78(%rsp),%xmm6
mulss  %xmm4,%xmm6
addss  %xmm5,%xmm6
movss  %xmm6,0x48(%rsp)
mulss  0x58(%rsp),%xmm2
addss  0x4c(%rsp),%xmm2
mulss  0x64(%rsp),%xmm1
addss  %xmm2,%xmm1
mulss  0x70(%rsp),%xmm3
addss  %xmm1,%xmm3
mulss  0x7c(%rsp),%xmm4
addss  %xmm3,%xmm4
movss  %xmm4,0x4c(%rsp)
call   1070 <exp@plt>
movss  %xmm0,0x24(%rsp)
addss  0x9d1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movss  0x48(%rsp),%xmm0
call   1070 <exp@plt>
movss  %xmm0,0x28(%rsp)
movaps 0x30(%rsp),%xmm1
addss  %xmm0,%xmm1
movaps %xmm1,0x30(%rsp)
movss  0x4c(%rsp),%xmm0
call   1070 <exp@plt>
movaps 0x30(%rsp),%xmm3
addss  %xmm0,%xmm3
movss  0x24(%rsp),%xmm1
divss  %xmm3,%xmm1
movss  %xmm1,0x24(%rsp)
movss  0x28(%rsp),%xmm2
unpcklps %xmm0,%xmm2
shufps $0x0,%xmm3,%xmm3
divps  %xmm3,%xmm2
movss  %xmm2,0x28(%rsp)
movaps %xmm2,%xmm0
shufps $0x55,%xmm2,%xmm0
movss  %xmm0,0x2c(%rsp)
movss  0x94(%rsp),%xmm3
movss  %xmm3,0x30(%rsp)
movaps %xmm1,%xmm0
subss  %xmm3,%xmm0
movaps %xmm0,0xd0(%rsp)
movsd  0x98(%rsp),%xmm0
subps  %xmm0,%xmm2
movaps %xmm2,0xf0(%rsp)
movaps %xmm1,%xmm0
call   1090 <log@plt>
mulss  0x30(%rsp),%xmm0
xorps  %xmm1,%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x30(%rsp)
movss  0x98(%rsp),%xmm0
movss  %xmm0,0xe0(%rsp)
movss  0x28(%rsp),%xmm0
call   1090 <log@plt>
mulss  0xe0(%rsp),%xmm0
movss  0x30(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x30(%rsp)
movss  0x9c(%rsp),%xmm0
movss  %xmm0,0xe0(%rsp)
movss  0x2c(%rsp),%xmm0
call   1090 <log@plt>
mulss  0xe0(%rsp),%xmm0
movss  0x30(%rsp),%xmm1
subss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0x8d4(%rip),%rdi
mov    %ebp,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movaps %xmm0,%xmm2
shufps $0x40,%xmm0,%xmm2
movaps 0xd0(%rsp),%xmm6
movaps %xmm6,%xmm4
movaps 0xf0(%rsp),%xmm5
movlhps %xmm5,%xmm4
movaps %xmm6,%xmm3
shufps $0xd4,%xmm5,%xmm3
shufps $0x28,%xmm3,%xmm4
mulps  %xmm2,%xmm4
movaps %xmm4,0x30(%rsp)
shufps $0x5,%xmm1,%xmm0
shufps $0x54,%xmm1,%xmm1
movaps %xmm5,%xmm2
shufps $0x55,%xmm5,%xmm2
movaps %xmm2,0x160(%rsp)
movaps %xmm5,%xmm2
movlhps %xmm6,%xmm2
shufps $0x42,%xmm5,%xmm3
movaps %xmm5,%xmm4
shufps $0x24,%xmm2,%xmm4
mulps  %xmm0,%xmm4
movaps %xmm4,0x170(%rsp)
mulps  %xmm1,%xmm3
movaps %xmm3,0xe0(%rsp)
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
movss  0x5c(%rsp),%xmm0
movaps 0xd0(%rsp),%xmm3
mulss  %xmm3,%xmm0
addss  0x14(%rsp),%xmm0
movss  0x60(%rsp),%xmm1
movaps 0xf0(%rsp),%xmm4
mulss  %xmm4,%xmm1
addss  %xmm0,%xmm1
movss  0x64(%rsp),%xmm0
movaps 0x160(%rsp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x90(%rsp)
movss  %xmm0,0x14(%rsp)
movss  0x68(%rsp),%xmm0
mulss  %xmm3,%xmm0
addss  0x18(%rsp),%xmm0
movss  0x6c(%rsp),%xmm1
mulss  %xmm4,%xmm1
addss  %xmm0,%xmm1
movss  0x70(%rsp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x18(%rsp)
movaps %xmm3,%xmm0
mulss  0x74(%rsp),%xmm0
addss  0x1c(%rsp),%xmm0
movaps %xmm0,%xmm1
movss  0x78(%rsp),%xmm0
mulss  %xmm4,%xmm0
mulss  0x7c(%rsp),%xmm2
addss  %xmm1,%xmm0
addss  %xmm0,%xmm2
movss  %xmm2,0x1c(%rsp)
movss  (%rsp),%xmm0
call   1030 <tanh@plt>
mov    $0x2,%edi
call   10a0 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
mulss  0x90(%rsp),%xmm0
movss  %xmm0,(%rsp)
movss  0x18(%rsp),%xmm0
movss  %xmm0,0xd0(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <tanh@plt>
mov    $0x2,%edi
call   10a0 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
mulss  0xd0(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x1c(%rsp),%xmm0
movss  %xmm0,0xd0(%rsp)
movss  0x8(%rsp),%xmm0
call   1030 <tanh@plt>
mov    $0x2,%edi
call   10a0 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
mulss  0xd0(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm3
movsd  0x80(%rsp),%xmm2
movsd  0x88(%rsp),%xmm1
movaps %xmm2,%xmm4
shufps $0x40,%xmm2,%xmm4
movaps %xmm3,%xmm5
movlhps %xmm0,%xmm5
movaps %xmm0,%xmm6
shufps $0xd4,%xmm3,%xmm6
movlhps %xmm3,%xmm0
shufps $0x28,%xmm6,%xmm0
shufps $0x42,%xmm3,%xmm6
shufps $0x24,%xmm5,%xmm3
mulps  %xmm4,%xmm3
shufps $0x5,%xmm1,%xmm2
movaps 0x654(%rip),%xmm4
movaps 0x30(%rsp),%xmm5
mulps  %xmm4,%xmm5
addps  0x50(%rsp),%xmm5
shufps $0x54,%xmm1,%xmm1
movaps %xmm5,0x50(%rsp)
movaps 0x170(%rsp),%xmm5
mulps  %xmm4,%xmm5
addps  0x60(%rsp),%xmm5
mulps  %xmm2,%xmm6
movaps %xmm5,0x60(%rsp)
movaps 0xe0(%rsp),%xmm2
mulps  %xmm4,%xmm2
mulps  %xmm4,%xmm3
addps  0xa0(%rsp),%xmm3
movaps %xmm3,0xa0(%rsp)
mulps  %xmm4,%xmm6
addps  0xb0(%rsp),%xmm6
addps  0x70(%rsp),%xmm2
mulps  %xmm1,%xmm0
movaps %xmm6,0xb0(%rsp)
mulps  %xmm4,%xmm0
movaps %xmm2,0x70(%rsp)
addps  0xc0(%rsp),%xmm0
add    $0x1,%ebp
movaps %xmm0,0xc0(%rsp)
add    $0xc,%r13
add    $0x1,%rbx
add    $0xc,%r14
cmp    $0x7d1,%ebp
jne    13d0 <main+0x240>
lea    0x5c7(%rip),%rdi
lea    0xa0(%rsp),%rsi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    0x5be(%rip),%rdi
lea    0x50(%rsp),%rsi
mov    $0x4,%edx
mov    $0x3,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    0x5d8(%rip),%rdi
lea    0x84(%rsp),%rsi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    0x5c5(%rip),%rdi
lea    0x94(%rsp),%rsi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
lea    0x5b3(%rip),%rdi
lea    0x24(%rsp),%rsi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1080 <displayVectorOrMatrix@plt>
xor    %eax,%eax
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
@.str = [79 x i8] c"--------------------------------Iteration %4d--------------------------------\0A\00"
@.str.1 = [7 x i8] c"inputs\00"
@.str.2 = [8 x i8] c"outputs\00"
@.str.3 = [21 x i8] c"input/hidden weights\00"
@.str.4 = [21 x i8] c"hidden weighted sums\00"
@.str.5 = [30 x i8] c"hidden node activation values\00"
@.str.6 = [22 x i8] c"hidden/output weights\00"
@.str.7 = [21 x i8] c"output weighted sums\00"
@.str.8 = [22 x i8] c"softmax probabilities\00"
@.str.9 = [13 x i8] c"output error\00"
@.str.10 = [31 x i8] c"Iteration: %10d, loss: %10.5f\0A\00"
@.str.11 = [31 x i8] c"hidden/output weights gradient\00"
@.str.12 = [29 x i8] c"back propagated error values\00"
@.str.13 = [36 x i8] c"hidden weighted sums after gradient\00"
@.str.14 = [30 x i8] c"input/hidden weights gradient\00"
@.str.15 = [11 x i8] c"last input\00"
@.str.16 = [12 x i8] c"last output\00"
@.str.17 = [17 x i8] c"predicted output\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x [3 x float]]
%7 = alloca [3 x [3 x float]]
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
%11 = alloca [4 x [3 x float]]
%12 = alloca [4 x [3 x float]]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [4 x float]
%18 = alloca [3 x float]
%19 = alloca [3 x float]
%20 = alloca [4 x float]
%21 = alloca [3 x float]
%22 = alloca [3 x float]
%23 = alloca [3 x float]
%24 = alloca [4 x [3 x float]]
%25 = alloca [4 x [3 x float]]
%26 = alloca float
%27 = alloca float
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%35 = bitcast [3 x [3 x float]]* %6 to i8*
%36 = bitcast i8* %35 to [3 x [3 x float]]*
%37 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %36, i32 0, i32 0
%38 = getelementptr inbounds [3 x float], [3 x float]* %37, i32 0, i32 0
store float 1.000000e+00, float* %38
%39 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %36, i32 0, i32 1
%40 = getelementptr inbounds [3 x float], [3 x float]* %39, i32 0, i32 1
store float 1.000000e+00, float* %40
%41 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %36, i32 0, i32 2
%42 = getelementptr inbounds [3 x float], [3 x float]* %41, i32 0, i32 2
store float 1.000000e+00, float* %42
%43 = bitcast [3 x [3 x float]]* %7 to i8*
%44 = bitcast i8* %43 to [3 x [3 x float]]*
%45 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %44, i32 0, i32 0
%46 = getelementptr inbounds [3 x float], [3 x float]* %45, i32 0, i32 1
store float 1.000000e+00, float* %46
%47 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %44, i32 0, i32 1
%48 = getelementptr inbounds [3 x float], [3 x float]* %47, i32 0, i32 2
store float 1.000000e+00, float* %48
%49 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %44, i32 0, i32 2
%50 = getelementptr inbounds [3 x float], [3 x float]* %49, i32 0, i32 0
store float 1.000000e+00, float* %50
store float 0x3F847AE140000000, float* %8
store i32 2000, i32* %9
store i32 1, i32* %10
store i32 0, i32* %14
br label %51
51: ; preds = %77, %2
%52 = load i32, i32* %14
%53 = icmp slt i32 %52, 4
br i1 %53, label %54, label %80
54: ; preds = %51
store i32 0, i32* %15
br label %55
55: ; preds = %73, %54
%56 = load i32, i32* %15
%57 = icmp slt i32 %56, 3
br i1 %57, label %58, label %76
58: ; preds = %55
%59 = call i64 (...) @rand()
%60 = sitofp i64 %59 to float
%61 = fpext float %60 to double
%62 = load i64, i64* @RAND_MAX
%63 = sitofp i64 %62 to double
%64 = fdiv double %61, %63
%65 = call double @llvm.fmuladd.f64(double %64, double 2.000000e-01, double -1.000000e-01)
%66 = fptrunc double %65 to float
%67 = load i32, i32* %14
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %11, i64 0, i64 %68
%70 = load i32, i32* %15
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [3 x float], [3 x float]* %69, i64 0, i64 %71
store float %66, float* %72
br label %73
73: ; preds = %58
%74 = load i32, i32* %15
%75 = add nsw i32 %74, 1
store i32 %75, i32* %15
br label %55
76: ; preds = %55
br label %77
77: ; preds = %76
%78 = load i32, i32* %14
%79 = add nsw i32 %78, 1
store i32 %79, i32* %14
br label %51
80: ; preds = %51
store i32 0, i32* %15
br label %81
81: ; preds = %107, %80
%82 = load i32, i32* %15
%83 = icmp slt i32 %82, 4
br i1 %83, label %84, label %110
84: ; preds = %81
store i32 0, i32* %16
br label %85
85: ; preds = %103, %84
%86 = load i32, i32* %16
%87 = icmp slt i32 %86, 3
br i1 %87, label %88, label %106
88: ; preds = %85
%89 = call i64 (...) @rand()
%90 = sitofp i64 %89 to float
%91 = fpext float %90 to double
%92 = load i64, i64* @RAND_MAX
%93 = sitofp i64 %92 to double
%94 = fdiv double %91, %93
%95 = call double @llvm.fmuladd.f64(double %94, double 2.000000e-01, double -1.000000e-01)
%96 = fptrunc double %95 to float
%97 = load i32, i32* %15
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 %98
%100 = load i32, i32* %16
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [3 x float], [3 x float]* %99, i64 0, i64 %101
store float %96, float* %102
br label %103
103: ; preds = %88
%104 = load i32, i32* %16
%105 = add nsw i32 %104, 1
store i32 %105, i32* %16
br label %85
106: ; preds = %85
br label %107
107: ; preds = %106
%108 = load i32, i32* %15
%109 = add nsw i32 %108, 1
store i32 %109, i32* %15
br label %81
110: ; preds = %81
store i32 0, i32* %13
br label %111
111: ; preds = %578, %110
%112 = load i32, i32* %13
%113 = load i32, i32* %9
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %581
115: ; preds = %111
%116 = load i32, i32* %10
%117 = icmp sge i32 %116, 2
br i1 %117, label %118, label %122
118: ; preds = %115
%119 = load i32, i32* %13
%120 = add nsw i32 %119, 1
%121 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %120)
br label %122
122: ; preds = %118, %115
%123 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 0
store float 1.000000e+00, float* %123
%124 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 1
%125 = load i32, i32* %13
%126 = srem i32 %125, 3
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %6, i64 0, i64 %127
%129 = getelementptr inbounds [3 x float], [3 x float]* %128, i64 0, i64 0
%130 = call i32 @memcpy(float* %124, float* %129, i32 12)
%131 = load i32, i32* %10
%132 = icmp sge i32 %131, 2
br i1 %132, label %133, label %136
133: ; preds = %122
%134 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 0
%135 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float* %134, i32 4, i32 1)
br label %136
136: ; preds = %133, %122
%137 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 0
%138 = load i32, i32* %13
%139 = srem i32 %138, 3
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %7, i64 0, i64 %140
%142 = getelementptr inbounds [3 x float], [3 x float]* %141, i64 0, i64 0
%143 = call i32 @memcpy(float* %137, float* %142, i32 12)
%144 = load i32, i32* %10
%145 = icmp sge i32 %144, 2
br i1 %145, label %146, label %149
146: ; preds = %136
%147 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 0
%148 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), float* %147, i32 3, i32 1)
br label %149
149: ; preds = %146, %136
%150 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 0
%151 = call i32 @memset(float* %150, i32 0, i32 12)
store i32 0, i32* %15
br label %152
152: ; preds = %180, %149
%153 = load i32, i32* %15
%154 = icmp slt i32 %153, 3
br i1 %154, label %155, label %183
155: ; preds = %152
store i32 0, i32* %14
br label %156
156: ; preds = %176, %155
%157 = load i32, i32* %14
%158 = icmp slt i32 %157, 4
br i1 %158, label %159, label %179
159: ; preds = %156
%160 = load i32, i32* %14
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 %161
%163 = load float, float* %162
%164 = load i32, i32* %14
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %11, i64 0, i64 %165
%167 = load i32, i32* %15
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [3 x float], [3 x float]* %166, i64 0, i64 %168
%170 = load float, float* %169
%171 = load i32, i32* %15
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 %172
%174 = load float, float* %173
%175 = call float @llvm.fmuladd.f32(float %163, float %170, float %174)
store float %175, float* %173
br label %176
176: ; preds = %159
%177 = load i32, i32* %14
%178 = add nsw i32 %177, 1
store i32 %178, i32* %14
br label %156
179: ; preds = %156
br label %180
180: ; preds = %179
%181 = load i32, i32* %15
%182 = add nsw i32 %181, 1
store i32 %182, i32* %15
br label %152
183: ; preds = %152
%184 = load i32, i32* %10
%185 = icmp sge i32 %184, 2
br i1 %185, label %186, label %190
186: ; preds = %183
%187 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %11, i64 0, i64 0
%188 = bitcast [3 x float]* %187 to float*
%189 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), float* %188, i32 4, i32 3)
br label %190
190: ; preds = %186, %183
%191 = load i32, i32* %10
%192 = icmp sge i32 %191, 2
br i1 %192, label %193, label %196
193: ; preds = %190
%194 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 0
%195 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), float* %194, i32 3, i32 1)
br label %196
196: ; preds = %193, %190
%197 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 0
store float 1.000000e+00, float* %197
store i32 0, i32* %15
br label %198
198: ; preds = %211, %196
%199 = load i32, i32* %15
%200 = icmp slt i32 %199, 3
br i1 %200, label %201, label %214
201: ; preds = %198
%202 = load i32, i32* %15
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 %203
%205 = load float, float* %204
%206 = call float @tanh(float %205)
%207 = load i32, i32* %15
%208 = add nsw i32 %207, 1
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %209
store float %206, float* %210
br label %211
211: ; preds = %201
%212 = load i32, i32* %15
%213 = add nsw i32 %212, 1
store i32 %213, i32* %15
br label %198
214: ; preds = %198
%215 = load i32, i32* %10
%216 = icmp sge i32 %215, 2
br i1 %216, label %217, label %220
217: ; preds = %214
%218 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 0
%219 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), float* %218, i32 4, i32 1)
br label %220
220: ; preds = %217, %214
%221 = getelementptr inbounds [3 x float], [3 x float]* %21, i64 0, i64 0
%222 = call i32 @memset(float* %221, i32 0, i32 12)
store i32 0, i32* %16
br label %223
223: ; preds = %251, %220
%224 = load i32, i32* %16
%225 = icmp slt i32 %224, 3
br i1 %225, label %226, label %254
226: ; preds = %223
store i32 0, i32* %15
br label %227
227: ; preds = %247, %226
%228 = load i32, i32* %15
%229 = icmp slt i32 %228, 4
br i1 %229, label %230, label %250
230: ; preds = %227
%231 = load i32, i32* %15
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %232
%234 = load float, float* %233
%235 = load i32, i32* %15
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 %236
%238 = load i32, i32* %16
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds [3 x float], [3 x float]* %237, i64 0, i64 %239
%241 = load float, float* %240
%242 = load i32, i32* %16
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds [3 x float], [3 x float]* %21, i64 0, i64 %243
%245 = load float, float* %244
%246 = call float @llvm.fmuladd.f32(float %234, float %241, float %245)
store float %246, float* %244
br label %247
247: ; preds = %230
%248 = load i32, i32* %15
%249 = add nsw i32 %248, 1
store i32 %249, i32* %15
br label %227
250: ; preds = %227
br label %251
251: ; preds = %250
%252 = load i32, i32* %16
%253 = add nsw i32 %252, 1
store i32 %253, i32* %16
br label %223
254: ; preds = %223
%255 = load i32, i32* %10
%256 = icmp sge i32 %255, 2
br i1 %256, label %257, label %261
257: ; preds = %254
%258 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 0
%259 = bitcast [3 x float]* %258 to float*
%260 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), float* %259, i32 4, i32 3)
br label %261
261: ; preds = %257, %254
%262 = load i32, i32* %10
%263 = icmp sge i32 %262, 2
br i1 %263, label %264, label %267
264: ; preds = %261
%265 = getelementptr inbounds [3 x float], [3 x float]* %21, i64 0, i64 0
%266 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), float* %265, i32 3, i32 1)
br label %267
267: ; preds = %264, %261
store float 0.000000e+00, float* %27
store i32 0, i32* %16
br label %268
268: ; preds = %286, %267
%269 = load i32, i32* %16
%270 = icmp slt i32 %269, 3
br i1 %270, label %271, label %289
271: ; preds = %268
%272 = load i32, i32* %16
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds [3 x float], [3 x float]* %21, i64 0, i64 %273
%275 = load float, float* %274
%276 = call float @exp(float %275)
%277 = load i32, i32* %16
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 %278
store float %276, float* %279
%280 = load i32, i32* %16
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 %281
%283 = load float, float* %282
%284 = load float, float* %27
%285 = fadd float %284, %283
store float %285, float* %27
br label %286
286: ; preds = %271
%287 = load i32, i32* %16
%288 = add nsw i32 %287, 1
store i32 %288, i32* %16
br label %268
289: ; preds = %268
store i32 0, i32* %16
br label %290
290: ; preds = %300, %289
%291 = load i32, i32* %16
%292 = icmp slt i32 %291, 3
br i1 %292, label %293, label %303
293: ; preds = %290
%294 = load float, float* %27
%295 = load i32, i32* %16
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 %296
%298 = load float, float* %297
%299 = fdiv float %298, %294
store float %299, float* %297
br label %300
300: ; preds = %293
%301 = load i32, i32* %16
%302 = add nsw i32 %301, 1
store i32 %302, i32* %16
br label %290
303: ; preds = %290
%304 = load i32, i32* %10
%305 = icmp sge i32 %304, 2
br i1 %305, label %306, label %309
306: ; preds = %303
%307 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 0
%308 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), float* %307, i32 3, i32 1)
br label %309
309: ; preds = %306, %303
store i32 0, i32* %16
br label %310
310: ; preds = %326, %309
%311 = load i32, i32* %16
%312 = icmp slt i32 %311, 3
br i1 %312, label %313, label %329
313: ; preds = %310
%314 = load i32, i32* %16
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 %315
%317 = load float, float* %316
%318 = load i32, i32* %16
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 %319
%321 = load float, float* %320
%322 = fsub float %317, %321
%323 = load i32, i32* %16
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds [3 x float], [3 x float]* %23, i64 0, i64 %324
store float %322, float* %325
br label %326
326: ; preds = %313
%327 = load i32, i32* %16
%328 = add nsw i32 %327, 1
store i32 %328, i32* %16
br label %310
329: ; preds = %310
%330 = load i32, i32* %10
%331 = icmp sge i32 %330, 2
br i1 %331, label %332, label %335
332: ; preds = %329
%333 = getelementptr inbounds [3 x float], [3 x float]* %23, i64 0, i64 0
%334 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), float* %333, i32 3, i32 1)
br label %335
335: ; preds = %332, %329
store float 0.000000e+00, float* %26
store i32 0, i32* %16
br label %336
336: ; preds = %352, %335
%337 = load i32, i32* %16
%338 = icmp slt i32 %337, 3
br i1 %338, label %339, label %355
339: ; preds = %336
%340 = load i32, i32* %16
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 %341
%343 = load float, float* %342
%344 = load i32, i32* %16
%345 = sext i32 %344 to i64
%346 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 %345
%347 = load float, float* %346
%348 = call float @log(float %347)
%349 = load float, float* %26
%350 = fneg float %343
%351 = call float @llvm.fmuladd.f32(float %350, float %348, float %349)
store float %351, float* %26
br label %352
352: ; preds = %339
%353 = load i32, i32* %16
%354 = add nsw i32 %353, 1
store i32 %354, i32* %16
br label %336
355: ; preds = %336
%356 = load i32, i32* %10
%357 = icmp sge i32 %356, 1
br i1 %357, label %358, label %364
358: ; preds = %355
%359 = load i32, i32* %13
%360 = add nsw i32 %359, 1
%361 = load float, float* %26
%362 = fpext float %361 to double
%363 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %360, double %362)
br label %364
364: ; preds = %358, %355
store i32 0, i32* %15
br label %365
365: ; preds = %392, %364
%366 = load i32, i32* %15
%367 = icmp slt i32 %366, 4
br i1 %367, label %368, label %395
368: ; preds = %365
store i32 0, i32* %28
br label %369
369: ; preds = %388, %368
%370 = load i32, i32* %28
%371 = icmp slt i32 %370, 3
br i1 %371, label %372, label %391
372: ; preds = %369
%373 = load i32, i32* %15
%374 = sext i32 %373 to i64
%375 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %374
%376 = load float, float* %375
%377 = load i32, i32* %28
%378 = sext i32 %377 to i64
%379 = getelementptr inbounds [3 x float], [3 x float]* %23, i64 0, i64 %378
%380 = load float, float* %379
%381 = fmul float %376, %380
%382 = load i32, i32* %15
%383 = sext i32 %382 to i64
%384 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %25, i64 0, i64 %383
%385 = load i32, i32* %28
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds [3 x float], [3 x float]* %384, i64 0, i64 %386
store float %381, float* %387
br label %388
388: ; preds = %372
%389 = load i32, i32* %28
%390 = add nsw i32 %389, 1
store i32 %390, i32* %28
br label %369
391: ; preds = %369
br label %392
392: ; preds = %391
%393 = load i32, i32* %15
%394 = add nsw i32 %393, 1
store i32 %394, i32* %15
br label %365
395: ; preds = %365
%396 = load i32, i32* %10
%397 = icmp sge i32 %396, 2
br i1 %397, label %398, label %402
398: ; preds = %395
%399 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %25, i64 0, i64 0
%400 = bitcast [3 x float]* %399 to float*
%401 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), float* %400, i32 4, i32 3)
br label %402
402: ; preds = %398, %395
%403 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 0
%404 = call i32 @memset(float* %403, i32 0, i32 16)
store i32 1, i32* %15
br label %405
405: ; preds = %433, %402
%406 = load i32, i32* %15
%407 = icmp slt i32 %406, 4
br i1 %407, label %408, label %436
408: ; preds = %405
store i32 0, i32* %16
br label %409
409: ; preds = %429, %408
%410 = load i32, i32* %16
%411 = icmp slt i32 %410, 3
br i1 %411, label %412, label %432
412: ; preds = %409
%413 = load i32, i32* %15
%414 = sext i32 %413 to i64
%415 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 %414
%416 = load i32, i32* %16
%417 = sext i32 %416 to i64
%418 = getelementptr inbounds [3 x float], [3 x float]* %415, i64 0, i64 %417
%419 = load float, float* %418
%420 = load i32, i32* %16
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds [3 x float], [3 x float]* %23, i64 0, i64 %421
%423 = load float, float* %422
%424 = load i32, i32* %15
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %425
%427 = load float, float* %426
%428 = call float @llvm.fmuladd.f32(float %419, float %423, float %427)
store float %428, float* %426
br label %429
429: ; preds = %412
%430 = load i32, i32* %16
%431 = add nsw i32 %430, 1
store i32 %431, i32* %16
br label %409
432: ; preds = %409
br label %433
433: ; preds = %432
%434 = load i32, i32* %15
%435 = add nsw i32 %434, 1
store i32 %435, i32* %15
br label %405
436: ; preds = %405
%437 = load i32, i32* %10
%438 = icmp sge i32 %437, 2
br i1 %438, label %439, label %442
439: ; preds = %436
%440 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 0
%441 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), float* %440, i32 4, i32 1)
br label %442
442: ; preds = %439, %436
store i32 0, i32* %15
br label %443
443: ; preds = %464, %442
%444 = load i32, i32* %15
%445 = icmp slt i32 %444, 3
br i1 %445, label %446, label %467
446: ; preds = %443
%447 = load i32, i32* %15
%448 = add nsw i32 %447, 1
%449 = sext i32 %448 to i64
%450 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %449
%451 = load float, float* %450
%452 = load i32, i32* %15
%453 = sext i32 %452 to i64
%454 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 %453
%455 = load float, float* %454
%456 = call float @tanh(float %455)
%457 = call i32 @pow(float %456, i32 2)
%458 = sub nsw i32 1, %457
%459 = sitofp i32 %458 to float
%460 = fmul float %451, %459
%461 = load i32, i32* %15
%462 = sext i32 %461 to i64
%463 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 %462
store float %460, float* %463
br label %464
464: ; preds = %446
%465 = load i32, i32* %15
%466 = add nsw i32 %465, 1
store i32 %466, i32* %15
br label %443
467: ; preds = %443
%468 = load i32, i32* %10
%469 = icmp sge i32 %468, 2
br i1 %469, label %470, label %473
470: ; preds = %467
%471 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 0
%472 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), float* %471, i32 3, i32 1)
br label %473
473: ; preds = %470, %467
store i32 0, i32* %29
br label %474
474: ; preds = %501, %473
%475 = load i32, i32* %29
%476 = icmp slt i32 %475, 4
br i1 %476, label %477, label %504
477: ; preds = %474
store i32 0, i32* %30
br label %478
478: ; preds = %497, %477
%479 = load i32, i32* %30
%480 = icmp slt i32 %479, 3
br i1 %480, label %481, label %500
481: ; preds = %478
%482 = load i32, i32* %29
%483 = sext i32 %482 to i64
%484 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 %483
%485 = load float, float* %484
%486 = load i32, i32* %30
%487 = sext i32 %486 to i64
%488 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 %487
%489 = load float, float* %488
%490 = fmul float %485, %489
%491 = load i32, i32* %29
%492 = sext i32 %491 to i64
%493 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %24, i64 0, i64 %492
%494 = load i32, i32* %30
%495 = sext i32 %494 to i64
%496 = getelementptr inbounds [3 x float], [3 x float]* %493, i64 0, i64 %495
store float %490, float* %496
br label %497
497: ; preds = %481
%498 = load i32, i32* %30
%499 = add nsw i32 %498, 1
store i32 %499, i32* %30
br label %478
500: ; preds = %478
br label %501
501: ; preds = %500
%502 = load i32, i32* %29
%503 = add nsw i32 %502, 1
store i32 %503, i32* %29
br label %474
504: ; preds = %474
%505 = load i32, i32* %10
%506 = icmp sge i32 %505, 2
br i1 %506, label %507, label %511
507: ; preds = %504
%508 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %24, i64 0, i64 0
%509 = bitcast [3 x float]* %508 to float*
%510 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), float* %509, i32 4, i32 3)
br label %511
511: ; preds = %507, %504
store i32 0, i32* %31
br label %512
512: ; preds = %541, %511
%513 = load i32, i32* %31
%514 = icmp slt i32 %513, 4
br i1 %514, label %515, label %544
515: ; preds = %512
store i32 0, i32* %32
br label %516
516: ; preds = %537, %515
%517 = load i32, i32* %32
%518 = icmp slt i32 %517, 3
br i1 %518, label %519, label %540
519: ; preds = %516
%520 = load float, float* %8
%521 = load i32, i32* %31
%522 = sext i32 %521 to i64
%523 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %25, i64 0, i64 %522
%524 = load i32, i32* %32
%525 = sext i32 %524 to i64
%526 = getelementptr inbounds [3 x float], [3 x float]* %523, i64 0, i64 %525
%527 = load float, float* %526
%528 = load i32, i32* %31
%529 = sext i32 %528 to i64
%530 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 %529
%531 = load i32, i32* %32
%532 = sext i32 %531 to i64
%533 = getelementptr inbounds [3 x float], [3 x float]* %530, i64 0, i64 %532
%534 = load float, float* %533
%535 = fneg float %520
%536 = call float @llvm.fmuladd.f32(float %535, float %527, float %534)
store float %536, float* %533
br label %537
537: ; preds = %519
%538 = load i32, i32* %32
%539 = add nsw i32 %538, 1
store i32 %539, i32* %32
br label %516
540: ; preds = %516
br label %541
541: ; preds = %540
%542 = load i32, i32* %31
%543 = add nsw i32 %542, 1
store i32 %543, i32* %31
br label %512
544: ; preds = %512
store i32 0, i32* %33
br label %545
545: ; preds = %574, %544
%546 = load i32, i32* %33
%547 = icmp slt i32 %546, 4
br i1 %547, label %548, label %577
548: ; preds = %545
store i32 0, i32* %34
br label %549
549: ; preds = %570, %548
%550 = load i32, i32* %34
%551 = icmp slt i32 %550, 3
br i1 %551, label %552, label %573
552: ; preds = %549
%553 = load float, float* %8
%554 = load i32, i32* %33
%555 = sext i32 %554 to i64
%556 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %24, i64 0, i64 %555
%557 = load i32, i32* %34
%558 = sext i32 %557 to i64
%559 = getelementptr inbounds [3 x float], [3 x float]* %556, i64 0, i64 %558
%560 = load float, float* %559
%561 = load i32, i32* %33
%562 = sext i32 %561 to i64
%563 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %11, i64 0, i64 %562
%564 = load i32, i32* %34
%565 = sext i32 %564 to i64
%566 = getelementptr inbounds [3 x float], [3 x float]* %563, i64 0, i64 %565
%567 = load float, float* %566
%568 = fneg float %553
%569 = call float @llvm.fmuladd.f32(float %568, float %560, float %567)
store float %569, float* %566
br label %570
570: ; preds = %552
%571 = load i32, i32* %34
%572 = add nsw i32 %571, 1
store i32 %572, i32* %34
br label %549
573: ; preds = %549
br label %574
574: ; preds = %573
%575 = load i32, i32* %33
%576 = add nsw i32 %575, 1
store i32 %576, i32* %33
br label %545
577: ; preds = %545
br label %578
578: ; preds = %577
%579 = load i32, i32* %13
%580 = add nsw i32 %579, 1
store i32 %580, i32* %13
br label %111
581: ; preds = %111
%582 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %11, i64 0, i64 0
%583 = bitcast [3 x float]* %582 to float*
%584 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), float* %583, i32 4, i32 3)
%585 = getelementptr inbounds [4 x [3 x float]], [4 x [3 x float]]* %12, i64 0, i64 0
%586 = bitcast [3 x float]* %585 to float*
%587 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), float* %586, i32 4, i32 3)
%588 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0, i64 1
%589 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), float* %588, i32 3, i32 1)
%590 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 0
%591 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), float* %590, i32 3, i32 1)
%592 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 0
%593 = call i32 @displayVectorOrMatrix(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), float* %592, i32 3, i32 1)
ret i32 0
}

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