LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/cons.cpp
// Function: builtin::_cdr(std::shared_ptr<sexpr> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<sexpr>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::shared_ptr<sexpr>>>>&)
sexpr_t builtin::_cdr(const sexpr_t& args, env_t& bindings) {
    (void)bindings;
    if (args->length() != 1) {
        cerr << "cdr expects only one argument" << endl;
        return nullptr;
    }
    if (not (args->car()->islist() or args->car()->ispair())) {
        // cerr << args << endl;
        cerr << "car is applicable only on conslists" << endl;
        return nullptr;
    }
    return args->car()->cdr();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x4ff4
cmpq $0x1, %rax
jne 0xb9f2
movq (%r14), %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x634a
movq (%r15), %rdi
callq 0x4cf4
movl %eax, %r12d
movb $0x1, %r15b
testb %al, %al
jne 0xb9a2
movq (%r14), %rsi
leaq -0x40(%rbp), %rdi
callq 0x634a
movq -0x40(%rbp), %rdi
callq 0x4d5c
movl %eax, %r15d
testb %r12b, %r12b
jne 0xb9b5
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xb9b5
callq 0x4114
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xb9c3
callq 0x4114
testb %r15b, %r15b
je 0xba07
movq (%r14), %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x634a
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x627a
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xba4f
callq 0x4114
jmp 0xba4f
movq 0xe5ef(%rip), %r14      # 0x19fe8
leaq 0x7c0f(%rip), %rsi      # 0x1360f
movl $0x1d, %edx
jmp 0xba1a
movq 0xe5da(%rip), %r14      # 0x19fe8
leaq 0x7bd6(%rip), %rsi      # 0x135eb
movl $0x23, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xba76
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xba79
callq 0x4114
jmp 0xba79
jmp 0xba76
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xba87
callq 0x4114
movq %rbx, %rdi
callq 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/arithmetic.cpp
// Function: builtin::_add(std::shared_ptr<sexpr> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<sexpr>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::shared_ptr<sexpr>>>>&)
sexpr_t builtin::_add(const sexpr_t& args, env_t& bindings) {
    (void)bindings;
    sexpr_t walk = args;
    double d = 0;

    while (not walk->isnil()) {
        if (not walk->car()->isnum()) {
            cerr << "fatal: operands are not numbers!" << endl;
            return nullptr;
        }
        d += any_cast<sexpr_number>(*walk->car()->blob).n;
        walk = walk->cdr();
    }
    return num(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rsi), %r15
movq 0x8(%rsi), %rbx
testq %rbx, %rbx
je 0xbe35
movq 0xe159(%rip), %rax      # 0x19f80
cmpb $0x0, (%rax)
je 0xbe31
incl 0x8(%rbx)
jmp 0xbe35
lock
incl 0x8(%rbx)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
callq 0x4c7c
testb %al, %al
jne 0xbf03
movq %r12, %rdi
movq %r15, %rsi
callq 0x634a
movq -0x40(%rbp), %rdi
callq 0x4dfa
movl %eax, %r13d
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbe77
callq 0x4114
testb %r13b, %r13b
je 0xbf12
movq %r12, %rdi
movq %r15, %rsi
callq 0x634a
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0xaf0f
testq %rax, %rax
je 0xbf80
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbeb7
callq 0x4114
movq %r12, %rdi
movq %r15, %rsi
callq 0x627a
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
testq %rbx, %rbx
je 0xbede
movq %rbx, %rdi
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbeec
callq 0x4114
movsd -0x48(%rbp), %xmm0
addsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r13, %rbx
jmp 0xbe42
movq %r14, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x5244
jmp 0xbf61
movq 0xe0cf(%rip), %r15      # 0x19fe8
leaq 0x7768(%rip), %rsi      # 0x13688
movl $0x20, %edx
movq %r15, %rdi
callq 0x3210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xe09d(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
testq %rbx, %rbx
je 0xbf6e
movq %rbx, %rdi
callq 0x4114
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
jmp 0xbfaa
jmp 0xbf97
jmp 0xbfaa
movq %rax, %rdi
callq 0x4085
jmp 0xbfaa
jmp 0xbfaa
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbfad
callq 0x4114
jmp 0xbfad
movq %rax, %r14
testq %rbx, %rbx
je 0xbfba
movq %rbx, %rdi
callq 0x4114
movq %r14, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/arithmetic.cpp
// Function: builtin::_mul(std::shared_ptr<sexpr> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<sexpr>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::shared_ptr<sexpr>>>>&)
sexpr_t builtin::_mul(const sexpr_t& args, env_t& bindings) {
    (void)bindings;
    sexpr_t walk = args;
    double d = 1;

    while (not walk->isnil()) {
        if (not walk->car()->isnum()) {
            cerr << "fatal: operands are not numbers!" << endl;
            return nullptr;
        }
        d *= any_cast<sexpr_number>(*walk->car()->blob).n;
        walk = walk->cdr();
    }
    return num(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rsi), %r15
movq 0x8(%rsi), %rbx
testq %rbx, %rbx
je 0xc283
movq 0xdd0b(%rip), %rax      # 0x19f80
cmpb $0x0, (%rax)
je 0xc27f
incl 0x8(%rbx)
jmp 0xc283
lock
incl 0x8(%rbx)
movsd 0x73f5(%rip), %xmm0     # 0x13680
movsd %xmm0, -0x48(%rbp)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
callq 0x4c7c
testb %al, %al
jne 0xc355
movq %r12, %rdi
movq %r15, %rsi
callq 0x634a
movq -0x40(%rbp), %rdi
callq 0x4dfa
movl %eax, %r13d
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc2c9
callq 0x4114
testb %r13b, %r13b
je 0xc364
movq %r12, %rdi
movq %r15, %rsi
callq 0x634a
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0xaf0f
testq %rax, %rax
je 0xc3d2
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc309
callq 0x4114
movq %r12, %rdi
movq %r15, %rsi
callq 0x627a
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
testq %rbx, %rbx
je 0xc330
movq %rbx, %rdi
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc33e
callq 0x4114
movsd -0x48(%rbp), %xmm0
mulsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r13, %rbx
jmp 0xc294
movq %r14, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x5244
jmp 0xc3b3
movq 0xdc7d(%rip), %r15      # 0x19fe8
leaq 0x7316(%rip), %rsi      # 0x13688
movl $0x20, %edx
movq %r15, %rdi
callq 0x3210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xdc4b(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
testq %rbx, %rbx
je 0xc3c0
movq %rbx, %rdi
callq 0x4114
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
jmp 0xc3fc
jmp 0xc3e9
jmp 0xc3fc
movq %rax, %rdi
callq 0x4085
jmp 0xc3fc
jmp 0xc3fc
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc3ff
callq 0x4114
jmp 0xc3ff
movq %rax, %r14
testq %rbx, %rbx
je 0xc40c
movq %rbx, %rdi
callq 0x4114
movq %r14, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/arithmetic.cpp
// Function: valid_numeric_args(std::shared_ptr<sexpr>)
bool valid_numeric_args(sexpr_t args) {
    if (args->length() != 2) {
        cerr << "Err: expected two arguments!" << endl;
        return false;
    }
    if (not (args->car()->isnum() and args->cdr()->car()->isnum())) {
        cerr << "Err: arguments should both be numbers!" << endl;
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x4ff4
cmpq $0x2, %rax
jne 0xc6d8
movq (%r14), %rsi
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x634a
movq (%rbx), %rdi
callq 0x4dfa
movl %eax, %ebx
testb %al, %al
je 0xc6ed
movq (%r14), %rsi
leaq -0x20(%rbp), %rdi
callq 0x627a
movq -0x20(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x634a
movq -0x30(%rbp), %rdi
callq 0x4dfa
movl %eax, %r14d
jmp 0xc6f0
movq 0xd909(%rip), %rdi      # 0x19fe8
leaq 0x6fe3(%rip), %rsi      # 0x136c9
movl $0x1c, %edx
jmp 0xc738
xorl %r14d, %r14d
testb %bl, %bl
je 0xc710
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xc702
callq 0x4114
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xc710
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc71e
callq 0x4114
movb $0x1, %al
testb %r14b, %r14b
jne 0xc76d
movq 0xd8bc(%rip), %rdi      # 0x19fe8
leaq 0x6fb3(%rip), %rsi      # 0x136e6
movl $0x26, %edx
callq 0x3210
movq 0xd8a4(%rip), %rbx      # 0x19fe8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xc78c
callq 0x4114
jmp 0xc78c
movq %rax, %rbx
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xc7a1
callq 0x4114
jmp 0xc7a1
jmp 0xc79e
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc7af
callq 0x4114
movq %rbx, %rdi
callq 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/eval.cpp
// Function: sexpr::resolve(std::shared_ptr<sexpr> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<sexpr>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::shared_ptr<sexpr>>>>&)
sexpr_t sexpr::resolve(const sexpr_t& expr, env_t& local) {
    if (not (expr and expr->issymb()))
        return expr;
    auto sy = any_cast<sexpr_text>(*expr->blob).text();
    auto it = local.find(sy);
    if (it != end(local))
        return it->second;
    it = global.find(sy);
    if (it != end(global))
        return it->second;
    else return expr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0xdd7f
movq %rdx, %r15
callq 0x4ef8
testb %al, %al
je 0xdd7f
movq (%r14), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %r12
testq %rax, %rax
je 0xdde4
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r13
movq %r13, %rdi
callq 0x45ce
movb 0x20(%r12), %al
movb %al, 0x20(%r13)
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x38ac
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xdd34
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x31f0
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0xb06a
testq %rax, %rax
jne 0xdd5a
leaq 0xc494(%rip), %rdi      # 0x1a1e0
leaq -0x48(%rbp), %rsi
callq 0xb06a
testq %rax, %rax
je 0xddd8
movq 0x28(%rax), %rcx
movq %rcx, (%rbx)
movq 0x30(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xddad
movq 0xc20b(%rip), %rcx      # 0x19f80
cmpb $0x0, (%rcx)
je 0xdda9
incl 0x8(%rax)
jmp 0xddad
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xddc6
movq 0xc1e7(%rip), %rcx      # 0x19f80
cmpb $0x0, (%rcx)
je 0xdda3
incl 0x8(%rax)
jmp 0xddc6
lock
incl 0x8(%rax)
jmp 0xddc6
lock
incl 0x8(%rax)
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xddc6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
jmp 0xdd65
callq 0x4667
jmp 0xddeb
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xde1d
movq -0x38(%rbp), %rsi
jmp 0xde15
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xde1d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %rbx, %rdi
callq 0x3310
movq %rax, %rdi
callq 0x4085
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/parser.cpp
// Function: parse_tokens(std::queue<token, std::deque<token, std::allocator<token>>>&, bool)
sexpr_t parse_tokens(queue<token>& q, bool quasi) {
    sexpr_t e;

    if (tok.type == token::tok_l_paren) {
        e = parse_list(q, quasi);
    } else if (is_quote(tok.type)) {
        if (not quasi and is_unquote(tok.type)) {
            cerr << "Err: unquote appeared without quasiquote" << endl;
            return nullptr;
        }
        e = parse_quote(q, quasi or tok.type == token::tok_quasi);
    } else if (tok.type == token::tok_pair) {
        cerr << "parsing error! pair is not valid" << endl;
        return nullptr;
    } else if (tok.type == token::tok_cons_flavor) {
        cerr << "Err: car/cdr must be called as operators!" << endl;
        return nullptr;
    } else {
        e = tok, q.pop();
    }
    return e;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
movl 0x7c(%rsi), %eax
testl %eax, %eax
je 0xfe98
movl %eax, %ecx
andl $-0x4, %ecx
cmpl $0x4, %ecx
jne 0xfeaf
testb %dl, %dl
je 0xfed2
movb $0x1, %al
jmp 0xff6a
movzbl %dl, %edx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x109cd
jmp 0xff7c
cmpl $0xa, %eax
je 0xfef4
cmpl $0x8, %eax
jne 0xff3e
movq 0xa124(%rip), %r14      # 0x19fe8
leaq 0x39b2(%rip), %rsi      # 0x1387d
movl $0x20, %edx
jmp 0xff07
movl %eax, %ecx
notl %ecx
testb $0x6, %cl
jne 0xff62
movq 0xa102(%rip), %r14      # 0x19fe8
leaq 0x3a44(%rip), %rsi      # 0x13931
movl $0x28, %edx
jmp 0xff07
movq 0xa0ed(%rip), %r14      # 0x19fe8
leaq 0x3a05(%rip), %rsi      # 0x13907
movl $0x29, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xff9f
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x10f20
movq (%r15), %r12
movq 0x8(%r15), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r14, %rdi
callq 0x116f2
jmp 0xff8a
cmpl $0x5, %eax
sete %al
orb %dl, %al
movzbl %al, %edx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xfc18
movq (%r15), %r12
movq 0x8(%r15), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0xff98
callq 0x4114
movq %r12, (%rbx)
movq %r13, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/parser.cpp
// Function: parse_pair(std::queue<token, std::deque<token, std::allocator<token>>>&, std::shared_ptr<sexpr> const&, std::shared_ptr<sexpr>&)
sexpr_t parse_pair(queue<token>& q, const sexpr_t& e, sexpr_t& tail) {
    if (q.pop(); not e or tok.type == token::tok_r_paren) {
        cerr << "parsing error! pair is not valid" << endl;
        return nullptr;
    }
    sexpr_t tmp = tok;
    if (q.pop(); not tmp->isatom() or tok.type != token::tok_r_paren) {
        cerr << "parsing error! pair is not valid" << endl;
        return nullptr;
    }
    tail->setcdr(tmp);
    return e;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x116f2
cmpq $0x0, (%r14)
je 0xffe7
movq 0x10(%r12), %rsi
cmpl $0x1, 0x7c(%rsi)
jne 0x10034
movq 0x9ffa(%rip), %r14      # 0x19fe8
leaq 0x3888(%rip), %rsi      # 0x1387d
movl $0x20, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x100ea
leaq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x10f20
movq %r12, %rdi
callq 0x116f2
movq (%r13), %rdi
callq 0x4dc4
testb %al, %al
je 0x10090
movq 0x10(%r12), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x10090
movq (%r15), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6218
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x100dc
movq 0x9efa(%rip), %rcx      # 0x19f80
cmpb $0x0, (%rcx)
je 0x100fc
incl 0x8(%rax)
jmp 0x100dc
movq 0x9f51(%rip), %r14      # 0x19fe8
leaq 0x37df(%rip), %rsi      # 0x1387d
movl $0x20, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x9f1f(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x100ea
callq 0x4114
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x100dc
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x10113
callq 0x4114
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/parser.cpp
// Function: parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
sexpr_t parse(string s) {
    queue<token> tokens;
    sexpr_t e;

    if ((tokens = token::tokenize(s)).size() == 0)
        return nullptr;
    e = parse_tokens(tokens);
    // cout << "expr: " << e << endl;
    if (not e)
        cerr << "Err: expression is mal-formed" << endl;
    return e;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0xe0(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x117a8
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x11ede
leaq -0xe0(%rbp), %r14
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps 0x20(%r14), %xmm2
movaps 0x30(%r14), %xmm3
movaps %xmm0, -0x40(%rbp)
movaps 0x40(%r14), %xmm0
leaq -0x90(%rbp), %r15
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movaps -0x40(%rbp), %xmm4
movaps %xmm4, (%r15)
movaps %xmm1, 0x10(%r15)
movaps %xmm2, 0x20(%r15)
movaps %xmm3, 0x30(%r15)
movaps %xmm0, 0x40(%r15)
movq %r15, %rdi
callq 0x114dc
movq 0x48(%r14), %rax
movq %rax, %rcx
subq 0x28(%r14), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x20(%r14), %r12
movq 0x30(%r14), %rax
subq 0x38(%r14), %rax
sarq $0x7, %rax
leaq (%rax,%rcx,4), %r13
subq 0x10(%r14), %r12
sarq $0x7, %r12
movq %r15, %rdi
callq 0x1164a
addq %r13, %r12
jne 0x10e40
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x10ed0
leaq -0x90(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
xorl %edx, %edx
callq 0xfe61
movq -0x90(%rbp), %r12
movq -0x88(%rbp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x10e7e
callq 0x4114
testq %r12, %r12
jne 0x10ec9
movq 0x915e(%rip), %r15      # 0x19fe8
leaq 0x2ae6(%rip), %rsi      # 0x13977
movl $0x1d, %edx
movq %r15, %rdi
callq 0x3210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x912c(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r12, (%rbx)
movq %r14, 0x8(%rbx)
leaq -0xe0(%rbp), %rdi
callq 0x1164a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10ef8
movq %rax, %rbx
jmp 0x10efe
movq %rax, %rbx
xorl %r14d, %r14d
testq %r14, %r14
je 0x10f0b
movq %r14, %rdi
callq 0x4114
leaq -0xe0(%rbp), %rdi
callq 0x1164a
movq %rbx, %rdi
callq 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/include/token.hpp
// Function: token::operator std::shared_ptr<sexpr>() const
operator sexpr_t() const {
        if (type == tok_num_or_symb) {
            bool redix = false;
            bool flag = true;

            if (s == "+" || s == "-") return symb(s);
            for (auto i = 0u; i < s.length(); i++) {
                if (s[i] == '+' or s[i] == '-') {
                    if (i == 0) continue;
                    else {flag = false; break;}
                } else if (not isdigit(s[i])) {
                    flag = false;
                    break;
                } else if (s[i] == '.') {
                    if (not redix) redix = true;
                    else {flag = false; break;}
                }
            }

            if (flag) return num(stod(s));
            else return s == "nil" ? nil() : symb(s);
        } else if (type == tok_str) {
            return str(s);
        }
        return nil();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl 0x7c(%rsi), %eax
cmpl $0x2, %eax
je 0x10ff1
cmpl $0x3, %eax
jne 0x10fe7
leaq 0x58(%r15), %r14
leaq 0x2824(%rip), %rsi      # 0x13778
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x10fda
leaq 0x2817(%rip), %rsi      # 0x1377e
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x10fda
movq 0x60(%r15), %rax
testq %rax, %rax
je 0x11002
movq (%r14), %rcx
movl $0x1, %edx
xorl %edi, %edi
xorl %esi, %esi
movzbl (%rcx,%rdi), %edi
cmpl $0x2d, %edi
je 0x10f9a
cmpl $0x2b, %edi
jne 0x10faa
cmpl $0x1, %edx
jne 0x10fc7
movl %edx, %edi
incl %edx
cmpq %rdi, %rax
ja 0x10f8c
jmp 0x11002
movsbl %dil, %r8d
addl $-0x30, %r8d
cmpl $0x9, %r8d
ja 0x10fc7
cmpb $0x2e, %dil
jne 0x10f9f
testb $0x1, %sil
movb $0x1, %sil
je 0x10f9f
leaq 0x25ac(%rip), %rsi      # 0x1357a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x10fe7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x51e2
jmp 0x1104e
movq %rbx, %rdi
callq 0x51b8
jmp 0x1104e
addq $0x58, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x520f
jmp 0x1104e
movq (%r14), %r15
callq 0x3040
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0x30(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3180
cmpq %r15, (%r12)
je 0x11060
movl (%r14), %eax
testl %eax, %eax
je 0x11043
cmpl $0x22, %eax
jne 0x11046
leaq 0x2957(%rip), %rdi      # 0x13995
callq 0x3280
movl %r13d, (%r14)
movq %rbx, %rdi
callq 0x5244
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x292e(%rip), %rdi      # 0x13995
callq 0x3120
cmpl $0x0, (%r14)
jne 0x11075
movl %r13d, (%r14)
movq %rax, %rdi
callq 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/token.cpp
// Function: token::next_paren(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool token::next_paren(string& e) {
    char c = e[0];

    if (c != '(' and c != ')')
        return false;
    e.erase(0, 1);
    s = c;
    type = c == '(' ? tok_l_paren : tok_r_paren;
    if (c == ')') {
        if (paren.size() == 0 or paren.top() != '(')
            return err = true;
        paren.pop();
        return true;
    } else if (c == '(') {
        paren.push(c);
        return true;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq (%rsi), %rax
movb (%rax), %r14b
movb %r14b, -0x11(%rbp)
andb $-0x2, %r14b
cmpb $0x28, %r14b
jne 0x11a3d
movq %rdi, %rbx
movl $0x1, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3080
movsbl -0x11(%rbp), %r8d
leaq 0x58(%rbx), %rdi
movq 0x60(%rbx), %rdx
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movzbl -0x11(%rbp), %eax
xorl %ecx, %ecx
cmpl $0x28, %eax
setne %cl
movl %ecx, 0x7c(%rbx)
je 0x11a06
cmpl $0x29, %eax
jne 0x11a3d
movq 0x88cd(%rip), %rax      # 0x1a270
movq %rax, %rsi
subq 0x88a3(%rip), %rsi      # 0x1a250
shrq $0x3, %rsi
cmpq $0x1, %rax
adcq $-0x1, %rsi
movq 0x8898(%rip), %rcx      # 0x1a258
movq 0x8899(%rip), %rdx      # 0x1a260
movq %rcx, %rdi
subq %rdx, %rdi
addq 0x8874(%rip), %rdi      # 0x1a248
shlq $0x9, %rsi
addq %rsi, %rdi
cmpq 0x8856(%rip), %rdi      # 0x1a238
je 0x11a27
cmpq %rdx, %rcx
jne 0x119f2
movl $0x200, %ecx            # imm = 0x200
addq -0x8(%rax), %rcx
cmpb $0x28, -0x1(%rcx)
jne 0x11a27
leaq 0x8829(%rip), %rdi      # 0x1a228
callq 0x123ea
jmp 0x11a3d
movq 0x884b(%rip), %rcx      # 0x1a258
movq 0x8854(%rip), %rdx      # 0x1a268
decq %rdx
cmpq %rdx, %rcx
je 0x11a2d
movb %al, (%rcx)
incq 0x8833(%rip)            # 0x1a258
jmp 0x11a3d
movb $0x1, 0x78(%rbx)
jmp 0x11a3d
leaq 0x87f4(%rip), %rdi      # 0x1a228
leaq -0x11(%rbp), %rsi
callq 0x12440
cmpb $0x28, %r14b
sete %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/token.cpp
// Function: token::next_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool token::next_string(string& e) {
    int j = 1;
    if (e[0] != '\"')
        return false;
    type = tok_str;
    for (; e[j] != '\"'; j++)
        if (e[j]) s += e[j];
        else return err = true;
    e.erase(0, j + 1);
    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
movb (%rax), %r12b
cmpb $0x22, %r12b
jne 0x11ab5
movq %rsi, %rbx
movq %rdi, %r14
movl $0x2, 0x7c(%rdi)
leaq 0x58(%rdi), %r15
movl $0x2, %r13d
movq (%rbx), %rax
movzbl -0x1(%rax,%r13), %eax
testl %eax, %eax
je 0x11ab0
cmpl $0x22, %eax
je 0x11aa1
movsbl %al, %esi
movq %r15, %rdi
callq 0x31b0
incq %r13
jmp 0x11a7f
movl %r13d, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3080
jmp 0x11ab5
movb $0x1, 0x78(%r14)
cmpb $0x22, %r12b
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/token.cpp
// Function: token::next_special(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool token::next_special(string& e) {
    char c = e[0];

    if (c == '\'') {
        s = c, type = tok_quote;
        e.erase(0, 1);
        return true;
    } else if (c == '.') {
        s = c, type = tok_pair;
        e.erase(0, 1);
        return true;
    } else if (c == '`') {
        s = c, type = tok_quasi;
        e.erase(0, 1);
        return true;
    } else if (c == ',') {
        s = c, type = (e[1] == '@' ? tok_unquote_sp : tok_unquote);
        e.erase(0, 1 + (e[1] == '@'));
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movb (%rax), %cl
movzbl %cl, %edx
xorl %eax, %eax
cmpl $0x2d, %edx
jg 0x11b37
cmpl $0x27, %edx
je 0x11b6d
cmpl $0x2c, %edx
jne 0x11bca
leaq 0x58(%r14), %rdi
movq 0x60(%r14), %rdx
movsbl %cl, %r8d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq (%rbx), %rax
xorl %ecx, %ecx
cmpb $0x40, 0x1(%rax)
sete %cl
orl $0x6, %ecx
movl %ecx, 0x7c(%r14)
xorl %r15d, %r15d
cmpb $0x40, 0x1(%rax)
sete %r15b
incq %r15
jmp 0x11bbb
cmpl $0x2e, %edx
je 0x11b95
cmpl $0x60, %edx
jne 0x11bca
leaq 0x58(%r14), %rdi
movq 0x60(%r14), %rdx
movsbl %cl, %r8d
movl $0x1, %r15d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movl $0x5, 0x7c(%r14)
jmp 0x11bbb
leaq 0x58(%r14), %rdi
movq 0x60(%r14), %rdx
movsbl %cl, %r8d
movl $0x1, %r15d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movl $0x4, 0x7c(%r14)
jmp 0x11bbb
leaq 0x58(%r14), %rdi
movq 0x60(%r14), %rdx
movsbl %cl, %r8d
movl $0x1, %r15d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movl $0x8, 0x7c(%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3080
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/repl/token.cpp
// Function: token::next_token(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, token&)
bool token::next_token(string& e, token& tok) {
    for (int i = 0; e[i] and isspace(e[i]); i++)
        e.erase(i--, 1);
    if (e.empty() or e[0] == ';')
        return false;
    return tok.next_paren(e) or tok.next_string(e)
        or tok.next_special(e) or tok.next_symbol(e);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movb (%rax), %r15b
testb %r15b, %r15b
je 0x11e87
movsbl %r15b, %edi
callq 0x3050
testl %eax, %eax
je 0x11e7e
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3080
movq (%rbx), %rax
movb (%rax), %r15b
testb %r15b, %r15b
jne 0x11e57
cmpb $0x3b, %r15b
setne %al
jmp 0x11e89
movb $0x1, %al
cmpq $0x0, 0x8(%rbx)
setne %r15b
andb %al, %r15b
je 0x11ecf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11934
testb %al, %al
jne 0x11ecf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11a4e
testb %al, %al
jne 0x11ecf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11acc
testb %al, %al
jne 0x11ecf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11bd6
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH02_VariablesAndBasicTypes/examples/compounddecls.cc
// Function: main
int main()
{
	// i is an int; p is a pointer to int; r is a reference to int
	int i = 1024, *p = &i, &r = i;
	
	// three ways to print the value of i
	std::cout << i << " " <<  *p <<  " " << r << std::endl;

	int j = 42, *p2 = &j;
	int *&pref = p2;  // pref is a reference to the pointer p2

	// prints the value of j, which is the int to which p2 points
	std::cout << *pref << std::endl;
	
	// pref refers to a pointer; assigning &i to pref makes p point to i
	pref = &i; 
	std::cout << *pref << std::endl; // prints the value of i

	// dereferencing pref yields i, the int to which p2 points; 
	*pref = 0;  // changes i to 0
	
	std::cout << i << " " << *pref << std::endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x2deb(%rip), %r14      # 0x3fd8
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1090
movq %rax, %r15
leaq 0xe00(%rip), %rbx       # 0x2004
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1090
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1070
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1090
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %r14, %rdi
movl $0x2a, %esi
callq 0x1090
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1090
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq %r14, %rdi
xorl %esi, %esi
callq 0x1090
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1070
movq %r14, %rdi
xorl %esi, %esi
callq 0x1090
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/random_median.cpp
// Function: AddNumber(int)
void AddNumber(int num) {
    // always store extra in high heap
    if(high.size() == 0) {
        high.push(num);
        return;
    }

    if(low.size() != high.size()) {
        if(num < high.top()) {
            low.push(num);
        } else {
            low.push(high.top());
            high.pop();
            high.push(num);
        }
    } else {
        if(num < low.top()) {
            high.push(low.top());
            low.pop();
            low.push(num);
        } else {
            high.push(num);
        }
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, 0xc(%rsp)
movq 0x2db5(%rip), %rcx      # 0x40d8
movq 0x2da6(%rip), %rsi      # 0x40d0
subq %rsi, %rcx
je 0x1371
movq 0x2d82(%rip), %rdx      # 0x40b8
movq 0x2d73(%rip), %rax      # 0x40b0
subq %rax, %rdx
cmpq %rcx, %rdx
jne 0x137f
cmpl %edi, (%rax)
jle 0x1371
leaq 0x2d80(%rip), %rdi      # 0x40d0
movq %rax, %rsi
callq 0x14c8
leaq 0x2d51(%rip), %rbx      # 0x40b0
movq %rbx, %rdi
callq 0x15e0
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
jmp 0x138f
leaq 0x2d58(%rip), %rdi      # 0x40d0
leaq 0xc(%rsp), %rsi
jmp 0x13b9
cmpl %edi, (%rsi)
jle 0x1396
leaq 0x2d26(%rip), %rdi      # 0x40b0
leaq 0xc(%rsp), %rsi
callq 0x1538
jmp 0x13be
leaq 0x2d13(%rip), %rdi      # 0x40b0
callq 0x1538
leaq 0x2d27(%rip), %rbx      # 0x40d0
movq %rbx, %rdi
callq 0x15a8
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x14c8
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/random_median.cpp
// Function: main
int main()
{
    for(int i = 0; i < 10; i++) {
        int num = rand() % 30;
        AddNumber(num);
        cout << "Add: " << num << "  Median: " << GetMedian() << endl;
        //if(i > 1)
        //cout << "LOW: " << low.top() << "   HIGH: " << high.top() << endl;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xa, %ebp
movq 0x2c00(%rip), %rbx      # 0x3fd8
leaq 0xc41(%rip), %r14       # 0x2020
leaq 0xc40(%rip), %r15       # 0x2026
callq 0x1040
cltq
imulq $-0x77777777, %rax, %r12 # imm = 0x88888889
shrq $0x20, %r12
addl %eax, %r12d
movl %r12d, %ecx
shrl $0x1f, %ecx
sarl $0x4, %r12d
addl %ecx, %r12d
movl %r12d, %ecx
shll $0x5, %ecx
addl %r12d, %r12d
subl %ecx, %r12d
addl %eax, %r12d
movl %r12d, %edi
callq 0x1313
movl $0x5, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1110
movq %rax, %r12
movl $0xa, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x10d0
callq 0x12bc
movq %r12, %rdi
callq 0x10f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1070
decl %ebp
jne 0x13e6
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]tsvtools/./join.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> join<char const [2], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, char const (&) [2])
std::string join(std::vector<T>& elems, S& delim) {
    std::stringstream ss;
    typename std::vector<T>::iterator e = elems.begin();
    ss << *e++;
    for (; e != elems.end(); ++e) {
        ss << delim << *e;
    }
    return ss.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2100
movq (%r15), %r13
leaq 0x18(%rsp), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x21d0
addq $0x20, %r13
cmpq 0x8(%r15), %r13
je 0x2bae
movq %r14, %rdi
callq 0x20b0
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21d0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq $0x20, %r13
movq %r12, %rdi
callq 0x21d0
jmp 0x2b7c
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x2220
movq 0x33ee(%rip), %rsi      # 0x5fb0
leaq 0x8(%rsp), %rdi
callq 0x2120
leaq 0x88(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2bf1
jmp 0x2bf1
movq %rax, %rbx
movq 0x33b5(%rip), %rsi      # 0x5fb0
leaq 0x8(%rsp), %rdi
callq 0x2120
leaq 0x88(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]tsvtools/split.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
    std::stringstream ss(s);
    std::string item;
    while(std::getline(ss, item, delim)) {
        elems.push_back(item);
    }
    return elems;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x2230
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x37aa
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2b00
jmp 0x3782
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x37c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x27e8(%rip), %rsi      # 0x5fb0
leaq 0x28(%rsp), %rdi
callq 0x2120
leaq 0xa8(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x380c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x279d(%rip), %rsi      # 0x5fb0
leaq 0x28(%rsp), %rdi
callq 0x2120
leaq 0xa8(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]tsvtools/split.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
std::vector<std::string> &split(const std::string &s, const std::string& delims, std::vector<std::string> &elems) {
    char* tok;
    char cchars [s.size()+1];
    char* cstr = &cchars[0];
    strcpy(cstr, s.c_str());
    tok = strtok(cstr, delims.c_str());
    while (tok != NULL) {
        elems.push_back(tok);
        tok = strtok(NULL, delims.c_str());
    }
    return elems;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rdi), %rax
movq %rsp, %r15
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq (%rdi), %rsi
movq %r15, %rdi
callq 0x2160
movq (%r14), %rsi
movq %r15, %rdi
callq 0x2210
testq %rax, %rax
je 0x3926
movq %rax, %r12
leaq -0x38(%rbp), %r13
leaq -0x48(%rbp), %r15
movq %r13, -0x48(%rbp)
movq %r12, %rdi
callq 0x20b0
leaq (%rax,%r12), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2cf8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2d88
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3914
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21a0
movq (%r14), %rsi
xorl %edi, %edi
callq 0x2210
movq %rax, %r12
testq %rax, %rax
jne 0x38d9
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3950
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Options.cpp
// Function: PrintOpts(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double)
void PrintOpts(const std::string &exec, const double DMAX) {

	printf("\nUsage:   ./%s [-option] [argument]\n\n", exec.c_str());
	printf("Options:  -r receptor.pdb \\  # PDB file with receptor's coordinates\n");
	printf("          -l ligand.pdb \\    # (optional) PDB file with ligand's coordinates\n");
	printf("          -t table.txt \\     # (optional) %s contact potential table \n", exec.c_str());
	printf("          -d dmax            # (optional) contact distance, default dmax=%.1fA\n", DMAX);
	printf("\n");

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0xad94(%rip), %rdi      # 0x19028
xorl %eax, %eax
callq 0x2050
leaq 0xae79(%rip), %rdi      # 0x1911b
callq 0x2320
leaq 0xaeb1(%rip), %rdi      # 0x1915f
callq 0x2320
movq (%rbx), %rsi
leaq 0xad91(%rip), %rdi      # 0x1904e
xorl %eax, %eax
callq 0x2050
leaq 0xadca(%rip), %rdi      # 0x19095
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2050
movl $0xa, %edi
addq $0x10, %rsp
popq %rbx
jmp 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Options.cpp
// Function: GetOpts(int, char**, OPTS&)
bool GetOpts(int argc, char *argv[], OPTS &opts) {

	char tmp;
	while ((tmp = getopt(argc, argv, "hs:r:l:t:d:")) != -1) {
		switch (tmp) {
		case 'h': /* help */
			printf("!!! HELP !!!\n");
			return false;
			break;
		case 'r': /* receptor file */
			opts.rec = std::string(optarg);
			break;
		case 'l': /* ligand file */
			opts.lig = std::string(optarg);
			break;
		case 't': /* table file */
			opts.table = std::string(optarg);
			break;
		case 'd': /* distance cutoff */
			opts.dmax = atof(optarg);
			break;
		default:
			return false;
			break;
		}
	}

	if (opts.rec == "") {
		printf("Error: receptor file not specified ('-r')\n");
		return false;
	}

	return true;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0xade1(%rip), %rdx      # 0x190e5
callq 0x2090
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
je 0xe401
leaq 0x40(%rbx), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x28(%rsp)
leaq 0xacd4(%rip), %r12      # 0x19004
leaq 0xadae(%rip), %r13      # 0x190e5
leaq 0x8(%rsp), %r15
sarl $0x18, %eax
addl $-0x64, %eax
rorl %eax
cmpl $0x8, %eax
ja 0xe42d
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0x1ec73(%rip), %rax     # 0x2cfd0
movq (%rax), %rdi
callq 0x22b0
movsd %xmm0, 0x60(%rbx)
jmp 0xe3e6
movq 0x1ec5d(%rip), %rax     # 0x2cfd0
movq (%rax), %rsi
movq %r15, %rdi
leaq 0x7(%rsp), %rdx
callq 0xe43e
movq %rbx, %rdi
jmp 0xe3c2
movq 0x1ec41(%rip), %rax     # 0x2cfd0
movq (%rax), %rsi
movq %r15, %rdi
leaq 0x7(%rsp), %rdx
callq 0xe43e
movq 0x28(%rsp), %rdi
jmp 0xe3c2
movq 0x1ec23(%rip), %rax     # 0x2cfd0
movq (%rax), %rsi
movq %r15, %rdi
leaq 0x7(%rsp), %rdx
callq 0xe43e
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x22a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe3e6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
movl %ebp, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x2090
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
jne 0xe33c
leaq 0xac45(%rip), %rsi      # 0x1904d
movq %rbx, %rdi
callq 0x20b0
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0xe42f
leaq 0xad8d(%rip), %rdi      # 0x191ac
jmp 0xe428
leaq 0xadae(%rip), %rdi      # 0x191d6
callq 0x2320
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Atom.cpp
// Function: Atom::Atom()
Atom::Atom() :
		atomNum(1), altLoc(' '), x(0.0), y(0.0), z(0.0), occup(0.0), temp(0.0), residue(
		NULL), q(0.0), r(0.0), type(' ') {

	name[0] = '\n';
	x = y = z = 0.0;
	element[0] = '\n';
	charge[0] = '\n';

}

// Assembly:
movl $0x1, (%rdi)
movb $0x20, %al
movb %al, 0x9(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movq %rcx, 0x50(%rdi)
movb %al, 0x58(%rdi)
movb $0xa, %al
movb %al, 0x4(%rdi)
movq %rcx, 0x20(%rdi)
movb %al, 0x38(%rdi)
movb %al, 0x3b(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Atom.cpp
// Function: Atom::Atom(AtomRecord const&)
Atom::Atom(const AtomRecord &source) :
		atomNum(source.atomNum), altLoc(source.altLoc), x(source.x), y(
				source.y), z(source.z), occup(source.occup), temp(source.temp), residue(
		NULL), q(source.q), r(source.r), type(' ') {

	strcpy(name, source.atomName);
	strcpy(element, source.element);
	strcpy(charge, source.charge);
	type = GetType(name);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, (%rdi)
movb 0x9(%rsi), %al
movb %al, 0x9(%rdi)
movsd 0x18(%rsi), %xmm0
movsd %xmm0, 0x10(%rdi)
movsd 0x20(%rsi), %xmm0
movsd %xmm0, 0x18(%rdi)
movsd 0x28(%rsi), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x30(%rsi), %xmm0
movsd %xmm0, 0x28(%rdi)
movsd 0x38(%rsi), %xmm0
movsd %xmm0, 0x30(%rdi)
movq $0x0, 0x40(%rdi)
movsd 0x50(%rsi), %xmm0
movsd %xmm0, 0x48(%rdi)
movsd 0x58(%rsi), %xmm0
movsd %xmm0, 0x50(%rdi)
movb $0x20, 0x58(%rdi)
addq $0x4, %rdi
addq $0x4, %rsi
callq 0x21f0
leaq 0x38(%rbx), %rdi
leaq 0x45(%r14), %rsi
callq 0x21f0
leaq 0x3b(%rbx), %rdi
addq $0x48, %r14
movq %r14, %rsi
callq 0x21f0
movl 0x4(%rbx), %eax
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
movzbl 0x5(%rbx), %ecx
cmovael %eax, %ecx
movb %cl, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Atom.cpp
// Function: Atom::operator=(Atom const&)
Atom& Atom::operator =(const Atom& source) {

	atomNum = source.atomNum;
	altLoc = source.altLoc;
	strcpy(name, source.name);
	x = source.x;
	y = source.y;
	z = source.z;
	occup = source.occup;
	temp = source.temp;
	strcpy(element, source.element);
	strcpy(charge, source.charge);
	residue = source.residue;
	q = source.q;
	r = source.r;
	type = source.type;

	return *this;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, (%rdi)
movb 0x9(%rsi), %al
movb %al, 0x9(%rdi)
addq $0x4, %rdi
addq $0x4, %rsi
callq 0x21f0
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%rbx)
movsd 0x18(%r14), %xmm0
movsd %xmm0, 0x18(%rbx)
movsd 0x20(%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
movsd 0x28(%r14), %xmm0
movsd %xmm0, 0x28(%rbx)
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x30(%rbx)
leaq 0x38(%rbx), %rdi
leaq 0x38(%r14), %rsi
callq 0x21f0
leaq 0x3b(%rbx), %rdi
leaq 0x3b(%r14), %rsi
callq 0x21f0
movq 0x40(%r14), %rax
movq %rax, 0x40(%rbx)
movsd 0x48(%r14), %xmm0
movsd %xmm0, 0x48(%rbx)
movsd 0x50(%r14), %xmm0
movsd %xmm0, 0x50(%rbx)
movb 0x58(%r14), %al
movb %al, 0x58(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Atom.cpp
// Function: Atom::Dist(Atom const&, Atom const&)
double Atom::Dist(const Atom &A, const Atom &B) {

	double x = A.x - B.x;
	double y = A.y - B.y;
	double z = A.z - B.z;

	return sqrt(x * x + y * y + z * z);

}

// Assembly:
movsd 0x10(%rdi), %xmm1
movsd 0x18(%rdi), %xmm2
subsd 0x10(%rsi), %xmm1
subsd 0x18(%rsi), %xmm2
movsd 0x20(%rdi), %xmm0
subsd 0x20(%rsi), %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x21b0
sqrtsd %xmm0, %xmm0
retq
nop