#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 der;
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
double sqrt(int);
void r_emvnd(int *m, double *w, double *x, double *rh, int *k, int *ks,
             double *eps, double *deriv) {
  double r_gd(double), der;
  double romberg(double (*)(double), double, double, double);
  int i;
  extern int mm, kk, ksign;
  extern double *ww, *xx, rs, r1;
  mm = *m;
  kk = (*k - 1);
  rs = sqrt(*rh);
  r1 = sqrt(1. - (*rh));
  ksign = *ks;
  xx = (double *)malloc(mm * sizeof(double));
  ww = (double *)malloc(mm * sizeof(double));
  for (i = 0; i < mm; i++) {
    ww[i] = w[i];
    xx[i] = x[i];
  }
  der = romberg(r_gd, -6., 6., *eps);
  free(xx);
  free(ww);
  *deriv = ksign * der;
}


x86 assembly (clang, -O0):
<r_emvnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2e83(%rip),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    0x2e51(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%edi
call   1060 <sqrt@plt>
mov    0x2e0b(%rip),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe53(%rip),%xmm0
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sqrt@plt>
mov    0x2e2f(%rip),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
mov    0x2dfe(%rip),%rax
mov    %ecx,(%rax)
mov    0x2e1d(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    0x2dcd(%rip),%rax
mov    %rcx,(%rax)
mov    0x2dfb(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    0x2da3(%rip),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    0x2dcf(%rip),%rcx
cmp    (%rcx),%eax
jge    127f <r_emvnd+0x13f>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2d73(%rip),%rax
mov    (%rax),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2d5b(%rip),%rax
mov    (%rax),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    121f <r_emvnd+0xdf>
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x2d22(%rip),%rdi
movsd  0xd72(%rip),%xmm0
movsd  0xd72(%rip),%xmm1
call   1040 <romberg@plt>
movsd  %xmm0,-0x38(%rbp)
mov    0x2d11(%rip),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    0x2cfa(%rip),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    0x2d03(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_emvnd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r15
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x48(%rsp),%r13
mov    (%rdi),%eax
mov    0x2e93(%rip),%rbp
mov    %eax,0x0(%rbp)
mov    (%r8),%eax
add    $0xffffffff,%eax
mov    0x2e63(%rip),%rcx
mov    %eax,(%rcx)
cvttsd2si (%r12),%edi
call   1060 <sqrt@plt>
mov    0x2e1f(%rip),%rax
movsd  %xmm0,(%rax)
movsd  0xe6b(%rip),%xmm0
subsd  (%r12),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sqrt@plt>
mov    0x2e45(%rip),%rax
movsd  %xmm0,(%rax)
mov    (%r15),%eax
mov    0x2e17(%rip),%r15
mov    %eax,(%r15)
mov    0x0(%rbp),%edi
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    0x2df2(%rip),%r12
mov    %rax,(%r12)
mov    0x0(%rbp),%edi
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    0x2dd4(%rip),%rcx
mov    %rax,(%rcx)
mov    0x0(%rbp),%ecx
test   %ecx,%ecx
jle    13c3 <r_emvnd+0x283>
mov    (%r12),%rdx
cmp    $0x4,%ecx
jae    126c <r_emvnd+0x12c>
xor    %esi,%esi
mov    %rsi,%rdi
not    %rdi
test   $0x1,%cl
je     1221 <r_emvnd+0xe1>
movsd  (%rbx,%rsi,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
movsd  (%r14,%rsi,8),%xmm0
movsd  %xmm0,(%rdx,%rsi,8)
or     $0x1,%rsi
add    %rcx,%rdi
je     13c3 <r_emvnd+0x283>
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rsi,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
movsd  (%r14,%rsi,8),%xmm0
movsd  %xmm0,(%rdx,%rsi,8)
movsd  0x8(%rbx,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rax,%rsi,8)
movsd  0x8(%r14,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rdx,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rcx
jne    1230 <r_emvnd+0xf0>
jmp    13c3 <r_emvnd+0x283>
lea    (%rax,%rcx,8),%rsi
lea    (%rdx,%rcx,8),%rbp
lea    (%rbx,%rcx,8),%rdi
lea    (%r14,%rcx,8),%r10
cmp    %rbp,%rax
setb   (%rsp)
cmp    %rsi,%rdx
setb   %r13b
cmp    %rdi,%rax
setb   %r12b
cmp    %rbx,%rsi
seta   %r11b
cmp    %r10,%rax
setb   %r8b
cmp    %r14,%rsi
seta   %r15b
cmp    %rdi,%rdx
setb   %r9b
cmp    %rbx,%rbp
seta   %dil
cmp    %r10,%rdx
setb   %r10b
cmp    %r14,%rbp
seta   %bpl
xor    %esi,%esi
test   %r13b,(%rsp)
jne    1441 <r_emvnd+0x301>
and    %r11b,%r12b
mov    0x48(%rsp),%r13
jne    1446 <r_emvnd+0x306>
and    %r15b,%r8b
mov    0x2cda(%rip),%r12
jne    1435 <r_emvnd+0x2f5>
and    %dil,%r9b
mov    0x2cda(%rip),%r15
jne    11fd <r_emvnd+0xbd>
and    %bpl,%r10b
jne    11fd <r_emvnd+0xbd>
mov    %ecx,%esi
and    $0xfffffffc,%esi
lea    -0x4(%rsi),%rdi
mov    %rdi,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdi,%rdi
je     1427 <r_emvnd+0x2e7>
mov    %r8,%rbp
and    $0xfffffffffffffffe,%rbp
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movups (%rbx,%rdi,8),%xmm0
movups 0x10(%rbx,%rdi,8),%xmm1
movups %xmm0,(%rax,%rdi,8)
movups %xmm1,0x10(%rax,%rdi,8)
movups (%r14,%rdi,8),%xmm0
movups 0x10(%r14,%rdi,8),%xmm1
movups %xmm0,(%rdx,%rdi,8)
movups %xmm1,0x10(%rdx,%rdi,8)
movups 0x20(%rbx,%rdi,8),%xmm0
movups 0x30(%rbx,%rdi,8),%xmm1
movups %xmm0,0x20(%rax,%rdi,8)
movups %xmm1,0x30(%rax,%rdi,8)
movupd 0x20(%r14,%rdi,8),%xmm0
movups 0x30(%r14,%rdi,8),%xmm1
movupd %xmm0,0x20(%rdx,%rdi,8)
movups %xmm1,0x30(%rdx,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rbp
jne    1330 <r_emvnd+0x1f0>
test   $0x1,%r8b
je     13ba <r_emvnd+0x27a>
movups (%rbx,%rdi,8),%xmm0
movups 0x10(%rbx,%rdi,8),%xmm1
movups %xmm0,(%rax,%rdi,8)
movups %xmm1,0x10(%rax,%rdi,8)
movupd (%r14,%rdi,8),%xmm0
movups 0x10(%r14,%rdi,8),%xmm1
movupd %xmm0,(%rdx,%rdi,8)
movups %xmm1,0x10(%rdx,%rdi,8)
cmp    %rcx,%rsi
jne    11fd <r_emvnd+0xbd>
mov    0x40(%rsp),%rax
movsd  (%rax),%xmm2
mov    0x2bdd(%rip),%rdi
movsd  0xc2d(%rip),%xmm0
movsd  0xc2d(%rip),%xmm1
call   1040 <romberg@plt>
movsd  %xmm0,(%rsp)
mov    (%r12),%rdi
call   1030 <free@plt>
mov    0x2bbb(%rip),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl (%r15),%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x0(%r13)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r8b
jne    1392 <r_emvnd+0x252>
jmp    13ba <r_emvnd+0x27a>
mov    0x2b94(%rip),%r15
jmp    11fd <r_emvnd+0xbd>
mov    0x48(%rsp),%r13
mov    0x2b83(%rip),%r15
mov    0x2b6c(%rip),%r12
jmp    11fd <r_emvnd+0xbd>

LLVM IR (-O0):
@mm = external global i32
@kk = external global i32
@rs = external global double
@r1 = external global double
@ksign = external global i32
@xx = external global double*
@ww = external global double*
@der = global i32 0
define void @r_emvnd(i32* %0, double* %1, double* %2, double* %3, i32* %4, i32* %5, double* %6, double* %7) {
%9 = alloca i32*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double
%18 = alloca i32
store i32* %0, i32** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store double* %6, double** %15
store double* %7, double** %16
%19 = load i32*, i32** %9
%20 = load i32, i32* %19
store i32 %20, i32* @mm
%21 = load i32*, i32** %13
%22 = load i32, i32* %21
%23 = sub nsw i32 %22, 1
store i32 %23, i32* @kk
%24 = load double*, double** %12
%25 = load double, double* %24
%26 = fptosi double %25 to i32
%27 = call double @sqrt(i32 %26)
store double %27, double* @rs
%28 = load double*, double** %12
%29 = load double, double* %28
%30 = fsub double 1.000000e+00, %29
%31 = fptosi double %30 to i32
%32 = call double @sqrt(i32 %31)
store double %32, double* @r1
%33 = load i32*, i32** %14
%34 = load i32, i32* %33
store i32 %34, i32* @ksign
%35 = load i32, i32* @mm
%36 = sext i32 %35 to i64
%37 = mul i64 %36, 8
%38 = trunc i64 %37 to i32
%39 = call i64 @malloc(i32 %38)
%40 = inttoptr i64 %39 to double*
store double* %40, double** @xx
%41 = load i32, i32* @mm
%42 = sext i32 %41 to i64
%43 = mul i64 %42, 8
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** @ww
store i32 0, i32* %18
br label %47
47: ; preds = %70, %8
%48 = load i32, i32* %18
%49 = load i32, i32* @mm
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %73
51: ; preds = %47
%52 = load double*, double** %10
%53 = load i32, i32* %18
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = load double*, double** @ww
%58 = load i32, i32* %18
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
store double %56, double* %60
%61 = load double*, double** %11
%62 = load i32, i32* %18
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %64
%66 = load double*, double** @xx
%67 = load i32, i32* %18
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double %65, double* %69
br label %70
70: ; preds = %51
%71 = load i32, i32* %18
%72 = add nsw i32 %71, 1
store i32 %72, i32* %18
br label %47
73: ; preds = %47
%74 = load double*, double** %15
%75 = load double, double* %74
%76 = call double @romberg(double (double)* @r_gd, double -6.000000e+00, double 6.000000e+00, double %75)
store double %76, double* %17
%77 = load double*, double** @xx
%78 = call i32 @free(double* %77)
%79 = load double*, double** @ww
%80 = call i32 @free(double* %79)
%81 = load i32, i32* @ksign
%82 = sitofp i32 %81 to double
%83 = load double, double* %17
%84 = fmul double %82, %83
%85 = load double*, double** %16
store double %84, double* %85
ret void
}

LLVM IR (-O2):
@mm = external global i32
@kk = external global i32
@rs = external global double
@r1 = external global double
@ksign = external global i32
@xx = external global double*
@ww = external global double*
@der = global i32 0
define void @r_emvnd(i32* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, i32* nocapture %4, i32* nocapture %5, double* nocapture %6, double* nocapture writeonly %7) {
%9 = load i32, i32* %0
store i32 %9, i32* @mm
%10 = load i32, i32* %4
%11 = add nsw i32 %10, -1
store i32 %11, i32* @kk
%12 = load double, double* %3
%13 = fptosi double %12 to i32
%14 = tail call double @sqrt(i32 %13)
store double %14, double* @rs
%15 = load double, double* %3
%16 = fsub double 1.000000e+00, %15
%17 = fptosi double %16 to i32
%18 = tail call double @sqrt(i32 %17)
store double %18, double* @r1
%19 = load i32, i32* %5
store i32 %19, i32* @ksign
%20 = load i32, i32* @mm
%21 = shl i32 %20, 3
%22 = tail call i64 @malloc(i32 %21)
%23 = inttoptr i64 %22 to double*
store double* %23, double** @xx
%24 = load i32, i32* @mm
%25 = shl i32 %24, 3
%26 = tail call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to double*
%28 = inttoptr i64 %26 to i8*
store double* %27, double** @ww
%29 = load i32, i32* @mm
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %178
31: ; preds = %8
%32 = load double*, double** @xx
%33 = zext i32 %29 to i64
%34 = icmp ult i32 %29, 4
br i1 %34, label %144, label %35
35: ; preds = %31
%36 = getelementptr double, double* %27, i64 %33
%37 = getelementptr double, double* %32, i64 %33
%38 = bitcast double* %37 to i8*
%39 = getelementptr double, double* %1, i64 %33
%40 = bitcast double* %39 to i8*
%41 = getelementptr double, double* %2, i64 %33
%42 = bitcast double* %41 to i8*
%43 = icmp ult i8* %28, %38
%44 = icmp ult double* %32, %36
%45 = and i1 %43, %44
%46 = icmp ult i8* %28, %40
%47 = icmp ugt double* %36, %1
%48 = and i1 %46, %47
%49 = or i1 %45, %48
%50 = icmp ult i8* %28, %42
%51 = icmp ugt double* %36, %2
%52 = and i1 %50, %51
%53 = or i1 %49, %52
%54 = icmp ult double* %32, %39
%55 = icmp ugt double* %37, %1
%56 = and i1 %54, %55
%57 = or i1 %53, %56
%58 = icmp ult double* %32, %41
%59 = icmp ugt double* %37, %2
%60 = and i1 %58, %59
%61 = or i1 %57, %60
br i1 %61, label %144, label %62
62: ; preds = %35
%63 = and i64 %33, 4294967292
%64 = add nsw i64 %63, -4
%65 = lshr exact i64 %64, 2
%66 = add nuw nsw i64 %65, 1
%67 = and i64 %66, 1
%68 = icmp eq i64 %64, 0
br i1 %68, label %118, label %69
69: ; preds = %62
%70 = and i64 %66, 9223372036854775806
br label %71
71: ; preds = %71, %69
%72 = phi i64 [ 0, %69 ], [ %115, %71 ]
%73 = phi i64 [ 0, %69 ], [ %116, %71 ]
%74 = getelementptr inbounds double, double* %1, i64 %72
%75 = bitcast double* %74 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = getelementptr inbounds double, double* %74, i64 2
%78 = bitcast double* %77 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = getelementptr inbounds double, double* %27, i64 %72
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %76, <2 x double>* %81
%82 = getelementptr inbounds double, double* %80, i64 2
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> %79, <2 x double>* %83
%84 = getelementptr inbounds double, double* %2, i64 %72
%85 = bitcast double* %84 to <2 x double>*
%86 = load <2 x double>, <2 x double>* %85
%87 = getelementptr inbounds double, double* %84, i64 2
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %32, i64 %72
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> %86, <2 x double>* %91
%92 = getelementptr inbounds double, double* %90, i64 2
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %89, <2 x double>* %93
%94 = or i64 %72, 4
%95 = getelementptr inbounds double, double* %1, i64 %94
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = getelementptr inbounds double, double* %95, i64 2
%99 = bitcast double* %98 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = getelementptr inbounds double, double* %27, i64 %94
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %97, <2 x double>* %102
%103 = getelementptr inbounds double, double* %101, i64 2
%104 = bitcast double* %103 to <2 x double>*
store <2 x double> %100, <2 x double>* %104
%105 = getelementptr inbounds double, double* %2, i64 %94
%106 = bitcast double* %105 to <2 x double>*
%107 = load <2 x double>, <2 x double>* %106
%108 = getelementptr inbounds double, double* %105, i64 2
%109 = bitcast double* %108 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = getelementptr inbounds double, double* %32, i64 %94
%112 = bitcast double* %111 to <2 x double>*
store <2 x double> %107, <2 x double>* %112
%113 = getelementptr inbounds double, double* %111, i64 2
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> %110, <2 x double>* %114
%115 = add nuw i64 %72, 8
%116 = add i64 %73, 2
%117 = icmp eq i64 %116, %70
br i1 %117, label %118, label %71
118: ; preds = %71, %62
%119 = phi i64 [ 0, %62 ], [ %115, %71 ]
%120 = icmp eq i64 %67, 0
br i1 %120, label %142, label %121
121: ; preds = %118
%122 = getelementptr inbounds double, double* %1, i64 %119
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = getelementptr inbounds double, double* %122, i64 2
%126 = bitcast double* %125 to <2 x double>*
%127 = load <2 x double>, <2 x double>* %126
%128 = getelementptr inbounds double, double* %27, i64 %119
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %124, <2 x double>* %129
%130 = getelementptr inbounds double, double* %128, i64 2
%131 = bitcast double* %130 to <2 x double>*
store <2 x double> %127, <2 x double>* %131
%132 = getelementptr inbounds double, double* %2, i64 %119
%133 = bitcast double* %132 to <2 x double>*
%134 = load <2 x double>, <2 x double>* %133
%135 = getelementptr inbounds double, double* %132, i64 2
%136 = bitcast double* %135 to <2 x double>*
%137 = load <2 x double>, <2 x double>* %136
%138 = getelementptr inbounds double, double* %32, i64 %119
%139 = bitcast double* %138 to <2 x double>*
store <2 x double> %134, <2 x double>* %139
%140 = getelementptr inbounds double, double* %138, i64 2
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> %137, <2 x double>* %141
br label %142
142: ; preds = %118, %121
%143 = icmp eq i64 %63, %33
br i1 %143, label %178, label %144
144: ; preds = %35, %31, %142
%145 = phi i64 [ 0, %35 ], [ 0, %31 ], [ %63, %142 ]
%146 = xor i64 %145, -1
%147 = and i64 %33, 1
%148 = icmp eq i64 %147, 0
br i1 %148, label %157, label %149
149: ; preds = %144
%150 = getelementptr inbounds double, double* %1, i64 %145
%151 = load double, double* %150
%152 = getelementptr inbounds double, double* %27, i64 %145
store double %151, double* %152
%153 = getelementptr inbounds double, double* %2, i64 %145
%154 = load double, double* %153
%155 = getelementptr inbounds double, double* %32, i64 %145
store double %154, double* %155
%156 = or i64 %145, 1
br label %157
157: ; preds = %149, %144
%158 = phi i64 [ %145, %144 ], [ %156, %149 ]
%159 = sub nsw i64 0, %33
%160 = icmp eq i64 %146, %159
br i1 %160, label %178, label %161
161: ; preds = %157, %161
%162 = phi i64 [ %176, %161 ], [ %158, %157 ]
%163 = getelementptr inbounds double, double* %1, i64 %162
%164 = load double, double* %163
%165 = getelementptr inbounds double, double* %27, i64 %162
store double %164, double* %165
%166 = getelementptr inbounds double, double* %2, i64 %162
%167 = load double, double* %166
%168 = getelementptr inbounds double, double* %32, i64 %162
store double %167, double* %168
%169 = add nuw nsw i64 %162, 1
%170 = getelementptr inbounds double, double* %1, i64 %169
%171 = load double, double* %170
%172 = getelementptr inbounds double, double* %27, i64 %169
store double %171, double* %172
%173 = getelementptr inbounds double, double* %2, i64 %169
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %32, i64 %169
store double %174, double* %175
%176 = add nuw nsw i64 %162, 2
%177 = icmp eq i64 %176, %33
br i1 %177, label %178, label %161
178: ; preds = %157, %161, %142, %8
%179 = load double, double* %6
%180 = tail call double @romberg(double (double)* @r_gd, double -6.000000e+00, double 6.000000e+00, double %179)
%181 = load double*, double** @xx
%182 = tail call i32 @free(double* %181)
%183 = load double*, double** @ww
%184 = tail call i32 @free(double* %183)
%185 = load i32, i32* @ksign
%186 = sitofp i32 %185 to double
%187 = fmul double %180, %186
store double %187, double* %7
ret void
}