#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 *, int);
int main(void) {
  char buff[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
  char *pChar = buff;
  short *pShort = (short *)buff;
  int *pInt = (int *)buff;
  printf("*pChar:  %8x\n", *pChar);
  printf("*pShort: %8x\n", *pShort);
  printf("*pInt:   %8x\n", *pInt);
  pChar++;
  (*pShort)++;
  *(pInt++);
  printf("*pChar:  %8x\n", *pChar);
  printf("*pShort: %8x\n", *pShort);
  printf("*pInt:   %8x\n", *pInt);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movswl (%rax),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cx
add    $0x1,%cx
mov    %cx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movswl (%rax),%esi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%r15
mov    %r15,%rdi
mov    $0x1100,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x33221100,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x1101,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x77665544,%esi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.buff = [8 x i8] c"\00\11\223DUfw"
@.str = [14 x i8] c"*pChar: %8x\0A\00"
@.str.1 = [14 x i8] c"*pShort: %8x\0A\00"
@.str.2 = [14 x i8] c"*pInt: %8x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca i8*
%4 = alloca i16*
%5 = alloca i32*
store i32 0, i32* %1
%6 = bitcast [8 x i8]* %2 to i8*
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
store i8* %7, i8** %3
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%9 = bitcast i8* %8 to i16*
store i16* %9, i16** %4
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%11 = bitcast i8* %10 to i32*
store i32* %11, i32** %5
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i16*, i16** %4
%17 = load i16, i16* %16
%18 = sext i16 %17 to i32
%19 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load i32*, i32** %5
%21 = load i32, i32* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %3
%25 = load i16*, i16** %4
%26 = load i16, i16* %25
%27 = add i16 %26, 1
store i16 %27, i16* %25
%28 = load i32*, i32** %5
%29 = getelementptr inbounds i32, i32* %28, i32 1
store i32* %29, i32** %5
%30 = load i32, i32* %28
%31 = load i8*, i8** %3
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = load i16*, i16** %4
%36 = load i16, i16* %35
%37 = sext i16 %36 to i32
%38 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = load i32*, i32** %5
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%42 = load i32, i32* @EXIT_SUCCESS
ret i32 %42
}

LLVM IR (-O2):
@.str = [14 x i8] c"*pChar: %8x\0A\00"
@.str.1 = [14 x i8] c"*pShort: %8x\0A\00"
@.str.2 = [14 x i8] c"*pInt: %8x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 4352)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 857870592)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 17)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 4353)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 2003195204)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}