// File: /workspace/github_cpp_makefile_star2_O3/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 0x37864
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 0x37879
movq %r12, %rdi
movl %ebx, %esi
callq 0xa4d0
jmp 0x37847
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xa5d0
jmp 0x37ae6
cmpl $0x2, %ebp
je 0x37957
cmpl $0x1, %ebp
je 0x3793a
movq %r15, %rsi
testl %ebp, %ebp
movq 0x40(%rsp), %rbx
je 0x37947
callq 0xa6b0
testl %eax, %eax
jne 0x37afb
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5507b(%rip), %rsi     # 0x8c936
leaq 0x55087(%rip), %rdx     # 0x8c949
leaq 0xc8(%rsp), %rdi
callq 0x2fa1a
leaq 0xe8(%rsp), %rdi
movl $0x2a7, %esi            # imm = 0x2A7
callq 0x2d1fa
leaq 0x108(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x2d152
leaq 0x532e0(%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 0x37b05
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x37b12
leaq 0x48(%rsp), %rsi
movq %r15, %r12
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x2ead3
jmp 0x37aca
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 0x379a5
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x379ac
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, %edi
cmpq %r15, %rcx
movq 0x40(%rsp), %rbx
je 0x37a02
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x37a25
leaq 0x30(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x37a20
movq 0x30(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x37a2f
movq %rsp, %rdi
callq 0xa190
jmp 0x37a3d
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 0x37a5c
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x37a62
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 0x37a99
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x37aaf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37aca
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x37ae6
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 0x54f3b(%rip), %rsi     # 0x8ca79
leaq 0x54f6e(%rip), %rdx     # 0x8cab3
leaq 0xa8(%rsp), %rdi
callq 0x2fa1a
leaq 0x54dda(%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 0x37b8b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x37b9e
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 0x2d152
leaq 0x54ee1(%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 0x37bfe
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x37c0a
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 0x34fa2
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x37c47
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37c47
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37c67
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37c67
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x37c89
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37c89
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x37cab
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37cab
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x37cc7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37cc7
movq %rax, %rbx
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37ced
movq 0x118(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37ced
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37d13
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37d13
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x37d8e
movq 0xd8(%rsp), %rsi
jmp 0x37d7d
jmp 0x37d8b
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37d4f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37d4f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x37d6a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37d6a
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37d8e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x37d8e
jmp 0x37d8b
jmp 0x37d8b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x37daa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10