void mp_mulh(int n, int radix, int in1[], int in2[], int out[], int nfft,
             double in1fft[], double outfft[], 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 d1[], double d2[], int ip[], double w[]);
  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, ip, w);
  mp_mul_d2i(n, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_mulh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
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
mov    0x20(%rbp),%rcx
mov    0x28(%rbp),%r8
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
sub    $0x18,%rsp
mov    %r9d,%ebp
mov    %r8,0x10(%rsp)
mov    %rcx,%r13
mov    %rdx,%r8
mov    %esi,%r15d
mov    %edi,%ebx
mov    0x60(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x68(%rsp),%rax
mov    %rax,(%rsp)
mov    0x58(%rsp),%r12
mov    0x50(%rsp),%r14
mov    %r9d,%edx
xor    %ecx,%ecx
mov    %r14,%r9
call   1030 <mp_mul_i2d@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %r13,%r8
mov    %r12,%r9
call   1030 <mp_mul_i2d@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r12,%rdx
mov    0x8(%rsp),%rcx
mov    (%rsp),%r8
call   1040 <mp_mul_cmul@plt>
mov    %ebx,%edi
mov    %r15d,%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    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, i32* %8, double* %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32
%17 = alloca double*
%18 = alloca double*
%19 = alloca i32*
%20 = alloca double*
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32* %2, i32** %13
store i32* %3, i32** %14
store i32* %4, i32** %15
store i32 %5, i32* %16
store double* %6, double** %17
store double* %7, double** %18
store i32* %8, i32** %19
store double* %9, double** %20
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = load i32, i32* %16
%24 = load i32*, i32** %13
%25 = load double*, double** %17
%26 = load i32, i32* %11
%27 = load i32, i32* %12
%28 = load i32, i32* %16
%29 = load i32*, i32** %14
%30 = load double*, double** %18
%31 = load i32, i32* %16
%32 = load double*, double** %17
%33 = load double*, double** %18
%34 = load i32*, i32** %19
%35 = load double*, double** %20
%36 = load i32, i32* %11
%37 = load i32, i32* %12
%38 = load i32, i32* %16
%39 = load double*, double** %18
%40 = load i32*, i32** %15
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, i32* %8, double* %9) {
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, i32* %8, double* %9)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %5, double* %7, i32* %4)
ret void
}