#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 */
char *computus(int, int, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char tmp1[9], tmp2[9];
  printf("The following are the dates of the Paschal full moon (using "
         "Servois notation) and the date of Easter for 2020-2030 AD:\n");
  printf("Year\tServois number\tEaster\n");
  for (int year = 2020; year <= 2030; year++) {
    printf("%d\t\t%s\t%s\n", year, computus(year, 1, tmp1, 9),
           computus(year, 0, tmp2, 9));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x7e4,-0x1c(%rbp)
cmpl   $0x7ee,-0x1c(%rbp)
jg     11b8 <main+0x98>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0xd(%rbp),%rdx
mov    $0x1,%esi
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x16(%rbp),%rdx
xor    %esi,%esi
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    %rax,%rcx
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1152 <main+0x32>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
lea    0xf34(%rip),%rdi
call   1040 <puts@plt>
lea    0xf(%rsp),%r14
mov    $0x7e4,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
lea    0x6(%rsp),%r15
mov    $0x7e4,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
lea    0xe6e(%rip),%r12
mov    %r12,%rdi
mov    $0x7e4,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7e5,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7e5,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7e5,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7e6,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7e6,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7e6,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7e7,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7e7,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7e7,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7e8,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7e8,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7e8,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7e9,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7e9,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7e9,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7ea,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7ea,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7ea,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7eb,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7eb,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7eb,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7ec,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7ec,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7ec,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7ed,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7ed,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7ed,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7ee,%edi
mov    $0x1,%esi
mov    %r14,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %rax,%rbx
mov    $0x7ee,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    $0x9,%ecx
call   1030 <computus@plt>
mov    %r12,%rdi
mov    $0x7ee,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [120 x i8] c"The following are the dates of the Paschal full moon (using Servois notation) and the date of Easter for 2020-2030 AD:\0A\00"
@.str.1 = [28 x i8] c"Year\09Servois number\09Easter\0A\00"
@.str.2 = [11 x i8] c"%d\09\09%s\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [9 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
store i32 2020, i32* %4
br label %7
7: ; preds = %19, %0
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 2030
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%14 = call i8* @computus(i32 %12, i32 1, i8* %13, i32 9)
%15 = load i32, i32* %4
%16 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%17 = call i8* @computus(i32 %15, i32 0, i8* %16, i32 9)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %11, i8* %14, i8* %17)
br label %19
19: ; preds = %10
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"%d\09\09%s\09%s\0A\00"
@str = [119 x i8] c"The following are the dates of the Paschal full moon (using Servois notation) and the date of Easter for 2020-2030 AD:\00"
@str.3 = [27 x i8] c"Year\09Servois number\09Easter\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([119 x i8], [119 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%7 = call i8* @computus(i32 2020, i32 1, i8* %3, i32 9)
%8 = call i8* @computus(i32 2020, i32 0, i8* %4, i32 9)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2020, i8* %7, i8* %8)
%10 = call i8* @computus(i32 2021, i32 1, i8* %3, i32 9)
%11 = call i8* @computus(i32 2021, i32 0, i8* %4, i32 9)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2021, i8* %10, i8* %11)
%13 = call i8* @computus(i32 2022, i32 1, i8* %3, i32 9)
%14 = call i8* @computus(i32 2022, i32 0, i8* %4, i32 9)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2022, i8* %13, i8* %14)
%16 = call i8* @computus(i32 2023, i32 1, i8* %3, i32 9)
%17 = call i8* @computus(i32 2023, i32 0, i8* %4, i32 9)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2023, i8* %16, i8* %17)
%19 = call i8* @computus(i32 2024, i32 1, i8* %3, i32 9)
%20 = call i8* @computus(i32 2024, i32 0, i8* %4, i32 9)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2024, i8* %19, i8* %20)
%22 = call i8* @computus(i32 2025, i32 1, i8* %3, i32 9)
%23 = call i8* @computus(i32 2025, i32 0, i8* %4, i32 9)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2025, i8* %22, i8* %23)
%25 = call i8* @computus(i32 2026, i32 1, i8* %3, i32 9)
%26 = call i8* @computus(i32 2026, i32 0, i8* %4, i32 9)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2026, i8* %25, i8* %26)
%28 = call i8* @computus(i32 2027, i32 1, i8* %3, i32 9)
%29 = call i8* @computus(i32 2027, i32 0, i8* %4, i32 9)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2027, i8* %28, i8* %29)
%31 = call i8* @computus(i32 2028, i32 1, i8* %3, i32 9)
%32 = call i8* @computus(i32 2028, i32 0, i8* %4, i32 9)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2028, i8* %31, i8* %32)
%34 = call i8* @computus(i32 2029, i32 1, i8* %3, i32 9)
%35 = call i8* @computus(i32 2029, i32 0, i8* %4, i32 9)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2029, i8* %34, i8* %35)
%37 = call i8* @computus(i32 2030, i32 1, i8* %3, i32 9)
%38 = call i8* @computus(i32 2030, i32 0, i8* %4, i32 9)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 2030, i8* %37, i8* %38)
ret i32 0
}