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


x86 assembly (clang, -O0):
<CCFD_Pxyz>:
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_Pxyz+0xbb>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    11c6 <CCFD_Pxyz+0xb6>
mov    -0x8(%rbp),%rdi
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x3c(%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_Pxy@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_Pxyz+0x59>
jmp    131c <CCFD_Pxyz+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_Pxyz+0x177>
mov    -0x38(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x3c(%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_Pxy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x3c(%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_Pxy@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_Pxyz+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 -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x3c(%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_Pxy@plt>
mov    -0x2c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1317 <CCFD_Pxyz+0x207>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x3c(%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_Pxy@plt>
jmp    131c <CCFD_Pxyz+0x20c>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCFD_Pxyz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r10d
mov    %ecx,%r14d
mov    %rdi,%rbp
mov    0xb8(%rsp),%ebx
mov    0xb0(%rsp),%r15d
mov    %ecx,%edi
imul   %edx,%edi
mov    %r15d,%eax
imul   %r9d,%eax
cmp    %r8d,%ebx
jne    11af <CCFD_Pxyz+0x9f>
test   %ebx,%ebx
jle    134e <CCFD_Pxyz+0x23e>
cltq
movslq %edi,%rdi
shl    $0x3,%rdi
mov    %rdi,0x30(%rsp)
shl    $0x3,%rax
mov    %rax,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,0x10(%rsp)
mov    %rbp,%rdi
mov    %rsi,%r12
mov    %edx,%ebx
mov    %r14d,%ecx
mov    %r10d,%r8d
mov    %r10d,%r13d
mov    %r15d,%r9d
call   1030 <CCFD_Pxy@plt>
mov    %ebx,%edx
mov    %r13d,%r10d
mov    0x10(%rsp),%rbx
mov    %r12,%rsi
add    0x30(%rsp),%rbp
add    0x8(%rsp),%rsi
add    $0xffffffff,%ebx
jne    1170 <CCFD_Pxyz+0x60>
jmp    134e <CCFD_Pxyz+0x23e>
mov    %r8d,%r12d
mov    %r15d,0x8(%rsp)
mov    %edx,0x24(%rsp)
movslq %edi,%rdx
mov    %rdx,0x48(%rsp)
cmp    $0x2,%ebx
jl     12d9 <CCFD_Pxyz+0x1c9>
mov    %r12d,0x3c(%rsp)
lea    -0x1(%rbx),%edx
cltq
add    $0xffffffff,%ebx
mov    %rbx,0x10(%rsp)
mov    %rdi,0x50(%rsp)
add    %edi,%edi
mov    %edi,0x40(%rsp)
lea    0x0(,%rax,8),%rdi
mov    %rdi,0x60(%rsp)
shl    $0x20,%rax
mov    %rax,0x68(%rsp)
xor    %edi,%edi
mov    %rdx,0x28(%rsp)
mov    %edx,%eax
mov    %rsi,0x58(%rsp)
mov    %rsi,%rbx
mov    %r10d,0x20(%rsp)
mov    %r14d,0x1c(%rsp)
xor    %r12d,%r12d
mov    %rbp,0x70(%rsp)
mov    0x24(%rsp),%r14d
mov    0x1c(%rsp),%r13d
nopl   0x0(%rax)
mov    %eax,0x44(%rsp)
add    0x68(%rsp),%rdi
mov    %rdi,0x30(%rsp)
movslq %r12d,%r12
lea    0x0(,%r12,8),%r15
add    %rbp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    0x20(%rsp),%ebp
mov    %ebp,%r8d
mov    0x8(%rsp),%r9d
call   1030 <CCFD_Pxy@plt>
mov    0x48(%rsp),%rax
lea    (%r15,%rax,8),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    %ebp,%r8d
mov    0x70(%rsp),%rbp
mov    0x8(%rsp),%r9d
call   1030 <CCFD_Pxy@plt>
mov    0x44(%rsp),%eax
mov    0x30(%rsp),%rdi
add    0x40(%rsp),%r12d
add    0x60(%rsp),%rbx
add    $0xffffffff,%eax
jne    1230 <CCFD_Pxyz+0x120>
mov    0x10(%rsp),%rax
imul   0x50(%rsp),%eax
mov    0x28(%rsp),%rcx
add    %ecx,%ecx
mov    %rcx,0x28(%rsp)
add    %eax,%eax
cltq
sar    $0x20,%rdi
mov    0x20(%rsp),%r10d
mov    0x1c(%rsp),%r14d
mov    0x58(%rsp),%rsi
mov    0x3c(%rsp),%r12d
jmp    12e4 <CCFD_Pxyz+0x1d4>
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %eax,%eax
xor    %edi,%edi
lea    0x0(,%rax,8),%r15
add    %rbp,%r15
lea    (%rsi,%rdi,8),%rsi
mov    %r15,%rdi
mov    %rsi,0x10(%rsp)
mov    0x24(%rsp),%ebx
mov    %ebx,%edx
mov    %r14d,%ecx
mov    %r10d,%r8d
mov    0x8(%rsp),%r13d
mov    %r10d,%ebp
mov    %r13d,%r9d
call   1030 <CCFD_Pxy@plt>
add    $0xffffffff,%r12d
cmp    %r12d,0x28(%rsp)
jge    134e <CCFD_Pxyz+0x23e>
mov    %ebp,%r8d
mov    0x48(%rsp),%rax
lea    (%r15,%rax,8),%rdi
mov    0x10(%rsp),%rsi
mov    %ebx,%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_Pxy@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @CCFD_Pxyz(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* %22
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
%43 = load double*, double** %10
%44 = load i32, i32* %23
%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_Pxy(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* %21
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
%76 = load double*, double** %10
%77 = load i32, i32* %23
%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_Pxy(double* %75, double* %79, i32 %80, i32 %81, i32 %82, i32 %83)
%85 = load double*, double** %9
%86 = load i32, i32* %21
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
%89 = load i32, i32* %17
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
%92 = load double*, double** %10
%93 = load i32, i32* %23
%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_Pxy(double* %91, 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* %21
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
%121 = load double*, double** %10
%122 = load i32, i32* %23
%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_Pxy(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* %21
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %135, i64 %137
%139 = load i32, i32* %17
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %138, i64 %140
%142 = load double*, double** %10
%143 = load i32, i32* %23
%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_Pxy(double* %141, 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_Pxyz(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 %25
%29 = getelementptr inbounds double, double* %1, i64 %26
%30 = tail call i32 @CCFD_Pxy(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 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %0, i64 %41
%43 = getelementptr inbounds double, double* %1, i64 %37
%44 = tail call i32 @CCFD_Pxy(double* %42, double* %43, i32 %2, i32 %3, i32 %5, i32 %6)
%45 = getelementptr inbounds double, double* %42, i64 %16
%46 = tail call i32 @CCFD_Pxy(double* %45, double* %43, 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 = sext i32 %54 to i64
%56 = shl i64 %49, 32
%57 = ashr exact i64 %56, 32
br label %58
58: ; preds = %51, %12
%59 = phi i32 [ 0, %12 ], [ %53, %51 ]
%60 = phi i64 [ 0, %12 ], [ %55, %51 ]
%61 = phi i64 [ 0, %12 ], [ %57, %51 ]
%62 = getelementptr inbounds double, double* %0, i64 %60
%63 = getelementptr inbounds double, double* %1, i64 %61
%64 = tail call i32 @CCFD_Pxy(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* %62, i64 %68
%70 = tail call i32 @CCFD_Pxy(double* %69, double* %63, i32 %2, i32 %3, i32 %5, i32 %6)
br label %71
71: ; preds = %24, %19, %58, %67
ret void
}