// File: 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
subq $0x50, %rsp
movsd %xmm0, -0x8(%rbp)
leaq 0x232a44(%rip), %rax    # 0x36c6e8
movl (%rax), %eax
movl %eax, -0xc(%rbp)
leaq 0x232a34(%rip), %rax    # 0x36c6e4
movl (%rax), %eax
movl %eax, -0x10(%rbp)
leaq 0x232a24(%rip), %rax    # 0x36c6e0
movl (%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0x232a24(%rip), %rax    # 0x36c6ec
movl (%rax), %eax
movl %eax, -0x18(%rbp)
leaq 0x232a1c(%rip), %rax    # 0x36c6f0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
leaq 0x232a14(%rip), %rax    # 0x36c6f4
movl (%rax), %eax
movl %eax, -0x20(%rbp)
leaq 0x232a24(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
leaq 0x232a1c(%rip), %rax    # 0x36c718
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x8(%rbp), %xmm0
xorl %edi, %edi
callq 0x11dd00
leaq 0x232b6c(%rip), %rax    # 0x36c884
movl (%rax), %edi
leaq 0x232b5b(%rip), %rax    # 0x36c87c
movl (%rax), %esi
leaq 0x232b56(%rip), %rax    # 0x36c880
movl (%rax), %edx
callq 0x122140
movsd %xmm0, -0x40(%rbp)
leaq 0x232b4b(%rip), %rax    # 0x36c888
movl (%rax), %edi
leaq 0x232b46(%rip), %rax    # 0x36c88c
movl (%rax), %esi
leaq 0x232b41(%rip), %rax    # 0x36c890
movl (%rax), %edx
leaq 0x232b40(%rip), %rax    # 0x36c898
movsd (%rax), %xmm0
callq 0x122210
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
addsd %xmm1, %xmm0
leaq 0x23299c(%rip), %rax    # 0x36c710
movsd %xmm0, (%rax)
leaq 0x232991(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x232b79(%rip), %rax    # 0x36c908
movl (%rax), %edx
xorl %esi, %esi
xorps %xmm0, %xmm0
movl %esi, %edi
callq 0x122210
movaps %xmm0, %xmm1
movsd -0x38(%rbp), %xmm0
addsd %xmm1, %xmm0
leaq 0x232968(%rip), %rax    # 0x36c718
movsd %xmm0, (%rax)
movl $0x14, %edi
callq 0x1355f0
leaq 0x232caf(%rip), %rax    # 0x36ca74
cmpb $0x0, (%rax)
je 0x139dd7
leaq 0x232d3b(%rip), %rax    # 0x36cb0c
movq %rax, -0x48(%rbp)
jmp 0x139e0a
leaq 0x2328a6(%rip), %rax    # 0x36c684
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x139df5
leaq 0x5dc51(%rip), %rax     # 0x197a40
movq %rax, -0x50(%rbp)
jmp 0x139e02
leaq 0x5c65d(%rip), %rax     # 0x196459
movq %rax, -0x50(%rbp)
jmp 0x139e02
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq 0x2615eb(%rip), %rdi    # 0x39b400
callq 0x9350
leaq 0x2328d3(%rip), %rax    # 0x36c6f4
movl (%rax), %ecx
leaq 0x232a5a(%rip), %rax    # 0x36c884
movl %ecx, (%rax)
leaq 0x2328bd(%rip), %rax    # 0x36c6f0
movl (%rax), %ecx
leaq 0x232a40(%rip), %rax    # 0x36c87c
movl %ecx, (%rax)
leaq 0x2328a7(%rip), %rax    # 0x36c6ec
movl (%rax), %ecx
leaq 0x232a32(%rip), %rax    # 0x36c880
movl %ecx, (%rax)
leaq 0x232891(%rip), %rax    # 0x36c6e8
movl (%rax), %ecx
leaq 0x232a28(%rip), %rax    # 0x36c888
movl %ecx, (%rax)
leaq 0x23287b(%rip), %rax    # 0x36c6e4
movl (%rax), %ecx
leaq 0x232a1a(%rip), %rax    # 0x36c88c
movl %ecx, (%rax)
leaq 0x232865(%rip), %rax    # 0x36c6e0
movl (%rax), %ecx
leaq 0x232a0c(%rip), %rax    # 0x36c890
movl %ecx, (%rax)
leaq 0x23286b(%rip), %rax    # 0x36c6f8
movsd (%rax), %xmm0
leaq 0x232a00(%rip), %rax    # 0x36c898
movsd %xmm0, (%rax)
movl -0xc(%rbp), %ecx
leaq 0x232842(%rip), %rax    # 0x36c6e8
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
leaq 0x232832(%rip), %rax    # 0x36c6e4
movl %ecx, (%rax)
movl -0x14(%rbp), %ecx
leaq 0x232822(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
leaq 0x232822(%rip), %rax    # 0x36c6ec
movl %ecx, (%rax)
movl -0x1c(%rbp), %ecx
leaq 0x23281a(%rip), %rax    # 0x36c6f0
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
leaq 0x232812(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
movsd -0x28(%rbp), %xmm0
leaq 0x232820(%rip), %rax    # 0x36c710
movsd %xmm0, (%rax)
movsd -0x30(%rbp), %xmm0
leaq 0x232818(%rip), %rax    # 0x36c718
movsd %xmm0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)