// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/common.cpp
// Function: Common_sp::getFileSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
streamsize getFileSize (const string &fName)
{
  ifstream f (fName, ifstream::binary);
  if (! f. good ())
    throw runtime_error ("Cannot open file " + shellQuote (fName) + " to get file size");

  const streampos start = f. tellg ();
  QC_ASSERT (start >= 0); 

  f. seekg (0, ios_base::end);
  if (! f. good ())
    throw runtime_error ("Cannot go to the beginning of the file " + shellQuote (fName));

  const streampos end = f. tellg ();
  QC_ASSERT (end >= 0); 

  if (end < start)
    throw runtime_error ("Bad file " + shellQuote (fName));    
  const streampos len = end - start;
  ASSERT (len >= 0);
  QC_ASSERT (len <= (streampos) numeric_limits<streamsize>::max());
  
  return (streamsize) len; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x370, %rsp            # imm = 0x370
movq %rdi, %rbx
leaq 0x168(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb930
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x188(%rsp,%rax)
jne 0x25207
leaq 0x168(%rsp), %rdi
callq 0xb9f0
movq %rax, %r14
callq 0xb060
andl $0x0, (%rax)
testq %r14, %r14
js 0x2528d
movq %rax, %r15
leaq 0x168(%rsp), %rdi
pushq $0x2
popq %rdx
xorl %esi, %esi
callq 0xb7a0
movq 0x168(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x188(%rsp,%rax)
jne 0x25361
leaq 0x168(%rsp), %rdi
callq 0xb9f0
movq %rax, %r12
andl $0x0, (%r15)
testq %rax, %rax
js 0x253d1
subq %r14, %r12
jb 0x254a5
js 0x25510
leaq 0x168(%rsp), %rdi
callq 0xb140
movq %r12, %rax
addq $0x370, %rsp            # imm = 0x370
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r14
leaq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0xb7b0
leaq 0x48(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x1c554
leaq 0x369f6(%rip), %rsi     # 0x5bc31
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1b94c
leaq 0x369f2(%rip), %rdx     # 0x5bc43
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x5ed6f(%rip), %rsi     # 0x83fe8
movq 0x5ece0(%rip), %rdx     # 0x83f60
movq %r14, %rdi
callq 0xb9d0
jmp 0x25510
callq 0xb6c0
testl %eax, %eax
jne 0x255e4
leaq 0x366a0(%rip), %rsi     # 0x5b941
leaq 0xc8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0xa8(%rsp), %rdi
movl $0x4cb, %esi            # imm = 0x4CB
callq 0x1caa3
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1ca3c
leaq 0x348fa(%rip), %rdx     # 0x59be3
leaq 0x48(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x36953(%rip), %rsi     # 0x5bc55
leaq 0x68(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x36626(%rip), %rdx     # 0x5b93e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1ca3c
leaq 0x3693f(%rip), %rdx     # 0x5bc87
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
leaq 0x28(%rsp), %rdi
callq 0x224fc
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r14
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0xb7b0
leaq 0x8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x1c554
leaq 0x368fd(%rip), %rsi     # 0x5bc92
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1b94c
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x5ec2b(%rip), %rsi     # 0x83fe8
movq 0x5eb9c(%rip), %rdx     # 0x83f60
movq %r14, %rdi
callq 0xb9d0
jmp 0x25510
callq 0xb6c0
testl %eax, %eax
jne 0x255e4
leaq 0x3655c(%rip), %rsi     # 0x5b941
leaq 0xc8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0xa8(%rsp), %rdi
movl $0x4d2, %esi            # imm = 0x4D2
callq 0x1caa3
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1ca3c
leaq 0x347b6(%rip), %rdx     # 0x59be3
leaq 0x48(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x3680f(%rip), %rsi     # 0x5bc55
leaq 0x68(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x364e2(%rip), %rdx     # 0x5b93e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1ca3c
leaq 0x3682e(%rip), %rdx     # 0x5bcba
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
leaq 0x28(%rsp), %rdi
callq 0x224fc
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r14
leaq 0x108(%rsp), %rdi
movq %rbx, %rsi
callq 0xb7b0
leaq 0x8(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x1c554
leaq 0x367ea(%rip), %rsi     # 0x5bcc3
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1b94c
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x5eae7(%rip), %rsi     # 0x83fe8
movq 0x5ea58(%rip), %rdx     # 0x83f60
movq %r14, %rdi
callq 0xb9d0
callq 0xb6c0
testl %eax, %eax
jne 0x255e4
leaq 0x3641d(%rip), %rsi     # 0x5b941
leaq 0xc8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0xa8(%rsp), %rdi
movl $0x4d7, %esi            # imm = 0x4D7
callq 0x1caa3
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1ca3c
leaq 0x34677(%rip), %rdx     # 0x59be3
leaq 0x48(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x366d0(%rip), %rsi     # 0x5bc55
leaq 0x68(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x363a3(%rip), %rdx     # 0x5b93e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1ca3c
leaq 0x36702(%rip), %rdx     # 0x5bccd
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
leaq 0x28(%rsp), %rdi
callq 0x224fc
pushq $0x1
popq %rdi
callq 0xb6d0
jmp 0x255f4
jmp 0x25603
jmp 0x255f4
jmp 0x25603
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x25606
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x25619
jmp 0x25616
jmp 0x25616
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xbb68
jmp 0x2562f
jmp 0x2562c
jmp 0x2562c
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xbb68
jmp 0x25642
jmp 0x2563f
jmp 0x2563f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xbb68
jmp 0x25655
jmp 0x25652
jmp 0x25652
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0xbb68
jmp 0x2566b
jmp 0x25668
jmp 0x25668
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xbb68
jmp 0x256e4
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x2568f
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x256f9
jmp 0x256e1
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x256b2
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x2570d
jmp 0x256e1
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x256d5
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x2571f
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xbb68
jmp 0x2575b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x48(%rsp), %rdi
callq 0xbb68
jmp 0x25731
jmp 0x25758
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x108(%rsp), %rdi
jmp 0x25739
jmp 0x25758
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x128(%rsp), %rdi
jmp 0x25739
jmp 0x25758
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x148(%rsp), %rdi
callq 0xbb68
testb %bpl, %bpl
jne 0x2574c
jmp 0x2575b
jmp 0x25749
jmp 0x25749
movq %rax, %rbx
movq %r14, %rdi
callq 0xb470
jmp 0x2575b
jmp 0x25758
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0xb140
movq %rbx, %rdi
callq 0xba30