#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 /*<<< orphan*/ pc;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fc(void) {
  int i;
  long long c[5] = {100, 200, 300, 400, 500};
  long long *pc = c;
  printf("size: *pc=%d, pc=%d\n", sizeof(*pc), sizeof(pc));
  for (i = 0; i < 5; i++) {
    printf("c: addr=%p, data=%lld\n", pc, *pc);
    pc++;
  }
}


x86 assembly (clang, -O0):
<fc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movq   $0x64,-0x30(%rbp)
movq   $0xc8,-0x28(%rbp)
movq   $0x12c,-0x20(%rbp)
movq   $0x190,-0x18(%rbp)
movq   $0x1f4,-0x10(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    0xe91(%rip),%rdi
mov    $0x8,%edx
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    11c2 <fc+0xa2>
mov    -0x38(%rbp),%rsi
mov    -0x38(%rbp),%rax
mov    (%rax),%rdx
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <fc+0x65>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movaps 0xee0(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r15
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x20(%rsp),%r14
movq   $0x1f4,0x20(%rsp)
lea    0xed6(%rip),%rdi
mov    $0x8,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rbx
mov    %rsp,%rsi
mov    $0x64,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x20(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"size: *pc=%d, pc=%d\0A\00"
@.str.1 = [23 x i8] c"c: addr=%p, data=%lld\0A\00"
define void @fc() {
%1 = alloca i32
%2 = alloca [5 x i64]
%3 = alloca i64*
%4 = bitcast [5 x i64]* %2 to i8*
%5 = bitcast i8* %4 to [5 x i64]*
%6 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i32 0, i32 0
store i64 100, i64* %6
%7 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i32 0, i32 1
store i64 200, i64* %7
%8 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i32 0, i32 2
store i64 300, i64* %8
%9 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i32 0, i32 3
store i64 400, i64* %9
%10 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i32 0, i32 4
store i64 500, i64* %10
%11 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 0
store i64* %11, i64** %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 8, i64 8)
store i32 0, i32* %1
br label %13
13: ; preds = %23, %0
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 5
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i64*, i64** %3
%18 = load i64*, i64** %3
%19 = load i64, i64* %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %17, i64 %19)
%21 = load i64*, i64** %3
%22 = getelementptr inbounds i64, i64* %21, i32 1
store i64* %22, i64** %3
br label %23
23: ; preds = %16
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %13
26: ; preds = %13
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"size: *pc=%d, pc=%d\0A\00"
@.str.1 = [23 x i8] c"c: addr=%p, data=%lld\0A\00"
define void @fc() {
%1 = alloca [5 x i64]
%2 = bitcast [5 x i64]* %1 to i8*
%3 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 0
%4 = bitcast [5 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 100, i64 200>, <2 x i64>* %4
%5 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 2
%6 = bitcast i64* %5 to <2 x i64>*
store <2 x i64> <i64 300, i64 400>, <2 x i64>* %6
%7 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 4
store i64 500, i64* %7
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 8, i64 8)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %3, i64 100)
%10 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 1
%11 = load i64, i64* %10
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %10, i64 %11)
%13 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 2
%14 = load i64, i64* %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %13, i64 %14)
%16 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 3
%17 = load i64, i64* %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %16, i64 %17)
%19 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 4
%20 = load i64, i64* %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64* %19, i64 %20)
ret void
}