void test_reverse_with_ten_characters(void) {
  char string[] = "asdfghjklz";
  reverse(string);
  char expected[] = "zlkjhgfdsa";
  ((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__, 33)));
}


x86 assembly (clang, -O0):
<test_reverse_with_ten_characters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xb(%rbp),%rdi
mov    $0x0,%al
call   1030 <reverse@plt>
mov    0xea2(%rip),%rax
mov    %rax,-0x16(%rbp)
mov    0xe9f(%rip),%ax
mov    %ax,-0xe(%rbp)
mov    0xe97(%rip),%al
mov    %al,-0xc(%rbp)
lea    -0xb(%rbp),%rdi
lea    -0x16(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    119c <test_reverse_with_ten_characters+0x6c>
jmp    11bd <test_reverse_with_ten_characters+0x8d>
lea    0xe73(%rip),%rdi
lea    0xe8a(%rip),%rsi
lea    0xf1e(%rip),%rdx
mov    $0x21,%ecx
mov    $0x0,%al
call   1040 <__test_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reverse_with_ten_characters>:
sub    $0x18,%rsp
movabs $0x6b6a686766647361,%rax
68 6a 6b
mov    %rax,0x8(%rsp)
movl   $0x7a6c6b,0xf(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1030 <reverse@plt>
movabs $0x646667686a6b6c7a,%rax
67 66 64
xor    0x8(%rsp),%rax
movabs $0x6173646667686a,%rcx
xor    0xb(%rsp),%rcx
or     %rax,%rcx
je     118b <test_reverse_with_ten_characters+0x6b>
lea    0xea5(%rip),%rdi
lea    0xebc(%rip),%rsi
lea    0xf50(%rip),%rdx
mov    $0x21,%ecx
xor    %eax,%eax
call   1040 <__test_fail@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_reverse_with_ten_characters.string = [11 x i8] c"asdfghjklz\00"
@__const.test_reverse_with_ten_characters.expected = [11 x i8] c"zlkjhgfdsa\00"
@.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_ten_characters = [33 x i8] c"test_reverse_with_ten_characters\00"
define void @test_reverse_with_ten_characters() {
%1 = alloca [11 x i8]
%2 = alloca [11 x i8]
%3 = bitcast [11 x i8]* %1 to i8*
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse to i32 (i8*, ...)*)(i8* %4)
%6 = bitcast [11 x i8]* %2 to i8*
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [11 x i8], [11 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 ([33 x i8], [33 x i8]* @__FUNCTION__.test_reverse_with_ten_characters, i64 0, i64 0), i32 33)
br label %14
14: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@__const.test_reverse_with_ten_characters.string = [11 x i8] c"asdfghjklz\00"
@__const.test_reverse_with_ten_characters.expected = [11 x i8] c"zlkjhgfdsa\00"
@.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_ten_characters = [33 x i8] c"test_reverse_with_ten_characters\00"
define void @test_reverse_with_ten_characters() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 @bcmp(i8* dereferenceable(11) %2, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @__const.test_reverse_with_ten_characters.expected, i64 0, i64 0), i64 11)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = 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 ([33 x i8], [33 x i8]* @__FUNCTION__.test_reverse_with_ten_characters, i64 0, i64 0), i32 33)
br label %8
8: ; preds = %0, %6
ret void
}