#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 fabs(double);
void CSHIFT(double *XA, double *XB, double XMA, double XMB, double *XL,
            double BOXH, double BOXL) {
  long I;
  XL[0] = XMA - XMB;
  XL[1] = XMA - XB[0];
  XL[2] = XMA - XB[2];
  XL[3] = XA[0] - XMB;
  XL[4] = XA[2] - XMB;
  XL[5] = XA[0] - XB[0];
  XL[6] = XA[0] - XB[2];
  XL[7] = XA[2] - XB[0];
  XL[8] = XA[2] - XB[2];
  XL[9] = XA[1] - XB[1];
  XL[10] = XA[1] - XB[0];
  XL[11] = XA[1] - XB[2];
  XL[12] = XA[0] - XB[1];
  XL[13] = XA[2] - XB[1];
  for (I = 0; I < 14; I++) {
    if (fabs(XL[I]) > BOXH) {
      XL[I] = XL[I] - ((XL[I] < 0) ? ((BOXL < 0) ? BOXL : -BOXL)
                                   : ((BOXL < 0) ? -BOXL : BOXL));
    }
  }
}


x86 assembly (clang, -O0):
<CSHIFT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movq   $0x0,-0x40(%rbp)
cmpq   $0xe,-0x40(%rbp)
jge    13a1 <CSHIFT+0x2a1>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd5c(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    138b <CSHIFT+0x28b>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1328 <CSHIFT+0x228>
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    12f8 <CSHIFT+0x1f8>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1319 <CSHIFT+0x219>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1370 <CSHIFT+0x270>
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    135c <CSHIFT+0x25c>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1366 <CSHIFT+0x266>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1390 <CSHIFT+0x290>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1285 <CSHIFT+0x185>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSHIFT>:
movapd %xmm0,%xmm4
subsd  %xmm1,%xmm4
movsd  %xmm4,(%rdx)
movapd %xmm0,%xmm5
subsd  (%rsi),%xmm5
movsd  %xmm5,0x8(%rdx)
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
movsd  (%rdi),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rdx)
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,0x28(%rdx)
movsd  (%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x30(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,0x38(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x40(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x48(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,0x50(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x58(%rdx)
movsd  (%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x60(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x68(%rdx)
xorpd  %xmm0,%xmm0
ucomisd %xmm3,%xmm0
movapd 0xe31(%rip),%xmm6
xorpd  %xmm3,%xmm6
movapd %xmm6,%xmm1
ja     11dd <CSHIFT+0xdd>
movapd %xmm3,%xmm1
movapd %xmm3,%xmm5
cmpltsd %xmm0,%xmm5
andpd  %xmm5,%xmm3
andnpd %xmm6,%xmm5
orpd   %xmm3,%xmm5
mov    $0x2,%eax
movapd 0xe11(%rip),%xmm3
nop
movapd %xmm4,%xmm6
andpd  %xmm3,%xmm6
ucomisd %xmm2,%xmm6
jbe    1231 <CSHIFT+0x131>
movapd %xmm4,%xmm6
cmpltsd %xmm0,%xmm6
movapd %xmm6,%xmm7
andpd  %xmm5,%xmm7
andnpd %xmm1,%xmm6
orpd   %xmm7,%xmm6
subsd  %xmm6,%xmm4
movsd  %xmm4,-0x10(%rdx,%rax,8)
movsd  -0x8(%rdx,%rax,8),%xmm4
movapd %xmm4,%xmm6
andpd  %xmm3,%xmm6
ucomisd %xmm2,%xmm6
jbe    1268 <CSHIFT+0x168>
movapd %xmm4,%xmm6
cmpltsd %xmm0,%xmm6
movapd %xmm6,%xmm7
andpd  %xmm5,%xmm7
andnpd %xmm1,%xmm6
orpd   %xmm7,%xmm6
subsd  %xmm6,%xmm4
movsd  %xmm4,-0x8(%rdx,%rax,8)
cmp    $0xe,%rax
je     1279 <CSHIFT+0x179>
movsd  (%rdx,%rax,8),%xmm4
add    $0x2,%rax
jmp    1200 <CSHIFT+0x100>
ret

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

LLVM IR (-O2):
define void @CSHIFT(double* nocapture %0, double* nocapture %1, double %2, double %3, double* nocapture %4, double %5, double %6) {
%8 = fsub double %2, %3
store double %8, double* %4
%9 = load double, double* %1
%10 = fsub double %2, %9
%11 = getelementptr inbounds double, double* %4, i64 1
store double %10, double* %11
%12 = getelementptr inbounds double, double* %1, i64 2
%13 = load double, double* %12
%14 = fsub double %2, %13
%15 = getelementptr inbounds double, double* %4, i64 2
store double %14, double* %15
%16 = load double, double* %0
%17 = fsub double %16, %3
%18 = getelementptr inbounds double, double* %4, i64 3
store double %17, double* %18
%19 = getelementptr inbounds double, double* %0, i64 2
%20 = load double, double* %19
%21 = fsub double %20, %3
%22 = getelementptr inbounds double, double* %4, i64 4
store double %21, double* %22
%23 = load double, double* %0
%24 = load double, double* %1
%25 = fsub double %23, %24
%26 = getelementptr inbounds double, double* %4, i64 5
store double %25, double* %26
%27 = load double, double* %0
%28 = load double, double* %12
%29 = fsub double %27, %28
%30 = getelementptr inbounds double, double* %4, i64 6
store double %29, double* %30
%31 = load double, double* %19
%32 = load double, double* %1
%33 = fsub double %31, %32
%34 = getelementptr inbounds double, double* %4, i64 7
store double %33, double* %34
%35 = load double, double* %19
%36 = load double, double* %12
%37 = fsub double %35, %36
%38 = getelementptr inbounds double, double* %4, i64 8
store double %37, double* %38
%39 = getelementptr inbounds double, double* %0, i64 1
%40 = load double, double* %39
%41 = getelementptr inbounds double, double* %1, i64 1
%42 = load double, double* %41
%43 = fsub double %40, %42
%44 = getelementptr inbounds double, double* %4, i64 9
store double %43, double* %44
%45 = load double, double* %39
%46 = load double, double* %1
%47 = fsub double %45, %46
%48 = getelementptr inbounds double, double* %4, i64 10
store double %47, double* %48
%49 = load double, double* %39
%50 = load double, double* %12
%51 = fsub double %49, %50
%52 = getelementptr inbounds double, double* %4, i64 11
store double %51, double* %52
%53 = load double, double* %0
%54 = load double, double* %41
%55 = fsub double %53, %54
%56 = getelementptr inbounds double, double* %4, i64 12
store double %55, double* %56
%57 = load double, double* %19
%58 = load double, double* %41
%59 = fsub double %57, %58
%60 = getelementptr inbounds double, double* %4, i64 13
store double %59, double* %60
%61 = fcmp olt double %6, 0.000000e+00
%62 = fneg double %6
%63 = select i1 %61, double %62, double %6
%64 = select i1 %61, double %6, double %62
br label %65
65: ; preds = %89, %7
%66 = phi double [ %8, %7 ], [ %91, %89 ]
%67 = phi i64 [ 0, %7 ], [ %87, %89 ]
%68 = tail call double @llvm.fabs.f64(double %66)
%69 = fcmp ogt double %68, %5
br i1 %69, label %70, label %75
70: ; preds = %65
%71 = getelementptr inbounds double, double* %4, i64 %67
%72 = fcmp olt double %66, 0.000000e+00
%73 = select i1 %72, double %64, double %63
%74 = fsub double %66, %73
store double %74, double* %71
br label %75
75: ; preds = %65, %70
%76 = or i64 %67, 1
%77 = getelementptr inbounds double, double* %4, i64 %76
%78 = load double, double* %77
%79 = tail call double @llvm.fabs.f64(double %78)
%80 = fcmp ogt double %79, %5
br i1 %80, label %81, label %86
81: ; preds = %75
%82 = getelementptr inbounds double, double* %4, i64 %76
%83 = fcmp olt double %78, 0.000000e+00
%84 = select i1 %83, double %64, double %63
%85 = fsub double %78, %84
store double %85, double* %82
br label %86
86: ; preds = %81, %75
%87 = add nuw nsw i64 %67, 2
%88 = icmp eq i64 %87, 14
br i1 %88, label %92, label %89
89: ; preds = %86
%90 = getelementptr inbounds double, double* %4, i64 %87
%91 = load double, double* %90
br label %65
92: ; preds = %86
ret void
}