// File: /workspace/github_cpp_makefile_star2_O1/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 %r9d, %r9d
testq %rdi, %rdi
je 0xe2bc2
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rax
leaq 0x22ad76(%rip), %rdi    # 0x30d888
movl %r9d, (%rdi)
leaq 0x22ad70(%rip), %rsi    # 0x30d88c
movl %r9d, (%rsi)
leaq 0x22ad6a(%rip), %rdx    # 0x30d890
movl %r9d, (%rdx)
leaq 0x22ad50(%rip), %rcx    # 0x30d880
movq $0x0, (%rcx)
leaq 0x22ad5a(%rip), %r8     # 0x30d898
movl (%r8), %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %ebx, %ebx
movzbl (%rax), %r15d
cmpl $0x2c, %r15d
jle 0xe2b67
cmpl $0x3a, %r15d
je 0xe2ba1
cmpl $0x2d, %r15d
jne 0xe2b72
negl %r10d
movl %r10d, (%r8)
jmp 0xe2ba3
cmpl $0x2b, %r15d
je 0xe2ba3
testl %r15d, %r15d
je 0xe2bc5
movsbl %r15b, %r15d
addl $-0x30, %r15d
cmpl $0x9, %r15d
ja 0xe2bc7
cmpb $0x2, %bl
je 0xe2bb5
movzbl %bl, %r12d
cmpl $0x1, %r12d
je 0xe2ba8
testl %r12d, %r12d
jne 0xe2ba3
leal (%r9,%r9,4), %r9d
leal (%r15,%r9,2), %r9d
movl %r9d, (%rdi)
jmp 0xe2ba3
incb %bl
incq %rax
jmp 0xe2b49
leal (%r11,%r11,4), %r11d
leal (%r15,%r11,2), %r11d
movl %r11d, (%rsi)
jmp 0xe2ba3
leal (%r14,%r14,4), %r14d
leal (%r15,%r14,2), %r14d
movl %r14d, (%rdx)
jmp 0xe2ba3
xorl %eax, %eax
retq
xorl %eax, %eax
movslq (%rdi), %r9
imulq $0x2aaaaaab, %r9, %r10  # imm = 0x2AAAAAAB
movq %r10, %r11
shrq $0x3f, %r11
shrq $0x22, %r10
addl %r11d, %r10d
shll $0x3, %r10d
leal (%r10,%r10,2), %r10d
subl %r10d, %r9d
movl (%r8), %r8d
imull %r8d, %r9d
movl %r9d, (%rdi)
movslq (%rsi), %rdi
imulq $-0x77777777, %rdi, %r10 # imm = 0x88888889
shrq $0x20, %r10
addl %edi, %r10d
movl %r10d, %r11d
shrl $0x1f, %r11d
sarl $0x5, %r10d
addl %r11d, %r10d
imull $0x3c, %r10d, %r10d
subl %r10d, %edi
imull %r8d, %edi
movl %edi, (%rsi)
movslq (%rdx), %rsi
imulq $-0x77777777, %rsi, %r10 # imm = 0x88888889
shrq $0x20, %r10
addl %esi, %r10d
movl %r10d, %r11d
shrl $0x1f, %r11d
sarl $0x5, %r10d
addl %r11d, %r10d
imull $0x3c, %r10d, %r10d
subl %r10d, %esi
imull %r8d, %esi
cvtsi2sd %r9d, %xmm0
cvtsi2sd %edi, %xmm1
movl %esi, (%rdx)
divsd 0x263ab(%rip), %xmm1    # 0x109008
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
divsd 0x263a0(%rip), %xmm0    # 0x109010
addsd %xmm1, %xmm0
divsd 0x263c4(%rip), %xmm0    # 0x109040
movsd %xmm0, (%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq