#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*/ printf(char *, int *, int *);
void pointJiaJia() {
  int array[100];
  int *p = array;
  int *p1 = &array[1];
  printf("p=:%p p1=%p\n", p, p1);
  printf("p=%p p++=%p\n", p, p1++);
  printf("p=%p ++p=%p\n", p, ++p1);
}


x86 assembly (clang, -O0):
<pointJiaJia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
lea    -0x190(%rbp),%rax
mov    %rax,-0x198(%rbp)
lea    -0x190(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x1a0(%rbp)
mov    -0x198(%rbp),%rsi
mov    -0x1a0(%rbp),%rdx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x198(%rbp),%rsi
mov    -0x1a0(%rbp),%rdx
mov    %rdx,%rax
add    $0x4,%rax
mov    %rax,-0x1a0(%rbp)
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x198(%rbp),%rsi
mov    -0x1a0(%rbp),%rdx
add    $0x4,%rdx
mov    %rdx,-0x1a0(%rbp)
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointJiaJia>:
push   %r14
push   %rbx
sub    $0x198,%rsp
lea    0x4(%rsp),%r14
lea    0xeda(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xc(%rsp),%rdx
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x198,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"p=:%p p1=%p\0A\00"
@.str.1 = [13 x i8] c"p=%p p++=%p\0A\00"
@.str.2 = [13 x i8] c"p=%p ++p=%p\0A\00"
define void @pointJiaJia() {
%1 = alloca [100 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 1
store i32* %5, i32** %3
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%9 = load i32*, i32** %2
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %3
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32* %10)
%13 = load i32*, i32** %2
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i32 1
store i32* %15, i32** %3
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32* %13, i32* %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"p=:%p p1=%p\0A\00"
@.str.1 = [13 x i8] c"p=%p p++=%p\0A\00"
@.str.2 = [13 x i8] c"p=%p ++p=%p\0A\00"
define void @pointJiaJia() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 1
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 3
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32* %3, i32* %7)
ret void
}