#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 *, unsigned int, unsigned int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  unsigned int numMale[53 + 1], numFemale[53 + 1];
  int year;
  numMale[0] = 0;
  numFemale[0] = 1;
  for (year = 1; year <= 53; year++) {
    numMale[year] = numMale[year - 1] + numFemale[year - 1];
    numFemale[year] = numMale[year - 1] + 1;
  }
  while (1) {
    scanf("%d", &year);
    if (year < 0)
      break;
    printf("%u %u\n", numMale[year], numMale[year] + numFemale[year]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xe0(%rbp)
movl   $0x1,-0x1c0(%rbp)
movl   $0x1,-0x1c4(%rbp)
cmpl   $0x35,-0x1c4(%rbp)
jg     11c6 <main+0xa6>
mov    -0x1c4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,4),%ecx
mov    -0x1c4(%rbp),%eax
sub    $0x1,%eax
cltq
add    -0x1c0(%rbp,%rax,4),%ecx
movslq -0x1c4(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,4)
mov    -0x1c4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
movslq -0x1c4(%rbp),%rax
mov    %ecx,-0x1c0(%rbp,%rax,4)
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
jmp    1150 <main+0x30>
jmp    11cb <main+0xab>
lea    0xe2e(%rip),%rdi
lea    -0x1c4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x1c4(%rbp)
jge    11f0 <main+0xd0>
jmp    122b <main+0x10b>
movslq -0x1c4(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
movslq -0x1c4(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edx
movslq -0x1c4(%rbp),%rax
add    -0x1c0(%rbp,%rax,4),%edx
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xab>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1d0,%rsp
movl   $0x0,0xf0(%rsp)
movl   $0x1,0x10(%rsp)
xor    %eax,%eax
mov    $0x1,%ecx
mov    $0x2,%edx
nopl   0x0(%rax,%rax,1)
add    %eax,%ecx
mov    %ecx,0xec(%rsp,%rdx,4)
add    $0x1,%eax
mov    %eax,0xc(%rsp,%rdx,4)
cmp    $0x36,%rdx
je     117c <main+0x5c>
add    %ecx,%eax
mov    %eax,0xf0(%rsp,%rdx,4)
add    $0x1,%ecx
mov    %ecx,0x10(%rsp,%rdx,4)
add    $0x2,%rdx
jmp    1150 <main+0x30>
movl   $0x36,0xc(%rsp)
lea    0xe75(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     11da <main+0xba>
lea    0xe5f(%rip),%r14
lea    0xe55(%rip),%r15
lea    0xc(%rsp),%rbx
mov    %eax,%eax
mov    0xf0(%rsp,%rax,4),%esi
mov    0x10(%rsp,%rax,4),%edx
add    %esi,%edx
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jns    11b0 <main+0x90>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%u %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [54 x i32]
%3 = alloca [54 x i32]
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
%6 = getelementptr inbounds [54 x i32], [54 x i32]* %3, i64 0, i64 0
store i32 1, i32* %6
store i32 1, i32* %4
br label %7
7: ; preds = %34, %0
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 53
br i1 %9, label %10, label %37
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [54 x i32], [54 x i32]* %3, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = add i32 %15, %20
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %23
store i32 %21, i32* %24
%25 = load i32, i32* %4
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = add i32 %29, 1
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [54 x i32], [54 x i32]* %3, i64 0, i64 %32
store i32 %30, i32* %33
br label %34
34: ; preds = %10
%35 = load i32, i32* %4
%36 = add nsw i32 %35, 1
store i32 %36, i32* %4
br label %7
37: ; preds = %7
br label %38
38: ; preds = %37, %43
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%40 = load i32, i32* %4
%41 = icmp slt i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %38
br label %58
43: ; preds = %38
%44 = load i32, i32* %4
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = load i32, i32* %4
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [54 x i32], [54 x i32]* %3, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = add i32 %51, %55
%57 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %47, i32 %56)
br label %38
58: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%u %u\0A\00"
define i32 @main() {
%1 = alloca [54 x i32]
%2 = alloca [54 x i32]
%3 = alloca i32
%4 = bitcast [54 x i32]* %1 to i8*
%5 = bitcast [54 x i32]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [54 x i32], [54 x i32]* %1, i64 0, i64 0
store i32 0, i32* %7
%8 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 0
store i32 1, i32* %8
br label %13
9: ; preds = %13
store i32 54, i32* %3
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 0
br i1 %12, label %41, label %29
13: ; preds = %23, %0
%14 = phi i32 [ 1, %0 ], [ %26, %23 ]
%15 = phi i32 [ 0, %0 ], [ %24, %23 ]
%16 = phi i64 [ 1, %0 ], [ %28, %23 ]
%17 = add i32 %14, %15
%18 = getelementptr inbounds [54 x i32], [54 x i32]* %1, i64 0, i64 %16
store i32 %17, i32* %18
%19 = add i32 %15, 1
%20 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %16
store i32 %19, i32* %20
%21 = add nuw nsw i64 %16, 1
%22 = icmp eq i64 %21, 54
br i1 %22, label %9, label %23
23: ; preds = %13
%24 = add i32 %19, %17
%25 = getelementptr inbounds [54 x i32], [54 x i32]* %1, i64 0, i64 %21
store i32 %24, i32* %25
%26 = add i32 %17, 1
%27 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %21
store i32 %26, i32* %27
%28 = add nuw nsw i64 %16, 2
br label %13
29: ; preds = %9, %29
%30 = phi i32 [ %39, %29 ], [ %11, %9 ]
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds [54 x i32], [54 x i32]* %1, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = getelementptr inbounds [54 x i32], [54 x i32]* %2, i64 0, i64 %31
%35 = load i32, i32* %34
%36 = add i32 %35, %33
%37 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %33, i32 %36)
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%39 = load i32, i32* %3
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %29
41: ; preds = %29, %9
ret i32 0
}