#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*/ conv(double *, int, double *, int, double *, int);
int /*<<< orphan*/ dyadup_1D_feed_odd(double *, int, double *, int);
int /*<<< orphan*/ free(double *);
double *malloc(int);
int /*<<< orphan*/ wkeep_1D_index(double *, int, double *, int, int);
void idwt_complete(double *approx, double *detail, int sigInLength,
                   double *lowRe, double *hiRe, int filterLen, double *sigOut,
                   int sigOutLength) {
  int sigInLengthTemp, sigOutLengthTemp, count, ind;
  double *approxTemp, *detailTemp, *approxPre, *detailPre;
  double *sigOutPre;
  sigInLengthTemp = 2 * sigInLength - 1;
  approxTemp = malloc(sigInLengthTemp * sizeof(double));
  detailTemp = malloc(sigInLengthTemp * sizeof(double));
  dyadup_1D_feed_odd(approx, sigInLength, approxTemp, sigInLengthTemp);
  dyadup_1D_feed_odd(detail, sigInLength, detailTemp, sigInLengthTemp);
  sigOutLengthTemp = sigInLengthTemp + filterLen - 1;
  approxPre = malloc(sigOutLengthTemp * sizeof(double));
  detailPre = malloc(sigOutLengthTemp * sizeof(double));
  conv(approxTemp, sigInLengthTemp, approxPre, sigOutLengthTemp, lowRe,
       filterLen);
  conv(detailTemp, sigInLengthTemp, detailPre, sigOutLengthTemp, hiRe,
       filterLen);
  free(approxTemp);
  free(detailTemp);
  sigOutPre = malloc(sigOutLengthTemp * sizeof(double));
  for (count = 0; count < sigOutLengthTemp; count++)
    sigOutPre[count] = approxPre[count] + detailPre[count];
  free(approxPre);
  free(detailPre);
  ind = (int)(2 + (sigOutLengthTemp - sigOutLength) / 2.0);
  wkeep_1D_index(sigOutPre, sigOutLengthTemp, sigOut, sigOutLength, ind);
  free(sigOutPre);
  return;
}


x86 assembly (clang, -O0):
<idwt_complete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x30(%rbp)
movslq -0x30(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x30(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x30(%rbp),%ecx
call   1060 <dyadup_1D_feed_odd@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x50(%rbp),%rdx
mov    -0x30(%rbp),%ecx
call   1060 <dyadup_1D_feed_odd@plt>
mov    -0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    -0x34(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1050 <conv@plt>
mov    -0x50(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x34(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1050 <conv@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    12a3 <idwt_complete+0x153>
mov    -0x58(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1262 <idwt_complete+0x112>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x34(%rbp),%eax
sub    0x18(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xd39(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xd2d(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
call   1040 <wkeep_1D_index@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idwt_complete>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x18(%rsp)
mov    %r8,0x28(%rsp)
mov    %rcx,0x20(%rsp)
mov    %edx,%r15d
mov    %rsi,(%rsp)
mov    %rdi,%r13
mov    0x78(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x70(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    (%r15,%r15,1),%eax
lea    (%r15,%r15,1),%ebp
add    $0xffffffff,%ebp
lea    -0x8(,%rax,8),%ebx
mov    %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %rax,0x10(%rsp)
mov    %r13,%rdi
mov    %r15d,%esi
mov    %r12,%rdx
mov    %ebp,%ecx
call   1060 <dyadup_1D_feed_odd@plt>
mov    (%rsp),%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    %ebp,%ebx
mov    %ebp,0x8(%rsp)
call   1060 <dyadup_1D_feed_odd@plt>
mov    0x18(%rsp),%rcx
lea    (%rcx,%r15,2),%eax
lea    (%rcx,%r15,2),%r14d
add    $0xfffffffe,%r14d
mov    %rcx,%r15
lea    -0x10(,%rax,8),%ebp
mov    %ebp,(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %r14d,%ecx
mov    0x20(%rsp),%r8
mov    %r15d,%r9d
call   1050 <conv@plt>
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%esi
mov    %rbp,%rdx
mov    %r14d,%ecx
mov    0x28(%rsp),%r8
mov    %r15d,%r9d
call   1050 <conv@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    (%rsp),%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
test   %r14d,%r14d
jle    135b <idwt_complete+0x20b>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    1278 <idwt_complete+0x128>
xor    %ecx,%ecx
jmp    1340 <idwt_complete+0x1f0>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     13b6 <idwt_complete+0x266>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
xchg   %ax,%ax
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd 0x0(%rbp,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm0,0x10(%rbx,%rdx,8)
movupd 0x20(%r13,%rdx,8),%xmm0
movupd 0x30(%r13,%rdx,8),%xmm1
movupd 0x20(%rbp,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x30(%rbp,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x20(%rbx,%rdx,8)
movupd %xmm0,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    12a0 <idwt_complete+0x150>
test   $0x1,%sil
je     1338 <idwt_complete+0x1e8>
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd 0x0(%rbp,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm0,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
je     135b <idwt_complete+0x20b>
nopl   (%rax)
movsd  0x0(%r13,%rcx,8),%xmm0
addsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1340 <idwt_complete+0x1f0>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14d,%eax
mov    0xc(%rsp),%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc7d(%rip),%xmm0
addsd  0xc7d(%rip),%xmm0
cvttsd2si %xmm0,%r8d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    0x30(%rsp),%rdx
call   1040 <wkeep_1D_index@plt>
mov    %rbx,%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %edx,%edx
test   $0x1,%sil
jne    130b <idwt_complete+0x1bb>
jmp    1338 <idwt_complete+0x1e8>

LLVM IR (-O0):
define void @idwt_complete(double* %0, double* %1, i32 %2, double* %3, double* %4, i32 %5, double* %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca double*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
store double* %0, double** %9
store double* %1, double** %10
store i32 %2, i32* %11
store double* %3, double** %12
store double* %4, double** %13
store i32 %5, i32* %14
store double* %6, double** %15
store i32 %7, i32* %16
%26 = load i32, i32* %11
%27 = mul nsw i32 2, %26
%28 = sub nsw i32 %27, 1
store i32 %28, i32* %17
%29 = load i32, i32* %17
%30 = sext i32 %29 to i64
%31 = mul i64 %30, 8
%32 = trunc i64 %31 to i32
%33 = call double* @malloc(i32 %32)
store double* %33, double** %21
%34 = load i32, i32* %17
%35 = sext i32 %34 to i64
%36 = mul i64 %35, 8
%37 = trunc i64 %36 to i32
%38 = call double* @malloc(i32 %37)
store double* %38, double** %22
%39 = load double*, double** %9
%40 = load i32, i32* %11
%41 = load double*, double** %21
%42 = load i32, i32* %17
%43 = call i32 @dyadup_1D_feed_odd(double* %39, i32 %40, double* %41, i32 %42)
%44 = load double*, double** %10
%45 = load i32, i32* %11
%46 = load double*, double** %22
%47 = load i32, i32* %17
%48 = call i32 @dyadup_1D_feed_odd(double* %44, i32 %45, double* %46, i32 %47)
%49 = load i32, i32* %17
%50 = load i32, i32* %14
%51 = add nsw i32 %49, %50
%52 = sub nsw i32 %51, 1
store i32 %52, i32* %18
%53 = load i32, i32* %18
%54 = sext i32 %53 to i64
%55 = mul i64 %54, 8
%56 = trunc i64 %55 to i32
%57 = call double* @malloc(i32 %56)
store double* %57, double** %23
%58 = load i32, i32* %18
%59 = sext i32 %58 to i64
%60 = mul i64 %59, 8
%61 = trunc i64 %60 to i32
%62 = call double* @malloc(i32 %61)
store double* %62, double** %24
%63 = load double*, double** %21
%64 = load i32, i32* %17
%65 = load double*, double** %23
%66 = load i32, i32* %18
%67 = load double*, double** %12
%68 = load i32, i32* %14
%69 = call i32 @conv(double* %63, i32 %64, double* %65, i32 %66, double* %67, i32 %68)
%70 = load double*, double** %22
%71 = load i32, i32* %17
%72 = load double*, double** %24
%73 = load i32, i32* %18
%74 = load double*, double** %13
%75 = load i32, i32* %14
%76 = call i32 @conv(double* %70, i32 %71, double* %72, i32 %73, double* %74, i32 %75)
%77 = load double*, double** %21
%78 = call i32 @free(double* %77)
%79 = load double*, double** %22
%80 = call i32 @free(double* %79)
%81 = load i32, i32* %18
%82 = sext i32 %81 to i64
%83 = mul i64 %82, 8
%84 = trunc i64 %83 to i32
%85 = call double* @malloc(i32 %84)
store double* %85, double** %25
store i32 0, i32* %19
br label %86
86: ; preds = %106, %8
%87 = load i32, i32* %19
%88 = load i32, i32* %18
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %109
90: ; preds = %86
%91 = load double*, double** %23
%92 = load i32, i32* %19
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
%96 = load double*, double** %24
%97 = load i32, i32* %19
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = fadd double %95, %100
%102 = load double*, double** %25
%103 = load i32, i32* %19
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %102, i64 %104
store double %101, double* %105
br label %106
106: ; preds = %90
%107 = load i32, i32* %19
%108 = add nsw i32 %107, 1
store i32 %108, i32* %19
br label %86
109: ; preds = %86
%110 = load double*, double** %23
%111 = call i32 @free(double* %110)
%112 = load double*, double** %24
%113 = call i32 @free(double* %112)
%114 = load i32, i32* %18
%115 = load i32, i32* %16
%116 = sub nsw i32 %114, %115
%117 = sitofp i32 %116 to double
%118 = fdiv double %117, 2.000000e+00
%119 = fadd double 2.000000e+00, %118
%120 = fptosi double %119 to i32
store i32 %120, i32* %20
%121 = load double*, double** %25
%122 = load i32, i32* %18
%123 = load double*, double** %15
%124 = load i32, i32* %16
%125 = load i32, i32* %20
%126 = call i32 @wkeep_1D_index(double* %121, i32 %122, double* %123, i32 %124, i32 %125)
%127 = load double*, double** %25
%128 = call i32 @free(double* %127)
ret void
}

LLVM IR (-O2):
define void @idwt_complete(double* %0, double* %1, i32 %2, double* %3, double* %4, i32 %5, double* %6, i32 %7) {
%9 = shl nsw i32 %2, 1
%10 = add nsw i32 %9, -1
%11 = shl i32 %10, 3
%12 = tail call double* @malloc(i32 %11)
%13 = tail call double* @malloc(i32 %11)
%14 = tail call i32 @dyadup_1D_feed_odd(double* %0, i32 %2, double* %12, i32 %10)
%15 = tail call i32 @dyadup_1D_feed_odd(double* %1, i32 %2, double* %13, i32 %10)
%16 = add i32 %9, -2
%17 = add i32 %16, %5
%18 = shl i32 %17, 3
%19 = tail call double* @malloc(i32 %18)
%20 = tail call double* @malloc(i32 %18)
%21 = tail call i32 @conv(double* %12, i32 %10, double* %19, i32 %17, double* %3, i32 %5)
%22 = tail call i32 @conv(double* %13, i32 %10, double* %20, i32 %17, double* %4, i32 %5)
%23 = tail call i32 @free(double* %12)
%24 = tail call i32 @free(double* %13)
%25 = tail call double* @malloc(i32 %18)
%26 = icmp sgt i32 %17, 0
br i1 %26, label %27, label %118
27: ; preds = %8
%28 = zext i32 %17 to i64
%29 = icmp ult i32 %17, 4
br i1 %29, label %106, label %30
30: ; preds = %27
%31 = and i64 %28, 4294967292
%32 = add nsw i64 %31, -4
%33 = lshr exact i64 %32, 2
%34 = add nuw nsw i64 %33, 1
%35 = and i64 %34, 1
%36 = icmp eq i64 %32, 0
br i1 %36, label %82, label %37
37: ; preds = %30
%38 = and i64 %34, 9223372036854775806
br label %39
39: ; preds = %39, %37
%40 = phi i64 [ 0, %37 ], [ %79, %39 ]
%41 = phi i64 [ 0, %37 ], [ %80, %39 ]
%42 = getelementptr inbounds double, double* %19, i64 %40
%43 = bitcast double* %42 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = getelementptr inbounds double, double* %42, i64 2
%46 = bitcast double* %45 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = getelementptr inbounds double, double* %20, i64 %40
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = getelementptr inbounds double, double* %48, i64 2
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = fadd <2 x double> %44, %50
%55 = fadd <2 x double> %47, %53
%56 = getelementptr inbounds double, double* %25, i64 %40
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> %54, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %55, <2 x double>* %59
%60 = or i64 %40, 4
%61 = getelementptr inbounds double, double* %19, i64 %60
%62 = bitcast double* %61 to <2 x double>*
%63 = load <2 x double>, <2 x double>* %62
%64 = getelementptr inbounds double, double* %61, i64 2
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = getelementptr inbounds double, double* %20, i64 %60
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds double, double* %67, i64 2
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = fadd <2 x double> %63, %69
%74 = fadd <2 x double> %66, %72
%75 = getelementptr inbounds double, double* %25, i64 %60
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %73, <2 x double>* %76
%77 = getelementptr inbounds double, double* %75, i64 2
%78 = bitcast double* %77 to <2 x double>*
store <2 x double> %74, <2 x double>* %78
%79 = add nuw i64 %40, 8
%80 = add i64 %41, 2
%81 = icmp eq i64 %80, %38
br i1 %81, label %82, label %39
82: ; preds = %39, %30
%83 = phi i64 [ 0, %30 ], [ %79, %39 ]
%84 = icmp eq i64 %35, 0
br i1 %84, label %104, label %85
85: ; preds = %82
%86 = getelementptr inbounds double, double* %19, i64 %83
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %86, i64 2
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %20, i64 %83
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds double, double* %92, i64 2
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fadd <2 x double> %88, %94
%99 = fadd <2 x double> %91, %97
%100 = getelementptr inbounds double, double* %25, i64 %83
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %98, <2 x double>* %101
%102 = getelementptr inbounds double, double* %100, i64 2
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %99, <2 x double>* %103
br label %104
104: ; preds = %82, %85
%105 = icmp eq i64 %31, %28
br i1 %105, label %118, label %106
106: ; preds = %27, %104
%107 = phi i64 [ 0, %27 ], [ %31, %104 ]
br label %108
108: ; preds = %106, %108
%109 = phi i64 [ %116, %108 ], [ %107, %106 ]
%110 = getelementptr inbounds double, double* %19, i64 %109
%111 = load double, double* %110
%112 = getelementptr inbounds double, double* %20, i64 %109
%113 = load double, double* %112
%114 = fadd double %111, %113
%115 = getelementptr inbounds double, double* %25, i64 %109
store double %114, double* %115
%116 = add nuw nsw i64 %109, 1
%117 = icmp eq i64 %116, %28
br i1 %117, label %118, label %108
118: ; preds = %108, %104, %8
%119 = tail call i32 @free(double* %19)
%120 = tail call i32 @free(double* %20)
%121 = sub nsw i32 %17, %7
%122 = sitofp i32 %121 to double
%123 = fmul double %122, 5.000000e-01
%124 = fadd double %123, 2.000000e+00
%125 = fptosi double %124 to i32
%126 = tail call i32 @wkeep_1D_index(double* %25, i32 %17, double* %6, i32 %7, i32 %125)
%127 = tail call i32 @free(double* %25)
ret void
}