int main(int argc, char *argv[]) {
  char buf[] = "\033[1;36mI liki shit \033[1;0mand pussy whosies\n";
  char *bufPtr = "\033[1;36mI liki shit \033[1;0mand pussy whosies\n";
  char myBuffer[3];
  char(*myBufferPtr)[3];
  myBuffer[0] = 'a';
  myBuffer[1] = 'b';
  myBuffer[2] = 'c';
  myBuffer[3] = '\0';
  myBufferPtr = &myBuffer;
  printf("buffer size using sizeof: %d \n", (int)sizeof(myBuffer));
  printf("buffer size using strlen: %d \n", (int)strlen(myBuffer));
  printf("buffer content: %s \n", myBuffer);
  printf("buffer content using Ptr: %s \n", *myBufferPtr);
  printf("buffer address: %s \n", (char *)&myBuffer);
  printf("buffer address using Ptr: %s \n", (char *)myBufferPtr);
  printf("buffer address 2nd try: %d \n", *myBuffer);
  printf("buffer address 2nd try using Ptr: %p \n", (char *)&myBufferPtr);
  printf("buffer address 2nd try: %p \n", (void *)myBuffer);
  write(1, myBufferPtr, strlen(*myBufferPtr));
  write(1, myBufferPtr[1], (int *)strlen(*myBufferPtr[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x2c,%edx
call   1060 <memcpy@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x48(%rbp)
movb   $0x61,-0x4b(%rbp)
movb   $0x62,-0x4a(%rbp)
movb   $0x63,-0x49(%rbp)
movb   $0x0,-0x48(%rbp)
lea    -0x4b(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4b(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4b(%rbp),%rsi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rsi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4b(%rbp),%rsi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rsi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x4b(%rbp),%esi
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x58(%rbp),%rsi
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4b(%rbp),%rsi
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rsi
mov    %rax,%rdx
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x58(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
movsbq 0x3(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x60(%rbp),%rsi
mov    %rax,%rdx
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <write@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x6261,0x5(%rsp)
movb   $0x63,0x7(%rsp)
movb   $0x0,0x8(%rsp)
lea    0x5(%rsp),%rbx
mov    %rbx,0x8(%rsp)
lea    0xea9(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x5(%rsp),%esi
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeea(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xefe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <write@plt>
mov    0x8(%rsp),%rbx
movsbq 0x3(%rbx),%rdi
add    $0x3,%rbx
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.buf = [44 x i8] c"\1B[1;36mI liki shit \1B[1;0mand pussy whosies\0A\00"
@.str = [44 x i8] c"\1B[1;36mI liki shit \1B[1;0mand pussy whosies\0A\00"
@.str.1 = [31 x i8] c"buffer size using sizeof: %d \0A\00"
@.str.2 = [31 x i8] c"buffer size using strlen: %d \0A\00"
@.str.3 = [21 x i8] c"buffer content: %s \0A\00"
@.str.4 = [31 x i8] c"buffer content using Ptr: %s \0A\00"
@.str.5 = [21 x i8] c"buffer address: %s \0A\00"
@.str.6 = [31 x i8] c"buffer address using Ptr: %s \0A\00"
@.str.7 = [29 x i8] c"buffer address 2nd try: %d \0A\00"
@.str.8 = [39 x i8] c"buffer address 2nd try using Ptr: %p \0A\00"
@.str.9 = [29 x i8] c"buffer address 2nd try: %p \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [44 x i8]
%7 = alloca i8*
%8 = alloca [3 x i8]
%9 = alloca [3 x i8]*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [44 x i8]* %6 to i8*
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8** %7
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
store i8 97, i8* %11
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 1
store i8 98, i8* %12
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 2
store i8 99, i8* %13
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 3
store i8 0, i8* %14
store [3 x i8]* %8, [3 x i8]** %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 3)
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%17 = call i64 @strlen(i8* %16)
%18 = trunc i64 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = load [3 x i8]*, [3 x i8]** %9
%23 = getelementptr inbounds [3 x i8], [3 x i8]* %22, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %23)
%25 = bitcast [3 x i8]* %8 to i8*
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %25)
%27 = load [3 x i8]*, [3 x i8]** %9
%28 = bitcast [3 x i8]* %27 to i8*
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %32)
%34 = bitcast [3 x i8]** %9 to i8*
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i8* %34)
%36 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %36)
%38 = load [3 x i8]*, [3 x i8]** %9
%39 = load [3 x i8]*, [3 x i8]** %9
%40 = getelementptr inbounds [3 x i8], [3 x i8]* %39, i64 0, i64 0
%41 = call i64 @strlen(i8* %40)
%42 = call i32 (i32, [3 x i8]*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, [3 x i8]*, i64, ...)*)(i32 1, [3 x i8]* %38, i64 %41)
%43 = load [3 x i8]*, [3 x i8]** %9
%44 = getelementptr inbounds [3 x i8], [3 x i8]* %43, i64 1
%45 = getelementptr inbounds [3 x i8], [3 x i8]* %44, i64 0, i64 0
%46 = load [3 x i8]*, [3 x i8]** %9
%47 = getelementptr inbounds [3 x i8], [3 x i8]* %46, i64 1
%48 = getelementptr inbounds [3 x i8], [3 x i8]* %47, i64 0, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i64
%51 = inttoptr i64 %50 to i8*
%52 = call i64 @strlen(i8* %51)
%53 = inttoptr i64 %52 to i32*
%54 = call i32 (i32, i8*, i32*, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32*, ...)*)(i32 1, i8* %45, i32* %53)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"buffer size using sizeof: %d \0A\00"
@.str.2 = [31 x i8] c"buffer size using strlen: %d \0A\00"
@.str.3 = [21 x i8] c"buffer content: %s \0A\00"
@.str.4 = [31 x i8] c"buffer content using Ptr: %s \0A\00"
@.str.5 = [21 x i8] c"buffer address: %s \0A\00"
@.str.6 = [31 x i8] c"buffer address using Ptr: %s \0A\00"
@.str.7 = [29 x i8] c"buffer address 2nd try: %d \0A\00"
@.str.8 = [39 x i8] c"buffer address 2nd try using Ptr: %p \0A\00"
@.str.9 = [29 x i8] c"buffer address 2nd try: %p \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i8]
%4 = alloca [3 x i8]*
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%6 = bitcast [3 x i8]** %4 to i8*
store i8 97, i8* %5
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 98, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 99, i8* %8
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 3
store i8 0, i8* %9
store [3 x i8]* %3, [3 x i8]** %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 3)
%11 = call i64 @strlen(i8* %5)
%12 = trunc i64 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %5)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* %17)
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), [3 x i8]** %4)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %5)
%24 = load [3 x i8]*, [3 x i8]** %4
%25 = getelementptr inbounds [3 x i8], [3 x i8]* %24, i64 0, i64 0
%26 = call i64 @strlen(i8* dereferenceable(1) %25)
%27 = call i32 (i32, [3 x i8]*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, [3 x i8]*, i64, ...)*)(i32 1, [3 x i8]* %24, i64 %26)
%28 = load [3 x i8]*, [3 x i8]** %4
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %28, i64 1, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i64
%32 = inttoptr i64 %31 to i8*
%33 = call i64 @strlen(i8* dereferenceable(1) %32)
%34 = inttoptr i64 %33 to i32*
%35 = call i32 (i32, i8*, i32*, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32*, ...)*)(i32 1, i8* %29, i32* %34)
ret i32 0
}