int main(int argc, const char *argv[]) {
  struct nested_struct {
    double c;
  };
  struct my_struct {
    int a;
    struct nested_struct b[2][2];
  };
  struct my_struct array[2];
  int a = array[0].a;
  double c = array[0].b[0][0].c;
  c = array[0].b[0][1].c;
  c = array[0].b[1][0].c;
  c = array[0].b[1][1].c;
  a = array[0].a;
  c = array[0].b[0][0].c;
  c = array[0].b[0][1].c;
  c = array[0].b[1][0].c;
  c = array[0].b[1][1].c;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x64(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x64(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.my_struct = type { i32, [2 x [2 x %struct.nested_struct]] }
%struct.nested_struct = type { double }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x %struct.my_struct]
%7 = alloca i32
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%10 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %9, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %7
%12 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%13 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %12, i32 0, i32 1
%14 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %13, i64 0, i64 0
%15 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %14, i64 0, i64 0
%16 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %15, i32 0, i32 0
%17 = load double, double* %16
store double %17, double* %8
%18 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%19 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %18, i32 0, i32 1
%20 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %19, i64 0, i64 0
%21 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %20, i64 0, i64 1
%22 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %21, i32 0, i32 0
%23 = load double, double* %22
store double %23, double* %8
%24 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%25 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %24, i32 0, i32 1
%26 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %25, i64 0, i64 1
%27 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %26, i64 0, i64 0
%28 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %27, i32 0, i32 0
%29 = load double, double* %28
store double %29, double* %8
%30 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%31 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %30, i32 0, i32 1
%32 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %31, i64 0, i64 1
%33 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %32, i64 0, i64 1
%34 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %33, i32 0, i32 0
%35 = load double, double* %34
store double %35, double* %8
%36 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%37 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %36, i32 0, i32 0
%38 = load i32, i32* %37
store i32 %38, i32* %7
%39 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%40 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %39, i32 0, i32 1
%41 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %40, i64 0, i64 0
%42 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %41, i64 0, i64 0
%43 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %42, i32 0, i32 0
%44 = load double, double* %43
store double %44, double* %8
%45 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%46 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %45, i32 0, i32 1
%47 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %46, i64 0, i64 0
%48 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %47, i64 0, i64 1
%49 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %48, i32 0, i32 0
%50 = load double, double* %49
store double %50, double* %8
%51 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%52 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %51, i32 0, i32 1
%53 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %52, i64 0, i64 1
%54 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %53, i64 0, i64 0
%55 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %54, i32 0, i32 0
%56 = load double, double* %55
store double %56, double* %8
%57 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%58 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %57, i32 0, i32 1
%59 = getelementptr inbounds [2 x [2 x %struct.nested_struct]], [2 x [2 x %struct.nested_struct]]* %58, i64 0, i64 1
%60 = getelementptr inbounds [2 x %struct.nested_struct], [2 x %struct.nested_struct]* %59, i64 0, i64 1
%61 = getelementptr inbounds %struct.nested_struct, %struct.nested_struct* %60, i32 0, i32 0
%62 = load double, double* %61
store double %62, double* %8
ret i32 0
}

LLVM IR (-O2):
%struct.my_struct = type { i32, [2 x [2 x %struct.nested_struct]] }
%struct.nested_struct = type { double }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}