#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*/ NPdtranspose(int, int, double *, double *);
void NPdtranspose_021(int *shape, double *a, double *at) {
#pragma omp parallel default(none) shared(shape, a, at)
  {
    int ic;
    size_t nm = shape[1] * shape[2];
#pragma omp for schedule(static)
    for (ic = 0; ic < shape[0]; ic++) {
      NPdtranspose(shape[1], shape[2], a + ic * nm, at + ic * nm);
    }
  }
}


x86 assembly (clang, -O0):
<NPdtranspose_021>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
imul   0x8(%rcx),%eax
cltq
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1198 <NPdtranspose_021+0x88>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    -0x10(%rbp),%rdx
movslq -0x1c(%rbp),%rax
imul   -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rax
imul   -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
call   1030 <NPdtranspose@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1140 <NPdtranspose_021+0x30>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NPdtranspose_021>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmpl   $0x0,(%rdi)
jle    1185 <NPdtranspose_021+0x75>
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r14
mov    0x4(%rdi),%ebp
mov    0x8(%rdi),%ebx
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1030 <NPdtranspose@plt>
cmpl   $0x2,(%r14)
jl     1185 <NPdtranspose_021+0x75>
imul   %ebp,%ebx
movslq %ebx,%r13
lea    (%r15,%r13,8),%r15
lea    (%r12,%r13,8),%rbx
shl    $0x3,%r13
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    0x4(%r14),%edi
mov    0x8(%r14),%esi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1030 <NPdtranspose@plt>
add    $0x1,%rbp
movslq (%r14),%rax
add    %r13,%r15
add    %r13,%rbx
cmp    %rax,%rbp
jl     1160 <NPdtranspose_021+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @NPdtranspose_021(i32* nocapture %0, double* %1, double* %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, %5
%9 = sext i32 %8 to i64
%10 = load i32, i32* %0
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %3
%13 = tail call i32 @NPdtranspose(i32 %5, i32 %7, double* %1, double* %2)
%14 = load i32, i32* %0
%15 = icmp sgt i32 %14, 1
br i1 %15, label %16, label %28
16: ; preds = %12, %16
%17 = phi i64 [ %24, %16 ], [ 1, %12 ]
%18 = load i32, i32* %4
%19 = load i32, i32* %6
%20 = mul nsw i64 %17, %9
%21 = getelementptr inbounds double, double* %1, i64 %20
%22 = getelementptr inbounds double, double* %2, i64 %20
%23 = tail call i32 @NPdtranspose(i32 %18, i32 %19, double* %21, double* %22)
%24 = add nuw nsw i64 %17, 1
%25 = load i32, i32* %0
%26 = sext i32 %25 to i64
%27 = icmp slt i64 %24, %26
br i1 %27, label %16, label %28
28: ; preds = %16, %12, %3
ret void
}