#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void inspect_fw_pmd5sum(char *label, uint8_t *val, char *text) {
  int i;
  printf("%-23s:", label);
  for (i = 0; i < 16; i++)
    printf(" %02x", val[i]);
  printf(" %s\n", text);
}


x86 assembly (clang, -O0):
<inspect_fw_pmd5sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    116e <inspect_fw_pmd5sum+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113d <inspect_fw_pmd5sum+0x2d>
mov    -0x18(%rbp),%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inspect_fw_pmd5sum>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%esi
lea    0xed2(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x14(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x18(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x1c(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x20(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x24(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x28(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2c(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x30(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x34(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x38(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x3c(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe04(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%-23s:\00"
@.str.1 = [6 x i8] c" %02x\00"
@.str.2 = [5 x i8] c" %s\0A\00"
define void @inspect_fw_pmd5sum(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 0, i32* %7
br label %10
10: ; preds = %20, %3
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 16
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i32*, i32** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %13
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %10
23: ; preds = %10
%24 = load i8*, i8** %6
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%-23s:\00"
@.str.1 = [6 x i8] c" %02x\00"
@.str.2 = [5 x i8] c" %s\0A\00"
define void @inspect_fw_pmd5sum(i8* %0, i32* nocapture %1, i8* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds i32, i32* %1, i64 1
%8 = load i32, i32* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds i32, i32* %1, i64 2
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds i32, i32* %1, i64 3
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds i32, i32* %1, i64 4
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds i32, i32* %1, i64 5
%20 = load i32, i32* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds i32, i32* %1, i64 6
%23 = load i32, i32* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds i32, i32* %1, i64 7
%26 = load i32, i32* %25
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds i32, i32* %1, i64 8
%29 = load i32, i32* %28
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds i32, i32* %1, i64 9
%32 = load i32, i32* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds i32, i32* %1, i64 10
%35 = load i32, i32* %34
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds i32, i32* %1, i64 11
%38 = load i32, i32* %37
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds i32, i32* %1, i64 12
%41 = load i32, i32* %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds i32, i32* %1, i64 13
%44 = load i32, i32* %43
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds i32, i32* %1, i64 14
%47 = load i32, i32* %46
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %47)
%49 = getelementptr inbounds i32, i32* %1, i64 15
%50 = load i32, i32* %49
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %50)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret void
}