#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*/ encrypt(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int verify(char *, char *);
int main() {
  char hash_output[34 + 1];
  encrypt(hash_output, "123456");
  printf("%s\n", hash_output);
  printf("%d\n", verify("123456", "$H$9wXDkkAvY1XanMapy6OgnEVNS0ifOu1"));
  printf("%d\n", verify("123456", hash_output));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1040 <encrypt@plt>
lea    -0x30(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1050 <verify@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xe78(%rip),%rdi
call   1050 <verify@plt>
mov    %eax,%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0xeb0(%rip),%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <encrypt@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1060 <verify@plt>
lea    0xe8b(%rip),%r15
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <verify@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"123456\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [35 x i8] c"$H$9wXDkkAvY1XanMapy6OgnEVNS0ifOu1\00"
define i32 @main() {
%1 = alloca [35 x i8]
%2 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%3 = call i32 @encrypt(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @verify(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%9 = call i32 @verify(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"123456\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [35 x i8] c"$H$9wXDkkAvY1XanMapy6OgnEVNS0ifOu1\00"
define i32 @main() {
%1 = alloca [35 x i8]
%2 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%3 = call i32 @encrypt(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @puts(i8* %2)
%5 = call i32 @verify(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @verify(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}