// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed.c
// Function: parsetime
static int
parsetime(const char *s, time_t *tp)
{
	static struct {
		char *name;
		int len;
	} mons[] = {
		{ STRP("January"),   },
		{ STRP("February"),  },
		{ STRP("March"),     },
		{ STRP("April"),     },
		{ STRP("May"),       },
		{ STRP("June"),      },
		{ STRP("July"),      },
		{ STRP("August"),    },
		{ STRP("September"), },
		{ STRP("October"),   },
		{ STRP("November"),  },
		{ STRP("December"),  },
	};
	int va[6] = { 0 }, i, j, v, vi;
	size_t m;

	for (; *s && isspace((unsigned char)*s); s++)
		;
	if (!isdigit((unsigned char)*s) && !isalpha((unsigned char)*s))
		return -1;

	if (strspn(s, "0123456789") == 4) {
		/* format "%Y-%m-%d %H:%M:%S" or "%Y-%m-%dT%H:%M:%S" */
		vi = 0;
	} else {
		/* format: "[%a, ]%d %b %Y %H:%M:%S" */
		/* parse "[%a, ]%d %b %Y " part, then use time parsing as above */
		for (; *s && isalpha((unsigned char)*s); s++)
			;
		for (; *s && isspace((unsigned char)*s); s++)
			;
		if (*s == ',')
			s++;
		for (; *s && isspace((unsigned char)*s); s++)
			;
		for (v = 0, i = 0; *s && i < 4 && isdigit((unsigned char)*s); s++, i++)
			v = (v * 10) + (*s - '0');
		va[2] = v; /* day */
		for (; *s && isspace((unsigned char)*s); s++)
			;
		/* end of word month */
		for (j = 0; *s && isalpha((unsigned char)s[j]); j++)
			;
		/* check month name */
		if (j < 3 || j > 9)
			return -1; /* month cannot match */
		for (m = 0; m < sizeof(mons) / sizeof(*mons); m++) {
			/* abbreviation (3 length) or long name */
			if ((j == 3 || j == mons[m].len) &&
			    !strncasecmp(mons[m].name, s, j)) {
				va[1] = m + 1;
				s += j;
				break;
			}
		}
		if (m >= 12)
			return -1; /* no month found */
		for (; *s && isspace((unsigned char)*s); s++)
			;
		for (v = 0, i = 0; *s && i < 4 && isdigit((unsigned char)*s); s++, i++)
			v = (v * 10) + (*s - '0');
		va[0] = v; /* year */
		for (; *s && isspace((unsigned char)*s); s++)
			;
		/* parse only regular time part, see below */
		vi = 3;
	}

	/* parse time part */
	for (; *s && vi < 6; vi++) {
		for (i = 0, v = 0; *s && i < 4 && isdigit((unsigned char)*s); s++, i++)
			v = (v * 10) + (*s - '0');
		va[vi] = v;
		if ((vi < 2 && *s == '-') ||
		    (vi == 2 && (*s == 'T' || isspace((unsigned char)*s))) ||
		    (vi > 2 && *s == ':'))
			s++;
	}

	/* skip milliseconds in for example: "%Y-%m-%dT%H:%M:%S.000Z" */
	if (*s == '.') {
		for (s++; *s && isdigit((unsigned char)*s); s++)
			;
	}

	/* invalid range */
	if (va[0] < 0 || va[0] > 9999 ||
	    va[1] < 1 || va[1] > 12 ||
	    va[2] < 1 || va[2] > 31 ||
	    va[3] < 0 || va[3] > 23 ||
	    va[4] < 0 || va[4] > 59 ||
	    va[5] < 0 || va[5] > 59)
		return -1;

	if (tp)
		*tp = datetounix(va[0] - 1900, va[1] - 1, va[2], va[3], va[4], va[5]) -
		      gettzoffset(s);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x49(%rbp)
je 0x3615
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, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x361e
jmp 0x362e
jmp 0x3620
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x35e0
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x367a
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x367a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3cdb
movq -0x10(%rbp), %rdi
leaq 0x3ac7(%rip), %rsi      # 0x714c
callq 0x20e0
cmpq $0x4, %rax
jne 0x369c
movl $0x0, -0x40(%rbp)
jmp 0x3aab
jmp 0x369e
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4a(%rbp)
je 0x36d3
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x36dc
jmp 0x36ec
jmp 0x36de
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x369e
jmp 0x36ee
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4b(%rbp)
je 0x3723
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, -0x4b(%rbp)
movb -0x4b(%rbp), %al
testb $0x1, %al
jne 0x372c
jmp 0x373c
jmp 0x372e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x36ee
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x3754
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3756
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4c(%rbp)
je 0x378b
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, -0x4c(%rbp)
movb -0x4c(%rbp), %al
testb $0x1, %al
jne 0x3794
jmp 0x37a4
jmp 0x3796
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3756
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4d(%rbp)
je 0x37f2
xorl %eax, %eax
cmpl $0x4, -0x34(%rbp)
movb %al, -0x4d(%rbp)
jge 0x37f2
callq 0x21f0
movq (%rax), %rax
movq -0x10(%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, -0x4d(%rbp)
movb -0x4d(%rbp), %al
testb $0x1, %al
jne 0x37fb
jmp 0x3825
imull $0xa, -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x37b2
movl -0x3c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4e(%rbp)
je 0x3860
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, -0x4e(%rbp)
movb -0x4e(%rbp), %al
testb $0x1, %al
jne 0x3869
jmp 0x3879
jmp 0x386b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x382b
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4f(%rbp)
je 0x38ba
callq 0x21f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq -0x38(%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, -0x4f(%rbp)
movb -0x4f(%rbp), %al
testb $0x1, %al
jne 0x38c3
jmp 0x38d0
jmp 0x38c5
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3880
cmpl $0x3, -0x38(%rbp)
jl 0x38dc
cmpl $0x9, -0x38(%rbp)
jle 0x38e8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3cdb
movq $0x0, -0x48(%rbp)
cmpq $0xc, -0x48(%rbp)
jae 0x396c
cmpl $0x3, -0x38(%rbp)
je 0x3917
movl -0x38(%rbp), %eax
movq -0x48(%rbp), %rdx
leaq 0x5a85(%rip), %rcx      # 0x9390
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x395c
movq -0x48(%rbp), %rcx
leaq 0x5a6e(%rip), %rax      # 0x9390
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x38(%rbp), %rdx
callq 0x21a0
cmpl $0x0, %eax
jne 0x395c
movq -0x48(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x2c(%rbp)
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x396c
jmp 0x395e
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x38f0
cmpq $0xc, -0x48(%rbp)
jb 0x397f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3cdb
jmp 0x3981
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x50(%rbp)
je 0x39b6
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, -0x50(%rbp)
movb -0x50(%rbp), %al
testb $0x1, %al
jne 0x39bf
jmp 0x39cf
jmp 0x39c1
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3981
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x51(%rbp)
je 0x3a1d
xorl %eax, %eax
cmpl $0x4, -0x34(%rbp)
movb %al, -0x51(%rbp)
jge 0x3a1d
callq 0x21f0
movq (%rax), %rax
movq -0x10(%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, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x3a26
jmp 0x3a50
imull $0xa, -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x39dd
movl -0x3c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x52(%rbp)
je 0x3a8b
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, -0x52(%rbp)
movb -0x52(%rbp), %al
testb $0x1, %al
jne 0x3a94
jmp 0x3aa4
jmp 0x3a96
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3a56
movl $0x3, -0x40(%rbp)
jmp 0x3aad
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x53(%rbp)
je 0x3ac8
cmpl $0x6, -0x40(%rbp)
setl %al
movb %al, -0x53(%rbp)
movb -0x53(%rbp), %al
testb $0x1, %al
jne 0x3ad4
jmp 0x3bd2
movl $0x0, -0x34(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x54(%rbp)
je 0x3b22
xorl %eax, %eax
cmpl $0x4, -0x34(%rbp)
movb %al, -0x54(%rbp)
jge 0x3b22
callq 0x21f0
movq (%rax), %rax
movq -0x10(%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, -0x54(%rbp)
movb -0x54(%rbp), %al
testb $0x1, %al
jne 0x3b2b
jmp 0x3b55
imull $0xa, -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3ae2
movl -0x3c(%rbp), %ecx
movslq -0x40(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
cmpl $0x2, -0x40(%rbp)
jge 0x3b72
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x3bb6
cmpl $0x2, -0x40(%rbp)
jne 0x3ba4
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x54, %eax
je 0x3bb6
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
jne 0x3bb6
cmpl $0x2, -0x40(%rbp)
jle 0x3bc2
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x3bc2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3bc4
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3aad
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x3c3a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x55(%rbp)
je 0x3c1f
callq 0x21f0
movq (%rax), %rax
movq -0x10(%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, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x3c28
jmp 0x3c38
jmp 0x3c2a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3bea
jmp 0x3c3a
cmpl $0x0, -0x30(%rbp)
jl 0x3c85
cmpl $0x270f, -0x30(%rbp)    # imm = 0x270F
jg 0x3c85
cmpl $0x1, -0x2c(%rbp)
jl 0x3c85
cmpl $0xc, -0x2c(%rbp)
jg 0x3c85
cmpl $0x1, -0x28(%rbp)
jl 0x3c85
cmpl $0x1f, -0x28(%rbp)
jg 0x3c85
cmpl $0x0, -0x24(%rbp)
jl 0x3c85
cmpl $0x17, -0x24(%rbp)
jg 0x3c85
cmpl $0x0, -0x20(%rbp)
jl 0x3c85
cmpl $0x3b, -0x20(%rbp)
jg 0x3c85
cmpl $0x0, -0x1c(%rbp)
jl 0x3c85
cmpl $0x3b, -0x1c(%rbp)
jle 0x3c8e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3cdb
cmpq $0x0, -0x18(%rbp)
je 0x3cd4
movl -0x30(%rbp), %eax
subl $0x76c, %eax            # imm = 0x76C
movslq %eax, %rdi
movl -0x2c(%rbp), %esi
subl $0x1, %esi
movl -0x28(%rbp), %edx
movl -0x24(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x1c(%rbp), %r9d
callq 0x3cf0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3f20
movq -0x60(%rbp), %rcx
subq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)