#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 /*<<< orphan*/ dummy;

/* Variables and functions */
int /*<<< orphan*/ DumpBinString(char *);
int /*<<< orphan*/ DumpImageData(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void DumpDummy() {
  char dummy[] = {0x24, 0x60, 0x4f, 0x2f, 0x7a, 0x0f, 0x1f, 0x6a, 0x0f, 0x40,
                  0x18, 0x2a, 0x42, 0x5b, 0x59, 0x38, 0x3e, 0x01, 0x04, 0x22,
                  0x51, 0x09, 0x63, 0x26, 0x09, 0x7d, 0x5d, 0x54, 0x04, 0x2d,
                  0x51, 0x30, 0x51, 0x48, 0x15, 0x4e, 0x74, 0x4f, 0x11, 0x58,
                  0x2a, 0x42, 0x6c, 0x26, 0x7c, 0x7a, 0x5e, 0x72, 0x64, 0x30,
                  0x48, 0x51, 0x64, 0x21, 0x25, 0x2d, 0x55, 0x47, 0x2b, 0x25,
                  0x16, 0x1c, 0x68, 0x34, 0x61, 0x1a, 0x4f, 0x5f, 0x79, 0x12,
                  0x03, 0x26, 0x4f, 0x0a, 0x7b, 0x6d, 0x0f, 0x4e, 0x64, 0x2e};
  char *image_data = NULL;
  char testStr[] = "large";
  char c = 0;
  int sz = 0;
  int arrsize = 0;
  int width = 0;
  int height = 0;
  int idx = 0;
  printf("Dump test string \"%s\"\n", testStr);
  DumpBinString(testStr);
  printf("--------------------------------\n");
  printf("\n");
  sz = (int)(sizeof(dummy) / sizeof(char));
  DumpImageData(dummy, sz);
}


x86 assembly (clang, -O0):
<DumpDummy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x50(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
movq   $0x0,-0x58(%rbp)
mov    0xee2(%rip),%eax
mov    %eax,-0x5e(%rbp)
mov    0xedc(%rip),%ax
mov    %ax,-0x5a(%rbp)
movb   $0x0,-0x5f(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
lea    -0x5e(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x5e(%rbp),%rdi
call   1060 <DumpBinString@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x50,-0x64(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x64(%rbp),%esi
call   1050 <DumpImageData@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DumpDummy>:
push   %rbx
sub    $0x60,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe90(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe74(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movw   $0x65,0xc(%rsp)
movl   $0x6772616c,0x8(%rsp)
67
lea    0xeaf(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1070 <DumpBinString@plt>
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10(%rsp),%rdi
mov    $0x50,%esi
call   1060 <DumpImageData@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.DumpDummy.dummy = [80 x i8] c"$`O/z\0F\1Fj\0F@\18*B[Y8>\01\04\22Q\09c&\09}]T\04-Q0QH\15NtO\11X*Bl&|z^rd0HQd!%-UG+%\16\1Ch4a\1AO_y\12\03&O\0A{m\0FNd."
@__const.DumpDummy.testStr = [6 x i8] c"large\00"
@.str = [23 x i8] c"Dump test string \22%s\22\0A\00"
@.str.1 = [34 x i8] c"--------------------------------\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @DumpDummy() {
%1 = alloca [80 x i8]
%2 = alloca i8*
%3 = alloca [6 x i8]
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast [80 x i8]* %1 to i8*
store i8* null, i8** %2
%11 = bitcast [6 x i8]* %3 to i8*
store i8 0, i8* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%15 = call i32 @DumpBinString(i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 80, i32* %5
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%19 = load i32, i32* %5
%20 = call i32 @DumpImageData(i8* %18, i32 %19)
ret void
}

LLVM IR (-O2):
@__const.DumpDummy.dummy = [80 x i8] c"$`O/z\0F\1Fj\0F@\18*B[Y8>\01\04\22Q\09c&\09}]T\04-Q0QH\15NtO\11X*Bl&|z^rd0HQd!%-UG+%\16\1Ch4a\1AO_y\12\03&O\0A{m\0FNd."
@__const.DumpDummy.testStr = [6 x i8] c"large\00"
@.str = [23 x i8] c"Dump test string \22%s\22\0A\00"
@str = [33 x i8] c"--------------------------------\00"
define void @DumpDummy() {
%1 = alloca [80 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @DumpBinString(i8* %4)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%8 = call i32 @putchar(i32 10)
%9 = call i32 @DumpImageData(i8* %3, i32 80)
ret void
}