int main() {
  struct {
    int a;
    float b;
  } s;
  struct {
    int a;
    struct {
      int a;
    } b;
    float c;
  } c;
  s.a = 5;
  s.b = 3.78;
  __print_int(s.a);
  __print_float(s.b);
  c.b.a = 99;
  __print_int(c.b.a);
  c.a = c.b.a;
  __print_int(c.a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x10(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   1040 <__print_int@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <__print_float@plt>
movl   $0x63,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x0,%al
call   1040 <__print_int@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    $0x0,%al
call   1040 <__print_int@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
xor    %eax,%eax
call   1040 <__print_int@plt>
movsd  0xecb(%rip),%xmm0
mov    $0x1,%al
call   1030 <__print_float@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1040 <__print_int@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1040 <__print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.anon = type { i32, float }
%struct.anon.0 = type { i32, %struct.anon.1, float }
%struct.anon.1 = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
%3 = alloca %struct.anon.0
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
store i32 5, i32* %4
%5 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
store float 0x400E3D70A0000000, float* %5
%6 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 %7)
%9 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%10 = load float, float* %9
%11 = fpext float %10 to double
%12 = call i32 (double, ...) bitcast (i32 (...)* @__print_float to i32 (double, ...)*)(double %11)
%13 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 1
%14 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %13, i32 0, i32 0
store i32 99, i32* %14
%15 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 1
%16 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %15, i32 0, i32 0
%17 = load i32, i32* %16
%18 = call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 %17)
%19 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 1
%20 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %19, i32 0, i32 0
%21 = load i32, i32* %20
%22 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 0
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 0
%24 = load i32, i32* %23
%25 = call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 5)
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @__print_float to i32 (double, ...)*)(double 0x400E3D70A0000000)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 99)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @__print_int to i32 (i32, ...)*)(i32 99)
ret i32 0
}