#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int system(char *);
void init_test(void) {
  int rc;
  rc = system("insmod "
              "tracer"
              ".ko");
  do {
    if (rc != 0) {
      do {
        fprintf(
            stderr, "(%s, %d): ",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/walac/linux/refs/heads/master/tools/"
            "labs/templates/assignments/1-tracer/checker/_test/tracer_test.c",
            203);
        perror("init_test");
      } while (0);
      exit(EXIT_FAILURE);
    }
  } while (0);
}


x86 assembly (clang, -O0):
<init_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11a1 <init_test+0x61>
jmp    1166 <init_test+0x26>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xe9b(%rip),%rsi
lea    0xe9f(%rip),%rdx
mov    $0xcb,%ecx
call   1040 <fprintf@plt>
lea    0xf4c(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
jmp    11a6 <init_test+0x66>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_test>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <system@plt>
test   %eax,%eax
jne    1153 <init_test+0x13>
pop    %rax
ret
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
lea    0xeb2(%rip),%rdx
mov    $0xcb,%ecx
call   1040 <fprintf@plt>
lea    0xf5f(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"insmod tracer.ko\00"
@stderr = global i32 0
@.str.1 = [11 x i8] c"(%s, %d): \00"
@.str.2 = [190 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/walac/linux/refs/heads/master/tools/labs/templates/assignments/1-tracer/checker/_test/tracer_test.c\00"
@.str.3 = [10 x i8] c"init_test\00"
@EXIT_FAILURE = global i32 0
define void @init_test() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
br label %3
3: ; preds = %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str.2, i64 0, i64 0), i32 203)
%10 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %7
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %3
br label %15
15: ; preds = %14
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"insmod tracer.ko\00"
@stderr = global i32 0
@.str.1 = [11 x i8] c"(%s, %d): \00"
@.str.2 = [190 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/walac/linux/refs/heads/master/tools/labs/templates/assignments/1-tracer/checker/_test/tracer_test.c\00"
@.str.3 = [10 x i8] c"init_test\00"
@EXIT_FAILURE = global i32 0
define void @init_test() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str.2, i64 0, i64 0), i32 203)
%6 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}