#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*/ crypto_hash(unsigned char *, char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned char);
int main() {
  unsigned char h[64];
  crypto_hash(h, "The quick brown fox jumps over the lazy dog.", 44);
  for (int i = 0; i < 64; i++) {
    printf("%02x", h[i]);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x2c,%edx
call   1030 <crypto_hash@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x40,-0x54(%rbp)
jge    1188 <main+0x58>
movslq -0x54(%rbp),%rax
lea    0xebd(%rip),%rdi
movzbl -0x50(%rbp,%rax,1),%esi
call   1040 <printf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    115b <main+0x2b>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
lea    0xec2(%rip),%rsi
mov    %rsp,%rdi
mov    $0x2c,%edx
call   1030 <crypto_hash@plt>
xor    %ebx,%ebx
lea    0xed9(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x40,%rbx
jne    1160 <main+0x30>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"The quick brown fox jumps over the lazy dog.\00"
@.str.1 = [5 x i8] c"%02x\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = call i32 @crypto_hash(i8* %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 44)
store i32 0, i32* %3
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 64
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %6
18: ; preds = %6
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"The quick brown fox jumps over the lazy dog.\00"
@.str.1 = [5 x i8] c"%02x\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @crypto_hash(i8* %2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 44)
br label %6
4: ; preds = %6
%5 = call i32 @exit(i32 0)
unreachable
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %11, %6 ]
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, 64
br i1 %12, label %4, label %6
}