#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*/ PHC_test();
int /*<<< orphan*/ simpletest(char *, char *, char *, int);
int main() {
  simpletest("password", "salt", "", 1);
  simpletest("password", "salt", "", 10);
  simpletest("password", "salt", "data", 10);
  simpletest("passwordPASSWORDpassword", "saltSALTsaltSALTsaltSALTsaltSALTsalt",
             "", 10);
  PHC_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xedf(%rip),%rdi
lea    0xf01(%rip),%rsi
lea    0xec0(%rip),%rdx
mov    $0x1,%ecx
call   1040 <simpletest@plt>
lea    0xec0(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xea1(%rip),%rdx
mov    $0xa,%ecx
call   1040 <simpletest@plt>
lea    0xea1(%rip),%rdi
lea    0xec3(%rip),%rsi
lea    0xe7e(%rip),%rdx
mov    $0xa,%ecx
call   1040 <simpletest@plt>
lea    0xe72(%rip),%rdi
lea    0xe84(%rip),%rsi
lea    0xe63(%rip),%rdx
mov    $0xa,%ecx
call   1040 <simpletest@plt>
mov    $0x0,%al
call   1030 <PHC_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee9(%rip),%rbx
lea    0xf0b(%rip),%r14
lea    0xeca(%rip),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x1,%ecx
call   1040 <simpletest@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0xa,%ecx
call   1040 <simpletest@plt>
lea    0xe99(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xa,%ecx
call   1040 <simpletest@plt>
lea    0xe87(%rip),%rdi
lea    0xe99(%rip),%rsi
mov    %r15,%rdx
mov    $0xa,%ecx
call   1040 <simpletest@plt>
xor    %eax,%eax
call   1030 <PHC_test@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"password\00"
@.str.1 = [5 x i8] c"salt\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [5 x i8] c"data\00"
@.str.4 = [25 x i8] c"passwordPASSWORDpassword\00"
@.str.5 = [37 x i8] c"saltSALTsaltSALTsaltSALTsaltSALTsalt\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 1)
%3 = call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10)
%4 = call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 10)
%5 = call i32 @simpletest(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10)
%6 = call i32 (...) @PHC_test()
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"password\00"
@.str.1 = [5 x i8] c"salt\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [5 x i8] c"data\00"
@.str.4 = [25 x i8] c"passwordPASSWORDpassword\00"
@.str.5 = [37 x i8] c"saltSALTsaltSALTsaltSALTsaltSALTsalt\00"
define i32 @main() {
%1 = tail call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 1)
%2 = tail call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10)
%3 = tail call i32 @simpletest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 10)
%4 = tail call i32 @simpletest(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10)
%5 = tail call i32 (...) @PHC_test()
ret i32 0
}