// File: /workspace/github_cpp_makefile_star2_O3/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 0x2273bf(%rip), %rax    # 0x30d508
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
leaq 0x2273af(%rip), %rax    # 0x30d504
movl (%rax), %eax
movl %eax, -0x38(%rbp)
leaq 0x22739f(%rip), %rax    # 0x30d500
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq 0x22739f(%rip), %rax    # 0x30d50c
movl (%rax), %eax
movl %eax, -0x30(%rbp)
leaq 0x227397(%rip), %rax    # 0x30d510
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0x22738f(%rip), %rax    # 0x30d514
leaq 0x2273a4(%rip), %r15    # 0x30d530
movsd (%r15), %xmm1
movsd %xmm1, -0x50(%rbp)
leaq 0x22739b(%rip), %r12    # 0x30d538
movsd (%r12), %xmm1
movsd %xmm1, -0x48(%rbp)
movl (%rax), %ebx
xorl %edi, %edi
callq 0xd12da
leaq 0x2274ec(%rip), %rax    # 0x30d6a4
movl (%rax), %edi
leaq 0x2274db(%rip), %rax    # 0x30d69c
movl (%rax), %esi
leaq 0x2274d6(%rip), %rax    # 0x30d6a0
movl (%rax), %edx
callq 0xd485e
leaq 0x2274d0(%rip), %r14    # 0x30d6a8
leaq 0x2274cd(%rip), %r13    # 0x30d6ac
leaq 0x2274ca(%rip), %rcx    # 0x30d6b0
xorps %xmm1, %xmm1
cvtsi2sdl (%r14), %xmm1
cvtsi2sdl (%r13), %xmm2
leaq 0x2274bd(%rip), %rax    # 0x30d6b8
divsd 0x22e05(%rip), %xmm2    # 0x109008
addsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx), %xmm1
addsd (%rax), %xmm1
movsd 0x22df6(%rip), %xmm3    # 0x109010
divsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movsd 0x22e16(%rip), %xmm2    # 0x109040
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r15)
leaq 0x2274ea(%rip), %rax    # 0x30d728
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
divsd %xmm3, %xmm0
xorpd %xmm3, %xmm3
addsd %xmm0, %xmm3
divsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, (%r12)
callq 0xe2692
leaq 0x227629(%rip), %rax    # 0x30d894
leaq 0x227232(%rip), %rcx    # 0x30d4a4
testb $0x1, (%rcx)
leaq 0x4d675(%rip), %rcx     # 0x1338f1
leaq 0x4ec2b(%rip), %rsi     # 0x134eae
cmoveq %rcx, %rsi
cmpb $0x0, (%rax)
je 0xe6293
leaq 0x22769d(%rip), %rsi    # 0x30d930
leaq 0x255f86(%rip), %rdi    # 0x33c220
callq 0x9340
leaq 0x22726e(%rip), %r9     # 0x30d514
movl (%r9), %eax
leaq 0x2273f4(%rip), %rcx    # 0x30d6a4
movl %eax, (%rcx)
leaq 0x227257(%rip), %r8     # 0x30d510
movl (%r8), %eax
leaq 0x2273d9(%rip), %rcx    # 0x30d69c
movl %eax, (%rcx)
leaq 0x227240(%rip), %rdi    # 0x30d50c
movl (%rdi), %eax
leaq 0x2273cb(%rip), %rcx    # 0x30d6a0
movl %eax, (%rcx)
leaq 0x22722a(%rip), %rcx    # 0x30d508
movl (%rcx), %eax
movl %eax, (%r14)
leaq 0x22721a(%rip), %rdx    # 0x30d504
movl (%rdx), %eax
movl %eax, (%r13)
leaq 0x227209(%rip), %rsi    # 0x30d500
movl (%rsi), %eax
leaq 0x2273b0(%rip), %r10    # 0x30d6b0
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 0x2271f1(%rip), %rax    # 0x30d518
movsd (%rax), %xmm0
leaq 0x227386(%rip), %rax    # 0x30d6b8
movsd %xmm0, (%rax)
leaq 0x2271f3(%rip), %rax    # 0x30d530
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