// File: /workspace/github_cpp_makefile_star2_O2/SMT-COMP[P]scrambler/scrambler.cpp
// Function: parse_core(std::istream&, std::unordered_set<std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::string>>&)
bool parse_core(std::istream &src, StringSet &out)
{
    std::string name;
    src >> name;
    if (!src || name != "unsat") {
        return false;
    }
    // skip chars until a '(' is found
    char c;
    while (src.get(c) && c != '(') {
        if (!isspace(c)) {
            return false;
        }
    }
    if (!src) {
        return false;
    }
    bool done = false;
    while (src && !done) {
        src >> name;
        if (name.empty()) {
            return false;
        }
        if (name[name.size()-1] == ')') {
            name = name.substr(0, name.size()-1);
            done = true;
        }
        if (!name.empty()) {
            out.insert(name);
        }
    }

    std::vector<std::string> outnames(out.begin(), out.end());
    std::sort(outnames.begin(), outnames.end());

    std::cout << ";; parsed " << outnames.size() << " names:";
    for (size_t i = 0; i < outnames.size(); ++i) {
        std::cout << " " << outnames[i];
    }
    std::cout << std::endl;

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xe468(%rip), %rax      # 0x12f98
addq $0x18, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x30e0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x4ba8
leaq 0x684b(%rip), %rsi      # 0xb3a2
leaq 0x8(%rsp), %rdi
callq 0x5bba
testb %al, %al
jne 0x4ba8
leaq 0x7(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x32e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4b99
movb 0x7(%rsp), %al
cmpb $0x28, %al
je 0x4b99
movsbl %al, %edi
callq 0x3040
testl %eax, %eax
jne 0x4b6a
jmp 0x4ba8
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x4bc4
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x3438
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %r12
testb $0x5, 0x20(%r14,%rax)
jne 0x4c5f
testb $0x1, %r13b
jne 0x4c5f
movq %r14, %rdi
movq %r15, %rsi
callq 0x30e0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %r13
testq %r13, %r13
je 0x4ba8
movq %r15, %rdi
callq 0x32d0
movq 0x8(%rsp), %rax
cmpb $0x29, -0x1(%rax,%r13)
sete %r13b
jne 0x4c41
movq -0x18(%rax), %rcx
decq %rcx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x33b0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3380
movq %r12, %rdi
callq 0x3438
movq 0x8(%rsp), %rax
cmpq $0x0, -0x18(%rax)
je 0x4c53
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67ea
movq (%r14), %rax
movq -0x18(%rax), %rax
jmp 0x4bd1
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
xorl %edx, %edx
callq 0x5bc4
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x6d3b
movq 0xe32e(%rip), %rdi      # 0x12fb8
leaq 0x6717(%rip), %rsi      # 0xb3a8
callq 0x3210
movq 0x20(%rsp), %rsi
subq 0x18(%rsp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x3170
leaq 0x6700(%rip), %rsi      # 0xb3b3
movq %rax, %rdi
callq 0x3210
xorl %r15d, %r15d
movq 0xe2f3(%rip), %rbx      # 0x12fb8
leaq 0x826f(%rip), %r14      # 0xcf3b
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jae 0x4d06
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3210
movq 0x18(%rsp), %rsi
addq %r15, %rsi
movq %rax, %rdi
callq 0x3290
incq %r12
addq $0x8, %r15
jmp 0x4ccf
movq 0xe2ab(%rip), %rdi      # 0x12fb8
callq 0x30f0
leaq 0x18(%rsp), %rdi
callq 0x5bf6
movb $0x1, %bl
jmp 0x4baa
jmp 0x4d3c
jmp 0x4d2b
jmp 0x4d3c
jmp 0x4d3c
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5bf6
jmp 0x4d3f
jmp 0x4d3c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3438
movq %rbx, %rdi
callq 0x33c0