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 mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_cmul_nt_d1(int nfft, double d1[], double d2[], int ip[],
                         double w[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  int n_h;
  while (n > shift) {
    if (in2[shift + 2] != 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);
  mp_mul_cmul_nt_d1(nfft, in1fft, outfft, ip, w);
  mp_mul_d2i(n_h, 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    1192 <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     1184 <mp_mulh_use_in1fft+0x54>
jmp    1192 <mp_mulh_use_in1fft+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <mp_mulh_use_in1fft+0x2c>
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    11bd <mp_mulh_use_in1fft+0x8d>
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   1040 <mp_mul_i2d@plt>
mov    0x10(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    0x28(%rbp),%r8
call   1030 <mp_mul_cmul_nt_d1@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    $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    %esi,%r15d
mov    0x68(%rsp),%r13
mov    0x60(%rsp),%r14
mov    0x58(%rsp),%rbx
mov    0x50(%rsp),%ebp
cmp    %edi,%ecx
jge    1182 <mp_mulh_use_in1fft+0x52>
movslq %ecx,%rax
lea    (%r8,%rax,4),%rax
add    $0x8,%rax
nopl   (%rax)
cmpl   $0x0,(%rax)
jne    1182 <mp_mulh_use_in1fft+0x52>
add    $0x1,%ecx
add    $0x4,%rax
cmp    %ecx,%edi
jne    1170 <mp_mulh_use_in1fft+0x40>
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
add    $0x1,%eax
mov    %edi,%r12d
sub    %ecx,%r12d
cmp    %r12d,%eax
cmovge %eax,%r12d
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rbx,%r9
call   1040 <mp_mul_i2d@plt>
mov    %ebp,%edi
mov    0x8(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1030 <mp_mul_cmul_nt_d1@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rbx,%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_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*
%21 = alloca i32
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 %22
22: ; preds = %35, %10
%23 = load i32, i32* %11
%24 = load i32, i32* %14
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %38
26: ; preds = %22
%27 = load i32*, i32** %15
%28 = load i32, i32* %14
%29 = add nsw i32 %28, 2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %27, i64 %30
%32 = load i32, i32* %31
%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* %14
%37 = add nsw i32 %36, 1
store i32 %37, i32* %14
br label %22
38: ; preds = %34, %22
%39 = load i32, i32* %11
%40 = sdiv i32 %39, 2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %21
%42 = load i32, i32* %21
%43 = load i32, i32* %11
%44 = load i32, i32* %14
%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* %11
%49 = load i32, i32* %14
%50 = sub nsw i32 %48, %49
store i32 %50, i32* %21
br label %51
51: ; preds = %47, %38
%52 = load i32, i32* %11
%53 = load i32, i32* %12
%54 = load i32, i32* %17
%55 = load i32, i32* %14
%56 = load i32*, i32** %15
%57 = load double*, double** %18
%58 = load i32, i32* %17
%59 = load double*, double** %13
%60 = load double*, double** %18
%61 = load i32*, i32** %19
%62 = load double*, double** %20
%63 = load i32, i32* %21
%64 = load i32, i32* %12
%65 = load i32, i32* %17
%66 = load double*, double** %18
%67 = 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 ]
%28 = sdiv i32 %0, 2
%29 = add nsw i32 %28, 1
%30 = sub nsw i32 %0, %27
%31 = icmp slt i32 %29, %30
%32 = select i1 %31, i32 %30, i32 %29
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %6, i32 %27, i32* %4, double* %7)
tail call void @mp_mul_cmul_nt_d1(i32 %6, double* %2, double* %7, i32* %8, double* %9)
tail call void @mp_mul_d2i(i32 %32, i32 %1, i32 %6, double* %7, i32* %5)
ret void
}