#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*/ printf(char *, ...);
double wig3jj(int, int, int, int, int, int);
double wig6jj(int, int, int, int, int, int);
double wig9jj(int, int, int, int, int, int, int, int, int);
int /*<<< orphan*/ wig_table_free();
int /*<<< orphan*/ wig_table_init(int, int);
int /*<<< orphan*/ wig_temp_free();
int /*<<< orphan*/ wig_temp_init(int);
int main() {
  double val3j, val6j, val9j;
  printf("WIGXJPF C test program\n");
  wig_table_init(2 * 100, 9);
  wig_temp_init(2 * 100);
  val3j = wig3jj(2 * 10, 2 * 15, 2 * 10, 2 * (-3), 2 * 12, 2 * (-9));
  printf("3J(10  15  10; -3  12  -9):      %#25.15f\n", val3j);
  val6j = wig6jj(2 * 10, 2 * 15, 2 * 10, 2 * 7, 2 * 7, 2 * 9);
  printf("6J{10  15  10;  7   7   9}:      %#25.15f\n", val6j);
  val9j = wig9jj(1, 2, 3, 4, 6, 8, 3, 6, 9);
  printf("9J{0.5 1 1.5; 2 3 4; 1.5 3 4.5}: %#25.15f\n", val9j);
  wig_temp_free();
  wig_table_free();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xc8,%edi
mov    $0x9,%esi
call   1030 <wig_table_init@plt>
mov    $0xc8,%edi
call   1080 <wig_temp_init@plt>
mov    $0x14,%edx
mov    $0x1e,%esi
mov    $0xfffffffa,%ecx
mov    $0x18,%r8d
mov    $0xffffffee,%r9d
mov    %edx,%edi
call   1090 <wig3jj@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe2f(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0x14,%edx
mov    $0x1e,%esi
mov    $0xe,%r8d
mov    $0x12,%r9d
mov    %edx,%edi
mov    %r8d,%ecx
call   1070 <wig6jj@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe22(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x6,%r8d
mov    $0x8,%r9d
movl   $0x3,(%rsp)
movl   $0x6,0x8(%rsp)
movl   $0x9,0x10(%rsp)
call   1050 <wig9jj@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xdf9(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1040 <wig_temp_free@plt>
mov    $0x0,%al
call   10a0 <wig_table_free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1050 <puts@plt>
mov    $0xc8,%edi
mov    $0x9,%esi
call   1030 <wig_table_init@plt>
mov    $0xc8,%edi
call   1090 <wig_temp_init@plt>
mov    $0x14,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0xfffffffa,%ecx
mov    $0x18,%r8d
mov    $0xffffffee,%r9d
call   10a0 <wig3jj@plt>
lea    0xe1e(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    $0x14,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0xe,%ecx
mov    $0xe,%r8d
mov    $0x12,%r9d
call   1080 <wig6jj@plt>
lea    0xe16(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x6,%r8d
mov    $0x8,%r9d
push   $0x9
push   $0x6
push   $0x3
call   1060 <wig9jj@plt>
add    $0x20,%rsp
lea    0xe00(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
xor    %eax,%eax
call   1040 <wig_temp_free@plt>
xor    %eax,%eax
call   10b0 <wig_table_free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"WIGXJPF C test program\0A\00"
@.str.1 = [43 x i8] c"3J(10 15 10; -3 12 -9): %.15f\0A\00"
@.str.2 = [43 x i8] c"6J{10 15 10; 7 7 9}: %.15f\0A\00"
@.str.3 = [43 x i8] c"9J{0.5 1 1.5; 2 3 4; 1.5 3 4.5}: %.15f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @wig_table_init(i32 200, i32 9)
%7 = call i32 @wig_temp_init(i32 200)
%8 = call double @wig3jj(i32 20, i32 30, i32 20, i32 -6, i32 24, i32 -18)
store double %8, double* %2
%9 = load double, double* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = call double @wig6jj(i32 20, i32 30, i32 20, i32 14, i32 14, i32 18)
store double %11, double* %3
%12 = load double, double* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = call double @wig9jj(i32 1, i32 2, i32 3, i32 4, i32 6, i32 8, i32 3, i32 6, i32 9)
store double %14, double* %4
%15 = load double, double* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %15)
%17 = call i32 (...) @wig_temp_free()
%18 = call i32 (...) @wig_table_free()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [43 x i8] c"3J(10 15 10; -3 12 -9): %.15f\0A\00"
@.str.2 = [43 x i8] c"6J{10 15 10; 7 7 9}: %.15f\0A\00"
@.str.3 = [43 x i8] c"9J{0.5 1 1.5; 2 3 4; 1.5 3 4.5}: %.15f\0A\00"
@str = [23 x i8] c"WIGXJPF C test program\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @wig_table_init(i32 200, i32 9)
%3 = tail call i32 @wig_temp_init(i32 200)
%4 = tail call double @wig3jj(i32 20, i32 30, i32 20, i32 -6, i32 24, i32 -18)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = tail call double @wig6jj(i32 20, i32 30, i32 20, i32 14, i32 14, i32 18)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), double %6)
%8 = tail call double @wig9jj(i32 1, i32 2, i32 3, i32 4, i32 6, i32 8, i32 3, i32 6, i32 9)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %8)
%10 = tail call i32 (...) @wig_temp_free()
%11 = tail call i32 (...) @wig_table_free()
ret i32 0
}