// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed.c
// Function: gettzoffset
static long long
gettzoffset(const char *s)
{
	static struct {
		char *name;
		const int offhour;
	} tzones[] = {
		{ "CDT", -5 * 3600 },
		{ "CST", -6 * 3600 },
		{ "EDT", -4 * 3600 },
		{ "EST", -5 * 3600 },
		{ "MDT", -6 * 3600 },
		{ "MST", -7 * 3600 },
		{ "PDT", -7 * 3600 },
		{ "PST", -8 * 3600 },
	};
	const char *p;
	int tzhour = 0, tzmin = 0;
	size_t i;

	for (; *s && isspace((unsigned char)*s); s++)
		;
	switch (*s) {
	case '-': /* offset */
	case '+':
		for (i = 0, p = s + 1; i < 2 && *p && isdigit((unsigned char)*p); i++, p++)
			tzhour = (tzhour * 10) + (*p - '0');
		if (*p == ':')
			p++;
		for (i = 0; i < 2 && *p && isdigit((unsigned char)*p); i++, p++)
			tzmin = (tzmin * 10) + (*p - '0');
		return ((tzhour * 3600) + (tzmin * 60)) * (s[0] == '-' ? -1 : 1);
	default: /* timezone name */
		for (i = 0; *s && isalpha((unsigned char)s[i]); i++)
			;
		if (i != 3)
			return 0;
		/* compare tz and adjust offset relative to UTC */
		for (i = 0; i < sizeof(tzones) / sizeof(*tzones); i++) {
			if (!memcmp(s, tzones[i].name, 3))
				return tzones[i].offhour;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x3f6f
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x3f78
jmp 0x3f88
jmp 0x3f7a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3f3a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
subl $0x2b, %eax
je 0x3fa7
jmp 0x3f99
movl -0x30(%rbp), %eax
subl $0x2d, %eax
jne 0x40fb
jmp 0x3fa7
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x2, -0x28(%rbp)
movb %al, -0x31(%rbp)
jae 0x3ffc
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
je 0x3ffc
callq 0x21f0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x4005
jmp 0x4032
imull $0xa, -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3fbb
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x404a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x2, -0x28(%rbp)
movb %al, -0x32(%rbp)
jae 0x4093
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rbp)
je 0x4093
callq 0x21f0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x409c
jmp 0x40c9
imull $0xa, -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4052
imull $0xe10, -0x1c(%rbp), %eax # imm = 0xE10
imull $0x3c, -0x20(%rbp), %ecx
addl %ecx, %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %esi
movl $0x1, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x2d, %esi
cmovel %edx, %ecx
imull %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x41d4
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x33(%rbp)
je 0x413d
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
setne %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
testb $0x1, %al
jne 0x4146
jmp 0x4156
jmp 0x4148
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4103
cmpq $0x3, -0x28(%rbp)
je 0x4167
movq $0x0, -0x8(%rbp)
jmp 0x41d4
movq $0x0, -0x28(%rbp)
cmpq $0x8, -0x28(%rbp)
jae 0x41ca
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rcx
leaq 0x52cb(%rip), %rax      # 0x9450
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movl $0x3, %edx
callq 0x2110
cmpl $0x0, %eax
jne 0x41ba
movq -0x28(%rbp), %rcx
leaq 0x52a7(%rip), %rax      # 0x9450
shlq $0x4, %rcx
addq %rcx, %rax
movslq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x41d4
jmp 0x41bc
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x416f
jmp 0x41cc
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop