#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ __print_float(double);
int /*<<< orphan*/ __print_int(int);
int main() {
  struct SomeStruct {
    int a;
    float b;
  };
  struct ComplexStruct {
    int a;
    struct {
      int a;
    } b;
    float c;
  };
  struct SomeStruct s;
  struct ComplexStruct c;
  struct SomeStruct *ps;
  struct ComplexStruct *pc;
  ps = &s;
  pc = &c;
  ps->a = 5;
  ps->b = 3.78;
  __print_int(s.a);
  __print_float(s.b);
  pc->b.a = 99;
  __print_int(c.b.a);
  pc->a = pc->b.a;
  __print_int(c.a);
  __print_int(ps->a);
  __print_float(ps->b);
  __print_int(pc->b.a);
  __print_int(pc->a);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.SomeStruct = type { i32, float }
%struct.ComplexStruct = type { i32, %struct.anon, float }
%struct.anon = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.SomeStruct
%3 = alloca %struct.ComplexStruct
%4 = alloca %struct.SomeStruct*
%5 = alloca %struct.ComplexStruct*
store i32 0, i32* %1
store %struct.SomeStruct* %2, %struct.SomeStruct** %4
store %struct.ComplexStruct* %3, %struct.ComplexStruct** %5
%6 = load %struct.SomeStruct*, %struct.SomeStruct** %4
%7 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %6, i32 0, i32 0
store i32 5, i32* %7
%8 = load %struct.SomeStruct*, %struct.SomeStruct** %4
%9 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %8, i32 0, i32 1
store float 0x400E3D70A0000000, float* %9
%10 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %2, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @__print_int(i32 %11)
%13 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %2, i32 0, i32 1
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 @__print_float(double %15)
%17 = load %struct.ComplexStruct*, %struct.ComplexStruct** %5
%18 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %17, i32 0, i32 1
%19 = getelementptr inbounds %struct.anon, %struct.anon* %18, i32 0, i32 0
store i32 99, i32* %19
%20 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %3, i32 0, i32 1
%21 = getelementptr inbounds %struct.anon, %struct.anon* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = call i32 @__print_int(i32 %22)
%24 = load %struct.ComplexStruct*, %struct.ComplexStruct** %5
%25 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %24, i32 0, i32 1
%26 = getelementptr inbounds %struct.anon, %struct.anon* %25, i32 0, i32 0
%27 = load i32, i32* %26
%28 = load %struct.ComplexStruct*, %struct.ComplexStruct** %5
%29 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %28, i32 0, i32 0
store i32 %27, i32* %29
%30 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %3, i32 0, i32 0
%31 = load i32, i32* %30
%32 = call i32 @__print_int(i32 %31)
%33 = load %struct.SomeStruct*, %struct.SomeStruct** %4
%34 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %33, i32 0, i32 0
%35 = load i32, i32* %34
%36 = call i32 @__print_int(i32 %35)
%37 = load %struct.SomeStruct*, %struct.SomeStruct** %4
%38 = getelementptr inbounds %struct.SomeStruct, %struct.SomeStruct* %37, i32 0, i32 1
%39 = load float, float* %38
%40 = fpext float %39 to double
%41 = call i32 @__print_float(double %40)
%42 = load %struct.ComplexStruct*, %struct.ComplexStruct** %5
%43 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %42, i32 0, i32 1
%44 = getelementptr inbounds %struct.anon, %struct.anon* %43, i32 0, i32 0
%45 = load i32, i32* %44
%46 = call i32 @__print_int(i32 %45)
%47 = load %struct.ComplexStruct*, %struct.ComplexStruct** %5
%48 = getelementptr inbounds %struct.ComplexStruct, %struct.ComplexStruct* %47, i32 0, i32 0
%49 = load i32, i32* %48
%50 = call i32 @__print_int(i32 %49)
ret i32 0
}

LLVM IR (-O2):
%struct.SomeStruct = type { i32, float }
%struct.ComplexStruct = type { i32, %struct.anon, float }
%struct.anon = type { i32 }
define i32 @main() {
%1 = tail call i32 @__print_int(i32 5)
%2 = tail call i32 @__print_float(double 0x400E3D70A0000000)
%3 = tail call i32 @__print_int(i32 99)
%4 = tail call i32 @__print_int(i32 99)
%5 = tail call i32 @__print_int(i32 5)
%6 = tail call i32 @__print_float(double 0x400E3D70A0000000)
%7 = tail call i32 @__print_int(i32 99)
%8 = tail call i32 @__print_int(i32 99)
ret i32 0
}