#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;
  r = rows;
  c = cols;
  if (rows >= 64 || cols >= 64) {
    rtranspose(sig, rows, cols, col, r, c);
  } else {
    stranspose(sig, rows, cols, col);
  }
}


x86 assembly (clang, -O0):
<ctranspose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1156 <ctranspose+0x36>
cmpl   $0x40,-0x10(%rbp)
jl     1176 <ctranspose+0x56>
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    1189 <ctranspose+0x69>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <stranspose@plt>
add    $0x20,%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
store double* %0, double** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%11 = load i32, i32* %6
store i32 %11, i32* %9
%12 = load i32, i32* %7
store i32 %12, i32* %10
%13 = load i32, i32* %6
%14 = icmp sge i32 %13, 64
br i1 %14, label %18, label %15
15: ; preds = %4
%16 = load i32, i32* %7
%17 = icmp sge i32 %16, 64
br i1 %17, label %18, label %26
18: ; preds = %15, %4
%19 = load double*, double** %5
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load double*, double** %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = call i32 @rtranspose(double* %19, i32 %20, i32 %21, double* %22, i32 %23, i32 %24)
br label %32
26: ; preds = %15
%27 = load double*, double** %5
%28 = load i32, i32* %6
%29 = load i32, i32* %7
%30 = load double*, double** %8
%31 = call i32 @stranspose(double* %27, i32 %28, i32 %29, double* %30)
br label %32
32: ; preds = %26, %18
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
}