#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*/ MD5(unsigned char *, int, unsigned char *);
char *flu64_encode(char *, int);
unsigned char *md(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned char *d = md("toto");
  printf(">%s<\n", d);
  printf(">%s<\n", flu64_encode((char *)d, -1));
  MD5((unsigned char *)"toto", 4, d);
  printf(">%s<\n", d);
  printf(">%s<\n", flu64_encode((char *)d, -1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <md@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1050 <flu64_encode@plt>
mov    %rax,%rsi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdx
lea    0xe6c(%rip),%rdi
mov    $0x4,%esi
call   1060 <MD5@plt>
mov    -0x8(%rbp),%rsi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1050 <flu64_encode@plt>
mov    %rax,%rsi
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xeb4(%rip),%r15
mov    %r15,%rdi
call   1040 <md@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%r14
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1050 <flu64_encode@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1060 <MD5@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1050 <flu64_encode@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"toto\00"
@.str.1 = [6 x i8] c">%s<\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i8* @md(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %1
%6 = call i8* @flu64_encode(i8* %5, i32 -1)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 @MD5(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4, i8* %8)
%10 = load i8*, i8** %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %1
%13 = call i8* @flu64_encode(i8* %12, i32 -1)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"toto\00"
@.str.1 = [6 x i8] c">%s<\0A\00"
define i32 @main() {
%1 = tail call i8* @md(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i8* @flu64_encode(i8* %1, i32 -1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i32 @MD5(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4, i8* %1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = tail call i8* @flu64_encode(i8* %1, i32 -1)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}