// File: /workspace/github_cpp_makefile_star2_O1/ncbi[P]amr/common.cpp
// Function: Common_sp::pad(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, Common_sp::ebool, char)
string pad (const string &s,
            size_t size,
            ebool right,
            char space)
{
  if (s. size () >= size)
    return s. substr (0, size);
  
  string sp;
  while (sp. size () + s. size () < size)
    sp += space;
    
  switch (right)
  {
    case efalse: return s + sp; 
    case etrue:  return sp + s; 
    case enull:  
      {
        const size_t half = sp. size () / 2;
        return sp. substr (0, half) + s + sp. substr (0, sp. size () - half);
      }
  }
  NEVER_CALL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, 0x8(%rsi)
jae 0x37ae3
movl %ecx, %ebp
movq %rbx, 0x40(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movsbl %r8b, %ebx
leaq 0x48(%rsp), %r12
movq 0x50(%rsp), %r14
movq 0x8(%r15), %rax
addq %r14, %rax
cmpq %r13, %rax
jae 0x37af8
movq %r12, %rdi
movl %ebx, %esi
callq 0xa4d0
jmp 0x37ac6
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xa5d0
jmp 0x37d66
cmpl $0x2, %ebp
je 0x37bd6
cmpl $0x1, %ebp
je 0x37bb9
movq %r15, %rsi
testl %ebp, %ebp
movq 0x40(%rsp), %rbx
je 0x37bc6
callq 0xa6b0
testl %eax, %eax
jne 0x37d7b
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x54dfc(%rip), %rsi     # 0x8c936
leaq 0x54e08(%rip), %rdx     # 0x8c949
leaq 0xc8(%rsp), %rdi
callq 0x2fdd8
leaq 0xe8(%rsp), %rdi
movl $0x2a7, %esi            # imm = 0x2A7
callq 0x2d60a
leaq 0x108(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x2d562
leaq 0x53061(%rip), %rsi     # 0x8abe5
leaq 0x108(%rsp), %rdi
callq 0xaac0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x37d85
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x37d92
leaq 0x48(%rsp), %rsi
movq %r15, %r12
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x2eeb8
jmp 0x37d4a
shrq %r14
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0xa5d0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x68(%rsp), %rdi
callq 0xa190
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x37c24
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x37c2b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rsi
movq 0x8(%rsi), %rcx
subq %r14, %rcx
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0xa5d0
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
movq 0x40(%rsp), %rbx
je 0x37c81
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x37ca0
leaq 0x30(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x37c9b
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x37caf
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0xa190
jmp 0x37cbd
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa620
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x37cdc
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x37ce2
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37d19
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x37d2f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37d4a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x37d66
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0xa6c0
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x54cbb(%rip), %rsi     # 0x8ca79
leaq 0x54cee(%rip), %rdx     # 0x8cab3
leaq 0xa8(%rsp), %rdi
callq 0x2fdd8
leaq 0x54b5a(%rip), %rsi     # 0x8c933
leaq 0xa8(%rsp), %rdi
callq 0xaac0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x37e0b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x37e1e
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rsi
leaq 0x88(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2d562
leaq 0x54c61(%rip), %rsi     # 0x8cab4
leaq 0x68(%rsp), %rdi
callq 0xaac0
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x37e7e
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x37e8a
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x3523b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x37ec7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37ec7
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37ee7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37ee7
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x37f09
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37f09
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x37f2b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37f2b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x37f47
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37f47
movq %rax, %rbx
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37f6d
movq 0x118(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37f6d
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37f93
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37f93
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3800e
movq 0xd8(%rsp), %rsi
jmp 0x37ffd
jmp 0x3800b
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37fcf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37fcf
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x37fea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37fea
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3800e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3800e
jmp 0x3800b
jmp 0x3800b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3802a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10