#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);
float **FMX2Alloc(int rows, int cols) {
  float **mx;
  int r;
  mx = (float **)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",
      169, (sizeof(float *) * rows));
  mx[0] = (float *)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",
      170, (sizeof(float) * rows * cols));
  for (r = 1; r < rows; r++)
    mx[r] = mx[0] + r * cols;
  return mx;
}


x86 assembly (clang, -O0):
<FMX2Alloc>:
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    $0xa9,%esi
call   1030 <sre_malloc@plt>
mov    %rax,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edx
lea    0xeaa(%rip),%rdi
mov    $0xaa,%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 <FMX2Alloc+0x9e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x14(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%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 <FMX2Alloc+0x61>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FMX2Alloc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%r12d
lea    0x0(,%r12,8),%edx
lea    0xed0(%rip),%r15
mov    %r15,%rdi
mov    $0xa9,%esi
call   1030 <sre_malloc@plt>
mov    %rax,%r13
mov    %r12d,%edx
imul   %r14d,%edx
shl    $0x2,%edx
mov    %r15,%rdi
mov    $0xaa,%esi
call   1030 <sre_malloc@plt>
mov    %rax,0x0(%r13)
cmp    $0x2,%r12d
jl     1210 <FMX2Alloc+0x100>
movslq %r14d,%r8
mov    %r12d,%ecx
lea    -0x1(%rcx),%r10
add    $0xfffffffffffffffe,%rcx
mov    %r10d,%r9d
and    $0x3,%r9d
mov    $0x1,%edi
cmp    $0x3,%rcx
jb     11dd <FMX2Alloc+0xcd>
and    $0xfffffffffffffffc,%r10
mov    %r8,%rcx
shl    $0x4,%rcx
lea    (%rax,%rcx,1),%rbp
lea    (%r8,%r8,2),%rdx
lea    (%rax,%rdx,4),%rdx
lea    (%rax,%r8,4),%rsi
lea    (%rax,%r8,8),%rbx
xor    %edi,%edi
cs 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 <FMX2Alloc+0xa0>
add    $0x1,%rdi
test   %r9,%r9
je     1210 <FMX2Alloc+0x100>
lea    0x0(,%rdi,8),%rcx
add    %r13,%rcx
imul   %r8,%rdi
lea    (%rax,%rdi,4),%rax
shl    $0x2,%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 <FMX2Alloc+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 float** @FMX2Alloc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float**
%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 169, i32 %10)
%12 = inttoptr i64 %11 to float**
store float** %12, float*** %5
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = mul i64 4, %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 170, i32 %19)
%21 = inttoptr i64 %20 to float*
%22 = load float**, float*** %5
%23 = getelementptr inbounds float*, float** %22, i64 0
store float* %21, float** %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 float**, float*** %5
%30 = getelementptr inbounds float*, float** %29, i64 0
%31 = load float*, float** %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 float, float* %31, i64 %35
%37 = load float**, float*** %5
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float*, float** %37, i64 %39
store float* %36, float** %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 float**, float*** %5
ret float** %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 float** @FMX2Alloc(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 169, i32 %3)
%5 = inttoptr i64 %4 to float**
%6 = shl i32 %0, 2
%7 = mul i32 %6, %1
%8 = tail call i64 @sre_malloc(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i32 170, i32 %7)
%9 = inttoptr i64 %8 to float*
store float* %9, float** %5
%10 = icmp sgt i32 %0, 1
br i1 %10, label %11, label %53
11: ; preds = %2
%12 = sext i32 %1 to i64
%13 = zext i32 %0 to i64
%14 = add nsw i64 %13, -1
%15 = add nsw i64 %13, -2
%16 = and i64 %14, 3
%17 = icmp ult i64 %15, 3
br i1 %17, label %41, label %18
18: ; preds = %11
%19 = and i64 %14, -4
br label %20
20: ; preds = %20, %18
%21 = phi i64 [ 1, %18 ], [ %38, %20 ]
%22 = phi i64 [ 0, %18 ], [ %39, %20 ]
%23 = mul nsw i64 %21, %12
%24 = getelementptr inbounds float, float* %9, i64 %23
%25 = getelementptr inbounds float*, float** %5, i64 %21
store float* %24, float** %25
%26 = add nuw nsw i64 %21, 1
%27 = mul nsw i64 %26, %12
%28 = getelementptr inbounds float, float* %9, i64 %27
%29 = getelementptr inbounds float*, float** %5, i64 %26
store float* %28, float** %29
%30 = add nuw nsw i64 %21, 2
%31 = mul nsw i64 %30, %12
%32 = getelementptr inbounds float, float* %9, i64 %31
%33 = getelementptr inbounds float*, float** %5, i64 %30
store float* %32, float** %33
%34 = add nuw nsw i64 %21, 3
%35 = mul nsw i64 %34, %12
%36 = getelementptr inbounds float, float* %9, i64 %35
%37 = getelementptr inbounds float*, float** %5, i64 %34
store float* %36, float** %37
%38 = add nuw nsw i64 %21, 4
%39 = add nuw i64 %22, 4
%40 = icmp eq i64 %39, %19
br i1 %40, label %41, label %20
41: ; preds = %20, %11
%42 = phi i64 [ 1, %11 ], [ %38, %20 ]
%43 = icmp eq i64 %16, 0
br i1 %43, label %53, label %44
44: ; preds = %41, %44
%45 = phi i64 [ %50, %44 ], [ %42, %41 ]
%46 = phi i64 [ %51, %44 ], [ 0, %41 ]
%47 = mul nsw i64 %45, %12
%48 = getelementptr inbounds float, float* %9, i64 %47
%49 = getelementptr inbounds float*, float** %5, i64 %45
store float* %48, float** %49
%50 = add nuw nsw i64 %45, 1
%51 = add i64 %46, 1
%52 = icmp eq i64 %51, %16
br i1 %52, label %53, label %44
53: ; preds = %41, %44, %2
ret float** %5
}