// File: ncbi[P]amr/seq.cpp
// Function: Seq_sp::Seq::getGi() const
long /*CSeq_id::TGi*/ Seq::getGi () const
{
	const char* prefix = "gi|";
	size_t start = name. find (prefix, 0);
	size_t end;
	if (start == string::npos)
	{
		start = 0;
		end = name. find (' ');
	}
	else
	{
		ASSERT (start < getIdSize ());
		start += strlen (prefix);
	  end = name. find ('|', start);
	  ASSERT (end != string::npos);
  }
  if (end == string::npos)
  	end = name. size ();
  return str2<long> (name. substr (start, end - start));
}

// Assembly:
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, 0x2b0(%rsp)
movq 0x2b0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
leaq 0x3dbc6(%rip), %rax     # 0xe85c9
movq %rax, 0x2a8(%rsp)
addq $0x8, %rdi
movq 0x2a8(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xdeb0
movq %rax, 0x2a0(%rsp)
cmpq $-0x1, 0x2a0(%rsp)
jne 0xaaa63
movq 0x40(%rsp), %rdi
movq $0x0, 0x2a0(%rsp)
addq $0x8, %rdi
movl $0x20, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xd9b0
movq %rax, 0x298(%rsp)
jmp 0xaaff1
callq 0xd0a0
movq 0x40(%rsp), %rdi
movl $0x0, (%rax)
movq 0x2a0(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x15140
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jb 0xaad1d
callq 0xd8c0
cmpl $0x0, %eax
jne 0xaad13
leaq 0x1f7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xdd50
movq 0x30(%rsp), %rdx
leaq 0x3d984(%rip), %rsi     # 0xe8446
leaq 0x1f8(%rsp), %rdi
callq 0xfae0
jmp 0xaaad1
leaq 0x1c0(%rsp), %rdi
movl $0x111, %esi            # imm = 0x111
callq 0x11600
jmp 0xaaae5
leaq 0x218(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
callq 0x11510
jmp 0xaab04
leaq 0x386c6(%rip), %rdx     # 0xe31d1
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x114c0
jmp 0xaab22
leaq 0x17f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xdd50
movq 0x28(%rsp), %rdx
leaq 0x3da8d(%rip), %rsi     # 0xe85cd
leaq 0x180(%rsp), %rdi
callq 0xfae0
jmp 0xaab4f
leaq 0x38e4e(%rip), %rdx     # 0xe39a4
leaq 0x1a0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x114c0
jmp 0xaab6d
leaq 0x258(%rsp), %rdi
leaq 0x238(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
callq 0x11510
jmp 0xaab8c
leaq 0x3da5a(%rip), %rdx     # 0xe85ed
leaq 0x278(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x114c0
jmp 0xaabaa
leaq 0x278(%rsp), %rdi
callq 0x173d0
jmp 0xaabb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaad01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaacf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaace7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaacda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaacc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaacb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaaca6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaac99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x278(%rsp), %rdi
callq 0xdf08
leaq 0x258(%rsp), %rdi
callq 0xdf08
leaq 0x1a0(%rsp), %rdi
callq 0xdf08
leaq 0x180(%rsp), %rdi
callq 0xdf08
leaq 0x17f(%rsp), %rdi
callq 0xd7a0
leaq 0x238(%rsp), %rdi
callq 0xdf08
leaq 0x218(%rsp), %rdi
callq 0xdf08
leaq 0x1c0(%rsp), %rdi
callq 0xdf08
leaq 0x1f8(%rsp), %rdi
callq 0xdf08
leaq 0x1f7(%rsp), %rdi
callq 0xd7a0
jmp 0xab083
movl $0x1, %edi
callq 0xd8e0
movq 0x2a8(%rsp), %rdi
callq 0xd340
movq 0x40(%rsp), %rdi
addq 0x2a0(%rsp), %rax
movq %rax, 0x2a0(%rsp)
addq $0x8, %rdi
movq 0x2a0(%rsp), %rdx
movl $0x7c, %esi
callq 0xd9b0
movq %rax, 0x298(%rsp)
callq 0xd0a0
movl $0x0, (%rax)
cmpq $-0x1, 0x298(%rsp)
jne 0xaafef
callq 0xd8c0
cmpl $0x0, %eax
jne 0xaafe5
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xdd50
movq 0x20(%rsp), %rdx
leaq 0x3d6a3(%rip), %rsi     # 0xe8446
leaq 0xd8(%rsp), %rdi
callq 0xfae0
jmp 0xaadb2
leaq 0xb0(%rsp), %rdi
movl $0x114, %esi            # imm = 0x114
callq 0x11600
jmp 0xaadc6
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x11510
jmp 0xaade5
leaq 0x383e5(%rip), %rdx     # 0xe31d1
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x114c0
jmp 0xaae03
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xdd50
movq 0x18(%rsp), %rdx
leaq 0x3d7af(%rip), %rsi     # 0xe85cd
leaq 0x70(%rsp), %rdi
callq 0xfae0
jmp 0xaae2a
leaq 0x38b73(%rip), %rdx     # 0xe39a4
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x114c0
jmp 0xaae45
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x11510
jmp 0xaae64
leaq 0x3d797(%rip), %rdx     # 0xe8602
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x114c0
jmp 0xaae82
leaq 0x158(%rsp), %rdi
callq 0x173d0
jmp 0xaae91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaafd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaafc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaafb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaafac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaaf95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaaf8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaaf7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xaaf71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x158(%rsp), %rdi
callq 0xdf08
leaq 0x138(%rsp), %rdi
callq 0xdf08
leaq 0x90(%rsp), %rdi
callq 0xdf08
leaq 0x70(%rsp), %rdi
callq 0xdf08
leaq 0x6f(%rsp), %rdi
callq 0xd7a0
leaq 0x118(%rsp), %rdi
callq 0xdf08
leaq 0xf8(%rsp), %rdi
callq 0xdf08
leaq 0xb0(%rsp), %rdi
callq 0xdf08
leaq 0xd8(%rsp), %rdi
callq 0xdf08
leaq 0xd7(%rsp), %rdi
callq 0xd7a0
jmp 0xab083
movl $0x1, %edi
callq 0xd8e0
jmp 0xaaff1
cmpq $-0x1, 0x298(%rsp)
jne 0xab012
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xd520
movq %rax, 0x298(%rsp)
movq 0x40(%rsp), %rsi
addq $0x8, %rsi
movq 0x2a0(%rsp), %rdx
movq 0x298(%rsp), %rcx
subq %rdx, %rcx
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd740
movq 0x8(%rsp), %rdi
callq 0xd7af0
movq %rax, 0x10(%rsp)
jmp 0xab04e
leaq 0x48(%rsp), %rdi
callq 0xdf08
movq 0x10(%rsp), %rax
addq $0x2b8, %rsp            # imm = 0x2B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xdf08
movq 0x1e8(%rsp), %rdi
callq 0xdd40