#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*/ copy1c_dvector(double *, long, double *, long, long);
void copy1c_dmatrix(double **X, long nc, double **Y, long nrl, long nrh,
                    long ncl, long nch) {
  int i;
  for (i = nrl; i <= nrh; i++) {
    copy1c_dvector(X[i], nc, Y[i], ncl, nch);
  }
}


x86 assembly (clang, -O0):
<copy1c_dmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
cmp    -0x28(%rbp),%rax
jg     1180 <copy1c_dmatrix+0x70>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1030 <copy1c_dvector@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    113b <copy1c_dmatrix+0x2b>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy1c_dmatrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movslq %ecx,%rbp
cmp    %r8,%rbp
jg     1161 <copy1c_dmatrix+0x51>
mov    %r9,%r14
mov    %r8,%r13
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%rbp,8),%rdi
mov    (%r15,%rbp,8),%rdx
mov    %r12,%rsi
mov    %r14,%rcx
mov    0x40(%rsp),%r8
call   1030 <copy1c_dvector@plt>
add    $0x1,%rbp
cmp    %r13,%rbp
jle    1140 <copy1c_dmatrix+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @copy1c_dmatrix(double** nocapture %0, i64 %1, double** nocapture %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = shl i64 %3, 32
%9 = ashr exact i64 %8, 32
%10 = icmp sgt i64 %9, %4
br i1 %10, label %20, label %11
11: ; preds = %7, %11
%12 = phi i64 [ %18, %11 ], [ %9, %7 ]
%13 = getelementptr inbounds double*, double** %0, i64 %12
%14 = load double*, double** %13
%15 = getelementptr inbounds double*, double** %2, i64 %12
%16 = load double*, double** %15
%17 = tail call i32 @copy1c_dvector(double* %14, i64 %1, double* %16, i64 %5, i64 %6)
%18 = add i64 %12, 1
%19 = icmp sgt i64 %18, %4
br i1 %19, label %20, label %11
20: ; preds = %11, %7
ret void
}