#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*/ hexDump(char *, ...);
int main(int argc, char *argv[]) {
  double d1 = 234.5;
  char s1[] = "test";
  char s2[] = "testtest";
  char *s3 = "bla";
  char s4[] = "bla";
  hexDump("d1", &d1, sizeof d1);
  hexDump("s1", &s1, sizeof s1);
  hexDump("s2", &s2, sizeof s2);
  hexDump("s3", &s3, sizeof s3);
  hexDump("s4", &s4, sizeof s4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0xed3(%rip),%eax
mov    %eax,-0x1d(%rbp)
mov    0xece(%rip),%al
mov    %al,-0x19(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x26(%rbp)
mov    0xeba(%rip),%al
mov    %al,-0x1e(%rbp)
lea    0xeb1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea7(%rip),%eax
mov    %eax,-0x34(%rbp)
lea    0xea1(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <hexDump@plt>
lea    0xe8d(%rip),%rdi
lea    -0x1d(%rbp),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <hexDump@plt>
lea    0xe79(%rip),%rdi
lea    -0x26(%rbp),%rsi
mov    $0x9,%edx
mov    $0x0,%al
call   1030 <hexDump@plt>
lea    0xe65(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <hexDump@plt>
lea    0xe51(%rip),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <hexDump@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movabs $0x406d500000000000,%rax
50 6d 40
mov    %rax,0x30(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x74736574,0xc(%rsp)
74
movabs $0x7473657474736574,%rax
65 73 74
mov    %rax,0x18(%rsp)
movb   $0x0,0x20(%rsp)
lea    0xebe(%rip),%rax
mov    %rax,0x28(%rsp)
movl   $0x616c62,0x14(%rsp)
lea    0xeae(%rip),%rdi
lea    0x30(%rsp),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <hexDump@plt>
lea    0xe99(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <hexDump@plt>
lea    0xe84(%rip),%rdi
lea    0x18(%rsp),%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1030 <hexDump@plt>
lea    0xe6f(%rip),%rdi
lea    0x28(%rsp),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <hexDump@plt>
lea    0xe5a(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <hexDump@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.s1 = [5 x i8] c"test\00"
@__const.main.s2 = [9 x i8] c"testtest\00"
@.str = [4 x i8] c"bla\00"
@__const.main.s4 = [4 x i8] c"bla\00"
@.str.1 = [3 x i8] c"d1\00"
@.str.2 = [3 x i8] c"s1\00"
@.str.3 = [3 x i8] c"s2\00"
@.str.4 = [3 x i8] c"s3\00"
@.str.5 = [3 x i8] c"s4\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca [5 x i8]
%8 = alloca [9 x i8]
%9 = alloca i8*
%10 = alloca [4 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.345000e+02, double* %6
%11 = bitcast [5 x i8]* %7 to i8*
%12 = bitcast [9 x i8]* %8 to i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %9
%13 = bitcast [4 x i8]* %10 to i8*
%14 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %6, i64 8)
%15 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), [5 x i8]* %7, i64 5)
%16 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [9 x i8]* %8, i64 9)
%17 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %9, i64 8)
%18 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), [4 x i8]* %10, i64 4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [5 x i8] c"test\00"
@__const.main.s2 = [9 x i8] c"testtest\00"
@.str = [4 x i8] c"bla\00"
@.str.1 = [3 x i8] c"d1\00"
@.str.2 = [3 x i8] c"s1\00"
@.str.3 = [3 x i8] c"s2\00"
@.str.4 = [3 x i8] c"s3\00"
@.str.5 = [3 x i8] c"s4\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca [5 x i8]
%5 = alloca [9 x i8]
%6 = alloca i8*
%7 = alloca i32
%8 = bitcast double* %3 to i8*
store double 2.345000e+02, double* %3
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%11 = bitcast i8** %6 to i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
%12 = bitcast i32* %7 to i8*
store i32 6384738, i32* %7
%13 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %3, i64 8)
%14 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), [5 x i8]* %4, i64 5)
%15 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [9 x i8]* %5, i64 9)
%16 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %6, i64 8)
%17 = call i32 (i8*, ...) @hexDump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %7, i64 4)
ret i32 0
}