#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 make_ti(int, int);
scalar_t__ test__subvti3(int, int);
int main() {
  if (test__subvti3(make_ti(0x8000000000000000LL, 0), -1))
    return 1;
  if (test__subvti3(make_ti(0x8000000000000000LL, 0), 0))
    return 1;
  if (test__subvti3(-1, make_ti(0x8000000000000000LL, 0)))
    return 1;
  if (test__subvti3(make_ti(0x7FFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL), 1))
    return 1;
  if (test__subvti3(make_ti(0x7FFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL), 0))
    return 1;
  if (test__subvti3(1, make_ti(0x7FFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL)))
    return 1;
  if (test__subvti3(0, make_ti(0x7FFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL)))
    return 1;
  if (test__subvti3(-1, make_ti(0x7FFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL)))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     115a <main+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     1182 <main+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     11ad <main+0x8d>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     11db <main+0xbb>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     1206 <main+0xe6>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     1234 <main+0x114>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     125f <main+0x13f>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <make_ti@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1030 <test__subvti3@plt>
cmp    $0x0,%rax
je     128d <main+0x16d>
movl   $0x1,-0x4(%rbp)
jmp    1294 <main+0x174>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <make_ti@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1030 <test__subvti3@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1228 <main+0x108>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <make_ti@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <make_ti@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <make_ti@plt>
mov    $0x1,%ebx
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <make_ti@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <make_ti@plt>
mov    $0x1,%ebx
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <make_ti@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1030 <test__subvti3@plt>
test   %rax,%rax
jne    1228 <main+0x108>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <make_ti@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1030 <test__subvti3@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @make_ti(i32 0, i32 0)
%3 = call i64 @test__subvti3(i32 %2, i32 -1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %42
6: ; preds = %0
%7 = call i32 @make_ti(i32 0, i32 0)
%8 = call i64 @test__subvti3(i32 %7, i32 0)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %1
br label %42
11: ; preds = %6
%12 = call i32 @make_ti(i32 0, i32 0)
%13 = call i64 @test__subvti3(i32 -1, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %1
br label %42
16: ; preds = %11
%17 = call i32 @make_ti(i32 -1, i32 -1)
%18 = call i64 @test__subvti3(i32 %17, i32 1)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %1
br label %42
21: ; preds = %16
%22 = call i32 @make_ti(i32 -1, i32 -1)
%23 = call i64 @test__subvti3(i32 %22, i32 0)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %1
br label %42
26: ; preds = %21
%27 = call i32 @make_ti(i32 -1, i32 -1)
%28 = call i64 @test__subvti3(i32 1, i32 %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 1, i32* %1
br label %42
31: ; preds = %26
%32 = call i32 @make_ti(i32 -1, i32 -1)
%33 = call i64 @test__subvti3(i32 0, i32 %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %31
store i32 1, i32* %1
br label %42
36: ; preds = %31
%37 = call i32 @make_ti(i32 -1, i32 -1)
%38 = call i64 @test__subvti3(i32 -1, i32 %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %36
store i32 1, i32* %1
br label %42
41: ; preds = %36
store i32 0, i32* %1
br label %42
42: ; preds = %41, %40, %35, %30, %25, %20, %15, %10, %5
%43 = load i32, i32* %1
ret i32 %43
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @make_ti(i32 0, i32 0)
%2 = tail call i64 @test__subvti3(i32 %1, i32 -1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %33
4: ; preds = %0
%5 = tail call i32 @make_ti(i32 0, i32 0)
%6 = tail call i64 @test__subvti3(i32 %5, i32 0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %33
8: ; preds = %4
%9 = tail call i32 @make_ti(i32 0, i32 0)
%10 = tail call i64 @test__subvti3(i32 -1, i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %33
12: ; preds = %8
%13 = tail call i32 @make_ti(i32 -1, i32 -1)
%14 = tail call i64 @test__subvti3(i32 %13, i32 1)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %33
16: ; preds = %12
%17 = tail call i32 @make_ti(i32 -1, i32 -1)
%18 = tail call i64 @test__subvti3(i32 %17, i32 0)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %16
%21 = tail call i32 @make_ti(i32 -1, i32 -1)
%22 = tail call i64 @test__subvti3(i32 1, i32 %21)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %33
24: ; preds = %20
%25 = tail call i32 @make_ti(i32 -1, i32 -1)
%26 = tail call i64 @test__subvti3(i32 0, i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %24
%29 = tail call i32 @make_ti(i32 -1, i32 -1)
%30 = tail call i64 @test__subvti3(i32 -1, i32 %29)
%31 = icmp ne i64 %30, 0
%32 = zext i1 %31 to i32
br label %33
33: ; preds = %28, %24, %20, %16, %12, %8, %4, %0
%34 = phi i32 [ 1, %0 ], [ 1, %4 ], [ 1, %8 ], [ 1, %12 ], [ 1, %16 ], [ 1, %20 ], [ 1, %24 ], [ %32, %28 ]
ret i32 %34
}