// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_hebrew(int)
void init_hebrew(int year)
{
double t;
double rosh;

   rosh = rosh_jd(year);        // our reference is Rosh Hashahna 
                                // once you know Rosh Hashahna,  all is revealed

   t = rosh_jd(year+1) - rosh;  // number of days in the Jewish year

   jtimes[9] = rosh;
   jtimes[10] = jtimes[9]+30.0; // che
   if((DABS(t-355.0) < 0.1) || (DABS(t-385.0) < 0.1)) {  // shalim years
      rosh += 1.0;  // kis - the month of Cheshvan has an extra day in shalim years
      jtimes[11] = jtimes[10]+30.0;
   }
   else jtimes[11] = jtimes[10]+29.0;

   if((DABS(t-353.0) < 0.1) || (DABS(t-383.0) < 0.1)) {  // hasser years
      jtimes[12] = jtimes[11]+29.0; // tev - Kislev has one less day in hasser years
   }
   else jtimes[12] = jtimes[11]+30.0;
   jtimes[13] = jtimes[12]+29.0;    // shv
   jtimes[14] = jtimes[13]+30.0;    // end of shv
   jtimes[8]  = jtimes[9]-29.0;     // elu
   jtimes[7]  = jtimes[8]-30.0;     // av
   jtimes[6]  = jtimes[7]-29.0;     // tam
   jtimes[5]  = jtimes[6]-30.0;     // siv
   jtimes[4]  = jtimes[5]-29.0;     // iyr
   jtimes[3]  = jtimes[4]-30.0;     // nis
   jtimes[2]  = jtimes[3]-29.0;     // adr
   if(DABS(t) < 370.0) {            // previous year not a leap year
      jtimes[1]  = jtimes[2]-30.0;  // Adar I in leap years
      jmonths[1] = "Ad1";
      jmonths[2] = "Ad2";
   }
   else {                           // previous year was a leap year, this one is not
      jtimes[1] = 0.0F;             // no Adar I
      jtimes[1]  = jtimes[2]-30.0;     
      jmonths[1] = "Shv";
      jmonths[2] = "Adr";
   }
   jtimes[0] = jtimes[1]-29.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0xee5d7
movsd %xmm0, -0x10(%rbp)
incl %ebx
movl %ebx, %edi
callq 0xee5d7
movsd -0x10(%rbp), %xmm8
subsd %xmm8, %xmm0
movsd %xmm8, 0x28c71e(%rip)   # 0x37af08
movsd 0x1d10e(%rip), %xmm4    # 0x10b900
movapd %xmm8, %xmm1
addsd %xmm4, %xmm1
movsd %xmm1, 0x28c70d(%rip)   # 0x37af10
movsd 0x3dded(%rip), %xmm2    # 0x12c5f8
addsd %xmm0, %xmm2
xorpd %xmm3, %xmm3
xorpd %xmm5, %xmm5
subsd %xmm2, %xmm5
movapd %xmm2, %xmm6
cmpltsd %xmm3, %xmm6
andpd %xmm6, %xmm5
andnpd %xmm2, %xmm6
orpd %xmm5, %xmm6
movsd 0x1a8d0(%rip), %xmm2    # 0x109108
ucomisd %xmm6, %xmm2
ja 0xee875
movsd 0x3ddba(%rip), %xmm5    # 0x12c600
addsd %xmm0, %xmm5
xorpd %xmm6, %xmm6
subsd %xmm5, %xmm6
movapd %xmm5, %xmm7
cmpltsd %xmm3, %xmm7
andpd %xmm7, %xmm6
andnpd %xmm5, %xmm7
orpd %xmm6, %xmm7
ucomisd %xmm7, %xmm2
ja 0xee875
movsd 0x3dd93(%rip), %xmm4    # 0x12c608
addsd %xmm4, %xmm1
movsd %xmm1, 0x28c697(%rip)   # 0x37af18
movsd 0x3dd87(%rip), %xmm4    # 0x12c610
addsd %xmm0, %xmm4
movapd %xmm4, %xmm5
cmpltsd %xmm3, %xmm5
subsd %xmm4, %xmm3
andpd %xmm5, %xmm3
andnpd %xmm4, %xmm5
orpd %xmm3, %xmm5
movsd 0x3dd5a(%rip), %xmm3    # 0x12c608
ucomisd %xmm5, %xmm2
ja 0xee8eb
movsd 0x3dd5c(%rip), %xmm4    # 0x12c618
addsd %xmm0, %xmm4
xorpd %xmm5, %xmm5
movapd %xmm4, %xmm6
cmpltsd %xmm5, %xmm6
subsd %xmm4, %xmm5
andpd %xmm6, %xmm5
andnpd %xmm4, %xmm6
orpd %xmm5, %xmm6
ucomisd %xmm6, %xmm2
ja 0xee8eb
movsd 0x1d015(%rip), %xmm3    # 0x10b900
addsd %xmm3, %xmm1
movsd %xmm1, 0x28c629(%rip)   # 0x37af20
addsd 0x3dd09(%rip), %xmm1    # 0x12c608
movsd %xmm1, 0x28c621(%rip)   # 0x37af28
addsd 0x1cff1(%rip), %xmm1    # 0x10b900
movsd %xmm1, 0x28c619(%rip)   # 0x37af30
movsd 0x3d2f9(%rip), %xmm1    # 0x12bc18
addsd %xmm1, %xmm8
movsd %xmm8, 0x28c5d3(%rip)   # 0x37af00
movsd 0x3d2eb(%rip), %xmm2    # 0x12bc20
addsd %xmm2, %xmm8
movsd %xmm8, 0x28c5b5(%rip)   # 0x37aef8
addsd %xmm1, %xmm8
movsd %xmm8, 0x28c59f(%rip)   # 0x37aef0
addsd %xmm2, %xmm8
movsd %xmm8, 0x28c589(%rip)   # 0x37aee8
addsd %xmm1, %xmm8
movsd %xmm8, 0x28c573(%rip)   # 0x37aee0
addsd %xmm2, %xmm8
movsd %xmm8, 0x28c55d(%rip)   # 0x37aed8
xorpd %xmm3, %xmm3
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
subsd %xmm0, %xmm3
andpd %xmm4, %xmm3
andnpd %xmm0, %xmm4
orpd %xmm3, %xmm4
movsd 0x3dc80(%rip), %xmm0    # 0x12c620
ucomisd %xmm4, %xmm0
leaq 0x45de4(%rip), %rax     # 0x13478f
leaq 0x45e09(%rip), %rcx     # 0x1347bb
cmovaq %rax, %rcx
leaq 0x46314(%rip), %rax     # 0x134cd1
leaq 0x45dcf(%rip), %rdx     # 0x134793
cmovaq %rax, %rdx
addsd %xmm1, %xmm8
movsd %xmm8, 0x28c4fa(%rip)   # 0x37aed0
addsd %xmm2, %xmm8
movsd %xmm8, 0x28c4e4(%rip)   # 0x37aec8
movq %rcx, 0x7e71d(%rip)     # 0x16d108
movq %rdx, 0x7e71e(%rip)     # 0x16d110
addsd %xmm1, %xmm8
movsd %xmm8, 0x28c4c0(%rip)   # 0x37aec0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq