#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*/ free(void *);
int /*<<< orphan*/ printf(char *, int, char *);
int delDoubleArea(void **dat) {
  int ret = 0;
  if (dat != NULL) {
    ret = 1;
    if (*dat != NULL) {
      free(*dat);
      *dat = NULL;
    } else {
    }
  } else {
    printf("Error the pointer is null, ln:%d, File:%s \n", 423,
           "/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):
<delDoubleArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1179 <delDoubleArea+0x59>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     116f <delDoubleArea+0x4f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1174 <delDoubleArea+0x54>
jmp    1174 <delDoubleArea+0x54>
jmp    1191 <delDoubleArea+0x71>
lea    0xe80(%rip),%rdi
mov    $0x1a7,%esi
lea    0xea0(%rip),%rdx
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delDoubleArea>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <delDoubleArea+0x26>
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    $0x1,%ebp
test   %rdi,%rdi
je     1160 <delDoubleArea+0x40>
call   1030 <free@plt>
movq   $0x0,(%rbx)
jmp    1160 <delDoubleArea+0x40>
lea    0xeb3(%rip),%rdi
lea    0xed8(%rip),%rdx
mov    $0x1a7,%esi
call   1040 <printf@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
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 @delDoubleArea(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
%4 = load i8**, i8*** %2
%5 = icmp ne i8** %4, null
br i1 %5, label %6, label %17
6: ; preds = %1
store i32 1, i32* %3
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = call i32 @free(i8* %12)
%14 = load i8**, i8*** %2
store i8* null, i8** %14
br label %16
15: ; preds = %6
br label %16
16: ; preds = %15, %10
br label %19
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 423, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %16
%20 = load i32, i32* %3
ret i32 %20
}

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 @delDoubleArea(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %10
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 423, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %6, %3, %8
%11 = phi i32 [ 1, %6 ], [ 1, %3 ], [ 0, %8 ]
ret i32 %11
}