#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 */
struct wigxjpf_temp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ calcsum_9j(struct wigxjpf_temp *, int, int, int, int, int,
                              int, int, int, int);
int /*<<< orphan*/ eval_calcsum_info_double(double *, struct wigxjpf_temp *);
scalar_t__ trivial_zero_9j(int, int, int, int, int, int, int, int, int);
void calc_9j_double(double *result, int two_j1, int two_j2, int two_j3,
                    int two_j4, int two_j5, int two_j6, int two_j7, int two_j8,
                    int two_j9, struct wigxjpf_temp *temp) {
  if (trivial_zero_9j(two_j1, two_j2, two_j3, two_j4, two_j5, two_j6, two_j7,
                      two_j8, two_j9)) {
    *result = 0;
    return;
  }
  calcsum_9j(temp, two_j1, two_j2, two_j3, two_j4, two_j5, two_j6, two_j7,
             two_j8, two_j9);
  eval_calcsum_info_double(result, temp);
}


x86 assembly (clang, -O0):
<calc_9j_double>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    0x10(%rbp),%r9d
mov    0x18(%rbp),%r11d
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <trivial_zero_9j@plt>
cmp    $0x0,%rax
je     11a9 <calc_9j_double+0x79>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    11ef <calc_9j_double+0xbf>
mov    0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%ebx
mov    0x18(%rbp),%r11d
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <calcsum_9j@plt>
mov    -0x10(%rbp),%rdi
mov    0x30(%rbp),%rsi
call   1050 <eval_calcsum_info_double@plt>
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_9j_double>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,%ebx
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,0x18(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x78(%rsp),%r12d
mov    0x70(%rsp),%r13d
mov    0x68(%rsp),%eax
mov    0x60(%rsp),%r9d
sub    $0x8,%rsp
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,0x10(%rsp)
mov    %r8d,%ecx
mov    %ebx,0x14(%rsp)
mov    %ebx,%r8d
mov    %rax,%rbx
mov    %r9,0x28(%rsp)
push   %r12
push   %r13
push   %rax
call   1040 <trivial_zero_9j@plt>
add    $0x20,%rsp
test   %rax,%rax
je     11bd <calc_9j_double+0x8d>
mov    0x18(%rsp),%rax
movq   $0x0,(%rax)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rsp),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%r9d
push   %r12
push   %r13
push   %rbx
push   0x38(%rsp)
call   1030 <calcsum_9j@plt>
add    $0x20,%rsp
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rsi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <eval_calcsum_info_double@plt>

LLVM IR (-O0):
%struct.wigxjpf_temp = type { i32 }
define void @calc_9j_double(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, %struct.wigxjpf_temp* %10) {
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca %struct.wigxjpf_temp*
store double* %0, double** %12
store i32 %1, i32* %13
store i32 %2, i32* %14
store i32 %3, i32* %15
store i32 %4, i32* %16
store i32 %5, i32* %17
store i32 %6, i32* %18
store i32 %7, i32* %19
store i32 %8, i32* %20
store i32 %9, i32* %21
store %struct.wigxjpf_temp* %10, %struct.wigxjpf_temp** %22
%23 = load i32, i32* %13
%24 = load i32, i32* %14
%25 = load i32, i32* %15
%26 = load i32, i32* %16
%27 = load i32, i32* %17
%28 = load i32, i32* %18
%29 = load i32, i32* %19
%30 = load i32, i32* %20
%31 = load i32, i32* %21
%32 = call i64 @trivial_zero_9j(i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %11
%35 = load double*, double** %12
store double 0.000000e+00, double* %35
br label %51
36: ; preds = %11
%37 = load %struct.wigxjpf_temp*, %struct.wigxjpf_temp** %22
%38 = load i32, i32* %13
%39 = load i32, i32* %14
%40 = load i32, i32* %15
%41 = load i32, i32* %16
%42 = load i32, i32* %17
%43 = load i32, i32* %18
%44 = load i32, i32* %19
%45 = load i32, i32* %20
%46 = load i32, i32* %21
%47 = call i32 @calcsum_9j(%struct.wigxjpf_temp* %37, i32 %38, i32 %39, i32 %40, i32 %41, i32 %42, i32 %43, i32 %44, i32 %45, i32 %46)
%48 = load double*, double** %12
%49 = load %struct.wigxjpf_temp*, %struct.wigxjpf_temp** %22
%50 = call i32 @eval_calcsum_info_double(double* %48, %struct.wigxjpf_temp* %49)
br label %51
51: ; preds = %36, %34
ret void
}

LLVM IR (-O2):
%struct.wigxjpf_temp = type { i32 }
define void @calc_9j_double(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, %struct.wigxjpf_temp* %10) {
%12 = tail call i64 @trivial_zero_9j(i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9)
%13 = icmp eq i64 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %11
store double 0.000000e+00, double* %0
br label %18
15: ; preds = %11
%16 = tail call i32 @calcsum_9j(%struct.wigxjpf_temp* %10, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9)
%17 = tail call i32 @eval_calcsum_info_double(double* %0, %struct.wigxjpf_temp* %10)
br label %18
18: ; preds = %15, %14
ret void
}