#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 delDoubleArea(void **);
int /*<<< orphan*/ free(void **);
int /*<<< orphan*/ printf(char *, int, char *);
int del2DimDoubleArea(void **dat, int size) {
  int ret = 1;
  int index = 0;
  void ***dat1 = (void ***)dat;
  if ((dat1 != NULL) && (size > 0)) {
    for (index = 0; index < size; index++) {
      ret = (ret == 1) && delDoubleArea(&((*dat1)[index]));
    }
    if (*dat1 != NULL) {
      free(*dat1);
      *dat1 = NULL;
    } else {
    }
  } else if ((dat != NULL) && (size == 0)) {
    ret = delDoubleArea(dat);
  } else {
    printf("Error the pointer is null, ln:%d, File:%s \n", 454,
           "/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");
  }
  return ret;
}


x86 assembly (clang, -O0):
<del2DimDoubleArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11f9 <del2DimDoubleArea+0xc9>
cmpl   $0x0,-0xc(%rbp)
jle    11f9 <del2DimDoubleArea+0xc9>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c5 <del2DimDoubleArea+0x95>
xor    %eax,%eax
cmpl   $0x1,-0x10(%rbp)
mov    %al,-0x21(%rbp)
jne    11ac <del2DimDoubleArea+0x7c>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1040 <delDoubleArea@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1171 <del2DimDoubleArea+0x41>
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     11ef <del2DimDoubleArea+0xbf>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
jmp    11f4 <del2DimDoubleArea+0xc4>
jmp    11f4 <del2DimDoubleArea+0xc4>
jmp    123c <del2DimDoubleArea+0x10c>
cmpq   $0x0,-0x8(%rbp)
je     121f <del2DimDoubleArea+0xef>
cmpl   $0x0,-0xc(%rbp)
jne    121f <del2DimDoubleArea+0xef>
mov    -0x8(%rbp),%rdi
call   1040 <delDoubleArea@plt>
mov    %eax,-0x10(%rbp)
jmp    1237 <del2DimDoubleArea+0x107>
lea    0xdda(%rip),%rdi
mov    $0x1c6,%esi
lea    0xdfa(%rip),%rdx
call   1050 <printf@plt>
jmp    123c <del2DimDoubleArea+0x10c>
mov    -0x10(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<del2DimDoubleArea>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1185 <del2DimDoubleArea+0x55>
test   %esi,%esi
jle    1185 <del2DimDoubleArea+0x55>
mov    %esi,%r15d
shl    $0x3,%r15
mov    $0x1,%ebp
xor    %ebx,%ebx
jmp    117c <del2DimDoubleArea+0x4c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14),%rdi
add    %rbx,%rdi
call   1040 <delDoubleArea@plt>
test   %eax,%eax
setne  %al
movzbl %al,%ebp
add    $0x8,%rbx
cmp    %rbx,%r15
je     11a0 <del2DimDoubleArea+0x70>
cmp    $0x1,%ebp
je     1160 <del2DimDoubleArea+0x30>
xor    %eax,%eax
jmp    1170 <del2DimDoubleArea+0x40>
test   %r14,%r14
je     11b6 <del2DimDoubleArea+0x86>
test   %esi,%esi
jne    11b6 <del2DimDoubleArea+0x86>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <delDoubleArea@plt>
mov    (%r14),%rdi
test   %rdi,%rdi
je     11d3 <del2DimDoubleArea+0xa3>
call   1030 <free@plt>
movq   $0x0,(%r14)
jmp    11d3 <del2DimDoubleArea+0xa3>
lea    0xe43(%rip),%rdi
lea    0xe68(%rip),%rdx
mov    $0x1c6,%esi
call   1050 <printf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Error the pointer is null, 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 i32 @del2DimDoubleArea(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8***
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 1, i32* %5
store i32 0, i32* %6
%8 = load i8**, i8*** %3
%9 = bitcast i8** %8 to i8***
store i8*** %9, i8**** %7
%10 = load i8***, i8**** %7
%11 = icmp ne i8*** %10, null
br i1 %11, label %12, label %48
12: ; preds = %2
%13 = load i32, i32* %4
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %48
15: ; preds = %12
store i32 0, i32* %6
br label %16
16: ; preds = %34, %15
%17 = load i32, i32* %6
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %37
20: ; preds = %16
%21 = load i32, i32* %5
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %31
23: ; preds = %20
%24 = load i8***, i8**** %7
%25 = load i8**, i8*** %24
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = call i32 @delDoubleArea(i8** %28)
%30 = icmp ne i32 %29, 0
br label %31
31: ; preds = %23, %20
%32 = phi i1 [ false, %20 ], [ %30, %23 ]
%33 = zext i1 %32 to i32
store i32 %33, i32* %5
br label %34
34: ; preds = %31
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %16
37: ; preds = %16
%38 = load i8***, i8**** %7
%39 = load i8**, i8*** %38
%40 = icmp ne i8** %39, null
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load i8***, i8**** %7
%43 = load i8**, i8*** %42
%44 = call i32 @free(i8** %43)
%45 = load i8***, i8**** %7
store i8** null, i8*** %45
br label %47
46: ; preds = %37
br label %47
47: ; preds = %46, %41
br label %60
48: ; preds = %12, %2
%49 = load i8**, i8*** %3
%50 = icmp ne i8** %49, null
br i1 %50, label %51, label %57
51: ; preds = %48
%52 = load i32, i32* %4
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load i8**, i8*** %3
%56 = call i32 @delDoubleArea(i8** %55)
store i32 %56, i32* %5
br label %59
57: ; preds = %51, %48
%58 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 454, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %59
59: ; preds = %57, %54
br label %60
60: ; preds = %59, %47
%61 = load i32, i32* %5
ret i32 %61
}

LLVM IR (-O2):
@.str = [44 x i8] c"Error the pointer is null, 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 i32 @del2DimDoubleArea(i8** %0, i32 %1) {
%3 = bitcast i8** %0 to i8***
%4 = icmp ne i8** %0, null
%5 = icmp sgt i32 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %28
7: ; preds = %2
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %7, %18
%10 = phi i64 [ 0, %7 ], [ %21, %18 ]
%11 = phi i32 [ 1, %7 ], [ %20, %18 ]
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8**, i8*** %3
%15 = getelementptr inbounds i8*, i8** %14, i64 %10
%16 = tail call i32 @delDoubleArea(i8** %15)
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %9
%19 = phi i1 [ false, %9 ], [ %17, %13 ]
%20 = zext i1 %19 to i32
%21 = add nuw nsw i64 %10, 1
%22 = icmp eq i64 %21, %8
br i1 %22, label %23, label %9
23: ; preds = %18
%24 = load i8**, i8*** %3
%25 = icmp eq i8** %24, null
br i1 %25, label %35, label %26
26: ; preds = %23
%27 = tail call i32 @free(i8** %24)
store i8** null, i8*** %3
br label %35
28: ; preds = %2
%29 = icmp eq i32 %1, 0
%30 = and i1 %4, %29
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @delDoubleArea(i8** %0)
br label %35
33: ; preds = %28
%34 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 454, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %31, %33, %26, %23
%36 = phi i32 [ %20, %26 ], [ %20, %23 ], [ %32, %31 ], [ 1, %33 ]
ret i32 %36
}