// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/writefil.c
// Function: print_moon_info
void print_moon_info (int month, int year)
{
   int n, ndays, day, quarter;
   unsigned long qdays;
   double phase;
   static char *q[4] = {"NM", "1Q", "FM", "3Q"};
   
   if (draw_moons == NO_MOONS) return;

   /* print the phase of the moon for each day of the month */
   
   printf("/moon_phases [\t\t%% from algorithm ");
   if (atof(time_zone) != 0.0) printf(" (UTC offset = %s)", time_zone);
   printf("\n\t");
   
   for (n = 0, qdays = 0L, day = 1, ndays = LENGTH_OF(month, year);
        day <= ndays;
        day++) {

      phase = find_phase(month, day, year, &quarter);

      if (DEBUG(DEBUG_MOON)) {
         fprintf(stderr, "Moon phase on %04d-%02d-%02d: %.5f %s\n", year, month, day, phase, 
                 quarter != MOON_OTHER ? q[quarter] : "");
      }

      /* adjust phase to exact quarter if printing only quarters */
      if (draw_moons == SOME_MOONS && quarter != MOON_OTHER) phase = 0.25 * quarter;
      if (draw_moons == ALL_MOONS || quarter != MOON_OTHER) {
         printf("%.3f%s", PRT_TWEAK(phase), ++n % 10 == 0 ? "\n\t" : " ");
      }

      if (quarter != MOON_OTHER) qdays |= 1L << (day - 1);
   }
   printf("] def\n");
   
   /* if drawing only quarter moons, print days when they occur */
   
   if (draw_moons == SOME_MOONS) {
      printf("/quarter_moons [ ");
      for (day = 1; qdays; day++, qdays >>= 1) {
         if (qdays & 01) printf("%d ", day);
      }
      printf("] def\n");
   }
   
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x18403(%rip), %rax     # 0x323f8
cmpl $0x0, (%rax)
jne 0x19fff
jmp 0x1a2ce
leaq 0x1085d(%rip), %rdi     # 0x2a863
movb $0x0, %al
callq 0x5110
leaq 0x1458c(%rip), %rdi     # 0x2e5a0
callq 0x50a0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1a026
jp 0x1a026
jmp 0x1a03b
leaq 0x10859(%rip), %rdi     # 0x2a886
leaq 0x1456c(%rip), %rsi     # 0x2e5a0
movb $0x0, %al
callq 0x5110
leaq 0xbc47(%rip), %rdi      # 0x25c89
movb $0x0, %al
callq 0x5110
movl $0x0, -0xc(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x14121(%rip), %rax     # 0x2e190
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x4(%rbp)
movb %al, -0x29(%rbp)
jne 0x1a0cb
movl -0x8(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x31(%rbp)
jne 0x1a0c5
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movb $0x1, %al
cmpl $0x0, %edx
movb %al, -0x32(%rbp)
jne 0x1a0bf
movl -0x8(%rbp), %eax
movl $0x190, %ecx            # imm = 0x190
cltd
idivl %ecx
cmpl $0x0, %edx
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x29(%rbp)
movl -0x30(%rbp), %eax
movb -0x29(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x1a251
movl -0x4(%rbp), %edi
movl -0x14(%rbp), %esi
movl -0x8(%rbp), %edx
leaq -0x18(%rbp), %rcx
callq 0xafc0
movsd %xmm0, -0x28(%rbp)
leaq 0x18656(%rip), %rax     # 0x3275c
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1a187
movq 0x13ee1(%rip), %rax     # 0x2dff8
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
cmpl $-0x1, -0x18(%rbp)
je 0x1a155
movslq -0x18(%rbp), %rcx
leaq 0x181a5(%rip), %rax     # 0x322f0
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x1a162
leaq 0xbb2f(%rip), %rax      # 0x25c8b
movq %rax, -0x60(%rbp)
jmp 0x1a162
movsd -0x40(%rbp), %xmm0
movl -0x44(%rbp), %r8d
movl -0x48(%rbp), %ecx
movl -0x4c(%rbp), %edx
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %r9
leaq 0x10719(%rip), %rsi     # 0x2a899
movb $0x1, %al
callq 0x51b0
leaq 0x1826a(%rip), %rax     # 0x323f8
cmpl $0x2, (%rax)
jne 0x1a1af
cmpl $-0x1, -0x18(%rbp)
je 0x1a1af
cvtsi2sdl -0x18(%rbp), %xmm1
movsd 0xaeba(%rip), %xmm0     # 0x25060
mulsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
leaq 0x18242(%rip), %rax     # 0x323f8
cmpl $0x1, (%rax)
je 0x1a1c1
cmpl $-0x1, -0x18(%rbp)
je 0x1a221
movsd -0x28(%rbp), %xmm0
movsd 0xae9a(%rip), %xmm1     # 0x25068
ucomisd %xmm1, %xmm0
jb 0x1a1de
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x1a1e8
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl $0xa, %ecx
cltd
idivl %ecx
leaq 0x105e3(%rip), %rsi     # 0x2a7e8
leaq 0xba7d(%rip), %rax      # 0x25c89
cmpl $0x0, %edx
cmoveq %rax, %rsi
leaq 0x106a6(%rip), %rdi     # 0x2a8c0
movb $0x1, %al
callq 0x5110
cmpl $-0x1, -0x18(%rbp)
je 0x1a241
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1a243
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a0dc
leaq 0xba35(%rip), %rdi      # 0x25c8d
movb $0x0, %al
callq 0x5110
leaq 0x18192(%rip), %rax     # 0x323f8
cmpl $0x2, (%rax)
jne 0x1a2cc
leaq 0x10655(%rip), %rdi     # 0x2a8c7
movb $0x0, %al
callq 0x5110
movl $0x1, -0x14(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1a2be
movq -0x20(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1a2a6
movl -0x14(%rbp), %esi
leaq 0x1063a(%rip), %rdi     # 0x2a8d9
movb $0x0, %al
callq 0x5110
jmp 0x1a2a8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
jmp 0x1a280
leaq 0xb9c8(%rip), %rdi      # 0x25c8d
movb $0x0, %al
callq 0x5110
jmp 0x1a2ce
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)