int main() {
  struct person {
    char name[50];
    int age;
    union {
      struct {
        char game[25];
        int jersey_number;
      } sports;
      struct {
        char instrument[25];
        int years_practice;
      } music;
      struct {
        int hours_week
      } television;
    } hobby;
  } a, b, c;
  strcpy(a.name, "Alex");
  a.age = 17;
  strcpy(a.hobby.music.instrument, "Guitar");
  a.hobby.music.years_practice = 3;
  strcpy(b.name, "Gheorghe");
  b.age = 23;
  strcpy(b.hobby.sports.game, "Football");
  b.hobby.sports.jersey_number = 11;
  strcpy(c.name, "Vasily");
  c.age = 15;
  c.hobby.television.hours_week = 60;
  printf("Person A is %s, who is %d years old.\n", a.name, a.age);
  printf("%s has played %s for %d years.", a.name, a.hobby.music.instrument,
         a.hobby.music.years_practice);
  puts("\n\n");
  printf("Person B is %s, who is %d years old.\n", b.name, b.age);
  printf(
      "%s has played %s and for 2 years he is wearing no. %d on his t-shirt.",
      b.name, b.hobby.sports.game, b.hobby.sports.jersey_number);
  puts("\n\n");
  printf("Person C is %s, who is %d years old.\n", c.name, c.age);
  printf("%s watches TV %d hours average a week.", c.name, c.hobby.television,
         c.hobby.television.hours_week);
  getchar();
  return (987654);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x11,-0x2c(%rbp)
lea    -0x60(%rbp),%rdi
add    $0x38,%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x3,-0xc(%rbp)
lea    -0xb8(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x17,-0x84(%rbp)
lea    -0xb8(%rbp),%rdi
add    $0x38,%rdi
lea    0xe62(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0xb,-0x64(%rbp)
lea    -0x110(%rbp),%rdi
lea    0xe51(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0xf,-0xdc(%rbp)
movl   $0x3c,-0xd8(%rbp)
lea    -0x60(%rbp),%rsi
mov    -0x2c(%rbp),%edx
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    -0x60(%rbp),%rdx
add    $0x38,%rdx
mov    -0xc(%rbp),%ecx
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
lea    -0xb8(%rbp),%rsi
mov    -0x84(%rbp),%edx
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xb8(%rbp),%rsi
lea    -0xb8(%rbp),%rdx
add    $0x38,%rdx
mov    -0x64(%rbp),%ecx
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
lea    -0x110(%rbp),%rsi
mov    -0xdc(%rbp),%edx
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x110(%rbp),%rsi
mov    -0xd8(%rbp),%ecx
mov    -0xd8(%rbp),%edx
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0xf1206,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x110,%rsp
movl   $0x78656c41,0x60(%rsp)
78
movb   $0x0,0x64(%rsp)
movabs $0x7469754700000011,%rax
75 69 74
mov    %rax,0x94(%rsp)
lea    0x98(%rsp),%r15
movl   $0x726174,0x9b(%rsp)
movl   $0x3,0xb4(%rsp)
movabs $0x656867726f656847,%rax
67 68 65
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x17,0x3c(%rsp)
lea    0x40(%rsp),%r14
movabs $0x6c6c6162746f6f46,%rax
61 6c 6c
mov    %rax,0x40(%rsp)
movb   $0x0,0x48(%rsp)
movl   $0xb,0x5c(%rsp)
movl   $0x69736156,0xb8(%rsp)
56 61 73 69
movl   $0x796c69,0xbb(%rsp)
movabs $0x3c0000000f,%rax
mov    %rax,0xec(%rsp)
lea    0xe40(%rip),%rdi
lea    0x60(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x11,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xb4(%rsp),%ecx
lea    0xe44(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4f(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xe41(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x5c(%rsp),%ecx
lea    0xe48(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xe70(%rip),%rdi
lea    0xb8(%rsp),%rbx
mov    %rbx,%rsi
mov    $0xf,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xf0(%rsp),%ecx
lea    0xe71(%rip),%rdi
mov    %rbx,%rsi
mov    %ecx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    $0xf1206,%eax
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.person = type { [50 x i8], i32, %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { [25 x i8], i32 }
%struct.anon.0 = type { [25 x i8], i32 }
%struct.anon.1 = type { i32 }
@.str = [5 x i8] c"Alex\00"
@.str.1 = [7 x i8] c"Guitar\00"
@.str.2 = [9 x i8] c"Gheorghe\00"
@.str.3 = [9 x i8] c"Football\00"
@.str.4 = [7 x i8] c"Vasily\00"
@.str.5 = [38 x i8] c"Person A is %s, who is %d years old.\0A\00"
@.str.6 = [31 x i8] c"%s has played %s for %d years.\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [38 x i8] c"Person B is %s, who is %d years old.\0A\00"
@.str.9 = [70 x i8] c"%s has played %s and for 2 years he is wearing no. %d on his t-shirt.\00"
@.str.10 = [38 x i8] c"Person C is %s, who is %d years old.\0A\00"
@.str.11 = [39 x i8] c"%s watches TV %d hours average a week.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.person
%3 = alloca %struct.person
%4 = alloca %struct.person
store i32 0, i32* %1
%5 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%7 = call i8* @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 1
store i32 17, i32* %8
%9 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 2
%10 = bitcast %union.anon* %9 to %struct.anon.0*
%11 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %10, i32 0, i32 0
%12 = getelementptr inbounds [25 x i8], [25 x i8]* %11, i64 0, i64 0
%13 = call i8* @strcpy(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 2
%15 = bitcast %union.anon* %14 to %struct.anon.0*
%16 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %15, i32 0, i32 1
store i32 3, i32* %16
%17 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 0
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %17, i64 0, i64 0
%19 = call i8* @strcpy(i8* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%20 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 1
store i32 23, i32* %20
%21 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 2
%22 = bitcast %union.anon* %21 to %struct.anon*
%23 = getelementptr inbounds %struct.anon, %struct.anon* %22, i32 0, i32 0
%24 = getelementptr inbounds [25 x i8], [25 x i8]* %23, i64 0, i64 0
%25 = call i8* @strcpy(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%26 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 2
%27 = bitcast %union.anon* %26 to %struct.anon*
%28 = getelementptr inbounds %struct.anon, %struct.anon* %27, i32 0, i32 1
store i32 11, i32* %28
%29 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 0
%30 = getelementptr inbounds [50 x i8], [50 x i8]* %29, i64 0, i64 0
%31 = call i8* @strcpy(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%32 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 1
store i32 15, i32* %32
%33 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 2
%34 = bitcast %union.anon* %33 to %struct.anon.1*
%35 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %34, i32 0, i32 0
store i32 60, i32* %35
%36 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 0
%37 = getelementptr inbounds [50 x i8], [50 x i8]* %36, i64 0, i64 0
%38 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 1
%39 = load i32, i32* %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %37, i32 %39)
%41 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 0
%42 = getelementptr inbounds [50 x i8], [50 x i8]* %41, i64 0, i64 0
%43 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 2
%44 = bitcast %union.anon* %43 to %struct.anon.0*
%45 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %44, i32 0, i32 0
%46 = getelementptr inbounds [25 x i8], [25 x i8]* %45, i64 0, i64 0
%47 = getelementptr inbounds %struct.person, %struct.person* %2, i32 0, i32 2
%48 = bitcast %union.anon* %47 to %struct.anon.0*
%49 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %48, i32 0, i32 1
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* %42, i8* %46, i32 %50)
%52 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%53 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 0
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %53, i64 0, i64 0
%55 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 1
%56 = load i32, i32* %55
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i8* %54, i32 %56)
%58 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 0
%59 = getelementptr inbounds [50 x i8], [50 x i8]* %58, i64 0, i64 0
%60 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 2
%61 = bitcast %union.anon* %60 to %struct.anon*
%62 = getelementptr inbounds %struct.anon, %struct.anon* %61, i32 0, i32 0
%63 = getelementptr inbounds [25 x i8], [25 x i8]* %62, i64 0, i64 0
%64 = getelementptr inbounds %struct.person, %struct.person* %3, i32 0, i32 2
%65 = bitcast %union.anon* %64 to %struct.anon*
%66 = getelementptr inbounds %struct.anon, %struct.anon* %65, i32 0, i32 1
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0), i8* %59, i8* %63, i32 %67)
%69 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%70 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 0
%71 = getelementptr inbounds [50 x i8], [50 x i8]* %70, i64 0, i64 0
%72 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 1
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* %71, i32 %73)
%75 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 0
%76 = getelementptr inbounds [50 x i8], [50 x i8]* %75, i64 0, i64 0
%77 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 2
%78 = bitcast %union.anon* %77 to %struct.anon.1*
%79 = getelementptr inbounds %struct.person, %struct.person* %4, i32 0, i32 2
%80 = bitcast %union.anon* %79 to %struct.anon.1*
%81 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %80, i32 0, i32 0
%82 = load i32, i32* %81
%83 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %78, i32 0, i32 0
%84 = load i32, i32* %83
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %76, i32 %84, i32 %82)
%86 = call i32 (...) @getchar()
ret i32 987654
}

LLVM IR (-O2):
%struct.person = type { [50 x i8], i32, %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { [25 x i8], i32 }
@.str = [5 x i8] c"Alex\00"
@.str.1 = [7 x i8] c"Guitar\00"
@.str.2 = [9 x i8] c"Gheorghe\00"
@.str.3 = [9 x i8] c"Football\00"
@.str.4 = [7 x i8] c"Vasily\00"
@.str.5 = [38 x i8] c"Person A is %s, who is %d years old.\0A\00"
@.str.6 = [31 x i8] c"%s has played %s for %d years.\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [38 x i8] c"Person B is %s, who is %d years old.\0A\00"
@.str.9 = [70 x i8] c"%s has played %s and for 2 years he is wearing no. %d on his t-shirt.\00"
@.str.10 = [38 x i8] c"Person C is %s, who is %d years old.\0A\00"
@.str.11 = [39 x i8] c"%s watches TV %d hours average a week.\00"
define i32 @main() {
%1 = alloca %struct.person
%2 = alloca %struct.person
%3 = alloca %struct.person
%4 = getelementptr inbounds %struct.person, %struct.person* %1, i64 0, i32 0, i64 0
%5 = getelementptr inbounds %struct.person, %struct.person* %2, i64 0, i32 0, i64 0
%6 = getelementptr inbounds %struct.person, %struct.person* %3, i64 0, i32 0, i64 0
%7 = getelementptr inbounds %struct.person, %struct.person* %1, i64 0, i32 1
store i32 17, i32* %7
%8 = getelementptr inbounds %struct.person, %struct.person* %1, i64 0, i32 2, i32 0, i32 0, i64 0
%9 = getelementptr inbounds %struct.person, %struct.person* %1, i64 0, i32 2, i32 0, i32 1
store i32 3, i32* %9
%10 = getelementptr inbounds %struct.person, %struct.person* %2, i64 0, i32 1
store i32 23, i32* %10
%11 = getelementptr inbounds %struct.person, %struct.person* %2, i64 0, i32 2, i32 0, i32 0, i64 0
%12 = getelementptr inbounds %struct.person, %struct.person* %2, i64 0, i32 2, i32 0, i32 1
store i32 11, i32* %12
%13 = getelementptr inbounds %struct.person, %struct.person* %3, i64 0, i32 1
store i32 15, i32* %13
%14 = getelementptr inbounds %struct.person, %struct.person* %3, i64 0, i32 2
%15 = bitcast %union.anon* %14 to i32*
store i32 60, i32* %15
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %4, i32 17)
%17 = load i32, i32* %9
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* %4, i8* %8, i32 %17)
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i8* %5, i32 23)
%21 = load i32, i32* %12
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0), i8* %5, i8* %11, i32 %21)
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* %6, i32 15)
%25 = load i32, i32* %15
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %6, i32 %25, i32 %25)
%27 = call i32 (...) @getchar()
ret i32 987654
}