void mp_mulh(int n, int radix, int in1[], int in2[], int out[], int nfft,
             double in1fft[], double outfft[]) {
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_cmul(int nfft, double d1[], double d2[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  mp_mul_i2d(n, radix, nfft, 0, in1, in1fft);
  mp_mul_i2d(n, radix, nfft, 0, in2, outfft);
  mp_mul_cmul(nfft, in1fft, outfft);
  mp_mul_d2i(n, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_mulh>:
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    0x10(%rbp),%r9
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@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    0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
call   1040 <mp_mul_cmul@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1050 <mp_mul_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mulh>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebp
mov    %r8,(%rsp)
mov    %rcx,%r15
mov    %rdx,%r8
mov    %esi,%r12d
mov    %edi,%ebx
mov    0x48(%rsp),%r13
mov    0x40(%rsp),%r14
mov    %r9d,%edx
xor    %ecx,%ecx
mov    %r14,%r9
call   1030 <mp_mul_i2d@plt>
mov    %ebx,%edi
mov    %r12d,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %r15,%r8
mov    %r13,%r9
call   1030 <mp_mul_i2d@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r13,%rdx
call   1040 <mp_mul_cmul@plt>
mov    %ebx,%edi
mov    %r12d,%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(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4, i32 %5, double* %6, double* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca double*
%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 double* %6, double** %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** %15
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = load i32, i32* %14
%25 = load i32*, i32** %12
%26 = load double*, double** %16
%27 = load i32, i32* %14
%28 = load double*, double** %15
%29 = load double*, double** %16
%30 = load i32, i32* %9
%31 = load i32, i32* %10
%32 = load i32, i32* %14
%33 = load double*, double** %16
%34 = load i32*, i32** %13
ret void
}

LLVM IR (-O2):
define void @mp_mulh(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4, i32 %5, double* %6, double* %7) {
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %5, i32 0, i32* %2, double* %6)
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %5, i32 0, i32* %3, double* %7)
tail call void @mp_mul_cmul(i32 %5, double* %6, double* %7)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %5, double* %7, i32* %4)
ret void
}