// File: pfnet-research[P]pml/./include/utility.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> format<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline static std::string format(std::string const& text, Head const& head, Tail const& ... tail) {
    auto pos = text.find("{}");
    if (pos == std::string::npos)
        throw std::logic_error{"too few arguments"};
    std::string rest = text.substr(pos+2, text.length());
    std::stringstream ss;
    ss << head;
    return text.substr(0, pos) + ss.str() + format(rest, tail ...);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x268(%rbp)
movq %rdi, %rax
movq %rax, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x845a6(%rip), %rsi     # 0xa2049
xorl %eax, %eax
movl %eax, %edx
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x1db13
movl $0x10, %edi
callq 0xa1d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x270(%rbp)
leaq 0x7de8d(%rip), %rsi     # 0x9b962
callq 0xa540
jmp 0x1dadc
movq -0x270(%rbp), %rdi
movq 0xc94e6(%rip), %rsi     # 0xe6fd0
movq 0xc949f(%rip), %rdx     # 0xe6f90
callq 0xa610
movq -0x270(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xa2c0
jmp 0x1dcd4
movq -0x10(%rbp), %rdi
movq %rdi, -0x280(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x278(%rbp)
callq 0xa5a0
movq -0x280(%rbp), %rsi
movq -0x278(%rbp), %rdx
movq %rax, %rcx
leaq -0x50(%rbp), %rdi
callq 0xa3f0
leaq -0x1d8(%rbp), %rdi
callq 0xa290
jmp 0x1db5a
leaq -0x1c8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa340
jmp 0x1db6c
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x218(%rbp), %rdi
callq 0xa3f0
jmp 0x1db86
leaq -0x238(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xa3a0
jmp 0x1db9b
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0x1de10
jmp 0x1dbb7
leaq -0x258(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1dce0
jmp 0x1dbc9
movq -0x268(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
leaq -0x258(%rbp), %rdx
callq 0x1de10
jmp 0x1dbe5
leaq -0x258(%rbp), %rdi
callq 0xa240
leaq -0x1f8(%rbp), %rdi
callq 0xa240
leaq -0x238(%rbp), %rdi
callq 0xa240
leaq -0x218(%rbp), %rdi
callq 0xa240
leaq -0x1d8(%rbp), %rdi
callq 0xa2d0
leaq -0x50(%rbp), %rdi
callq 0xa240
movq -0x260(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1dccb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1dcbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1dcb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1dca7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1dc9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x258(%rbp), %rdi
callq 0xa240
leaq -0x1f8(%rbp), %rdi
callq 0xa240
leaq -0x238(%rbp), %rdi
callq 0xa240
leaq -0x218(%rbp), %rdi
callq 0xa240
leaq -0x1d8(%rbp), %rdi
callq 0xa2d0
leaq -0x50(%rbp), %rdi
callq 0xa240
movq -0x28(%rbp), %rdi
callq 0xa650
nopl (%rax)