#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*/ checkpoint3(int, int);
int /*<<< orphan*/ default_case();
int /*<<< orphan*/ printf(char *, ...);
int test_function(int, int, int, int, int, char *, char *, int *);
int main(int argc, char *argv[]) {
  char buf[25] = "8*3+1 ch"
                 "ars of s"
                 "tring...";
  int status, status2;
  printf("%s: start\n", "/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/"
                        "mozz/refs/heads/master/test/function_test.c");
  status =
      test_function(2345, 'x', 98, 789, 2346, buf, "secretadminpass", &status2);
  printf("status = %d, status2 = %x\n", status, status2);
  if (status == 3456 && status2 == 0xa1f) {
    printf("admin pass accepted\n");
    goto done;
  }
  status = test_function(84739, 'z', 2847, 9308, 12345, "c00lpass1337", buf,
                         &status2);
  printf("status = %d, status2 = %x\n", status, status2);
  if (status == 84739 && status2 == 0xc001f00d) {
    printf("normal pass accepted\n");
    goto done;
  }
  status = test_function(72, 72, 9374, 1038, 43879, "asdf", "qwer", &status2);
  printf("status = %d, status2 = %x\n", status, status2);
  checkpoint3(status, status2);
  if (status == 4567 && status2 == 0xc0bb13) {
    printf("asdfqwer\n");
    goto done;
  }
  default_case();
done:
  printf("%s: exit\n", "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/"
                       "mozz/refs/heads/master/test/function_test.c");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9d(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9b(%rip),%al
mov    %al,-0x18(%rbp)
lea    0xe92(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%r9
mov    $0x929,%edi
mov    $0x78,%esi
mov    $0x62,%edx
mov    $0x315,%ecx
mov    $0x92a,%r8d
lea    0xef8(%rip),%r10
lea    -0x38(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <test_function@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xd80,-0x34(%rbp)
jne    1210 <main+0xd0>
cmpl   $0xa1f,-0x38(%rbp)
jne    1210 <main+0xd0>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1318 <main+0x1d8>
lea    -0x30(%rbp),%r10
mov    $0x14b03,%edi
mov    $0x7a,%esi
mov    $0xb1f,%edx
mov    $0x245c,%ecx
mov    $0x3039,%r8d
lea    0xebd(%rip),%r9
lea    -0x38(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <test_function@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x14b03,-0x34(%rbp)
jne    128b <main+0x14b>
cmpl   $0xc001f00d,-0x38(%rbp)
jne    128b <main+0x14b>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1318 <main+0x1d8>
mov    $0x48,%esi
mov    $0x249e,%edx
mov    $0x40e,%ecx
mov    $0xab67,%r8d
lea    0xe6e(%rip),%r9
lea    0xe6c(%rip),%r10
lea    -0x38(%rbp),%rax
mov    %esi,%edi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <test_function@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1040 <checkpoint3@plt>
cmpl   $0x11d7,-0x34(%rbp)
jne    1311 <main+0x1d1>
cmpl   $0xc0bb13,-0x38(%rbp)
jne    1311 <main+0x1d1>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1318 <main+0x1d8>
mov    $0x0,%al
call   1050 <default_case@plt>
lea    0xe0a(%rip),%rdi
lea    0xcfe(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
movups 0xeaa(%rip),%xmm0
movups %xmm0,0x19(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xea2(%rip),%rdi
lea    0xea6(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%r14
lea    0xf21(%rip),%rax
lea    0x10(%rsp),%rbx
mov    $0x929,%edi
mov    $0x78,%esi
mov    $0x62,%edx
mov    $0x315,%ecx
mov    $0x92a,%r8d
mov    %rbx,%r9
push   %r14
push   %rax
call   1070 <test_function@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0xc(%rsp),%edx
lea    0xef6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xd80,%ebp
jne    11f8 <main+0xa8>
cmpl   $0xa1f,0xc(%rsp)
jne    11f8 <main+0xa8>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
jmp    12d7 <main+0x187>
lea    0xede(%rip),%r9
mov    $0x14b03,%edi
mov    $0x7a,%esi
mov    $0xb1f,%edx
mov    $0x245c,%ecx
mov    $0x3039,%r8d
push   %r14
push   %rbx
call   1070 <test_function@plt>
add    $0x10,%rsp
mov    %eax,%ebx
mov    0xc(%rsp),%edx
lea    0xe90(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x14b03,%ebx
jne    125b <main+0x10b>
cmpl   $0xc001f00d,0xc(%rsp)
c0
jne    125b <main+0x10b>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
jmp    12d7 <main+0x187>
lea    0xe9b(%rip),%rax
lea    0xe81(%rip),%r9
mov    $0x48,%edi
mov    $0x48,%esi
mov    $0x249e,%edx
mov    $0x40e,%ecx
mov    $0xab67,%r8d
push   %r14
push   %rax
call   1070 <test_function@plt>
add    $0x10,%rsp
mov    %eax,%ebx
mov    0xc(%rsp),%edx
lea    0xe26(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %ebx,%edi
call   1050 <checkpoint3@plt>
cmp    $0x11d7,%ebx
jne    12d0 <main+0x180>
cmpl   $0xc0bb13,0xc(%rsp)
jne    12d0 <main+0x180>
lea    0xe30(%rip),%rdi
call   1030 <puts@plt>
jmp    12d7 <main+0x187>
xor    %eax,%eax
call   1060 <default_case@plt>
lea    0xe11(%rip),%rdi
lea    0xd3f(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.buf = [25 x i8] c"8*3+1 chars of string...\00"
@.str = [11 x i8] c"%s: start\0A\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/mozz/refs/heads/master/test/function_test.c\00"
@.str.2 = [16 x i8] c"secretadminpass\00"
@.str.3 = [27 x i8] c"status = %d, status2 = %x\0A\00"
@.str.4 = [21 x i8] c"admin pass accepted\0A\00"
@.str.5 = [13 x i8] c"c00lpass1337\00"
@.str.6 = [22 x i8] c"normal pass accepted\0A\00"
@.str.7 = [5 x i8] c"asdf\00"
@.str.8 = [5 x i8] c"qwer\00"
@.str.9 = [10 x i8] c"asdfqwer\0A\00"
@.str.10 = [10 x i8] c"%s: exit\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [25 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [25 x i8]* %6 to i8*
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [25 x i8], [25 x i8]* %6, i64 0, i64 0
%12 = call i32 @test_function(i32 2345, i32 120, i32 98, i32 789, i32 2346, i8* %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32* %8)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %13, i32 %14)
%16 = load i32, i32* %7
%17 = icmp eq i32 %16, 3456
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i32, i32* %8
%20 = icmp eq i32 %19, 2591
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %53
23: ; preds = %18, %2
%24 = getelementptr inbounds [25 x i8], [25 x i8]* %6, i64 0, i64 0
%25 = call i32 @test_function(i32 84739, i32 122, i32 2847, i32 9308, i32 12345, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %24, i32* %8)
store i32 %25, i32* %7
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %26, i32 %27)
%29 = load i32, i32* %7
%30 = icmp eq i32 %29, 84739
br i1 %30, label %31, label %36
31: ; preds = %23
%32 = load i32, i32* %8
%33 = icmp eq i32 %32, -1073614835
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %53
36: ; preds = %31, %23
%37 = call i32 @test_function(i32 72, i32 72, i32 9374, i32 1038, i32 43879, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* %8)
store i32 %37, i32* %7
%38 = load i32, i32* %7
%39 = load i32, i32* %8
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %38, i32 %39)
%41 = load i32, i32* %7
%42 = load i32, i32* %8
%43 = call i32 @checkpoint3(i32 %41, i32 %42)
%44 = load i32, i32* %7
%45 = icmp eq i32 %44, 4567
br i1 %45, label %46, label %51
46: ; preds = %36
%47 = load i32, i32* %8
%48 = icmp eq i32 %47, 12630803
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
br label %53
51: ; preds = %46, %36
%52 = call i32 (...) @default_case()
br label %53
53: ; preds = %51, %49, %34, %21
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.buf = [25 x i8] c"8*3+1 chars of string...\00"
@.str = [11 x i8] c"%s: start\0A\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/mozz/refs/heads/master/test/function_test.c\00"
@.str.2 = [16 x i8] c"secretadminpass\00"
@.str.3 = [27 x i8] c"status = %d, status2 = %x\0A\00"
@.str.5 = [13 x i8] c"c00lpass1337\00"
@.str.7 = [5 x i8] c"asdf\00"
@.str.8 = [5 x i8] c"qwer\00"
@.str.10 = [10 x i8] c"%s: exit\0A\00"
@str = [9 x i8] c"asdfqwer\00"
@str.11 = [21 x i8] c"normal pass accepted\00"
@str.12 = [20 x i8] c"admin pass accepted\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [25 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @test_function(i32 2345, i32 120, i32 98, i32 789, i32 2346, i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 %9)
%11 = icmp eq i32 %8, 3456
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 2591
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.12, i64 0, i64 0))
br label %41
17: ; preds = %2
%18 = call i32 @test_function(i32 84739, i32 122, i32 2847, i32 9308, i32 12345, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %5, i32* %4)
%19 = load i32, i32* %4
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %19)
%21 = icmp eq i32 %18, 84739
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, -1073614835
%24 = select i1 %21, i1 %23, i1 false
br i1 %24, label %25, label %27
25: ; preds = %17
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0))
br label %41
27: ; preds = %17
%28 = call i32 @test_function(i32 72, i32 72, i32 9374, i32 1038, i32 43879, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* %4)
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %28, i32 %29)
%31 = load i32, i32* %4
%32 = call i32 @checkpoint3(i32 %28, i32 %31)
%33 = icmp eq i32 %28, 4567
%34 = load i32, i32* %4
%35 = icmp eq i32 %34, 12630803
%36 = select i1 %33, i1 %35, i1 false
br i1 %36, label %37, label %39
37: ; preds = %27
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %41
39: ; preds = %27
%40 = call i32 (...) @default_case()
br label %41
41: ; preds = %39, %37, %25, %15
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}