#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 */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ _fail(char *);
int add64(int, int);
int /*<<< orphan*/ pass();
int sub64(int, int);
int main(void) {
  int64_t a = 1;
  int64_t b = 2;
  a = add64(a, b);
  if (a != 3) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c"
          ":"
          "26"
          " ");
  };
  a = sub64(a, b);
  if (a != 1) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c"
          ":"
          "30"
          " ");
  };
  a = add64(a, -4);
  if (a != -3) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c"
          ":"
          "34"
          " ");
  };
  a = add64(a, 3);
  if (a != 0) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c"
          ":"
          "38"
          " ");
  };
  a = 0;
  a = sub64(a, 1);
  if (a != -1) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c"
          ":"
          "43"
          " ");
  };
  pass();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1060 <add64@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1181 <main+0x41>
lea    0xe84(%rip),%rdi
call   1050 <_fail@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <sub64@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     11a5 <main+0x65>
lea    0xf1d(%rip),%rdi
call   1050 <_fail@plt>
mov    -0x8(%rbp),%edi
mov    $0xfffffffc,%esi
call   1060 <add64@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xfffffffd,-0x8(%rbp)
je     11cb <main+0x8b>
lea    0xfb4(%rip),%rdi
call   1050 <_fail@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1060 <add64@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11f1 <main+0xb1>
lea    0x104b(%rip),%rdi
call   1050 <_fail@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <sub64@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     121e <main+0xde>
lea    0x10db(%rip),%rdi
call   1050 <_fail@plt>
mov    $0x0,%al
call   1040 <pass@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <add64@plt>
mov    %eax,%ebx
cmp    $0x3,%eax
je     1163 <main+0x23>
lea    0xea2(%rip),%rdi
call   1050 <_fail@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <sub64@plt>
mov    %eax,%ebx
cmp    $0x1,%eax
je     1182 <main+0x42>
lea    0xf40(%rip),%rdi
call   1050 <_fail@plt>
mov    %ebx,%edi
mov    $0xfffffffc,%esi
call   1060 <add64@plt>
mov    %eax,%ebx
cmp    $0xfffffffd,%eax
je     11a1 <main+0x61>
lea    0xfde(%rip),%rdi
call   1050 <_fail@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1060 <add64@plt>
test   %eax,%eax
je     11bd <main+0x7d>
lea    0x107f(%rip),%rdi
call   1050 <_fail@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <sub64@plt>
cmp    $0xffffffff,%eax
je     11da <main+0x9a>
lea    0x111f(%rip),%rdi
call   1050 <_fail@plt>
xor    %eax,%eax
call   1040 <pass@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:26 \00"
@.str.1 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:30 \00"
@.str.2 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:34 \00"
@.str.3 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:38 \00"
@.str.4 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:43 \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @add64(i32 %4, i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 3
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @sub64(i32 %12, i32 %13)
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = load i32, i32* %2
%21 = call i32 @add64(i32 %20, i32 -4)
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = icmp ne i32 %22, -3
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %19
%27 = load i32, i32* %2
%28 = call i32 @add64(i32 %27, i32 3)
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %31, %26
store i32 0, i32* %2
%34 = load i32, i32* %2
%35 = call i32 @sub64(i32 %34, i32 1)
store i32 %35, i32* %2
%36 = load i32, i32* %2
%37 = icmp ne i32 %36, -1
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %38, %33
%41 = call i32 (...) @pass()
ret i32 0
}

LLVM IR (-O2):
@.str = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:26 \00"
@.str.1 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:30 \00"
@.str.2 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:34 \00"
@.str.3 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:38 \00"
@.str.4 = [189 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_int64.c:43 \00"
define i32 @main() {
%1 = tail call i32 @add64(i32 1, i32 2)
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @sub64(i32 %1, i32 2)
%7 = icmp eq i32 %6, 1
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = tail call i32 @add64(i32 %6, i32 -4)
%12 = icmp eq i32 %11, -3
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = tail call i32 @add64(i32 %11, i32 3)
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = tail call i32 @sub64(i32 0, i32 1)
%22 = icmp eq i32 %21, -1
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @_fail(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str.4, i64 0, i64 0))
br label %25
25: ; preds = %23, %20
%26 = tail call i32 (...) @pass()
ret i32 0
}