#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ copy(int, int *, int *);
int /*<<< orphan*/ f2m_Add(int, int *, int *, int *);
int /*<<< orphan*/ f2m_calculateInverse(int, int *, int *, int *);
int /*<<< orphan*/ f2m_mult(int, int *, int *, int *);
int /*<<< orphan*/ f2m_reduce(int *);
int /*<<< orphan*/ f2m_square(int, int *, int *);
int getDegree(int, int *);
void mult_scalar(uint32_t m, uint32_t *F, uint32_t *a, uint32_t *b, uint32_t *d,
                 uint32_t *xP, uint32_t *yP, uint32_t *xQ, uint32_t *yQ) {
  uint32_t t = (m / 32) + 1;
  uint32_t Xq[t], Zq[t], Xr[t], Zr[t];
  uint32_t y;
  for (y = 0; y < t; y++) {
    Zq[y] = 0x0;
    Zr[y] = 0x0;
    Xq[y] = 0x0;
    Xr[y] = xP[y];
  }
  Zr[0] = 0x1;
  Xq[0] = 0x1;
  uint32_t t2 = t * 2;
  uint32_t XrZqPLUSXqZr[t];
  uint32_t XqZr[t2], XrZq[t2], XqZrXrZq[t2], XrZqPLUSXqZrSquared[t2],
      xpXrZqPLUSXqZrSquared[t2];
  uint32_t XrSquard[t2], ZrSquard[t2], XrSquardZrSquard[t2], XrPow4[t2],
      ZrPow4[t2], bZrPow4[t2];
  uint32_t XqSquard[t2], ZqSquard[t2], XqSquardZqSquard[t2], XqPow4[t2],
      ZqPow4[t2], bZqPow4[t2];
  int i;
  for (i = t - 1; i >= 0; i--) {
    uint32_t bitMask = 0x80000000;
    int y;
    for (y = 31; y >= 0; y--) {
      if ((i == t - 1) && (y == 31)) {
        int deg = getDegree(t, d);
        i = deg / 32;
        y = deg - (i * 32);
      }
      uint32_t z;
      for (z = 0; z < t2; z++) {
        XqZr[z] = 0x0;
        XrZq[z] = 0x0;
        XqZrXrZq[z] = 0x0;
        xpXrZqPLUSXqZrSquared[z] = 0x0;
        XrSquardZrSquard[z] = 0x0;
        bZrPow4[z] = 0x0;
        XqSquardZqSquard[z] = 0x0;
        bZqPow4[z] = 0x0;
      }
      if ((d[i] & bitMask) != 0) {
        f2m_mult(t, Xq, Zr, XqZr);
        f2m_mult(t, Xr, Zq, XrZq);
        f2m_reduce(XqZr);
        f2m_reduce(XrZq);
        f2m_mult(t, XqZr, XrZq, XqZrXrZq);
        f2m_reduce(XqZrXrZq);
        f2m_Add(t, XqZr, XrZq, XrZqPLUSXqZr);
        f2m_square(t, XrZqPLUSXqZr, XrZqPLUSXqZrSquared);
        f2m_reduce(XrZqPLUSXqZrSquared);
        copy(t, XrZqPLUSXqZrSquared, Zq);
        f2m_mult(t, xP, XrZqPLUSXqZrSquared, xpXrZqPLUSXqZrSquared);
        f2m_reduce(xpXrZqPLUSXqZrSquared);
        f2m_Add(t, xpXrZqPLUSXqZrSquared, XqZrXrZq, Xq);
        f2m_square(t, Xr, XrSquard);
        f2m_reduce(XrSquard);
        f2m_square(t, Zr, ZrSquard);
        f2m_reduce(ZrSquard);
        f2m_mult(t, XrSquard, ZrSquard, XrSquardZrSquard);
        f2m_reduce(XrSquardZrSquard);
        copy(t, XrSquardZrSquard, Zr);
        f2m_square(t, XrSquard, XrPow4);
        f2m_reduce(XrPow4);
        f2m_square(t, ZrSquard, ZrPow4);
        f2m_reduce(ZrPow4);
        f2m_mult(t, b, ZrPow4, bZrPow4);
        f2m_reduce(bZrPow4);
        f2m_Add(t, XrPow4, bZrPow4, Xr);
      } else {
        f2m_mult(t, Xr, Zq, XrZq);
        f2m_reduce(XrZq);
        f2m_mult(t, Xq, Zr, XqZr);
        f2m_reduce(XqZr);
        f2m_mult(t, XqZr, XrZq, XqZrXrZq);
        f2m_reduce(XqZrXrZq);
        f2m_Add(t, XqZr, XrZq, XrZqPLUSXqZr);
        f2m_square(t, XrZqPLUSXqZr, XrZqPLUSXqZrSquared);
        f2m_reduce(XrZqPLUSXqZrSquared);
        copy(t, XrZqPLUSXqZrSquared, Zr);
        f2m_mult(t, xP, XrZqPLUSXqZrSquared, xpXrZqPLUSXqZrSquared);
        f2m_reduce(xpXrZqPLUSXqZrSquared);
        f2m_Add(t, xpXrZqPLUSXqZrSquared, XqZrXrZq, Xr);
        f2m_square(t, Xq, XqSquard);
        f2m_reduce(XqSquard);
        f2m_square(t, Zq, ZqSquard);
        f2m_reduce(ZqSquard);
        f2m_mult(t, XqSquard, ZqSquard, XqSquardZqSquard);
        f2m_reduce(XqSquardZqSquard);
        copy(t, XqSquardZqSquard, Zq);
        f2m_square(t, XqSquard, XqPow4);
        f2m_reduce(XqPow4);
        f2m_square(t, ZqSquard, ZqPow4);
        f2m_reduce(ZqPow4);
        f2m_mult(t, b, ZqPow4, bZqPow4);
        f2m_reduce(bZqPow4);
        f2m_Add(t, XqPow4, bZqPow4, Xq);
      }
      bitMask >>= 1;
    }
  }
  uint32_t ZqInverse[t], ZrInverse[t], Xq_ZqInverse_PLUS_xP[t],
      Xr_ZrInverse_PLUS_xP[t], term2[t], term3[t], xPInverse[t], result[t];
  uint32_t Xq_ZqInverse[t2], Xr_ZrInverse[t2], xPSquared[t2], term1[t2],
      term4[t2], term5[t2];
  for (y = 0; y < t2; y++) {
    Xq_ZqInverse[y] = 0x0;
    Xr_ZrInverse[y] = 0x0;
    term1[y] = 0x0;
    term4[y] = 0x0;
    term5[y] = 0x0;
  }
  f2m_calculateInverse(t, Zq, F, ZqInverse);
  f2m_mult(t, Xq, ZqInverse, Xq_ZqInverse);
  f2m_reduce(Xq_ZqInverse);
  copy(t, Xq_ZqInverse, xQ);
  f2m_Add(t, Xq_ZqInverse, xP, Xq_ZqInverse_PLUS_xP);
  f2m_calculateInverse(t, Zr, F, ZrInverse);
  f2m_mult(t, Xr, ZrInverse, Xr_ZrInverse);
  f2m_reduce(Xr_ZrInverse);
  f2m_Add(t, Xr_ZrInverse, xP, Xr_ZrInverse_PLUS_xP);
  f2m_square(t, xP, xPSquared);
  f2m_reduce(xPSquared);
  f2m_mult(t, Xr_ZrInverse_PLUS_xP, Xq_ZqInverse_PLUS_xP, term1);
  f2m_reduce(term1);
  f2m_Add(t, term1, xPSquared, term2);
  f2m_Add(t, term2, yP, term3);
  f2m_mult(t, Xq_ZqInverse_PLUS_xP, term3, term4);
  f2m_reduce(term4);
  f2m_calculateInverse(t, xP, F, xPInverse);
  f2m_mult(t, xPInverse, term4, term5);
  f2m_reduce(term5);
  f2m_Add(t, term5, yP, result);
  copy(t, result, yQ);
}


x86 assembly (clang, -O0):
<mult_scalar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2a0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1f,%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0x5,%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1a0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x198(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x190(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x188(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    12b7 <mult_scalar+0x147>
mov    -0x190(%rbp),%rax
mov    -0x1a0(%rbp),%rcx
mov    -0x188(%rbp),%rdx
mov    -0x198(%rbp),%rsi
movslq -0x64(%rbp),%rdi
movl   $0x0,(%rsi,%rdi,4)
movslq -0x64(%rbp),%rsi
movl   $0x0,(%rdx,%rsi,4)
movslq -0x64(%rbp),%rdx
movl   $0x0,(%rcx,%rdx,4)
mov    -0x30(%rbp),%rcx
movslq -0x64(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
movslq -0x64(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    124e <mult_scalar+0xde>
mov    -0x1a0(%rbp),%rax
mov    -0x188(%rbp),%rcx
movl   $0x1,(%rcx)
movl   $0x1,(%rax)
mov    -0x34(%rbp),%eax
add    %eax,%eax
mov    %eax,-0x68(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x230(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x228(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x78(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x220(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x80(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x218(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x88(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x210(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x90(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x208(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x98(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x200(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xa0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1f8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xa8(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1f0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xb0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1e8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xb8(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1e0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xc0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1d8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xc8(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1d0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd8(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xe0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1b8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xe8(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1b0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xf0(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1a8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xf8(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xfc(%rbp)
cmpl   $0x0,-0xfc(%rbp)
jl     1b85 <mult_scalar+0xa15>
movl   $0x80000000,-0x100(%rbp)
movl   $0x1f,-0x104(%rbp)
cmpl   $0x0,-0x104(%rbp)
jl     1b6c <mult_scalar+0x9fc>
mov    -0xfc(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1614 <mult_scalar+0x4a4>
cmpl   $0x1f,-0x104(%rbp)
jne    1614 <mult_scalar+0x4a4>
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1040 <getDegree@plt>
mov    %eax,-0x108(%rbp)
mov    -0x108(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,-0xfc(%rbp)
mov    -0x108(%rbp),%eax
mov    -0xfc(%rbp),%ecx
shl    $0x5,%ecx
sub    %ecx,%eax
mov    %eax,-0x104(%rbp)
movl   $0x0,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    16ed <mult_scalar+0x57d>
mov    -0x1a8(%rbp),%rax
mov    -0x1c0(%rbp),%rcx
mov    -0x1d8(%rbp),%rdx
mov    -0x1f0(%rbp),%rsi
mov    -0x208(%rbp),%rdi
mov    -0x218(%rbp),%r8
mov    -0x220(%rbp),%r9
mov    -0x228(%rbp),%r10
movslq -0x10c(%rbp),%r11
movl   $0x0,(%r10,%r11,4)
movslq -0x10c(%rbp),%r10
movl   $0x0,(%r9,%r10,4)
movslq -0x10c(%rbp),%r9
movl   $0x0,(%r8,%r9,4)
movslq -0x10c(%rbp),%r8
movl   $0x0,(%rdi,%r8,4)
movslq -0x10c(%rbp),%rdi
movl   $0x0,(%rsi,%rdi,4)
movslq -0x10c(%rbp),%rsi
movl   $0x0,(%rdx,%rsi,4)
movslq -0x10c(%rbp),%rdx
movl   $0x0,(%rcx,%rdx,4)
movslq -0x10c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    161e <mult_scalar+0x4ae>
mov    -0x28(%rbp),%rax
movslq -0xfc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
and    -0x100(%rbp),%eax
cmp    $0x0,%eax
je     192c <mult_scalar+0x7bc>
mov    -0x188(%rbp),%rdx
mov    -0x1a0(%rbp),%rsi
mov    -0x228(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x220(%rbp),%rcx
mov    -0x198(%rbp),%rdx
mov    -0x190(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x228(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x220(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x228(%rbp),%rsi
mov    -0x220(%rbp),%rdx
mov    -0x218(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x218(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x228(%rbp),%rsi
mov    -0x220(%rbp),%rdx
mov    -0x230(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x230(%rbp),%rsi
mov    -0x210(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x210(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x198(%rbp),%rdx
mov    -0x210(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1050 <copy@plt>
mov    -0x210(%rbp),%rdx
mov    -0x208(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1090 <f2m_mult@plt>
mov    -0x208(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x208(%rbp),%rsi
mov    -0x218(%rbp),%rdx
mov    -0x1a0(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x200(%rbp),%rdx
mov    -0x190(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x200(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x188(%rbp),%rsi
mov    -0x1f8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1f8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1f0(%rbp),%rcx
mov    -0x200(%rbp),%rsi
mov    -0x1f8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x1f0(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1f0(%rbp),%rsi
mov    -0x188(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1050 <copy@plt>
mov    -0x200(%rbp),%rsi
mov    -0x1e8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1e8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1f8(%rbp),%rsi
mov    -0x1e0(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1e0(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1e0(%rbp),%rdx
mov    -0x1d8(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1090 <f2m_mult@plt>
mov    -0x1d8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1e8(%rbp),%rsi
mov    -0x1d8(%rbp),%rdx
mov    -0x190(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
jmp    1b49 <mult_scalar+0x9d9>
mov    -0x198(%rbp),%rdx
mov    -0x190(%rbp),%rsi
mov    -0x220(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x220(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x228(%rbp),%rcx
mov    -0x188(%rbp),%rdx
mov    -0x1a0(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x228(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x228(%rbp),%rsi
mov    -0x220(%rbp),%rdx
mov    -0x218(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x218(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x228(%rbp),%rsi
mov    -0x220(%rbp),%rdx
mov    -0x230(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x230(%rbp),%rsi
mov    -0x210(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x210(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x188(%rbp),%rdx
mov    -0x210(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1050 <copy@plt>
mov    -0x210(%rbp),%rdx
mov    -0x208(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1090 <f2m_mult@plt>
mov    -0x208(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x208(%rbp),%rsi
mov    -0x218(%rbp),%rdx
mov    -0x190(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x1d0(%rbp),%rdx
mov    -0x1a0(%rbp),%rsi
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1d0(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x198(%rbp),%rsi
mov    -0x1c8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1c8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1c0(%rbp),%rcx
mov    -0x1d0(%rbp),%rsi
mov    -0x1c8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x1c0(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1c0(%rbp),%rsi
mov    -0x198(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1050 <copy@plt>
mov    -0x1d0(%rbp),%rsi
mov    -0x1b8(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1b8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1c8(%rbp),%rsi
mov    -0x1b0(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1080 <f2m_square@plt>
mov    -0x1b0(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1b0(%rbp),%rdx
mov    -0x1a8(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1090 <f2m_mult@plt>
mov    -0x1a8(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x1b8(%rbp),%rsi
mov    -0x1a8(%rbp),%rdx
mov    -0x1a0(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x100(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x100(%rbp)
mov    -0x104(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x104(%rbp)
jmp    15a9 <mult_scalar+0x439>
jmp    1b71 <mult_scalar+0xa01>
mov    -0xfc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xfc(%rbp)
jmp    1588 <mult_scalar+0x418>
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x2a0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x118(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x298(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x120(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x290(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x128(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x288(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x130(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x280(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x138(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x278(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x140(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x270(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x148(%rbp)
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x268(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x150(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x260(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x158(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x258(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x160(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x250(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x168(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x248(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x170(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x240(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x178(%rbp)
mov    -0x68(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x238(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x180(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1e15 <mult_scalar+0xca5>
mov    -0x238(%rbp),%rax
mov    -0x240(%rbp),%rcx
mov    -0x248(%rbp),%rdx
mov    -0x258(%rbp),%rsi
mov    -0x260(%rbp),%rdi
movslq -0x64(%rbp),%r8
movl   $0x0,(%rdi,%r8,4)
movslq -0x64(%rbp),%rdi
movl   $0x0,(%rsi,%rdi,4)
movslq -0x64(%rbp),%rsi
movl   $0x0,(%rdx,%rsi,4)
movslq -0x64(%rbp),%rdx
movl   $0x0,(%rcx,%rdx,4)
movslq -0x64(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1da0 <mult_scalar+0xc30>
mov    -0x2a0(%rbp),%rcx
mov    -0x198(%rbp),%rsi
mov    -0x34(%rbp),%edi
mov    -0x10(%rbp),%rdx
call   1030 <f2m_calculateInverse@plt>
mov    -0x1a0(%rbp),%rsi
mov    -0x2a0(%rbp),%rdx
mov    -0x260(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x260(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x260(%rbp),%rsi
mov    -0x34(%rbp),%edi
mov    0x18(%rbp),%rdx
call   1050 <copy@plt>
mov    -0x260(%rbp),%rsi
mov    -0x290(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
call   1060 <f2m_Add@plt>
mov    -0x188(%rbp),%rsi
mov    -0x298(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x10(%rbp),%rdx
call   1030 <f2m_calculateInverse@plt>
mov    -0x190(%rbp),%rsi
mov    -0x298(%rbp),%rdx
mov    -0x258(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x258(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x258(%rbp),%rsi
mov    -0x288(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
call   1060 <f2m_Add@plt>
mov    -0x250(%rbp),%rdx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1080 <f2m_square@plt>
mov    -0x250(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x288(%rbp),%rsi
mov    -0x248(%rbp),%rcx
mov    -0x290(%rbp),%rdx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x248(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x248(%rbp),%rsi
mov    -0x250(%rbp),%rdx
mov    -0x280(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1060 <f2m_Add@plt>
mov    -0x280(%rbp),%rsi
mov    -0x278(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    0x10(%rbp),%rdx
call   1060 <f2m_Add@plt>
mov    -0x290(%rbp),%rsi
mov    -0x278(%rbp),%rdx
mov    -0x240(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x240(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x270(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <f2m_calculateInverse@plt>
mov    -0x270(%rbp),%rsi
mov    -0x240(%rbp),%rdx
mov    -0x238(%rbp),%rcx
mov    -0x34(%rbp),%edi
call   1090 <f2m_mult@plt>
mov    -0x238(%rbp),%rdi
call   1070 <f2m_reduce@plt>
mov    -0x238(%rbp),%rsi
mov    -0x268(%rbp),%rcx
mov    -0x34(%rbp),%edi
mov    0x10(%rbp),%rdx
call   1060 <f2m_Add@plt>
mov    -0x268(%rbp),%rsi
mov    -0x34(%rbp),%edi
mov    0x20(%rbp),%rdx
call   1050 <copy@plt>
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult_scalar>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %r9,-0x60(%rbp)
mov    %r8,-0x98(%rbp)
mov    %rcx,-0x80(%rbp)
mov    %rsi,-0xb8(%rbp)
mov    %edi,%r13d
lea    0x1f(%r13),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x5,%eax
mov    %rax,-0x58(%rbp)
add    $0x1,%eax
mov    %rax,-0x70(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r12
sub    %rcx,%r12
mov    %r12,%rsp
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    %rax,%rsp
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    %rax,%rsp
mov    %rsp,%r15
mov    %rcx,-0xd0(%rbp)
sub    %rcx,%r15
mov    %r15,%rsp
cmp    $0xffffffe1,%edi
jl     125b <mult_scalar+0xcb>
mov    -0x58(%rbp),%eax
lea    0x4(,%rax,4),%rbx
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1050 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1050 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1050 <memset@plt>
mov    -0x38(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %rbx,%rdx
call   1070 <memcpy@plt>
mov    %r15,-0xb0(%rbp)
movl   $0x1,(%r15)
mov    %r12,-0x50(%rbp)
movl   $0x1,(%r12)
mov    -0x70(%rbp),%rax
add    %eax,%eax
mov    %rsp,%rcx
sub    -0xd0(%rbp),%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
mov    %rax,-0xc8(%rbp)
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xe8(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,%r14
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xe0(%rbp)
mov    %rcx,%rsp
mov    %rsp,%r9
sub    %rax,%r9
mov    %r9,%rsp
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,-0x140(%rbp)
mov    %rdx,%rsp
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,-0x138(%rbp)
mov    %rdx,%rsp
mov    %rsp,%r10
sub    %rax,%r10
mov    %r10,%rsp
mov    %rsp,%rsi
sub    %rax,%rsi
mov    %rsi,-0x130(%rbp)
mov    %rsi,%rsp
mov    %rsp,%rsi
sub    %rax,%rsi
mov    %rsi,-0x128(%rbp)
mov    %rsi,%rsp
mov    %rsp,%rsi
sub    %rax,%rsi
mov    %rsi,%rsp
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,-0x120(%rbp)
mov    %rdi,%rsp
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,-0x118(%rbp)
mov    %rdi,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,-0x110(%rbp)
mov    %rbx,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,-0x108(%rbp)
mov    %rbx,%rsp
mov    %rsp,%rbx
mov    %rax,-0xf8(%rbp)
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r13,-0x100(%rbp)
cmp    $0xffffffe1,%r13d
jl     1896 <mult_scalar+0x706>
mov    -0xc8(%rbp),%r8
cmp    $0x2,%r8d
mov    $0x1,%eax
cmovge %r8d,%eax
shl    $0x2,%rax
mov    %rax,-0x148(%rbp)
mov    $0x1f,%ecx
movl   $0x80000000,-0x48(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    %rsi,-0xa8(%rbp)
mov    %r12,-0x90(%rbp)
mov    %rbx,-0x88(%rbp)
mov    %r10,-0xa0(%rbp)
mov    %r9,-0x40(%rbp)
mov    %r14,-0xd8(%rbp)
nopw   0x0(%rax,%rax,1)
mov    %r9,%rbx
mov    -0x30(%rbp),%rax
cmp    -0x58(%rbp),%eax
jne    1450 <mult_scalar+0x2c0>
cmp    $0x1f,%ecx
mov    -0xf0(%rbp),%r12
mov    -0xe8(%rbp),%r13
jne    145e <mult_scalar+0x2ce>
mov    -0x70(%rbp),%rdi
mov    -0x98(%rbp),%rsi
call   1040 <getDegree@plt>
mov    %eax,%ecx
lea    0x1f(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
mov    %eax,%edx
sar    $0x5,%edx
mov    %rdx,-0x30(%rbp)
and    $0xffffffe0,%eax
sub    %eax,%ecx
jmp    145e <mult_scalar+0x2ce>
nopl   0x0(%rax)
mov    -0xf0(%rbp),%r12
mov    -0xe8(%rbp),%r13
mov    %rcx,-0xc0(%rbp)
mov    %r12,%rdi
xor    %esi,%esi
mov    -0x148(%rbp),%r15
mov    %r15,%rdx
call   1050 <memset@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    -0xa8(%rbp),%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    -0x88(%rbp),%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
movslq -0x30(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    -0x98(%rbp),%rdx
test   %ecx,(%rdx,%rax,4)
mov    %r14,%rbx
je     16b0 <mult_scalar+0x520>
mov    -0x70(%rbp),%r14
mov    %r14d,%edi
mov    -0x50(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
mov    %r12,%rcx
call   10b0 <f2m_mult@plt>
mov    %r14d,%edi
mov    -0x38(%rbp),%rsi
mov    -0x68(%rbp),%r15
mov    %r15,%rdx
mov    %r13,%rcx
call   10b0 <f2m_mult@plt>
mov    %r12,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %r13,%rdx
mov    -0x78(%rbp),%r13
mov    %r13,%rcx
call   1080 <f2m_Add@plt>
mov    %r14d,%edi
mov    %r13,%rsi
mov    %rbx,%r12
mov    -0xe0(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1060 <copy@plt>
mov    %r14d,%edi
mov    -0x60(%rbp),%rsi
mov    %rbx,%rdx
mov    -0x40(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    -0x50(%rbp),%rcx
call   1080 <f2m_Add@plt>
mov    %r14d,%edi
mov    -0x38(%rbp),%rsi
mov    -0x140(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    -0xb0(%rbp),%r12
mov    %r12,%rsi
mov    -0x138(%rbp),%r15
mov    %r15,%rdx
call   10a0 <f2m_square@plt>
mov    %r15,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    -0xa0(%rbp),%r13
mov    %r13,%rcx
call   10b0 <f2m_mult@plt>
mov    %r13,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %r13,%rsi
mov    %r12,%rdx
call   1060 <copy@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    -0x130(%rbp),%r12
mov    %r12,%rdx
call   10a0 <f2m_square@plt>
mov    %r12,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    -0x128(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    -0x80(%rbp),%rsi
mov    %rbx,%rdx
mov    -0xa8(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    -0x38(%rbp),%rcx
jmp    1850 <mult_scalar+0x6c0>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%r14
mov    -0x70(%rbp),%rbx
mov    %ebx,%edi
mov    -0x38(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    %r13,%rcx
call   10b0 <f2m_mult@plt>
mov    %r13,%rdi
call   1090 <f2m_reduce@plt>
mov    %ebx,%edi
mov    -0x50(%rbp),%rsi
mov    -0xb0(%rbp),%r15
mov    %r15,%rdx
mov    %r12,%rcx
call   10b0 <f2m_mult@plt>
mov    %r12,%rdi
call   1090 <f2m_reduce@plt>
mov    %ebx,%edi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   10b0 <f2m_mult@plt>
mov    %r14,%rdi
call   1090 <f2m_reduce@plt>
mov    %ebx,%edi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%r13
mov    -0x78(%rbp),%rbx
mov    %rbx,%rcx
call   1080 <f2m_Add@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    -0xe0(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1060 <copy@plt>
mov    %r13d,%edi
mov    -0x60(%rbp),%rsi
mov    %rbx,%rdx
mov    -0x40(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    -0x38(%rbp),%rcx
call   1080 <f2m_Add@plt>
mov    %r13d,%edi
mov    -0x50(%rbp),%rsi
mov    -0x120(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    -0x68(%rbp),%r15
mov    %r15,%rsi
mov    -0x118(%rbp),%r14
mov    %r14,%rdx
call   10a0 <f2m_square@plt>
mov    %r14,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    -0x90(%rbp),%r12
mov    %r12,%rcx
call   10b0 <f2m_mult@plt>
mov    %r12,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %r12,%rsi
mov    %r15,%rdx
call   1060 <copy@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    -0x110(%rbp),%r15
mov    %r15,%rdx
call   10a0 <f2m_square@plt>
mov    %r15,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    -0x108(%rbp),%rbx
mov    %rbx,%rdx
call   10a0 <f2m_square@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    -0x80(%rbp),%rsi
mov    %rbx,%rdx
mov    -0x88(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r13d,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    -0x50(%rbp),%rcx
call   1080 <f2m_Add@plt>
mov    -0xd8(%rbp),%r14
mov    -0x40(%rbp),%r9
sarl   -0x48(%rbp)
mov    -0xc0(%rbp),%rcx
lea    -0x1(%rcx),%eax
test   %ecx,%ecx
mov    %eax,%ecx
jg     1400 <mult_scalar+0x270>
mov    -0x30(%rbp),%rdx
lea    -0x1(%rdx),%eax
movl   $0x80000000,-0x48(%rbp)
mov    $0x1f,%ecx
test   %edx,%edx
mov    %rax,-0x30(%rbp)
jg     1400 <mult_scalar+0x270>
mov    %rsp,%rcx
mov    -0xd0(%rbp),%rax
sub    %rax,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xc0(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rsp,%r14
mov    -0xf8(%rbp),%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x88(%rbp)
mov    %rcx,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
cmpl   $0xffffffe1,-0x100(%rbp)
jl     19bf <mult_scalar+0x82f>
mov    -0xc8(%rbp),%rax
cmp    $0x2,%eax
mov    $0x1,%r13d
cmovge %eax,%r13d
shl    $0x2,%r13
mov    %r14,%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1050 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1050 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1050 <memset@plt>
mov    -0x48(%rbp),%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1050 <memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r13,%rdx
call   1050 <memset@plt>
mov    %rbx,-0x80(%rbp)
mov    -0x70(%rbp),%rbx
mov    %r12,-0x78(%rbp)
mov    %rbx,%r12
mov    %r12d,%edi
mov    -0x68(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0x58(%rbp),%r13
mov    %r13,%rcx
call   1030 <f2m_calculateInverse@plt>
mov    %r12d,%edi
mov    -0x50(%rbp),%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   10b0 <f2m_mult@plt>
mov    %r14,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    0x18(%rbp),%rdx
call   1060 <copy@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    -0x60(%rbp),%rbx
mov    %rbx,%rdx
mov    -0x30(%rbp),%r14
mov    %r14,%rcx
call   1080 <f2m_Add@plt>
mov    %r12d,%edi
mov    -0xb0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0x90(%rbp),%r13
mov    %r13,%rcx
call   1030 <f2m_calculateInverse@plt>
mov    %r12d,%edi
mov    -0x38(%rbp),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
call   10b0 <f2m_mult@plt>
mov    %r15,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    -0x98(%rbp),%r15
mov    %r15,%rcx
call   1080 <f2m_Add@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    -0x88(%rbp),%r13
mov    %r13,%rdx
call   10a0 <f2m_square@plt>
mov    %r13,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    -0x78(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    -0xa0(%rbp),%r14
mov    %r14,%rcx
call   1080 <f2m_Add@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    0x10(%rbp),%r14
mov    %r14,%rdx
mov    -0xa8(%rbp),%r15
mov    %r15,%rcx
call   1080 <f2m_Add@plt>
mov    %r12d,%edi
mov    -0x30(%rbp),%rsi
mov    %r15,%rdx
mov    -0x48(%rbp),%r13
mov    %r13,%rcx
call   10b0 <f2m_mult@plt>
mov    %r13,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    -0x60(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xc0(%rbp),%r15
mov    %r15,%rcx
call   1030 <f2m_calculateInverse@plt>
mov    %r12d,%edi
mov    %r15,%rsi
mov    %r13,%rdx
mov    -0x80(%rbp),%rbx
mov    %rbx,%rcx
call   10b0 <f2m_mult@plt>
mov    %rbx,%rdi
call   1090 <f2m_reduce@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    -0x40(%rbp),%r14
mov    %r14,%rcx
call   1080 <f2m_Add@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    0x20(%rbp),%rdx
call   1060 <copy@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @mult_scalar(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32
%20 = alloca i8*
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i32
%26 = alloca i32
%27 = alloca i64
%28 = alloca i64
%29 = alloca i64
%30 = alloca i64
%31 = alloca i64
%32 = alloca i64
%33 = alloca i64
%34 = alloca i64
%35 = alloca i64
%36 = alloca i64
%37 = alloca i64
%38 = alloca i64
%39 = alloca i64
%40 = alloca i64
%41 = alloca i64
%42 = alloca i64
%43 = alloca i64
%44 = alloca i64
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca i64
%51 = alloca i64
%52 = alloca i64
%53 = alloca i64
%54 = alloca i64
%55 = alloca i64
%56 = alloca i64
%57 = alloca i64
%58 = alloca i64
%59 = alloca i64
%60 = alloca i64
%61 = alloca i64
%62 = alloca i64
%63 = alloca i64
store i32 %0, i32* %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%64 = load i32, i32* %10
%65 = sdiv i32 %64, 32
%66 = add nsw i32 %65, 1
store i32 %66, i32* %19
%67 = load i32, i32* %19
%68 = zext i32 %67 to i64
%69 = call i8* @llvm.stacksave()
store i8* %69, i8** %20
%70 = alloca i32, i64 %68
store i64 %68, i64* %21
%71 = load i32, i32* %19
%72 = zext i32 %71 to i64
%73 = alloca i32, i64 %72
store i64 %72, i64* %22
%74 = load i32, i32* %19
%75 = zext i32 %74 to i64
%76 = alloca i32, i64 %75
store i64 %75, i64* %23
%77 = load i32, i32* %19
%78 = zext i32 %77 to i64
%79 = alloca i32, i64 %78
store i64 %78, i64* %24
store i32 0, i32* %25
br label %80
80: ; preds = %102, %9
%81 = load i32, i32* %25
%82 = load i32, i32* %19
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %105
84: ; preds = %80
%85 = load i32, i32* %25
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %73, i64 %86
store i32 0, i32* %87
%88 = load i32, i32* %25
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %79, i64 %89
store i32 0, i32* %90
%91 = load i32, i32* %25
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %70, i64 %92
store i32 0, i32* %93
%94 = load i32*, i32** %15
%95 = load i32, i32* %25
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
%98 = load i32, i32* %97
%99 = load i32, i32* %25
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %76, i64 %100
store i32 %98, i32* %101
br label %102
102: ; preds = %84
%103 = load i32, i32* %25
%104 = add nsw i32 %103, 1
store i32 %104, i32* %25
br label %80
105: ; preds = %80
%106 = getelementptr inbounds i32, i32* %79, i64 0
store i32 1, i32* %106
%107 = getelementptr inbounds i32, i32* %70, i64 0
store i32 1, i32* %107
%108 = load i32, i32* %19
%109 = mul nsw i32 %108, 2
store i32 %109, i32* %26
%110 = load i32, i32* %19
%111 = zext i32 %110 to i64
%112 = alloca i32, i64 %111
store i64 %111, i64* %27
%113 = load i32, i32* %26
%114 = zext i32 %113 to i64
%115 = alloca i32, i64 %114
store i64 %114, i64* %28
%116 = load i32, i32* %26
%117 = zext i32 %116 to i64
%118 = alloca i32, i64 %117
store i64 %117, i64* %29
%119 = load i32, i32* %26
%120 = zext i32 %119 to i64
%121 = alloca i32, i64 %120
store i64 %120, i64* %30
%122 = load i32, i32* %26
%123 = zext i32 %122 to i64
%124 = alloca i32, i64 %123
store i64 %123, i64* %31
%125 = load i32, i32* %26
%126 = zext i32 %125 to i64
%127 = alloca i32, i64 %126
store i64 %126, i64* %32
%128 = load i32, i32* %26
%129 = zext i32 %128 to i64
%130 = alloca i32, i64 %129
store i64 %129, i64* %33
%131 = load i32, i32* %26
%132 = zext i32 %131 to i64
%133 = alloca i32, i64 %132
store i64 %132, i64* %34
%134 = load i32, i32* %26
%135 = zext i32 %134 to i64
%136 = alloca i32, i64 %135
store i64 %135, i64* %35
%137 = load i32, i32* %26
%138 = zext i32 %137 to i64
%139 = alloca i32, i64 %138
store i64 %138, i64* %36
%140 = load i32, i32* %26
%141 = zext i32 %140 to i64
%142 = alloca i32, i64 %141
store i64 %141, i64* %37
%143 = load i32, i32* %26
%144 = zext i32 %143 to i64
%145 = alloca i32, i64 %144
store i64 %144, i64* %38
%146 = load i32, i32* %26
%147 = zext i32 %146 to i64
%148 = alloca i32, i64 %147
store i64 %147, i64* %39
%149 = load i32, i32* %26
%150 = zext i32 %149 to i64
%151 = alloca i32, i64 %150
store i64 %150, i64* %40
%152 = load i32, i32* %26
%153 = zext i32 %152 to i64
%154 = alloca i32, i64 %153
store i64 %153, i64* %41
%155 = load i32, i32* %26
%156 = zext i32 %155 to i64
%157 = alloca i32, i64 %156
store i64 %156, i64* %42
%158 = load i32, i32* %26
%159 = zext i32 %158 to i64
%160 = alloca i32, i64 %159
store i64 %159, i64* %43
%161 = load i32, i32* %26
%162 = zext i32 %161 to i64
%163 = alloca i32, i64 %162
store i64 %162, i64* %44
%164 = load i32, i32* %19
%165 = sub nsw i32 %164, 1
store i32 %165, i32* %45
br label %166
166: ; preds = %332, %105
%167 = load i32, i32* %45
%168 = icmp sge i32 %167, 0
br i1 %168, label %169, label %335
169: ; preds = %166
store i32 -2147483648, i32* %46
store i32 31, i32* %47
br label %170
170: ; preds = %328, %169
%171 = load i32, i32* %47
%172 = icmp sge i32 %171, 0
br i1 %172, label %173, label %331
173: ; preds = %170
%174 = load i32, i32* %45
%175 = load i32, i32* %19
%176 = sub nsw i32 %175, 1
%177 = icmp eq i32 %174, %176
br i1 %177, label %178, label %191
178: ; preds = %173
%179 = load i32, i32* %47
%180 = icmp eq i32 %179, 31
br i1 %180, label %181, label %191
181: ; preds = %178
%182 = load i32, i32* %19
%183 = load i32*, i32** %14
%184 = call i32 @getDegree(i32 %182, i32* %183)
store i32 %184, i32* %48
%185 = load i32, i32* %48
%186 = sdiv i32 %185, 32
store i32 %186, i32* %45
%187 = load i32, i32* %48
%188 = load i32, i32* %45
%189 = mul nsw i32 %188, 32
%190 = sub nsw i32 %187, %189
store i32 %190, i32* %47
br label %191
191: ; preds = %181, %178, %173
store i32 0, i32* %49
br label %192
192: ; preds = %221, %191
%193 = load i32, i32* %49
%194 = load i32, i32* %26
%195 = icmp slt i32 %193, %194
br i1 %195, label %196, label %224
196: ; preds = %192
%197 = load i32, i32* %49
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds i32, i32* %115, i64 %198
store i32 0, i32* %199
%200 = load i32, i32* %49
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %118, i64 %201
store i32 0, i32* %202
%203 = load i32, i32* %49
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i32, i32* %121, i64 %204
store i32 0, i32* %205
%206 = load i32, i32* %49
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds i32, i32* %127, i64 %207
store i32 0, i32* %208
%209 = load i32, i32* %49
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i32, i32* %136, i64 %210
store i32 0, i32* %211
%212 = load i32, i32* %49
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i32, i32* %145, i64 %213
store i32 0, i32* %214
%215 = load i32, i32* %49
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds i32, i32* %154, i64 %216
store i32 0, i32* %217
%218 = load i32, i32* %49
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i32, i32* %163, i64 %219
store i32 0, i32* %220
br label %221
221: ; preds = %196
%222 = load i32, i32* %49
%223 = add nsw i32 %222, 1
store i32 %223, i32* %49
br label %192
224: ; preds = %192
%225 = load i32*, i32** %14
%226 = load i32, i32* %45
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds i32, i32* %225, i64 %227
%229 = load i32, i32* %228
%230 = load i32, i32* %46
%231 = and i32 %229, %230
%232 = icmp ne i32 %231, 0
br i1 %232, label %233, label %279
233: ; preds = %224
%234 = load i32, i32* %19
%235 = call i32 @f2m_mult(i32 %234, i32* %70, i32* %79, i32* %115)
%236 = load i32, i32* %19
%237 = call i32 @f2m_mult(i32 %236, i32* %76, i32* %73, i32* %118)
%238 = call i32 @f2m_reduce(i32* %115)
%239 = call i32 @f2m_reduce(i32* %118)
%240 = load i32, i32* %19
%241 = call i32 @f2m_mult(i32 %240, i32* %115, i32* %118, i32* %121)
%242 = call i32 @f2m_reduce(i32* %121)
%243 = load i32, i32* %19
%244 = call i32 @f2m_Add(i32 %243, i32* %115, i32* %118, i32* %112)
%245 = load i32, i32* %19
%246 = call i32 @f2m_square(i32 %245, i32* %112, i32* %124)
%247 = call i32 @f2m_reduce(i32* %124)
%248 = load i32, i32* %19
%249 = call i32 @copy(i32 %248, i32* %124, i32* %73)
%250 = load i32, i32* %19
%251 = load i32*, i32** %15
%252 = call i32 @f2m_mult(i32 %250, i32* %251, i32* %124, i32* %127)
%253 = call i32 @f2m_reduce(i32* %127)
%254 = load i32, i32* %19
%255 = call i32 @f2m_Add(i32 %254, i32* %127, i32* %121, i32* %70)
%256 = load i32, i32* %19
%257 = call i32 @f2m_square(i32 %256, i32* %76, i32* %130)
%258 = call i32 @f2m_reduce(i32* %130)
%259 = load i32, i32* %19
%260 = call i32 @f2m_square(i32 %259, i32* %79, i32* %133)
%261 = call i32 @f2m_reduce(i32* %133)
%262 = load i32, i32* %19
%263 = call i32 @f2m_mult(i32 %262, i32* %130, i32* %133, i32* %136)
%264 = call i32 @f2m_reduce(i32* %136)
%265 = load i32, i32* %19
%266 = call i32 @copy(i32 %265, i32* %136, i32* %79)
%267 = load i32, i32* %19
%268 = call i32 @f2m_square(i32 %267, i32* %130, i32* %139)
%269 = call i32 @f2m_reduce(i32* %139)
%270 = load i32, i32* %19
%271 = call i32 @f2m_square(i32 %270, i32* %133, i32* %142)
%272 = call i32 @f2m_reduce(i32* %142)
%273 = load i32, i32* %19
%274 = load i32*, i32** %13
%275 = call i32 @f2m_mult(i32 %273, i32* %274, i32* %142, i32* %145)
%276 = call i32 @f2m_reduce(i32* %145)
%277 = load i32, i32* %19
%278 = call i32 @f2m_Add(i32 %277, i32* %139, i32* %145, i32* %76)
br label %325
279: ; preds = %224
%280 = load i32, i32* %19
%281 = call i32 @f2m_mult(i32 %280, i32* %76, i32* %73, i32* %118)
%282 = call i32 @f2m_reduce(i32* %118)
%283 = load i32, i32* %19
%284 = call i32 @f2m_mult(i32 %283, i32* %70, i32* %79, i32* %115)
%285 = call i32 @f2m_reduce(i32* %115)
%286 = load i32, i32* %19
%287 = call i32 @f2m_mult(i32 %286, i32* %115, i32* %118, i32* %121)
%288 = call i32 @f2m_reduce(i32* %121)
%289 = load i32, i32* %19
%290 = call i32 @f2m_Add(i32 %289, i32* %115, i32* %118, i32* %112)
%291 = load i32, i32* %19
%292 = call i32 @f2m_square(i32 %291, i32* %112, i32* %124)
%293 = call i32 @f2m_reduce(i32* %124)
%294 = load i32, i32* %19
%295 = call i32 @copy(i32 %294, i32* %124, i32* %79)
%296 = load i32, i32* %19
%297 = load i32*, i32** %15
%298 = call i32 @f2m_mult(i32 %296, i32* %297, i32* %124, i32* %127)
%299 = call i32 @f2m_reduce(i32* %127)
%300 = load i32, i32* %19
%301 = call i32 @f2m_Add(i32 %300, i32* %127, i32* %121, i32* %76)
%302 = load i32, i32* %19
%303 = call i32 @f2m_square(i32 %302, i32* %70, i32* %148)
%304 = call i32 @f2m_reduce(i32* %148)
%305 = load i32, i32* %19
%306 = call i32 @f2m_square(i32 %305, i32* %73, i32* %151)
%307 = call i32 @f2m_reduce(i32* %151)
%308 = load i32, i32* %19
%309 = call i32 @f2m_mult(i32 %308, i32* %148, i32* %151, i32* %154)
%310 = call i32 @f2m_reduce(i32* %154)
%311 = load i32, i32* %19
%312 = call i32 @copy(i32 %311, i32* %154, i32* %73)
%313 = load i32, i32* %19
%314 = call i32 @f2m_square(i32 %313, i32* %148, i32* %157)
%315 = call i32 @f2m_reduce(i32* %157)
%316 = load i32, i32* %19
%317 = call i32 @f2m_square(i32 %316, i32* %151, i32* %160)
%318 = call i32 @f2m_reduce(i32* %160)
%319 = load i32, i32* %19
%320 = load i32*, i32** %13
%321 = call i32 @f2m_mult(i32 %319, i32* %320, i32* %160, i32* %163)
%322 = call i32 @f2m_reduce(i32* %163)
%323 = load i32, i32* %19
%324 = call i32 @f2m_Add(i32 %323, i32* %157, i32* %163, i32* %70)
br label %325
325: ; preds = %279, %233
%326 = load i32, i32* %46
%327 = ashr i32 %326, 1
store i32 %327, i32* %46
br label %328
328: ; preds = %325
%329 = load i32, i32* %47
%330 = add nsw i32 %329, -1
store i32 %330, i32* %47
br label %170
331: ; preds = %170
br label %332
332: ; preds = %331
%333 = load i32, i32* %45
%334 = add nsw i32 %333, -1
store i32 %334, i32* %45
br label %166
335: ; preds = %166
%336 = load i32, i32* %19
%337 = zext i32 %336 to i64
%338 = alloca i32, i64 %337
store i64 %337, i64* %50
%339 = load i32, i32* %19
%340 = zext i32 %339 to i64
%341 = alloca i32, i64 %340
store i64 %340, i64* %51
%342 = load i32, i32* %19
%343 = zext i32 %342 to i64
%344 = alloca i32, i64 %343
store i64 %343, i64* %52
%345 = load i32, i32* %19
%346 = zext i32 %345 to i64
%347 = alloca i32, i64 %346
store i64 %346, i64* %53
%348 = load i32, i32* %19
%349 = zext i32 %348 to i64
%350 = alloca i32, i64 %349
store i64 %349, i64* %54
%351 = load i32, i32* %19
%352 = zext i32 %351 to i64
%353 = alloca i32, i64 %352
store i64 %352, i64* %55
%354 = load i32, i32* %19
%355 = zext i32 %354 to i64
%356 = alloca i32, i64 %355
store i64 %355, i64* %56
%357 = load i32, i32* %19
%358 = zext i32 %357 to i64
%359 = alloca i32, i64 %358
store i64 %358, i64* %57
%360 = load i32, i32* %26
%361 = zext i32 %360 to i64
%362 = alloca i32, i64 %361
store i64 %361, i64* %58
%363 = load i32, i32* %26
%364 = zext i32 %363 to i64
%365 = alloca i32, i64 %364
store i64 %364, i64* %59
%366 = load i32, i32* %26
%367 = zext i32 %366 to i64
%368 = alloca i32, i64 %367
store i64 %367, i64* %60
%369 = load i32, i32* %26
%370 = zext i32 %369 to i64
%371 = alloca i32, i64 %370
store i64 %370, i64* %61
%372 = load i32, i32* %26
%373 = zext i32 %372 to i64
%374 = alloca i32, i64 %373
store i64 %373, i64* %62
%375 = load i32, i32* %26
%376 = zext i32 %375 to i64
%377 = alloca i32, i64 %376
store i64 %376, i64* %63
store i32 0, i32* %25
br label %378
378: ; preds = %398, %335
%379 = load i32, i32* %25
%380 = load i32, i32* %26
%381 = icmp slt i32 %379, %380
br i1 %381, label %382, label %401
382: ; preds = %378
%383 = load i32, i32* %25
%384 = sext i32 %383 to i64
%385 = getelementptr inbounds i32, i32* %362, i64 %384
store i32 0, i32* %385
%386 = load i32, i32* %25
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds i32, i32* %365, i64 %387
store i32 0, i32* %388
%389 = load i32, i32* %25
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds i32, i32* %371, i64 %390
store i32 0, i32* %391
%392 = load i32, i32* %25
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds i32, i32* %374, i64 %393
store i32 0, i32* %394
%395 = load i32, i32* %25
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds i32, i32* %377, i64 %396
store i32 0, i32* %397
br label %398
398: ; preds = %382
%399 = load i32, i32* %25
%400 = add nsw i32 %399, 1
store i32 %400, i32* %25
br label %378
401: ; preds = %378
%402 = load i32, i32* %19
%403 = load i32*, i32** %11
%404 = call i32 @f2m_calculateInverse(i32 %402, i32* %73, i32* %403, i32* %338)
%405 = load i32, i32* %19
%406 = call i32 @f2m_mult(i32 %405, i32* %70, i32* %338, i32* %362)
%407 = call i32 @f2m_reduce(i32* %362)
%408 = load i32, i32* %19
%409 = load i32*, i32** %17
%410 = call i32 @copy(i32 %408, i32* %362, i32* %409)
%411 = load i32, i32* %19
%412 = load i32*, i32** %15
%413 = call i32 @f2m_Add(i32 %411, i32* %362, i32* %412, i32* %344)
%414 = load i32, i32* %19
%415 = load i32*, i32** %11
%416 = call i32 @f2m_calculateInverse(i32 %414, i32* %79, i32* %415, i32* %341)
%417 = load i32, i32* %19
%418 = call i32 @f2m_mult(i32 %417, i32* %76, i32* %341, i32* %365)
%419 = call i32 @f2m_reduce(i32* %365)
%420 = load i32, i32* %19
%421 = load i32*, i32** %15
%422 = call i32 @f2m_Add(i32 %420, i32* %365, i32* %421, i32* %347)
%423 = load i32, i32* %19
%424 = load i32*, i32** %15
%425 = call i32 @f2m_square(i32 %423, i32* %424, i32* %368)
%426 = call i32 @f2m_reduce(i32* %368)
%427 = load i32, i32* %19
%428 = call i32 @f2m_mult(i32 %427, i32* %347, i32* %344, i32* %371)
%429 = call i32 @f2m_reduce(i32* %371)
%430 = load i32, i32* %19
%431 = call i32 @f2m_Add(i32 %430, i32* %371, i32* %368, i32* %350)
%432 = load i32, i32* %19
%433 = load i32*, i32** %16
%434 = call i32 @f2m_Add(i32 %432, i32* %350, i32* %433, i32* %353)
%435 = load i32, i32* %19
%436 = call i32 @f2m_mult(i32 %435, i32* %344, i32* %353, i32* %374)
%437 = call i32 @f2m_reduce(i32* %374)
%438 = load i32, i32* %19
%439 = load i32*, i32** %15
%440 = load i32*, i32** %11
%441 = call i32 @f2m_calculateInverse(i32 %438, i32* %439, i32* %440, i32* %356)
%442 = load i32, i32* %19
%443 = call i32 @f2m_mult(i32 %442, i32* %356, i32* %374, i32* %377)
%444 = call i32 @f2m_reduce(i32* %377)
%445 = load i32, i32* %19
%446 = load i32*, i32** %16
%447 = call i32 @f2m_Add(i32 %445, i32* %377, i32* %446, i32* %359)
%448 = load i32, i32* %19
%449 = load i32*, i32** %18
%450 = call i32 @copy(i32 %448, i32* %359, i32* %449)
%451 = load i8*, i8** %20
ret void
}

LLVM IR (-O2):
define void @mult_scalar(i32 %0, i32* %1, i32* nocapture readnone %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8) {
%10 = sdiv i32 %0, 32
%11 = add nsw i32 %10, 1
%12 = zext i32 %11 to i64
%13 = alloca i32, i64 %12
%14 = alloca i32, i64 %12
%15 = alloca i32, i64 %12
%16 = alloca i32, i64 %12
%17 = icmp slt i32 %0, -31
br i1 %17, label %27, label %18
18: ; preds = %9
%19 = bitcast i32* %16 to i8*
%20 = bitcast i32* %15 to i8*
%21 = bitcast i32* %14 to i8*
%22 = bitcast i32* %13 to i8*
%23 = bitcast i32* %5 to i8*
%24 = zext i32 %10 to i64
%25 = shl nuw nsw i64 %24, 2
%26 = add nuw nsw i64 %25, 4
br label %27
27: ; preds = %18, %9
store i32 1, i32* %16
store i32 1, i32* %13
%28 = shl nsw i32 %11, 1
%29 = alloca i32, i64 %12
%30 = zext i32 %28 to i64
%31 = alloca i32, i64 %30
%32 = bitcast i32* %31 to i8*
%33 = alloca i32, i64 %30
%34 = bitcast i32* %33 to i8*
%35 = alloca i32, i64 %30
%36 = bitcast i32* %35 to i8*
%37 = alloca i32, i64 %30
%38 = alloca i32, i64 %30
%39 = bitcast i32* %38 to i8*
%40 = alloca i32, i64 %30
%41 = alloca i32, i64 %30
%42 = alloca i32, i64 %30
%43 = bitcast i32* %42 to i8*
%44 = alloca i32, i64 %30
%45 = alloca i32, i64 %30
%46 = alloca i32, i64 %30
%47 = bitcast i32* %46 to i8*
%48 = alloca i32, i64 %30
%49 = alloca i32, i64 %30
%50 = alloca i32, i64 %30
%51 = bitcast i32* %50 to i8*
%52 = alloca i32, i64 %30
%53 = alloca i32, i64 %30
%54 = alloca i32, i64 %30
%55 = bitcast i32* %54 to i8*
%56 = icmp sgt i32 %0, -32
br i1 %56, label %57, label %148
57: ; preds = %27
%58 = call i32 @llvm.smax.i32(i32 %28, i32 1)
%59 = zext i32 %58 to i64
%60 = shl nuw nsw i64 %59, 2
br label %61
61: ; preds = %141, %57
%62 = phi i32 [ %10, %57 ], [ %142, %141 ]
%63 = phi i32 [ -2147483648, %57 ], [ %143, %141 ]
%64 = phi i32 [ 31, %57 ], [ %144, %141 ]
%65 = icmp eq i32 %62, %10
%66 = icmp eq i32 %64, 31
%67 = select i1 %65, i1 %66, i1 false
br i1 %67, label %68, label %73
68: ; preds = %61
%69 = call i32 @getDegree(i32 %11, i32* %4)
%70 = sdiv i32 %69, 32
%71 = mul i32 %70, -32
%72 = add i32 %71, %69
br label %73
73: ; preds = %68, %61
%74 = phi i32 [ %72, %68 ], [ %64, %61 ]
%75 = phi i32 [ %70, %68 ], [ %62, %61 ]
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32, i32* %4, i64 %76
%78 = load i32, i32* %77
%79 = and i32 %78, %63
%80 = icmp eq i32 %79, 0
br i1 %80, label %109, label %81
81: ; preds = %73
%82 = call i32 @f2m_mult(i32 %11, i32* %13, i32* %16, i32* %31)
%83 = call i32 @f2m_mult(i32 %11, i32* %15, i32* %14, i32* %33)
%84 = call i32 @f2m_reduce(i32* %31)
%85 = call i32 @f2m_reduce(i32* %33)
%86 = call i32 @f2m_mult(i32 %11, i32* %31, i32* %33, i32* %35)
%87 = call i32 @f2m_reduce(i32* %35)
%88 = call i32 @f2m_Add(i32 %11, i32* %31, i32* %33, i32* %29)
%89 = call i32 @f2m_square(i32 %11, i32* %29, i32* %37)
%90 = call i32 @f2m_reduce(i32* %37)
%91 = call i32 @copy(i32 %11, i32* %37, i32* %14)
%92 = call i32 @f2m_mult(i32 %11, i32* %5, i32* %37, i32* %38)
%93 = call i32 @f2m_reduce(i32* %38)
%94 = call i32 @f2m_Add(i32 %11, i32* %38, i32* %35, i32* %13)
%95 = call i32 @f2m_square(i32 %11, i32* %15, i32* %40)
%96 = call i32 @f2m_reduce(i32* %40)
%97 = call i32 @f2m_square(i32 %11, i32* %16, i32* %41)
%98 = call i32 @f2m_reduce(i32* %41)
%99 = call i32 @f2m_mult(i32 %11, i32* %40, i32* %41, i32* %42)
%100 = call i32 @f2m_reduce(i32* %42)
%101 = call i32 @copy(i32 %11, i32* %42, i32* %16)
%102 = call i32 @f2m_square(i32 %11, i32* %40, i32* %44)
%103 = call i32 @f2m_reduce(i32* %44)
%104 = call i32 @f2m_square(i32 %11, i32* %41, i32* %45)
%105 = call i32 @f2m_reduce(i32* %45)
%106 = call i32 @f2m_mult(i32 %11, i32* %3, i32* %45, i32* %46)
%107 = call i32 @f2m_reduce(i32* %46)
%108 = call i32 @f2m_Add(i32 %11, i32* %44, i32* %46, i32* %15)
br label %137
109: ; preds = %73
%110 = call i32 @f2m_mult(i32 %11, i32* %15, i32* %14, i32* %33)
%111 = call i32 @f2m_reduce(i32* %33)
%112 = call i32 @f2m_mult(i32 %11, i32* %13, i32* %16, i32* %31)
%113 = call i32 @f2m_reduce(i32* %31)
%114 = call i32 @f2m_mult(i32 %11, i32* %31, i32* %33, i32* %35)
%115 = call i32 @f2m_reduce(i32* %35)
%116 = call i32 @f2m_Add(i32 %11, i32* %31, i32* %33, i32* %29)
%117 = call i32 @f2m_square(i32 %11, i32* %29, i32* %37)
%118 = call i32 @f2m_reduce(i32* %37)
%119 = call i32 @copy(i32 %11, i32* %37, i32* %16)
%120 = call i32 @f2m_mult(i32 %11, i32* %5, i32* %37, i32* %38)
%121 = call i32 @f2m_reduce(i32* %38)
%122 = call i32 @f2m_Add(i32 %11, i32* %38, i32* %35, i32* %15)
%123 = call i32 @f2m_square(i32 %11, i32* %13, i32* %48)
%124 = call i32 @f2m_reduce(i32* %48)
%125 = call i32 @f2m_square(i32 %11, i32* %14, i32* %49)
%126 = call i32 @f2m_reduce(i32* %49)
%127 = call i32 @f2m_mult(i32 %11, i32* %48, i32* %49, i32* %50)
%128 = call i32 @f2m_reduce(i32* %50)
%129 = call i32 @copy(i32 %11, i32* %50, i32* %14)
%130 = call i32 @f2m_square(i32 %11, i32* %48, i32* %52)
%131 = call i32 @f2m_reduce(i32* %52)
%132 = call i32 @f2m_square(i32 %11, i32* %49, i32* %53)
%133 = call i32 @f2m_reduce(i32* %53)
%134 = call i32 @f2m_mult(i32 %11, i32* %3, i32* %53, i32* %54)
%135 = call i32 @f2m_reduce(i32* %54)
%136 = call i32 @f2m_Add(i32 %11, i32* %52, i32* %54, i32* %13)
br label %137
137: ; preds = %109, %81
%138 = ashr i32 %63, 1
%139 = add nsw i32 %74, -1
%140 = icmp sgt i32 %74, 0
br i1 %140, label %141, label %145
141: ; preds = %137, %145
%142 = phi i32 [ %75, %137 ], [ %146, %145 ]
%143 = phi i32 [ %138, %137 ], [ -2147483648, %145 ]
%144 = phi i32 [ %139, %137 ], [ 31, %145 ]
br label %61
145: ; preds = %137
%146 = add nsw i32 %75, -1
%147 = icmp sgt i32 %75, 0
br i1 %147, label %141, label %148
148: ; preds = %145, %27
%149 = alloca i32, i64 %12
%150 = alloca i32, i64 %12
%151 = alloca i32, i64 %12
%152 = alloca i32, i64 %12
%153 = alloca i32, i64 %12
%154 = alloca i32, i64 %12
%155 = alloca i32, i64 %12
%156 = alloca i32, i64 %12
%157 = alloca i32, i64 %30
%158 = alloca i32, i64 %30
%159 = alloca i32, i64 %30
%160 = alloca i32, i64 %30
%161 = alloca i32, i64 %30
%162 = alloca i32, i64 %30
br i1 %56, label %163, label %172
163: ; preds = %148
%164 = bitcast i32* %162 to i8*
%165 = bitcast i32* %161 to i8*
%166 = bitcast i32* %160 to i8*
%167 = bitcast i32* %158 to i8*
%168 = bitcast i32* %157 to i8*
%169 = call i32 @llvm.smax.i32(i32 %28, i32 1)
%170 = zext i32 %169 to i64
%171 = shl nuw nsw i64 %170, 2
br label %172
172: ; preds = %163, %148
%173 = call i32 @f2m_calculateInverse(i32 %11, i32* %14, i32* %1, i32* %149)
%174 = call i32 @f2m_mult(i32 %11, i32* %13, i32* %149, i32* %157)
%175 = call i32 @f2m_reduce(i32* %157)
%176 = call i32 @copy(i32 %11, i32* %157, i32* %7)
%177 = call i32 @f2m_Add(i32 %11, i32* %157, i32* %5, i32* %151)
%178 = call i32 @f2m_calculateInverse(i32 %11, i32* %16, i32* %1, i32* %150)
%179 = call i32 @f2m_mult(i32 %11, i32* %15, i32* %150, i32* %158)
%180 = call i32 @f2m_reduce(i32* %158)
%181 = call i32 @f2m_Add(i32 %11, i32* %158, i32* %5, i32* %152)
%182 = call i32 @f2m_square(i32 %11, i32* %5, i32* %159)
%183 = call i32 @f2m_reduce(i32* %159)
%184 = call i32 @f2m_mult(i32 %11, i32* %152, i32* %151, i32* %160)
%185 = call i32 @f2m_reduce(i32* %160)
%186 = call i32 @f2m_Add(i32 %11, i32* %160, i32* %159, i32* %153)
%187 = call i32 @f2m_Add(i32 %11, i32* %153, i32* %6, i32* %154)
%188 = call i32 @f2m_mult(i32 %11, i32* %151, i32* %154, i32* %161)
%189 = call i32 @f2m_reduce(i32* %161)
%190 = call i32 @f2m_calculateInverse(i32 %11, i32* %5, i32* %1, i32* %155)
%191 = call i32 @f2m_mult(i32 %11, i32* %155, i32* %161, i32* %162)
%192 = call i32 @f2m_reduce(i32* %162)
%193 = call i32 @f2m_Add(i32 %11, i32* %162, i32* %6, i32* %156)
%194 = call i32 @copy(i32 %11, i32* %156, i32* %8)
ret void
}