#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 */
struct vcLog {
  int dummy;
};

/* Variables and functions */
struct vcLog *init_cvector(char *, char *);
int /*<<< orphan*/ log_local_event(struct vcLog *, char *);
int /*<<< orphan*/ tcase_fn_start(char *, char *, int);
int /*<<< orphan*/ test_write(struct vcLog *, char *);
void log_local_event_test(int _i __attribute__((unused))) {
  tcase_fn_start(""
                 "log_local_event_test",
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/DistributedClocks/CVector/"
                 "refs/heads/master/src/test/cvec_test.c",
                 86);
  {
    char *filename = "testLog";
    struct vcLog *testLog = init_cvector("Proc1", filename);
    log_local_event(testLog, "This is a local event!");
    test_write(testLog, "This is a local event!\n");
  }
}


x86 assembly (clang, -O0):
<log_local_event_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    $0x56,%edx
call   1030 <tcase_fn_start@plt>
lea    0xf46(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xf3f(%rip),%rdi
call   1060 <init_cvector@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xf31(%rip),%rsi
call   1040 <log_local_event@plt>
mov    -0x18(%rbp),%rdi
lea    0xf38(%rip),%rsi
call   1050 <test_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_local_event_test>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x56,%edx
call   1030 <tcase_fn_start@plt>
lea    0xf58(%rip),%rdi
lea    0xf49(%rip),%rsi
call   1060 <init_cvector@plt>
mov    %rax,%rbx
lea    0xf48(%rip),%rsi
mov    %rax,%rdi
call   1040 <log_local_event@plt>
lea    0xf50(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <test_write@plt>

LLVM IR (-O0):
%struct.vcLog = type { i32 }
@.str = [21 x i8] c"log_local_event_test\00"
@.str.1 = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/DistributedClocks/CVector/refs/heads/master/src/test/cvec_test.c\00"
@.str.2 = [8 x i8] c"testLog\00"
@.str.3 = [6 x i8] c"Proc1\00"
@.str.4 = [23 x i8] c"This is a local event!\00"
@.str.5 = [24 x i8] c"This is a local event!\0A\00"
define void @log_local_event_test(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.vcLog*
store i32 %0, i32* %2
%5 = call i32 @tcase_fn_start(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str.1, i64 0, i64 0), i32 86)
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %3
%6 = load i8*, i8** %3
%7 = call %struct.vcLog* @init_cvector(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %6)
store %struct.vcLog* %7, %struct.vcLog** %4
%8 = load %struct.vcLog*, %struct.vcLog** %4
%9 = call i32 @log_local_event(%struct.vcLog* %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%10 = load %struct.vcLog*, %struct.vcLog** %4
%11 = call i32 @test_write(%struct.vcLog* %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.vcLog = type { i32 }
@.str = [21 x i8] c"log_local_event_test\00"
@.str.1 = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/DistributedClocks/CVector/refs/heads/master/src/test/cvec_test.c\00"
@.str.2 = [8 x i8] c"testLog\00"
@.str.3 = [6 x i8] c"Proc1\00"
@.str.4 = [23 x i8] c"This is a local event!\00"
@.str.5 = [24 x i8] c"This is a local event!\0A\00"
define void @log_local_event_test(i32 %0) {
%2 = tail call i32 @tcase_fn_start(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str.1, i64 0, i64 0), i32 86)
%3 = tail call %struct.vcLog* @init_cvector(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @log_local_event(%struct.vcLog* %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 @test_write(%struct.vcLog* %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
ret void
}