#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*/ snprintf(char *, int, char *, unsigned char, unsigned char,
                            unsigned char, unsigned char, unsigned char,
                            unsigned char, unsigned char, unsigned char,
                            unsigned char, unsigned char, unsigned char,
                            unsigned char, unsigned char, unsigned char,
                            unsigned char, unsigned char, char);
char *ndb_util_printMD5(unsigned char *md5) {
  static char s_digest[40];
  snprintf(s_digest, 40 - 1,
           "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%c",
           md5[0], md5[1], md5[2], md5[3], md5[4], md5[5], md5[6], md5[7],
           md5[8], md5[9], md5[10], md5[11], md5[12], md5[13], md5[14], md5[15],
           '\0');
  return s_digest;
}


x86 assembly (clang, -O0):
<ndb_util_printMD5>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%cl
mov    -0x30(%rbp),%rax
mov    0x1(%rax),%r8b
mov    -0x30(%rbp),%rax
mov    0x2(%rax),%r9b
mov    -0x30(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x3d(%rbp)
mov    -0x30(%rbp),%rax
mov    0x4(%rax),%al
mov    %al,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
mov    0x5(%rax),%al
mov    %al,-0x3b(%rbp)
mov    -0x30(%rbp),%rax
mov    0x6(%rax),%al
mov    %al,-0x3a(%rbp)
mov    -0x30(%rbp),%rax
mov    0x7(%rax),%al
mov    %al,-0x39(%rbp)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%r13b
mov    -0x30(%rbp),%rax
mov    0x9(%rax),%r12b
mov    -0x30(%rbp),%rax
mov    0xa(%rax),%r15b
mov    -0x30(%rbp),%rax
mov    0xb(%rax),%r14b
mov    -0x30(%rbp),%rax
mov    0xc(%rax),%bl
mov    -0x30(%rbp),%rax
mov    0xd(%rax),%r11b
mov    -0x30(%rbp),%rax
mov    0xe(%rax),%r10b
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    0x2e8a(%rip),%rdi
mov    $0x27,%esi
lea    0xe3e(%rip),%rdx
xor    %eax,%eax
mov    -0x3d(%rbp),%al
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %al,%eax
mov    %eax,(%rsp)
mov    -0x3c(%rbp),%al
movzbl %al,%eax
mov    %eax,0x8(%rsp)
mov    -0x3b(%rbp),%al
movzbl %al,%eax
mov    %eax,0x10(%rsp)
mov    -0x3a(%rbp),%al
movzbl %al,%eax
mov    %eax,0x18(%rsp)
mov    -0x39(%rbp),%al
movzbl %al,%eax
mov    %eax,0x20(%rsp)
mov    -0x38(%rbp),%rax
movzbl %r13b,%r13d
mov    %r13d,0x28(%rsp)
movzbl %r12b,%r12d
mov    %r12d,0x30(%rsp)
movzbl %r15b,%r15d
mov    %r15d,0x38(%rsp)
movzbl %r14b,%r14d
mov    %r14d,0x40(%rsp)
movzbl %bl,%ebx
mov    %ebx,0x48(%rsp)
movzbl %r11b,%r11d
mov    %r11d,0x50(%rsp)
movzbl %r10b,%r10d
mov    %r10d,0x58(%rsp)
movzbl 0xf(%rax),%eax
mov    %eax,0x60(%rsp)
movl   $0x0,0x68(%rsp)
call   1030 <snprintf@plt>
lea    0x2de3(%rip),%rax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndb_util_printMD5>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movzbl (%rdi),%ecx
movzbl 0x1(%rdi),%r8d
movzbl 0x2(%rdi),%r9d
movzbl 0x3(%rdi),%eax
mov    %rax,0x20(%rsp)
movzbl 0x4(%rdi),%eax
mov    %rax,0x18(%rsp)
movzbl 0x5(%rdi),%eax
mov    %rax,0x10(%rsp)
movzbl 0x6(%rdi),%eax
mov    %rax,0x8(%rsp)
movzbl 0x7(%rdi),%r13d
movzbl 0x8(%rdi),%ebx
movzbl 0x9(%rdi),%eax
movzbl 0xa(%rdi),%ebp
movzbl 0xb(%rdi),%r14d
movzbl 0xc(%rdi),%r10d
movzbl 0xd(%rdi),%r11d
movzbl 0xe(%rdi),%r15d
movzbl 0xf(%rdi),%r12d
lea    0x2ec0(%rip),%rdi
lea    0xe79(%rip),%rdx
mov    $0x27,%esi
push   $0x0
push   %r12
push   %r15
push   %r11
push   %r10
push   %r14
push   %rbp
push   %rax
push   %rbx
push   %r13
push   0x58(%rsp)
push   0x68(%rsp)
push   0x78(%rsp)
push   0x88(%rsp)
call   1030 <snprintf@plt>
add    $0x70,%rsp
lea    0x2e80(%rip),%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@ndb_util_printMD5.s_digest = internal global [40 x i8] zeroinitializer
@.str = [67 x i8] c"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%c\00"
define i8* @ndb_util_printMD5(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 3
%14 = load i8, i8* %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 4
%17 = load i8, i8* %16
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 5
%20 = load i8, i8* %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 6
%23 = load i8, i8* %22
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 7
%26 = load i8, i8* %25
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i64 8
%29 = load i8, i8* %28
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i64 9
%32 = load i8, i8* %31
%33 = load i8*, i8** %2
%34 = getelementptr inbounds i8, i8* %33, i64 10
%35 = load i8, i8* %34
%36 = load i8*, i8** %2
%37 = getelementptr inbounds i8, i8* %36, i64 11
%38 = load i8, i8* %37
%39 = load i8*, i8** %2
%40 = getelementptr inbounds i8, i8* %39, i64 12
%41 = load i8, i8* %40
%42 = load i8*, i8** %2
%43 = getelementptr inbounds i8, i8* %42, i64 13
%44 = load i8, i8* %43
%45 = load i8*, i8** %2
%46 = getelementptr inbounds i8, i8* %45, i64 14
%47 = load i8, i8* %46
%48 = load i8*, i8** %2
%49 = getelementptr inbounds i8, i8* %48, i64 15
%50 = load i8, i8* %49
%51 = call i32 @snprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @ndb_util_printMD5.s_digest, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8 zeroext %5, i8 zeroext %8, i8 zeroext %11, i8 zeroext %14, i8 zeroext %17, i8 zeroext %20, i8 zeroext %23, i8 zeroext %26, i8 zeroext %29, i8 zeroext %32, i8 zeroext %35, i8 zeroext %38, i8 zeroext %41, i8 zeroext %44, i8 zeroext %47, i8 zeroext %50, i8 signext 0)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @ndb_util_printMD5.s_digest, i64 0, i64 0)
}

LLVM IR (-O2):
@ndb_util_printMD5.s_digest = internal global [40 x i8] zeroinitializer
@.str = [67 x i8] c"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%c\00"
define i8* @ndb_util_printMD5(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %0, i64 5
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 6
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %0, i64 7
%16 = load i8, i8* %15
%17 = getelementptr inbounds i8, i8* %0, i64 8
%18 = load i8, i8* %17
%19 = getelementptr inbounds i8, i8* %0, i64 9
%20 = load i8, i8* %19
%21 = getelementptr inbounds i8, i8* %0, i64 10
%22 = load i8, i8* %21
%23 = getelementptr inbounds i8, i8* %0, i64 11
%24 = load i8, i8* %23
%25 = getelementptr inbounds i8, i8* %0, i64 12
%26 = load i8, i8* %25
%27 = getelementptr inbounds i8, i8* %0, i64 13
%28 = load i8, i8* %27
%29 = getelementptr inbounds i8, i8* %0, i64 14
%30 = load i8, i8* %29
%31 = getelementptr inbounds i8, i8* %0, i64 15
%32 = load i8, i8* %31
%33 = tail call i32 @snprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @ndb_util_printMD5.s_digest, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8 zeroext %2, i8 zeroext %4, i8 zeroext %6, i8 zeroext %8, i8 zeroext %10, i8 zeroext %12, i8 zeroext %14, i8 zeroext %16, i8 zeroext %18, i8 zeroext %20, i8 zeroext %22, i8 zeroext %24, i8 zeroext %26, i8 zeroext %28, i8 zeroext %30, i8 zeroext %32, i8 signext 0)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @ndb_util_printMD5.s_digest, i64 0, i64 0)
}