// File: /workspace/github_c_makefile_star2_O0/lyda[P]tz/zic.c
// Function: gethms
static long
gethms(string, errstring, signable)
const char *		string;
const char * const	errstring;
const int		signable;
{
	long	hh;
	int	mm, ss, sign;

	if (string == NULL || *string == '\0')
		return 0;
	if (!signable)
		sign = 1;
	else if (*string == '-') {
		sign = -1;
		++string;
	} else	sign = 1;
	if (sscanf(string, scheck(string, "%ld"), &hh) == 1)
		mm = ss = 0;
	else if (sscanf(string, scheck(string, "%ld:%d"), &hh, &mm) == 2)
		ss = 0;
	else if (sscanf(string, scheck(string, "%ld:%d:%d"),
		&hh, &mm, &ss) != 3) {
			error(errstring);
			return 0;
	}
	if (hh < 0 ||
		mm < 0 || mm >= MINSPERHOUR ||
		ss < 0 || ss > SECSPERMIN) {
			error(errstring);
			return 0;
	}
	if (LONG_MAX / SECSPERHOUR < hh) {
		error(_("time overflow"));
		return 0;
	}
	if (noise && hh == HOURSPERDAY && mm == 0 && ss == 0)
		warning(_("24:00 not handled by pre-1998 versions of zic"));
	if (noise && (hh > HOURSPERDAY ||
		(hh == HOURSPERDAY && (mm != 0 || ss != 0))))
warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
	return oadd(eitol(sign) * hh * eitol(SECSPERHOUR),
		    eitol(sign) * (eitol(mm) * eitol(SECSPERMIN) + eitol(ss)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4399
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x43a6
movq $0x0, -0x8(%rbp)
jmp 0x45e5
cmpl $0x0, -0x1c(%rbp)
jne 0x43b5
movl $0x1, -0x34(%rbp)
jmp 0x43df
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x43d6
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x43dd
movl $0x1, -0x34(%rbp)
jmp 0x43df
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa0de(%rip), %rsi      # 0xe4d0
callq 0xcd40
movq -0x40(%rbp), %rdi
movq %rax, %rsi
leaq -0x28(%rbp), %rdx
movb $0x0, %al
callq 0x21d0
cmpl $0x1, %eax
jne 0x4421
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x44ae
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa0a0(%rip), %rsi      # 0xe4d4
callq 0xcd40
movq -0x48(%rbp), %rdi
movq %rax, %rsi
leaq -0x28(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
movb $0x0, %al
callq 0x21d0
cmpl $0x2, %eax
jne 0x445d
movl $0x0, -0x30(%rbp)
jmp 0x44ac
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa06b(%rip), %rsi      # 0xe4db
callq 0xcd40
movq -0x50(%rbp), %rdi
movq %rax, %rsi
leaq -0x28(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
leaq -0x30(%rbp), %r8
movb $0x0, %al
callq 0x21d0
cmpl $0x3, %eax
je 0x44aa
movq -0x18(%rbp), %rdi
callq 0x4110
movq $0x0, -0x8(%rbp)
jmp 0x45e5
jmp 0x44ac
jmp 0x44ae
cmpq $0x0, -0x28(%rbp)
jl 0x44cd
cmpl $0x0, -0x2c(%rbp)
jl 0x44cd
cmpl $0x3c, -0x2c(%rbp)
jge 0x44cd
cmpl $0x0, -0x30(%rbp)
jl 0x44cd
cmpl $0x3c, -0x30(%rbp)
jle 0x44e3
movq -0x18(%rbp), %rdi
callq 0x4110
movq $0x0, -0x8(%rbp)
jmp 0x45e5
movabsq $0x91a2b3c4d5e6f, %rax  # imm = 0x91A2B3C4D5E6F
cmpq -0x28(%rbp), %rax
jge 0x450c
leaq 0x9feb(%rip), %rdi      # 0xe4e5
callq 0x4110
movq $0x0, -0x8(%rbp)
jmp 0x45e5
cmpl $0x0, 0xdccd(%rip)      # 0x121e0
je 0x4534
cmpq $0x18, -0x28(%rbp)
jne 0x4534
cmpl $0x0, -0x2c(%rbp)
jne 0x4534
cmpl $0x0, -0x30(%rbp)
jne 0x4534
leaq 0x9fc4(%rip), %rdi      # 0xe4f3
callq 0x4000
cmpl $0x0, 0xdca5(%rip)      # 0x121e0
je 0x4563
cmpq $0x18, -0x28(%rbp)
jg 0x4557
cmpq $0x18, -0x28(%rbp)
jne 0x4563
cmpl $0x0, -0x2c(%rbp)
jne 0x4557
cmpl $0x0, -0x30(%rbp)
je 0x4563
leaq 0x9fc3(%rip), %rdi      # 0xe521
callq 0x4000
movl -0x34(%rbp), %edi
callq 0x4660
imulq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0xe10, %edi            # imm = 0xE10
callq 0x4660
movq %rax, %rcx
movq -0x78(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x34(%rbp), %edi
callq 0x4660
movq %rax, -0x68(%rbp)
movl -0x2c(%rbp), %edi
callq 0x4660
movq %rax, -0x70(%rbp)
movl $0x3c, %edi
callq 0x4660
movq %rax, %rcx
movq -0x70(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x58(%rbp)
movl -0x30(%rbp), %edi
callq 0x4660
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movq -0x58(%rbp), %rax
addq %rcx, %rax
imulq %rax, %rsi
callq 0x4600
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)