#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);
scalar_t__ test(unsigned char *, int, char *);
int main() {
  assert(0 == test((unsigned char *)"", sizeof("") - 1,
                   "d41d8cd98f00b204e9800998ecf8427e"));
  assert(0 == test((unsigned char *)"foo bar", sizeof("foo bar") - 1,
                   "327b6f07435811239bc47e1544353273"));
  assert(0 == test((unsigned char *)"password", sizeof("password") - 1,
                   "5f4dcc3b5aa765d61d8327deb882cf99"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf13(%rip),%rdi
xor    %esi,%esi
lea    0xec1(%rip),%rdx
call   1040 <test@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xec1(%rip),%rdi
mov    $0x7,%esi
lea    0xebd(%rip),%rdx
call   1040 <test@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xebd(%rip),%rdi
mov    $0x8,%esi
lea    0xeba(%rip),%rdx
call   1040 <test@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf21(%rip),%rdi
lea    0xed1(%rip),%rdx
xor    %esi,%esi
call   1040 <test@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1030 <assert@plt>
lea    0xed6(%rip),%rdi
lea    0xed7(%rip),%rdx
mov    $0x7,%esi
call   1040 <test@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1030 <assert@plt>
lea    0xed9(%rip),%rdi
lea    0xedb(%rip),%rdx
mov    $0x8,%esi
call   1040 <test@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [33 x i8] c"d41d8cd98f00b204e9800998ecf8427e\00"
@.str.2 = [8 x i8] c"foo bar\00"
@.str.3 = [33 x i8] c"327b6f07435811239bc47e1544353273\00"
@.str.4 = [9 x i8] c"password\00"
@.str.5 = [33 x i8] c"5f4dcc3b5aa765d61d8327deb882cf99\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @test(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i64 0, %2
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i64 @test(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%7 = icmp eq i64 0, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i64 @test(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%11 = icmp eq i64 0, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [33 x i8] c"d41d8cd98f00b204e9800998ecf8427e\00"
@.str.2 = [8 x i8] c"foo bar\00"
@.str.3 = [33 x i8] c"327b6f07435811239bc47e1544353273\00"
@.str.4 = [9 x i8] c"password\00"
@.str.5 = [33 x i8] c"5f4dcc3b5aa765d61d8327deb882cf99\00"
define i32 @main() {
%1 = tail call i64 @test(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @test(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i64 @test(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
ret i32 0
}