#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*/ memcpy(double *, double *, int);
void evalRR0_0fs(double *pts, unsigned dim, double *p, const double *c,
                 const double *r) {
  unsigned i, j;
  for (i = 0; i < dim - 1; ++i) {
    p[i] = c[i] - r[i];
    for (j = i + 1; j < dim; ++j) {
      p[j] = c[j] - r[j];
      memcpy(pts, p, sizeof(double) * dim);
      pts += dim;
      p[i] = c[i] + r[i];
      memcpy(pts, p, sizeof(double) * dim);
      pts += dim;
      p[j] = c[j] + r[j];
      memcpy(pts, p, sizeof(double) * dim);
      pts += dim;
      p[i] = c[i] - r[i];
      memcpy(pts, p, sizeof(double) * dim);
      pts += dim;
      p[j] = c[j];
    }
    p[i] = c[i];
  }
}


x86 assembly (clang, -O0):
<evalRR0_0fs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    1300 <evalRR0_0fs+0x1f0>
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    12da <evalRR0_0fs+0x1ca>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1170 <evalRR0_0fs+0x60>
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1132 <evalRR0_0fs+0x22>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalRR0_0fs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbp
mov    %esi,%edi
add    $0xffffffff,%edi
je     12d2 <evalRR0_0fs+0x1c2>
mov    %rdx,%r13
mov    %esi,%edx
shl    $0x3,%esi
mov    %edi,%r10d
mov    %rdx,%rdi
shl    $0x5,%rdi
mov    %rdi,0x28(%rsp)
lea    0x0(,%rdx,8),%r9
mov    $0x1,%r14d
xor    %edi,%edi
mov    %rdx,0x48(%rsp)
mov    %r10,0x30(%rsp)
mov    %r9,0x8(%rsp)
mov    %r8,0x18(%rsp)
mov    %rcx,(%rsp)
mov    %esi,0x14(%rsp)
mov    0x14(%rsp),%r15d
jmp    119c <evalRR0_0fs+0x8c>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rcx,%rdi,8),%xmm0
movsd  %xmm0,0x0(%r13,%rdi,8)
add    $0x1,%r14
mov    %rbx,%rdi
cmp    %r10,%rbx
je     12d2 <evalRR0_0fs+0x1c2>
movsd  (%rcx,%rdi,8),%xmm0
subsd  (%r8,%rdi,8),%xmm0
movsd  %xmm0,0x0(%r13,%rdi,8)
lea    0x1(%rdi),%rbx
cmp    %rdx,%rbx
jae    1180 <evalRR0_0fs+0x70>
mov    %rbx,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rdi,0x20(%rsp)
cs nopw 0x0(%rax,%rax,1)
movsd  (%rcx,%r14,8),%xmm0
mov    0x18(%rsp),%rbx
subsd  (%rbx,%r14,8),%xmm0
movsd  %xmm0,0x0(%r13,%r14,8)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
mov    0x20(%rsp),%r12
mov    (%rsp),%rax
movsd  (%rax,%r12,8),%xmm0
addsd  (%rbx,%r12,8),%xmm0
movsd  %xmm0,0x0(%r13,%r12,8)
mov    %rbp,0x50(%rsp)
mov    0x8(%rsp),%rax
add    %rax,%rbp
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
addsd  (%rbx,%r14,8),%xmm0
movsd  %xmm0,0x0(%r13,%r14,8)
add    0x8(%rsp),%rbp
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
movsd  (%rax,%r12,8),%xmm0
subsd  (%rbx,%r12,8),%xmm0
movsd  %xmm0,0x0(%r13,%r12,8)
mov    0x8(%rsp),%rbx
add    %rbx,%rbp
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
mov    0x48(%rsp),%rdx
mov    (%rsp),%rcx
movsd  (%rcx,%r14,8),%xmm0
movsd  %xmm0,0x0(%r13,%r14,8)
add    $0x1,%r14
add    %rbx,%rbp
cmp    %r14d,%edx
jne    11d0 <evalRR0_0fs+0xc0>
mov    0x50(%rsp),%rbp
add    0x28(%rsp),%rbp
mov    0x18(%rsp),%r8
mov    0x30(%rsp),%r10
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%rbx
mov    0x20(%rsp),%rdi
jmp    1180 <evalRR0_0fs+0x70>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @evalRR0_0fs(double* %0, i32 %1, double* %2, double* nocapture %3, double* nocapture %4) {
%6 = add i32 %1, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %59, label %8
8: ; preds = %5
%9 = zext i32 %1 to i64
%10 = shl i32 %1, 3
%11 = zext i32 %6 to i64
br label %12
12: ; preds = %8, %54
%13 = phi i64 [ 0, %8 ], [ %22, %54 ]
%14 = phi i64 [ 1, %8 ], [ %57, %54 ]
%15 = phi double* [ %0, %8 ], [ %55, %54 ]
%16 = getelementptr inbounds double, double* %3, i64 %13
%17 = load double, double* %16
%18 = getelementptr inbounds double, double* %4, i64 %13
%19 = load double, double* %18
%20 = fsub double %17, %19
%21 = getelementptr inbounds double, double* %2, i64 %13
store double %20, double* %21
%22 = add nuw nsw i64 %13, 1
%23 = icmp ult i64 %22, %9
br i1 %23, label %24, label %54
24: ; preds = %12, %24
%25 = phi i64 [ %51, %24 ], [ %14, %12 ]
%26 = phi double* [ %49, %24 ], [ %15, %12 ]
%27 = getelementptr inbounds double, double* %3, i64 %25
%28 = load double, double* %27
%29 = getelementptr inbounds double, double* %4, i64 %25
%30 = load double, double* %29
%31 = fsub double %28, %30
%32 = getelementptr inbounds double, double* %2, i64 %25
store double %31, double* %32
%33 = tail call i32 @memcpy(double* %26, double* %2, i32 %10)
%34 = getelementptr inbounds double, double* %26, i64 %9
%35 = load double, double* %16
%36 = load double, double* %18
%37 = fadd double %35, %36
store double %37, double* %21
%38 = tail call i32 @memcpy(double* %34, double* %2, i32 %10)
%39 = getelementptr inbounds double, double* %34, i64 %9
%40 = load double, double* %27
%41 = load double, double* %29
%42 = fadd double %40, %41
store double %42, double* %32
%43 = tail call i32 @memcpy(double* %39, double* %2, i32 %10)
%44 = getelementptr inbounds double, double* %39, i64 %9
%45 = load double, double* %16
%46 = load double, double* %18
%47 = fsub double %45, %46
store double %47, double* %21
%48 = tail call i32 @memcpy(double* %44, double* %2, i32 %10)
%49 = getelementptr inbounds double, double* %44, i64 %9
%50 = load double, double* %27
store double %50, double* %32
%51 = add nuw nsw i64 %25, 1
%52 = trunc i64 %51 to i32
%53 = icmp eq i32 %52, %1
br i1 %53, label %54, label %24
54: ; preds = %24, %12
%55 = phi double* [ %15, %12 ], [ %49, %24 ]
%56 = load double, double* %16
store double %56, double* %21
%57 = add nuw nsw i64 %14, 1
%58 = icmp eq i64 %22, %11
br i1 %58, label %59, label %12
59: ; preds = %54, %5
ret void
}