#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 ro2cu(double *, double *, int);
int ro2cuLoop(double *ro, double *cu, unsigned long long n, int p) {
  int trash;
  unsigned long long i, iIn, iOut, rostep = 4, custep = 3;
#pragma omp parallel for default(shared) private(i, iIn, iOut, trash)          \
    firstprivate(rostep, custep) schedule(static)
  for (i = 0; i < n; i++) {
    iIn = i * rostep;
    iOut = i * custep;
    trash = ro2cu(&(ro[iIn]), &(cu[iOut]), p);
  }
  return 1;
}


x86 assembly (clang, -O0):
<ro2cuLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movq   $0x4,-0x40(%rbp)
movq   $0x3,-0x48(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    11a1 <ro2cuLoop+0x91>
mov    -0x28(%rbp),%rax
imul   -0x40(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
imul   -0x48(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x38(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x1c(%rbp),%edx
call   1030 <ro2cu@plt>
mov    %eax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    113f <ro2cuLoop+0x2f>
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ro2cuLoop>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdx,%rdx
je     114c <ro2cuLoop+0x3c>
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
call   1030 <ro2cu@plt>
add    $0x18,%rbp
add    $0x20,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <ro2cuLoop+0x20>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ro2cuLoop(double* %0, double* %1, i64 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
store double* %0, double** %5
store double* %1, double** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
store i64 4, i64* %13
store i64 3, i64* %14
store i64 0, i64* %10
br label %15
15: ; preds = %34, %4
%16 = load i64, i64* %10
%17 = load i64, i64* %7
%18 = icmp ult i64 %16, %17
br i1 %18, label %19, label %37
19: ; preds = %15
%20 = load i64, i64* %10
%21 = load i64, i64* %13
%22 = mul i64 %20, %21
store i64 %22, i64* %11
%23 = load i64, i64* %10
%24 = load i64, i64* %14
%25 = mul i64 %23, %24
store i64 %25, i64* %12
%26 = load double*, double** %5
%27 = load i64, i64* %11
%28 = getelementptr inbounds double, double* %26, i64 %27
%29 = load double*, double** %6
%30 = load i64, i64* %12
%31 = getelementptr inbounds double, double* %29, i64 %30
%32 = load i32, i32* %8
%33 = call i32 @ro2cu(double* %28, double* %31, i32 %32)
store i32 %33, i32* %9
br label %34
34: ; preds = %19
%35 = load i64, i64* %10
%36 = add i64 %35, 1
store i64 %36, i64* %10
br label %15
37: ; preds = %15
ret i32 1
}

LLVM IR (-O2):
define i32 @ro2cuLoop(double* %0, double* %1, i64 %2, i32 %3) {
%5 = icmp eq i64 %2, 0
br i1 %5, label %15, label %6
6: ; preds = %4, %6
%7 = phi i64 [ %13, %6 ], [ 0, %4 ]
%8 = shl i64 %7, 2
%9 = mul i64 %7, 3
%10 = getelementptr inbounds double, double* %0, i64 %8
%11 = getelementptr inbounds double, double* %1, i64 %9
%12 = tail call i32 @ro2cu(double* %10, double* %11, i32 %3)
%13 = add nuw i64 %7, 1
%14 = icmp eq i64 %13, %2
br i1 %14, label %15, label %6
15: ; preds = %6, %4
ret i32 1
}