#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*/ JacobiElliptic_complex(double, double, double, double *,
                                          double *, double *, double *,
                                          double *, double *);
int /*<<< orphan*/ printf(char *, double, double, double, double, double,
                          double, double, double, double);
int main() {
  double k = 0.5;
  double zr = 0.3;
  double zi = 0.4;
  double cnr, cni, snr, sni, dnr, dni;
  JacobiElliptic_complex(zr, zi, k, &cnr, &cni, &snr, &sni, &dnr, &dni);
  printf("%g\t%g\t%g\t%g\t%g\t%g\t%g\t%g\t%g\n", zr, zi, k, cnr, cni, snr, sni,
         dnr, dni);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x40(%rbp),%r8
lea    -0x48(%rbp),%r9
call   1030 <JacobiElliptic_complex@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm6
movsd  -0x40(%rbp),%xmm7
movsd  -0x48(%rbp),%xmm8
lea    0xe68(%rip),%rdi
movsd  %xmm8,(%rsp)
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
movsd  0xed4(%rip),%xmm2
lea    0x30(%rsp),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0x8(%rsp),%r9
call   1030 <JacobiElliptic_complex@plt>
movsd  0x30(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x18(%rsp),%xmm6
movsd  0x10(%rsp),%xmm7
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
lea    0xe89(%rip),%rdi
movsd  0xe69(%rip),%xmm0
movsd  0xe69(%rip),%xmm1
movsd  0xe69(%rip),%xmm2
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%g\09%g\09%g\09%g\09%g\09%g\09%g\09%g\09%g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double 5.000000e-01, double* %1
store double 3.000000e-01, double* %2
store double 4.000000e-01, double* %3
%10 = load double, double* %2
%11 = load double, double* %3
%12 = load double, double* %1
%13 = call i32 @JacobiElliptic_complex(double %10, double %11, double %12, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9)
%14 = load double, double* %2
%15 = load double, double* %3
%16 = load double, double* %1
%17 = load double, double* %4
%18 = load double, double* %5
%19 = load double, double* %6
%20 = load double, double* %7
%21 = load double, double* %8
%22 = load double, double* %9
%23 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %14, double %15, double %16, double %17, double %18, double %19, double %20, double %21, double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"%g\09%g\09%g\09%g\09%g\09%g\09%g\09%g\09%g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %1 to i8*
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = call i32 @JacobiElliptic_complex(double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6)
%14 = load double, double* %1
%15 = load double, double* %2
%16 = load double, double* %3
%17 = load double, double* %4
%18 = load double, double* %5
%19 = load double, double* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double %14, double %15, double %16, double %17, double %18, double %19)
ret i32 0
}