void mp_mulh_f(int n, int radix, int in1[], int in2[], int out[], int nfft,
               char *f_name_in1fft, double outfft[]) {
  void f_swap_out(int bytesize, char *f_name, char *out);
  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[]);
  mp_mul_i2d(n, radix, nfft, 0, in1, outfft);
  rdft(nfft, 1, &outfft[1]);
  f_swap_out((nfft + 2) * sizeof(double), f_name_in1fft, (char *)outfft);
  mp_mul_i2d(n, radix, nfft, 0, 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, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_mulh_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    0x18(%rbp),%r9
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    -0x24(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    $0x1,%esi
call   1050 <rdft@plt>
mov    -0x24(%rbp),%eax
add    $0x2,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
mov    0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
call   1040 <f_swap_out@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    0x18(%rbp),%r9
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    -0x24(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    $0x1,%esi
call   1050 <rdft@plt>
mov    -0x24(%rbp),%edi
mov    0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
call   1070 <mp_mul_f_cmul@plt>
mov    -0x24(%rbp),%edi
mov    0x18(%rbp),%rdx
add    $0x8,%rdx
mov    $0xffffffff,%esi
call   1050 <rdft@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1060 <mp_mul_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mulh_f>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%ebx
mov    %r8,0x10(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rdx,%r8
mov    %esi,%r15d
mov    %edi,%r12d
mov    0x50(%rsp),%r13
mov    0x58(%rsp),%rbp
mov    %r9d,%edx
xor    %ecx,%ecx
mov    %rbp,%r9
call   1030 <mp_mul_i2d@plt>
lea    0x8(%rbp),%r14
mov    %ebx,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1050 <rdft@plt>
lea    0x10(,%rbx,8),%edi
mov    %r13,%rsi
mov    %rbp,%rdx
call   1040 <f_swap_out@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    0x8(%rsp),%r8
mov    %rbp,%r9
call   1030 <mp_mul_i2d@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1050 <rdft@plt>
mov    %ebx,%edi
mov    %r13,%rsi
mov    %rbp,%rdx
call   1070 <mp_mul_f_cmul@plt>
mov    %ebx,%edi
mov    $0xffffffff,%esi
mov    %r14,%rdx
call   1050 <rdft@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %rbp,%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_f(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4, i32 %5, i8* %6, double* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca double*
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32* %2, i32** %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i32 %5, i32* %14
store i8* %6, i8** %15
store double* %7, double** %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %14
%20 = load i32*, i32** %11
%21 = load double*, double** %16
%22 = load i32, i32* %14
%23 = load double*, double** %16
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load i32, i32* %14
%26 = add nsw i32 %25, 2
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 8
%29 = trunc i64 %28 to i32
%30 = load i8*, i8** %15
%31 = load double*, double** %16
%32 = bitcast double* %31 to i8*
%33 = load i32, i32* %9
%34 = load i32, i32* %10
%35 = load i32, i32* %14
%36 = load i32*, i32** %12
%37 = load double*, double** %16
%38 = load i32, i32* %14
%39 = load double*, double** %16
%40 = getelementptr inbounds double, double* %39, i64 1
%41 = load i32, i32* %14
%42 = load i8*, i8** %15
%43 = load double*, double** %16
%44 = load i32, i32* %14
%45 = load double*, double** %16
%46 = getelementptr inbounds double, double* %45, i64 1
%47 = load i32, i32* %9
%48 = load i32, i32* %10
%49 = load i32, i32* %14
%50 = load double*, double** %16
%51 = load i32*, i32** %13
ret void
}

LLVM IR (-O2):
define void @mp_mulh_f(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4, i32 %5, i8* %6, double* %7) {
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %5, i32 0, i32* %2, double* %7)
%9 = getelementptr inbounds double, double* %7, i64 1
tail call void @rdft(i32 %5, i32 1, double* %9)
%10 = shl i32 %5, 3
%11 = add i32 %10, 16
%12 = bitcast double* %7 to i8*
tail call void @f_swap_out(i32 %11, i8* %6, i8* %12)
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %5, i32 0, i32* %3, double* %7)
tail call void @rdft(i32 %5, i32 1, double* %9)
tail call void @mp_mul_f_cmul(i32 %5, i8* %6, double* %7)
tail call void @rdft(i32 %5, i32 -1, double* %9)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %5, double* %7, i32* %4)
ret void
}