#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, unsigned int, ...);
int main(void) {
  unsigned int num = 123456789;
  unsigned int *ptr = &num;
  printf(" num [address: %p] [value: %d]\n", (void *)&num, num);
  printf("*ptr [address: %p] [value: %p]\n", (void *)&ptr, (void *)ptr);
  printf("value of 'num' in (hex): %x\n", num);
  printf("value of 'num' in (hex): %X\n", num);
  printf("value of 'num' in (hex): %#x\n", num);
  printf("value of 'num' in (hex): %#X\n", num);
  printf("value of 'num' in (oct): %o\n", num);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x75bcd15,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x75bcd15,0x4(%rsp)
07
lea    0x4(%rsp),%rbx
mov    %rbx,0x8(%rsp)
lea    0xed2(%rip),%rdi
mov    %ebx,%esi
mov    $0x75bcd15,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
lea    0xed8(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xeee(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xef9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xf05(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xf11(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c" num [address: %p] [value: %d]\0A\00"
@.str.1 = [32 x i8] c"*ptr [address: %p] [value: %p]\0A\00"
@.str.2 = [29 x i8] c"value of 'num' in (hex): %x\0A\00"
@.str.3 = [29 x i8] c"value of 'num' in (hex): %X\0A\00"
@.str.4 = [30 x i8] c"value of 'num' in (hex): %#x\0A\00"
@.str.5 = [30 x i8] c"value of 'num' in (hex): %#X\0A\00"
@.str.6 = [29 x i8] c"value of 'num' in (oct): %o\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 123456789, i32* %2
store i32* %2, i32** %3
%4 = bitcast i32* %2 to i8*
%5 = ptrtoint i8* %4 to i32
%6 = load i32, i32* %2
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = bitcast i32** %3 to i8*
%9 = ptrtoint i8* %8 to i32
%10 = load i32*, i32** %3
%11 = bitcast i32* %10 to i8*
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %9, i8* %11)
%13 = load i32, i32* %2
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %2
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %2
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @EXIT_SUCCESS
ret i32 %23
}

LLVM IR (-O2):
@.str = [32 x i8] c" num [address: %p] [value: %d]\0A\00"
@.str.1 = [32 x i8] c"*ptr [address: %p] [value: %p]\0A\00"
@.str.2 = [29 x i8] c"value of 'num' in (hex): %x\0A\00"
@.str.3 = [29 x i8] c"value of 'num' in (hex): %X\0A\00"
@.str.4 = [30 x i8] c"value of 'num' in (hex): %#x\0A\00"
@.str.5 = [30 x i8] c"value of 'num' in (hex): %#X\0A\00"
@.str.6 = [29 x i8] c"value of 'num' in (oct): %o\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 123456789, i32* %1
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = ptrtoint i32* %1 to i64
%6 = trunc i64 %5 to i32
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 123456789)
%8 = ptrtoint i32** %2 to i64
%9 = trunc i64 %8 to i32
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32* %1)
%11 = load i32, i32* %1
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %1
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %1
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @EXIT_SUCCESS
ret i32 %21
}