void test_reverse_with_no_characters(void) {
  char string[] = "";
  reverse(string);
  char expected[] = "";
  ((void)((strcmp(string, expected) == 0)
              ? ((void)0)
              : __test_fail(
                    "strcmp(string, expected) == 0",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/michaelreneer/"
                    "Algorithms/refs/heads/master/c/test/test_reverse.c",
                    __FUNCTION__, 47)));
}


x86 assembly (clang, -O0):
<test_reverse_with_no_characters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <memset@plt>
lea    -0x1(%rbp),%rdi
mov    $0x0,%al
call   1030 <reverse@plt>
lea    -0x2(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <memset@plt>
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    118e <test_reverse_with_no_characters+0x4e>
jmp    11af <test_reverse_with_no_characters+0x6f>
lea    0xe6b(%rip),%rdi
lea    0xe82(%rip),%rsi
lea    0xf16(%rip),%rdx
mov    $0x2f,%ecx
mov    $0x0,%al
call   1040 <__test_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reverse_with_no_characters>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <reverse@plt>
movb   $0x0,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1180 <test_reverse_with_no_characters+0x50>
lea    0xe9a(%rip),%rdi
lea    0xeb1(%rip),%rsi
lea    0xf45(%rip),%rdx
mov    $0x2f,%ecx
xor    %eax,%eax
call   1040 <__test_fail@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"strcmp(string, expected) == 0\00"
@.str.1 = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/michaelreneer/Algorithms/refs/heads/master/c/test/test_reverse.c\00"
@__FUNCTION__.test_reverse_with_no_characters = [32 x i8] c"test_reverse_with_no_characters\00"
define void @test_reverse_with_no_characters() {
%1 = alloca [1 x i8]
%2 = alloca [1 x i8]
%3 = bitcast [1 x i8]* %1 to i8*
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse to i32 (i8*, ...)*)(i8* %4)
%6 = bitcast [1 x i8]* %2 to i8*
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%9 = call i32 @strcmp(i8* %7, i8* %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
br label %14
12: ; preds = %0
%13 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @__test_fail to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @__FUNCTION__.test_reverse_with_no_characters, i64 0, i64 0), i32 47)
br label %14
14: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"strcmp(string, expected) == 0\00"
@.str.1 = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/michaelreneer/Algorithms/refs/heads/master/c/test/test_reverse.c\00"
@__FUNCTION__.test_reverse_with_no_characters = [32 x i8] c"test_reverse_with_no_characters\00"
define void @test_reverse_with_no_characters() {
%1 = alloca [1 x i8]
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 0, i8* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse to i32 (i8*, ...)*)(i8* %3)
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
store i8 0, i8* %5
%6 = call i32 @strcmp(i8* %3, i8* %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @__test_fail to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @__FUNCTION__.test_reverse_with_no_characters, i64 0, i64 0), i32 47)
br label %10
10: ; preds = %0, %8
ret void
}