// File: imrosan[P]sql-format/./sql_format/sf_formatter.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> SqlFormat::Formatter::format<DefaultEscapeHandler>(DefaultEscapeHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string format(EscapeHandler& escapeHandler, const std::string& sql)
    {
        static const std::string placeholder = "?";

        std::string result = sql;
        size_t pos = 0;

        for (size_t i = 0; i < dataList_.size(); ++i)
        {
            Detail::DataBase* d = dataList_[i]; 

            size_t p = result.find(placeholder, pos);
            if (p == std::string::npos)
                throw PlaceholderException();

            std::string formatted = d->format(escapeHandler);
            result.replace(p, placeholder.size(), formatted); 

            pos = p + formatted.size();
        }

        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpb $0x0, 0x8fdd(%rip)      # 0xc1c8
jne 0x3259
leaq 0x8fd4(%rip), %rdi      # 0xc1c8
callq 0x2250
cmpl $0x0, %eax
je 0x3259
leaq -0x21(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x2240
movq -0x98(%rbp), %rdx
leaq 0x8f8c(%rip), %rdi      # 0xc1a8
leaq 0x3e4e(%rip), %rsi      # 0x7071
callq 0x21c0
jmp 0x322a
leaq -0x21(%rbp), %rdi
callq 0x2190
movq 0x8d86(%rip), %rdi      # 0xbfc0
leaq 0x8f67(%rip), %rsi      # 0xc1a8
leaq 0x8f08(%rip), %rdx      # 0xc150
callq 0x2120
leaq 0x8f74(%rip), %rdi      # 0xc1c8
callq 0x20e0
movq -0x90(%rbp), %rdi
movb $0x0, -0x35(%rbp)
movq -0x20(%rbp), %rsi
callq 0x2090
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x80(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0x4250
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x340e
movq -0x80(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x6760
movq -0x90(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdx
leaq 0x8ede(%rip), %rsi      # 0xc1a8
callq 0x2280
movq %rax, -0x58(%rbp)
cmpq $-0x1, -0x58(%rbp)
jne 0x336f
movl $0x8, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
callq 0x6780
jmp 0x32fc
movq -0xa8(%rbp), %rdi
leaq 0x8a2e(%rip), %rsi      # 0xbd38
leaq 0x34af(%rip), %rdx      # 0x67c0
callq 0x2210
jmp 0x3449
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x2190
leaq 0x8e91(%rip), %rdi      # 0xc1c8
callq 0x20d0
jmp 0x3440
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x2100
jmp 0x3434
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3434
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
callq *%rax
jmp 0x3385
movq -0x58(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0x8e11(%rip), %rdi      # 0xc1a8
callq 0x20f0
movq -0x90(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
leaq -0x78(%rbp), %rcx
callq 0x2070
jmp 0x33b8
movq -0x58(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x20f0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x40(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2298
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x327d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2298
jmp 0x3434
movb $0x1, -0x35(%rbp)
testb $0x1, -0x35(%rbp)
jne 0x3424
movq -0x90(%rbp), %rdi
callq 0x2298
movq -0x88(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x2298
movq -0x30(%rbp), %rdi
callq 0x2230
nopl (%rax)