// File: 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
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x147110
movsd %xmm0, -0x18(%rbp)
movl -0x4(%rbp), %edi
addl $0x1, %edi
callq 0x147110
subsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x292e4e(%rip)   # 0x3da168
movsd 0x2a35e(%rip), %xmm0    # 0x171680
addsd 0x292e3e(%rip), %xmm0   # 0x3da168
movsd %xmm0, 0x292e3e(%rip)   # 0x3da170
movsd -0x10(%rbp), %xmm1
movsd 0x47cf1(%rip), %xmm0    # 0x18f030
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x14736b
movsd -0x10(%rbp), %xmm1
movsd 0x47cd7(%rip), %xmm0    # 0x18f030
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x147381
movsd -0x10(%rbp), %xmm0
movsd 0x47cb8(%rip), %xmm1    # 0x18f030
subsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm1
movsd 0x27d9a(%rip), %xmm0    # 0x16f128
ucomisd %xmm1, %xmm0
ja 0x1473f6
movsd -0x10(%rbp), %xmm1
movsd 0x47c97(%rip), %xmm0    # 0x18f038
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1473cd
movsd -0x10(%rbp), %xmm1
movsd 0x47c7d(%rip), %xmm0    # 0x18f038
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x1473e3
movsd -0x10(%rbp), %xmm0
movsd 0x47c5e(%rip), %xmm1    # 0x18f038
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm1
movsd 0x27d38(%rip), %xmm0    # 0x16f128
ucomisd %xmm1, %xmm0
jbe 0x147422
movsd 0x27c6a(%rip), %xmm0    # 0x16f068
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x2a270(%rip), %xmm0    # 0x171680
addsd 0x292d58(%rip), %xmm0   # 0x3da170
movsd %xmm0, 0x292d58(%rip)   # 0x3da178
jmp 0x14743a
movsd 0x472ee(%rip), %xmm0    # 0x18e718
addsd 0x292d3e(%rip), %xmm0   # 0x3da170
movsd %xmm0, 0x292d3e(%rip)   # 0x3da178
movsd -0x10(%rbp), %xmm1
movsd 0x47bf9(%rip), %xmm0    # 0x18f040
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x147473
movsd -0x10(%rbp), %xmm1
movsd 0x47bdf(%rip), %xmm0    # 0x18f040
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x147489
movsd -0x10(%rbp), %xmm0
movsd 0x47bc0(%rip), %xmm1    # 0x18f040
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd 0x27c92(%rip), %xmm0    # 0x16f128
ucomisd %xmm1, %xmm0
ja 0x1474fe
movsd -0x10(%rbp), %xmm1
movsd 0x47b9f(%rip), %xmm0    # 0x18f048
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1474d5
movsd -0x10(%rbp), %xmm1
movsd 0x47b85(%rip), %xmm0    # 0x18f048
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x1474eb
movsd -0x10(%rbp), %xmm0
movsd 0x47b66(%rip), %xmm1    # 0x18f048
subsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd 0x27c30(%rip), %xmm0    # 0x16f128
ucomisd %xmm1, %xmm0
jbe 0x147518
movsd 0x47212(%rip), %xmm0    # 0x18e718
addsd 0x292c6a(%rip), %xmm0   # 0x3da178
movsd %xmm0, 0x292c6a(%rip)   # 0x3da180
jmp 0x147530
movsd 0x2a160(%rip), %xmm0    # 0x171680
addsd 0x292c50(%rip), %xmm0   # 0x3da178
movsd %xmm0, 0x292c50(%rip)   # 0x3da180
movsd 0x471e0(%rip), %xmm0    # 0x18e718
addsd 0x292c40(%rip), %xmm0   # 0x3da180
movsd %xmm0, 0x292c40(%rip)   # 0x3da188
movsd 0x2a130(%rip), %xmm0    # 0x171680
addsd 0x292c30(%rip), %xmm0   # 0x3da188
movsd %xmm0, 0x292c30(%rip)   # 0x3da190
movsd 0x292c00(%rip), %xmm0   # 0x3da168
movsd 0x471a8(%rip), %xmm1    # 0x18e718
subsd %xmm1, %xmm0
movsd %xmm0, 0x292be4(%rip)   # 0x3da160
movsd 0x292bdc(%rip), %xmm0   # 0x3da160
movsd 0x2a0f4(%rip), %xmm1    # 0x171680
subsd %xmm1, %xmm0
movsd %xmm0, 0x292bc0(%rip)   # 0x3da158
movsd 0x292bb8(%rip), %xmm0   # 0x3da158
movsd 0x47170(%rip), %xmm1    # 0x18e718
subsd %xmm1, %xmm0
movsd %xmm0, 0x292b9c(%rip)   # 0x3da150
movsd 0x292b94(%rip), %xmm0   # 0x3da150
movsd 0x2a0bc(%rip), %xmm1    # 0x171680
subsd %xmm1, %xmm0
movsd %xmm0, 0x292b78(%rip)   # 0x3da148
movsd 0x292b70(%rip), %xmm0   # 0x3da148
movsd 0x47138(%rip), %xmm1    # 0x18e718
subsd %xmm1, %xmm0
movsd %xmm0, 0x292b54(%rip)   # 0x3da140
movsd 0x292b4c(%rip), %xmm0   # 0x3da140
movsd 0x2a084(%rip), %xmm1    # 0x171680
subsd %xmm1, %xmm0
movsd %xmm0, 0x292b30(%rip)   # 0x3da138
movsd 0x292b28(%rip), %xmm0   # 0x3da138
movsd 0x47100(%rip), %xmm1    # 0x18e718
subsd %xmm1, %xmm0
movsd %xmm0, 0x292b0c(%rip)   # 0x3da130
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0x14763d
xorps %xmm0, %xmm0
subsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x147647
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm1
movsd 0x479fc(%rip), %xmm0    # 0x18f050
ucomisd %xmm1, %xmm0
jbe 0x147694
movsd 0x292ace(%rip), %xmm0   # 0x3da130
movsd 0x2a016(%rip), %xmm1    # 0x171680
subsd %xmm1, %xmm0
movsd %xmm0, 0x292ab2(%rip)   # 0x3da128
leaq 0x4fca4(%rip), %rax     # 0x197321
movq %rax, 0x84a94(%rip)     # 0x1cc118
leaq 0x501d8(%rip), %rax     # 0x197863
movq %rax, 0x84a8e(%rip)     # 0x1cc120
jmp 0x1476d7
xorps %xmm0, %xmm0
movsd %xmm0, 0x292a89(%rip)   # 0x3da128
movsd 0x292a89(%rip), %xmm0   # 0x3da130
movsd 0x29fd1(%rip), %xmm1    # 0x171680
subsd %xmm1, %xmm0
movsd %xmm0, 0x292a6d(%rip)   # 0x3da128
leaq 0x4fc8b(%rip), %rax     # 0x19734d
movq %rax, 0x84a4f(%rip)     # 0x1cc118
leaq 0x4fc55(%rip), %rax     # 0x197325
movq %rax, 0x84a49(%rip)     # 0x1cc120
movsd 0x292a49(%rip), %xmm0   # 0x3da128
movsd 0x47031(%rip), %xmm1    # 0x18e718
subsd %xmm1, %xmm0
movsd %xmm0, 0x292a2d(%rip)   # 0x3da120
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)