#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 *);
scalar_t__ logger_canlog(int /*<<< orphan*/);
int /*<<< orphan*/ logger_close();
int /*<<< orphan*/ logger_init(int /*<<< orphan*/, char *);
int main() {
  logger_init(0, "log");
  do {
    if (logger_canlog(0) != 0) {
      _log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/itxx00/vfpolicyd/refs/heads/master/log.c",
           169, 0, "fuck");
    }
  } while (0);
  logger_close();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    0xea8(%rip),%rsi
call   1040 <logger_init@plt>
xor    %edi,%edi
call   1060 <logger_canlog@plt>
cmp    $0x0,%rax
je     1188 <main+0x48>
lea    0xe8f(%rip),%rdi
mov    $0xa9,%esi
xor    %edx,%edx
lea    0xf04(%rip),%rcx
call   1030 <_log@plt>
jmp    118d <main+0x4d>
mov    $0x0,%al
call   1050 <logger_close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rsi
xor    %edi,%edi
call   1040 <logger_init@plt>
xor    %edi,%edi
call   1060 <logger_canlog@plt>
test   %rax,%rax
je     1175 <main+0x35>
lea    0xea2(%rip),%rdi
lea    0xf1e(%rip),%rcx
mov    $0xa9,%esi
xor    %edx,%edx
call   1030 <_log@plt>
xor    %eax,%eax
call   1050 <logger_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"log\00"
@.str.1 = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itxx00/vfpolicyd/refs/heads/master/log.c\00"
@.str.2 = [5 x i8] c"fuck\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @logger_init(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0
%4 = call i64 @logger_canlog(i32 0)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 @_log(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i32 169, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
br label %9
9: ; preds = %8
%10 = call i32 (...) @logger_close()
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"log\00"
@.str.1 = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itxx00/vfpolicyd/refs/heads/master/log.c\00"
@.str.2 = [5 x i8] c"fuck\00"
define i32 @main() {
%1 = tail call i32 @logger_init(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @logger_canlog(i32 0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @_log(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i32 169, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %0, %4
%7 = tail call i32 (...) @logger_close()
ret i32 0
}