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

/* Variables and functions */
int /*<<< orphan*/ ntt32_muln(int /*<<< orphan*/ const,
                              int /*<<< orphan*/ const, int /*<<< orphan*/);
void ntt32_xmu(int32_t v[], size_t n, int32_t q, const int32_t t[],
               const int32_t u[]) {
  size_t i;
  for (i = 0; i < n; i++) {
    v[i] = ntt32_muln(t[i], u[i], q);
  }
}


x86 assembly (clang, -O0):
<ntt32_xmu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    117d <ntt32_xmu+0x6d>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x14(%rbp),%edx
call   1030 <ntt32_muln@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1133 <ntt32_xmu+0x23>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntt32_xmu>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     115e <ntt32_xmu+0x4e>
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%r13
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbp,4),%edi
mov    (%r14,%rbp,4),%esi
mov    %r12d,%edx
call   1030 <ntt32_muln@plt>
mov    %eax,0x0(%r13,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1140 <ntt32_xmu+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ntt32_xmu(i32* %0, i64 %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i64
store i32* %0, i32** %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
store i64 0, i64* %11
br label %12
12: ; preds = %30, %5
%13 = load i64, i64* %11
%14 = load i64, i64* %7
%15 = icmp ult i64 %13, %14
br i1 %15, label %16, label %33
16: ; preds = %12
%17 = load i32*, i32** %9
%18 = load i64, i64* %11
%19 = getelementptr inbounds i32, i32* %17, i64 %18
%20 = load i32, i32* %19
%21 = load i32*, i32** %10
%22 = load i64, i64* %11
%23 = getelementptr inbounds i32, i32* %21, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %8
%26 = call i32 @ntt32_muln(i32 %20, i32 %24, i32 %25)
%27 = load i32*, i32** %6
%28 = load i64, i64* %11
%29 = getelementptr inbounds i32, i32* %27, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %16
%31 = load i64, i64* %11
%32 = add i64 %31, 1
store i64 %32, i64* %11
br label %12
33: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @ntt32_xmu(i32* nocapture writeonly %0, i64 %1, i32 %2, i32* nocapture %3, i32* nocapture %4) {
%6 = icmp eq i64 %1, 0
br i1 %6, label %17, label %7
7: ; preds = %5, %7
%8 = phi i64 [ %15, %7 ], [ 0, %5 ]
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %4, i64 %8
%12 = load i32, i32* %11
%13 = tail call i32 @ntt32_muln(i32 %10, i32 %12, i32 %2)
%14 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %13, i32* %14
%15 = add nuw i64 %8, 1
%16 = icmp eq i64 %15, %1
br i1 %16, label %17, label %7
17: ; preds = %7, %5
ret void
}