// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: get_tz_value(char*)
char *get_tz_value(char *s)
{
int c;
u08 saw_colon;

   if(s == 0) return s;

// tz_sign = 1;
   time_zone_hours = 0;
   time_zone_minutes = 0;
   time_zone_seconds = 0;
   tz_adjust = 0.0;

   saw_colon = 0;
   while(1) { // get time zone hour offset value
      c = *s;
      if(c == 0) {
         s = 0;
         break;
      }
      if     (c == '+') tz_sign = (0+tz_sign); 
      else if(c == '-') tz_sign = (0-tz_sign);
      else if(c == ':') ++saw_colon;
      else if(isdigit(c)) {
         if     (saw_colon == 0) time_zone_hours = (time_zone_hours * 10) + (c-'0');
         else if(saw_colon == 1) time_zone_minutes = (time_zone_minutes * 10) + (c-'0');
         else if(saw_colon == 2) time_zone_seconds = (time_zone_seconds * 10) + (c-'0'); 
      }
      else break;
      ++s;
   }
   time_zone_hours %= 24;


   time_zone_hours *= tz_sign;
   time_zone_minutes %= 60;
   time_zone_minutes *= tz_sign;
   time_zone_seconds %= 60;
   time_zone_seconds *= tz_sign;
   tz_adjust = jtime(time_zone_hours,time_zone_minutes,time_zone_seconds, 0.0);

   return s;
}

// Assembly:
xorl %r11d, %r11d
testq %rdi, %rdi
je 0xe3729
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rax
leaq 0x22a218(%rip), %r9     # 0x30d888
movl %r11d, (%r9)
leaq 0x22a212(%rip), %rdi    # 0x30d88c
movl %r11d, (%rdi)
leaq 0x22a20c(%rip), %rdx    # 0x30d890
movl %r11d, (%rdx)
leaq 0x22a1f2(%rip), %rcx    # 0x30d880
movq $0x0, (%rcx)
leaq 0x22a1fc(%rip), %rbx    # 0x30d898
movl (%rbx), %esi
xorl %r10d, %r10d
xorl %r8d, %r8d
xorl %r14d, %r14d
movzbl (%rax), %r15d
cmpl $0x2c, %r15d
jle 0xe36c3
cmpl $0x3a, %r15d
je 0xe3701
cmpl $0x2d, %r15d
jne 0xe36ce
negl %esi
movl %esi, (%rbx)
jmp 0xe3704
cmpl $0x2b, %r15d
je 0xe3704
testl %r15d, %r15d
je 0xe372c
movsbl %r15b, %r15d
addl $-0x30, %r15d
cmpl $0x9, %r15d
ja 0xe372e
cmpb $0x2, %r14b
je 0xe3719
movzbl %r14b, %r12d
cmpl $0x1, %r12d
je 0xe3709
testl %r12d, %r12d
jne 0xe3704
leal (%r11,%r11,4), %r11d
leal (%r15,%r11,2), %r11d
movl %r11d, (%r9)
xorl %r14d, %r14d
jmp 0xe3704
incb %r14b
incq %rax
jmp 0xe36a7
leal (%r10,%r10,4), %r10d
leal (%r15,%r10,2), %r10d
movl %r10d, (%rdi)
movb $0x1, %r14b
jmp 0xe3704
leal (%r8,%r8,4), %r8d
leal (%r15,%r8,2), %r8d
movl %r8d, (%rdx)
movb $0x2, %r14b
jmp 0xe3704
xorl %eax, %eax
retq
xorl %eax, %eax
movslq %r11d, %r11
imulq $0x2aaaaaab, %r11, %rbx # imm = 0x2AAAAAAB
movq %rbx, %r14
shrq $0x3f, %r14
shrq $0x22, %rbx
addl %r14d, %ebx
shll $0x3, %ebx
leal (%rbx,%rbx,2), %ebx
subl %ebx, %r11d
imull %esi, %r11d
movl %r11d, (%r9)
movslq %r10d, %r9
imulq $-0x77777777, %r9, %rbx # imm = 0x88888889
shrq $0x20, %rbx
addl %r10d, %ebx
movl %ebx, %r10d
shrl $0x1f, %r10d
sarl $0x5, %ebx
addl %r10d, %ebx
imull $0x3c, %ebx, %r10d
subl %r10d, %r9d
imull %esi, %r9d
movl %r9d, (%rdi)
movslq %r8d, %rdi
imulq $-0x77777777, %rdi, %r10 # imm = 0x88888889
shrq $0x20, %r10
addl %r8d, %r10d
movl %r10d, %r8d
shrl $0x1f, %r8d
sarl $0x5, %r10d
addl %r8d, %r10d
imull $0x3c, %r10d, %r8d
subl %r8d, %edi
imull %esi, %edi
cvtsi2sd %r11d, %xmm0
cvtsi2sd %r9d, %xmm1
movl %edi, (%rdx)
divsd 0x25849(%rip), %xmm1    # 0x109008
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
divsd 0x2583e(%rip), %xmm0    # 0x109010
addsd %xmm1, %xmm0
divsd 0x25862(%rip), %xmm0    # 0x109040
movsd %xmm0, (%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq