#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 /*<<< orphan*/, char *, char const *,
                        char const *, int);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fc_stacktrace(int);
scalar_t__ log_loggable(int);
void fc_assert(const char *cond, const char *file, int line, int panic) {
  do {
    if (log_loggable(1) != 0) {
      _log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/git-hulk/fatcache/refs/heads/master/src/"
           "fc_util.c",
           682, 0, "assert '%s' failed @ (%s, %d)", cond, file, line);
    }
  } while (0);
  if (panic) {
    fc_stacktrace(1);
    abort();
  }
}


x86 assembly (clang, -O0):
<fc_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0x1,%edi
call   1050 <log_loggable@plt>
cmp    $0x0,%rax
je     1192 <fc_assert+0x52>
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x14(%rbp),%eax
lea    0xe84(%rip),%rdi
mov    $0x2aa,%esi
xor    %edx,%edx
lea    0xf02(%rip),%rcx
mov    %eax,(%rsp)
call   1040 <_log@plt>
jmp    1197 <fc_assert+0x57>
cmpl   $0x0,-0x18(%rbp)
je     11b2 <fc_assert+0x72>
mov    $0x1,%edi
call   1060 <fc_stacktrace@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc_assert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x1,%edi
call   1050 <log_loggable@plt>
test   %rax,%rax
je     1183 <fc_assert+0x43>
mov    %ebp,(%rsp)
lea    0xe96(%rip),%rdi
lea    0xf1b(%rip),%rcx
mov    $0x2aa,%esi
xor    %edx,%edx
mov    %r15,%r8
mov    %r14,%r9
call   1040 <_log@plt>
test   %ebx,%ebx
jne    1192 <fc_assert+0x52>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%edi
call   1060 <fc_stacktrace@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/git-hulk/fatcache/refs/heads/master/src/fc_util.c\00"
@.str.1 = [30 x i8] c"assert '%s' failed @ (%s, %d)\00"
define void @fc_assert(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 1)
%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 ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 682, 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 @fc_stacktrace(i32 1)
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/git-hulk/fatcache/refs/heads/master/src/fc_util.c\00"
@.str.1 = [30 x i8] c"assert '%s' failed @ (%s, %d)\00"
define void @fc_assert(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i64 @log_loggable(i32 1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @_log(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 682, 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 @fc_stacktrace(i32 1)
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %9
ret void
}