#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*/ CalcLon(double const, double *);
int /*<<< orphan*/ CalcTass17Elem(double const, double *, int, double *);
void CalcAllTass17Elem(const double t, double elem[(8 * 6)], void *user) {
  int body;
  double lon[8];
  CalcLon(t, lon);
  for (body = 0; body <= 7; body++)
    CalcTass17Elem(t, lon, body, elem + (body * 6));
}


x86 assembly (clang, -O0):
<CalcAllTass17Elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
call   1040 <CalcLon@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x7,-0x1c(%rbp)
jg     1184 <CalcAllTass17Elem+0x64>
movsd  -0x8(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rdx
imul   $0x6,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1030 <CalcTass17Elem@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114a <CalcAllTass17Elem+0x2a>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalcAllTass17Elem>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1040 <CalcLon@plt>
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <CalcTass17Elem@plt>
lea    0x30(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <CalcTass17Elem@plt>
lea    0x60(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <CalcTass17Elem@plt>
lea    0x90(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <CalcTass17Elem@plt>
lea    0xc0(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <CalcTass17Elem@plt>
lea    0xf0(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <CalcTass17Elem@plt>
lea    0x120(%rbx),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x6,%esi
call   1030 <CalcTass17Elem@plt>
add    $0x150,%rbx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x7,%esi
mov    %rbx,%rdx
call   1030 <CalcTass17Elem@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @CalcAllTass17Elem(double %0, double* %1, i8* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [8 x double]
store double %0, double* %4
store double* %1, double** %5
store i8* %2, i8** %6
%9 = load double, double* %4
%10 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 0
%11 = call i32 @CalcLon(double %9, double* %10)
store i32 0, i32* %7
br label %12
12: ; preds = %25, %3
%13 = load i32, i32* %7
%14 = icmp sle i32 %13, 7
br i1 %14, label %15, label %28
15: ; preds = %12
%16 = load double, double* %4
%17 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 0
%18 = load i32, i32* %7
%19 = load double*, double** %5
%20 = load i32, i32* %7
%21 = mul nsw i32 %20, 6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %19, i64 %22
%24 = call i32 @CalcTass17Elem(double %16, double* %17, i32 %18, double* %23)
br label %25
25: ; preds = %15
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %12
28: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @CalcAllTass17Elem(double %0, double* %1, i8* nocapture readnone %2) {
%4 = alloca [8 x double]
%5 = bitcast [8 x double]* %4 to i8*
%6 = getelementptr inbounds [8 x double], [8 x double]* %4, i64 0, i64 0
%7 = call i32 @CalcLon(double %0, double* %6)
%8 = call i32 @CalcTass17Elem(double %0, double* %6, i32 0, double* %1)
%9 = getelementptr inbounds double, double* %1, i64 6
%10 = call i32 @CalcTass17Elem(double %0, double* %6, i32 1, double* %9)
%11 = getelementptr inbounds double, double* %1, i64 12
%12 = call i32 @CalcTass17Elem(double %0, double* %6, i32 2, double* %11)
%13 = getelementptr inbounds double, double* %1, i64 18
%14 = call i32 @CalcTass17Elem(double %0, double* %6, i32 3, double* %13)
%15 = getelementptr inbounds double, double* %1, i64 24
%16 = call i32 @CalcTass17Elem(double %0, double* %6, i32 4, double* %15)
%17 = getelementptr inbounds double, double* %1, i64 30
%18 = call i32 @CalcTass17Elem(double %0, double* %6, i32 5, double* %17)
%19 = getelementptr inbounds double, double* %1, i64 36
%20 = call i32 @CalcTass17Elem(double %0, double* %6, i32 6, double* %19)
%21 = getelementptr inbounds double, double* %1, i64 42
%22 = call i32 @CalcTass17Elem(double %0, double* %6, i32 7, double* %21)
ret void
}