// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/net.c
// Function: parseFtpMDTM
static time_t parseFtpMDTM(char *rs)
/* parse reply to MDTM and return it
 * 200 YYYYMMDDhhmmss */
{
char *words[3];
int wordCount = chopString(rs, " ", words, ArraySize(words));
if (wordCount != 2)
    errAbort("MDTM reply should have 2 words but has %d", wordCount);
#define EXPECTED_MDTM_FORMAT "YYYYmmddHHMMSS"
if (strlen(words[1]) < strlen(EXPECTED_MDTM_FORMAT))
    errAbort("MDTM reply word [%s] shorter than " EXPECTED_MDTM_FORMAT, words[1]);
// man strptime ->
// "There should be whitespace or other alphanumeric characters between any two field descriptors."
// There are no separators in the MDTM timestamp, so make a spread-out version for strptime:
char spread[] = "YYYY mm dd HH MM SS";
char *from = words[1];
char *to = spread;
*to++ = *from++;
*to++ = *from++;
*to++ = *from++;
*to++ = *from++;
*to++ = '-';
*to++ = *from++;
*to++ = *from++;
*to++ = '-';
*to++ = *from++;
*to++ = *from++;
*to++ = ' ';
*to++ = *from++;
*to++ = *from++;
*to++ = ':';
*to++ = *from++;
*to++ = *from++;
*to++ = ':';
*to++ = *from++;
*to++ = *from++;
*to++ = 0;
struct tm tm;
if (strptime(spread, "%Y-%m-%d %H:%M:%S", &tm) == NULL)
    errAbort("unable to parse MDTM string [%s]", spread);
// Not set by strptime(); tells mktime() to determine whether daylight saving time is in effect:
tm.tm_isdst = -1;
time_t t = mktime(&tm);
if (t == -1)
    errAbort("mktime failed while parsing strptime'd MDTM string [%s]", words[1]);
return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x953dc(%rip), %rsi     # 0xd832a
movl $0x3, %ecx
callq 0x2e840
movl %eax, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
je 0x42f72
movl -0x24(%rbp), %esi
leaq 0x997d4(%rip), %rdi     # 0xdc73f
movb $0x0, %al
callq 0x35d40
movq -0x18(%rbp), %rdi
callq 0x62c0
cmpq $0xe, %rax
jae 0x42f93
movq -0x18(%rbp), %rsi
leaq 0x997dd(%rip), %rdi     # 0xdc769
movb $0x0, %al
callq 0x35d40
movq 0x99a16(%rip), %rax     # 0xdc9b0
movq %rax, -0x40(%rbp)
movq 0x99a13(%rip), %rax     # 0xdc9b8
movq %rax, -0x38(%rbp)
movl 0x99a11(%rip), %eax     # 0xdc9c0
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x2d, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x2d, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x20, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x3a, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x3a, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x50(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb $0x0, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x99585(%rip), %rsi     # 0xdc79a
leaq -0x88(%rbp), %rdx
callq 0x60f0
cmpq $0x0, %rax
jne 0x43239
leaq -0x40(%rbp), %rsi
leaq 0x9957a(%rip), %rdi     # 0xdc7ac
movb $0x0, %al
callq 0x35d40
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
leaq -0x88(%rbp), %rdi
callq 0x6480
movq %rax, -0x90(%rbp)
cmpq $-0x1, -0x90(%rbp)
jne 0x4326f
movq -0x18(%rbp), %rsi
leaq 0x99565(%rip), %rdi     # 0xdc7cd
movb $0x0, %al
callq 0x35d40
movq -0x90(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop