// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xdd53(%rip), %rax      # 0x12f88
addq $0x18, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x3110
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x52ad
leaq 0x7146(%rip), %rsi      # 0xc3a2
leaq 0x8(%rsp), %rdi
callq 0x30a0
testl %eax, %eax
jne 0x52ad
leaq 0x7(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x529e
movb 0x7(%rsp), %al
cmpb $0x28, %al
je 0x529e
movsbl %al, %edi
callq 0x3050
testl %eax, %eax
jne 0x526f
jmp 0x52ad
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x52d3
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3170
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x5414
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x6(%rsp), %rcx
xorl %edx, %edx
callq 0x6610
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x5337
movq %r14, %rax
subq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7787
movq %rbx, %rdi
movq %r14, %rsi
callq 0x783a
movq 0xdc7a(%rip), %rdi      # 0x12fb8
leaq 0x7063(%rip), %rsi      # 0xc3a8
movl $0xa, %edx
callq 0x3290
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
movq 0xdc54(%rip), %rbx      # 0x12fb8
movq %rbx, %rdi
callq 0x31a0
leaq 0x7040(%rip), %rsi      # 0xc3b3
movl $0x7, %edx
movq %rax, %rdi
callq 0x3290
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x53d8
xorl %r12d, %r12d
movq 0xdc22(%rip), %r14      # 0x12fb8
leaq 0x8bbe(%rip), %r15      # 0xdf5b
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3290
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rsi
movq -0x18(%rsi), %rdx
movq %r14, %rdi
callq 0x3290
incq %r12
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jb 0x539d
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq 0xdbc2(%rip), %rdi      # 0x12fb8
callq 0x3030
movq %rax, %rdi
callq 0x31b0
leaq 0x10(%rsp), %rdi
callq 0x664a
movb $0x1, %bl
jmp 0x52af
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x3110
movq 0x8(%rsp), %rax
movq -0x18(%rax), %r13
testq %r13, %r13
je 0x52ad
movl -0x8(%rax), %eax
testl %eax, %eax
js 0x544c
movq %r15, %rdi
callq 0x3070
movq 0x8(%rsp), %rax
cmpb $0x29, -0x1(%rax,%r13)
jne 0x548e
movq -0x18(%rax), %rcx
decq %rcx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x33f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x33c0
movq 0x10(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x3170
movb $0x1, %bpl
movq 0x8(%rsp), %rax
cmpq $0x0, -0x18(%rax)
je 0x54ad
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7260
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x52e6
testb $0x1, %bpl
je 0x5420
jmp 0x52e6
jmp 0x54e8
jmp 0x54e8
jmp 0x54d7
jmp 0x54e8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x664a
jmp 0x54eb
jmp 0x54e8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x3170
movq %rbx, %rdi
callq 0x3400