#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*/ Goerz(double *, double *, double, int, double);
void WavThrGoerz(double *input, int size, double **output, double *outputp,
                 double fs, int N, double *ftarg, double ftargp, int rocks) {
  int i;
  int j;
  for (i = 0; i < (size - N); i++) {
    for (j = 0; j < rocks; j++) {
      Goerz(input + i, *(output + j) + i, fs, N, *(ftarg + j));
    }
    Goerz(input + i, outputp + i, fs, N, ftargp);
  }
  return;
}


x86 assembly (clang, -O0):
<WavThrGoerz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jge    11f3 <WavThrGoerz+0xe3>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    11b5 <WavThrGoerz+0xa5>
mov    -0x8(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movsd  -0x28(%rbp),%xmm0
mov    -0x2c(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <Goerz@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    115b <WavThrGoerz+0x4b>
mov    -0x8(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movsd  -0x28(%rbp),%xmm0
mov    -0x2c(%rbp),%edx
movsd  -0x40(%rbp),%xmm1
call   1030 <Goerz@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1143 <WavThrGoerz+0x33>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WavThrGoerz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm1,0x38(%rsp)
mov    %r9,0x30(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rcx,0x28(%rsp)
mov    %rdx,0x20(%rsp)
mov    %rdi,0x10(%rsp)
sub    %r8d,%esi
test   %esi,%esi
jle    1209 <WavThrGoerz+0xf9>
mov    %r8d,%ebp
mov    %esi,%eax
mov    %rax,0x18(%rsp)
xor    %ebx,%ebx
mov    0x30(%rsp),%r12
mov    0x20(%rsp),%r13
jmp    119a <WavThrGoerz+0x8a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%rax
lea    (%rax,%rbx,8),%rdi
mov    0x28(%rsp),%rax
lea    (%rax,%rbx,8),%rsi
mov    %ebp,%edx
movsd  0x38(%rsp),%xmm1
call   1030 <Goerz@plt>
add    $0x1,%rbx
cmp    0x18(%rsp),%rbx
je     1209 <WavThrGoerz+0xf9>
cmpl   $0x0,0x80(%rsp)
movsd  0x8(%rsp),%xmm0
mov    0x80(%rsp),%r14d
jle    1170 <WavThrGoerz+0x60>
mov    0x10(%rsp),%rax
lea    (%rax,%rbx,8),%rax
mov    %rax,0x40(%rsp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x0(,%rbx,8),%rsi
add    0x0(%r13,%r15,8),%rsi
movsd  (%r12,%r15,8),%xmm1
mov    0x40(%rsp),%rdi
movsd  0x8(%rsp),%xmm0
mov    %ebp,%edx
call   1030 <Goerz@plt>
movsd  0x8(%rsp),%xmm0
add    $0x1,%r15
cmp    %r15,%r14
jne    11d0 <WavThrGoerz+0xc0>
jmp    1170 <WavThrGoerz+0x60>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @WavThrGoerz(double* %0, i32 %1, double** %2, double* %3, double %4, i32 %5, double* %6, double %7, i32 %8) {
%10 = alloca double*
%11 = alloca i32
%12 = alloca double**
%13 = alloca double*
%14 = alloca double
%15 = alloca i32
%16 = alloca double*
%17 = alloca double
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store double* %0, double** %10
store i32 %1, i32* %11
store double** %2, double*** %12
store double* %3, double** %13
store double %4, double* %14
store i32 %5, i32* %15
store double* %6, double** %16
store double %7, double* %17
store i32 %8, i32* %18
store i32 0, i32* %19
br label %21
21: ; preds = %69, %9
%22 = load i32, i32* %19
%23 = load i32, i32* %11
%24 = load i32, i32* %15
%25 = sub nsw i32 %23, %24
%26 = icmp slt i32 %22, %25
br i1 %26, label %27, label %72
27: ; preds = %21
store i32 0, i32* %20
br label %28
28: ; preds = %53, %27
%29 = load i32, i32* %20
%30 = load i32, i32* %18
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %56
32: ; preds = %28
%33 = load double*, double** %10
%34 = load i32, i32* %19
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %33, i64 %35
%37 = load double**, double*** %12
%38 = load i32, i32* %20
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double*, double** %37, i64 %39
%41 = load double*, double** %40
%42 = load i32, i32* %19
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
%45 = load double, double* %14
%46 = load i32, i32* %15
%47 = load double*, double** %16
%48 = load i32, i32* %20
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = call i32 @Goerz(double* %36, double* %44, double %45, i32 %46, double %51)
br label %53
53: ; preds = %32
%54 = load i32, i32* %20
%55 = add nsw i32 %54, 1
store i32 %55, i32* %20
br label %28
56: ; preds = %28
%57 = load double*, double** %10
%58 = load i32, i32* %19
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
%61 = load double*, double** %13
%62 = load i32, i32* %19
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %14
%66 = load i32, i32* %15
%67 = load double, double* %17
%68 = call i32 @Goerz(double* %60, double* %64, double %65, i32 %66, double %67)
br label %69
69: ; preds = %56
%70 = load i32, i32* %19
%71 = add nsw i32 %70, 1
store i32 %71, i32* %19
br label %21
72: ; preds = %21
ret void
}

LLVM IR (-O2):
define void @WavThrGoerz(double* %0, i32 %1, double** nocapture %2, double* %3, double %4, i32 %5, double* nocapture %6, double %7, i32 %8) {
%10 = sub i32 %1, %5
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %36
12: ; preds = %9
%13 = icmp sgt i32 %8, 0
%14 = zext i32 %10 to i64
%15 = zext i32 %8 to i64
br label %16
16: ; preds = %12, %30
%17 = phi i64 [ 0, %12 ], [ %34, %30 ]
br i1 %13, label %18, label %30
18: ; preds = %16
%19 = getelementptr inbounds double, double* %0, i64 %17
br label %20
20: ; preds = %18, %20
%21 = phi i64 [ 0, %18 ], [ %28, %20 ]
%22 = getelementptr inbounds double*, double** %2, i64 %21
%23 = load double*, double** %22
%24 = getelementptr inbounds double, double* %23, i64 %17
%25 = getelementptr inbounds double, double* %6, i64 %21
%26 = load double, double* %25
%27 = tail call i32 @Goerz(double* %19, double* %24, double %4, i32 %5, double %26)
%28 = add nuw nsw i64 %21, 1
%29 = icmp eq i64 %28, %15
br i1 %29, label %30, label %20
30: ; preds = %20, %16
%31 = getelementptr inbounds double, double* %0, i64 %17
%32 = getelementptr inbounds double, double* %3, i64 %17
%33 = tail call i32 @Goerz(double* %31, double* %32, double %4, i32 %5, double %7)
%34 = add nuw nsw i64 %17, 1
%35 = icmp eq i64 %34, %14
br i1 %35, label %36, label %16
36: ; preds = %30, %9
ret void
}