#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main() {
  int dates, d, i;
  char date[21];
  freopen("world.in", "r", stdin);
  scanf("%d\n", &dates);
  for (d = 0; d < dates; d++) {
    for (i = 0; i < 21; i++)
      date[i] = 0;
    gets(date);
    printf("The end of the world is on %s.\n", date);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
lea    0xea1(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1040 <freopen@plt>
lea    0xe99(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11dd <main+0x9d>
movl   $0x0,-0x10(%rbp)
cmpl   $0x15,-0x10(%rbp)
jge    11b6 <main+0x76>
movslq -0x10(%rbp),%rax
movb   $0x0,-0x30(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1195 <main+0x55>
lea    -0x30(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x30(%rbp),%rsi
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1182 <main+0x42>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
lea    0xeb8(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeb0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11bd <main+0x7d>
xor    %ebp,%ebp
lea    0x10(%rsp),%rbx
lea    0xe95(%rip),%r14
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x1d(%rsp)
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1190 <main+0x50>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"world.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [32 x i8] c"The end of the world is on %s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [21 x i8]
store i32 0, i32* %1
%6 = load i32, i32* @stdin
%7 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %9
9: ; preds = %29, %0
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
store i32 0, i32* %4
br label %14
14: ; preds = %21, %13
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 21
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 %19
store i8 0, i8* %20
br label %21
21: ; preds = %17
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %14
24: ; preds = %14
%25 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%26 = call i32 @gets(i8* %25)
%27 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%28 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %27)
br label %29
29: ; preds = %24
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %9
32: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"world.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [32 x i8] c"The end of the world is on %s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %0, %11
%12 = phi i32 [ %15, %11 ], [ 0, %0 ]
%13 = call i32 @gets(i8* %5)
%14 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%15 = add nuw nsw i32 %12, 1
%16 = load i32, i32* %1
%17 = icmp slt i32 %15, %16
br i1 %17, label %11, label %18
18: ; preds = %11, %0
ret i32 0
}