#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*/ CCFD_Rxy(double *, double *, int, int, int, int);
void CCFD_Rxyz(double *pH, double *ph, int l, int m, int n, int l0, int m0,
               int n0) {
  int lm, l0m0;
  int k, k0;
  int klm, k0lm, k0l0m0;
  lm = l * m;
  l0m0 = l0 * m0;
  if (n0 == n) {
    for (k0 = 0, k0lm = 0, k0l0m0 = 0; k0 < n0;
         k0++, k0lm += lm, k0l0m0 += l0m0)
      CCFD_Rxy(pH + k0l0m0, ph + k0lm, l, m, l0, m0);
    return;
  }
  for (k0 = 0, k0lm = 0, k0l0m0 = 0; k0 < n0 - 1;
       k0++, k0lm += lm, k0l0m0 += l0m0) {
    klm = k0lm + k0lm;
    CCFD_Rxy(pH + k0l0m0, ph + klm, l, m, l0, m0);
    CCFD_Rxy(pH + k0l0m0, ph + klm + lm, l, m, l0, m0);
  }
  k = k0 + k0;
  klm = k0lm + k0lm;
  CCFD_Rxy(pH + k0l0m0, ph + klm, l, m, l0, m0);
  if (k < n - 1)
    CCFD_Rxy(pH + k0l0m0, ph + klm + lm, l, m, l0, m0);
  return;
}


x86 assembly (clang, -O0):
<CCFD_Rxyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
imul   0x10(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11cb <CCFD_Rxyz+0xbb>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    11c6 <CCFD_Rxyz+0xb6>
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    1169 <CCFD_Rxyz+0x59>
jmp    131c <CCFD_Rxyz+0x20c>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
mov    0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1287 <CCFD_Rxyz+0x177>
mov    -0x38(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    11e0 <CCFD_Rxyz+0xd0>
mov    -0x30(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x38(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    -0x2c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1317 <CCFD_Rxyz+0x207>
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1030 <CCFD_Rxy@plt>
jmp    131c <CCFD_Rxyz+0x20c>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCFD_Rxyz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%eax
mov    %r8d,%r12d
mov    %ecx,%r14d
mov    %rsi,%rbx
mov    0xb8(%rsp),%esi
mov    0xb0(%rsp),%r15d
mov    %ecx,%r8d
imul   %edx,%r8d
mov    %r15d,%ebp
imul   %r9d,%ebp
cmp    %r12d,%esi
jne    11af <CCFD_Rxyz+0x9f>
test   %esi,%esi
jle    133f <CCFD_Rxyz+0x22f>
movslq %ebp,%r10
movslq %r8d,%rbp
shl    $0x3,%rbp
mov    %rbp,0x30(%rsp)
shl    $0x3,%r10
mov    %r10,0x8(%rsp)
nopl   0x0(%rax)
mov    %rsi,0x10(%rsp)
mov    %rdi,%r12
mov    %rbx,%rsi
mov    %edx,%ebp
mov    %r14d,%ecx
mov    %eax,%r8d
mov    %eax,%r13d
mov    %r15d,%r9d
call   1030 <CCFD_Rxy@plt>
mov    %ebp,%edx
mov    %r13d,%eax
mov    0x10(%rsp),%rsi
mov    %r12,%rdi
add    0x30(%rsp),%rbx
add    0x8(%rsp),%rdi
add    $0xffffffff,%esi
jne    1170 <CCFD_Rxyz+0x60>
jmp    133f <CCFD_Rxyz+0x22f>
mov    %r15d,0x8(%rsp)
mov    %edx,0x24(%rsp)
movslq %r8d,%rdx
mov    %rdx,0x48(%rsp)
cmp    $0x2,%esi
jl     12d2 <CCFD_Rxyz+0x1c2>
mov    %r12d,0x3c(%rsp)
lea    -0x1(%rsi),%edx
movslq %ebp,%rbp
add    $0xffffffff,%esi
mov    %rsi,0x10(%rsp)
mov    %r8,0x50(%rsp)
lea    (%r8,%r8,1),%esi
mov    %esi,0x40(%rsp)
lea    0x0(,%rbp,8),%rsi
mov    %rsi,0x60(%rsp)
shl    $0x20,%rbp
mov    %rbp,0x68(%rsp)
xor    %esi,%esi
mov    %eax,0x20(%rsp)
mov    %r14d,0x1c(%rsp)
mov    %rdx,0x28(%rsp)
mov    %edx,%eax
mov    %rdi,0x58(%rsp)
mov    %rdi,%rbp
xor    %r14d,%r14d
mov    %rbx,0x70(%rsp)
mov    0x24(%rsp),%r12d
mov    0x1c(%rsp),%r13d
nopl   0x0(%rax,%rax,1)
mov    %eax,0x44(%rsp)
add    0x68(%rsp),%rsi
mov    %rsi,0x30(%rsp)
movslq %r14d,%r14
lea    (%rbx,%r14,8),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    %r13d,%ecx
mov    0x20(%rsp),%ebx
mov    %ebx,%r8d
mov    0x8(%rsp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    0x48(%rsp),%rax
lea    (%r15,%rax,8),%rsi
mov    %rbp,%rdi
mov    %r12d,%edx
mov    %r13d,%ecx
mov    %ebx,%r8d
mov    0x70(%rsp),%rbx
mov    0x8(%rsp),%r9d
call   1030 <CCFD_Rxy@plt>
mov    0x44(%rsp),%eax
mov    0x30(%rsp),%rsi
add    0x40(%rsp),%r14d
add    0x60(%rsp),%rbp
add    $0xffffffff,%eax
jne    1230 <CCFD_Rxyz+0x120>
mov    0x10(%rsp),%rax
imul   0x50(%rsp),%eax
mov    0x28(%rsp),%rcx
add    %ecx,%ecx
mov    %rcx,0x28(%rsp)
add    %eax,%eax
sar    $0x20,%rsi
movslq %eax,%rdx
mov    0x20(%rsp),%eax
mov    0x1c(%rsp),%r14d
mov    0x58(%rsp),%rdi
mov    0x3c(%rsp),%r12d
jmp    12dd <CCFD_Rxyz+0x1cd>
xor    %edx,%edx
mov    %rdx,0x28(%rsp)
xor    %edx,%edx
xor    %esi,%esi
lea    (%rdi,%rsi,8),%rdi
lea    (%rbx,%rdx,8),%r15
mov    %rdi,0x10(%rsp)
mov    %r15,%rsi
mov    0x24(%rsp),%ebp
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %eax,%r8d
mov    0x8(%rsp),%r13d
mov    %eax,%ebx
mov    %r13d,%r9d
call   1030 <CCFD_Rxy@plt>
add    $0xffffffff,%r12d
cmp    %r12d,0x28(%rsp)
jge    133f <CCFD_Rxyz+0x22f>
mov    %ebx,%r8d
mov    0x48(%rsp),%rax
lea    (%r15,%rax,8),%rsi
mov    0x10(%rsp),%rdi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %r13d,%r9d
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <CCFD_Rxy@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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