#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 */
double asum(double *, int);
scalar_t__ calloc(int, int);
int /*<<< orphan*/ fatalx(char *, ...);
int /*<<< orphan*/ free(double *);
double sqrt(double);
int /*<<< orphan*/ vclear(double *, double, int);
double vdot(double *, double *, int);
int /*<<< orphan*/ vsp(double *, double *, double, int);
int /*<<< orphan*/ vst(double *, double *, double, int);
int /*<<< orphan*/ vvd(double *, double *, double *, int);
int /*<<< orphan*/ vvm(double *, double *, double *, int);
int /*<<< orphan*/ vvt(double *, double *, double *, int);
void weightjackx(double *est, double *sig, double mean, double *jmean,
                 double *jwt, int g) {
  double *tdiff, *hh, *xtau, *w1, *w2;
  double jackest, yn, yvar;
  int k;
  if (g <= 1)
    fatalx("(weightjack) number of blocks <= 1\n");
  if ((tdiff = (double *)calloc((g), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", g);
  if ((hh = (double *)calloc((g), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", g);
  if ((xtau = (double *)calloc((g), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", g);
  if ((w1 = (double *)calloc((g), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", g);
  if ((w2 = (double *)calloc((g), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", g);
  yn = asum(jwt, g);
  vsp(tdiff, jmean, -mean, g);
  vst(tdiff, tdiff, -1.0, g);
  jackest = asum(tdiff, g) + vdot(jwt, jmean, g) / yn;
  vclear(hh, yn, g);
  vvd(hh, hh, jwt, g);
  vst(xtau, hh, mean, g);
  vsp(w1, hh, -1.0, g);
  vvt(w2, w1, jmean, g);
  vvm(xtau, xtau, w2, g);
  vsp(xtau, xtau, -jackest, g);
  vvt(xtau, xtau, xtau, g);
  vvd(xtau, xtau, w1, g);
  yvar = asum(xtau, g) / (double)g;
  *est = jackest;
  *sig = 0.0;
  if (yvar > 0)
    *sig = sqrt(yvar);
  free(tdiff);
  free(hh);
  free(xtau);
  free(w1);
  free(w2);
}


x86 assembly (clang, -O0):
<weightjackx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jg     11fc <weightjackx+0x3c>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x2c(%rbp),%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1228 <weightjackx+0x68>
mov    -0x2c(%rbp),%esi
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x2c(%rbp),%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    1254 <weightjackx+0x94>
mov    -0x2c(%rbp),%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x2c(%rbp),%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    1280 <weightjackx+0xc0>
mov    -0x2c(%rbp),%esi
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x2c(%rbp),%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    12ac <weightjackx+0xec>
mov    -0x2c(%rbp),%esi
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x2c(%rbp),%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    12d8 <weightjackx+0x118>
mov    -0x2c(%rbp),%esi
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1060 <fatalx@plt>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   10a0 <asum@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x2c(%rbp),%edx
call   1050 <vsp@plt>
mov    -0x38(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  0xcd8(%rip),%xmm0
call   1040 <vst@plt>
mov    -0x38(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   10a0 <asum@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   10b0 <vdot@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%rdi
movsd  -0x68(%rbp),%xmm0
mov    -0x2c(%rbp),%esi
call   10e0 <vclear@plt>
mov    -0x40(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1070 <vvd@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
mov    -0x2c(%rbp),%edx
call   1040 <vst@plt>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  0xc4f(%rip),%xmm0
call   1050 <vsp@plt>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1090 <vvt@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   10d0 <vvm@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x2c(%rbp),%edx
call   1050 <vsp@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1090 <vvt@plt>
mov    -0x48(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1070 <vvd@plt>
mov    -0x48(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   10a0 <asum@plt>
cvtsi2sdl -0x2c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1488 <weightjackx+0x2c8>
movsd  -0x70(%rbp),%xmm0
call   10c0 <sqrt@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<weightjackx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8d,%ebp
mov    %rcx,%r12
mov    %rdx,0x38(%rsp)
movaps %xmm0,0x50(%rsp)
mov    %rsi,0x48(%rsp)
mov    %rdi,0x40(%rsp)
cmp    $0x1,%r8d
jg     11fc <weightjackx+0x3c>
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    1222 <weightjackx+0x62>
lea    0xe23(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,(%rsp)
test   %rax,%rax
jne    1247 <weightjackx+0x87>
lea    0xdfe(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,%r13
test   %rax,%rax
jne    126b <weightjackx+0xab>
lea    0xdda(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    128f <weightjackx+0xcf>
lea    0xdb6(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1080 <calloc@plt>
mov    %rax,0x30(%rsp)
test   %rax,%rax
jne    12b5 <weightjackx+0xf5>
lea    0xd90(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <fatalx@plt>
mov    %r12,%rdi
mov    %ebp,%esi
call   10a0 <asum@plt>
movsd  %xmm0,0x28(%rsp)
movaps 0x50(%rsp),%xmm0
xorps  0xd2f(%rip),%xmm0
mov    0x8(%rsp),%r14
mov    %r14,%rdi
mov    0x38(%rsp),%r15
mov    %r15,%rsi
mov    %ebp,%edx
call   1050 <vsp@plt>
movsd  0xd20(%rip),%xmm0
mov    %r14,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <vst@plt>
mov    %r14,%rdi
mov    %ebp,%esi
call   10a0 <asum@plt>
movsd  %xmm0,0x10(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   10b0 <vdot@plt>
movsd  0x28(%rsp),%xmm1
divsd  %xmm1,%xmm0
addsd  0x10(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
mov    (%rsp),%r14
mov    %r14,%rdi
movapd %xmm1,%xmm0
mov    %ebp,%esi
call   10e0 <vclear@plt>
mov    %r14,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
call   1070 <vvd@plt>
mov    %r13,%rdi
mov    %r14,%rsi
movaps 0x50(%rsp),%xmm0
mov    %ebp,%edx
call   1040 <vst@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
movsd  0xc9e(%rip),%xmm0
mov    %ebp,%edx
call   1050 <vsp@plt>
mov    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
call   1090 <vvt@plt>
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %ebp,%ecx
call   10d0 <vvm@plt>
movapd 0xc5a(%rip),%xmm0
xorpd  0x10(%rsp),%xmm0
mov    %r13,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
call   1050 <vsp@plt>
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r13,%rdx
mov    %ebp,%ecx
call   1090 <vvt@plt>
mov    %r13,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1070 <vvd@plt>
mov    %r13,%rdi
mov    %ebp,%esi
call   10a0 <asum@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
divsd  %xmm1,%xmm0
mov    0x40(%rsp),%rax
movapd 0x10(%rsp),%xmm1
movsd  %xmm1,(%rax)
mov    0x48(%rsp),%rbp
movq   $0x0,0x0(%rbp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1426 <weightjackx+0x266>
jb     141c <weightjackx+0x25c>
sqrtsd %xmm0,%xmm0
jmp    1421 <weightjackx+0x261>
call   10c0 <sqrt@plt>
movsd  %xmm0,0x0(%rbp)
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"(weightjack) number of blocks <= 1\0A\00"
@.str.1 = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
define void @weightjackx(double* %0, double* %1, double %2, double* %3, double* %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
store double* %0, double** %7
store double* %1, double** %8
store double %2, double* %9
store double* %3, double** %10
store double* %4, double** %11
store i32 %5, i32* %12
%22 = load i32, i32* %12
%23 = icmp sle i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %6
%25 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %26
26: ; preds = %24, %6
%27 = load i32, i32* %12
%28 = call i64 @calloc(i32 %27, i32 8)
%29 = inttoptr i64 %28 to double*
store double* %29, double** %13
%30 = icmp eq double* %29, null
br i1 %30, label %31, label %34
31: ; preds = %26
%32 = load i32, i32* %12
%33 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31, %26
%35 = load i32, i32* %12
%36 = call i64 @calloc(i32 %35, i32 8)
%37 = inttoptr i64 %36 to double*
store double* %37, double** %14
%38 = icmp eq double* %37, null
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = load i32, i32* %12
%41 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %39, %34
%43 = load i32, i32* %12
%44 = call i64 @calloc(i32 %43, i32 8)
%45 = inttoptr i64 %44 to double*
store double* %45, double** %15
%46 = icmp eq double* %45, null
br i1 %46, label %47, label %50
47: ; preds = %42
%48 = load i32, i32* %12
%49 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47, %42
%51 = load i32, i32* %12
%52 = call i64 @calloc(i32 %51, i32 8)
%53 = inttoptr i64 %52 to double*
store double* %53, double** %16
%54 = icmp eq double* %53, null
br i1 %54, label %55, label %58
55: ; preds = %50
%56 = load i32, i32* %12
%57 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %55, %50
%59 = load i32, i32* %12
%60 = call i64 @calloc(i32 %59, i32 8)
%61 = inttoptr i64 %60 to double*
store double* %61, double** %17
%62 = icmp eq double* %61, null
br i1 %62, label %63, label %66
63: ; preds = %58
%64 = load i32, i32* %12
%65 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %58
%67 = load double*, double** %11
%68 = load i32, i32* %12
%69 = call double @asum(double* %67, i32 %68)
store double %69, double* %19
%70 = load double*, double** %13
%71 = load double*, double** %10
%72 = load double, double* %9
%73 = fneg double %72
%74 = load i32, i32* %12
%75 = call i32 @vsp(double* %70, double* %71, double %73, i32 %74)
%76 = load double*, double** %13
%77 = load double*, double** %13
%78 = load i32, i32* %12
%79 = call i32 @vst(double* %76, double* %77, double -1.000000e+00, i32 %78)
%80 = load double*, double** %13
%81 = load i32, i32* %12
%82 = call double @asum(double* %80, i32 %81)
%83 = load double*, double** %11
%84 = load double*, double** %10
%85 = load i32, i32* %12
%86 = call double @vdot(double* %83, double* %84, i32 %85)
%87 = load double, double* %19
%88 = fdiv double %86, %87
%89 = fadd double %82, %88
store double %89, double* %18
%90 = load double*, double** %14
%91 = load double, double* %19
%92 = load i32, i32* %12
%93 = call i32 @vclear(double* %90, double %91, i32 %92)
%94 = load double*, double** %14
%95 = load double*, double** %14
%96 = load double*, double** %11
%97 = load i32, i32* %12
%98 = call i32 @vvd(double* %94, double* %95, double* %96, i32 %97)
%99 = load double*, double** %15
%100 = load double*, double** %14
%101 = load double, double* %9
%102 = load i32, i32* %12
%103 = call i32 @vst(double* %99, double* %100, double %101, i32 %102)
%104 = load double*, double** %16
%105 = load double*, double** %14
%106 = load i32, i32* %12
%107 = call i32 @vsp(double* %104, double* %105, double -1.000000e+00, i32 %106)
%108 = load double*, double** %17
%109 = load double*, double** %16
%110 = load double*, double** %10
%111 = load i32, i32* %12
%112 = call i32 @vvt(double* %108, double* %109, double* %110, i32 %111)
%113 = load double*, double** %15
%114 = load double*, double** %15
%115 = load double*, double** %17
%116 = load i32, i32* %12
%117 = call i32 @vvm(double* %113, double* %114, double* %115, i32 %116)
%118 = load double*, double** %15
%119 = load double*, double** %15
%120 = load double, double* %18
%121 = fneg double %120
%122 = load i32, i32* %12
%123 = call i32 @vsp(double* %118, double* %119, double %121, i32 %122)
%124 = load double*, double** %15
%125 = load double*, double** %15
%126 = load double*, double** %15
%127 = load i32, i32* %12
%128 = call i32 @vvt(double* %124, double* %125, double* %126, i32 %127)
%129 = load double*, double** %15
%130 = load double*, double** %15
%131 = load double*, double** %16
%132 = load i32, i32* %12
%133 = call i32 @vvd(double* %129, double* %130, double* %131, i32 %132)
%134 = load double*, double** %15
%135 = load i32, i32* %12
%136 = call double @asum(double* %134, i32 %135)
%137 = load i32, i32* %12
%138 = sitofp i32 %137 to double
%139 = fdiv double %136, %138
store double %139, double* %20
%140 = load double, double* %18
%141 = load double*, double** %7
store double %140, double* %141
%142 = load double*, double** %8
store double 0.000000e+00, double* %142
%143 = load double, double* %20
%144 = fcmp ogt double %143, 0.000000e+00
br i1 %144, label %145, label %149
145: ; preds = %66
%146 = load double, double* %20
%147 = call double @sqrt(double %146)
%148 = load double*, double** %8
store double %147, double* %148
br label %149
149: ; preds = %145, %66
%150 = load double*, double** %13
%151 = call i32 @free(double* %150)
%152 = load double*, double** %14
%153 = call i32 @free(double* %152)
%154 = load double*, double** %15
%155 = call i32 @free(double* %154)
%156 = load double*, double** %16
%157 = call i32 @free(double* %156)
%158 = load double*, double** %17
%159 = call i32 @free(double* %158)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"(weightjack) number of blocks <= 1\0A\00"
@.str.1 = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
define void @weightjackx(double* nocapture writeonly %0, double* nocapture writeonly %1, double %2, double* %3, double* %4, i32 %5) {
%7 = icmp slt i32 %5, 2
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = tail call i64 @calloc(i32 %5, i32 8)
%12 = inttoptr i64 %11 to double*
%13 = icmp eq i64 %11, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %16
16: ; preds = %14, %10
%17 = tail call i64 @calloc(i32 %5, i32 8)
%18 = inttoptr i64 %17 to double*
%19 = icmp eq i64 %17, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %22
22: ; preds = %20, %16
%23 = tail call i64 @calloc(i32 %5, i32 8)
%24 = inttoptr i64 %23 to double*
%25 = icmp eq i64 %23, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %28
28: ; preds = %26, %22
%29 = tail call i64 @calloc(i32 %5, i32 8)
%30 = inttoptr i64 %29 to double*
%31 = icmp eq i64 %29, 0
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %34
34: ; preds = %32, %28
%35 = tail call i64 @calloc(i32 %5, i32 8)
%36 = inttoptr i64 %35 to double*
%37 = icmp eq i64 %35, 0
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %40
40: ; preds = %38, %34
%41 = tail call double @asum(double* %4, i32 %5)
%42 = fneg double %2
%43 = tail call i32 @vsp(double* %12, double* %3, double %42, i32 %5)
%44 = tail call i32 @vst(double* %12, double* %12, double -1.000000e+00, i32 %5)
%45 = tail call double @asum(double* %12, i32 %5)
%46 = tail call double @vdot(double* %4, double* %3, i32 %5)
%47 = fdiv double %46, %41
%48 = fadd double %45, %47
%49 = tail call i32 @vclear(double* %18, double %41, i32 %5)
%50 = tail call i32 @vvd(double* %18, double* %18, double* %4, i32 %5)
%51 = tail call i32 @vst(double* %24, double* %18, double %2, i32 %5)
%52 = tail call i32 @vsp(double* %30, double* %18, double -1.000000e+00, i32 %5)
%53 = tail call i32 @vvt(double* %36, double* %30, double* %3, i32 %5)
%54 = tail call i32 @vvm(double* %24, double* %24, double* %36, i32 %5)
%55 = fneg double %48
%56 = tail call i32 @vsp(double* %24, double* %24, double %55, i32 %5)
%57 = tail call i32 @vvt(double* %24, double* %24, double* %24, i32 %5)
%58 = tail call i32 @vvd(double* %24, double* %24, double* %30, i32 %5)
%59 = tail call double @asum(double* %24, i32 %5)
%60 = sitofp i32 %5 to double
%61 = fdiv double %59, %60
store double %48, double* %0
store double 0.000000e+00, double* %1
%62 = fcmp ogt double %61, 0.000000e+00
br i1 %62, label %63, label %65
63: ; preds = %40
%64 = tail call double @sqrt(double %61)
store double %64, double* %1
br label %65
65: ; preds = %63, %40
%66 = tail call i32 @free(double* %12)
%67 = tail call i32 @free(double* %18)
%68 = tail call i32 @free(double* %24)
%69 = tail call i32 @free(double* %30)
%70 = tail call i32 @free(double* %36)
ret void
}