// File: 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:
subq $0x208, %rsp            # imm = 0x208
movq %rdi, 0x30(%rsp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, 0x38(%rsp)
movq %rdi, 0x200(%rsp)
movq %rsi, 0x1f8(%rsp)
movq %rdx, 0x1f0(%rsp)
movl %ecx, 0x1ec(%rsp)
movb %al, 0x1eb(%rsp)
movq 0x1f8(%rsp), %rdi
callq 0xc530
cmpq 0x1f0(%rsp), %rax
jb 0x40e07
movq 0x30(%rsp), %rdi
movq 0x1f8(%rsp), %rsi
movq 0x1f0(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0xc740
jmp 0x412d7
leaq 0x1c8(%rsp), %rdi
callq 0xca10
leaq 0x1c8(%rsp), %rdi
callq 0xc530
movq %rax, 0x28(%rsp)
movq 0x1f8(%rsp), %rdi
callq 0xc530
movq %rax, %rcx
movq 0x28(%rsp), %rax
addq %rcx, %rax
cmpq 0x1f0(%rsp), %rax
jae 0x40e7a
movsbl 0x1eb(%rsp), %esi
leaq 0x1c8(%rsp), %rdi
callq 0xc4c0
jmp 0x40e5f
jmp 0x40e14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x412c8
movl 0x1ec(%rsp), %eax
movl %eax, 0x24(%rsp)
testl %eax, %eax
je 0x40ea4
jmp 0x40e8b
movl 0x24(%rsp), %eax
subl $0x1, %eax
je 0x40ed0
jmp 0x40e96
movl 0x24(%rsp), %eax
subl $0x2, %eax
je 0x40efc
jmp 0x4104f
movq 0x30(%rsp), %rdi
movq 0x1f8(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x30680
jmp 0x40ec0
movl $0x1, 0x1b8(%rsp)
jmp 0x412b9
movq 0x30(%rsp), %rdi
movq 0x1f8(%rsp), %rdx
leaq 0x1c8(%rsp), %rsi
callq 0x30680
jmp 0x40eec
movl $0x1, 0x1b8(%rsp)
jmp 0x412b9
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xc530
movq 0x18(%rsp), %rsi
shrq %rax
movq %rax, 0x1b0(%rsp)
movq 0x1b0(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x170(%rsp), %rdi
callq 0xc740
jmp 0x40f39
movq 0x1f8(%rsp), %rdx
leaq 0x190(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x2e220
jmp 0x40f58
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xc530
movq 0x10(%rsp), %rsi
movq %rax, %rcx
movq 0x1b0(%rsp), %rax
subq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x150(%rsp), %rdi
callq 0xc740
jmp 0x40f90
movq 0x30(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0x150(%rsp), %rdx
callq 0x2dde0
jmp 0x40fac
leaq 0x150(%rsp), %rdi
callq 0xce98
leaq 0x190(%rsp), %rdi
callq 0xce98
leaq 0x170(%rsp), %rdi
callq 0xce98
movl $0x1, 0x1b8(%rsp)
jmp 0x412b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4103d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41030
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x150(%rsp), %rdi
callq 0xce98
leaq 0x190(%rsp), %rdi
callq 0xce98
leaq 0x170(%rsp), %rdi
callq 0xce98
jmp 0x412c8
callq 0xc8c0
cmpl $0x0, %eax
jne 0x412af
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xcd00
movq 0x8(%rsp), %rdx
leaq 0x8c99e(%rip), %rsi     # 0xcda19
leaq 0xb0(%rsp), %rdi
callq 0x29fd0
jmp 0x4108a
leaq 0x88(%rsp), %rdi
movl $0x2a7, %esi            # imm = 0x2A7
callq 0x2ded0
jmp 0x4109e
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x2dde0
jmp 0x410bd
leaq 0x8aadd(%rip), %rdx     # 0xcbba1
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x2a2f0
jmp 0x410db
leaq 0x47(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xcd00
movq (%rsp), %rdx
leaq 0x8ca68(%rip), %rsi     # 0xcdb5c
leaq 0x48(%rsp), %rdi
callq 0x29fd0
jmp 0x41100
leaq 0x8c90f(%rip), %rdx     # 0xcda16
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2a2f0
jmp 0x41118
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x2dde0
jmp 0x41134
leaq 0x8ca5c(%rip), %rdx     # 0xcdb97
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x2a2f0
jmp 0x41152
leaq 0x130(%rsp), %rdi
callq 0x3e9b0
jmp 0x41161
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x412a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41286
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41279
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41262
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41258
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x4124e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x41241
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x130(%rsp), %rdi
callq 0xce98
leaq 0x110(%rsp), %rdi
callq 0xce98
leaq 0x68(%rsp), %rdi
callq 0xce98
leaq 0x48(%rsp), %rdi
callq 0xce98
leaq 0x47(%rsp), %rdi
callq 0xc7a0
leaq 0xf0(%rsp), %rdi
callq 0xce98
leaq 0xd0(%rsp), %rdi
callq 0xce98
leaq 0x88(%rsp), %rdi
callq 0xce98
leaq 0xb0(%rsp), %rdi
callq 0xce98
leaq 0xaf(%rsp), %rdi
callq 0xc7a0
jmp 0x412c8
movl $0x1, %edi
callq 0xc8d0
leaq 0x1c8(%rsp), %rdi
callq 0xce98
jmp 0x412d7
leaq 0x1c8(%rsp), %rdi
callq 0xce98
jmp 0x412e4
movq 0x38(%rsp), %rax
addq $0x208, %rsp            # imm = 0x208
retq
movq 0x1c0(%rsp), %rdi
callq 0xccf0
nopw %cs:(%rax,%rax)