#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*/ printf(char *, char *, int, int);
main() {
  struct birthday {
    char name[20];
    int mm;
    int dd;
  };
  struct birthday it28[5] = {{"aoki", 6, 5},
                             {"aoki", 6, 5},
                             {"aoki", 6, 5},
                             {"aoki", 6, 5},
                             {"aoki", 6, 5}};
  int i;
  for (i = 0; i < 5; i++) {
    printf("%s君の誕生日は%d月%d日です。\n", it28[i].name, it28[i].mm,
           it28[i].dd);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xec0(%rip),%rsi
mov    $0x8c,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x5,-0x94(%rbp)
jge    11c6 <main+0xa6>
movslq -0x94(%rbp),%rax
lea    -0x90(%rbp),%rsi
imul   $0x1c,%rax,%rax
add    %rax,%rsi
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
mov    0x14(%rax),%edx
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
mov    0x18(%rax),%ecx
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1154 <main+0x34>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x98,%rsp
lea    0xecf(%rip),%rsi
mov    %rsp,%r14
mov    $0x8c,%edx
mov    %r14,%rdi
call   1040 <memcpy@plt>
lea    0xf44(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x6,%edx
mov    $0x5,%ecx
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    0x30(%rsp),%edx
mov    0x34(%rsp),%ecx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x38(%rsp),%rsi
mov    0x4c(%rsp),%edx
mov    0x50(%rsp),%ecx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x54(%rsp),%rsi
mov    0x68(%rsp),%edx
mov    0x6c(%rsp),%ecx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x70(%rsp),%rsi
mov    0x84(%rsp),%edx
mov    0x88(%rsp),%ecx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.birthday = type { [20 x i8], i32, i32 }
@__const.main.it28 = [5 x %struct.birthday] [%struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }]
@.str = [41 x i8] c"%s\E5\90\9B\E3\81\AE\E8\AA\95\E7\94\9F\E6\97\A5\E3\81\AF%d\E6\9C\88%d\E6\97\A5\E3\81\A7\E3\81\99\E3\80\82\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x %struct.birthday]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x %struct.birthday]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %25, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %28
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %2, i64 0, i64 %10
%12 = getelementptr inbounds %struct.birthday, %struct.birthday* %11, i32 0, i32 0
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 0, i64 0
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %2, i64 0, i64 %15
%17 = getelementptr inbounds %struct.birthday, %struct.birthday* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %2, i64 0, i64 %20
%22 = getelementptr inbounds %struct.birthday, %struct.birthday* %21, i32 0, i32 2
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %18, i32 %23)
br label %25
25: ; preds = %8
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %5
28: ; preds = %5
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
%struct.birthday = type { [20 x i8], i32, i32 }
@__const.main.it28 = [5 x %struct.birthday] [%struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }, %struct.birthday { [20 x i8] c"aoki\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 6, i32 5 }]
@.str = [41 x i8] c"%s\E5\90\9B\E3\81\AE\E8\AA\95\E7\94\9F\E6\97\A5\E3\81\AF%d\E6\9C\88%d\E6\97\A5\E3\81\A7\E3\81\99\E3\80\82\0A\00"
define i32 @main() {
%1 = alloca [5 x %struct.birthday]
%2 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 0, i32 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2, i32 6, i32 5)
%4 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 1, i32 0, i64 0
%5 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 1, i32 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 1, i32 2
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i32 %8)
%10 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 2, i32 0, i64 0
%11 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 2, i32 1
%12 = load i32, i32* %11
%13 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 2, i32 2
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %12, i32 %14)
%16 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 3, i32 0, i64 0
%17 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 3, i32 1
%18 = load i32, i32* %17
%19 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 3, i32 2
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %18, i32 %20)
%22 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 4, i32 0, i64 0
%23 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 4, i32 1
%24 = load i32, i32* %23
%25 = getelementptr inbounds [5 x %struct.birthday], [5 x %struct.birthday]* %1, i64 0, i64 4, i32 2
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %22, i32 %24, i32 %26)
ret i32 0
}