// File: /workspace/github_cpp_makefile_star2_O3/nilnilnil[P]autocomplete/src/main.cpp
// Function: results_json(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<phrase_t, std::allocator<phrase_t>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string
results_json(std::string q, vp_t& suggestions, std::string const& type) {
    if (type == "list") {
        escape_special_chars(q);
        return "[ \"" + q + "\", " + suggestions_json_array(suggestions) + " ]";
    }
    else {
        return rich_suggestions_json_array(suggestions);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc568(%rip), %rsi      # 0x15948
movq %rcx, %rdi
callq 0x5140
testl %eax, %eax
je 0x93fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8835
jmp 0x95db
movq %r15, %rdi
callq 0x8723
leaq 0xbeb7(%rip), %rsi      # 0x152c2
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xc25d
leaq 0xbea4(%rip), %rsi      # 0x152c6
movq %r12, %rdi
callq 0x5990
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9451
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9458
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x90f0
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x949f
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x94c2
leaq 0x58(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x94bd
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x94ce
leaq 0x28(%rsp), %rdi
callq 0x5160
jmp 0x94dc
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5570
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9500
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9506
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xbda0(%rip), %rsi      # 0x152ca
leaq 0x8(%rsp), %rdi
callq 0x5990
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x9556
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x955c
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x958e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95a9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x54c0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x95c0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x54c0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95db
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x54c0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9610
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x9610
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9630
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x9630
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x964c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x964c
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9667
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x54c0
movq %rbx, %rdi
callq 0x58e0