// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_watch_alarms()
void draw_watch_alarms()
{
int x0,y0;
int x1,y1;
int len;
int timer_theta, alarm_theta;
double jd_timer;

   // draw tick marks on the watch for alarm and egg timer

   len = ACLOCK_R / 20;
   if(len < 5) len = 5;
   else if(len > 15) len = 15;

   if(alarm_date || alarm_time) {  // highlight the alarm clock time
      alarm_theta = ((alarm_hh%WATCH_HOURS)*WATCH_STEP*2)+alarm_mm;
      alarm_theta /= 2;
      alarm_theta -= 90;
      while(alarm_theta < 0) alarm_theta += 360;
      alarm_theta %= 360;

      x0 = (int) ((ACLOCK_R-0) * cos360(alarm_theta));
      y0 = (int) ((ACLOCK_R-0) * sin360(alarm_theta));

      x1 = (int) ((ACLOCK_R+len) * cos360(alarm_theta));
      y1 = (int) ((ACLOCK_R+len) * sin360(alarm_theta));
      thick_line(aclock_x+x0,aclock_y+y0, aclock_x+x1,aclock_y+y1, ALARM_COLOR, 3);
   }    


   if(egg_timer) {  // highlight the egg time time
      jd_timer = jd_local + jtime(0,0,0, (double) egg_timer);
      jd_timer = jd_timer - (double) (int) jd_timer; 
      jd_timer = (jd_timer * 720.0);
      timer_theta = (int) jd_timer;
      timer_theta -= 90;
      while(timer_theta < 0) timer_theta += 360;
      timer_theta %= 360;

      x0 = (int) ((ACLOCK_R-0) * cos360(timer_theta));
      y0 = (int) ((ACLOCK_R-0) * sin360(timer_theta));

      x1 = (int) ((ACLOCK_R+len) * cos360(timer_theta));
      y1 = (int) ((ACLOCK_R+len) * sin360(timer_theta));
      thick_line(aclock_x+x0,aclock_y+y0, aclock_x+x1,aclock_y+y1, TIMER_COLOR, 3);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x24826d(%rip), %rax    # 0x33b370
movl (%rax), %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
leaq 0x1256fb(%rip), %rax    # 0x218810
subl (%rax), %esi
movl $0x5, %r12d
cmpl $0x64, %esi
jl 0xf313e
movl %esi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x24, %rcx
cmpl $0xf, %ecx
movl $0xf, %r12d
cmovll %ecx, %r12d
leaq 0x21ade7(%rip), %rax    # 0x30df2c
leaq 0x21add0(%rip), %rcx    # 0x30df1c
movl (%rcx), %ecx
orl (%rax), %ecx
je 0xf3359
leaq 0x21adc3(%rip), %rax    # 0x30df20
movl (%rax), %eax
leaq 0x1282ac(%rip), %rcx    # 0x21b412
movzbl (%rcx), %ecx
imull $0xab, %ecx, %ecx
shrl $0x9, %ecx
leal 0x4(,%rcx,4), %ecx
leal (%rcx,%rcx,2), %edi
cltd
idivl %edi
movl %edx, %ecx
movl $0x168, %eax            # imm = 0x168
xorl %edx, %edx
divl %edi
imull %ecx, %eax
addl %eax, %eax
leaq 0x21ad8e(%rip), %rcx    # 0x30df24
addl (%rcx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl $0x5b, %ecx
movl $0x5a, %edx
cmovgel %ecx, %edx
xorl %edi, %edi
cmpl $0xb4, %eax
setl %dil
subl %ecx, %edx
subl %edi, %edx
shrl $0x3, %edx
imulq $0x16c16c17, %rdx, %rax # imm = 0x16C16C17
shrq $0x22, %rax
addl %edi, %eax
imull $0x168, %eax, %eax      # imm = 0x168
addl %ecx, %eax
addl $-0x5a, %eax
movl %eax, %ecx
shrl $0x3, %ecx
imulq $0x16c16c17, %rcx, %rcx # imm = 0x16C16C17
shrq $0x22, %rcx
cvtsi2ss %esi, %xmm0
movss %xmm0, -0x2c(%rbp)
imull $0x168, %ecx, %ecx      # imm = 0x168
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x2ae85(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15f40(%rip), %xmm0    # 0x109158
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ebx
leaq 0x24813f(%rip), %r13    # 0x33b370
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq 0x1255cb(%rip), %rax    # 0x218810
subl (%rax), %ecx
movq %rax, %r15
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2ae2d(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15ee8(%rip), %xmm0    # 0x109158
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r14d
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %r12d, %eax
subl (%r15), %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2addf(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15e9a(%rip), %xmm0    # 0x109158
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r15d
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %r12d, %eax
leaq 0x125528(%rip), %rdx    # 0x218810
subl (%rdx), %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2ad8b(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15e46(%rip), %xmm0    # 0x109158
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x248049(%rip), %rax    # 0x33b374
movl (%rax), %eax
addl %eax, %ebx
leaq 0x248042(%rip), %rdx    # 0x33b378
movl (%rdx), %edx
addl %edx, %r14d
addl %eax, %r15d
addl %edx, %ecx
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
movl $0xc, %r8d
movl $0x3, %r9d
callq 0xed0e
leaq 0x21aba8(%rip), %rax    # 0x30df08
movq (%rax), %rax
testq %rax, %rax
je 0xf3589
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x15c94(%rip), %xmm0    # 0x109010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x15cb4(%rip), %xmm1    # 0x109040
leaq 0x21a1b5(%rip), %rax    # 0x30d548
addsd (%rax), %xmm1
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm1
mulsd 0x2b575(%rip), %xmm1    # 0x11e920
cvttsd2si %xmm1, %eax
leal -0x5a(%rax), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovgl %ecx, %edx
addl $0x5a, %edx
xorl %ecx, %ecx
cmpl %eax, %edx
setne %cl
subl %eax, %edx
subl %ecx, %edx
shrl $0x3, %edx
imulq $0x16c16c17, %rdx, %rdx # imm = 0x16C16C17
shrq $0x22, %rdx
addl %ecx, %edx
imull $0x168, %edx, %ecx      # imm = 0x168
addl %ecx, %eax
addl $-0x5a, %eax
movl %eax, %ecx
shrl $0x3, %ecx
imulq $0x16c16c17, %rcx, %rcx # imm = 0x16C16C17
leaq 0x247f7b(%rip), %r13    # 0x33b370
movl (%r13), %edx
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
leaq 0x125407(%rip), %rdx    # 0x218810
subl (%rdx), %esi
movq %rdx, %r14
shrq $0x22, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
movss %xmm0, -0x2c(%rbp)
imull $0x168, %ecx, %ecx      # imm = 0x168
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x2ac56(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15d11(%rip), %xmm0    # 0x109158
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ebx
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
subl (%r14), %ecx
movq %r14, %r15
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2ac0b(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15cc6(%rip), %xmm0    # 0x109158
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r14d
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %r12d, %eax
subl (%r15), %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2abbd(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15c78(%rip), %xmm0    # 0x109158
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r15d
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq 0x125309(%rip), %rax    # 0x218810
subl (%rax), %r12d
addl %ecx, %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2ab69(%rip), %xmm1    # 0x11e090
callq 0x94d0
divsd 0x15c24(%rip), %xmm0    # 0x109158
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x247e27(%rip), %rax    # 0x33b374
movl (%rax), %eax
addl %eax, %ebx
leaq 0x247e20(%rip), %rdx    # 0x33b378
movl (%rdx), %edx
addl %edx, %r14d
addl %eax, %r15d
addl %edx, %ecx
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
movl $0xe, %r8d
movl $0x3, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xed0e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq