// File: /workspace/github_cpp_makefile_star2_O1/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 0xc555(%rip), %rsi      # 0x15948
movq %rcx, %rdi
callq 0x5140
testl %eax, %eax
je 0x940f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8803
jmp 0x95ef
movq %r15, %rdi
callq 0x86f1
leaq 0xbea4(%rip), %rsi      # 0x152c2
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xc25a
leaq 0xbe91(%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 0x9464
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x946b
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 0x9103
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x94b2
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x94d1
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x94cc
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x94e2
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x5160
jmp 0x94f0
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 0x9514
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x951a
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 0xbd8c(%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 0x956a
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x9570
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 0x95a2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95bd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x54c0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x95d4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x54c0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95ef
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 0x9624
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x9624
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9644
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x9644
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x9660
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x54c0
jmp 0x9660
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x967b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x54c0
movq %rbx, %rdi
callq 0x58e0