// File: /workspace/github_cpp_makefile_star2_O3/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 0x247ba8(%rip), %rax    # 0x33b370
movl (%rax), %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
leaq 0x125036(%rip), %rax    # 0x218810
subl (%rax), %esi
movl $0x5, %r12d
cmpl $0x64, %esi
jl 0xf3803
movl %esi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x24, %rcx
cmpl $0xf, %ecx
movl $0xf, %r12d
cmovbl %ecx, %r12d
leaq 0x21a722(%rip), %rax    # 0x30df2c
leaq 0x21a70b(%rip), %rcx    # 0x30df1c
movl (%rcx), %ecx
orl (%rax), %ecx
je 0xf3a22
leaq 0x21a6fe(%rip), %rax    # 0x30df20
movl (%rax), %eax
leaq 0x127be7(%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
movw $0x168, %ax             # imm = 0x168
xorl %edx, %edx
divw %di
movzwl %ax, %edx
imull %ecx, %edx
addl %edx, %edx
leaq 0x21a6c6(%rip), %rax    # 0x30df24
addl (%rax), %edx
movl %edx, %eax
shrl $0x1f, %eax
addl %edx, %eax
sarl %eax
cmpl $0x5b, %eax
movl $0x5a, %ecx
cmovgel %eax, %ecx
xorl %edi, %edi
cmpl $0xb4, %edx
setl %dil
subl %eax, %ecx
subl %edi, %ecx
shrl $0x3, %ecx
imulq $0x16c16c17, %rcx, %rcx # imm = 0x16C16C17
shrq $0x22, %rcx
addl %edi, %ecx
imull $0x168, %ecx, %ecx      # 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 0x2a864(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x1587f(%rip), %xmm0    # 0x109160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ebx
leaq 0x247a76(%rip), %r13    # 0x33b370
movl (%r13), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq 0x124f02(%rip), %rax    # 0x218810
subl (%rax), %ecx
movq %rax, %r15
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2a80c(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x15827(%rip), %xmm0    # 0x109160
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 0x2a7be(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x157d9(%rip), %xmm0    # 0x109160
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 0x124e5f(%rip), %rdx    # 0x218810
subl (%rdx), %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2a76a(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x15785(%rip), %xmm0    # 0x109160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x247980(%rip), %rax    # 0x33b374
movl (%rax), %eax
addl %eax, %ebx
leaq 0x247979(%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 0xec9b
leaq 0x21a4df(%rip), %rax    # 0x30df08
movq (%rax), %rax
testq %rax, %rax
je 0xf3c52
leaq 0x219b0c(%rip), %rcx    # 0x30d548
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x155c4(%rip), %xmm0    # 0x109010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x155e4(%rip), %xmm1    # 0x109040
addsd (%rcx), %xmm1
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm1
mulsd 0x2af5c(%rip), %xmm1    # 0x11e9d0
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 0x2478b2(%rip), %r13    # 0x33b370
movl (%r13), %edx
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
leaq 0x124d3e(%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 0x2a635(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x15650(%rip), %xmm0    # 0x109160
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 0x2a5ea(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x15605(%rip), %xmm0    # 0x109160
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 0x2a59c(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x155b7(%rip), %xmm0    # 0x109160
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 0x124c40(%rip), %rax    # 0x218810
subl (%rax), %r12d
addl %ecx, %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x2a548(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x15563(%rip), %xmm0    # 0x109160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x24775e(%rip), %rax    # 0x33b374
movl (%rax), %eax
addl %eax, %ebx
leaq 0x247757(%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 0xec9b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq