LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: SimPublisher::SubscribeNewTopic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SimPublisher::SubscribeNewTopic(TopicName tn){
    if (Par_del_client.subscriptor)
        brops->sendMsg(SubscribeMsg(tn));
    else{
        mutex_cout.lock();
        cout << "Error, you're only a Publisher" << endl;
        mutex_cout.unlock();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpb $0x1, 0x78(%rdi)
jne 0x41ad
movq 0xf8(%rdi), %rbx
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0x78(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x74c0
leaq 0x8afe(%rip), %r13      # 0xcc48
leaq -0x48(%rbp), %rdi
movq %r13, -0x10(%rdi)
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x74c0
leaq -0x58(%rbp), %rsi
movl $0x3, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r13, -0x58(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4190
callq 0x31c0
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x419e
callq 0x31c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8ffc(%rip), %rdi      # 0xd1b0
callq 0x3270
testl %eax, %eax
jne 0x4219
movq 0x8e14(%rip), %rbx      # 0xcfd8
leaq 0x5016(%rip), %rsi      # 0x91e1
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x3200
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 0x3150
leaq 0x8faa(%rip), %rdi      # 0xd1b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movl %eax, %edi
callq 0x3140
movq %rax, %rbx
movq %r13, -0x58(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x423a
callq 0x31c0
jmp 0x423a
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x4248
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Client::insert_retainedTopic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Client::insert_retainedTopic (TopicName TN, TopicValue TV){
    if(Client_TopicName != TN)
        Assign_Client_TopicName(TN);
    B->Broker_Insert_Retained_Topic(TN,TV);
    warn_everybody_thisTopic(TN, TV);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x118(%rdi), %r12
movq %rdi, -0x30(%rbp)
movq 0x120(%rdi), %rdx
movq 0x8(%rsi), %r13
cmpq %r13, %rdx
jne 0x5170
testq %rdx, %rdx
je 0x51aa
movq (%r15), %rsi
movq (%r12), %rdi
callq 0x31f0
testl %eax, %eax
je 0x51aa
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
addq %rsi, %r13
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rdx
callq 0x74c0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3120
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x51aa
callq 0x31c0
movq -0x30(%rbp), %rax
movq 0x20(%rax), %r12
leaq -0xc0(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x74c0
leaq -0xa0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x74c0
leaq -0xd0(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq %r12, %rdi
callq 0x5650
movq -0xb0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x521b
callq 0x31c0
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x522c
callq 0x31c0
leaq -0x80(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x74c0
leaq -0x60(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x74c0
leaq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x5314
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0x5288
callq 0x31c0
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0x5299
callq 0x31c0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
jne 0x5306
jmp 0x530b
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0x52d3
callq 0x31c0
jmp 0x52d3
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
jne 0x5306
jmp 0x530b
movq %rax, %r14
movq -0xb0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x52fa
callq 0x31c0
jmp 0x52fa
movq %rax, %r14
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x530b
callq 0x31c0
movq %r14, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Client::insert_subscriber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Client::insert_subscriber(TopicName TN){
    list<TopicName>::iterator it=Lista_Topics_subscriptos.begin();
    for (; it!=Lista_Topics_subscriptos.end(); ++it){}
    if( it == Lista_Topics_subscriptos.end()){
            Lista_Topics_subscriptos.insert(Lista_Topics_subscriptos.begin(),TN);
            B->Broker_insert_subscriber(TN, this); // subscribir el Client en el map(subscriptos) del broker
        }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %r15
callq 0x7c28
movq %rax, %rdi
movq %r15, %rsi
callq 0x3050
incq 0x18(%rbx)
movq 0x20(%rbx), %r15
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x74c0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56a8
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x543a
callq 0x31c0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5458
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Client::unsuscribe_topic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Client::unsuscribe_topic(TopicName TN){
    for (list<TopicName>::iterator it=Lista_Topics_subscriptos.begin(); it!=Lista_Topics_subscriptos.end(); ++it){
        if(*it == TN){
            it=Lista_Topics_subscriptos.erase(it);
            B->Broker_unsuscribe_topic(TN, this);
        }
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x8(%rdi), %r14
movq %rdi, -0x38(%rbp)
movq 0x8(%rdi), %r13
cmpq %r14, %r13
je 0x551e
movq %rsi, %rbx
movq %r14, -0x30(%rbp)
movq -0x38(%rbp), %r15
movq 0x18(%r13), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x54b0
testq %rdx, %rdx
je 0x54b5
movq (%rbx), %rsi
movq 0x10(%r13), %rdi
callq 0x31f0
testl %eax, %eax
je 0x54b5
movq %r13, %r12
jmp 0x5511
movq (%r13), %r12
movq %r14, %rdi
movq %r13, %rsi
callq 0x7c76
movq 0x20(%r15), %rax
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %r14
movq %r14, -0x60(%rbp)
movq (%rbx), %rsi
movq %rbx, %r13
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x74c0
movq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x59ee
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x550a
callq 0x31c0
movq -0x30(%rbp), %r14
movq %r13, %rbx
movq (%r12), %r13
cmpq %r14, %r13
jne 0x5491
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x553e
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::ClientDestruction(Client*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Broker::ClientDestruction(Client * C, TopicName TN){
    this_thread::sleep_for (std::chrono::seconds(5));
    RetainedTopics.erase(TN);
    delete(C);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x30(%rbp), %r12
movq $0x5, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movq %r12, %rsi
callq 0x30b0
cmpl $-0x1, %eax
jne 0x5613
callq 0x3040
cmpl $0x4, (%rax)
je 0x55f9
addq $0x38, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7fbc
testq %rbx, %rbx
je 0x5630
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::Broker_Insert_Retained_Topic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Broker::Broker_Insert_Retained_Topic (TopicName TN, TopicValue TV){
    m_retainedTopics.lock();
    RetainedTopics[TN]=TV;
    m_retainedTopics.unlock();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0xd0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
jne 0x56a1
addq $0x38, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x81b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x3120
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movl %eax, %edi
callq 0x3140
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::Broker_insert_subscriber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Client*)
void Broker::Broker_insert_subscriber(TopicName TN, Client *C){
    m_subscriptos.lock();
    subscriptos.insert({TN,C});
    m_subscriptos.unlock();
    m_retainedTopics.lock();
    auto it = RetainedTopics.find(TN);
    if ( !(it == RetainedTopics.end())) // si ya hay un topic de esto retenido, mandarlo al SimClient
        C->getCif()->recvMsg(PublishMsg(it->first, it->second));
    m_retainedTopics.unlock();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
addq $0xf8, %rdi
movq %rdi, -0x38(%rbp)
callq 0x3270
testl %eax, %eax
jne 0x5817
leaq 0x70(%r12), %r13
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %r14
movq %r14, %rdi
callq 0x74c0
movq %rbx, -0x30(%rbp)
movq %rbx, 0x20(%r14)
movq %r13, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x8798
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x5733
callq 0x31c0
movq -0x38(%rbp), %rdi
callq 0x3170
leaq 0xd0(%r12), %rbx
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
movq -0x30(%rbp), %r14
jne 0x5817
addq $0x38, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8bee
testq %rax, %rax
je 0x57fd
movq %rax, %r15
movq 0x30(%r14), %r14
leaq -0x68(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x74c0
leaq -0x48(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x74c0
leaq -0xd0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
xorl %ecx, %ecx
callq 0x6b1c
movq (%r14), %rax
leaq -0xd0(%rbp), %rsi
movq %r14, %rdi
callq *(%rax)
leaq -0xd0(%rbp), %rdi
callq 0x6bae
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x57ef
callq 0x31c0
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x57fd
callq 0x31c0
movq %rbx, %rdi
callq 0x3170
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x6bae
jmp 0x5832
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x5845
callq 0x31c0
jmp 0x5845
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x5853
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
jne 0x584e
jmp 0x5853
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::Broker_warn_everybody_thisTopic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Broker::Broker_warn_everybody_thisTopic (TopicName Tn, TopicValue Tv){
    m_subscriptos.lock();
    auto its = subscriptos.equal_range(Tn); // encuentra todos los Client para un dado TopicName
    for (auto it = its.first; it != its.second; ++it) {
        // Le manda un publish a cada SimClient con el value del topic encontrado
        it->second->getCif()->recvMsg(PublishMsg(Tn, Tv)); // Si reemplazo cif por getCif() el proceso no devuelve todo el output
    }
    m_subscriptos.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, -0x48(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
addq $0xf8, %rdi
movq %rdi, -0x30(%rbp)
callq 0x3270
testl %eax, %eax
jne 0x599f
addq $0x70, %r14
movq %r14, %rdi
movq %rbx, -0x40(%rbp)
movq %rbx, %rsi
callq 0x8516
movq %rdx, -0x38(%rbp)
cmpq %rdx, %rax
je 0x5984
movq %rax, %r12
leaq -0x68(%rbp), %rbx
leaq -0x88(%rbp), %r15
leaq -0xe0(%rbp), %r14
movq 0x28(%r12), %rax
movq 0x30(%rax), %r13
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x74c0
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x74c0
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x6b1c
movq (%r13), %rax
movq %r13, %rdi
movq %r14, %rsi
callq *(%rax)
movq %r14, %rdi
callq 0x6bae
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x5960
callq 0x31c0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x5972
callq 0x31c0
movq (%r12), %r12
cmpq -0x38(%rbp), %r12
leaq -0x68(%rbp), %rbx
jne 0x58df
movq -0x30(%rbp), %rdi
callq 0x3170
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
movq %rax, %rbx
jmp 0x59d4
movq %rax, %rbx
jmp 0x59bf
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x6bae
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x59d4
callq 0x31c0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x59e6
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::Broker_unsuscribe_topic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Client*)
void Broker::Broker_unsuscribe_topic(TopicName TN, Client *C){
    m_subscriptos.lock();
    // para un dado TopicName, encuentra todos los Clientes del map(subscriptores) del broker y los pone en its
    auto its = subscriptos.equal_range(TN);
    // Busco el client "This" entre los Client en "its" y lo remuevo del map
    auto it = its.first;
    for (; it != its.second && it->second != C; ++it){}
    if(it->second==C) //NOSE PORQUE ESTO NO ANDA SI NO ESTOY SUBSCRIPTO(SEG FAULT)
        subscriptos.erase(it);
    m_subscriptos.unlock();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xf8(%rdi), %rbx
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
jne 0x5a55
addq $0x70, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x8516
cmpq %rdx, %rax
je 0x5a34
cmpq %r15, 0x28(%rax)
je 0x5a34
movq (%rax), %rax
jmp 0x5a24
cmpq %r15, 0x28(%rax)
jne 0x5a45
movq %r14, %rdi
movq %rax, %rsi
callq 0x86b0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movl %eax, %edi
callq 0x3140
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::~Broker()
Broker::~Broker(){

    unordered_map<ClientOpsIF *, Client *> ::iterator it = clients.begin();
    while(it != clients.end()){
	    delete(it->second);
	    it++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x5a83
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x5a7e
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r14), %r14
jmp 0x5a6a
leaq 0x70(%rbx), %rdi
callq 0x6e98
leaq 0x38(%rbx), %rdi
callq 0x6f38
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x7014
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: Broker::registerClient(ClientOpsIF*)
BrokerOpsIF * Broker::registerClient(ClientOpsIF *c){
    m_clients.lock();
    unordered_map<ClientOpsIF *, Client *>::const_iterator got = clients.find (c);
    // if Client is not register, register it in the map(clients) of broker and give it the pointer
    if ( got == clients.end() || got->second == nullptr){
        Client *Br = new Client(c);
        clients.insert ( {c,Br} );
        m_clients.unlock();
        return (BrokerOpsIF *) Br;
    } 
    else{ //if it is registered, and has a client, give it to him
        m_clients.unlock();
        return (BrokerOpsIF *)got->second;
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0xa8(%rdi), %rbx
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
jne 0x5b93
movq (%r14), %rsi
movq 0x8(%r14), %rdi
xorl %r9d, %r9d
movq %r15, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x5b27
movq (%rax), %r8
movq %rax, %r9
cmpq %r15, 0x8(%r8)
je 0x5b27
movq %rdx, %rcx
movq %r8, %r10
movq (%r8), %r8
testq %r8, %r8
je 0x5b24
movq 0x8(%r8), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r9d
cmpq %rcx, %rdx
jne 0x5b27
movq %r10, %r9
cmpq %r15, %rsi
jne 0x5af8
jmp 0x5b27
xorl %r9d, %r9d
testq %r9, %r9
je 0x5b31
movq (%r9), %r12
jmp 0x5b34
xorl %r12d, %r12d
testq %r12, %r12
je 0x5b50
cmpq $0x0, 0x10(%r12)
je 0x5b50
movq %rbx, %rdi
callq 0x3170
movq 0x10(%r12), %r12
jmp 0x5b83
movl $0x178, %edi            # imm = 0x178
callq 0x31e0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x4354
leaq -0x30(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movq %r14, %rdi
callq 0x7cfa
movq %rbx, %rdi
callq 0x3170
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
movq %rax, %rbx
movq %r12, %rdi
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: SimPublisher::Publish()
void SimPublisher::Publish (void){
        // Empezar a publicar valores
    for (unsigned int i=0; i<Par_del_client.time_conection; ++i){
        std::this_thread::sleep_for (std::chrono::seconds(1));
        brops->sendMsg(PublishMsg(Par_del_client.topic_name, to_string(rand()%Par_del_client.error - Par_del_client.error/2 + Par_del_client.topic_value), Par_del_client.retain));
    }
    // Disconnect luego del tiempo de vida
    brops->sendMsg(DisconnectMsg{});
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r12
cmpl $0x0, 0x88(%rdi)
je 0x622c
leaq -0x70(%rbp), %r15
xorl %ebx, %ebx
leaq -0xd8(%rbp), %r14
leaq -0x80(%rbp), %r13
movq %r12, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq $0x1, -0xd8(%rbp)
movq $0x0, -0xd0(%rbp)
movq %r14, %rdi
movq %r14, %rsi
callq 0x30b0
cmpl $-0x1, %eax
jne 0x60e8
callq 0x3040
cmpl $0x4, (%rax)
je 0x60ce
movq 0xf8(%r12), %rax
movq %rax, -0x40(%rbp)
movq %r15, -0x80(%rbp)
movq 0x58(%r12), %rsi
movq 0x60(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x74c0
callq 0x3070
movl 0x80(%r12), %ecx
cltd
idivl %ecx
movl %edx, %r15d
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
subl %eax, %r15d
addl 0x7c(%r12), %r15d
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %r13d
cmpl $0xa, %r12d
leaq -0x60(%rbp), %rbx
jb 0x6192
movl $0x4, %r13d
movl %r12d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x6189
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x618f
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x6192
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x6159
addl $-0x3, %r13d
jmp 0x6192
addl $-0x2, %r13d
jmp 0x6192
decl %r13d
shrl $0x1f, %r15d
leal (%r15,%r13), %esi
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x3210
movl %r15d, %edi
addq -0x60(%rbp), %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x7341
movq -0x38(%rbp), %r12
movzbl 0x84(%r12), %ecx
movq %r14, %rdi
leaq -0x80(%rbp), %r13
movq %r13, %rsi
movq %rbx, %rdx
callq 0x6b1c
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
movq %r14, %rsi
leaq -0x70(%rbp), %r15
callq *0x10(%rax)
movq %r14, %rdi
callq 0x6bae
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x620b
callq 0x31c0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
movl -0x2c(%rbp), %ebx
je 0x621c
callq 0x31c0
incl %ebx
cmpl 0x88(%r12), %ebx
jb 0x60b5
movq 0xf8(%r12), %rdi
leaq 0x6a4d(%rip), %rax      # 0xcc88
leaq -0xd8(%rbp), %rsi
movq %rax, (%rsi)
movl $0x5, 0x8(%rsi)
movq (%rdi), %rax
callq *0x10(%rax)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x628f
movq %rax, %rbx
jmp 0x627d
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x6bae
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x628f
callq 0x31c0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x62a1
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: SimPublisher::recvMsg(Message const&)
void SimPublisher::recvMsg(const Message &m){
    switch (m.getType()){
        case Message::Type::CONNACK:
        {
            ConnAckMsg *M = (ConnAckMsg *)&m;
            recvConnack(M);
            break;
        }
        case Message::Type::PUBLISH:{
            PublishMsg *M = (PublishMsg *)&m;
            recvPublishMsg(M);
            break;
        }
        default:{ // Cualquier otro tipo de mensae recibido es indeseado
            mutex_cout.lock();
            cout << "Error al recibir Mensaje del Client: " << usuario_pass.username << endl;
            mutex_cout.unlock();
            return;}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpl $0x2, %eax
je 0x63a1
cmpl $0x1, %eax
jne 0x63ad
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x642a
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6568
leaq 0x6dfc(%rip), %rdi      # 0xd1b0
callq 0x3270
testl %eax, %eax
jne 0x6422
movq 0x6c14(%rip), %r14      # 0xcfd8
leaq 0x2e35(%rip), %rsi      # 0x9200
movl $0x25, %edx
movq %r14, %rdi
callq 0x3200
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x3200
movq %rax, %rbx
movq (%rax), %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 0x3150
leaq 0x6d97(%rip), %rdi      # 0xd1b0
popq %rbx
popq %r14
popq %rbp
jmp 0x3170
movl %eax, %edi
callq 0x3140
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: SimPublisher::recvConnack(ConnAckMsg*)
void SimPublisher::recvConnack(ConnAckMsg *M){
    
    switch ((int)(M->getStatusType())){
        case 0: // LOGIN_OK
        {
            mutex_cout.lock();
            cout << "From Client\tMessage: CONNACK\tto: "<< usuario_pass.username << " -> OK" << endl;
            mutex_cout.unlock();
            connack_value = true;
            ready = true;
            cond_var.notify_one();
            break;
        }
        case 1:{ // LOGIN ERROR
            mutex_cout.lock();
            cout << "From Client\tMessage: CONNACK\tto: "<< usuario_pass.username << " -> ERROR" << endl;
            mutex_cout.unlock();
            connack_value = false;
            ready = true;
            cond_var.notify_one();
            break;}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rsi), %eax
cmpl $0x1, %eax
je 0x64a2
testl %eax, %eax
jne 0x6555
leaq 0x6d62(%rip), %rdi      # 0xd1b0
callq 0x3270
testl %eax, %eax
jne 0x6560
movq 0x6b76(%rip), %r14      # 0xcfd8
leaq 0x2dbd(%rip), %rsi      # 0x9226
movl $0x21, %edx
movq %r14, %rdi
callq 0x3200
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x3200
movq %rax, %r14
leaq 0x2db8(%rip), %rsi      # 0x9248
movl $0x6, %edx
movq %rax, %rdi
callq 0x3200
movb $0x1, %r15b
jmp 0x64fb
leaq 0x6d07(%rip), %rdi      # 0xd1b0
callq 0x3270
testl %eax, %eax
jne 0x6560
movq 0x6b1b(%rip), %r14      # 0xcfd8
leaq 0x2d62(%rip), %rsi      # 0x9226
movl $0x21, %edx
movq %r14, %rdi
callq 0x3200
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x3200
movq %rax, %r14
leaq 0x2d64(%rip), %rsi      # 0x924f
movl $0x9, %edx
movq %rax, %rdi
callq 0x3200
xorl %r15d, %r15d
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 0x3150
leaq 0x6c87(%rip), %rdi      # 0xd1b0
callq 0x3170
movb %r15b, 0x90(%rbx)
movb $0x1, 0xf0(%rbx)
addq $0xc0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3100
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/mqtt.cpp
// Function: SimPublisher::recvPublishMsg(PublishMsg*) const
void SimPublisher::recvPublishMsg(PublishMsg *M) const{
    mutex_cout.lock();
    cout << "From Client\tMessage: PUBLISH\tto: "<< usuario_pass.username <<"\t" << "Topic " << M->getTopic() << ": " << M->getValue() << endl;
    mutex_cout.unlock();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x6c2c(%rip), %rdi      # 0xd1b0
callq 0x3270
testl %eax, %eax
jne 0x66b8
movq 0x6a40(%rip), %r15      # 0xcfd8
leaq 0x2cba(%rip), %rsi      # 0x9259
movl $0x21, %edx
movq %r15, %rdi
callq 0x3200
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %r15, %rdi
callq 0x3200
movq %rax, %r14
leaq 0x2b52(%rip), %rsi      # 0x9118
movl $0x1, %edx
movq %rax, %rdi
callq 0x3200
leaq 0x2b40(%rip), %rsi      # 0x911a
movl $0x6, %edx
movq %r14, %rdi
callq 0x3200
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x74c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x3200
movq %rax, %r14
leaq 0x2b27(%rip), %rsi      # 0x9147
movl $0x2, %edx
movq %rax, %rdi
callq 0x3200
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x74c0
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r14, %rdi
callq 0x3200
movq %rax, %rbx
movq (%rax), %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 0x3150
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x6691
callq 0x31c0
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x669f
callq 0x31c0
leaq 0x6b0a(%rip), %rdi      # 0xd1b0
callq 0x3170
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
jmp 0x66c1
movq %rax, %rbx
jmp 0x66d7
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x66d7
callq 0x31c0
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x66e5
callq 0x31c0
movq %rbx, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/./queue.h
// Function: cola<Message*, 100ul>::push(Message* const&)
void push(const T &t)
		{
			unique_lock<mutex> lock(m);
			while( q.size() == N ){
			  cond_var_put.wait(lock);
			}
			q.push(t);
			lock.unlock();
			cond_var_get.notify_one();
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
leaq -0x30(%rbp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x8c72
movb $0x1, 0x8(%r15)
leaq 0x78(%rbx), %r12
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x6, %rcx
movq 0x30(%rbx), %rax
movq %rax, %rdx
subq 0x38(%rbx), %rdx
movq 0x20(%rbx), %rsi
sarq $0x3, %rdx
subq 0x10(%rbx), %rsi
sarq $0x3, %rsi
addq %rdx, %rsi
addq %rcx, %rsi
cmpq $0x64, %rsi
jne 0x6935
movq %r12, %rdi
movq %r15, %rsi
callq 0x30a0
jmp 0x68e6
movq 0x40(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x694f
movq (%r14), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%rbx)
jmp 0x695a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x782e
leaq -0x30(%rbp), %rdi
callq 0x77fc
addq $0xa8, %rbx
movq %rbx, %rdi
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x6d9e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x6d9e
movq %rbx, %rdi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O1/andresziemecki[P]MQTT/./queue.h
// Function: cola<Message*, 100ul>::pop(Message**)
void pop(T *t)
		{
			unique_lock<mutex>lock(m);
			while(q.size() == 0){
				cond_var_get.wait(lock);
			}
			lock.unlock();
			cond_var_put.notify_one();
			*t = q.front();
			q.pop();
			return;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
leaq -0x30(%rbp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x8c72
movb $0x1, 0x8(%r15)
leaq 0xa8(%rbx), %r12
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x6, %rcx
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rdx
subq 0x38(%rbx), %rdx
sarq $0x3, %rdx
addq %rcx, %rdx
subq 0x10(%rbx), %rax
sarq $0x3, %rax
addq %rdx, %rax
jne 0x6a1d
movq %r12, %rdi
movq %r15, %rsi
callq 0x30a0
jmp 0x69d5
leaq -0x30(%rbp), %rdi
callq 0x77fc
leaq 0x78(%rbx), %rdi
callq 0x3100
movq 0x10(%rbx), %rax
movq (%rax), %rax
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x7a38
leaq -0x30(%rbp), %rdi
callq 0x6d9e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x6d9e
movq %rbx, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zcount(double, double, bool, bool)
unsigned long zcount(double min, double max, bool minex = false, bool maxex = false) {
        RangeSpec range(min, max, minex, maxex);
        SkipListNode *zn;
        unsigned long rank;
        unsigned long count = 0;

        /* Find first element in range */
        zn = first_in_range(range);

        /* Use rank of first element, if any, to determine preliminary count */
        if (zn != NULL) {
            rank = get_rank(zn->mScore, zn->mKey);
            count = (mLength - (rank - 1));

            /* Find last element in range */
            zn = last_in_range(range);

            /* Use rank of last element, if any, to determine the actual count */
            if (zn != NULL) {
                rank = get_rank(zn->mScore, zn->mKey);
                count -= (mLength - rank);
            }
        }
        return count;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movsd %xmm1, 0x8(%rax)
movb %sil, 0x10(%rax)
movb %dl, 0x11(%rax)
movq %rax, %rsi
callq 0x2960
testq %rax, %rax
je 0x1c14
movsd 0x8(%rax), %xmm0
movl 0x10(%rax), %esi
movq %rbx, %rdi
callq 0x2a30
movq 0x10(%rbx), %r14
subq %rax, %r14
incq %r14
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x2a90
testq %rax, %rax
je 0x1c17
movsd 0x8(%rax), %xmm0
movl 0x10(%rax), %esi
movq %rbx, %rdi
callq 0x2a30
addq %r14, %rax
subq 0x10(%rbx), %rax
movq %rax, %r14
jmp 0x1c17
xorl %r14d, %r14d
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zrem(int)
void zrem(KeyType key) {
        DictTypeIterator it = mDict.find(key);
        if (it != mDict.end()) {
            double score = it->second;
            private_delete(score, key);
            mDict.erase(it);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %esi, %rax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %r8
xorl %ebx, %ebx
xorl %edx, %edx
divq %r8
movq (%rcx,%rdx,8), %rax
testq %rax, %rax
je 0x1c5d
xorl %ebx, %ebx
cmpl %esi, (%rax)
je 0x1c5a
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x1c4b
jmp 0x1c5d
movq %rax, %rbx
testq %rbx, %rbx
je 0x1c68
leaq (%rcx,%rdx,8), %r14
jmp 0x1c6f
leaq (%rcx,%r8,8), %r14
movq (%r14), %rbx
cmpq (%rcx,%r8,8), %rbx
je 0x1c9b
leaq 0x20(%rdi), %r15
movsd 0x8(%rbx), %xmm0
callq 0x1f60
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2bce
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::~SortedSet()
~SortedSet() 
    {
        SkipListNode *node = mHeader->mLevel[0].mForward, *next;
        delete mHeader;
        while (node) {
            next = node->mLevel[0].mForward;
            delete node;
            node = next;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x20(%r15), %rdi
movq (%rdi), %r14
testq %r15, %r15
je 0x1ccf
callq 0x1150
movq %r15, %rdi
callq 0x1110
testq %r14, %r14
je 0x1cf0
movq 0x20(%r14), %rdi
movq (%rdi), %r15
callq 0x1150
movq %r14, %rdi
callq 0x1110
movq %r15, %r14
testq %r15, %r15
jne 0x1cd4
addq $0x20, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1d06
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zadd_generic(int, double, bool)
void zadd_generic(KeyType key, double score, bool incr) {
        DictTypeIterator it = mDict.find(key);
        if (it != mDict.end()) {
            double curscore = it->second;
            if (incr) {
                score += curscore;
            }
            if (score != curscore) {
                private_delete(curscore, key);
                private_insert(score, key);
                mDict[key] = score;
            }
        }
        else {
            private_insert(score, key);
            mDict[key] = score;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movapd %xmm0, %xmm1
movq %rdi, %rbx
movl %esi, -0xc(%rbp)
movslq %esi, %rax
movq 0x28(%rdi), %rdi
movq 0x30(%rbx), %r9
xorl %r8d, %r8d
xorl %edx, %edx
divq %r9
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x1ef0
xorl %r8d, %r8d
cmpl %esi, (%rax)
je 0x1eed
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x1ede
jmp 0x1ef0
movq %rax, %r8
testq %r8, %r8
jne 0x1ef9
movq (%rdi,%r9,8), %r8
cmpq (%rdi,%r9,8), %r8
je 0x1f2f
movsd 0x8(%r8), %xmm0
testb %cl, %cl
je 0x1f0d
addsd %xmm0, %xmm1
ucomisd %xmm0, %xmm1
jne 0x1f15
jnp 0x1f59
movq %rbx, %rdi
movsd %xmm1, -0x18(%rbp)
callq 0x1f60
movl -0xc(%rbp), %esi
movq %rbx, %rdi
movsd -0x18(%rbp), %xmm0
jmp 0x1f3b
movq %rbx, %rdi
movapd %xmm1, %xmm0
movsd %xmm1, -0x18(%rbp)
callq 0x2002
addq $0x20, %rbx
leaq -0xc(%rbp), %rsi
movq %rbx, %rdi
callq 0x2232
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::private_delete(double, int)
bool private_delete(double score, KeyType key) 
    {
        SkipListNode *update[SKIPLIST_MAXLEVEL], *x;
        int i;
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && x->mLevel[i].mForward->mScore < score)
                x = x->mLevel[i].mForward;
            update[i] = x;
        }
        /* We may have multiple elements with the same score, what we need
         * is to find the element with both the right score and key. */
        x = x->mLevel[0].mForward;
        if (x && score == x->mScore && x->mKey == key) {
            private_delete_node(x, update);
            delete x;
            return true;
        } 
        else {
            return false; /* not found */
        }
        return false; /* not found */
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x1fae
movq %rcx, %rdx
decq %rcx
movq %rcx, %r8
shlq $0x4, %r8
movq %rax, %r9
movq %r9, %rax
movq 0x20(%r9), %r9
movq (%r9,%r8), %r9
testq %r9, %r9
je 0x1fa0
ucomisd 0x8(%r9), %xmm0
ja 0x1f88
movq %rax, -0x110(%rbp,%rcx,8)
cmpq $0x1, %rdx
jg 0x1f78
movq 0x20(%rax), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x1ff5
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1ff5
jp 0x1ff5
cmpl %esi, 0x10(%rbx)
jne 0x1ff5
leaq -0x110(%rbp), %rdx
movq %rbx, %rsi
callq 0x2296
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x1fe9
callq 0x1150
movq %rbx, %rdi
callq 0x1110
movb $0x1, %al
jmp 0x1ff7
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::private_delete_node(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::SkipListNode*, SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::SkipListNode**)
void private_delete_node(SkipListNode *x, SkipListNode **update) 
    {
        int i;
        for (i = 0; i < mLevel; i++) {
            if (update[i]->mLevel[i].mForward == x) {
                update[i]->mLevel[i].mSpan += x->mLevel[i].mSpan - 1;
                update[i]->mLevel[i].mForward = x->mLevel[i].mForward;
            } else {
                update[i]->mLevel[i].mSpan -= 1;
            }
        }
        if (x->mLevel[0].mForward) {
            x->mLevel[0].mForward->mBackward = x->mBackward;
        } else {
            mTail = x->mBackward;
        }
        while(mLevel > 1 && mHeader->mLevel[mLevel-1].mForward == NULL)
            mLevel--;
        mLength--;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x22e8
shlq $0x3, %rax
xorl %ecx, %ecx
movq (%rdx,%rcx), %r8
movq 0x20(%r8), %r8
cmpq %rsi, (%r8,%rcx,2)
je 0x22be
decl 0x8(%r8,%rcx,2)
jmp 0x22df
movq 0x20(%rsi), %r9
movl 0x8(%r9,%rcx,2), %r10d
movl 0x8(%r8,%rcx,2), %r11d
addl %r11d, %r10d
decl %r10d
movl %r10d, 0x8(%r8,%rcx,2)
movq (%r9,%rcx,2), %r9
movq %r9, (%r8,%rcx,2)
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x22a9
movq 0x20(%rsi), %rax
movq (%rax), %rax
leaq 0x8(%rdi), %rcx
leaq 0x18(%rax), %rdx
testq %rax, %rax
cmoveq %rcx, %rdx
movq 0x18(%rsi), %rax
movq %rax, (%rdx)
movl 0x18(%rdi), %eax
cmpl $0x2, %eax
jl 0x2332
movq (%rdi), %rcx
movq 0x20(%rcx), %rcx
addq $-0x10, %rcx
movl %eax, %edx
shlq $0x4, %rdx
cmpq $0x0, (%rcx,%rdx)
jne 0x2332
leal -0x1(%rax), %edx
movl %edx, 0x18(%rdi)
cmpl $0x2, %eax
movl %edx, %eax
jg 0x2318
decq 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::first_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
SkipListNode* first_in_range(const RangeSpec &range) {
        SkipListNode *x;
        int i;
    
        /* If everything is out of range, return early. */
        if (!is_in_range(range)) return NULL;
    
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            /* Go forward while *OUT* of range. */
            while (x->mLevel[i].mForward && !score_gte_min(x->mLevel[i].mForward->mScore, range))
                x = x->mLevel[i].mForward;
        }
    
        /* This is an inner range, so the next node cannot be NULL. */
        x = x->mLevel[0].mForward;
        assert(x != NULL);

        /* Check if score <= max. */
        if (!score_lte_max(x->mScore, range)) return NULL;
        return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2b54
testb %al, %al
je 0x2a09
movq (%r14), %rax
movslq 0x18(%r14), %rcx
testq %rcx, %rcx
jle 0x29d8
movb 0x10(%rbx), %dl
movsd (%rbx), %xmm0
movq %rcx, %rsi
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq %rax, %r8
movq %r8, %rax
movq 0x20(%r8), %r8
movq (%r8,%rdi), %r8
testq %r8, %r8
je 0x29d2
movsd 0x8(%r8), %xmm1
xorl %r9d, %r9d
xorl %r10d, %r10d
ucomisd %xmm0, %xmm1
seta %r9b
setae %r10b
testb $0x1, %dl
cmovnel %r9d, %r10d
cmpb $0x1, %r10b
jne 0x299d
cmpq $0x1, %rsi
jg 0x298d
movq 0x20(%rax), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x2a10
movsd 0x8(%rbx), %xmm0
xorl %eax, %eax
xorl %edx, %edx
ucomisd 0x8(%rcx), %xmm0
seta %al
setae %dl
cmpb $0x0, 0x11(%rbx)
cmovnel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmovneq %rcx, %rax
jmp 0x2a0b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x711(%rip), %rdi       # 0x3128
leaq 0x63f(%rip), %rsi       # 0x305d
leaq 0x70d(%rip), %rcx       # 0x3132
movl $0xd8, %edx
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::get_rank(double, int)
unsigned long get_rank(double score, KeyType key) {
        SkipListNode *x;
        unsigned long rank = 0;
        int i;

        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && x->mLevel[i].mForward->mScore <= score) {
                rank += x->mLevel[i].mSpan;
                x = x->mLevel[i].mForward;
            }

            /* x might be equal to mHeader, so test if is header */
            if (not x->mIsHeader && x->mKey == key) {
                return rank;
            }
        }
        return 0;
    }

// Assembly:
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x2a8d
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
xorl %eax, %eax
leaq -0x1(%rcx), %rdi
movq 0x20(%rdx), %r9
movq %rdi, %r8
shlq $0x4, %r8
movq (%r9,%r8), %r10
testq %r10, %r10
je 0x2a76
ucomisd 0x8(%r10), %xmm0
jb 0x2a76
movq %r10, %rdx
movq %rax, %r10
movl 0x8(%r9,%r8), %eax
addq %r10, %rax
movq 0x20(%rdx), %r9
jmp 0x2a51
cmpb $0x0, (%rdx)
jne 0x2a80
cmpl %esi, 0x10(%rdx)
je 0x2a8b
cmpq $0x1, %rcx
movq %rdi, %rcx
jg 0x2a42
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::last_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
SkipListNode* last_in_range(const RangeSpec &range) {
        SkipListNode *x;
        int i;
    
        /* If everything is out of range, return early. */
        if (!is_in_range(range)) return NULL;
    
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            /* Go forward while *IN* range. */
            while (x->mLevel[i].mForward && score_lte_max(x->mLevel[i].mForward->mScore, range))
                x = x->mLevel[i].mForward;
        }
    
        /* This is an inner range, so this node cannot be NULL. */
        assert(x != NULL);
    
        /* Check if score >= min. */
        if (!score_gte_min(x->mScore, range)) return NULL;
        return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2b54
testb %al, %al
je 0x2b2d
movq (%r14), %rcx
movslq 0x18(%r14), %rax
testq %rax, %rax
jle 0x2b04
movb 0x11(%rbx), %dl
movsd 0x8(%rbx), %xmm0
movq %rax, %rsi
decq %rax
movq %rax, %rdi
shlq $0x4, %rdi
movq %rcx, %r8
movq %r8, %rcx
movq 0x20(%r8), %r8
movq (%r8,%rdi), %r8
testq %r8, %r8
je 0x2afe
xorl %r9d, %r9d
xorl %r10d, %r10d
ucomisd 0x8(%r8), %xmm0
seta %r9b
setae %r10b
testb $0x1, %dl
cmovnel %r9d, %r10d
testb %r10b, %r10b
jne 0x2ace
cmpq $0x1, %rsi
jg 0x2abe
testq %rcx, %rcx
je 0x2b34
movsd 0x8(%rcx), %xmm0
xorl %eax, %eax
xorl %edx, %edx
ucomisd (%rbx), %xmm0
seta %al
setae %dl
cmpb $0x0, 0x10(%rbx)
cmovnel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmovneq %rcx, %rax
jmp 0x2b2f
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x5ed(%rip), %rdi       # 0x3128
leaq 0x51b(%rip), %rsi       # 0x305d
leaq 0x676(%rip), %rcx       # 0x31bf
movl $0xf0, %edx
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::is_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
bool is_in_range(const RangeSpec &range) {
        SkipListNode *x;
        /* Test for ranges that will always be empty. */
        if (range.mMin > range.mMax || (range.mMin == range.mMax && (range.mMinex || range.mMaxex)))
            return false;
        x = mTail;
        if (x == NULL || !score_gte_min(x->mScore, range))
            return false;
        x = mHeader->mLevel[0].mForward;
        if (x == NULL || !score_lte_max(x->mScore, range))
            return false;
        return true;
    }

// Assembly:
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm1
ja 0x2bc6
jne 0x2b73
jp 0x2b73
cmpb $0x0, 0x10(%rsi)
jne 0x2bc6
cmpb $0x0, 0x11(%rsi)
jne 0x2bc6
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2bc6
pushq %rbp
movq %rsp, %rbp
movsd 0x8(%rax), %xmm2
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm1, %xmm2
seta %al
setae %cl
cmpb $0x0, 0x10(%rsi)
cmovnel %eax, %ecx
cmpb $0x1, %cl
jne 0x2bc9
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x2bc9
xorl %edx, %edx
xorl %eax, %eax
ucomisd 0x8(%rcx), %xmm0
seta %dl
setae %al
cmpb $0x0, 0x11(%rsi)
cmovnel %edx, %eax
jmp 0x2bcb
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zrank_generic(int, bool, unsigned long&)
bool zrank_generic(KeyType key, bool reverse, unsigned long &rank) {
        unsigned long llen = length();
        DictTypeIterator it = mDict.find(key);
        if (it != mDict.end()) {
            double score = it->second;
            rank = get_rank(score, key);
            if (reverse) {
                rank = llen - rank;
            }
            else {
                rank -= 1;
            }
            return true;
        }
        else {
            return false;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movq 0x28(%rdi), %rcx
movslq %esi, %rax
movq 0x30(%rdi), %r8
xorl %r15d, %r15d
xorl %edx, %edx
divq %r8
movq (%rcx,%rdx,8), %rax
testq %rax, %rax
je 0x2c4f
xorl %r15d, %r15d
cmpl %esi, (%rax)
je 0x2c4c
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x2c3d
jmp 0x2c4f
movq %rax, %r15
testq %r15, %r15
jne 0x2c58
movq (%rcx,%r8,8), %r15
movq (%rcx,%r8,8), %r12
cmpq %r12, %r15
je 0x2c80
movq 0x10(%rdi), %r13
movsd 0x8(%r15), %xmm0
callq 0x2a30
subq %rax, %r13
decq %rax
testb %r14b, %r14b
cmovneq %r13, %rax
movq %rax, (%rbx)
cmpq %r12, %r15
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop