// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/amrfinder_update.cpp
// Function: (anonymous namespace)::getLatestDataVersion(CURL_sp::Curl&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string getLatestDataVersion (Curl &curl,
                             const string &minor)
// Return: empty() <=> failure
{
  StringVector dir (curl. read (URL + minor + "/"), '\n', true);
  if (verbose ())
  {
    save (cout, dir, '\n');
    cout << endl;
  }
    
  Vector<DataVersion> dataVersions;  
  for (string& line : dir)
  #if HTTPS
    if (isLeft (line, "<a href="))
      try
      {
        const size_t pos1 = line. find ('>');
        QC_ASSERT (pos1 != string::npos);
        line. erase (0, pos1 + 1);

        const size_t pos2 = line. find ("/<");
        QC_ASSERT (pos2 != string::npos);
        line. erase (pos2);
        
    	  istringstream iss (line);
  		  DataVersion dv (iss);
  		  dataVersions << std::move (dv);
    	}
  		catch (...) {}
  #else
    if (! contains (line, " -> "))
    {
      trimTrailing (line);
      const size_t pos = line. rfind (' ');
      if (pos != string::npos)
      {
    	  istringstream iss (line. substr (pos + 1));
    	  try 
    	  {
    		  DataVersion dv (iss);
    		  dataVersions << std::move (dv);
    		}
  		  catch (...) {}    		
      }
    }
  #endif
  if (dataVersions. empty ())
    return noString;
    
  dataVersions. sort ();
  return dataVersions. back (). str ();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
leaq 0x31cd2(%rip), %rsi     # 0x3f2da
leaq 0x118(%rsp), %r14
movq %r14, %rdi
callq 0xece3
leaq 0x3615e(%rip), %rdx     # 0x4377d
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xeafc
leaq 0x138(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x3deac
leaq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
pushq $0xa
popq %rdx
pushq $0x1
popq %rcx
callq 0x19b1a
movq 0x8(%rsp), %r14
leaq 0x138(%rsp), %rdi
callq 0xab20
leaq 0x10(%rsp), %rdi
callq 0xab20
leaq 0x118(%rsp), %rdi
callq 0xab20
xorl %edi, %edi
callq 0x17f03
testb %al, %al
je 0xd6b3
movq 0x508c1(%rip), %rdi     # 0x5df58
leaq 0xf8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0xf75f
movq 0x508aa(%rip), %rdi     # 0x5df58
callq 0xa950
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movups %xmm0, 0x9(%rax)
movaps %xmm0, (%rax)
movq 0xf8(%rsp), %r15
movq 0x100(%rsp), %r12
leaq 0x138(%rsp), %r13
leaq 0x118(%rsp), %rbp
cmpq %r12, %r15
je 0xda07
movq %r13, %rdi
leaq 0x320fb(%rip), %rsi     # 0x3f7f0
movq %rbp, %rdx
callq 0xe1e4
movq %r15, %rdi
movq %r13, %rsi
callq 0xf1a8
movl %eax, %ebx
movq %r13, %rdi
callq 0xab20
testb %bl, %bl
je 0xd7aa
movq %r15, %rdi
pushq $0x3e
popq %rsi
xorl %edx, %edx
callq 0xa9f0
movq %rax, %r14
callq 0xa970
andl $0x0, (%rax)
cmpq $-0x1, %r14
je 0xd7b3
movq %rax, %rbx
incq %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xa680
movq %r15, %rdi
leaq 0x320ee(%rip), %rsi     # 0x3f843
xorl %edx, %edx
callq 0xa030
andl $0x0, (%rbx)
cmpq $-0x1, %rax
movq 0x8(%rsp), %r14
je 0xd87e
movq %r15, %rdi
movq %rax, %rsi
pushq $-0x1
popq %rdx
callq 0xa680
movq %r13, %rdi
movq %r15, %rsi
pushq $0x8
popq %rdx
callq 0xa3e0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x22996
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x10206
movq %r13, %rdi
callq 0xa4e0
addq $0x20, %r15
jmp 0xd6e2
callq 0xa770
testl %eax, %eax
jne 0xda6b
leaq 0x98(%rsp), %rdi
leaq 0x31cca(%rip), %rsi     # 0x3f499
leaq 0x7(%rsp), %rdx
callq 0xe1e4
leaq 0x78(%rsp), %rdi
movl $0x92, %esi
callq 0xee49
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xea95
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x31c9e(%rip), %rdx     # 0x3f4b7
callq 0xeafc
leaq 0x38(%rsp), %rdi
leaq 0x3204b(%rip), %rsi     # 0x3f875
leaq 0x6(%rsp), %rdx
callq 0xe1e4
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x32727(%rip), %rdx     # 0x3ff6c
callq 0xeafc
movq %rbp, %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0xea95
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x31fc2(%rip), %rdx     # 0x3f82e
callq 0xeafc
movq %r13, %rdi
callq 0x1235c
jmp 0xda73
callq 0xa770
testl %eax, %eax
jne 0xda6b
leaq 0x98(%rsp), %rdi
leaq 0x31bff(%rip), %rsi     # 0x3f499
leaq 0x7(%rsp), %rdx
callq 0xe1e4
leaq 0x78(%rsp), %rdi
movl $0x96, %esi
callq 0xee49
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xea95
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x31bd3(%rip), %rdx     # 0x3f4b7
callq 0xeafc
leaq 0x38(%rsp), %rdi
leaq 0x31f80(%rip), %rsi     # 0x3f875
leaq 0x6(%rsp), %rdx
callq 0xe1e4
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x3265c(%rip), %rdx     # 0x3ff6c
callq 0xeafc
movq %rbp, %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0xea95
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x31f0f(%rip), %rdx     # 0x3f846
callq 0xeafc
movq %r13, %rdi
callq 0x1235c
jmp 0xda73
jmp 0xd94d
jmp 0xd95a
movq %rax, %rbx
movq %r13, %rdi
callq 0xab20
jmp 0xd95d
movq %rax, %rbx
movq %rbp, %rdi
callq 0xab20
jmp 0xd96c
jmp 0xd969
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xab20
jmp 0xd97d
jmp 0xd97a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xab20
jmp 0xd98e
jmp 0xd98b
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xab20
jmp 0xd9a2
jmp 0xd99f
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xab20
jmp 0xd9b6
jmp 0xd9b3
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xab20
jmp 0xd9c7
jmp 0xd9c4
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xab20
jmp 0xd9f0
jmp 0xd9ed
jmp 0xd9ed
jmp 0xd9dc
movq %rax, %rbx
movq %r13, %rdi
callq 0xa4e0
jmp 0xd9f0
jmp 0xd9ed
jmp 0xd9ed
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa070
callq 0xa730
movq 0x8(%rsp), %r14
jmp 0xd7aa
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0xda30
leaq 0x10(%rsp), %rdi
callq 0x10230
movq 0x18(%rsp), %rsi
addq $-0x18, %rsi
movq %r14, %rdi
callq 0x10246
jmp 0xda3f
leaq 0x51021(%rip), %rsi     # 0x5ea58
movq %r14, %rdi
callq 0xa4d0
leaq 0x10(%rsp), %rdi
callq 0x102ae
leaq 0xf8(%rsp), %rdi
callq 0xf0fc
movq %r14, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0xa620
jmp 0xdaaf
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0xab20
jmp 0xda8a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xab20
jmp 0xda99
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0xab20
jmp 0xdadb
jmp 0xdaaf
movq %rax, %rbx
jmp 0xdace
movq %rax, %rbx
jmp 0xdac4
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0xab20
leaq 0x10(%rsp), %rdi
callq 0x102ae
leaq 0xf8(%rsp), %rdi
callq 0xf0fc
movq %rbx, %rdi
callq 0xa5d0
nop