#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*/ ptri;
typedef int /*<<< orphan*/ ptrc;
typedef int /*<<< orphan*/ arri;
typedef int /*<<< orphan*/ arrc;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int arri[] = {1, 2, 3};
  int *ptri = arri;
  char arrc[] = {1, 2, 3};
  char *ptrc = arrc;
  printf("sizeof arri[] = %d ", sizeof(arri));
  printf("sizeof ptri = %d ", sizeof(ptri));
  printf("sizeof arrc[] = %d ", sizeof(arrc));
  printf("sizeof ptrc = %d ", sizeof(ptrc));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xed1(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    0xec3(%rip),%ax
mov    %ax,-0x2b(%rbp)
mov    0xebb(%rip),%al
mov    %al,-0x29(%rbp)
lea    -0x2b(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.arri = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.arrc = [3 x i8] c"\01\02\03"
@.str = [20 x i8] c"sizeof arri[] = %d \00"
@.str.1 = [18 x i8] c"sizeof ptri = %d \00"
@.str.2 = [20 x i8] c"sizeof arrc[] = %d \00"
@.str.3 = [18 x i8] c"sizeof ptrc = %d \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i32]
%7 = alloca i32*
%8 = alloca [3 x i8]
%9 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [3 x i32]* %6 to i8*
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32* %11, i32** %7
%12 = bitcast [3 x i8]* %8 to i8*
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
store i8* %13, i8** %9
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 12)
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 8)
%16 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 3)
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"sizeof arri[] = %d \00"
@.str.1 = [18 x i8] c"sizeof ptri = %d \00"
@.str.2 = [20 x i8] c"sizeof arrc[] = %d \00"
@.str.3 = [18 x i8] c"sizeof ptrc = %d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 12)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}