#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_case(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ test_false(char *, int, char *, int);
int /*<<< orphan*/ test_true(char *, int, char *, int);
int test_bool(void) {
  if (!test_case(
          (0), "TEST_true(0)",
          (test_true(
              "/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/test_test.c",
              244, "0", (0) != 0))) |
      !test_case(
          (1), "TEST_true(1)",
          (test_true(
              "/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/test_test.c",
              245, "1", (1) != 0))) |
      !test_case(
          (1), "TEST_false(0)",
          (test_false(
              "/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/test_test.c",
              246, "0", (0) != 0))) |
      !test_case(
          (0), "TEST_false(1)",
          (test_false(
              "/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/test_test.c",
              247, "1", (1) != 0))))
    goto err;
  return 1;
err:
  return 0;
}


x86 assembly (clang, -O0):
<test_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xece(%rip),%rdi
mov    $0xf4,%esi
lea    0xf6f(%rip),%rdx
xor    %ecx,%ecx
call   1040 <test_true@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xea3(%rip),%rsi
call   1050 <test_case@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
lea    0xe94(%rip),%rdi
mov    $0xf5,%esi
lea    0xf44(%rip),%rdx
mov    $0x1,%ecx
call   1040 <test_true@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xf1f(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
lea    0xe4b(%rip),%rdi
mov    $0xf6,%esi
lea    0xeec(%rip),%rdx
xor    %ecx,%ecx
call   1030 <test_false@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xee8(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
lea    0xe05(%rip),%rdi
mov    $0xf7,%esi
lea    0xeb5(%rip),%rdx
mov    $0x1,%ecx
call   1030 <test_false@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xeb0(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1252 <test_bool+0x122>
jmp    125e <test_bool+0x12e>
movl   $0x1,-0x4(%rbp)
jmp    1265 <test_bool+0x135>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bool>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xece(%rip),%r12
lea    0xf74(%rip),%r14
mov    %r12,%rdi
mov    $0xf4,%esi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1040 <test_true@plt>
lea    0xea1(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
test   %eax,%eax
setne  %bpl
lea    0xf54(%rip),%r15
mov    %r12,%rdi
mov    $0xf5,%esi
mov    %r15,%rdx
mov    $0x1,%ecx
call   1040 <test_true@plt>
lea    0xf2b(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
test   %eax,%eax
setne  %bl
and    %bpl,%bl
mov    %r12,%rdi
mov    $0xf6,%esi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1030 <test_false@plt>
lea    0xf0d(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
test   %eax,%eax
setne  %bpl
mov    %r12,%rdi
mov    $0xf7,%esi
mov    %r15,%rdx
mov    $0x1,%ecx
call   1030 <test_false@plt>
lea    0xeed(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
test   %eax,%eax
setne  %al
and    %bpl,%al
and    %bl,%al
movzbl %al,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"TEST_true(0)\00"
@.str.1 = [173 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/test_test.c\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [13 x i8] c"TEST_true(1)\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [14 x i8] c"TEST_false(0)\00"
@.str.6 = [14 x i8] c"TEST_false(1)\00"
define i32 @test_bool() {
%1 = alloca i32
%2 = call i32 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 244, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%3 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 1)
%8 = call i32 @test_case(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = or i32 %6, %11
%13 = call i32 @test_false(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 246, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%14 = call i32 @test_case(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %13)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = or i32 %12, %17
%19 = call i32 @test_false(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 247, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 1)
%20 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = or i32 %18, %23
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %0
br label %28
27: ; preds = %0
store i32 1, i32* %1
br label %29
28: ; preds = %26
store i32 0, i32* %1
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
@.str = [13 x i8] c"TEST_true(0)\00"
@.str.1 = [173 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/test_test.c\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [13 x i8] c"TEST_true(1)\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [14 x i8] c"TEST_false(0)\00"
@.str.6 = [14 x i8] c"TEST_false(1)\00"
define i32 @test_bool() {
%1 = tail call i32 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 244, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%2 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, 0
%4 = tail call i32 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 1)
%5 = tail call i32 @test_case(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = icmp eq i32 %5, 0
%7 = or i1 %3, %6
%8 = tail call i32 @test_false(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 246, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0)
%9 = tail call i32 @test_case(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %8)
%10 = icmp eq i32 %9, 0
%11 = or i1 %7, %10
%12 = tail call i32 @test_false(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 247, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 1)
%13 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %12)
%14 = icmp eq i32 %13, 0
%15 = or i1 %11, %14
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}