#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 evalR0_0fs4d(double *pts, unsigned dim, double *p, const double *c,
                  const double *r1, const double *r2) {
  unsigned i;
  memcpy(pts, p, sizeof(double) * dim);
  pts += dim;
  for (i = 0; i < dim; i++) {
    p[i] = c[i] - r1[i];
    memcpy(pts, p, sizeof(double) * dim);
    pts += dim;
    p[i] = c[i] + r1[i];
    memcpy(pts, p, sizeof(double) * dim);
    pts += dim;
    p[i] = c[i] - r2[i];
    memcpy(pts, p, sizeof(double) * dim);
    pts += dim;
    p[i] = c[i] + r2[i];
    memcpy(pts, p, sizeof(double) * dim);
    pts += dim;
    p[i] = c[i];
  }
}


x86 assembly (clang, -O0):
<evalR0_0fs4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
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)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    12ca <evalR0_0fs4d+0x1ba>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%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    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%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    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%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    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%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    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1160 <evalR0_0fs4d+0x50>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalR0_0fs4d>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,%rbp
mov    %rcx,%r12
mov    %rdx,%r13
mov    %esi,%r15d
mov    %rdi,%rbx
lea    0x0(,%r15,8),%r14d
mov    %rdx,%rsi
mov    %r14d,%edx
call   1030 <memcpy@plt>
test   %r15d,%r15d
je     1260 <evalR0_0fs4d+0x150>
mov    %r15d,%eax
lea    0x0(,%rax,8),%rcx
mov    %rax,%rdx
shl    $0x5,%rdx
mov    %rdx,0x18(%rsp)
mov    %rcx,0x8(%rsp)
lea    (%rcx,%rcx,2),%rcx
mov    %rcx,0x10(%rsp)
shl    $0x4,%rax
mov    %rax,0x20(%rsp)
xor    %r15d,%r15d
mov    %rbp,0x28(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
movsd  (%r12,%r15,1),%xmm0
subsd  0x0(%rbp,%r15,1),%xmm0
movsd  %xmm0,0x0(%r13,%r15,1)
mov    %r13,%rsi
mov    %r14d,%edx
call   1030 <memcpy@plt>
mov    0x20(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
movsd  (%r12,%r15,1),%xmm0
addsd  0x0(%rbp,%r15,1),%xmm0
movsd  %xmm0,0x0(%r13,%r15,1)
mov    %r13,%rsi
mov    %r14d,%edx
call   1030 <memcpy@plt>
mov    0x10(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
movsd  (%r12,%r15,1),%xmm0
mov    %r12,%rbp
mov    %r14d,%r12d
mov    0x30(%rsp),%r14
subsd  (%r14,%r15,1),%xmm0
movsd  %xmm0,0x0(%r13,%r15,1)
mov    %r13,%rsi
mov    %r12d,%edx
call   1030 <memcpy@plt>
add    0x18(%rsp),%rbx
movsd  0x0(%rbp,%r15,1),%xmm0
addsd  (%r14,%r15,1),%xmm0
mov    %r12d,%r14d
mov    %rbp,%r12
mov    0x28(%rsp),%rbp
movsd  %xmm0,0x0(%r13,%r15,1)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   1030 <memcpy@plt>
movsd  (%r12,%r15,1),%xmm0
movsd  %xmm0,0x0(%r13,%r15,1)
add    $0x8,%r15
cmp    %r15,0x8(%rsp)
jne    1190 <evalR0_0fs4d+0x80>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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