#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*/ test_int_eq(char *, int, char *, char *, int,
                               int /*<<< orphan*/);
int /*<<< orphan*/ test_long_eq(char *, int, char *, char *, long, long);
int test_sanity_twos_complement(void) {
  if (!test_int_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/sanitytest.c",
          52, "~(-1)", "0", ~(-1), 0) ||
      !test_long_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/sanitytest.c",
          53, "~(-1L)", "0L", ~(-1L), 0L))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<test_sanity_twos_complement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x34,%esi
lea    0xf73(%rip),%rdx
lea    0xf72(%rip),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1040 <test_int_eq@plt>
cmp    $0x0,%eax
je     1186 <test_sanity_twos_complement+0x66>
lea    0xea3(%rip),%rdi
mov    $0x35,%esi
lea    0xf4d(%rip),%rdx
lea    0xf4d(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%r8
call   1030 <test_long_eq@plt>
cmp    $0x0,%eax
jne    1192 <test_sanity_twos_complement+0x72>
movl   $0x0,-0x4(%rbp)
jmp    1199 <test_sanity_twos_complement+0x79>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sanity_twos_complement>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xf7f(%rip),%rdx
lea    0xf7e(%rip),%rcx
xor    %ebx,%ebx
mov    $0x34,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <test_int_eq@plt>
test   %eax,%eax
je     1178 <test_sanity_twos_complement+0x58>
lea    0xead(%rip),%rdi
lea    0xf5c(%rip),%rdx
lea    0xf5c(%rip),%rcx
mov    $0x35,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <test_long_eq@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [6 x i8] c"~(-1)\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [7 x i8] c"~(-1L)\00"
@.str.4 = [3 x i8] c"0L\00"
define i32 @test_sanity_twos_complement() {
%1 = alloca i32
%2 = call i32 @test_int_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @test_long_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 0, i64 0)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %4, %0
store i32 0, i32* %1
br label %9
8: ; preds = %4
store i32 1, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [6 x i8] c"~(-1)\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [7 x i8] c"~(-1L)\00"
@.str.4 = [3 x i8] c"0L\00"
define i32 @test_sanity_twos_complement() {
%1 = tail call i32 @test_int_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @test_long_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 0, i64 0)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}