#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*/ clear(int, double *);
double fir_basic(double, int, double *, double *);
double fir_circular(double, int, double *, double *, int *);
double fir_double_h(double, int, double *, double *, int *);
double fir_double_z(double, int, double *, double *, int *);
double fir_shuffle(double, int, double *, double *);
double fir_split(double, int, double *, double *, int *);
int /*<<< orphan*/ wind_printf(char *, ...);
int fir_test(void) {
  static double h[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
  static double h2[2 * 6];
  static double z[2 * 6];
  static double imp[(3 * 6)];
  double output;
  int ii, state;
  clear((3 * 6), imp);
  imp[5] = 1.0;
  for (ii = 0; ii < 6; ii++) {
    h2[ii] = h2[ii + 6] = h[ii];
  }
  wind_printf("Testing fir_basic:\n ");
  clear(6, z);
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_basic(imp[ii], 6, h, z);
    wind_printf("%f ", (double)output);
  }
  wind_printf("\n\n");
  wind_printf("Testing fir_shuffle:\n ");
  clear(6, z);
  state = 0;
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_shuffle(imp[ii], 6, h, z);
    wind_printf("%f ", (double)output);
  }
  wind_printf("\n\n");
  wind_printf("Testing fir_circular:\n ");
  clear(6, z);
  state = 0;
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_circular(imp[ii], 6, h, z, &state);
    wind_printf("%f ", (double)output);
  }
  wind_printf("\n\n");
  wind_printf("Testing fir_split:\n ");
  clear(6, z);
  state = 0;
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_split(imp[ii], 6, h, z, &state);
    wind_printf("%f ", (double)output);
  }
  wind_printf("\n\n");
  wind_printf("Testing fir_double_z:\n ");
  clear(2 * 6, z);
  state = 0;
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_double_z(imp[ii], 6, h, z, &state);
    wind_printf("%f ", (double)output);
  }
  wind_printf("\n\n");
  wind_printf("Testing fir_double_h:\n ");
  clear(6, z);
  state = 0;
  for (ii = 0; ii < (3 * 6); ii++) {
    output = fir_double_h(imp[ii], 6, h2, z, &state);
    wind_printf("%f ", (double)output);
  }
  return 0;
}


x86 assembly (clang, -O0):
<fir_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x12,%edi
lea    0x2fdc(%rip),%rsi
call   10a0 <clear@plt>
movsd  0xe5f(%rip),%xmm0
movsd  %xmm0,0x2fef(%rip)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    11fd <fir_test+0x7d>
movslq -0xc(%rbp),%rcx
lea    0x2eab(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0xc(%rbp),%eax
add    $0x6,%eax
movslq %eax,%rcx
lea    0x2ed6(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
movslq -0xc(%rbp),%rcx
lea    0x2ec6(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b0 <fir_test+0x30>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0x6,%edi
lea    0x2ef9(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    127b <fir_test+0xfb>
movslq -0xc(%rbp),%rcx
lea    0x2f38(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2e27(%rip),%rsi
lea    0x2ec0(%rip),%rdx
call   1090 <fir_basic@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xdb7(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1223 <fir_test+0xa3>
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0x6,%edi
lea    0x2e6d(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    130e <fir_test+0x18e>
movslq -0xc(%rbp),%rcx
lea    0x2ea5(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2d94(%rip),%rsi
lea    0x2e2d(%rip),%rdx
call   1040 <fir_shuffle@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xd24(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b6 <fir_test+0x136>
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0x6,%edi
lea    0x2dda(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    13a5 <fir_test+0x225>
movslq -0xc(%rbp),%rcx
lea    0x2e12(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2d01(%rip),%rsi
lea    0x2d9a(%rip),%rdx
lea    -0x10(%rbp),%rcx
call   1070 <fir_circular@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xc8d(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1349 <fir_test+0x1c9>
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
lea    0xc99(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0x6,%edi
lea    0x2d43(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    143c <fir_test+0x2bc>
movslq -0xc(%rbp),%rcx
lea    0x2d7b(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2c6a(%rip),%rsi
lea    0x2d03(%rip),%rdx
lea    -0x10(%rbp),%rcx
call   1080 <fir_split@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xbf6(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13e0 <fir_test+0x260>
lea    0xbde(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0xc,%edi
lea    0x2cac(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    14d3 <fir_test+0x353>
movslq -0xc(%rbp),%rcx
lea    0x2ce4(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2bd3(%rip),%rsi
lea    0x2c6c(%rip),%rdx
lea    -0x10(%rbp),%rcx
call   1060 <fir_double_z@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xb5f(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1477 <fir_test+0x2f7>
lea    0xb47(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
lea    0xb98(%rip),%rdi
mov    $0x0,%al
call   1030 <wind_printf@plt>
mov    $0x6,%edi
lea    0x2c15(%rip),%rsi
call   10a0 <clear@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12,-0xc(%rbp)
jge    156a <fir_test+0x3ea>
movslq -0xc(%rbp),%rcx
lea    0x2c4d(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    $0x6,%edi
lea    0x2b7c(%rip),%rsi
lea    0x2bd5(%rip),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <fir_double_h@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xac8(%rip),%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    150e <fir_test+0x38e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fir_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0x2fde(%rip),%r15
mov    $0x12,%edi
mov    %r15,%rsi
call   10a0 <clear@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,0x2fe8(%rip)
movaps 0x2eb9(%rip),%xmm0
movaps %xmm0,0x2ef2(%rip)
movaps 0x2ebb(%rip),%xmm0
movaps %xmm0,0x2ef4(%rip)
movaps 0x2ebd(%rip),%xmm0
movaps %xmm0,0x2ef6(%rip)
movaps 0x2e8f(%rip),%xmm0
movaps %xmm0,0x2ef8(%rip)
movaps 0x2e91(%rip),%xmm0
movaps %xmm0,0x2efa(%rip)
movaps 0x2e93(%rip),%xmm0
movaps %xmm0,0x2efc(%rip)
lea    0xdf5(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2ef5(%rip),%r14
mov    $0x6,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
lea    0x2e41(%rip),%r12
lea    0xddf(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
call   1090 <fir_basic@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    1240 <fir_test+0xc0>
lea    0xda4(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0xd97(%rip),%rdi
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2e7d(%rip),%r14
mov    $0x6,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
lea    0x2dc9(%rip),%r12
lea    0xd67(%rip),%rbx
xchg   %ax,%ax
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
call   1040 <fir_shuffle@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    12b0 <fir_test+0x130>
lea    0xd34(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0xd3e(%rip),%rdi
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2e0d(%rip),%r14
mov    $0x6,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
movl   $0x0,0x4(%rsp)
lea    0x2d51(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xcea(%rip),%rbx
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <fir_circular@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    1330 <fir_test+0x1b0>
lea    0xcb1(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0xcd3(%rip),%rdi
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2d8a(%rip),%r14
mov    $0x6,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
movl   $0x0,0x4(%rsp)
lea    0x2cce(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xc67(%rip),%rbx
xchg   %ax,%ax
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1080 <fir_split@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    13b0 <fir_test+0x230>
lea    0xc31(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0xc68(%rip),%rdi
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2d0a(%rip),%r14
mov    $0xc,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
movl   $0x0,0x4(%rsp)
lea    0x2c4e(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xbe7(%rip),%rbx
xchg   %ax,%ax
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1060 <fir_double_z@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    1430 <fir_test+0x2b0>
lea    0xbb1(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0xc00(%rip),%rdi
xor    %eax,%eax
call   1030 <wind_printf@plt>
lea    0x2c8a(%rip),%r14
mov    $0x6,%edi
mov    %r14,%rsi
call   10a0 <clear@plt>
movl   $0x0,0x4(%rsp)
lea    0x2c0e(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xb67(%rip),%rbx
xchg   %ax,%ax
movsd  0x0(%rbp,%r15,1),%xmm0
mov    $0x6,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1050 <fir_double_h@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <wind_printf@plt>
add    $0x8,%rbp
cmp    $0x90,%rbp
jne    14b0 <fir_test+0x330>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@fir_test.h = internal global [6 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00]
@fir_test.h2 = internal global [12 x double] zeroinitializer
@fir_test.z = internal global [12 x double] zeroinitializer
@fir_test.imp = internal global [18 x double] zeroinitializer
@.str = [21 x i8] c"Testing fir_basic:\0A \00"
@.str.1 = [4 x i8] c"%f \00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@.str.3 = [23 x i8] c"Testing fir_shuffle:\0A \00"
@.str.4 = [24 x i8] c"Testing fir_circular:\0A \00"
@.str.5 = [21 x i8] c"Testing fir_split:\0A \00"
@.str.6 = [24 x i8] c"Testing fir_double_z:\0A \00"
@.str.7 = [24 x i8] c"Testing fir_double_h:\0A \00"
define i32 @fir_test() {
%1 = alloca double
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @clear(i32 18, double* getelementptr inbounds ([18 x double], [18 x double]* @fir_test.imp, i64 0, i64 0))
store double 1.000000e+00, double* getelementptr inbounds ([18 x double], [18 x double]* @fir_test.imp, i64 0, i64 5)
store i32 0, i32* %2
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [6 x double], [6 x double]* @fir_test.h, i64 0, i64 %10
%12 = load double, double* %11
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [12 x double], [12 x double]* @fir_test.h2, i64 0, i64 %15
store double %12, double* %16
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [12 x double], [12 x double]* @fir_test.h2, i64 0, i64 %18
store double %12, double* %19
br label %20
20: ; preds = %8
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
%24 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %2
br label %26
26: ; preds = %37, %23
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 18
br i1 %28, label %29, label %40
29: ; preds = %26
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %31
%33 = load double, double* %32
%34 = call double @fir_basic(double %33, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store double %34, double* %1
%35 = load double, double* %1
%36 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %35)
br label %37
37: ; preds = %29
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %26
40: ; preds = %26
%41 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %44
44: ; preds = %55, %40
%45 = load i32, i32* %2
%46 = icmp slt i32 %45, 18
br i1 %46, label %47, label %58
47: ; preds = %44
%48 = load i32, i32* %2
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %49
%51 = load double, double* %50
%52 = call double @fir_shuffle(double %51, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store double %52, double* %1
%53 = load double, double* %1
%54 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %53)
br label %55
55: ; preds = %47
%56 = load i32, i32* %2
%57 = add nsw i32 %56, 1
store i32 %57, i32* %2
br label %44
58: ; preds = %44
%59 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%60 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %62
62: ; preds = %73, %58
%63 = load i32, i32* %2
%64 = icmp slt i32 %63, 18
br i1 %64, label %65, label %76
65: ; preds = %62
%66 = load i32, i32* %2
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %67
%69 = load double, double* %68
%70 = call double @fir_circular(double %69, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %3)
store double %70, double* %1
%71 = load double, double* %1
%72 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %71)
br label %73
73: ; preds = %65
%74 = load i32, i32* %2
%75 = add nsw i32 %74, 1
store i32 %75, i32* %2
br label %62
76: ; preds = %62
%77 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%78 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%79 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %80
80: ; preds = %91, %76
%81 = load i32, i32* %2
%82 = icmp slt i32 %81, 18
br i1 %82, label %83, label %94
83: ; preds = %80
%84 = load i32, i32* %2
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %85
%87 = load double, double* %86
%88 = call double @fir_split(double %87, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %3)
store double %88, double* %1
%89 = load double, double* %1
%90 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %89)
br label %91
91: ; preds = %83
%92 = load i32, i32* %2
%93 = add nsw i32 %92, 1
store i32 %93, i32* %2
br label %80
94: ; preds = %80
%95 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%96 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%97 = call i32 @clear(i32 12, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %98
98: ; preds = %109, %94
%99 = load i32, i32* %2
%100 = icmp slt i32 %99, 18
br i1 %100, label %101, label %112
101: ; preds = %98
%102 = load i32, i32* %2
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %103
%105 = load double, double* %104
%106 = call double @fir_double_z(double %105, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %3)
store double %106, double* %1
%107 = load double, double* %1
%108 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %107)
br label %109
109: ; preds = %101
%110 = load i32, i32* %2
%111 = add nsw i32 %110, 1
store i32 %111, i32* %2
br label %98
112: ; preds = %98
%113 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%114 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%115 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %116
116: ; preds = %127, %112
%117 = load i32, i32* %2
%118 = icmp slt i32 %117, 18
br i1 %118, label %119, label %130
119: ; preds = %116
%120 = load i32, i32* %2
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %121
%123 = load double, double* %122
%124 = call double @fir_double_h(double %123, i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.h2, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %3)
store double %124, double* %1
%125 = load double, double* %1
%126 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %125)
br label %127
127: ; preds = %119
%128 = load i32, i32* %2
%129 = add nsw i32 %128, 1
store i32 %129, i32* %2
br label %116
130: ; preds = %116
ret i32 0
}

LLVM IR (-O2):
@fir_test.h = internal global [6 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00]
@fir_test.h2 = internal global [12 x double] zeroinitializer
@fir_test.z = internal global [12 x double] zeroinitializer
@fir_test.imp = internal global [18 x double] zeroinitializer
@.str = [21 x i8] c"Testing fir_basic:\0A \00"
@.str.1 = [4 x i8] c"%f \00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@.str.3 = [23 x i8] c"Testing fir_shuffle:\0A \00"
@.str.4 = [24 x i8] c"Testing fir_circular:\0A \00"
@.str.5 = [21 x i8] c"Testing fir_split:\0A \00"
@.str.6 = [24 x i8] c"Testing fir_double_z:\0A \00"
@.str.7 = [24 x i8] c"Testing fir_double_h:\0A \00"
define i32 @fir_test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @clear(i32 18, double* getelementptr inbounds ([18 x double], [18 x double]* @fir_test.imp, i64 0, i64 0))
store double 1.000000e+00, double* getelementptr inbounds ([18 x double], [18 x double]* @fir_test.imp, i64 0, i64 5)
%4 = load <2 x double>, <2 x double>* bitcast ([6 x double]* @fir_test.h to <2 x double>*)
store <2 x double> %4, <2 x double>* bitcast (double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.h2, i64 0, i64 6) to <2 x double>*)
%5 = load <2 x double>, <2 x double>* bitcast (double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 2) to <2 x double>*)
store <2 x double> %5, <2 x double>* bitcast (double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.h2, i64 0, i64 8) to <2 x double>*)
%6 = load <2 x double>, <2 x double>* bitcast (double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 4) to <2 x double>*)
store <2 x double> %6, <2 x double>* bitcast (double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.h2, i64 0, i64 10) to <2 x double>*)
%7 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
br label %9
9: ; preds = %0, %9
%10 = phi i64 [ 0, %0 ], [ %15, %9 ]
%11 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %10
%12 = load double, double* %11
%13 = tail call double @fir_basic(double %12, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %13)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, 18
br i1 %16, label %17, label %9
17: ; preds = %9
%18 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%20 = tail call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
br label %21
21: ; preds = %17, %21
%22 = phi i64 [ 0, %17 ], [ %27, %21 ]
%23 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %22
%24 = load double, double* %23
%25 = tail call double @fir_shuffle(double %24, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %25)
%27 = add nuw nsw i64 %22, 1
%28 = icmp eq i64 %27, 18
br i1 %28, label %29, label %21
29: ; preds = %21
%30 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%32 = tail call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %1
br label %33
33: ; preds = %29, %33
%34 = phi i64 [ 0, %29 ], [ %39, %33 ]
%35 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %34
%36 = load double, double* %35
%37 = call double @fir_circular(double %36, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %1)
%38 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %37)
%39 = add nuw nsw i64 %34, 1
%40 = icmp eq i64 %39, 18
br i1 %40, label %41, label %33
41: ; preds = %33
%42 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%43 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%44 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %1
br label %45
45: ; preds = %41, %45
%46 = phi i64 [ 0, %41 ], [ %51, %45 ]
%47 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %46
%48 = load double, double* %47
%49 = call double @fir_split(double %48, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %1)
%50 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %49)
%51 = add nuw nsw i64 %46, 1
%52 = icmp eq i64 %51, 18
br i1 %52, label %53, label %45
53: ; preds = %45
%54 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%55 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%56 = call i32 @clear(i32 12, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %1
br label %57
57: ; preds = %53, %57
%58 = phi i64 [ 0, %53 ], [ %63, %57 ]
%59 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %58
%60 = load double, double* %59
%61 = call double @fir_double_z(double %60, i32 6, double* getelementptr inbounds ([6 x double], [6 x double]* @fir_test.h, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %1)
%62 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %61)
%63 = add nuw nsw i64 %58, 1
%64 = icmp eq i64 %63, 18
br i1 %64, label %65, label %57
65: ; preds = %57
%66 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%67 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%68 = call i32 @clear(i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0))
store i32 0, i32* %1
br label %69
69: ; preds = %65, %69
%70 = phi i64 [ 0, %65 ], [ %75, %69 ]
%71 = getelementptr inbounds [18 x double], [18 x double]* @fir_test.imp, i64 0, i64 %70
%72 = load double, double* %71
%73 = call double @fir_double_h(double %72, i32 6, double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.h2, i64 0, i64 0), double* getelementptr inbounds ([12 x double], [12 x double]* @fir_test.z, i64 0, i64 0), i32* %1)
%74 = call i32 (i8*, ...) @wind_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %73)
%75 = add nuw nsw i64 %70, 1
%76 = icmp eq i64 %75, 18
br i1 %76, label %77, label %69
77: ; preds = %69
ret i32 0
}