#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 */
scalar_t__ sre_malloc(char *, int, int);
double **DMX2Alloc(int rows, int cols) {
  double **mx;
  int r;
  mx = (double **)sre_malloc(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/vinuesa/get_phylomarkers/refs/heads/master/"
      "bin/clustal-omega-1.2.4/src/squid/sre_math.c",
      187, (sizeof(double *) * rows));
  mx[0] = (double *)sre_malloc(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/vinuesa/get_phylomarkers/refs/heads/master/"
      "bin/clustal-omega-1.2.4/src/squid/sre_math.c",
      188, (sizeof(double) * rows * cols));
  for (r = 1; r < rows; r++)
    mx[r] = mx[0] + r * cols;
  return mx;
}


x86 assembly (clang, -O0):
<DMX2Alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
lea    0xed1(%rip),%rdi
mov    $0xbb,%esi
call   1030 <sre_malloc@plt>
mov    %rax,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edx
lea    0xeaa(%rip),%rdi
mov    $0xbc,%esi
call   1030 <sre_malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11ae <DMX2Alloc+0x9e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x14(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1171 <DMX2Alloc+0x61>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DMX2Alloc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%r15d
lea    0x0(,%r15,8),%ebp
lea    0xed0(%rip),%r12
mov    %r12,%rdi
mov    $0xbb,%esi
mov    %ebp,%edx
call   1030 <sre_malloc@plt>
mov    %rax,%r13
imul   %r14d,%ebp
mov    %r12,%rdi
mov    $0xbc,%esi
mov    %ebp,%edx
call   1030 <sre_malloc@plt>
mov    %rax,0x0(%r13)
cmp    $0x2,%r15d
jl     1210 <DMX2Alloc+0x100>
movslq %r14d,%r8
mov    %r15d,%ecx
lea    -0x1(%rcx),%r10
add    $0xfffffffffffffffe,%rcx
mov    %r10d,%r9d
and    $0x3,%r9d
mov    $0x1,%edi
cmp    $0x3,%rcx
jb     11dd <DMX2Alloc+0xcd>
and    $0xfffffffffffffffc,%r10
mov    %r8,%rcx
shl    $0x5,%rcx
lea    (%rax,%rcx,1),%rbp
lea    (%r8,%r8,2),%rdx
lea    (%rax,%rdx,8),%rdx
lea    (%rax,%r8,8),%rsi
mov    %r8,%rbx
shl    $0x4,%rbx
add    %rax,%rbx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
mov    %rsi,0x8(%r13,%rdi,8)
mov    %rbx,0x10(%r13,%rdi,8)
mov    %rdx,0x18(%r13,%rdi,8)
mov    %rbp,0x20(%r13,%rdi,8)
add    $0x4,%rdi
add    %rcx,%rbp
add    %rcx,%rdx
add    %rcx,%rsi
add    %rcx,%rbx
cmp    %rdi,%r10
jne    11b0 <DMX2Alloc+0xa0>
add    $0x1,%rdi
test   %r9,%r9
je     1210 <DMX2Alloc+0x100>
lea    0x0(,%rdi,8),%rcx
add    %r13,%rcx
imul   %r8,%rdi
lea    (%rax,%rdi,8),%rax
shl    $0x3,%r8
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %rax,(%rcx,%rdx,8)
add    $0x1,%rdx
add    %r8,%rax
cmp    %rdx,%r9
jne    1200 <DMX2Alloc+0xf0>
mov    %r13,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [178 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/vinuesa/get_phylomarkers/refs/heads/master/bin/clustal-omega-1.2.4/src/squid/sre_math.c\00"
define double** @DMX2Alloc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double**
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = mul i64 8, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @sre_malloc(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i32 187, i32 %10)
%12 = inttoptr i64 %11 to double**
store double** %12, double*** %5
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = mul i64 8, %14
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = mul i64 %15, %17
%19 = trunc i64 %18 to i32
%20 = call i64 @sre_malloc(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i32 188, i32 %19)
%21 = inttoptr i64 %20 to double*
%22 = load double**, double*** %5
%23 = getelementptr inbounds double*, double** %22, i64 0
store double* %21, double** %23
store i32 1, i32* %6
br label %24
24: ; preds = %41, %2
%25 = load i32, i32* %6
%26 = load i32, i32* %3
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %44
28: ; preds = %24
%29 = load double**, double*** %5
%30 = getelementptr inbounds double*, double** %29, i64 0
%31 = load double*, double** %30
%32 = load i32, i32* %6
%33 = load i32, i32* %4
%34 = mul nsw i32 %32, %33
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %31, i64 %35
%37 = load double**, double*** %5
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double*, double** %37, i64 %39
store double* %36, double** %40
br label %41
41: ; preds = %28
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
br label %24
44: ; preds = %24
%45 = load double**, double*** %5
ret double** %45
}

LLVM IR (-O2):
@.str = [178 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/vinuesa/get_phylomarkers/refs/heads/master/bin/clustal-omega-1.2.4/src/squid/sre_math.c\00"
define double** @DMX2Alloc(i32 %0, i32 %1) {
%3 = shl i32 %0, 3
%4 = tail call i64 @sre_malloc(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i32 187, i32 %3)
%5 = inttoptr i64 %4 to double**
%6 = mul i32 %3, %1
%7 = tail call i64 @sre_malloc(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i32 188, i32 %6)
%8 = inttoptr i64 %7 to double*
store double* %8, double** %5
%9 = icmp sgt i32 %0, 1
br i1 %9, label %10, label %52
10: ; preds = %2
%11 = sext i32 %1 to i64
%12 = zext i32 %0 to i64
%13 = add nsw i64 %12, -1
%14 = add nsw i64 %12, -2
%15 = and i64 %13, 3
%16 = icmp ult i64 %14, 3
br i1 %16, label %40, label %17
17: ; preds = %10
%18 = and i64 %13, -4
br label %19
19: ; preds = %19, %17
%20 = phi i64 [ 1, %17 ], [ %37, %19 ]
%21 = phi i64 [ 0, %17 ], [ %38, %19 ]
%22 = mul nsw i64 %20, %11
%23 = getelementptr inbounds double, double* %8, i64 %22
%24 = getelementptr inbounds double*, double** %5, i64 %20
store double* %23, double** %24
%25 = add nuw nsw i64 %20, 1
%26 = mul nsw i64 %25, %11
%27 = getelementptr inbounds double, double* %8, i64 %26
%28 = getelementptr inbounds double*, double** %5, i64 %25
store double* %27, double** %28
%29 = add nuw nsw i64 %20, 2
%30 = mul nsw i64 %29, %11
%31 = getelementptr inbounds double, double* %8, i64 %30
%32 = getelementptr inbounds double*, double** %5, i64 %29
store double* %31, double** %32
%33 = add nuw nsw i64 %20, 3
%34 = mul nsw i64 %33, %11
%35 = getelementptr inbounds double, double* %8, i64 %34
%36 = getelementptr inbounds double*, double** %5, i64 %33
store double* %35, double** %36
%37 = add nuw nsw i64 %20, 4
%38 = add nuw i64 %21, 4
%39 = icmp eq i64 %38, %18
br i1 %39, label %40, label %19
40: ; preds = %19, %10
%41 = phi i64 [ 1, %10 ], [ %37, %19 ]
%42 = icmp eq i64 %15, 0
br i1 %42, label %52, label %43
43: ; preds = %40, %43
%44 = phi i64 [ %49, %43 ], [ %41, %40 ]
%45 = phi i64 [ %50, %43 ], [ 0, %40 ]
%46 = mul nsw i64 %44, %11
%47 = getelementptr inbounds double, double* %8, i64 %46
%48 = getelementptr inbounds double*, double** %5, i64 %44
store double* %47, double** %48
%49 = add nuw nsw i64 %44, 1
%50 = add i64 %45, 1
%51 = icmp eq i64 %50, %15
br i1 %51, label %52, label %43
52: ; preds = %40, %43, %2
ret double** %5
}