// File: /workspace/github_cpp_makefile_star2_O2/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 $0x138, %rsp            # imm = 0x138
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rdx, 0x8(%rsi)
jae 0x2393d
movl %ecx, %ebp
movq %rbx, 0x10(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movsbl %r8b, %ebx
leaq 0x18(%rsp), %r12
movq 0x20(%rsp), %r15
movq 0x8(%r14), %rax
addq %r15, %rax
cmpq %r13, %rax
jae 0x23952
movq %r12, %rdi
movl %ebx, %esi
callq 0xb4e0
jmp 0x23920
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xb5e0
jmp 0x23ae8
cmpl $0x2, %ebp
je 0x23a68
cmpl $0x1, %ebp
je 0x23a4e
movq %r14, %rsi
testl %ebp, %ebp
movq 0x10(%rsp), %rbx
je 0x23a5b
callq 0xb6c0
testl %eax, %eax
jne 0x23afd
leaq 0x37fb9(%rip), %rsi     # 0x5b941
leaq 0xf8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1b7b6
leaq 0xd8(%rsp), %rdi
movl $0x2a7, %esi            # imm = 0x2A7
callq 0x1caa3
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x1ca3c
leaq 0x36213(%rip), %rdx     # 0x59be3
leaq 0x38(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x1b92d
leaq 0x3809b(%rip), %rsi     # 0x5ba84
leaq 0x98(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1b7b6
leaq 0x37f3c(%rip), %rdx     # 0x5b93e
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1b92d
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x1ca3c
leaq 0x3808a(%rip), %rdx     # 0x5babf
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1b92d
leaq 0x78(%rsp), %rdi
callq 0x224fc
leaq 0x18(%rsp), %rsi
movq %r14, %r12
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1dbc3
jmp 0x23ade
shrq %r15
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xb5e0
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %r14, %rdx
callq 0x1cbaf
leaq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
subq %r15, %rcx
leaq 0x38(%rsp), %rdi
xorl %edx, %edx
callq 0xb5e0
leaq 0x78(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1ca3c
leaq 0x38(%rsp), %rdi
callq 0xbb68
leaq 0x78(%rsp), %rdi
callq 0xbb68
leaq 0x58(%rsp), %rdi
callq 0xbb68
leaq 0x18(%rsp), %rdi
callq 0xbb68
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0xb6d0
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xbb68
jmp 0x23b17
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xbb68
jmp 0x23b26
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xbb68
jmp 0x23b38
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xbb68
jmp 0x23b4a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xbb68
jmp 0x23b59
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0xbb68
jmp 0x23b6b
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xbb68
jmp 0x23b7d
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x23baf
jmp 0x23bba
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xbb68
jmp 0x23b9b
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xbb68
jmp 0x23baa
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xbb68
jmp 0x23bbd
jmp 0x23bba
jmp 0x23bba
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xbb68
movq %rbx, %rdi
callq 0xba30