// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: easter(int)
void easter(int y)
{
int g, c, d, h, k, i, j;
int m;
double jd;

    // Oudin's algorithm for calculating easter
    g = y % 19;
    c = y / 100;
    d = c - c/4;
    h = (d - ((8*c+13)/25) + (19*g) + 15) % 30;
    k = h / 28;
    i = h - k*(1 - k*(29/(h+1))*(21-g)/11);
    j = (y + y/4 + i + 2 - d) % 7;
    d = 28 + i - j;

    if(d > 31) {
       d -= 31;
       m = 4;
    }
    else m = 3;

    set_holiday(EASTER, m, d);

    // calculate Ash Wednesday
    jd = jdate(y, m, d);
    gregorian(0, jd-46.0);
    set_holiday(ASH, g_month, g_day);

    gregorian(0, jd-47.0);
    set_holiday(MARDI_GRAS, g_month, g_day);

    // calculate Palm Sunday
    gregorian(0, jd-7.0);
    set_holiday(PALM_SUNDAY, g_month, g_day);

    // calculate Good Friday
    gregorian(0, jd-2.0);
    set_holiday(GOOD_FRIDAY, g_month, g_day);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rcx
imulq $0x6bca1af3, %rcx, %rax # imm = 0x6BCA1AF3
movq %rax, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rax
sarl $0x3, %eax
addl %edx, %eax
leal (%rax,%rax,8), %edx
leal (%rax,%rdx,2), %eax
movl %ecx, %edi
subl %eax, %edi
imulq $0x51eb851f, %rcx, %rdx # imm = 0x51EB851F
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x20, %rdx
sarl $0x5, %edx
addl %eax, %edx
imulq $-0x51eb851f, %rcx, %rsi # imm = 0xAE147AE1
movq %rsi, %rax
shrq $0x3f, %rax
shrq $0x20, %rsi
sarl $0x7, %esi
addl %eax, %esi
addl %edx, %esi
leal 0xd(,%rdx,8), %eax
cltq
imulq $-0x51eb851f, %rax, %rax # imm = 0xAE147AE1
movq %rax, %r8
shrq $0x3f, %r8
shrq $0x20, %rax
sarl $0x3, %eax
addl %r8d, %eax
leal (%rdi,%rdi,8), %r8d
leal (%rdi,%r8,2), %r8d
addl %esi, %r8d
leal (%r8,%rax), %r9d
addl $0xf, %r9d
addl %eax, %r8d
movslq %r9d, %rax
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %r8d, %eax
addl $0xf, %eax
movl %eax, %r9d
shrl $0x1f, %r9d
sarl $0x4, %eax
addl %r9d, %eax
movl %eax, %r9d
shll $0x5, %r9d
addl %eax, %eax
subl %r9d, %eax
addl %eax, %r8d
addl $0xf, %r8d
leal 0x1(%r8), %r9d
movb $0x1d, %al
movzbl %al, %eax
idivb %r9b
movsbl %r8b, %r9d
imull $-0x6d, %r9d, %r9d
shrl $0x8, %r9d
addb %r8b, %r9b
movl %r9d, %r10d
shrb $0x7, %r10b
sarb $0x4, %r9b
addb %r10b, %r9b
movsbl %r9b, %r9d
movsbl %al, %eax
movl $0x15, %r10d
subl %edi, %r10d
imull %r9d, %r10d
imull %eax, %r10d
movswl %r10w, %eax
imull $0x45d1, %eax, %eax     # imm = 0x45D1
shrl $0x10, %eax
subl %r10d, %eax
movzwl %ax, %eax
movswl %ax, %edi
shrl $0xf, %eax
sarl $0x3, %edi
addl %eax, %edi
notl %edi
movswl %di, %eax
imull %r9d, %eax
addl %r8d, %eax
leal 0x3(%rcx), %edi
testl %ecx, %ecx
cmovnsl %ecx, %edi
sarl $0x2, %edi
addl %ecx, %edi
subl %esi, %edi
addl %edi, %eax
addl $0x2, %eax
addl $0x2, %edi
cltq
imulq $-0x6db6db6d, %rax, %rsi # imm = 0x92492493
shrq $0x20, %rsi
addl %esi, %eax
movl %eax, %esi
shrl $0x1f, %esi
sarl $0x2, %eax
addl %esi, %eax
leal (,%rax,8), %esi
subl %eax, %esi
subl %edi, %esi
addl $0x1c, %esi
cmpl $0x1f, %esi
jle 0xee390
addl $-0x1f, %esi
movl $0x8, %eax
leaq 0x7cad5(%rip), %rdi     # 0x16ae50
cmpl $0x6f, -0x8(%rax,%rdi)
je 0xee3b8
addq $0x18, %rax
cmpq $0x2258, %rax           # imm = 0x2258
jne 0xee37b
jmp 0xee3c9
movl $0x8, %eax
leaq 0x7cab4(%rip), %rdi     # 0x16ae50
cmpl $0x6f, -0x8(%rax,%rdi)
je 0xee431
addq $0x18, %rax
cmpq $0x2258, %rax           # imm = 0x2258
jne 0xee39c
jmp 0xee442
cmpl $0x0, (%rax,%rdi)
je 0xee3c9
movl $0x4, (%rax,%rdi)
movl %esi, -0x4(%rax,%rdi)
movslq %edx, %rax
imulq $-0x64, %rax, %rdx
addq %rcx, %rdx
imulq $0x23ab1, %rax, %rax    # imm = 0x23AB1
leaq 0x3(%rax), %rdi
testq %rax, %rax
cmovnsq %rax, %rdi
sarq $0x2, %rdi
imulq $0x8ead, %rdx, %rcx     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
cvtsi2sd %rdi, %xmm1
addsd 0x3d3ca(%rip), %xmm1    # 0x12b7e8
cvtsi2sd %rdx, %xmm0
addsd %xmm1, %xmm0
addsd 0x3d8b1(%rip), %xmm0    # 0x12bce0
jmp 0xee4a0
cmpl $0x0, (%rax,%rdi)
je 0xee442
movl $0x3, (%rax,%rdi)
movl %esi, -0x4(%rax,%rdi)
movslq %edx, %rax
imulq $-0x64, %rax, %rdx
addq %rcx, %rdx
imulq $0x23ab1, %rax, %rax    # imm = 0x23AB1
leaq 0x3(%rax), %rdi
testq %rax, %rax
cmovnsq %rax, %rdi
sarq $0x2, %rdi
imulq $0x8ead, %rdx, %rcx     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
cvtsi2sd %rdi, %xmm1
addsd 0x3d354(%rip), %xmm1    # 0x12b7e8
addq %rax, %rdx
cvtsi2sd %rdx, %xmm0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
addsd %xmm0, %xmm1
movsd 0x3e105(%rip), %xmm0    # 0x12c5b8
movsd %xmm1, -0x20(%rbp)
addsd %xmm1, %xmm0
xorl %edi, %edi
callq 0xd12da
leaq 0x21f1d2(%rip), %r14    # 0x30d69c
movl (%r14), %eax
leaq 0x21f1cc(%rip), %r15    # 0x30d6a0
movl (%r15), %ecx
movl $0x8, %edx
leaq 0x7c96d(%rip), %rbx     # 0x16ae50
cmpl $0x6c, -0x8(%rdx,%rbx)
je 0xee4f9
addq $0x18, %rdx
cmpq $0x2258, %rdx           # imm = 0x2258
jne 0xee4e3
jmp 0xee506
cmpl $0x0, (%rdx,%rbx)
je 0xee506
movl %eax, (%rdx,%rbx)
movl %ecx, -0x4(%rdx,%rbx)
movsd 0x3e0b2(%rip), %xmm0    # 0x12c5c0
addsd -0x20(%rbp), %xmm0
xorl %edi, %edi
callq 0xd12da
movl (%r14), %eax
movl (%r15), %ecx
movl $0x8, %edx
cmpl $0x76, -0x8(%rdx,%rbx)
je 0xee53b
addq $0x18, %rdx
cmpq $0x2258, %rdx           # imm = 0x2258
jne 0xee525
jmp 0xee548
cmpl $0x0, (%rdx,%rbx)
je 0xee548
movl %eax, (%rdx,%rbx)
movl %ecx, -0x4(%rdx,%rbx)
movsd 0x3d3d0(%rip), %xmm0    # 0x12b920
addsd -0x20(%rbp), %xmm0
xorl %edi, %edi
callq 0xd12da
movl (%r14), %eax
movl (%r15), %ecx
movl $0x8, %edx
cmpl $0x6d, -0x8(%rdx,%rbx)
je 0xee57d
addq $0x18, %rdx
cmpq $0x2258, %rdx           # imm = 0x2258
jne 0xee567
jmp 0xee58a
cmpl $0x0, (%rdx,%rbx)
je 0xee58a
movl %eax, (%rdx,%rbx)
movl %ecx, -0x4(%rdx,%rbx)
movsd -0x20(%rbp), %xmm0
addsd 0x1d489(%rip), %xmm0    # 0x10ba20
xorl %edi, %edi
callq 0xd12da
movl (%r14), %eax
movl (%r15), %ecx
movl $0x8, %edx
cmpl $0x6e, -0x8(%rdx,%rbx)
je 0xee5bf
addq $0x18, %rdx
cmpq $0x2258, %rdx           # imm = 0x2258
jne 0xee5a9
jmp 0xee5cc
cmpl $0x0, (%rdx,%rbx)
je 0xee5cc
movl %eax, (%rdx,%rbx)
movl %ecx, -0x4(%rdx,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq