#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int any;
  int a, b, c, d, e, n;
  printf("Introduce un año: ");
  scanf("%d", &any);
  a = any % 19;
  b = any % 4;
  c = any % 7;
  d = (19 * a + 24) % 30;
  e = (2 * b + 4 * c + 6 * d + 5) % 7;
  n = (22 + d + e);
  printf("El Domingo de Pascua del año %d es: ", any);
  if (n <= 31) {
    printf("%d de Marzo ", n);
  } else
    printf("%d de Abril ", n - 31);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x13,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
imul   $0x13,-0x18(%rbp),%eax
add    $0x18,%eax
mov    $0x1e,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
imul   $0x6,-0x24(%rbp),%ecx
add    %ecx,%eax
add    $0x5,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    $0x16,%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1f,-0x2c(%rbp)
jg     11ef <main+0xcf>
mov    -0x2c(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1203 <main+0xe3>
mov    -0x2c(%rbp),%esi
sub    $0x1f,%esi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dd6(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rsi
imul   $0x6bca1af3,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x3,%eax
add    %ecx,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,2),%eax
mov    %esi,%edx
sub    %eax,%edx
lea    0x3(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
and    $0x7ffffffc,%ecx
mov    %esi,%eax
sub    %ecx,%eax
imul   $0xffffffff92492493,%rsi,%rcx
shr    $0x20,%rcx
add    %esi,%ecx
mov    %ecx,%edi
shr    $0x1f,%edi
sar    $0x2,%ecx
add    %edi,%ecx
lea    0x0(,%rcx,8),%edi
sub    %edi,%ecx
add    %esi,%ecx
lea    (%rdx,%rdx,8),%edi
lea    (%rdx,%rdi,2),%ebx
lea    (%rdx,%rdi,2),%r8d
add    $0x18,%r8d
movswl %r8w,%edi
imul   $0xffff8889,%edi,%edi
shr    $0x10,%edi
add    %ebx,%edi
add    $0x18,%edi
movzwl %di,%edi
movswl %di,%edx
shr    $0xf,%edi
sar    $0x4,%edx
add    %edi,%edx
mov    %edx,%edi
shl    $0x5,%edi
mov    %edx,%ebx
sub    %edi,%ebx
add    %edx,%ebx
add    %r8d,%ebx
movswl %bx,%edx
add    %eax,%eax
lea    (%rdx,%rdx,2),%edi
lea    (%rax,%rcx,4),%eax
lea    (%rax,%rdi,2),%ecx
lea    (%rax,%rdi,2),%eax
add    $0x5,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ecx,%eax
add    $0x5,%eax
mov    %eax,%edi
shr    $0x1f,%edi
sar    $0x2,%eax
add    %edi,%eax
lea    0x0(,%rax,8),%edi
sub    %edi,%eax
add    %ecx,%eax
add    $0x5,%eax
lea    (%rdx,%rax,1),%ebx
add    $0x16,%ebx
lea    0xdf2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1f,%ebx
jg     123a <main+0x11a>
lea    0xe05(%rip),%rdi
jmp    1244 <main+0x124>
add    $0xffffffe1,%ebx
lea    0xe06(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Introduce un a\C3\B1o: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"El Domingo de Pascua del a\C3\B1o %d es: \00"
@.str.3 = [13 x i8] c"%d de Marzo \00"
@.str.4 = [13 x i8] c"%d de Abril \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%15 = load i32, i32* %6
%16 = srem i32 %15, 19
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = srem i32 %17, 4
store i32 %18, i32* %8
%19 = load i32, i32* %6
%20 = srem i32 %19, 7
store i32 %20, i32* %9
%21 = load i32, i32* %7
%22 = mul nsw i32 19, %21
%23 = add nsw i32 %22, 24
%24 = srem i32 %23, 30
store i32 %24, i32* %10
%25 = load i32, i32* %8
%26 = mul nsw i32 2, %25
%27 = load i32, i32* %9
%28 = mul nsw i32 4, %27
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %10
%31 = mul nsw i32 6, %30
%32 = add nsw i32 %29, %31
%33 = add nsw i32 %32, 5
%34 = srem i32 %33, 7
store i32 %34, i32* %11
%35 = load i32, i32* %10
%36 = add nsw i32 22, %35
%37 = load i32, i32* %11
%38 = add nsw i32 %36, %37
store i32 %38, i32* %12
%39 = load i32, i32* %6
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %12
%42 = icmp sle i32 %41, 31
br i1 %42, label %43, label %46
43: ; preds = %2
%44 = load i32, i32* %12
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %44)
br label %50
46: ; preds = %2
%47 = load i32, i32* %12
%48 = sub nsw i32 %47, 31
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %46, %43
%51 = load i32, i32* @EXIT_SUCCESS
ret i32 %51
}

LLVM IR (-O2):
@.str = [20 x i8] c"Introduce un a\C3\B1o: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"El Domingo de Pascua del a\C3\B1o %d es: \00"
@.str.3 = [13 x i8] c"%d de Marzo \00"
@.str.4 = [13 x i8] c"%d de Abril \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = srem i32 %7, 19
%9 = srem i32 %7, 4
%10 = srem i32 %7, 7
%11 = trunc i32 %8 to i16
%12 = mul nsw i16 %11, 19
%13 = add nsw i16 %12, 24
%14 = srem i16 %13, 30
%15 = sext i16 %14 to i32
%16 = shl nsw i32 %9, 1
%17 = shl nsw i32 %10, 2
%18 = mul nsw i32 %15, 6
%19 = add nsw i32 %17, 5
%20 = add nsw i32 %19, %16
%21 = add nsw i32 %20, %18
%22 = srem i32 %21, 7
%23 = add nsw i32 %15, 22
%24 = add nsw i32 %23, %22
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%26 = icmp slt i32 %24, 32
br i1 %26, label %27, label %29
27: ; preds = %2
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %24)
br label %32
29: ; preds = %2
%30 = add nsw i32 %24, -31
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %29, %27
%33 = load i32, i32* @EXIT_SUCCESS
ret i32 %33
}