// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: adjust_season(double)
void adjust_season(double season)
{
int temp_hours;
int temp_minutes;
int temp_seconds;
int temp_day;
int temp_month;
int temp_year;
double temp_jd_utc;
double temp_jd_gps;

   // adjust season Julian date for local time zone
   temp_hours   = pri_hours;    // save current time
   temp_minutes = pri_minutes;
   temp_seconds = pri_seconds;
   temp_day     = pri_day;
   temp_month   = pri_month;
   temp_year    = pri_year;
   temp_jd_utc  = jd_utc;
   temp_jd_gps  = jd_gps;

   gregorian(0, season);           // convert Julian season value to Gregorian

   jd_utc = jdate(g_year,g_month,g_day) + jtime(g_hours,g_minutes,g_seconds,g_frac);
   jd_gps = jd_utc + jtime(0,0,utc_offset,0.0);
   adjust_tz(20);               // convert UTC season values to local time zone
   strcpy(out, time_zone_set?tz_string:(time_flags & TFLAGS_UTC)?"UTC":"GPS");

   g_year    = pri_year;        // save season time values in the Gregorian variables
   g_month   = pri_month;
   g_day     = pri_day;
   g_hours   = pri_hours;
   g_minutes = pri_minutes;
   g_seconds = pri_seconds;
   g_frac    = pri_frac;

   pri_hours   = temp_hours;    // restore the current time
   pri_minutes = temp_minutes;
   pri_seconds = temp_seconds;
   pri_day     = temp_day;
   pri_month   = temp_month;
   pri_year    = temp_year;
   jd_utc      = temp_jd_utc;
   jd_gps      = temp_jd_gps;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x2252b1(%rip), %rax    # 0x2f7508
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
leaq 0x2252a1(%rip), %rax    # 0x2f7504
movl (%rax), %eax
movl %eax, -0x38(%rbp)
leaq 0x225291(%rip), %rax    # 0x2f7500
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq 0x225291(%rip), %rax    # 0x2f750c
movl (%rax), %eax
movl %eax, -0x30(%rbp)
leaq 0x225289(%rip), %rax    # 0x2f7510
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0x225281(%rip), %rax    # 0x2f7514
leaq 0x225296(%rip), %r15    # 0x2f7530
movsd (%r15), %xmm1
movsd %xmm1, -0x50(%rbp)
leaq 0x22528d(%rip), %r12    # 0x2f7538
movsd (%r12), %xmm1
movsd %xmm1, -0x48(%rbp)
movl (%rax), %ebx
xorl %edi, %edi
callq 0xbfac2
leaq 0x2253de(%rip), %rax    # 0x2f76a4
movl (%rax), %edi
leaq 0x2253cd(%rip), %rax    # 0x2f769c
movl (%rax), %esi
leaq 0x2253c8(%rip), %rax    # 0x2f76a0
movl (%rax), %edx
callq 0xc2f07
leaq 0x2253c2(%rip), %r14    # 0x2f76a8
leaq 0x2253bf(%rip), %r13    # 0x2f76ac
leaq 0x2253bc(%rip), %rcx    # 0x2f76b0
cvtsi2sdl (%r14), %xmm1
cvtsi2sdl (%r13), %xmm2
leaq 0x2253b2(%rip), %rax    # 0x2f76b8
divsd 0x20cfa(%rip), %xmm2    # 0xf3008
addsd %xmm1, %xmm2
cvtsi2sdl (%rcx), %xmm1
addsd (%rax), %xmm1
movsd 0x20cee(%rip), %xmm3    # 0xf3010
divsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movsd 0x20d0e(%rip), %xmm2    # 0xf3040
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r15)
leaq 0x2253e2(%rip), %rax    # 0x2f7728
cvtsi2sdl (%rax), %xmm0
divsd %xmm3, %xmm0
xorpd %xmm3, %xmm3
addsd %xmm0, %xmm3
divsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, (%r12)
callq 0xcf298
leaq 0x225524(%rip), %rax    # 0x2f7894
leaq 0x22512d(%rip), %rcx    # 0x2f74a4
testb $0x1, (%rcx)
leaq 0x4b490(%rip), %rcx     # 0x11d811
leaq 0x4ca46(%rip), %rsi     # 0x11edce
cmoveq %rcx, %rsi
cmpb $0x0, (%rax)
je 0xd2398
leaq 0x225598(%rip), %rsi    # 0x2f7930
leaq 0x253e81(%rip), %rdi    # 0x326220
callq 0x9330
leaq 0x225169(%rip), %r9     # 0x2f7514
movl (%r9), %eax
leaq 0x2252ef(%rip), %rcx    # 0x2f76a4
movl %eax, (%rcx)
leaq 0x225152(%rip), %r8     # 0x2f7510
movl (%r8), %eax
leaq 0x2252d4(%rip), %rcx    # 0x2f769c
movl %eax, (%rcx)
leaq 0x22513b(%rip), %rdi    # 0x2f750c
movl (%rdi), %eax
leaq 0x2252c6(%rip), %rcx    # 0x2f76a0
movl %eax, (%rcx)
leaq 0x225125(%rip), %rcx    # 0x2f7508
movl (%rcx), %eax
movl %eax, (%r14)
leaq 0x225115(%rip), %rdx    # 0x2f7504
movl (%rdx), %eax
movl %eax, (%r13)
leaq 0x225104(%rip), %rsi    # 0x2f7500
movl (%rsi), %eax
leaq 0x2252ab(%rip), %r10    # 0x2f76b0
movl %eax, (%r10)
movl -0x3c(%rbp), %eax
movl %eax, (%rcx)
movl -0x38(%rbp), %eax
movl %eax, (%rdx)
movl -0x34(%rbp), %eax
movl %eax, (%rsi)
movl -0x30(%rbp), %eax
movl %eax, (%rdi)
movl -0x2c(%rbp), %eax
movl %eax, (%r8)
movl %ebx, (%r9)
leaq 0x2250ec(%rip), %rax    # 0x2f7518
movsd (%rax), %xmm0
leaq 0x225281(%rip), %rax    # 0x2f76b8
movsd %xmm0, (%rax)
leaq 0x2250ee(%rip), %rax    # 0x2f7530
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, (%r12)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq