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

/* Variables and functions */
int /*<<< orphan*/ blind_shiftc(int *, int *, size_t, int, int, int);
int blzrand64();
int *calloc(int, int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ ntt32_fft(int *, size_t, int, int const *);
int /*<<< orphan*/ ntt32_flp(int *, size_t, int);
int ntt32_pwr(int, int, int);
int /*<<< orphan*/ ntt32_xmu(int *, size_t, int, int *, int const *);
int blind_npm(int32_t v[], size_t n, int32_t q, const int32_t a[],
              const int32_t b[], const int32_t w[], const int32_t r[]) {
  size_t i;
  int32_t *t, *u, *z;
  int ra, rb;
  int32_t ca, da, cb, db;
  t = calloc(3 * n, sizeof(int32_t));
  if (t == NULL)
    return -1;
  u = &t[n];
  z = &u[n];
  for (i = 0; i < n; i++) {
    t[i] = a[i];
    u[i] = b[i];
  }
  ra = blzrand64() & 0xFFFF;
  ca = (blzrand64() % (q - 1)) + 1;
  da = ntt32_pwr(ca, q - 2, q);
  blind_shiftc(t, z, n, q, ra, ca);
  rb = blzrand64() & 0xFFFF;
  cb = (blzrand64() % (q - 1)) + 1;
  db = ntt32_pwr(cb, q - 2, q);
  blind_shiftc(u, z, n, q, rb, cb);
  ntt32_xmu(t, n, q, t, w);
  ntt32_fft(t, n, q, w);
  ntt32_xmu(u, n, q, u, w);
  ntt32_fft(u, n, q, w);
  ntt32_xmu(v, n, q, t, u);
  ntt32_fft(v, n, q, w);
  ntt32_xmu(v, n, q, v, r);
  ntt32_flp(v, n, q);
  blind_shiftc(v, z, n, q, -ra - rb, (da * db) % q);
  free(t);
  return 0;
}


x86 assembly (clang, -O0):
<blind_npm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
imul   $0x3,-0x18(%rbp),%rax
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    11d2 <blind_npm+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e6 <blind_npm+0x266>
mov    -0x48(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    124b <blind_npm+0xcb>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x50(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1200 <blind_npm+0x80>
mov    $0x0,%al
call   1080 <blzrand64@plt>
and    $0xffff,%eax
mov    %eax,-0x5c(%rbp)
mov    $0x0,%al
call   1080 <blzrand64@plt>
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x64(%rbp)
mov    -0x64(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    $0x2,%esi
mov    -0x1c(%rbp),%edx
call   1070 <ntt32_pwr@plt>
mov    %eax,-0x68(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
mov    -0x64(%rbp),%r9d
call   1090 <blind_shiftc@plt>
mov    $0x0,%al
call   1080 <blzrand64@plt>
and    $0xffff,%eax
mov    %eax,-0x60(%rbp)
mov    $0x0,%al
call   1080 <blzrand64@plt>
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x6c(%rbp)
mov    -0x6c(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    $0x2,%esi
mov    -0x1c(%rbp),%edx
call   1070 <ntt32_pwr@plt>
mov    %eax,-0x70(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x60(%rbp),%r8d
mov    -0x6c(%rbp),%r9d
call   1090 <blind_shiftc@plt>
mov    -0x48(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x48(%rbp),%rcx
mov    -0x38(%rbp),%r8
call   1060 <ntt32_xmu@plt>
mov    -0x48(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x38(%rbp),%rcx
call   10a0 <ntt32_fft@plt>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%r8
call   1060 <ntt32_xmu@plt>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x38(%rbp),%rcx
call   10a0 <ntt32_fft@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
call   1060 <ntt32_xmu@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x38(%rbp),%rcx
call   10a0 <ntt32_fft@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1060 <ntt32_xmu@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <ntt32_flp@plt>
mov    -0x10(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x1c(%rbp),%ecx
xor    %r8d,%r8d
sub    -0x5c(%rbp),%r8d
sub    -0x60(%rbp),%r8d
mov    -0x68(%rbp),%eax
imul   -0x70(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %edx,%r9d
mov    -0x78(%rbp),%rdx
call   1090 <blind_shiftc@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blind_npm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,%rbp
mov    %rcx,%r15
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%r13
lea    (%rsi,%rsi,2),%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
test   %rax,%rax
je     11e6 <blind_npm+0x66>
mov    %rax,%r12
mov    %r13,0x28(%rsp)
lea    (%rax,%rbx,4),%r13
lea    0x0(,%rbx,4),%rax
add    %r13,%rax
mov    %rax,0x10(%rsp)
test   %rbx,%rbx
je     12ea <blind_npm+0x16a>
cmp    $0x8,%rbx
jae    11f0 <blind_npm+0x70>
xor    %eax,%eax
jmp    12d0 <blind_npm+0x150>
mov    $0xffffffff,%eax
jmp    145f <blind_npm+0x2df>
mov    %rbx,%rax
and    $0xfffffffffffffff8,%rax
lea    -0x8(%rax),%rcx
mov    %rcx,%r8
shr    $0x3,%r8
add    $0x1,%r8
test   %rcx,%rcx
je     146e <blind_npm+0x2ee>
mov    %r8,%rsi
and    $0xfffffffffffffffe,%rsi
lea    (%r12,%rbx,4),%rdi
add    $0x30,%rdi
mov    %r12,%rcx
add    $0x30,%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movups (%r15,%rdx,4),%xmm0
movups 0x10(%r15,%rdx,4),%xmm1
movups %xmm0,-0x30(%rcx,%rdx,4)
movups %xmm1,-0x20(%rcx,%rdx,4)
movups 0x0(%rbp,%rdx,4),%xmm0
movups 0x10(%rbp,%rdx,4),%xmm1
movups %xmm0,-0x30(%rdi,%rdx,4)
movups %xmm1,-0x20(%rdi,%rdx,4)
movups 0x20(%r15,%rdx,4),%xmm0
movups 0x30(%r15,%rdx,4),%xmm1
movups %xmm0,-0x10(%rcx,%rdx,4)
movups %xmm1,(%rcx,%rdx,4)
movups 0x20(%rbp,%rdx,4),%xmm0
movups 0x30(%rbp,%rdx,4),%xmm1
movups %xmm0,-0x10(%rdi,%rdx,4)
movups %xmm1,(%rdi,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1230 <blind_npm+0xb0>
test   $0x1,%r8b
je     12bd <blind_npm+0x13d>
movups (%r15,%rdx,4),%xmm0
movups 0x10(%r15,%rdx,4),%xmm1
movups %xmm0,(%r12,%rdx,4)
movups %xmm1,0x10(%r12,%rdx,4)
movups 0x0(%rbp,%rdx,4),%xmm0
movups 0x10(%rbp,%rdx,4),%xmm1
movups %xmm0,0x0(%r13,%rdx,4)
movups %xmm1,0x10(%r13,%rdx,4)
cmp    %rbx,%rax
je     12ea <blind_npm+0x16a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rax,4),%ecx
mov    %ecx,(%r12,%rax,4)
mov    0x0(%rbp,%rax,4),%ecx
mov    %ecx,0x0(%r13,%rax,4)
add    $0x1,%rax
cmp    %rax,%rbx
jne    12d0 <blind_npm+0x150>
xor    %eax,%eax
call   1080 <blzrand64@plt>
movzwl %ax,%ebp
mov    %ebp,0x20(%rsp)
xor    %eax,%eax
call   1080 <blzrand64@plt>
lea    -0x1(%r14),%ecx
mov    %ecx,0xc(%rsp)
cltd
idiv   %ecx
lea    0x1(%rdx),%r15d
lea    -0x2(%r14),%esi
mov    %esi,0x18(%rsp)
mov    %r15d,%edi
mov    %r14d,%edx
call   1070 <ntt32_pwr@plt>
mov    %eax,0x24(%rsp)
mov    %r12,%rdi
mov    0x10(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %ebp,%r8d
mov    %r15d,%r9d
call   1090 <blind_shiftc@plt>
xor    %eax,%eax
call   1080 <blzrand64@plt>
movzwl %ax,%r15d
mov    %r15d,0x1c(%rsp)
xor    %eax,%eax
call   1080 <blzrand64@plt>
cltd
idivl  0xc(%rsp)
lea    0x1(%rdx),%ebp
mov    %ebp,%edi
mov    0x18(%rsp),%esi
mov    %r14d,%edx
call   1070 <ntt32_pwr@plt>
mov    %eax,0xc(%rsp)
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1090 <blind_shiftc@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r12,%rcx
mov    0x30(%rsp),%r15
mov    %r15,%r8
call   1060 <ntt32_xmu@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
call   10a0 <ntt32_fft@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r13,%rcx
mov    %r15,%r8
call   1060 <ntt32_xmu@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
call   10a0 <ntt32_fft@plt>
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r12,%rcx
mov    %r13,%r8
call   1060 <ntt32_xmu@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
call   10a0 <ntt32_fft@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %rbp,%rcx
mov    0x70(%rsp),%r8
call   1060 <ntt32_xmu@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <ntt32_flp@plt>
mov    0x20(%rsp),%r8d
add    0x1c(%rsp),%r8d
neg    %r8d
mov    0xc(%rsp),%eax
imul   0x24(%rsp),%eax
cltd
idiv   %r14d
mov    %edx,%r9d
mov    %rbp,%rdi
mov    0x10(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1090 <blind_shiftc@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%r8b
jne    1291 <blind_npm+0x111>
jmp    12bd <blind_npm+0x13d>

LLVM IR (-O0):
define i32 @blind_npm(i32* %0, i64 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i64
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32* %0, i32** %9
store i64 %1, i64* %10
store i32 %2, i32* %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store i32* %6, i32** %15
%26 = load i64, i64* %10
%27 = mul i64 3, %26
%28 = trunc i64 %27 to i32
%29 = call i32* @calloc(i32 %28, i32 4)
store i32* %29, i32** %17
%30 = load i32*, i32** %17
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %33
32: ; preds = %7
store i32 -1, i32* %8
br label %160
33: ; preds = %7
%34 = load i32*, i32** %17
%35 = load i64, i64* %10
%36 = getelementptr inbounds i32, i32* %34, i64 %35
store i32* %36, i32** %18
%37 = load i32*, i32** %18
%38 = load i64, i64* %10
%39 = getelementptr inbounds i32, i32* %37, i64 %38
store i32* %39, i32** %19
store i64 0, i64* %16
br label %40
40: ; preds = %59, %33
%41 = load i64, i64* %16
%42 = load i64, i64* %10
%43 = icmp ult i64 %41, %42
br i1 %43, label %44, label %62
44: ; preds = %40
%45 = load i32*, i32** %12
%46 = load i64, i64* %16
%47 = getelementptr inbounds i32, i32* %45, i64 %46
%48 = load i32, i32* %47
%49 = load i32*, i32** %17
%50 = load i64, i64* %16
%51 = getelementptr inbounds i32, i32* %49, i64 %50
store i32 %48, i32* %51
%52 = load i32*, i32** %13
%53 = load i64, i64* %16
%54 = getelementptr inbounds i32, i32* %52, i64 %53
%55 = load i32, i32* %54
%56 = load i32*, i32** %18
%57 = load i64, i64* %16
%58 = getelementptr inbounds i32, i32* %56, i64 %57
store i32 %55, i32* %58
br label %59
59: ; preds = %44
%60 = load i64, i64* %16
%61 = add i64 %60, 1
store i64 %61, i64* %16
br label %40
62: ; preds = %40
%63 = call i32 (...) @blzrand64()
%64 = and i32 %63, 65535
store i32 %64, i32* %20
%65 = call i32 (...) @blzrand64()
%66 = load i32, i32* %11
%67 = sub nsw i32 %66, 1
%68 = srem i32 %65, %67
%69 = add nsw i32 %68, 1
store i32 %69, i32* %22
%70 = load i32, i32* %22
%71 = load i32, i32* %11
%72 = sub nsw i32 %71, 2
%73 = load i32, i32* %11
%74 = call i32 @ntt32_pwr(i32 %70, i32 %72, i32 %73)
store i32 %74, i32* %23
%75 = load i32*, i32** %17
%76 = load i32*, i32** %19
%77 = load i64, i64* %10
%78 = load i32, i32* %11
%79 = load i32, i32* %20
%80 = load i32, i32* %22
%81 = call i32 @blind_shiftc(i32* %75, i32* %76, i64 %77, i32 %78, i32 %79, i32 %80)
%82 = call i32 (...) @blzrand64()
%83 = and i32 %82, 65535
store i32 %83, i32* %21
%84 = call i32 (...) @blzrand64()
%85 = load i32, i32* %11
%86 = sub nsw i32 %85, 1
%87 = srem i32 %84, %86
%88 = add nsw i32 %87, 1
store i32 %88, i32* %24
%89 = load i32, i32* %24
%90 = load i32, i32* %11
%91 = sub nsw i32 %90, 2
%92 = load i32, i32* %11
%93 = call i32 @ntt32_pwr(i32 %89, i32 %91, i32 %92)
store i32 %93, i32* %25
%94 = load i32*, i32** %18
%95 = load i32*, i32** %19
%96 = load i64, i64* %10
%97 = load i32, i32* %11
%98 = load i32, i32* %21
%99 = load i32, i32* %24
%100 = call i32 @blind_shiftc(i32* %94, i32* %95, i64 %96, i32 %97, i32 %98, i32 %99)
%101 = load i32*, i32** %17
%102 = load i64, i64* %10
%103 = load i32, i32* %11
%104 = load i32*, i32** %17
%105 = load i32*, i32** %14
%106 = call i32 @ntt32_xmu(i32* %101, i64 %102, i32 %103, i32* %104, i32* %105)
%107 = load i32*, i32** %17
%108 = load i64, i64* %10
%109 = load i32, i32* %11
%110 = load i32*, i32** %14
%111 = call i32 @ntt32_fft(i32* %107, i64 %108, i32 %109, i32* %110)
%112 = load i32*, i32** %18
%113 = load i64, i64* %10
%114 = load i32, i32* %11
%115 = load i32*, i32** %18
%116 = load i32*, i32** %14
%117 = call i32 @ntt32_xmu(i32* %112, i64 %113, i32 %114, i32* %115, i32* %116)
%118 = load i32*, i32** %18
%119 = load i64, i64* %10
%120 = load i32, i32* %11
%121 = load i32*, i32** %14
%122 = call i32 @ntt32_fft(i32* %118, i64 %119, i32 %120, i32* %121)
%123 = load i32*, i32** %9
%124 = load i64, i64* %10
%125 = load i32, i32* %11
%126 = load i32*, i32** %17
%127 = load i32*, i32** %18
%128 = call i32 @ntt32_xmu(i32* %123, i64 %124, i32 %125, i32* %126, i32* %127)
%129 = load i32*, i32** %9
%130 = load i64, i64* %10
%131 = load i32, i32* %11
%132 = load i32*, i32** %14
%133 = call i32 @ntt32_fft(i32* %129, i64 %130, i32 %131, i32* %132)
%134 = load i32*, i32** %9
%135 = load i64, i64* %10
%136 = load i32, i32* %11
%137 = load i32*, i32** %9
%138 = load i32*, i32** %15
%139 = call i32 @ntt32_xmu(i32* %134, i64 %135, i32 %136, i32* %137, i32* %138)
%140 = load i32*, i32** %9
%141 = load i64, i64* %10
%142 = load i32, i32* %11
%143 = call i32 @ntt32_flp(i32* %140, i64 %141, i32 %142)
%144 = load i32*, i32** %9
%145 = load i32*, i32** %19
%146 = load i64, i64* %10
%147 = load i32, i32* %11
%148 = load i32, i32* %20
%149 = sub nsw i32 0, %148
%150 = load i32, i32* %21
%151 = sub nsw i32 %149, %150
%152 = load i32, i32* %23
%153 = load i32, i32* %25
%154 = mul nsw i32 %152, %153
%155 = load i32, i32* %11
%156 = srem i32 %154, %155
%157 = call i32 @blind_shiftc(i32* %144, i32* %145, i64 %146, i32 %147, i32 %151, i32 %156)
%158 = load i32*, i32** %17
%159 = call i32 @free(i32* %158)
store i32 0, i32* %8
br label %160
160: ; preds = %62, %32
%161 = load i32, i32* %8
ret i32 %161
}

LLVM IR (-O2):
define i32 @blind_npm(i32* %0, i64 %1, i32 %2, i32* nocapture %3, i32* nocapture %4, i32* %5, i32* %6) {
%8 = trunc i64 %1 to i32
%9 = mul i32 %8, 3
%10 = tail call i32* @calloc(i32 %9, i32 4)
%11 = icmp eq i32* %10, null
br i1 %11, label %143, label %12
12: ; preds = %7
%13 = getelementptr i32, i32* %10, i64 %1
%14 = getelementptr inbounds i32, i32* %13, i64 %1
%15 = icmp eq i64 %1, 0
br i1 %15, label %112, label %16
16: ; preds = %12
%17 = icmp ult i64 %1, 8
br i1 %17, label %100, label %18
18: ; preds = %16
%19 = and i64 %1, -8
%20 = add i64 %19, -8
%21 = lshr exact i64 %20, 3
%22 = add nuw nsw i64 %21, 1
%23 = and i64 %22, 1
%24 = icmp eq i64 %20, 0
br i1 %24, label %74, label %25
25: ; preds = %18
%26 = and i64 %22, 4611686018427387902
br label %27
27: ; preds = %27, %25
%28 = phi i64 [ 0, %25 ], [ %71, %27 ]
%29 = phi i64 [ 0, %25 ], [ %72, %27 ]
%30 = getelementptr inbounds i32, i32* %3, i64 %28
%31 = bitcast i32* %30 to <4 x i32>*
%32 = load <4 x i32>, <4 x i32>* %31
%33 = getelementptr inbounds i32, i32* %30, i64 4
%34 = bitcast i32* %33 to <4 x i32>*
%35 = load <4 x i32>, <4 x i32>* %34
%36 = getelementptr inbounds i32, i32* %10, i64 %28
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> %32, <4 x i32>* %37
%38 = getelementptr inbounds i32, i32* %36, i64 4
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> %35, <4 x i32>* %39
%40 = getelementptr inbounds i32, i32* %4, i64 %28
%41 = bitcast i32* %40 to <4 x i32>*
%42 = load <4 x i32>, <4 x i32>* %41
%43 = getelementptr inbounds i32, i32* %40, i64 4
%44 = bitcast i32* %43 to <4 x i32>*
%45 = load <4 x i32>, <4 x i32>* %44
%46 = getelementptr inbounds i32, i32* %13, i64 %28
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> %42, <4 x i32>* %47
%48 = getelementptr inbounds i32, i32* %46, i64 4
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %45, <4 x i32>* %49
%50 = or i64 %28, 8
%51 = getelementptr inbounds i32, i32* %3, i64 %50
%52 = bitcast i32* %51 to <4 x i32>*
%53 = load <4 x i32>, <4 x i32>* %52
%54 = getelementptr inbounds i32, i32* %51, i64 4
%55 = bitcast i32* %54 to <4 x i32>*
%56 = load <4 x i32>, <4 x i32>* %55
%57 = getelementptr inbounds i32, i32* %10, i64 %50
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> %53, <4 x i32>* %58
%59 = getelementptr inbounds i32, i32* %57, i64 4
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> %56, <4 x i32>* %60
%61 = getelementptr inbounds i32, i32* %4, i64 %50
%62 = bitcast i32* %61 to <4 x i32>*
%63 = load <4 x i32>, <4 x i32>* %62
%64 = getelementptr inbounds i32, i32* %61, i64 4
%65 = bitcast i32* %64 to <4 x i32>*
%66 = load <4 x i32>, <4 x i32>* %65
%67 = getelementptr inbounds i32, i32* %13, i64 %50
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> %63, <4 x i32>* %68
%69 = getelementptr inbounds i32, i32* %67, i64 4
%70 = bitcast i32* %69 to <4 x i32>*
store <4 x i32> %66, <4 x i32>* %70
%71 = add nuw i64 %28, 16
%72 = add i64 %29, 2
%73 = icmp eq i64 %72, %26
br i1 %73, label %74, label %27
74: ; preds = %27, %18
%75 = phi i64 [ 0, %18 ], [ %71, %27 ]
%76 = icmp eq i64 %23, 0
br i1 %76, label %98, label %77
77: ; preds = %74
%78 = getelementptr inbounds i32, i32* %3, i64 %75
%79 = bitcast i32* %78 to <4 x i32>*
%80 = load <4 x i32>, <4 x i32>* %79
%81 = getelementptr inbounds i32, i32* %78, i64 4
%82 = bitcast i32* %81 to <4 x i32>*
%83 = load <4 x i32>, <4 x i32>* %82
%84 = getelementptr inbounds i32, i32* %10, i64 %75
%85 = bitcast i32* %84 to <4 x i32>*
store <4 x i32> %80, <4 x i32>* %85
%86 = getelementptr inbounds i32, i32* %84, i64 4
%87 = bitcast i32* %86 to <4 x i32>*
store <4 x i32> %83, <4 x i32>* %87
%88 = getelementptr inbounds i32, i32* %4, i64 %75
%89 = bitcast i32* %88 to <4 x i32>*
%90 = load <4 x i32>, <4 x i32>* %89
%91 = getelementptr inbounds i32, i32* %88, i64 4
%92 = bitcast i32* %91 to <4 x i32>*
%93 = load <4 x i32>, <4 x i32>* %92
%94 = getelementptr inbounds i32, i32* %13, i64 %75
%95 = bitcast i32* %94 to <4 x i32>*
store <4 x i32> %90, <4 x i32>* %95
%96 = getelementptr inbounds i32, i32* %94, i64 4
%97 = bitcast i32* %96 to <4 x i32>*
store <4 x i32> %93, <4 x i32>* %97
br label %98
98: ; preds = %74, %77
%99 = icmp eq i64 %19, %1
br i1 %99, label %112, label %100
100: ; preds = %16, %98
%101 = phi i64 [ 0, %16 ], [ %19, %98 ]
br label %102
102: ; preds = %100, %102
%103 = phi i64 [ %110, %102 ], [ %101, %100 ]
%104 = getelementptr inbounds i32, i32* %3, i64 %103
%105 = load i32, i32* %104
%106 = getelementptr inbounds i32, i32* %10, i64 %103
store i32 %105, i32* %106
%107 = getelementptr inbounds i32, i32* %4, i64 %103
%108 = load i32, i32* %107
%109 = getelementptr inbounds i32, i32* %13, i64 %103
store i32 %108, i32* %109
%110 = add nuw i64 %103, 1
%111 = icmp eq i64 %110, %1
br i1 %111, label %112, label %102
112: ; preds = %102, %98, %12
%113 = tail call i32 (...) @blzrand64()
%114 = and i32 %113, 65535
%115 = tail call i32 (...) @blzrand64()
%116 = add nsw i32 %2, -1
%117 = srem i32 %115, %116
%118 = add nsw i32 %117, 1
%119 = add nsw i32 %2, -2
%120 = tail call i32 @ntt32_pwr(i32 %118, i32 %119, i32 %2)
%121 = tail call i32 @blind_shiftc(i32* %10, i32* %14, i64 %1, i32 %2, i32 %114, i32 %118)
%122 = tail call i32 (...) @blzrand64()
%123 = and i32 %122, 65535
%124 = tail call i32 (...) @blzrand64()
%125 = srem i32 %124, %116
%126 = add nsw i32 %125, 1
%127 = tail call i32 @ntt32_pwr(i32 %126, i32 %119, i32 %2)
%128 = tail call i32 @blind_shiftc(i32* %13, i32* %14, i64 %1, i32 %2, i32 %123, i32 %126)
%129 = tail call i32 @ntt32_xmu(i32* %10, i64 %1, i32 %2, i32* %10, i32* %5)
%130 = tail call i32 @ntt32_fft(i32* %10, i64 %1, i32 %2, i32* %5)
%131 = tail call i32 @ntt32_xmu(i32* %13, i64 %1, i32 %2, i32* %13, i32* %5)
%132 = tail call i32 @ntt32_fft(i32* %13, i64 %1, i32 %2, i32* %5)
%133 = tail call i32 @ntt32_xmu(i32* %0, i64 %1, i32 %2, i32* %10, i32* %13)
%134 = tail call i32 @ntt32_fft(i32* %0, i64 %1, i32 %2, i32* %5)
%135 = tail call i32 @ntt32_xmu(i32* %0, i64 %1, i32 %2, i32* %0, i32* %6)
%136 = tail call i32 @ntt32_flp(i32* %0, i64 %1, i32 %2)
%137 = add nuw nsw i32 %114, %123
%138 = sub nsw i32 0, %137
%139 = mul nsw i32 %127, %120
%140 = srem i32 %139, %2
%141 = tail call i32 @blind_shiftc(i32* %0, i32* %14, i64 %1, i32 %2, i32 %138, i32 %140)
%142 = tail call i32 @free(i32* %10)
br label %143
143: ; preds = %7, %112
%144 = phi i32 [ 0, %112 ], [ -1, %7 ]
ret i32 %144
}