#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int member_0;
  int member_1;
  int member_2;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  struct date {
    int year;
    int month;
    int day;
  } birthday;
  struct student {
    int num;
    char name[20];
    float score;
    struct date birthday;
  };
  struct student student1 = {2, "shiwenhan", 100, {1995, 12, 5}};
  printf("%d\n%s\n%f\n%d", student1.num, student1.name, student1.score,
         sizeof(struct student));
  printf("%p", &student1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x38(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
mov    -0x38(%rbp),%esi
lea    -0x38(%rbp),%rdx
add    $0x4,%rdx
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec9(%rip),%rdi
mov    $0x28,%ecx
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf0d(%rip),%rax
mov    %rax,0x20(%rsp)
movups 0xef1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x4(%rsp),%rdx
lea    0xeed(%rip),%rdi
movsd  0xeb5(%rip),%xmm0
mov    $0x28,%ecx
mov    $0x2,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.student = type { i32, [20 x i8], float, %struct.date }
%struct.date = type { i32, i32, i32 }
@__const.main.student1 = %struct.student { i32 2, [20 x i8] c"shiwenhan\00\00\00\00\00\00\00\00\00\00\00", float 1.000000e+02, %struct.date { i32 1995, i32 12, i32 5 } }
@.str = [12 x i8] c"%d\0A%s\0A%f\0A%d\00"
@.str.1 = [3 x i8] c"%p\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.date
%3 = alloca %struct.student
store i32 0, i32* %1
%4 = bitcast %struct.student* %3 to i8*
%5 = getelementptr inbounds %struct.student, %struct.student* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.student, %struct.student* %3, i32 0, i32 1
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%9 = getelementptr inbounds %struct.student, %struct.student* %3, i32 0, i32 2
%10 = load float, float* %9
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %8, double %11, i64 40)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %struct.student* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.student = type { i32, [20 x i8], float, %struct.date }
%struct.date = type { i32, i32, i32 }
@__const.main.student1 = %struct.student { i32 2, [20 x i8] c"shiwenhan\00\00\00\00\00\00\00\00\00\00\00", float 1.000000e+02, %struct.date { i32 1995, i32 12, i32 5 } }
@.str = [12 x i8] c"%d\0A%s\0A%f\0A%d\00"
@.str.1 = [3 x i8] c"%p\00"
define i32 @main() {
%1 = alloca %struct.student
%2 = bitcast %struct.student* %1 to i8*
%3 = getelementptr inbounds %struct.student, %struct.student* %1, i64 0, i32 1, i64 0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i8* %3, double 1.000000e+02, i64 40)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %struct.student* %1)
ret i32 0
}