void mp_mulh_f_use_in1fft(int n, int radix, char *f_name_in1fft, int shift,
                          int in2[], int out[], int nfft, double outfft[]) {
  void rdft(int n, int isgn, double *a);
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_f_cmul(int nfft, char *f_name_in, double dinout[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  int n_h;
  short int *in2dgt;
  in2dgt = (short int *)&in2[2];
  while (n > shift) {
    if (in2dgt[shift] != 0) {
      break;
    }
    shift++;
  }
  n_h = n / 2 + 1;
  if (n_h < n - shift) {
    n_h = n - shift;
  }
  mp_mul_i2d(n, radix, nfft, shift, in2, outfft);
  rdft(nfft, 1, &outfft[1]);
  mp_mul_f_cmul(nfft, f_name_in1fft, outfft);
  rdft(nfft, -1, &outfft[1]);
  mp_mul_d2i(n_h, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_mulh_f_use_in1fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11a4 <mp_mulh_f_use_in1fft+0x64>
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cmp    $0x0,%eax
je     1196 <mp_mulh_f_use_in1fft+0x56>
jmp    11a4 <mp_mulh_f_use_in1fft+0x64>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1170 <mp_mulh_f_use_in1fft+0x30>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    11cf <mp_mulh_f_use_in1fft+0x8f>
mov    -0x4(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
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    $0x1,%esi
call   1040 <rdft@plt>
mov    0x10(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
call   1060 <mp_mul_f_cmul@plt>
mov    0x10(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    $0xffffffff,%esi
call   1040 <rdft@plt>
mov    -0x2c(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1050 <mp_mul_d2i@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mulh_f_use_in1fft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,(%rsp)
mov    %rdx,%r12
mov    %esi,%r15d
mov    0x48(%rsp),%r13
mov    0x40(%rsp),%ebp
cmp    %edi,%ecx
jge    1183 <mp_mulh_f_use_in1fft+0x43>
movslq %ecx,%rax
lea    (%r8,%rax,2),%rax
add    $0x8,%rax
nopl   (%rax)
cmpw   $0x0,(%rax)
jne    1183 <mp_mulh_f_use_in1fft+0x43>
add    $0x1,%ecx
add    $0x2,%rax
cmp    %ecx,%edi
jne    1170 <mp_mulh_f_use_in1fft+0x30>
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
add    $0x1,%eax
mov    %edi,%ebx
sub    %ecx,%ebx
cmp    %ebx,%eax
cmovge %eax,%ebx
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r13,%r9
call   1030 <mp_mul_i2d@plt>
lea    0x8(%r13),%r14
mov    %ebp,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1040 <rdft@plt>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r13,%rdx
call   1060 <mp_mul_f_cmul@plt>
mov    %ebp,%edi
mov    $0xffffffff,%esi
mov    %r14,%rdx
call   1040 <rdft@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r13,%rcx
mov    (%rsp),%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <mp_mul_d2i@plt>

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

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