// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x136930
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x136b4c
leaq 0x236131(%rip), %rax    # 0x36ca68
movl $0x0, (%rax)
leaq 0x236128(%rip), %rax    # 0x36ca6c
movl $0x0, (%rax)
leaq 0x23611f(%rip), %rax    # 0x36ca70
movl $0x0, (%rax)
leaq 0x236102(%rip), %rax    # 0x36ca60
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movb $0x0, -0x15(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x136986
movq $0x0, -0x10(%rbp)
jmp 0x136a74
cmpl $0x2b, -0x14(%rbp)
jne 0x1369a6
leaq 0x2360e5(%rip), %rax    # 0x36ca78
movl (%rax), %ecx
addl $0x0, %ecx
leaq 0x2360d9(%rip), %rax    # 0x36ca78
movl %ecx, (%rax)
jmp 0x136a63
cmpl $0x2d, -0x14(%rbp)
jne 0x1369c5
xorl %ecx, %ecx
leaq 0x2360c3(%rip), %rax    # 0x36ca78
subl (%rax), %ecx
leaq 0x2360ba(%rip), %rax    # 0x36ca78
movl %ecx, (%rax)
jmp 0x136a61
cmpl $0x3a, -0x14(%rbp)
jne 0x1369d8
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x136a5f
movl -0x14(%rbp), %edi
callq 0x9330
cmpl $0x0, %eax
je 0x136a5b
movzbl -0x15(%rbp), %eax
cmpl $0x0, %eax
jne 0x136a0b
leaq 0x236073(%rip), %rax    # 0x36ca68
imull $0xa, (%rax), %ecx
movl -0x14(%rbp), %eax
subl $0x30, %eax
addl %eax, %ecx
leaq 0x236061(%rip), %rax    # 0x36ca68
movl %ecx, (%rax)
jmp 0x136a59
movzbl -0x15(%rbp), %eax
cmpl $0x1, %eax
jne 0x136a31
leaq 0x236051(%rip), %rax    # 0x36ca6c
imull $0xa, (%rax), %ecx
movl -0x14(%rbp), %eax
subl $0x30, %eax
addl %eax, %ecx
leaq 0x23603f(%rip), %rax    # 0x36ca6c
movl %ecx, (%rax)
jmp 0x136a57
movzbl -0x15(%rbp), %eax
cmpl $0x2, %eax
jne 0x136a55
leaq 0x23602f(%rip), %rax    # 0x36ca70
imull $0xa, (%rax), %ecx
movl -0x14(%rbp), %eax
subl $0x30, %eax
addl %eax, %ecx
leaq 0x23601d(%rip), %rax    # 0x36ca70
movl %ecx, (%rax)
jmp 0x136a57
jmp 0x136a59
jmp 0x136a5d
jmp 0x136a74
jmp 0x136a5f
jmp 0x136a61
jmp 0x136a63
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x136969
leaq 0x235fed(%rip), %rax    # 0x36ca68
movl (%rax), %eax
movl $0x18, %ecx
cltd
idivl %ecx
leaq 0x235fdc(%rip), %rax    # 0x36ca68
movl %edx, (%rax)
leaq 0x235fe3(%rip), %rax    # 0x36ca78
movl (%rax), %ecx
leaq 0x235fca(%rip), %rax    # 0x36ca68
imull (%rax), %ecx
leaq 0x235fc0(%rip), %rax    # 0x36ca68
movl %ecx, (%rax)
leaq 0x235fbb(%rip), %rax    # 0x36ca6c
movl (%rax), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
leaq 0x235faa(%rip), %rax    # 0x36ca6c
movl %edx, (%rax)
leaq 0x235fad(%rip), %rax    # 0x36ca78
movl (%rax), %ecx
leaq 0x235f98(%rip), %rax    # 0x36ca6c
imull (%rax), %ecx
leaq 0x235f8e(%rip), %rax    # 0x36ca6c
movl %ecx, (%rax)
leaq 0x235f89(%rip), %rax    # 0x36ca70
movl (%rax), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
leaq 0x235f78(%rip), %rax    # 0x36ca70
movl %edx, (%rax)
leaq 0x235f77(%rip), %rax    # 0x36ca78
movl (%rax), %ecx
leaq 0x235f66(%rip), %rax    # 0x36ca70
imull (%rax), %ecx
leaq 0x235f5c(%rip), %rax    # 0x36ca70
movl %ecx, (%rax)
leaq 0x235f4b(%rip), %rax    # 0x36ca68
movl (%rax), %edi
leaq 0x235f46(%rip), %rax    # 0x36ca6c
movl (%rax), %esi
leaq 0x235f41(%rip), %rax    # 0x36ca70
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x122210
leaq 0x235f20(%rip), %rax    # 0x36ca60
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)