int main() {
  int ii;
  int s1size = 0, s2size = 0;
  char s1[5][15] = {"Arizona", "Texas", "New Hampshire", "Utah", "California"};
  char *s2[5] = {"Arizona", "Texas", "New Hampshire", "Utah", "California"};
  printf("s1:\n");
  s1size = 0;
  for (ii = 0; ii < 5; ii++) {
    printf("   %s\n", s1[ii]);
    s1size += sizeof(s1[ii]);
  }
  printf("\n\ns2:\n");
  s2size = 0;
  for (ii = 0; ii < 5; ii++) {
    printf("   %s\n", s2[ii]);
    s2size += sizeof(s2[ii]) + strlen(s2[ii]);
  }
  printf("\nSizes: s1=%d, s2=%d\n", s1size, s2size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe95(%rip),%rsi
mov    $0x4b,%edx
call   1060 <memcpy@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
lea    0xebc(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xeae(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    0xeb1(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    0xeab(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1221 <main+0xe1>
movslq -0x8(%rbp),%rax
lea    -0x60(%rbp),%rsi
imul   $0xf,%rax,%rax
add    %rax,%rsi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0xc(%rbp),%rax
add    $0xf,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e1 <main+0xa1>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1291 <main+0x151>
movslq -0x8(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x8(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rdi
ff
call   1030 <strlen@plt>
mov    %rax,%rcx
add    $0x8,%rcx
movslq -0x10(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    123d <main+0xfd>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movups 0xf0f(%rip),%xmm0
movups %xmm0,0x3b(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1e(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2d(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe73(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe68(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe65(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe59(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x4b,%esi
mov    $0x4f,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [5 x [15 x i8]] [[15 x i8] c"Arizona\00\00\00\00\00\00\00\00", [15 x i8] c"Texas\00\00\00\00\00\00\00\00\00\00", [15 x i8] c"New Hampshire\00\00", [15 x i8] c"Utah\00\00\00\00\00\00\00\00\00\00\00", [15 x i8] c"California\00\00\00\00\00"]
@.str = [8 x i8] c"Arizona\00"
@.str.1 = [6 x i8] c"Texas\00"
@.str.2 = [14 x i8] c"New Hampshire\00"
@.str.3 = [5 x i8] c"Utah\00"
@.str.4 = [11 x i8] c"California\00"
@.str.5 = [5 x i8] c"s1:\0A\00"
@.str.6 = [7 x i8] c" %s\0A\00"
@.str.7 = [7 x i8] c"\0A\0As2:\0A\00"
@.str.8 = [22 x i8] c"\0ASizes: s1=%d, s2=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [5 x [15 x i8]]
%6 = alloca [5 x i8*]
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %4
%7 = bitcast [5 x [15 x i8]]* %5 to i8*
%8 = bitcast [5 x i8*]* %6 to i8*
%9 = bitcast i8* %8 to [5 x i8*]*
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i32 0, i32 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8** %11
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i32 0, i32 2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8** %12
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8** %13
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i32 0, i32 4
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i32 0, i32 0), i8** %14
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %2
br label %16
16: ; preds = %29, %0
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 5
br i1 %18, label %19, label %32
19: ; preds = %16
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %5, i64 0, i64 %21
%23 = getelementptr inbounds [15 x i8], [15 x i8]* %22, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %23)
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = add i64 %26, 15
%28 = trunc i64 %27 to i32
store i32 %28, i32* %3
br label %29
29: ; preds = %19
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %16
32: ; preds = %16
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %4
store i32 0, i32* %2
br label %34
34: ; preds = %53, %32
%35 = load i32, i32* %2
%36 = icmp slt i32 %35, 5
br i1 %36, label %37, label %56
37: ; preds = %34
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 %39
%41 = load i8*, i8** %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %41)
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 %44
%46 = load i8*, i8** %45
%47 = call i64 @strlen(i8* %46)
%48 = add i64 8, %47
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = add i64 %50, %48
%52 = trunc i64 %51 to i32
store i32 %52, i32* %4
br label %53
53: ; preds = %37
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
br label %34
56: ; preds = %34
%57 = load i32, i32* %3
%58 = load i32, i32* %4
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %57, i32 %58)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [5 x [15 x i8]] [[15 x i8] c"Arizona\00\00\00\00\00\00\00\00", [15 x i8] c"Texas\00\00\00\00\00\00\00\00\00\00", [15 x i8] c"New Hampshire\00\00", [15 x i8] c"Utah\00\00\00\00\00\00\00\00\00\00\00", [15 x i8] c"California\00\00\00\00\00"]
@.str = [8 x i8] c"Arizona\00"
@.str.1 = [6 x i8] c"Texas\00"
@.str.2 = [14 x i8] c"New Hampshire\00"
@.str.3 = [5 x i8] c"Utah\00"
@.str.4 = [11 x i8] c"California\00"
@.str.6 = [7 x i8] c" %s\0A\00"
@.str.8 = [22 x i8] c"\0ASizes: s1=%d, s2=%d\0A\00"
@str = [4 x i8] c"s1:\00"
@str.9 = [6 x i8] c"\0A\0As2:\00"
define i32 @main() {
%1 = alloca [5 x [15 x i8]]
%2 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %2)
%5 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %1, i64 0, i64 1, i64 0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %1, i64 0, i64 2, i64 0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %1, i64 0, i64 3, i64 0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [5 x [15 x i8]], [5 x [15 x i8]]* %1, i64 0, i64 4, i64 0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 75, i32 79)
ret i32 0
}