// File: /workspace/github_cpp_makefile_star2_O2/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 0x246f55(%rip), %rax    # 0x325370
movl (%rax), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %ecx
leaq 0x1243e4(%rip), %rax    # 0x202810
subl (%rax), %ecx
cmpl $0x64, %ecx
jge 0xde43b
pushq $0x5
popq %rax
movl %eax, -0x30(%rbp)
jmp 0xde450
pushq $0x14
popq %rsi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
cmpl $0xf, %eax
pushq $0xf
popq %rdx
cmovbl %eax, %edx
movl %edx, -0x30(%rbp)
leaq 0x219ad5(%rip), %rax    # 0x2f7f2c
leaq 0x219abe(%rip), %rdx    # 0x2f7f1c
movl (%rdx), %edx
orl (%rax), %edx
je 0xde641
leaq 0x219ab1(%rip), %rax    # 0x2f7f20
movl (%rax), %edx
leaq 0x126f9a(%rip), %rax    # 0x205412
movzbl (%rax), %eax
movb $0x3, %sil
divb %sil
incb %al
movzbl %al, %eax
imull $0xc, %eax, %edi
movl %edx, %eax
cltd
idivl %edi
movl %edx, %esi
movw $0x168, %ax             # imm = 0x168
xorl %edx, %edx
divw %di
movzwl %ax, %edi
imull %esi, %edi
addl %edi, %edi
leaq 0x219a7c(%rip), %rax    # 0x2f7f24
addl (%rax), %edi
movl %edi, %eax
cltd
pushq $0x2
popq %rsi
idivl %esi
movl %esi, %r14d
movl %eax, %esi
cmpl $0x5b, %eax
pushq $0x5a
popq %rax
cmovgel %esi, %eax
xorl %r8d, %r8d
cmpl $0xb4, %edi
setl %r8b
subl %esi, %eax
subl %r8d, %eax
movl $0x168, %edi            # imm = 0x168
xorl %edx, %edx
divl %edi
addl %r8d, %eax
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
imull $0x168, %eax, %eax      # imm = 0x168
addl %esi, %eax
addl $-0x5a, %eax
xorl %edx, %edx
divl %edi
cvtsi2sd %edx, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x29ca9(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14c4c(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ebx
leaq 0x246e43(%rip), %r12    # 0x325370
movl (%r12), %eax
cltd
movl %r14d, %r15d
idivl %r14d
leaq 0x1242d1(%rip), %r13    # 0x202810
subl (%r13), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x29c57(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14bfa(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r14d
movl (%r12), %eax
cltd
idivl %r15d
movl -0x30(%rbp), %r12d
movl %r12d, %ecx
subl (%r13), %ecx
addl %eax, %ecx
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x29c0c(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14baf(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r15d
leaq 0x246da5(%rip), %rax    # 0x325370
movl (%rax), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
subl (%r13), %r12d
addl %eax, %r12d
cvtsi2ss %r12d, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x29bbf(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14b62(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x246d5d(%rip), %rax    # 0x325374
movl (%rax), %eax
addl %eax, %ebx
leaq 0x246d56(%rip), %rdx    # 0x325378
movl (%rdx), %edx
addl %edx, %r14d
addl %eax, %r15d
addl %edx, %ecx
pushq $0xc
popq %r8
pushq $0x3
popq %r9
movl %ebx, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0xe78c
leaq 0x2198c0(%rip), %rax    # 0x2f7f08
movq (%rax), %rax
testq %rax, %rax
je 0xde83f
leaq 0x218eed(%rip), %rcx    # 0x2f7548
cvtsi2sd %rax, %xmm0
divsd 0x149a8(%rip), %xmm0    # 0xf3010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x149c8(%rip), %xmm1    # 0xf3040
addsd (%rcx), %xmm1
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm1
mulsd 0x2a2b8(%rip), %xmm1    # 0x108948
cvttsd2si %xmm1, %ecx
leal -0x5a(%rcx), %eax
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
addl $0x5a, %eax
xorl %esi, %esi
cmpl %ecx, %eax
setne %sil
subl %ecx, %eax
subl %esi, %eax
movl $0x168, %edi            # imm = 0x168
xorl %edx, %edx
divl %edi
addl %esi, %eax
imull $0x168, %eax, %eax      # imm = 0x168
addl %ecx, %eax
addl $-0x5a, %eax
xorl %edx, %edx
divl %edi
movl %edx, %ecx
leaq 0x246ca0(%rip), %r12    # 0x325370
movl (%r12), %eax
cltd
pushq $0x2
popq %r14
idivl %r14d
movl -0x30(%rbp), %ebx
leaq 0x12412a(%rip), %rdx    # 0x202810
subl (%rdx), %eax
movq %rdx, %r15
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x29aab(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14a4e(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r13d
leaq 0x246c44(%rip), %r12    # 0x325370
movl (%r12), %eax
cltd
idivl %r14d
subl (%r15), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x29a63(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14a06(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r14d
movl (%r12), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movl %ebx, %ecx
subl (%r15), %ecx
addl %eax, %ecx
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x2c(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x29a1c(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x149bf(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
mulss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r15d
movl (%r12), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
leaq 0x12404b(%rip), %rcx    # 0x202810
subl (%rcx), %ebx
addl %eax, %ebx
cvtsi2ss %ebx, %xmm0
movss %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x299d1(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x14974(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
mulss -0x30(%rbp), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x246b6f(%rip), %rax    # 0x325374
movl (%rax), %eax
addl %eax, %r13d
leaq 0x246b67(%rip), %rdx    # 0x325378
movl (%rdx), %edx
addl %edx, %r14d
addl %eax, %r15d
addl %edx, %ecx
pushq $0xe
popq %r8
pushq $0x3
popq %r9
movl %r13d, %edi
movl %r14d, %esi
movl %r15d, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe78c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq