// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: get_dst_zone(char*)
char *get_dst_zone(char *s)
{
int c;
int j;

   if(dst_area == 0) dst_area = USA;
   dst_string[0] = 0;
   j = 0;
   while(j < 20) {
      c = *s;
      if(c == 0) { s=0; break; }
      ++s;

      if(c == '/') break;
      if(c == ' ') continue;
      if(c == '\t') continue;

      dst_string[j++] = toupper(c);
      dst_string[j] = 0;

      if     (j >= TZ_NAME_LEN) break;
      else if(*s == 0)    { s=0; break; }
      else if(*s == 0x0D) { s=0; break; }
      else if(*s == 0x0A) { s=0; break; }
   }

   if(1 && (user_set_dst == 0)) {  // user has not set the DST area
      strcpy(out, dst_string);
      strupr(out);
      if(strcmp(out, "BST") == 0) {  // UK/euro time
         dst_area = 2;  // set the DST area to Euro-land
      }
      else {  // assume USA
         dst_area = 1;
      }
      calc_dst_times(this_year, dst_list[dst_area]);
      dst_ofs = dst_offset();
   }

   return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x235d89(%rip), %rax    # 0x36ca7c
cmpl $0x0, (%rax)
jne 0x136d05
leaq 0x235d7d(%rip), %rax    # 0x36ca7c
movl $0x1, (%rax)
leaq 0x235dfa(%rip), %rax    # 0x36cb06
movb $0x0, (%rax)
movl $0x0, -0x10(%rbp)
cmpl $0x14, -0x10(%rbp)
jge 0x136dea
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x136d3d
movq $0x0, -0x8(%rbp)
jmp 0x136dea
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
cmpl $0x2f, -0xc(%rbp)
jne 0x136d54
jmp 0x136dea
cmpl $0x20, -0xc(%rbp)
jne 0x136d5c
jmp 0x136d16
cmpl $0x9, -0xc(%rbp)
jne 0x136d64
jmp 0x136d16
movl -0xc(%rbp), %edi
callq 0x96e0
movb %al, %dl
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x10(%rbp)
movslq %eax, %rcx
leaq 0x235d83(%rip), %rax    # 0x36cb06
movb %dl, (%rax,%rcx)
movslq -0x10(%rbp), %rcx
leaq 0x235d75(%rip), %rax    # 0x36cb06
movb $0x0, (%rax,%rcx)
cmpl $0x5, -0x10(%rbp)
jl 0x136d9d
jmp 0x136dea
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x136db3
movq $0x0, -0x8(%rbp)
jmp 0x136dea
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x136dc9
movq $0x0, -0x8(%rbp)
jmp 0x136dea
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x136ddf
movq $0x0, -0x8(%rbp)
jmp 0x136dea
jmp 0x136de1
jmp 0x136de3
jmp 0x136de5
jmp 0x136d16
leaq 0x235c93(%rip), %rax    # 0x36ca84
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x136e83
leaq 0x2645fc(%rip), %rdi    # 0x39b400
leaq 0x235cfb(%rip), %rsi    # 0x36cb06
callq 0x9350
leaq 0x2645e9(%rip), %rdi    # 0x39b400
callq 0x9890
leaq 0x2645dd(%rip), %rdi    # 0x39b400
leaq 0x5f949(%rip), %rsi     # 0x196773
callq 0x9510
cmpl $0x0, %eax
jne 0x136e43
leaq 0x235c41(%rip), %rax    # 0x36ca7c
movl $0x2, (%rax)
jmp 0x136e50
leaq 0x235c32(%rip), %rax    # 0x36ca7c
movl $0x1, (%rax)
leaq 0x2358a9(%rip), %rax    # 0x36c700
movl (%rax), %edi
leaq 0x235c1c(%rip), %rax    # 0x36ca7c
movslq (%rax), %rcx
leaq 0x929c6(%rip), %rax     # 0x1c9830
movq (%rax,%rcx,8), %rsi
callq 0x1339f0
callq 0x133d80
movl %eax, %ecx
leaq 0x235bff(%rip), %rax    # 0x36ca80
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)