// File: /workspace/github_cpp_makefile_star2_O3/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 0xdd44(%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 0x52bc
leaq 0x7137(%rip), %rsi      # 0xc3a2
leaq 0x8(%rsp), %rdi
callq 0x30a0
testl %eax, %eax
jne 0x52bc
leaq 0x7(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3320
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x52ad
movb 0x7(%rsp), %al
cmpb $0x28, %al
je 0x52ad
movsbl %al, %edi
callq 0x3050
testl %eax, %eax
jne 0x527e
jmp 0x52bc
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
je 0x52e2
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
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x6(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x3110
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rbp
testq %rbp, %rbp
je 0x52bc
movl -0x8(%rax), %ecx
testl %ecx, %ecx
js 0x531e
movq %r15, %rdi
callq 0x3070
movq 0x8(%rsp), %rax
movb -0x1(%rax,%rbp), %bpl
cmpb $0x29, %bpl
jne 0x535e
movq -0x18(%rax), %rcx
decq %rcx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3400
movq %r15, %rdi
movq %r12, %rsi
callq 0x33d0
movq 0x10(%rsp), %rdi
addq $-0x18, %rdi
movq %r13, %rsi
callq 0x3170
movq 0x8(%rsp), %rax
cmpq $0x0, -0x18(%rax)
je 0x5378
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x719a
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x5391
cmpb $0x29, %bpl
jne 0x52f1
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x6(%rsp), %rcx
xorl %edx, %edx
callq 0x6586
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x53e2
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 0x76c9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x777c
movq 0xdbcf(%rip), %rdi      # 0x12fb8
leaq 0x6fb8(%rip), %rsi      # 0xc3a8
movl $0xa, %edx
callq 0x32a0
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
movq 0xdba9(%rip), %rbx      # 0x12fb8
movq %rbx, %rdi
callq 0x31b0
leaq 0x6f95(%rip), %rsi      # 0xc3b3
movl $0x7, %edx
movq %rax, %rdi
callq 0x32a0
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x5483
xorl %r12d, %r12d
movq 0xdb77(%rip), %r14      # 0x12fb8
leaq 0x8b13(%rip), %r15      # 0xdf5b
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x32a0
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rsi
movq -0x18(%rsi), %rdx
movq %r14, %rdi
callq 0x32a0
incq %r12
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jb 0x5448
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq 0xdb17(%rip), %rdi      # 0x12fb8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
leaq 0x10(%rsp), %rdi
callq 0x65c0
movb $0x1, %bl
jmp 0x52be
jmp 0x54d8
jmp 0x54c5
jmp 0x54d8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x65c0
jmp 0x54db
jmp 0x54d8
jmp 0x54d8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x3170
movq %rbx, %rdi
callq 0x3410