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


x86 assembly (clang, -O0):
<CalcAllTass17Elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x50(%rbp),%rdi
call   1040 <CalcLon@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1180 <CalcAllTass17Elem+0x60>
movsd  -0x8(%rbp),%xmm0
lea    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
imul   $0x6,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1030 <CalcTass17Elem@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1146 <CalcAllTass17Elem+0x26>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalcAllTass17Elem>:
push   %r14
push   %rbx
sub    $0x48,%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    $0x48,%rsp
pop    %rbx
pop    %r14
ret

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

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