void mp_mulh_use_in1fft(int n, int radix, double in1fft[], int shift, int in2[],
                        int out[], int nfft, double outfft[], int ip[],
                        double w[]) {
  void rdft(int n, int isgn, double *a, int *ip, double *w);
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_cmul(int nfft, double din[], double dinout[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  while (n > shift) {
    if (in2[shift + 2] != 0) {
      break;
    }
    shift++;
  }
  mp_mul_i2d(n, radix, nfft, shift, in2, outfft);
  rdft(nfft, 1, &outfft[1], ip, w);
  mp_mul_cmul(nfft, in1fft, outfft);
  rdft(nfft, -1, &outfft[1], ip, w);
  mp_mul_d2i(n, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_mulh_use_in1fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11a2 <mp_mulh_use_in1fft+0x62>
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1194 <mp_mulh_use_in1fft+0x54>
jmp    11a2 <mp_mulh_use_in1fft+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116c <mp_mulh_use_in1fft+0x2c>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    0x18(%rbp),%r9
call   1030 <mp_mul_i2d@plt>
mov    0x10(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    0x20(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    $0x1,%esi
call   1040 <rdft@plt>
mov    0x10(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
call   1050 <mp_mul_cmul@plt>
mov    0x10(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    0x20(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    $0xffffffff,%esi
call   1040 <rdft@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1060 <mp_mul_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mulh_use_in1fft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %edi,%ebx
mov    0x68(%rsp),%r14
mov    0x60(%rsp),%r13
mov    0x58(%rsp),%r12
mov    0x50(%rsp),%ebp
cmp    %edi,%ecx
jge    1192 <mp_mulh_use_in1fft+0x52>
movslq %ecx,%rax
lea    (%r8,%rax,4),%rax
add    $0x8,%rax
nopl   0x0(%rax)
cmpl   $0x0,(%rax)
jne    1192 <mp_mulh_use_in1fft+0x52>
add    $0x1,%ecx
add    $0x4,%rax
cmp    %ecx,%ebx
jne    1180 <mp_mulh_use_in1fft+0x40>
mov    %ebx,%ecx
mov    %ebx,%edi
mov    %esi,0x4(%rsp)
mov    %ebp,%edx
mov    %r12,%r9
call   1030 <mp_mul_i2d@plt>
lea    0x8(%r12),%r15
mov    %ebp,%edi
mov    $0x1,%esi
mov    %r15,%rdx
mov    %r13,%rcx
mov    %r14,%r8
call   1040 <rdft@plt>
mov    %ebp,%edi
mov    0x8(%rsp),%rsi
mov    %r12,%rdx
call   1050 <mp_mul_cmul@plt>
mov    %ebp,%edi
mov    $0xffffffff,%esi
mov    %r15,%rdx
mov    %r13,%rcx
mov    %r14,%r8
call   1040 <rdft@plt>
mov    %ebx,%edi
mov    0x4(%rsp),%esi
mov    %ebp,%edx
mov    %r12,%rcx
mov    0x10(%rsp),%r8
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <mp_mul_d2i@plt>

LLVM IR (-O0):
define void @mp_mulh_use_in1fft(i32 %0, i32 %1, double* %2, i32 %3, i32* %4, i32* %5, i32 %6, double* %7, i32* %8, double* %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca double*
%19 = alloca i32*
%20 = alloca double*
store i32 %0, i32* %11
store i32 %1, i32* %12
store double* %2, double** %13
store i32 %3, i32* %14
store i32* %4, i32** %15
store i32* %5, i32** %16
store i32 %6, i32* %17
store double* %7, double** %18
store i32* %8, i32** %19
store double* %9, double** %20
br label %21
21: ; preds = %34, %10
%22 = load i32, i32* %11
%23 = load i32, i32* %14
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %37
25: ; preds = %21
%26 = load i32*, i32** %15
%27 = load i32, i32* %14
%28 = add nsw i32 %27, 2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %26, i64 %29
%31 = load i32, i32* %30
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %25
br label %37
34: ; preds = %25
%35 = load i32, i32* %14
%36 = add nsw i32 %35, 1
store i32 %36, i32* %14
br label %21
37: ; preds = %33, %21
%38 = load i32, i32* %11
%39 = load i32, i32* %12
%40 = load i32, i32* %17
%41 = load i32, i32* %14
%42 = load i32*, i32** %15
%43 = load double*, double** %18
%44 = load i32, i32* %17
%45 = load double*, double** %18
%46 = getelementptr inbounds double, double* %45, i64 1
%47 = load i32*, i32** %19
%48 = load double*, double** %20
%49 = load i32, i32* %17
%50 = load double*, double** %13
%51 = load double*, double** %18
%52 = load i32, i32* %17
%53 = load double*, double** %18
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load i32*, i32** %19
%56 = load double*, double** %20
%57 = load i32, i32* %11
%58 = load i32, i32* %12
%59 = load i32, i32* %17
%60 = load double*, double** %18
%61 = load i32*, i32** %16
ret void
}

LLVM IR (-O2):
define void @mp_mulh_use_in1fft(i32 %0, i32 %1, double* %2, i32 %3, i32* %4, i32* %5, i32 %6, double* %7, i32* %8, double* %9) {
%11 = icmp slt i32 %3, %0
br i1 %11, label %12, label %26
12: ; preds = %10
%13 = sext i32 %3 to i64
br label %14
14: ; preds = %12, %20
%15 = phi i64 [ %13, %12 ], [ %21, %20 ]
%16 = add nsw i64 %15, 2
%17 = getelementptr inbounds i32, i32* %4, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %14
%21 = add nsw i64 %15, 1
%22 = trunc i64 %21 to i32
%23 = icmp eq i32 %22, %0
br i1 %23, label %26, label %14
24: ; preds = %14
%25 = trunc i64 %15 to i32
br label %26
26: ; preds = %20, %24, %10
%27 = phi i32 [ %3, %10 ], [ %25, %24 ], [ %0, %20 ]
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %6, i32 %27, i32* %4, double* %7)
%28 = getelementptr inbounds double, double* %7, i64 1
tail call void @rdft(i32 %6, i32 1, double* %28, i32* %8, double* %9)
tail call void @mp_mul_cmul(i32 %6, double* %2, double* %7)
tail call void @rdft(i32 %6, i32 -1, double* %28, i32* %8, double* %9)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %6, double* %7, i32* %5)
ret void
}