int main(int argc, char *argv[]) {
  char *arr[] = {"Mico", "Il master", "NEW", "GG"};
  int i = 31;
  printf("The arr size is %ld\n", sizeof(arr));
  printf("Random size is %ld\n", sizeof(i));
  printf(
      "strlen returns %ld for string 0, %ld for string 1, %ld for string 2\n",
      strlen(argv[0]), strlen(argv[1]), strlen(argv[2]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cc3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cc0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cba(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1f,-0x34(%rbp)
lea    0xea6(%rip),%rdi
mov    $0x20,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <strlen@plt>
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %rax,%rcx
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
lea    0xed1(%rip),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
call   1030 <strlen@plt>
mov    %rax,%r14
mov    0x8(%rbx),%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    0x10(%rbx),%rdi
call   1030 <strlen@plt>
lea    0xeb4(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Mico\00"
@.str.1 = [10 x i8] c"Il master\00"
@.str.2 = [4 x i8] c"NEW\00"
@.str.3 = [3 x i8] c"GG\00"
@__const.main.arr = [4 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [21 x i8] c"The arr size is %ld\0A\00"
@.str.5 = [20 x i8] c"Random size is %ld\0A\00"
@.str.6 = [69 x i8] c"strlen returns %ld for string 0, %ld for string 1, %ld for string 2\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i8*]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i8*]* %6 to i8*
store i32 31, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 32)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 4)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i64 @strlen(i8* %13)
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @strlen(i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i64 @strlen(i8* %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i64 %14, i64 %18, i64 %22)
ret i32 0
}

LLVM IR (-O2):
@.str.4 = [21 x i8] c"The arr size is %ld\0A\00"
@.str.5 = [20 x i8] c"Random size is %ld\0A\00"
@.str.6 = [69 x i8] c"strlen returns %ld for string 0, %ld for string 1, %ld for string 2\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 32)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 4)
%5 = load i8*, i8** %1
%6 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strlen(i8* dereferenceable(1) %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i64 @strlen(i8* dereferenceable(1) %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i64 %6, i64 %9, i64 %12)
ret i32 0
}