#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(int);
int fitness(char *, char *, int);
int /*<<< orphan*/ printf(char *);
void run_tests(void) {
  assert(000 == fitness("Hello, world!", "Hello, world!", 13));
  assert(399 == fitness("H5p&J;!l<X\\7l", "Hello, world!", 13));
  assert(297 == fitness("Vc;fx#QRP8V\\$", "Hello, world!", 13));
  assert(415 == fitness("t\\O`E_Jx$n=NF", "Hello, world!", 13));
  printf("Tests passed.\n\n");
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rsi
mov    $0xd,%edx
mov    %rsi,%rdi
call   1040 <fitness@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xeac(%rip),%rdi
lea    0xe97(%rip),%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
mov    %eax,%ecx
mov    $0x18f,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe8c(%rip),%rdi
lea    0xe69(%rip),%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
mov    %eax,%ecx
mov    $0x129,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe6c(%rip),%rdi
lea    0xe3b(%rip),%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
mov    %eax,%ecx
mov    $0x19f,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
xor    %edi,%edi
cmp    $0x18f,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
xor    %edi,%edi
cmp    $0x129,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xe86(%rip),%rdi
mov    %rbx,%rsi
mov    $0xd,%edx
call   1040 <fitness@plt>
xor    %edi,%edi
cmp    $0x19f,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xe70(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
@.str.1 = [14 x i8] c"H5p&J;!l<X\\7l\00"
@.str.2 = [14 x i8] c"Vc;fx#QRP8V\\$\00"
@.str.3 = [14 x i8] c"t\\O`E_Jx$n=NF\00"
@.str.4 = [16 x i8] c"Tests passed.\0A\0A\00"
define void @run_tests() {
%1 = call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = icmp eq i32 0, %1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%6 = icmp eq i32 399, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%10 = icmp eq i32 297, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%14 = icmp eq i32 415, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
@.str.1 = [14 x i8] c"H5p&J;!l<X\\7l\00"
@.str.2 = [14 x i8] c"Vc;fx#QRP8V\\$\00"
@.str.3 = [14 x i8] c"t\\O`E_Jx$n=NF\00"
@str = [15 x i8] c"Tests passed.\0A\00"
define void @run_tests() {
%1 = tail call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%6 = icmp eq i32 %5, 399
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%10 = icmp eq i32 %9, 297
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @fitness(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%14 = icmp eq i32 %13, 415
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}