#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void dump(const char *title, void *data, size_t size) {
  int i, j;
  fprintf(stderr, "%s:\n", title);
  for (i = 0; i < size; i += 16) {
    fprintf(stderr, "  %04x", i);
    for (j = 0; j != 16 && i + j < size; j++)
      fprintf(stderr, " %02x", ((uint8_t *)data)[i + j]);
    fprintf(stderr, "\n");
  }
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1200 <dump+0xf0>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x10,-0x20(%rbp)
mov    %al,-0x21(%rbp)
je     1196 <dump+0x86>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
cltq
cmp    -0x18(%rbp),%rax
setb   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    11a6 <dump+0x96>
jmp    11db <dump+0xcb>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe46(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1175 <dump+0x65>
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x1c(%rbp)
jmp    1146 <dump+0x36>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %rbx,%rbx
je     1372 <dump+0x262>
mov    $0xf,%r15d
lea    0xeba(%rip),%r12
jmp    1182 <dump+0x72>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%rbp),%edi
lea    0xe99(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x10,%r15
add    $0xf,%r13
cmp    %rbx,%r13
jae    1372 <dump+0x262>
mov    0x0(%rbp),%edi
lea    -0xf(%r15),%edx
lea    0xe75(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    -0x3c(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0xe(%r15),%r13
cmp    %rbx,%r13
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x38(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0xd(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x34(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0xc(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x30(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0xb(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x2c(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0xa(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x28(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x9(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x24(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x8(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x20(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x7(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x1c(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x6(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x18(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x5(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x14(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x4(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x10(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x3(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0xc(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x2(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x8(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    -0x1(%r15),%rax
cmp    %rbx,%rax
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    -0x4(%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
cmp    %rbx,%r15
jae    1160 <dump+0x50>
mov    0x0(%rbp),%edi
mov    (%r14,%r15,4),%edx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1160 <dump+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [7 x i8] c" %04x\00"
@.str.2 = [6 x i8] c" %02x\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @dump(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %4
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 0, i32* %7
br label %12
12: ; preds = %50, %3
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = load i64, i64* %6
%16 = icmp ult i64 %14, %15
br i1 %16, label %17, label %53
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = load i32, i32* %7
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %19)
store i32 0, i32* %8
br label %21
21: ; preds = %44, %17
%22 = load i32, i32* %8
%23 = icmp ne i32 %22, 16
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = add nsw i32 %25, %26
%28 = sext i32 %27 to i64
%29 = load i64, i64* %6
%30 = icmp ult i64 %28, %29
br label %31
31: ; preds = %24, %21
%32 = phi i1 [ false, %21 ], [ %30, %24 ]
br i1 %32, label %33, label %47
33: ; preds = %31
%34 = load i32, i32* @stderr
%35 = load i8*, i8** %5
%36 = bitcast i8* %35 to i32*
%37 = load i32, i32* %7
%38 = load i32, i32* %8
%39 = add nsw i32 %37, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %36, i64 %40
%42 = load i32, i32* %41
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %33
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
br label %21
47: ; preds = %31
%48 = load i32, i32* @stderr
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %50
50: ; preds = %47
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 16
store i32 %52, i32* %7
br label %12
53: ; preds = %12
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [7 x i8] c" %04x\00"
@.str.2 = [6 x i8] c" %02x\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @dump(i8* %0, i8* nocapture %1, i64 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = icmp eq i64 %2, 0
br i1 %6, label %128, label %7
7: ; preds = %3
%8 = bitcast i8* %1 to i32*
br label %9
9: ; preds = %123, %7
%10 = phi i64 [ 0, %7 ], [ %126, %123 ]
%11 = load i32, i32* @stderr
%12 = trunc i64 %10 to i32
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @stderr
%15 = getelementptr inbounds i32, i32* %8, i64 %10
%16 = load i32, i32* %15
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = or i64 %10, 1
%19 = icmp ult i64 %18, %2
br i1 %19, label %20, label %123
20: ; preds = %9
%21 = load i32, i32* @stderr
%22 = getelementptr inbounds i32, i32* %8, i64 %18
%23 = load i32, i32* %22
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = or i64 %10, 2
%26 = icmp ult i64 %25, %2
br i1 %26, label %27, label %123
27: ; preds = %20
%28 = load i32, i32* @stderr
%29 = getelementptr inbounds i32, i32* %8, i64 %25
%30 = load i32, i32* %29
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = or i64 %10, 3
%33 = icmp ult i64 %32, %2
br i1 %33, label %34, label %123
34: ; preds = %27
%35 = load i32, i32* @stderr
%36 = getelementptr inbounds i32, i32* %8, i64 %32
%37 = load i32, i32* %36
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = or i64 %10, 4
%40 = icmp ult i64 %39, %2
br i1 %40, label %41, label %123
41: ; preds = %34
%42 = load i32, i32* @stderr
%43 = getelementptr inbounds i32, i32* %8, i64 %39
%44 = load i32, i32* %43
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %44)
%46 = or i64 %10, 5
%47 = icmp ult i64 %46, %2
br i1 %47, label %48, label %123
48: ; preds = %41
%49 = load i32, i32* @stderr
%50 = getelementptr inbounds i32, i32* %8, i64 %46
%51 = load i32, i32* %50
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %51)
%53 = or i64 %10, 6
%54 = icmp ult i64 %53, %2
br i1 %54, label %55, label %123
55: ; preds = %48
%56 = load i32, i32* @stderr
%57 = getelementptr inbounds i32, i32* %8, i64 %53
%58 = load i32, i32* %57
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %58)
%60 = or i64 %10, 7
%61 = icmp ult i64 %60, %2
br i1 %61, label %62, label %123
62: ; preds = %55
%63 = load i32, i32* @stderr
%64 = getelementptr inbounds i32, i32* %8, i64 %60
%65 = load i32, i32* %64
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %65)
%67 = or i64 %10, 8
%68 = icmp ult i64 %67, %2
br i1 %68, label %69, label %123
69: ; preds = %62
%70 = load i32, i32* @stderr
%71 = getelementptr inbounds i32, i32* %8, i64 %67
%72 = load i32, i32* %71
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %72)
%74 = or i64 %10, 9
%75 = icmp ult i64 %74, %2
br i1 %75, label %76, label %123
76: ; preds = %69
%77 = load i32, i32* @stderr
%78 = getelementptr inbounds i32, i32* %8, i64 %74
%79 = load i32, i32* %78
%80 = tail call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %79)
%81 = or i64 %10, 10
%82 = icmp ult i64 %81, %2
br i1 %82, label %83, label %123
83: ; preds = %76
%84 = load i32, i32* @stderr
%85 = getelementptr inbounds i32, i32* %8, i64 %81
%86 = load i32, i32* %85
%87 = tail call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %86)
%88 = or i64 %10, 11
%89 = icmp ult i64 %88, %2
br i1 %89, label %90, label %123
90: ; preds = %83
%91 = load i32, i32* @stderr
%92 = getelementptr inbounds i32, i32* %8, i64 %88
%93 = load i32, i32* %92
%94 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %93)
%95 = or i64 %10, 12
%96 = icmp ult i64 %95, %2
br i1 %96, label %97, label %123
97: ; preds = %90
%98 = load i32, i32* @stderr
%99 = getelementptr inbounds i32, i32* %8, i64 %95
%100 = load i32, i32* %99
%101 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %100)
%102 = or i64 %10, 13
%103 = icmp ult i64 %102, %2
br i1 %103, label %104, label %123
104: ; preds = %97
%105 = load i32, i32* @stderr
%106 = getelementptr inbounds i32, i32* %8, i64 %102
%107 = load i32, i32* %106
%108 = tail call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %107)
%109 = or i64 %10, 14
%110 = icmp ult i64 %109, %2
br i1 %110, label %111, label %123
111: ; preds = %104
%112 = load i32, i32* @stderr
%113 = getelementptr inbounds i32, i32* %8, i64 %109
%114 = load i32, i32* %113
%115 = tail call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %114)
%116 = or i64 %10, 15
%117 = icmp ult i64 %116, %2
br i1 %117, label %118, label %123
118: ; preds = %111
%119 = load i32, i32* @stderr
%120 = getelementptr inbounds i32, i32* %8, i64 %116
%121 = load i32, i32* %120
%122 = tail call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %121)
br label %123
123: ; preds = %118, %111, %104, %97, %90, %83, %76, %69, %62, %55, %48, %41, %34, %27, %20, %9
%124 = load i32, i32* @stderr
%125 = tail call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%126 = add nuw i64 %10, 16
%127 = icmp ult i64 %126, %2
br i1 %127, label %9, label %128
128: ; preds = %123, %3
ret void
}