#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fftr(double *, double *, int const);
int /*<<< orphan*/ fillz(double *, int, int const);
int /*<<< orphan*/ movem(double *, double *, int, int);
void c2sp(double *c, const int m, double *x, double *y, const int l) {
  int m1;
  m1 = m + 1;
  movem(c, x, sizeof(*c), m1);
  fillz(x + m1, sizeof(*x), l - m1);
  fftr(x, y, l);
}


x86 assembly (clang, -O0):
<c2sp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%ecx
mov    $0x8,%edx
call   1040 <movem@plt>
mov    -0x18(%rbp),%rdi
movslq -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x24(%rbp),%edx
sub    -0x28(%rbp),%edx
mov    $0x8,%esi
call   1050 <fillz@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <fftr@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2sp>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r15d
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
lea    0x1(%rbp),%r12d
mov    %rdx,%rsi
mov    $0x8,%edx
mov    %r12d,%ecx
call   1040 <movem@plt>
movslq %ebp,%rax
lea    (%rbx,%rax,8),%rdi
add    $0x8,%rdi
mov    %r15d,%edx
sub    %r12d,%edx
mov    $0x8,%esi
call   1050 <fillz@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fftr@plt>

LLVM IR (-O0):
define void @c2sp(double* %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
store double* %0, double** %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store i32 %4, i32* %10
%12 = load i32, i32* %7
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
%14 = load double*, double** %6
%15 = load double*, double** %8
%16 = load i32, i32* %11
%17 = call i32 @movem(double* %14, double* %15, i32 8, i32 %16)
%18 = load double*, double** %8
%19 = load i32, i32* %11
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load i32, i32* %10
%23 = load i32, i32* %11
%24 = sub nsw i32 %22, %23
%25 = call i32 @fillz(double* %21, i32 8, i32 %24)
%26 = load double*, double** %8
%27 = load double*, double** %9
%28 = load i32, i32* %10
%29 = call i32 @fftr(double* %26, double* %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @c2sp(double* %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = add nsw i32 %1, 1
%7 = tail call i32 @movem(double* %0, double* %2, i32 8, i32 %6)
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds double, double* %2, i64 %8
%10 = sub nsw i32 %4, %6
%11 = tail call i32 @fillz(double* %9, i32 8, i32 %10)
%12 = tail call i32 @fftr(double* %2, double* %3, i32 %4)
ret void
}