#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*/ strlen(char const *);
int test_case(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ test_mem_eq(char *, int, char *, char *, char const *,
                               int /*<<< orphan*/, char const *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ test_str_eq(char *, int, char *, char *, char const *,
                               char const *);
int test_long_output(void) {
  const char *p = "1234567890123456789012345678901234567890123456789012";
  const char *q = "1234567890klmnopqrs01234567890EFGHIJKLM0123456789XYZ";
  const char *r = "1234567890123456789012345678901234567890123456789012"
                  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY+"
                  "12345678901234567890123ABC78901234567890123456789012";
  const char *s = "1234567890123456789012345678901234567890123456789012"
                  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY-"
                  "1234567890123456789012345678901234567890123456789012"
                  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  return test_case((0), "TEST_str_eq(p, q)",
                   (test_str_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/test_test.c",
                                394, "p", "q", p, q))) &
         test_case((0), "TEST_str_eq(q, r)",
                   (test_str_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/test_test.c",
                                395, "q", "r", q, r))) &
         test_case((0), "TEST_str_eq(r, s)",
                   (test_str_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/test_test.c",
                                396, "r", "s", r, s))) &
         test_case((0), "TEST_mem_eq(r, strlen(r), s, strlen(s))",
                   (test_mem_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/test_test.c",
                                397, "r", "s", r, strlen(r), s, strlen(s))));
}


x86 assembly (clang, -O0):
<test_long_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xf05(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xf97(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0x1067(%rip),%rdi
mov    $0x18a,%esi
lea    0x1108(%rip),%rdx
lea    0x1103(%rip),%rcx
call   1040 <test_str_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0x1032(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0x102d(%rip),%rdi
mov    $0x18b,%esi
lea    0x10d0(%rip),%rdx
lea    0x10dd(%rip),%rcx
call   1040 <test_str_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0x10bb(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xfec(%rip),%rdi
mov    $0x18c,%esi
lea    0x10a3(%rip),%rdx
lea    0x10b0(%rip),%rcx
call   1040 <test_str_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0x108e(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x40(%rbp),%r8
mov    -0x34(%rbp),%r9d
mov    -0x30(%rbp),%r10
lea    0xf82(%rip),%rdi
mov    $0x18d,%esi
lea    0x1039(%rip),%rdx
lea    0x1046(%rip),%rcx
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1060 <test_mem_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0x1030(%rip),%rsi
call   1050 <test_case@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
and    %ecx,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_long_output>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0x1098(%rip),%rbp
lea    0x113e(%rip),%rdx
lea    0x1139(%rip),%r13
lea    0xe99(%rip),%r8
lea    0xec7(%rip),%r14
mov    %rbp,%rdi
mov    $0x18a,%esi
mov    %r13,%rcx
mov    %r14,%r9
call   1040 <test_str_eq@plt>
lea    0x1050(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
mov    %eax,%ebx
lea    0x1113(%rip),%rcx
lea    0xec9(%rip),%r12
mov    %rbp,%rdi
mov    $0x18b,%esi
mov    %r13,%rdx
mov    %rcx,%r13
mov    %r14,%r8
mov    %r12,%r9
call   1040 <test_str_eq@plt>
lea    0x10da(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
mov    %eax,%r14d
and    %ebx,%r14d
lea    0x10ea(%rip),%rcx
lea    0xf29(%rip),%r15
mov    %rbp,%rdi
mov    $0x18c,%esi
mov    %r13,%rdx
mov    %r12,%r8
mov    %r15,%r9
call   1040 <test_str_eq@plt>
lea    0x10b4(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
mov    %eax,%ebp
and    %r14d,%ebp
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1030 <strlen@plt>
lea    0xfc8(%rip),%rdi
mov    $0x18d,%esi
mov    %r13,%rdx
lea    0x1090(%rip),%rcx
mov    %r12,%r8
mov    %ebx,%r9d
push   %rax
push   %r15
call   1060 <test_mem_eq@plt>
add    $0x10,%rsp
lea    0x1079(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1050 <test_case@plt>
and    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"1234567890123456789012345678901234567890123456789012\00"
@.str.1 = [53 x i8] c"1234567890klmnopqrs01234567890EFGHIJKLM0123456789XYZ\00"
@.str.2 = [157 x i8] c"1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY+12345678901234567890123ABC78901234567890123456789012\00"
@.str.3 = [209 x i8] c"1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY-1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.4 = [18 x i8] c"TEST_str_eq(p, q)\00"
@.str.5 = [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.6 = [2 x i8] c"p\00"
@.str.7 = [2 x i8] c"q\00"
@.str.8 = [18 x i8] c"TEST_str_eq(q, r)\00"
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [18 x i8] c"TEST_str_eq(r, s)\00"
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [40 x i8] c"TEST_mem_eq(r, strlen(r), s, strlen(s))\00"
define i32 @test_long_output() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.3, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 394, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %2
%10 = load i8*, i8** %3
%11 = call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 395, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* %9, i8* %10)
%12 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %11)
%13 = and i32 %8, %12
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 396, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* %14, i8* %15)
%17 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %16)
%18 = and i32 %13, %17
%19 = load i8*, i8** %3
%20 = load i8*, i8** %3
%21 = call i32 @strlen(i8* %20)
%22 = load i8*, i8** %4
%23 = load i8*, i8** %4
%24 = call i32 @strlen(i8* %23)
%25 = call i32 @test_mem_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 397, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* %19, i32 %21, i8* %22, i32 %24)
%26 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = and i32 %18, %26
ret i32 %27
}

LLVM IR (-O2):
@.str = [53 x i8] c"1234567890123456789012345678901234567890123456789012\00"
@.str.1 = [53 x i8] c"1234567890klmnopqrs01234567890EFGHIJKLM0123456789XYZ\00"
@.str.2 = [157 x i8] c"1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY+12345678901234567890123ABC78901234567890123456789012\00"
@.str.3 = [209 x i8] c"1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY-1234567890123456789012345678901234567890123456789012abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.4 = [18 x i8] c"TEST_str_eq(p, q)\00"
@.str.5 = [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.6 = [2 x i8] c"p\00"
@.str.7 = [2 x i8] c"q\00"
@.str.8 = [18 x i8] c"TEST_str_eq(q, r)\00"
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [18 x i8] c"TEST_str_eq(r, s)\00"
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [40 x i8] c"TEST_mem_eq(r, strlen(r), s, strlen(s))\00"
define i32 @test_long_output() {
%1 = tail call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 394, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %1)
%3 = tail call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 395, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %3)
%5 = and i32 %4, %2
%6 = tail call i32 @test_str_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 396, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %6)
%8 = and i32 %5, %7
%9 = tail call i32 @strlen(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @strlen(i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 @test_mem_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.5, i64 0, i64 0), i32 397, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i64 0, i64 0), i32 %9, i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = tail call i32 @test_case(i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 %11)
%13 = and i32 %8, %12
ret i32 %13
}