#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*/ Assert_real(int, char *, int, char *);
scalar_t__ strcmp(char *, char *);
char *strrev(char *);
void strrev_empty() {
  char buf[10];
  buf[0] = 0;
  Assert_real((strrev(buf) == buf),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/string/strrev.c",
              12, ("Expected to get buf back"));
  Assert_real((strcmp(buf, "") == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/string/strrev.c",
              13, ("Incorrect reversal"));
}


x86 assembly (clang, -O0):
<strrev_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0xa(%rbp)
lea    -0xa(%rbp),%rdi
call   1040 <strrev@plt>
lea    -0xa(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea5(%rip),%rsi
mov    $0xc,%edx
lea    0xf3c(%rip),%rcx
call   1050 <Assert_real@plt>
lea    -0xa(%rbp),%rdi
lea    0xf2b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe71(%rip),%rsi
mov    $0xd,%edx
lea    0xf21(%rip),%rcx
call   1050 <Assert_real@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrev_empty>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movb   $0x0,0xe(%rsp)
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strrev@plt>
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
lea    0xea7(%rip),%r14
lea    0xf43(%rip),%rcx
mov    %r14,%rsi
mov    $0xc,%edx
call   1050 <Assert_real@plt>
lea    0xf2e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xf30(%rip),%rcx
mov    %r14,%rsi
mov    $0xd,%edx
call   1050 <Assert_real@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/string/strrev.c\00"
@.str.1 = [25 x i8] c"Expected to get buf back\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [19 x i8] c"Incorrect reversal\00"
define void @strrev_empty() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i8* @strrev(i8* %3)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%6 = icmp eq i8* %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @Assert_real(i32 %7, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @Assert_real(i32 %12, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/string/strrev.c\00"
@.str.1 = [25 x i8] c"Expected to get buf back\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [19 x i8] c"Incorrect reversal\00"
define void @strrev_empty() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = call i8* @strrev(i8* %2)
%4 = icmp eq i8* %3, %2
%5 = zext i1 %4 to i32
%6 = call i32 @Assert_real(i32 %5, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%7 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @Assert_real(i32 %9, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
ret void
}