#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*/ _log(char *, int, int, int /*<<< orphan*/, char *,
                        char const *, char const *, int);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ dstacktrace(int);
scalar_t__ log_loggable(int);
void dassert(const char *cond, const char *file, int line, int panic) {
  do {
    if (log_loggable(3) != 0) {
      _log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/rootzc/myownproject/refs/heads/master/"
           "dep/util/dutil.c",
           40, 3, 0, "assert '%s' failed @ (%s, %d)", cond, file, line);
    }
  } while (0);
  if (panic) {
    dstacktrace(1);
    abort();
  }
}


x86 assembly (clang, -O0):
<dassert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0x3,%edi
call   1050 <log_loggable@plt>
cmp    $0x0,%rax
je     119c <dassert+0x5c>
mov    -0x8(%rbp),%r9
mov    -0x10(%rbp),%r10
mov    -0x14(%rbp),%eax
lea    0xe84(%rip),%rdi
mov    $0x28,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
lea    0xf02(%rip),%r8
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <_log@plt>
jmp    11a1 <dassert+0x61>
cmpl   $0x0,-0x18(%rbp)
je     11bc <dassert+0x7c>
mov    $0x1,%edi
call   1060 <dstacktrace@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dassert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x3,%edi
call   1050 <log_loggable@plt>
test   %rax,%rax
je     118b <dassert+0x4b>
lea    0xe98(%rip),%rdi
lea    0xf22(%rip),%r8
mov    $0x28,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
mov    %rbx,%r9
push   %r15
push   %r14
call   1040 <_log@plt>
add    $0x10,%rsp
test   %ebp,%ebp
jne    119a <dassert+0x5a>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%edi
call   1060 <dstacktrace@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rootzc/myownproject/refs/heads/master/dep/util/dutil.c\00"
@.str.1 = [30 x i8] c"assert '%s' failed @ (%s, %d)\00"
define void @dassert(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
br label %9
9: ; preds = %4
%10 = call i64 @log_loggable(i32 3)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = call i32 @_log(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 40, i32 3, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %14, i32 %15)
br label %17
17: ; preds = %12, %9
br label %18
18: ; preds = %17
%19 = load i32, i32* %8
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = call i32 @dstacktrace(i32 1)
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rootzc/myownproject/refs/heads/master/dep/util/dutil.c\00"
@.str.1 = [30 x i8] c"assert '%s' failed @ (%s, %d)\00"
define void @dassert(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i64 @log_loggable(i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @_log(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 40, i32 3, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
br label %9
9: ; preds = %4, %7
%10 = icmp eq i32 %3, 0
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = tail call i32 @dstacktrace(i32 1)
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %9
ret void
}