// File: /workspace/github_cpp_makefile_star2_O2/nilnilnil[P]autocomplete/src/main.cpp
// Function: rich_suggestions_json_array[abi:cxx11](std::vector<phrase_t, std::allocator<phrase_t>>&)
std::string
rich_suggestions_json_array(vp_t& suggestions) {
    std::string ret = "[";
    ret.reserve(OUTPUT_SIZE_RESERVE);
    for (vp_t::iterator i = suggestions.begin(); i != suggestions.end(); ++i) {
        escape_special_chars(i->phrase);
        std::string snippet = i->snippet;
        escape_special_chars(snippet);

        std::string trailer = i + 1 == suggestions.end() ? "\n" : ",\n";
        ret += " { \"phrase\": \"" + i->phrase + "\", \"score\": " + uint_to_string(i->weight) + 
            (snippet.empty() ? "" : ", \"snippet\": \"" + snippet + "\"") + "}" + trailer;
    }
    ret += "]";
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xa977(%rip), %rsi      # 0x12290
leaq 0x28(%rsp), %rdx
callq 0x97ec
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
callq 0x5830
movq %r15, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
movq (%rbx), %r15
leaq 0x128(%rsp), %r13
leaq 0x148(%rsp), %rbx
movq 0x20(%rsp), %rax
cmpq 0x8(%rax), %r15
je 0x7b46
addq $0x8, %r15
movq %r15, %rdi
callq 0x781c
addq $0x20, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x9932
movq %r12, %rdi
callq 0x781c
addq $0x10, %r15
movq 0x20(%rsp), %rax
cmpq 0x8(%rax), %r15
leaq 0xa8fa(%rip), %rsi      # 0x12292
leaq 0xb89f(%rip), %rax      # 0x1323e
cmoveq %rax, %rsi
leaq 0x88(%rsp), %rdi
leaq 0x108(%rsp), %rdx
callq 0x97ec
addq $-0x30, %r15
movq %r13, %rdi
leaq 0xa8cf(%rip), %rsi      # 0x12295
movq %r15, %rdx
callq 0x99f9
movq %rbx, %rdi
movq %r13, %rsi
leaq 0xa8c9(%rip), %rdx      # 0x122a4
callq 0x9973
movl -0x8(%r15), %esi
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x9a6f
leaq 0x68(%rsp), %rdi
movq %rbx, %r12
movq %rbx, %rsi
movq %r14, %rdx
callq 0x9992
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x7a4d
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa887(%rip), %rsi      # 0x122b1
leaq 0x28(%rsp), %rdx
callq 0x99f9
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xa85c(%rip), %rdx      # 0x122a2
callq 0x9973
jmp 0x7a66
leaq 0x48(%rsp), %r14
movq %r14, %rdi
leaq 0xb7e3(%rip), %rsi      # 0x1323f
leaq 0x17(%rsp), %rdx
callq 0x97ec
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
callq 0x9992
leaq 0x168(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0xa82d(%rip), %rdx      # 0x122c0
callq 0x9973
leaq 0x108(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x88(%rsp), %rdx
callq 0x9954
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x59d0
movq %r14, %rdi
callq 0x5210
movq %rbp, %rdi
callq 0x5210
leaq 0xe8(%rsp), %rdi
callq 0x5210
leaq 0x48(%rsp), %rdi
callq 0x5210
cmpq $0x0, 0x18(%rsp)
je 0x7afc
leaq 0xa8(%rsp), %rdi
callq 0x5210
movq %r12, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5210
leaq 0xc8(%rsp), %rdi
callq 0x5210
movq %r12, %rdi
callq 0x5210
movq %r13, %rdi
callq 0x5210
leaq 0x88(%rsp), %rdi
callq 0x5210
leaq 0x28(%rsp), %rdi
callq 0x5210
addq $0x30, %r15
jmp 0x794d
leaq 0xa77e(%rip), %rsi      # 0x122cb
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x5990
movq %r15, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x7c46
jmp 0x7b79
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7bfe
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7bf1
movq %rax, %r14
jmp 0x7bda
jmp 0x7b99
movq %rax, %r14
jmp 0x7bcd
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c46
movq %rax, %r14
jmp 0x7bc0
jmp 0x7c56
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x5210
leaq 0x168(%rsp), %rdi
callq 0x5210
leaq 0xe8(%rsp), %rdi
callq 0x5210
leaq 0x48(%rsp), %rdi
callq 0x5210
cmpq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %r15
je 0x7bfe
leaq 0xa8(%rsp), %rdi
callq 0x5210
leaq 0x68(%rsp), %rdi
callq 0x5210
leaq 0xc8(%rsp), %rdi
callq 0x5210
leaq 0x148(%rsp), %rdi
callq 0x5210
leaq 0x128(%rsp), %rdi
callq 0x5210
leaq 0x88(%rsp), %rdi
callq 0x5210
leaq 0x28(%rsp), %rdi
callq 0x5210
movq %r15, %rdi
callq 0x5210
movq %r14, %rdi
callq 0x58e0
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c3c
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c2f
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c22
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c15
movq %rax, %r14
movq 0x8(%rsp), %r15
jmp 0x7c08