#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*/ rtranspose(double *, int, int, double *, int, int);
int /*<<< orphan*/ stranspose(double *, int, int, double *);
void ctranspose(double *sig, int rows, int cols, double *col) {
  int r, c;
  int block;
  block = (int)64;
  r = rows;
  c = cols;
  if (rows >= block || cols >= block) {
    rtranspose(sig, rows, cols, col, r, c);
  } else {
    stranspose(sig, rows, cols, col);
  }
}


x86 assembly (clang, -O0):
<ctranspose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x40,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1161 <ctranspose+0x41>
mov    -0x10(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     1181 <ctranspose+0x61>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <rtranspose@plt>
jmp    1194 <ctranspose+0x74>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <stranspose@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctranspose>:
cmp    $0x3f,%esi
jg     112f <ctranspose+0xf>
cmp    $0x40,%edx
jge    112f <ctranspose+0xf>
jmp    1040 <stranspose@plt>
mov    %esi,%r8d
mov    %edx,%r9d
jmp    1030 <rtranspose@plt>

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

LLVM IR (-O2):
define void @ctranspose(double* %0, i32 %1, i32 %2, double* %3) {
%5 = icmp sgt i32 %1, 63
%6 = icmp sgt i32 %2, 63
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @rtranspose(double* %0, i32 %1, i32 %2, double* %3, i32 %1, i32 %2)
br label %12
10: ; preds = %4
%11 = tail call i32 @stranspose(double* %0, i32 %1, i32 %2, double* %3)
br label %12
12: ; preds = %10, %8
ret void
}