#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 sqrt(double);
void exFDs(const double *u, const double *F, double *p, double *w, int len) {
  double rx, ry, rwc, ryc, rxc, r, a, b;
  int i;
  for (i = 1; i <= len; i++) {
    rxc = (*F) * (*(u + 3)) + (*(F + 3)) * (*(u + 4)) + (*(F + 6));
    ryc = (*(F + 1)) * (*(u + 3)) + (*(F + 4)) * (*(u + 4)) + (*(F + 7));
    rwc = (*(F + 2)) * (*(u + 3)) + (*(F + 5)) * (*(u + 4)) + (*(F + 8));
    r = ((*(u)) * rxc + (*(u + 1)) * ryc + rwc);
    rx = (*F) * (*(u)) + (*(F + 1)) * (*(u + 1)) + (*(F + 2));
    ry = (*(F + 3)) * (*(u)) + (*(F + 4)) * (*(u + 1)) + (*(F + 5));
    *w = rxc * rxc + ryc * ryc + rx * rx + ry * ry;
    *p = r * r / *w;
    *w = 1 / sqrt(*w);
    p++;
    w++;
    u += 6;
  }
}


x86 assembly (clang, -O0):
<exFDs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1341 <exFDs+0x231>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0x8(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1133 <exFDs+0x23>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exFDs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %r8d,%r8d
jle    126a <exFDs+0x15a>
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%rbx
mov    %r8d,%r13d
add    $0x20,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  -0x8(%rbx),%xmm3
movsd  0x18(%r12),%xmm0
movsd  (%rbx),%xmm5
movapd %xmm0,%xmm4
mulsd  %xmm5,%xmm4
movsd  (%r12),%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm4,%xmm2
addsd  0x30(%r12),%xmm2
movsd  0x8(%r12),%xmm11
movsd  0x20(%r12),%xmm10
movapd %xmm5,%xmm7
mulsd  %xmm10,%xmm7
movapd %xmm11,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm7,%xmm4
addsd  0x38(%r12),%xmm4
movsd  0x10(%r12),%xmm9
movsd  0x28(%r12),%xmm8
mulsd  %xmm8,%xmm5
mulsd  %xmm9,%xmm3
addsd  %xmm5,%xmm3
addsd  0x40(%r12),%xmm3
movsd  -0x20(%rbx),%xmm5
movsd  -0x18(%rbx),%xmm7
movapd %xmm4,%xmm6
mulsd  %xmm7,%xmm6
mulsd  %xmm5,%xmm1
mulsd  %xmm5,%xmm0
mulsd  %xmm2,%xmm5
addsd  %xmm6,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm7,%xmm11
addsd  %xmm11,%xmm1
addsd  %xmm9,%xmm1
mulsd  %xmm7,%xmm10
addsd  %xmm10,%xmm0
addsd  %xmm8,%xmm0
mulsd  %xmm4,%xmm4
mulsd  %xmm2,%xmm2
addsd  %xmm4,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rbp,8)
mulsd  %xmm5,%xmm5
divsd  %xmm0,%xmm5
movsd  %xmm5,(%r14,%rbp,8)
movsd  (%r15,%rbp,8),%xmm0
call   1030 <sqrt@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
mov    $0x0,%ecx
cmovae %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
add    $0x30,%rbx
cmp    %ebp,%r13d
jne    1140 <exFDs+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @exFDs(double* %0, double* %1, double* %2, double* %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store i32 %4, i32* %10
store i32 1, i32* %19
br label %20
20: ; preds = %154, %5
%21 = load i32, i32* %19
%22 = load i32, i32* %10
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %157
24: ; preds = %20
%25 = load double*, double** %7
%26 = load double, double* %25
%27 = load double*, double** %6
%28 = getelementptr inbounds double, double* %27, i64 3
%29 = load double, double* %28
%30 = load double*, double** %7
%31 = getelementptr inbounds double, double* %30, i64 3
%32 = load double, double* %31
%33 = load double*, double** %6
%34 = getelementptr inbounds double, double* %33, i64 4
%35 = load double, double* %34
%36 = fmul double %32, %35
%37 = call double @llvm.fmuladd.f64(double %26, double %29, double %36)
%38 = load double*, double** %7
%39 = getelementptr inbounds double, double* %38, i64 6
%40 = load double, double* %39
%41 = fadd double %37, %40
store double %41, double* %15
%42 = load double*, double** %7
%43 = getelementptr inbounds double, double* %42, i64 1
%44 = load double, double* %43
%45 = load double*, double** %6
%46 = getelementptr inbounds double, double* %45, i64 3
%47 = load double, double* %46
%48 = load double*, double** %7
%49 = getelementptr inbounds double, double* %48, i64 4
%50 = load double, double* %49
%51 = load double*, double** %6
%52 = getelementptr inbounds double, double* %51, i64 4
%53 = load double, double* %52
%54 = fmul double %50, %53
%55 = call double @llvm.fmuladd.f64(double %44, double %47, double %54)
%56 = load double*, double** %7
%57 = getelementptr inbounds double, double* %56, i64 7
%58 = load double, double* %57
%59 = fadd double %55, %58
store double %59, double* %14
%60 = load double*, double** %7
%61 = getelementptr inbounds double, double* %60, i64 2
%62 = load double, double* %61
%63 = load double*, double** %6
%64 = getelementptr inbounds double, double* %63, i64 3
%65 = load double, double* %64
%66 = load double*, double** %7
%67 = getelementptr inbounds double, double* %66, i64 5
%68 = load double, double* %67
%69 = load double*, double** %6
%70 = getelementptr inbounds double, double* %69, i64 4
%71 = load double, double* %70
%72 = fmul double %68, %71
%73 = call double @llvm.fmuladd.f64(double %62, double %65, double %72)
%74 = load double*, double** %7
%75 = getelementptr inbounds double, double* %74, i64 8
%76 = load double, double* %75
%77 = fadd double %73, %76
store double %77, double* %13
%78 = load double*, double** %6
%79 = load double, double* %78
%80 = load double, double* %15
%81 = load double*, double** %6
%82 = getelementptr inbounds double, double* %81, i64 1
%83 = load double, double* %82
%84 = load double, double* %14
%85 = fmul double %83, %84
%86 = call double @llvm.fmuladd.f64(double %79, double %80, double %85)
%87 = load double, double* %13
%88 = fadd double %86, %87
store double %88, double* %16
%89 = load double*, double** %7
%90 = load double, double* %89
%91 = load double*, double** %6
%92 = load double, double* %91
%93 = load double*, double** %7
%94 = getelementptr inbounds double, double* %93, i64 1
%95 = load double, double* %94
%96 = load double*, double** %6
%97 = getelementptr inbounds double, double* %96, i64 1
%98 = load double, double* %97
%99 = fmul double %95, %98
%100 = call double @llvm.fmuladd.f64(double %90, double %92, double %99)
%101 = load double*, double** %7
%102 = getelementptr inbounds double, double* %101, i64 2
%103 = load double, double* %102
%104 = fadd double %100, %103
store double %104, double* %11
%105 = load double*, double** %7
%106 = getelementptr inbounds double, double* %105, i64 3
%107 = load double, double* %106
%108 = load double*, double** %6
%109 = load double, double* %108
%110 = load double*, double** %7
%111 = getelementptr inbounds double, double* %110, i64 4
%112 = load double, double* %111
%113 = load double*, double** %6
%114 = getelementptr inbounds double, double* %113, i64 1
%115 = load double, double* %114
%116 = fmul double %112, %115
%117 = call double @llvm.fmuladd.f64(double %107, double %109, double %116)
%118 = load double*, double** %7
%119 = getelementptr inbounds double, double* %118, i64 5
%120 = load double, double* %119
%121 = fadd double %117, %120
store double %121, double* %12
%122 = load double, double* %15
%123 = load double, double* %15
%124 = load double, double* %14
%125 = load double, double* %14
%126 = fmul double %124, %125
%127 = call double @llvm.fmuladd.f64(double %122, double %123, double %126)
%128 = load double, double* %11
%129 = load double, double* %11
%130 = call double @llvm.fmuladd.f64(double %128, double %129, double %127)
%131 = load double, double* %12
%132 = load double, double* %12
%133 = call double @llvm.fmuladd.f64(double %131, double %132, double %130)
%134 = load double*, double** %9
store double %133, double* %134
%135 = load double, double* %16
%136 = load double, double* %16
%137 = fmul double %135, %136
%138 = load double*, double** %9
%139 = load double, double* %138
%140 = fdiv double %137, %139
%141 = load double*, double** %8
store double %140, double* %141
%142 = load double*, double** %9
%143 = load double, double* %142
%144 = call i32 @sqrt(double %143)
%145 = sdiv i32 1, %144
%146 = sitofp i32 %145 to double
%147 = load double*, double** %9
store double %146, double* %147
%148 = load double*, double** %8
%149 = getelementptr inbounds double, double* %148, i32 1
store double* %149, double** %8
%150 = load double*, double** %9
%151 = getelementptr inbounds double, double* %150, i32 1
store double* %151, double** %9
%152 = load double*, double** %6
%153 = getelementptr inbounds double, double* %152, i64 6
store double* %153, double** %6
br label %154
154: ; preds = %24
%155 = load i32, i32* %19
%156 = add nsw i32 %155, 1
store i32 %156, i32* %19
br label %20
157: ; preds = %20
ret void
}

LLVM IR (-O2):
define void @exFDs(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture %3, i32 %4) {
%6 = icmp slt i32 %4, 1
br i1 %6, label %72, label %7
7: ; preds = %5
%8 = getelementptr inbounds double, double* %1, i64 3
%9 = getelementptr inbounds double, double* %1, i64 6
%10 = getelementptr inbounds double, double* %1, i64 1
%11 = getelementptr inbounds double, double* %1, i64 4
%12 = getelementptr inbounds double, double* %1, i64 7
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = getelementptr inbounds double, double* %1, i64 5
%15 = getelementptr inbounds double, double* %1, i64 8
br label %16
16: ; preds = %7, %16
%17 = phi i32 [ 1, %7 ], [ %70, %16 ]
%18 = phi double* [ %0, %7 ], [ %69, %16 ]
%19 = phi double* [ %2, %7 ], [ %67, %16 ]
%20 = phi double* [ %3, %7 ], [ %68, %16 ]
%21 = load double, double* %1
%22 = getelementptr inbounds double, double* %18, i64 3
%23 = load double, double* %22
%24 = load double, double* %8
%25 = getelementptr inbounds double, double* %18, i64 4
%26 = load double, double* %25
%27 = fmul double %24, %26
%28 = tail call double @llvm.fmuladd.f64(double %21, double %23, double %27)
%29 = load double, double* %9
%30 = fadd double %29, %28
%31 = load double, double* %10
%32 = load double, double* %11
%33 = fmul double %26, %32
%34 = tail call double @llvm.fmuladd.f64(double %31, double %23, double %33)
%35 = load double, double* %12
%36 = fadd double %35, %34
%37 = load double, double* %13
%38 = load double, double* %14
%39 = fmul double %26, %38
%40 = tail call double @llvm.fmuladd.f64(double %37, double %23, double %39)
%41 = load double, double* %15
%42 = fadd double %41, %40
%43 = load double, double* %18
%44 = getelementptr inbounds double, double* %18, i64 1
%45 = load double, double* %44
%46 = fmul double %36, %45
%47 = tail call double @llvm.fmuladd.f64(double %43, double %30, double %46)
%48 = fadd double %42, %47
%49 = fmul double %31, %45
%50 = tail call double @llvm.fmuladd.f64(double %21, double %43, double %49)
%51 = fadd double %37, %50
%52 = fmul double %32, %45
%53 = tail call double @llvm.fmuladd.f64(double %24, double %43, double %52)
%54 = fadd double %38, %53
%55 = fmul double %36, %36
%56 = tail call double @llvm.fmuladd.f64(double %30, double %30, double %55)
%57 = tail call double @llvm.fmuladd.f64(double %51, double %51, double %56)
%58 = tail call double @llvm.fmuladd.f64(double %54, double %54, double %57)
store double %58, double* %20
%59 = fmul double %48, %48
%60 = fdiv double %59, %58
store double %60, double* %19
%61 = load double, double* %20
%62 = tail call i32 @sqrt(double %61)
%63 = add i32 %62, 1
%64 = icmp ult i32 %63, 3
%65 = select i1 %64, i32 %62, i32 0
%66 = sitofp i32 %65 to double
store double %66, double* %20
%67 = getelementptr inbounds double, double* %19, i64 1
%68 = getelementptr inbounds double, double* %20, i64 1
%69 = getelementptr inbounds double, double* %18, i64 6
%70 = add nuw i32 %17, 1
%71 = icmp eq i32 %17, %4
br i1 %71, label %72, label %16
72: ; preds = %16, %5
ret void
}