#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*/ printf(char *, int, int, char *);
void initial2DDoubleArea(double **dat, double val, int num, int num2) {
  int index = 0;
  int index2 = 0;
  if ((dat != NULL) && (num > 0)) {
    for (index = 0; index < num; index++) {
      for (index2 = 0; index2 < num2; index2++) {
        dat[index][index2] = val;
      }
    }
  } else {
    printf("Error dat is null, num:%d, ln:%d, file:%s \n", num, 399,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/"
           "master/mProject/library_jui/dataStruct/src/basicVarArea.c");
  }
}


x86 assembly (clang, -O0):
<initial2DDoubleArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11b0 <initial2DDoubleArea+0xa0>
cmpl   $0x0,-0x14(%rbp)
jle    11b0 <initial2DDoubleArea+0xa0>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ab <initial2DDoubleArea+0x9b>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1198 <initial2DDoubleArea+0x88>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1164 <initial2DDoubleArea+0x54>
jmp    119d <initial2DDoubleArea+0x8d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1151 <initial2DDoubleArea+0x41>
jmp    11cb <initial2DDoubleArea+0xbb>
mov    -0x14(%rbp),%esi
lea    0xe46(%rip),%rdi
mov    $0x18f,%edx
lea    0xe66(%rip),%rcx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initial2DDoubleArea>:
test   %rdi,%rdi
je     1253 <initial2DDoubleArea+0x143>
test   %esi,%esi
jle    1253 <initial2DDoubleArea+0x143>
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r14d
mov    %edx,%ecx
mov    %ecx,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r8
mov    %r8,%r9
shr    $0x2,%r9
add    $0x1,%r9
movaps %xmm0,%xmm1
movlhps %xmm0,%xmm1
mov    %r9d,%r10d
and    $0x7,%r10d
and    $0xfffffffffffffff8,%r9
mov    %r10,%r15
shl    $0x5,%r15
xor    %r12d,%r12d
jmp    116d <initial2DDoubleArea+0x5d>
add    $0x1,%r12
cmp    %r14,%r12
je     126b <initial2DDoubleArea+0x15b>
test   %edx,%edx
jle    1160 <initial2DDoubleArea+0x50>
mov    (%rdi,%r12,8),%rax
cmp    $0x4,%edx
jae    1190 <initial2DDoubleArea+0x80>
xor    %esi,%esi
jmp    1240 <initial2DDoubleArea+0x130>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x1c,%r8
jae    119a <initial2DDoubleArea+0x8a>
xor    %esi,%esi
jmp    1211 <initial2DDoubleArea+0x101>
mov    %r9,%rbx
xor    %esi,%esi
nop
movups %xmm1,(%rax,%rsi,8)
movups %xmm1,0x10(%rax,%rsi,8)
movups %xmm1,0x20(%rax,%rsi,8)
movups %xmm1,0x30(%rax,%rsi,8)
movups %xmm1,0x40(%rax,%rsi,8)
movups %xmm1,0x50(%rax,%rsi,8)
movups %xmm1,0x60(%rax,%rsi,8)
movups %xmm1,0x70(%rax,%rsi,8)
movups %xmm1,0x80(%rax,%rsi,8)
movups %xmm1,0x90(%rax,%rsi,8)
movups %xmm1,0xa0(%rax,%rsi,8)
movups %xmm1,0xb0(%rax,%rsi,8)
movups %xmm1,0xc0(%rax,%rsi,8)
movups %xmm1,0xd0(%rax,%rsi,8)
movups %xmm1,0xe0(%rax,%rsi,8)
movups %xmm1,0xf0(%rax,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rbx
jne    11a0 <initial2DDoubleArea+0x90>
test   %r10,%r10
je     1232 <initial2DDoubleArea+0x122>
lea    (%rax,%rsi,8),%rsi
add    $0x10,%rsi
xor    %ebx,%ebx
movups %xmm1,-0x10(%rsi,%rbx,1)
movups %xmm1,(%rsi,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r15
jne    1220 <initial2DDoubleArea+0x110>
mov    %r11,%rsi
cmp    %rcx,%r11
je     1160 <initial2DDoubleArea+0x50>
xchg   %ax,%ax
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    1240 <initial2DDoubleArea+0x130>
jmp    1160 <initial2DDoubleArea+0x50>
lea    0xda6(%rip),%rdi
lea    0xdcb(%rip),%rcx
mov    $0x18f,%edx
jmp    1030 <printf@plt>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Error dat is null, num:%d, ln:%d, file:%s \0A\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/master/mProject/library_jui/dataStruct/src/basicVarArea.c\00"
define void @initial2DDoubleArea(double** %0, double %1, i32 %2, i32 %3) {
%5 = alloca double**
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store double** %0, double*** %5
store double %1, double* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
%11 = load double**, double*** %5
%12 = icmp ne double** %11, null
br i1 %12, label %13, label %44
13: ; preds = %4
%14 = load i32, i32* %7
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %44
16: ; preds = %13
store i32 0, i32* %9
br label %17
17: ; preds = %40, %16
%18 = load i32, i32* %9
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %43
21: ; preds = %17
store i32 0, i32* %10
br label %22
22: ; preds = %36, %21
%23 = load i32, i32* %10
%24 = load i32, i32* %8
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %39
26: ; preds = %22
%27 = load double, double* %6
%28 = load double**, double*** %5
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double*, double** %28, i64 %30
%32 = load double*, double** %31
%33 = load i32, i32* %10
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %32, i64 %34
store double %27, double* %35
br label %36
36: ; preds = %26
%37 = load i32, i32* %10
%38 = add nsw i32 %37, 1
store i32 %38, i32* %10
br label %22
39: ; preds = %22
br label %40
40: ; preds = %39
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
store i32 %42, i32* %9
br label %17
43: ; preds = %17
br label %47
44: ; preds = %13, %4
%45 = load i32, i32* %7
%46 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %45, i32 399, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %44, %43
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Error dat is null, num:%d, ln:%d, file:%s \0A\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/master/mProject/library_jui/dataStruct/src/basicVarArea.c\00"
define void @initial2DDoubleArea(double** %0, double %1, i32 %2, i32 %3) {
%5 = icmp ne double** %0, null
%6 = icmp sgt i32 %2, 0
%7 = and i1 %5, %6
br i1 %7, label %8, label %101
8: ; preds = %4
%9 = icmp sgt i32 %3, 0
%10 = zext i32 %2 to i64
%11 = zext i32 %3 to i64
%12 = and i64 %11, 4294967292
%13 = add nsw i64 %12, -4
%14 = lshr exact i64 %13, 2
%15 = add nuw nsw i64 %14, 1
%16 = icmp ult i32 %3, 4
%17 = and i64 %11, 4294967292
%18 = insertelement <2 x double> poison, double %1, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = insertelement <2 x double> poison, double %1, i64 0
%21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
%22 = and i64 %15, 7
%23 = icmp ult i64 %13, 28
%24 = and i64 %15, 9223372036854775800
%25 = icmp eq i64 %22, 0
%26 = icmp eq i64 %17, %11
br label %27
27: ; preds = %8, %98
%28 = phi i64 [ 0, %8 ], [ %99, %98 ]
br i1 %9, label %29, label %98
29: ; preds = %27
%30 = getelementptr inbounds double*, double** %0, i64 %28
%31 = load double*, double** %30
br i1 %16, label %91, label %32
32: ; preds = %29
br i1 %23, label %78, label %33
33: ; preds = %32, %33
%34 = phi i64 [ %75, %33 ], [ 0, %32 ]
%35 = phi i64 [ %76, %33 ], [ 0, %32 ]
%36 = getelementptr inbounds double, double* %31, i64 %34
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %19, <2 x double>* %37
%38 = getelementptr inbounds double, double* %36, i64 2
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> %21, <2 x double>* %39
%40 = or i64 %34, 4
%41 = getelementptr inbounds double, double* %31, i64 %40
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> %19, <2 x double>* %42
%43 = getelementptr inbounds double, double* %41, i64 2
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> %21, <2 x double>* %44
%45 = or i64 %34, 8
%46 = getelementptr inbounds double, double* %31, i64 %45
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %19, <2 x double>* %47
%48 = getelementptr inbounds double, double* %46, i64 2
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> %21, <2 x double>* %49
%50 = or i64 %34, 12
%51 = getelementptr inbounds double, double* %31, i64 %50
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %19, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %21, <2 x double>* %54
%55 = or i64 %34, 16
%56 = getelementptr inbounds double, double* %31, i64 %55
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> %19, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %21, <2 x double>* %59
%60 = or i64 %34, 20
%61 = getelementptr inbounds double, double* %31, i64 %60
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %19, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %21, <2 x double>* %64
%65 = or i64 %34, 24
%66 = getelementptr inbounds double, double* %31, i64 %65
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> %19, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %21, <2 x double>* %69
%70 = or i64 %34, 28
%71 = getelementptr inbounds double, double* %31, i64 %70
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> %19, <2 x double>* %72
%73 = getelementptr inbounds double, double* %71, i64 2
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %21, <2 x double>* %74
%75 = add nuw i64 %34, 32
%76 = add i64 %35, 8
%77 = icmp eq i64 %76, %24
br i1 %77, label %78, label %33
78: ; preds = %33, %32
%79 = phi i64 [ 0, %32 ], [ %75, %33 ]
br i1 %25, label %90, label %80
80: ; preds = %78, %80
%81 = phi i64 [ %87, %80 ], [ %79, %78 ]
%82 = phi i64 [ %88, %80 ], [ 0, %78 ]
%83 = getelementptr inbounds double, double* %31, i64 %81
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> %19, <2 x double>* %84
%85 = getelementptr inbounds double, double* %83, i64 2
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> %21, <2 x double>* %86
%87 = add nuw i64 %81, 4
%88 = add i64 %82, 1
%89 = icmp eq i64 %88, %22
br i1 %89, label %90, label %80
90: ; preds = %80, %78
br i1 %26, label %98, label %91
91: ; preds = %29, %90
%92 = phi i64 [ 0, %29 ], [ %17, %90 ]
br label %93
93: ; preds = %91, %93
%94 = phi i64 [ %96, %93 ], [ %92, %91 ]
%95 = getelementptr inbounds double, double* %31, i64 %94
store double %1, double* %95
%96 = add nuw nsw i64 %94, 1
%97 = icmp eq i64 %96, %11
br i1 %97, label %98, label %93
98: ; preds = %93, %90, %27
%99 = add nuw nsw i64 %28, 1
%100 = icmp eq i64 %99, %10
br i1 %100, label %103, label %27
101: ; preds = %4
%102 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %2, i32 399, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %103
103: ; preds = %98, %101
ret void
}