#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 initialDoubleArea(double *dat, double val, int num) {
  int index = 0;
  if ((dat != NULL) && (num > 0)) {
    for (index = 0; index < num; index++) {
      dat[index] = val;
    }
  } else {
    printf("Error dat is null, num:%d, ln:%d, file:%s \n", num, 378,
           "/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):
<initialDoubleArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1178 <initialDoubleArea+0x68>
cmpl   $0x0,-0x14(%rbp)
jle    1178 <initialDoubleArea+0x68>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1173 <initialDoubleArea+0x63>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1147 <initialDoubleArea+0x37>
jmp    1193 <initialDoubleArea+0x83>
mov    -0x14(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x17a,%edx
lea    0xe9e(%rip),%rcx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialDoubleArea>:
test   %rdi,%rdi
je     1127 <initialDoubleArea+0x17>
test   %esi,%esi
jle    1127 <initialDoubleArea+0x17>
mov    %esi,%eax
cmp    $0x4,%esi
jae    113f <initialDoubleArea+0x2f>
xor    %ecx,%ecx
jmp    1220 <initialDoubleArea+0x110>
lea    0xed2(%rip),%rdi
lea    0xef7(%rip),%rcx
mov    $0x17a,%edx
jmp    1030 <printf@plt>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movaps %xmm0,%xmm1
movlhps %xmm0,%xmm1
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x7,%r8d
cmp    $0x1c,%rdx
jae    116a <initialDoubleArea+0x5a>
xor    %edx,%edx
jmp    11e1 <initialDoubleArea+0xd1>
and    $0xfffffffffffffff8,%rsi
xor    %edx,%edx
movups %xmm1,(%rdi,%rdx,8)
movups %xmm1,0x10(%rdi,%rdx,8)
movups %xmm1,0x20(%rdi,%rdx,8)
movups %xmm1,0x30(%rdi,%rdx,8)
movups %xmm1,0x40(%rdi,%rdx,8)
movups %xmm1,0x50(%rdi,%rdx,8)
movups %xmm1,0x60(%rdi,%rdx,8)
movups %xmm1,0x70(%rdi,%rdx,8)
movups %xmm1,0x80(%rdi,%rdx,8)
movups %xmm1,0x90(%rdi,%rdx,8)
movups %xmm1,0xa0(%rdi,%rdx,8)
movups %xmm1,0xb0(%rdi,%rdx,8)
movups %xmm1,0xc0(%rdi,%rdx,8)
movups %xmm1,0xd0(%rdi,%rdx,8)
movups %xmm1,0xe0(%rdi,%rdx,8)
movups %xmm1,0xf0(%rdi,%rdx,8)
add    $0x20,%rdx
add    $0xfffffffffffffff8,%rsi
jne    1170 <initialDoubleArea+0x60>
test   %r8,%r8
je     1212 <initialDoubleArea+0x102>
lea    (%rdi,%rdx,8),%rdx
add    $0x10,%rdx
shl    $0x5,%r8
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups %xmm1,-0x10(%rdx,%rsi,1)
movups %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r8
jne    1200 <initialDoubleArea+0xf0>
cmp    %rax,%rcx
je     122e <initialDoubleArea+0x11e>
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rdi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1220 <initialDoubleArea+0x110>
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 @initialDoubleArea(double* %0, double %1, i32 %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store double %1, double* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load double*, double** %4
%9 = icmp ne double* %8, null
br i1 %9, label %10, label %28
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %10
store i32 0, i32* %7
br label %14
14: ; preds = %24, %13
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = load double, double* %5
%20 = load double*, double** %4
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
store double %19, double* %23
br label %24
24: ; preds = %18
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
store i32 %26, i32* %7
br label %14
27: ; preds = %14
br label %31
28: ; preds = %10, %3
%29 = load i32, i32* %6
%30 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %29, i32 378, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %28, %27
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 @initialDoubleArea(double* writeonly %0, double %1, i32 %2) {
%4 = icmp ne double* %0, null
%5 = icmp sgt i32 %2, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %90
7: ; preds = %3
%8 = zext i32 %2 to i64
%9 = icmp ult i32 %2, 4
br i1 %9, label %83, label %10
10: ; preds = %7
%11 = and i64 %8, 4294967292
%12 = insertelement <2 x double> poison, double %1, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = insertelement <2 x double> poison, double %1, i64 0
%15 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> zeroinitializer
%16 = add nsw i64 %11, -4
%17 = lshr exact i64 %16, 2
%18 = add nuw nsw i64 %17, 1
%19 = and i64 %18, 7
%20 = icmp ult i64 %16, 28
br i1 %20, label %68, label %21
21: ; preds = %10
%22 = and i64 %18, 9223372036854775800
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %65, %23 ]
%25 = phi i64 [ 0, %21 ], [ %66, %23 ]
%26 = getelementptr inbounds double, double* %0, i64 %24
%27 = bitcast double* %26 to <2 x double>*
store <2 x double> %13, <2 x double>* %27
%28 = getelementptr inbounds double, double* %26, i64 2
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> %15, <2 x double>* %29
%30 = or i64 %24, 4
%31 = getelementptr inbounds double, double* %0, i64 %30
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> %13, <2 x double>* %32
%33 = getelementptr inbounds double, double* %31, i64 2
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> %15, <2 x double>* %34
%35 = or i64 %24, 8
%36 = getelementptr inbounds double, double* %0, i64 %35
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %13, <2 x double>* %37
%38 = getelementptr inbounds double, double* %36, i64 2
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> %15, <2 x double>* %39
%40 = or i64 %24, 12
%41 = getelementptr inbounds double, double* %0, i64 %40
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> %13, <2 x double>* %42
%43 = getelementptr inbounds double, double* %41, i64 2
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> %15, <2 x double>* %44
%45 = or i64 %24, 16
%46 = getelementptr inbounds double, double* %0, i64 %45
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %13, <2 x double>* %47
%48 = getelementptr inbounds double, double* %46, i64 2
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> %15, <2 x double>* %49
%50 = or i64 %24, 20
%51 = getelementptr inbounds double, double* %0, i64 %50
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %13, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %15, <2 x double>* %54
%55 = or i64 %24, 24
%56 = getelementptr inbounds double, double* %0, i64 %55
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> %13, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %15, <2 x double>* %59
%60 = or i64 %24, 28
%61 = getelementptr inbounds double, double* %0, i64 %60
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %13, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %15, <2 x double>* %64
%65 = add nuw i64 %24, 32
%66 = add i64 %25, 8
%67 = icmp eq i64 %66, %22
br i1 %67, label %68, label %23
68: ; preds = %23, %10
%69 = phi i64 [ 0, %10 ], [ %65, %23 ]
%70 = icmp eq i64 %19, 0
br i1 %70, label %81, label %71
71: ; preds = %68, %71
%72 = phi i64 [ %78, %71 ], [ %69, %68 ]
%73 = phi i64 [ %79, %71 ], [ 0, %68 ]
%74 = getelementptr inbounds double, double* %0, i64 %72
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %13, <2 x double>* %75
%76 = getelementptr inbounds double, double* %74, i64 2
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> %15, <2 x double>* %77
%78 = add nuw i64 %72, 4
%79 = add i64 %73, 1
%80 = icmp eq i64 %79, %19
br i1 %80, label %81, label %71
81: ; preds = %71, %68
%82 = icmp eq i64 %11, %8
br i1 %82, label %92, label %83
83: ; preds = %7, %81
%84 = phi i64 [ 0, %7 ], [ %11, %81 ]
br label %85
85: ; preds = %83, %85
%86 = phi i64 [ %88, %85 ], [ %84, %83 ]
%87 = getelementptr inbounds double, double* %0, i64 %86
store double %1, double* %87
%88 = add nuw nsw i64 %86, 1
%89 = icmp eq i64 %88, %8
br i1 %89, label %92, label %85
90: ; preds = %3
%91 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %2, i32 378, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %92
92: ; preds = %85, %81, %90
ret void
}