#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_Rx(double *, double *, int, int);
void CCFD_Rxy(double *pH, double *ph, int l, int m, int l0, int m0) {
  int j, j0;
  int jl, j0l, j0l0;
  if (m0 == m) {
    for (j0 = 0, j0l = 0, j0l0 = 0; j0 < m0; j0++, j0l += l, j0l0 += l0)
      CCFD_Rx(pH + j0l0, ph + j0l, l, l0);
    return;
  }
  for (j0 = 0, j0l = 0, j0l0 = 0; j0 < m0 - 1; j0++, j0l += l, j0l0 += l0) {
    jl = j0l + j0l;
    CCFD_Rx(pH + j0l0, ph + jl, l, l0);
    CCFD_Rx(pH + j0l0, ph + jl + l, l, l0);
  }
  j = j0 + j0;
  jl = j0l + j0l;
  CCFD_Rx(pH + j0l0, ph + jl, l, l0);
  if (j < m - 1)
    CCFD_Rx(pH + j0l0, ph + jl + l, l, l0);
}


x86 assembly (clang, -O0):
<CCFD_Rxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    11a9 <CCFD_Rxy+0x99>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11a4 <CCFD_Rxy+0x94>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x30(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <CCFD_Rx@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    114f <CCFD_Rxy+0x3f>
jmp    12d5 <CCFD_Rxy+0x1c5>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1255 <CCFD_Rxy+0x145>
mov    -0x30(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <CCFD_Rx@plt>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <CCFD_Rx@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    11be <CCFD_Rxy+0xae>
mov    -0x28(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <CCFD_Rx@plt>
mov    -0x24(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12d5 <CCFD_Rxy+0x1c5>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <CCFD_Rx@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCFD_Rxy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%r12d
mov    %edx,%r13d
mov    %rsi,%rbp
mov    %rdi,%rbx
cmp    %ecx,%r9d
jne    1180 <CCFD_Rxy+0x70>
test   %r12d,%r12d
jle    12e3 <CCFD_Rxy+0x1d3>
movslq %r8d,%r15
movslq %r13d,%rax
shl    $0x3,%rax
mov    %rax,0x8(%rsp)
shl    $0x3,%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %r8d,%ecx
mov    %r13,%r14
mov    %r8d,%r13d
call   1030 <CCFD_Rx@plt>
mov    %r13d,%r8d
mov    %r14,%r13
add    0x8(%rsp),%rbp
add    %r15,%rbx
add    $0xffffffff,%r12d
jne    1150 <CCFD_Rxy+0x40>
jmp    12e3 <CCFD_Rxy+0x1d3>
mov    %ecx,%r14d
mov    %rbx,0x18(%rsp)
movslq %r13d,%rsi
cmp    $0x2,%r12d
mov    %rsi,0x28(%rsp)
jl     1286 <CCFD_Rxy+0x176>
mov    %r14d,0x10(%rsp)
lea    -0x1(%r12),%eax
movslq %r8d,%rcx
add    $0xffffffff,%r12d
mov    %r12,0x38(%rsp)
lea    0x0(%r13,%r13,1),%edx
mov    %edx,0x14(%rsp)
lea    0x0(,%rcx,8),%rdx
mov    %rdx,0x40(%rsp)
shl    $0x20,%rcx
mov    %rcx,0x48(%rsp)
xor    %edx,%edx
mov    %r8d,0x4(%rsp)
mov    %rax,0x30(%rsp)
mov    %eax,%r12d
mov    0x18(%rsp),%rbx
mov    %r13,0x20(%rsp)
xor    %r13d,%r13d
mov    %rbp,0x50(%rsp)
mov    0x20(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
add    0x48(%rsp),%rdx
mov    %rdx,0x8(%rsp)
movslq %r13d,%r13
lea    0x0(,%r13,8),%r14
add    %rbp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    0x4(%rsp),%ebp
mov    %ebp,%ecx
call   1030 <CCFD_Rx@plt>
mov    0x28(%rsp),%rax
lea    (%r14,%rax,8),%rsi
mov    %rbx,%rdi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    0x50(%rsp),%rbp
call   1030 <CCFD_Rx@plt>
mov    0x8(%rsp),%rdx
add    0x14(%rsp),%r13d
add    0x40(%rsp),%rbx
add    $0xffffffff,%r12d
jne    1200 <CCFD_Rxy+0xf0>
mov    0x38(%rsp),%rax
mov    0x20(%rsp),%r13
imul   %r13d,%eax
mov    0x30(%rsp),%r12
add    %r12d,%r12d
add    %eax,%eax
sar    $0x20,%rdx
cltq
mov    0x4(%rsp),%r8d
mov    0x10(%rsp),%r14d
jmp    128d <CCFD_Rxy+0x17d>
xor    %r12d,%r12d
xor    %eax,%eax
xor    %edx,%edx
mov    0x18(%rsp),%rcx
lea    (%rcx,%rdx,8),%r15
lea    0x0(%rbp,%rax,8),%rbp
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %r8d,%ecx
mov    %r8d,%ebx
call   1030 <CCFD_Rx@plt>
add    $0xffffffff,%r14d
cmp    %r14d,%r12d
jge    12e3 <CCFD_Rxy+0x1d3>
mov    %ebx,%ecx
mov    0x28(%rsp),%rax
lea    0x0(,%rax,8),%rsi
add    %rbp,%rsi
mov    %r15,%rdi
mov    %r13d,%edx
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <CCFD_Rx@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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