// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/moonphas.c
// Function: julday
static double julday (int month, int day, int year)
{
   int mn1, yr1;
   double a, b, c, d, djd;
   
   mn1 = month;
   yr1 = year;
   if ( yr1 < 0 ) yr1 = yr1 + 1;
   if ( month < 3 ) {
      mn1 = month + 12;
      yr1 = yr1 - 1;
   }
   if (( year < 1582 ) ||
       ( year == 1582  && month < 10 ) ||
       ( year == 1582  && month == 10 && day < 15.0 )) {
      b = 0;
   }
   else {
      a = floor (yr1 / 100.0);
      b = 2 - a + floor (a / 4);
   }

   if ( yr1 >= 0 ) c = floor (365.25 * yr1) - 694025;
   else c = FNITG ((365.25 * yr1) - 0.75) - 694025;

   d = floor (30.6001 * (mn1 + 1));
   djd = b + c + d + day + 2415020.0;

   return djd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xac2c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x3, -0x4(%rbp)
jge 0xac44
movl -0x4(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x62e, -0xc(%rbp)      # imm = 0x62E
jl 0xac7e
cmpl $0x62e, -0xc(%rbp)      # imm = 0x62E
jne 0xac5c
cmpl $0xa, -0x4(%rbp)
jl 0xac7e
cmpl $0x62e, -0xc(%rbp)      # imm = 0x62E
jne 0xac88
cmpl $0xa, -0x4(%rbp)
jne 0xac88
cvtsi2sdl -0x8(%rbp), %xmm1
movsd 0x19928(%rip), %xmm0    # 0x245a0
ucomisd %xmm1, %xmm0
jbe 0xac88
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xacdc
cvtsi2sdl -0x14(%rbp), %xmm0
movsd 0x1991b(%rip), %xmm1    # 0x245b0
divsd %xmm1, %xmm0
callq 0x5270
movsd %xmm0, -0x20(%rbp)
movsd 0x1986d(%rip), %xmm0    # 0x24518
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0x198e6(%rip), %xmm1    # 0x245a8
divsd %xmm1, %xmm0
callq 0x5270
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xad0e
cvtsi2sdl -0x14(%rbp), %xmm1
movsd 0x198c9(%rip), %xmm0    # 0x245b8
mulsd %xmm1, %xmm0
callq 0x5270
movsd 0x198d0(%rip), %xmm1    # 0x245d0
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xae25
cvtsi2sdl -0x14(%rbp), %xmm1
movsd 0x1989d(%rip), %xmm0    # 0x245b8
mulsd %xmm0, %xmm1
movsd 0x19899(%rip), %xmm0    # 0x245c0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xad3e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x4c(%rbp)
jmp 0xad6f
cvtsi2sdl -0x14(%rbp), %xmm0
movsd 0x1986d(%rip), %xmm1    # 0x245b8
mulsd %xmm1, %xmm0
movsd 0x19869(%rip), %xmm1    # 0x245c0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
xorl %eax, %eax
movl $0x1, %ecx
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x58(%rbp)
cvtsi2sdl -0x14(%rbp), %xmm1
movsd 0x19830(%rip), %xmm0    # 0x245b8
mulsd %xmm0, %xmm1
movsd 0x1982c(%rip), %xmm0    # 0x245c0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xaddc
cvtsi2sdl -0x14(%rbp), %xmm0
movsd 0x1980a(%rip), %xmm1    # 0x245b8
mulsd %xmm1, %xmm0
movsd 0x19806(%rip), %xmm1    # 0x245c0
addsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0xadfe
cvtsi2sdl -0x14(%rbp), %xmm0
movsd 0x197cf(%rip), %xmm1    # 0x245b8
mulsd %xmm1, %xmm0
movsd 0x197cb(%rip), %xmm1    # 0x245c0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
callq 0x5270
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x197ac(%rip), %xmm1    # 0x245c8
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x197a9(%rip), %xmm0    # 0x245e0
mulsd %xmm1, %xmm0
callq 0x5270
movsd %xmm0, -0x38(%rbp)
movsd -0x28(%rbp), %xmm0
addsd -0x30(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
cvtsi2sdl -0x8(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd 0x19773(%rip), %xmm1    # 0x245d8
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)