#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 uint64_t;
typedef int uint32_t;
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ print_uint64_value(int);
int /*<<< orphan*/ printf(char *, ...);
main() {
  int32_t int32_val = 1024;
  int64_t int64_val = 1024;
  uint32_t uint32_val = 1024;
  uint64_t uint64_val = 1024;
  unsigned char data[8];
  int32_val = 1024;
  int64_val = 1024;
  uint32_val = 1024;
  uint64_val = 1024;
  printf("int32_val  = %d (%X)\n", int32_val, int32_val);
  printf("int64_val  = %d (%X)\n", int64_val, int64_val);
  printf("uint32_val = %u (%X)\n", uint32_val, uint32_val);
  printf("uint64_val = %u (%X)\n", uint64_val, uint64_val);
  int32_val = 0x1024FA3C;
  int64_val = 0x000000001024FA3C;
  uint32_val = 0x1024FA3C;
  uint64_val = 0x000000001024FA3C;
  printf("int32_val  = %d (%X)\n", int32_val, int32_val);
  printf("int64_val  = %d (%X)\n", int64_val, int64_val);
  printf("uint32_val = %u (%X)\n", uint32_val, uint32_val);
  printf("uint64_val = %u (%X)\n", uint64_val, uint64_val);
  printf("\n");
  uint64_val = 0x123456781024FA3C;
  printf("uint64_val = %u (%X)\n", uint64_val, uint64_val);
  print_uint64_value(uint64_val);
  printf("\n");
  data[0] = 0x12;
  data[1] = 0x34;
  data[2] = 0x56;
  data[3] = 0x78;
  data[4] = 0x10;
  data[5] = 0x24;
  data[6] = 0xFA;
  data[7] = 0x3C;
  printf("uint64_val = %u (%X)\n", *(uint64_t *)data, *(uint64_t *)data);
  print_uint64_value(*(uint64_t *)data);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x400,-0x4(%rbp)
movl   $0x400,-0x8(%rbp)
movl   $0x400,-0xc(%rbp)
movl   $0x400,-0x10(%rbp)
movl   $0x400,-0x4(%rbp)
movl   $0x400,-0x8(%rbp)
movl   $0x400,-0xc(%rbp)
movl   $0x400,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1024fa3c,-0x4(%rbp)
movl   $0x1024fa3c,-0x8(%rbp)
movl   $0x1024fa3c,-0xc(%rbp)
movl   $0x1024fa3c,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1024fa3c,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
call   1030 <print_uint64_value@plt>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x12,-0x18(%rbp)
movb   $0x34,-0x17(%rbp)
movb   $0x56,-0x16(%rbp)
movb   $0x78,-0x15(%rbp)
movb   $0x10,-0x14(%rbp)
movb   $0x24,-0x13(%rbp)
movb   $0xfa,-0x12(%rbp)
movb   $0x3c,-0x11(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
call   1030 <print_uint64_value@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%r14
mov    %r14,%rdi
mov    $0x400,%esi
mov    $0x400,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebc(%rip),%r15
mov    %r15,%rdi
mov    $0x400,%esi
mov    $0x400,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb7(%rip),%r12
mov    %r12,%rdi
mov    $0x400,%esi
mov    $0x400,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x400,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x1024fa3c,%esi
mov    $0x1024fa3c,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    $0x1024fa3c,%esi
mov    $0x1024fa3c,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    $0x1024fa3c,%esi
mov    $0x1024fa3c,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1024fa3c,%esi
mov    $0x1024fa3c,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x1024fa3c,%esi
mov    $0x1024fa3c,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1024fa3c,%edi
call   1040 <print_uint64_value@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x78563412,%esi
mov    $0x78563412,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x78563412,%edi
call   1040 <print_uint64_value@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"int32_val = %d (%X)\0A\00"
@.str.1 = [22 x i8] c"int64_val = %d (%X)\0A\00"
@.str.2 = [22 x i8] c"uint32_val = %u (%X)\0A\00"
@.str.3 = [22 x i8] c"uint64_val = %u (%X)\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [8 x i8]
store i32 1024, i32* %1
store i32 1024, i32* %2
store i32 1024, i32* %3
store i32 1024, i32* %4
store i32 1024, i32* %1
store i32 1024, i32* %2
store i32 1024, i32* %3
store i32 1024, i32* %4
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* %4
%16 = load i32, i32* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %15, i32 %16)
store i32 270858812, i32* %1
store i32 270858812, i32* %2
store i32 270858812, i32* %3
store i32 270858812, i32* %4
%18 = load i32, i32* %1
%19 = load i32, i32* %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19)
%21 = load i32, i32* %2
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %22)
%24 = load i32, i32* %3
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %25)
%27 = load i32, i32* %4
%28 = load i32, i32* %4
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %27, i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 270858812, i32* %4
%31 = load i32, i32* %4
%32 = load i32, i32* %4
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32)
%34 = load i32, i32* %4
%35 = call i32 @print_uint64_value(i32 %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%37 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
store i8 18, i8* %37
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 1
store i8 52, i8* %38
%39 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 2
store i8 86, i8* %39
%40 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 3
store i8 120, i8* %40
%41 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 4
store i8 16, i8* %41
%42 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 5
store i8 36, i8* %42
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 6
store i8 -6, i8* %43
%44 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 7
store i8 60, i8* %44
%45 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%46 = bitcast i8* %45 to i32*
%47 = load i32, i32* %46
%48 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%49 = bitcast i8* %48 to i32*
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %47, i32 %50)
%52 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%53 = bitcast i8* %52 to i32*
%54 = load i32, i32* %53
%55 = call i32 @print_uint64_value(i32 %54)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"int32_val = %d (%X)\0A\00"
@.str.1 = [22 x i8] c"int64_val = %d (%X)\0A\00"
@.str.2 = [22 x i8] c"uint32_val = %u (%X)\0A\00"
@.str.3 = [22 x i8] c"uint64_val = %u (%X)\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1024, i32 1024)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 1024, i32 1024)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 1024, i32 1024)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 1024, i32 1024)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 270858812, i32 270858812)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 270858812, i32 270858812)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 270858812, i32 270858812)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 270858812, i32 270858812)
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 270858812, i32 270858812)
%11 = tail call i32 @print_uint64_value(i32 270858812)
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 2018915346, i32 2018915346)
%14 = tail call i32 @print_uint64_value(i32 2018915346)
ret i32 0
}