LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ixchow[P]http-tweak/tweak.cpp
// Function: utf8_to_json(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static std::string utf8_to_json(std::string const &data) {
	std::string ret;
	auto it = std::back_inserter(ret);

	*it = '"'; ++it;
	for (auto c = data.begin(); c != data.end(); ++c) {
		if (*c == '\\' || *c == '"') {
			*it = '\\'; ++it; *it = *c; ++it;
		} else {
			*it = *c; ++it;
		}
	}
	*it = '"'; ++it;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movq %rdi, -0x30(%rbp)
pushq $0x22
popq %rsi
callq 0x3310
movq (%r14), %rax
pushq $0x5c
popq %r15
leaq -0x30(%rbp), %r12
movq %rax, %r13
addq 0x8(%r14), %rax
cmpq %rax, %r13
je 0x4b31
movzbl (%r13), %eax
cmpl $0x5c, %eax
je 0x4b12
cmpl $0x22, %eax
jne 0x4b1e
movq -0x30(%rbp), %rdi
movl %r15d, %esi
callq 0x3310
movq %r12, %rdi
movq %r13, %rsi
callq 0x7f8e
incq %r13
movq (%r14), %rax
jmp 0x4afa
movq -0x30(%rbp), %rdi
pushq $0x22
popq %rsi
callq 0x3310
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4b55
jmp 0x4b55
jmp 0x4b55
movq %rax, %r14
movq %rbx, %rdi
callq 0x31c0
movq %r14, %rdi
callq 0x3540
// File: /workspace/github_cpp_makefile_star2_O2/ixchow[P]http-tweak/./http.hpp
// Function: http::server::~server()
inline server::~server() {
	#ifdef _WIN32
	WSACleanup();
	#endif //_WIN32
	closesocket(listen_socket);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x35b0
leaq 0x28(%rbx), %rdi
callq 0x6ad8
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6b10
movq %rax, %rdi
callq 0x3c4e
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: sendMessage(int, int)
packet_t sendMessage(int tag, int target) {
    packet_t packet;
    packet.lamport = Monitor::incrementLamportOnSend();
    MPI_Send(&packet, sizeof(packet_t), MPI_BYTE, target, tag, MPI_COMM_WORLD);
    return packet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x459a
movl %eax, 0x8(%r15)
movq 0x5bd6(%rip), %rdx      # 0x7fc0
movq 0x5bdf(%rip), %r9       # 0x7fd0
pushq $0x28
popq %rsi
movq %r15, %rdi
movl %ebx, %ecx
movl %r14d, %r8d
callq 0x2070
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: handleResurrectionFinished(void*)
void *handleResurrectionFinished(void* x) {
    int t = rand()%2+1;
    sleep(t);
    pthread_mutex_lock(&Monitor::skeletonsMutex);
    Monitor::currentSkeletons+=1;
    pthread_mutex_unlock(&Monitor::skeletonsMutex);
    pthread_mutex_unlock(&Monitor::newOrderMutex);
    printf("%u: Dragon died after %ds\n",Monitor::getLamport(),t);
    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x2050
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %edx, %ebx
incl %ebx
movl %ebx, %edi
callq 0x20b0
leaq 0x5d85(%rip), %r14      # 0x81b8
movq %r14, %rdi
callq 0x2180
leaq 0x5cd6(%rip), %rax      # 0x8118
incl (%rax)
movq %r14, %rdi
callq 0x20c0
leaq 0x5d8d(%rip), %rdi      # 0x81e0
callq 0x20c0
callq 0x45d2
leaq 0x2c70(%rip), %rdi      # 0x50d4
movl %eax, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2030
xorl %edi, %edi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: issuerMonitor(void*)
void *issuerMonitor (void* x) {
    packet_t packet;
    pthread_t handleResurrection;
    bool end = false;
    while(!end) {
        packet = Monitor::receiveMessage();
        if(packet.status.MPI_TAG == RESURRECTION_FINISHED)
            pthread_create( &handleResurrection, NULL, &handleResurrectionFinished,NULL);
        else {
            end = true;
            printf("%u: issuer ends listining\n",Monitor::getLamport());
        }
    }
    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0x58(%rbp), %rbx
leaq -0x83(%rip), %r14       # 0x240f
leaq -0x30(%rbp), %r15
leaq 0x2c52(%rip), %r12      # 0x50ef
movq %rbx, %rdi
callq 0x447a
movl -0x44(%rbp), %r13d
cmpl $0x77, %r13d
jne 0x24c0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x21f0
jmp 0x24d1
callq 0x45d2
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
cmpl $0x77, %r13d
je 0x249d
xorl %edi, %edi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: handleLoop(void*)
void *handleLoop (void* s ) {
    Specialist *specialist = (Specialist*) s;
    bool end = false;
    int count = 0;
    while(!end) {
        pthread_mutex_lock(&Monitor::handleMutex); // czeka, aż kolejka nie będzie pusta
        pthread_mutex_lock(&Monitor::messageQueueMutex); // dostęp do kolejki wiadomości
        if(!Monitor::messageQueue.empty()) {
            packet_t packet = Monitor::messageQueue.front();           
            Monitor::messageQueue.pop();
            pthread_mutex_unlock(&Monitor::messageQueueMutex);
            if(!specialist->handle(packet)) {
                end = true;
            }
        } else {
            pthread_mutex_unlock(&Monitor::messageQueueMutex);
        }

        pthread_mutex_lock(&Monitor::messageQueueMutex);
        if(!Monitor::messageQueue.empty()) {
            pthread_mutex_unlock(&Monitor::handleMutex); // kolejka nie jest pusta, lecimy dalej
        }
        pthread_mutex_unlock(&Monitor::messageQueueMutex);       
        count++;
    }
    Monitor::endListening();
    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x5c6f(%rip), %r14      # 0x8168
leaq 0x5c90(%rip), %r15      # 0x8190
leaq 0x5d01(%rip), %r12      # 0x8208
movq %r14, %rdi
callq 0x2180
movq %r15, %rdi
callq 0x2180
movq 0x10(%r12), %rax
cmpq %rax, 0x30(%r12)
je 0x2576
movq 0x20(%rax), %rcx
movq %rcx, -0x30(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq %r12, %rdi
callq 0x437c
movq %r15, %rdi
callq 0x20c0
movq (%rbx), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x20(%rsp)
movaps -0x50(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq *0x10(%rax)
movl %eax, %r13d
xorb $0x1, %r13b
jmp 0x2581
movq %r15, %rdi
callq 0x20c0
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x2180
movq 0x30(%r12), %rax
cmpq 0x10(%r12), %rax
je 0x259d
movq %r14, %rdi
callq 0x20c0
movq %r15, %rdi
callq 0x20c0
testb %r13b, %r13b
je 0x2507
callq 0x458c
xorl %edi, %edi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: rootLoop(int)
void rootLoop(int size){
    printf("Heads: 3, 6, 9...\nBodies: 1, 4, 7...\nTails: 2, 5, 8...\nSKELETON_NUMBER %d\nDESK_NUMBER %d\nORDER_NUMBER %d\n",SKELETON_NUMBER,DESK_NUMBER,ORDER_NUMBER);
    pthread_t issuerMonitorThread;
    pthread_create( &issuerMonitorThread, NULL, &issuerMonitor,NULL);

    packet_t packet;
    packet.data = 0;
    int orderId = 1;
    sleep(12);

    // while(orderId <= ORDER_NUMBER) { 
    while(true) { 
        pthread_mutex_lock(&Monitor::newOrderMutex);

        pthread_mutex_lock(&Monitor::skeletonsMutex);
        Monitor::currentSkeletons-=1;
        pthread_mutex_unlock(&Monitor::skeletonsMutex);
        
        if(Monitor::currentSkeletons > 0)
            pthread_mutex_unlock(&Monitor::newOrderMutex);
        
        // sleep(2);
        packet.lamport = Monitor::getLamport();
        printf("%u: New order no. %d!\n",Monitor::getLamport() ,orderId);
        for(int i = 1;i < size; i++){ // broadcast NEW_ORDER
            if(i%3 + 1 == TAIL) {
                sendMessage(NEW_ORDER,i);
            }
        }
        orderId++;
    }

    // sleep(3);
    // for(int i = 1;i < size; i++){ // broadcast END
    //     MPI_Send(&packet, sizeof(packet_t), MPI_BYTE, i, END, MPI_COMM_WORLD);
    // }
    // sendMessage(END, ISSUER);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edi, %ebx
leaq 0x2b36(%rip), %rdi      # 0x510a
pushq $0x2
popq %rsi
pushq $0x1
popq %r12
pushq $0x5
popq %rcx
movl %r12d, %edx
xorl %eax, %eax
callq 0x2030
leaq -0x179(%rip), %rdx      # 0x2476
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x21f0
pushq $0xc
popq %rdi
callq 0x20b0
leaq 0x5bd5(%rip), %r13      # 0x81e0
pushq $0x3
popq %r14
pushq $0x64
popq %r15
movl %r12d, -0x2c(%rbp)
movq %r13, %rdi
callq 0x2180
leaq 0x5b92(%rip), %r12      # 0x81b8
movq %r12, %rdi
callq 0x2180
leaq 0x5ae3(%rip), %rax      # 0x8118
decl (%rax)
movq %r12, %rdi
callq 0x20c0
leaq 0x5ad2(%rip), %rax      # 0x8118
cmpl $0x0, (%rax)
jle 0x2653
movq %r13, %rdi
callq 0x20c0
callq 0x45d2
callq 0x45d2
leaq 0x2b10(%rip), %rdi      # 0x5174
movl %eax, %esi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2030
pushq $0x1
popq %r12
movl %r12d, %r13d
movl %r12d, %eax
xorl %edx, %edx
divl %r14d
cmpl %ebx, %r12d
jge 0x26a3
leal (%rax,%rax,2), %eax
addl %r13d, %eax
jne 0x269b
leaq -0x60(%rbp), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x23c8
incl %r12d
decl %r13d
jmp 0x2677
incl -0x2c(%rbp)
leaq 0x5b33(%rip), %r13      # 0x81e0
jmp 0x2617
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: headLoop()
void headLoop(){
    Specialist *specialist = new HeadSpecialist(Monitor::rank, Monitor::size);
    pthread_t handleThread;
    pthread_create( &handleThread, NULL, &handleLoop, specialist);
    Monitor::listen();
    pthread_join(handleThread,NULL);
    delete specialist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x20
popq %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x5a5d(%rip), %rax      # 0x812c
movl (%rax), %esi
leaq 0x5a58(%rip), %rax      # 0x8130
movl (%rax), %edx
movq %rbx, %rdi
callq 0x28c8
leaq -0x20b(%rip), %rdx      # 0x24de
leaq -0x18(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x21f0
callq 0x44e6
movq (%r14), %rdi
xorl %esi, %esi
callq 0x2110
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: bodyLoop()
void bodyLoop(){
    Specialist *specialist = new BodySpecialist(Monitor::rank, Monitor::size);
    pthread_t handleThread;
    pthread_create( &handleThread, NULL, &handleLoop, specialist);
    Monitor::listen();
    pthread_join(handleThread,NULL);
    delete specialist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x70
popq %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x59de(%rip), %rax      # 0x812c
movl (%rax), %esi
leaq 0x59d9(%rip), %rax      # 0x8130
movl (%rax), %edx
movq %rbx, %rdi
callq 0x291c
leaq -0x28a(%rip), %rdx      # 0x24de
leaq -0x18(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x21f0
callq 0x44e6
movq (%r14), %rdi
xorl %esi, %esi
callq 0x2110
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x70
popq %rsi
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: tailLoop()
void tailLoop(){   
    Specialist *specialist = new TailSpecialist(Monitor::rank,Monitor::size);
    pthread_t handleThread;
    pthread_create(&handleThread, NULL, &handleLoop, specialist);
    Monitor::listen();
    pthread_join(handleThread,NULL);
    delete specialist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x78
popq %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x595f(%rip), %rax      # 0x812c
movl (%rax), %esi
leaq 0x595a(%rip), %rax      # 0x8130
movl (%rax), %edx
movq %rbx, %rdi
callq 0x295e
leaq -0x309(%rip), %rdx      # 0x24de
leaq -0x18(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x21f0
callq 0x44e6
movq (%r14), %rdi
xorl %esi, %esi
callq 0x2110
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x78
popq %rsi
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/main.cpp
// Function: main
int main(int argc, char **argv)
{
    int provided;
    MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
    if(check_thread_support(provided)) {
        Monitor::initialize();

        int type = Monitor::rank%3 + 1;
        if (Monitor::rank == ISSUER){
            rootLoop(Monitor::size);
        } else if (type == HEAD) {
            headLoop();
        } else if (type == BODY) {
            bodyLoop();
        } else if (type == TAIL) {
            tailLoop();
        }
    } else {
        printf("Multiple threads are not supported by open mpi. Exiting application");
    }
    MPI_Finalize();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x18(%rbp), %rax
movl %edi, (%rax)
leaq -0x20(%rbp), %rcx
movq %rsi, (%rcx)
pushq $0x3
popq %rbx
leaq -0x14(%rbp), %r14
movq %rax, %rdi
movq %rcx, %rsi
movl %ebx, %edx
movq %r14, %rcx
callq 0x2040
cmpl $0x3, (%r14)
jl 0x288e
callq 0x441e
leaq 0x58bc(%rip), %rax      # 0x812c
movl (%rax), %eax
testl %eax, %eax
je 0x28ba
cltd
idivl %ebx
cmpl $0x2, %edx
je 0x28b3
cmpl $0x1, %edx
je 0x28ac
testl %edx, %edx
jne 0x289c
callq 0x26b2
jmp 0x289c
leaq 0x28f6(%rip), %rdi      # 0x518b
xorl %eax, %eax
callq 0x2030
callq 0x20d0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2731
jmp 0x289c
callq 0x27b0
jmp 0x289c
leaq 0x586f(%rip), %rax      # 0x8130
movl (%rax), %edi
callq 0x25ba
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::TailSpecialist(int, int)
TailSpecialist(int rank, int size):Specialist(rank, size) {
        this->headRank = 0;
        this->bodyRank = 0;
        this->handlingNeedTail = false;
        this->gettingResurrectionOrder = false;
        this->availableOrders = 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4ac8
leaq 0x53b5(%rip), %rax      # 0x7d28
movq %rax, (%rbx)
andq $0x0, 0x18(%rbx)
andw $0x0, 0x28(%rbx)
andl $0x0, 0x24(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/HeadSpecialist.cpp
// Function: HeadSpecialist::handle(packet_t)
bool handle(packet_t packet) {    
        bool success = true;
        switch(packet.status.MPI_TAG){
            case AVENGERS_ASSEMBLE:
                success = this->handleAvengersAssemble(packet); break;
            case NEED_BODY_POSITIVE:
                success = this->handleNeedBodyPositive(packet); break;
            case NEED_BODY_NEGATIVE:
                success = this->handleNeedBodyNegative(packet); break;
            case AVENGERS_ASSEMBLED:
                success = this->handleAvengersAssembled(packet); break;
            case RESURRECTION_FINISHED:
                success = this->handleResurrectionFinished(packet); break;
            case END:
                success = this->handleEnd(packet); break;
            default: 
                printf("%u: No handler for tag %d in HeadSpecialist\n", Monitor::getLamport(), packet.status.MPI_TAG); break;
        }
        return success;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
movl 0x24(%rbp), %ebx
leal -0x68(%rbx), %eax
cmpl $0x9, %eax
ja 0x29f9
leaq 0x2622(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsi, %rdi
addq $0x28, %rsp
popq %rbx
popq %rbp
jmp 0x2a66
cmpl $0x65, %ebx
je 0x2a57
cmpl $0x77, %ebx
jne 0x2a1d
movb $0x0, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
movl 0x8(%rsi), %ecx
leaq -0x30(%rbp), %rdi
pushq $0x68
popq %rdx
callq 0x4b00
jmp 0x2a40
callq 0x45d2
leaq 0x27a6(%rip), %rdi      # 0x51cf
movl %eax, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2030
jmp 0x2a40
leaq 0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x1c(%rsi)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rsi, %rdi
addq $0x28, %rsp
popq %rbx
popq %rbp
jmp 0x2ac8
movq %rsi, %rdi
addq $0x28, %rsp
popq %rbx
popq %rbp
jmp 0x4e4a
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/HeadSpecialist.cpp
// Function: HeadSpecialist::handleNeedBodyPositive(packet_t)
bool handleNeedBodyPositive(packet_t packet) {       
        if(!this->inTeam) {           
            this->bodyRank = packet.status.MPI_SOURCE;
            this->inTeam = true;
            this->sendMessage(NEED_BODY_POSITIVE, packet.status.MPI_SOURCE);
        } else {
            this->sendMessage(NEED_BODY_NEGATIVE, packet.status.MPI_SOURCE);
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, %rsi
movl 0x20(%rbp), %ecx
cmpb $0x0, 0x10(%rdi)
je 0x2ae4
leaq -0x28(%rbp), %rdi
pushq $0x6c
jmp 0x2af1
movl %ecx, 0x18(%rsi)
movb $0x1, 0x10(%rsi)
leaq -0x28(%rbp), %rdi
pushq $0x6b
popq %rdx
callq 0x4b00
movb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handleNeedBody(packet_t)
bool handleNeedBody(packet_t packet) {    
        if(this->headRank == 0) {
            if(!handlingNeedBody) {
                this->handlingNeedBody = true;
                this->bodyList.clear();
                this->headList.clear();
                packet_t packet = this->createSelfPacket();
                packet_t sentPacket = this->broadcastMessage(packet, NEED_BODY_ACK, BODY);
                this->bodyList.push_back(sentPacket);
                this->sendMessage(FINISH_NEED_BODY, this->rank);
            }
            this->headList.push_back(packet);
        }
        return true;
    }

// Assembly:
cmpl $0x0, 0x18(%rdi)
jne 0x2e19
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x10(%rbp), %r14
cmpb $0x0, 0x24(%rdi)
jne 0x2dfb
movb $0x1, 0x24(%rbx)
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x2d87
movq %rax, 0x48(%rbx)
leaq 0x40(%rbx), %r15
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x2d99
movq %rax, 0x30(%rbx)
leaq -0x98(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4b8c
movq 0x20(%r12), %rax
movq %rax, 0x20(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x70(%rbp), %r12
pushq $0x69
popq %rdx
pushq $0x2
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d7e
movq %r15, %rdi
movq %r12, %rsi
callq 0x2fe0
movl 0x8(%rbx), %ecx
leaq -0x48(%rbp), %rdi
pushq $0x6a
popq %rdx
movq %rbx, %rsi
callq 0x4b00
addq $0x28, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2fe0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handleFinishNeedBody(packet_t)
bool handleFinishNeedBody(packet_t packet) {    
        if(this->headRank == 0) {
            this->handlingNeedBody = false;
            std::sort(this->bodyList.begin(), this->bodyList.end(), comparePackets);
            std::sort(this->headList.begin(), this->headList.end(), comparePackets);
            unsigned int me = this->getSelfIndexFromBodyList();
            bool haveMatchingHead = (this->headList.size() > me) && (me < this->bodyList.size());
            if(haveMatchingHead) {               
                this->inTeam = true;
                this->sendMessage(NEED_BODY_POSITIVE, this->headList[me].status.MPI_SOURCE);
                
                if(me == 0) {
                    this->notifyHeadsWithNoBodiesAssigned();
                }
            }
        }
        return true;
    }

// Assembly:
cmpl $0x0, 0x18(%rdi)
jne 0x2ec6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movb $0x0, 0x24(%rdi)
movq 0x40(%rdi), %rdi
movq 0x48(%rbx), %rsi
leaq 0x359(%rip), %r14       # 0x31a0
movq %r14, %rdx
callq 0x3294
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
movq %r14, %rdx
callq 0x3294
movq %rbx, %rdi
callq 0x31ce
movl %eax, %ecx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rax
subq %rsi, %rax
pushq $0x28
popq %rdi
cqto
idivq %rdi
movl %ecx, %r14d
cmpq %r14, %rax
jbe 0x2ebe
movq 0x48(%rbx), %rax
subq 0x40(%rbx), %rax
cqto
idivq %rdi
cmpq %r14, %rax
jbe 0x2ebe
movb $0x1, 0x10(%rbx)
imulq $0x28, %r14, %rax
movl 0x10(%rsi,%rax), %ecx
leaq -0x38(%rbp), %rdi
pushq $0x6b
popq %rdx
movq %rbx, %rsi
callq 0x4b00
testq %r14, %r14
jne 0x2ebe
movq %rbx, %rdi
callq 0x320c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handleNeedTailPositive(packet_t)
bool handleNeedTailPositive(packet_t packet) {
        if(this->tailRank == 0) {           
            this->tailRank = packet.status.MPI_SOURCE;
            this->inTeam = true;
            this->sendMessage(NEED_TAIL_POSITIVE, packet.status.MPI_SOURCE);
        } else {
            this->sendMessage(NEED_TAIL_NEGATIVE, packet.status.MPI_SOURCE);
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, %rsi
cmpl $0x0, 0x1c(%rdi)
movl 0x20(%rbp), %ecx
je 0x2ee6
leaq -0x28(%rbp), %rdi
pushq $0x70
jmp 0x2ef3
movl %ecx, 0x1c(%rsi)
movb $0x1, 0x10(%rsi)
leaq -0x28(%rbp), %rdi
pushq $0x6f
popq %rdx
callq 0x4b00
movb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handleAvengersAssemble(packet_t)
bool handleAvengersAssemble(packet_t packet) {
        if(this->inTeam) {
            packet_t packet = this->createSelfPacket();
            packet.data = this->headRank;
            this->broadcastMessage(packet, NEED_TAIL, TAIL);
        }
        return true;
    }

// Assembly:
cmpb $0x1, 0x10(%rdi)
jne 0x2f66
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b8c
movl 0x18(%rbx), %eax
movl %eax, (%r14)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x38(%rbp), %rdi
pushq $0x67
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rsi
callq 0x4d7e
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handleDoPaperwork(packet_t)
bool handleDoPaperwork(packet_t packet) {
        this->needDeskReplyCounter = 1/3*(this->size+1)-1;
        packet = this->broadcastMessage(NEED_DESK_REQUEST, BODY); // mowi innym BODY, zeby go dodali do kolejki
        deskPriority.push_back(packet); // dodaje siebie
        this->gettingDesk = true;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
orl $-0x1, 0x20(%rdi)
leaq 0x10(%rbp), %r14
pushq $0x78
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4d0e
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x2fe0
movb $0x1, 0x25(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::getSelfIndexFromBodyList()
unsigned int getSelfIndexFromBodyList() {
        for(unsigned int i=0; i<this->bodyList.size(); i++) {
            if(this->rank == this->bodyList[i].status.MPI_SOURCE)
                return i;
        }
        return this->bodyList.size();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rax
movq 0x40(%rdi), %rsi
subq %rsi, %rax
movabsq $0x28, %rcx
cqto
idivq %rcx
movl 0x8(%rdi), %edx
xorl %ecx, %ecx
movl %ecx, %edi
cmpq %rdi, %rax
jbe 0x3206
imulq $0x28, %rdi, %rdi
cmpl 0x10(%rsi,%rdi), %edx
je 0x3208
incl %ecx
jmp 0x31f1
movl %eax, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::tryToOccupyDesk()
void tryToOccupyDesk() {
        std::sort(this->deskPriority.begin(), this->deskPriority.end(), comparePacketsLamport);
        unsigned int me = this->getSelfIndexFromDeskPriority();
        if(me < this->deskPriority.size() && me < DESK_NUMBER) {
            printf("%u: Got desk, doing Paper work, rank: %d\n",Monitor::getLamport(),this->rank);
            sleep(1);
            this->gettingDesk = false;
            this->removeFromDeskPriority(this->rank);
            this->broadcastMessage(FREE_DESK, BODY);
            this->sendMessage(DONE_PAPERWORK, this->rank);
            printf("%u: Freeing desk, doing Paper work, rank: %d\n",Monitor::getLamport(),this->rank);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
movq 0x60(%rbx), %rsi
leaq 0x9c(%rip), %rdx        # 0x3b85
callq 0x3294
movq %rbx, %rdi
callq 0x3b94
movl %eax, %ecx
movq 0x60(%rbx), %rax
subq 0x58(%rbx), %rax
pushq $0x28
popq %rsi
cqto
idivq %rsi
testl %ecx, %ecx
jne 0x3b7e
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x3b7e
callq 0x45d2
movl 0x8(%rbx), %edx
leaq 0x1721(%rip), %rdi      # 0x5243
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
pushq $0x1
popq %rdi
callq 0x20b0
movb $0x0, 0x25(%rbx)
movl 0x8(%rbx), %esi
movq %rbx, %rdi
callq 0x3bd2
leaq -0x30(%rbp), %rdi
pushq $0x7a
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rsi
callq 0x4d0e
movl 0x8(%rbx), %ecx
leaq -0x30(%rbp), %rdi
pushq $0x76
popq %rdx
movq %rbx, %rsi
callq 0x4b00
callq 0x45d2
movl 0x8(%rbx), %edx
leaq 0x16f8(%rip), %rdi      # 0x526d
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::getSelfIndexFromDeskPriority()
unsigned int getSelfIndexFromDeskPriority() {
        for(unsigned int i=0; i<this->deskPriority.size(); i++) {
            if(this->rank == this->deskPriority[i].status.MPI_SOURCE){                
                return i;
            }
        }
        return this->deskPriority.size();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x60(%rdi), %rax
movq 0x58(%rdi), %rsi
subq %rsi, %rax
movabsq $0x28, %rcx
cqto
idivq %rcx
movl 0x8(%rdi), %edx
xorl %ecx, %ecx
movl %ecx, %edi
cmpq %rdi, %rax
jbe 0x3bcc
imulq $0x28, %rdi, %rdi
cmpl 0x10(%rsi,%rdi), %edx
je 0x3bce
incl %ecx
jmp 0x3bb7
movl %eax, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleNeedTail(packet_t)
bool handleNeedTail(packet_t packet) {
        if(!this->inTeam) {
            if(!handlingNeedTail) {
                this->handlingNeedTail = true;
                this->tailList.clear();
                this->bodyList.clear();
                packet_t packet = this->createSelfPacket();
                packet_t sentPacket = this->broadcastMessage(packet, NEED_TAIL_ACK, TAIL);
                this->tailList.push_back(sentPacket);
                this->sendMessage(FINISH_NEED_TAIL, this->rank);
            }
            this->bodyList.push_back(packet);
        }
        return true;
    }

// Assembly:
cmpb $0x0, 0x10(%rdi)
jne 0x3ed7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x10(%rbp), %r14
cmpb $0x0, 0x28(%rdi)
jne 0x3eb9
movb $0x1, 0x28(%rbx)
movq 0x30(%rbx), %rax
cmpq %rax, 0x38(%rbx)
je 0x3e45
movq %rax, 0x38(%rbx)
leaq 0x30(%rbx), %r15
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x3e57
movq %rax, 0x50(%rbx)
leaq -0x98(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4b8c
movq 0x20(%r12), %rax
movq %rax, 0x20(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x70(%rbp), %r12
pushq $0x6d
popq %rdx
pushq $0x3
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d7e
movq %r15, %rdi
movq %r12, %rsi
callq 0x2fe0
movl 0x8(%rbx), %ecx
leaq -0x48(%rbp), %rdi
pushq $0x6e
popq %rdx
movq %rbx, %rsi
callq 0x4b00
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2fe0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleFinishNeedTail(packet_t)
bool handleFinishNeedTail(packet_t packet) {
        if(!this->inTeam) {
            this->handlingNeedTail = false;
            std::sort(this->tailList.begin(), this->tailList.end(), comparePackets);
            std::sort(this->bodyList.begin(), this->bodyList.end(), comparePackets);
            unsigned int me = this->getSelfIndexFromTailList();
            bool haveMatchingBody = (this->bodyList.size() > me) && (me < this->tailList.size());
            if(haveMatchingBody) {
                // this->inTeam = true;
                // this->bodyRank = this->bodyList[me].status.MPI_SOURCE;
                this->headRank = this->bodyList[me].data;
                this->sendMessage(NEED_TAIL_POSITIVE, this->bodyList[me].status.MPI_SOURCE);
                if(me == 0) {
                    this->notifyBodiesWithNoTailsAssigned();
                }
                // this->sendMessage(AVENGERS_ASSEMBLED, this->rank);
                // this->sendMessage(AVENGERS_ASSEMBLED, this->headRank);
            }
        }
        return true;
    }

// Assembly:
cmpb $0x0, 0x10(%rdi)
jne 0x3f86
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movb $0x0, 0x28(%rdi)
movq 0x30(%rdi), %rdi
movq 0x38(%rbx), %rsi
leaq -0xd65(%rip), %r14      # 0x31a0
movq %r14, %rdx
callq 0x3294
movq 0x48(%rbx), %rdi
movq 0x50(%rbx), %rsi
movq %r14, %rdx
callq 0x3294
movq %rbx, %rdi
callq 0x41ae
movl %eax, %ecx
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rax
subq %rsi, %rax
pushq $0x28
popq %rdi
cqto
idivq %rdi
movl %ecx, %r14d
cmpq %r14, %rax
jbe 0x3f7e
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
cqto
idivq %rdi
cmpq %r14, %rax
jbe 0x3f7e
imulq $0x28, %r14, %rax
movl (%rsi,%rax), %ecx
movl %ecx, 0x18(%rbx)
movl 0x10(%rsi,%rax), %ecx
leaq -0x38(%rbp), %rdi
pushq $0x6f
popq %rdx
movq %rbx, %rsi
callq 0x4b00
testq %r14, %r14
jne 0x3f7e
movq %rbx, %rdi
callq 0x41fa
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleAvengersAssembled(packet_t)
bool handleAvengersAssembled(packet_t packet) {
        printf("%u: --- Team assembled. Squad members: head %d, body %d, tail %d ---\n",Monitor::getLamport(),this->headRank, this->bodyRank, this->rank);
        this->gettingResurrectionOrder = true;
        this->orderPriorityReplyCounter = (this->size)/3 - 1;
        if(this->orderPriorityReplyCounter > 0) {
            packet_t packet = this->broadcastMessage(REQUEST_ORDER_PRIORITY, TAIL);
            this->orderPriority.push_back(packet);
        } else {
            this->sendMessage(REPLY_ORDER_PRIORITY, this->rank);
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x45d2
movl 0x8(%rbx), %r8d
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x12ed(%rip), %rdi      # 0x529b
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
movb $0x1, 0x29(%rbx)
movl 0xc(%rbx), %ecx
pushq $0x3
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
decl %eax
movl %eax, 0x20(%rbx)
cmpl $0x6, %ecx
jl 0x3ff6
leaq -0x38(%rbp), %r14
pushq $0x72
popq %rdx
pushq $0x3
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4d0e
addq $0x60, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2fe0
jmp 0x4008
movl 0x8(%rbx), %ecx
leaq -0x38(%rbp), %rdi
pushq $0x73
popq %rdx
movq %rbx, %rsi
callq 0x4b00
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleFreeOrderPriority(packet_t)
bool handleFreeOrderPriority(packet_t packet) {
        if(this->availableOrders > 0) this->availableOrders -= 1;
        if(this->getIndexFromOrderPriority(packet.status.MPI_SOURCE) < this->bodyList.size()) {
            this->orderPriority.erase(
                this->orderPriority.begin() + 
                this->getIndexFromOrderPriority(packet.status.MPI_SOURCE));
        }
        if(this->gettingResurrectionOrder && this->availableOrders > 0) {
            this->tryToAcceptOrder();
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rbp), %rax
movl 0x24(%rdi), %ecx
testl %ecx, %ecx
jle 0x406e
decl %ecx
movl %ecx, 0x24(%rbx)
movl 0x10(%rax), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x431a
movl %eax, %ecx
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
pushq $0x28
popq %rsi
cqto
idivq %rsi
cmpq %rcx, %rax
jbe 0x40b8
leaq 0x60(%rbx), %r15
movq 0x60(%rbx), %r12
movq %rbx, %rdi
movl %r14d, %esi
callq 0x431a
movl %eax, %eax
imulq $0x28, %rax, %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x3c32
cmpb $0x1, 0x29(%rbx)
jne 0x40cc
cmpl $0x0, 0x24(%rbx)
jle 0x40cc
movq %rbx, %rdi
callq 0x4286
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleResurrectionFinished(packet_t)
bool handleResurrectionFinished(packet_t packet) {
        printf("%u: --- Dragon resurrected by team head: %d, body: %d, tail: %d ---\n", Monitor::getLamport(), this->headRank, this->bodyRank, this->rank);
        this->sendMessage(RESURRECTION_FINISHED, this->headRank);
        this->sendMessage(RESURRECTION_FINISHED, this->bodyRank);  
        this->sendMessage(RESURRECTION_FINISHED, ISSUER);      
        this->resurrecting = false;
        this->inTeam = false;
        this->headRank = 0;
        this->bodyRank = 0;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x45d2
movl 0x8(%rbx), %r8d
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x1201(%rip), %rdi      # 0x52ff
xorl %r15d, %r15d
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
movl 0x18(%rbx), %ecx
leaq -0x40(%rbp), %rdi
pushq $0x77
popq %r14
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4b00
movl 0x1c(%rbx), %ecx
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4b00
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x4b00
movb %r15b, 0x2a(%rbx)
movb %r15b, 0x10(%rbx)
andq $0x0, 0x18(%rbx)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handleNeedTailPositive(packet_t)
bool handleNeedTailPositive(packet_t packet) {
        this->bodyRank = packet.status.MPI_SOURCE;
        this->sendMessage(AVENGERS_ASSEMBLED, this->rank);
        this->sendMessage(AVENGERS_ASSEMBLED, this->headRank);
        this->handlingNeedTail = false;
        this->inTeam = true;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x20(%rbp), %eax
movl %eax, 0x1c(%rdi)
movl 0x8(%rdi), %ecx
leaq -0x38(%rbp), %rdi
pushq $0x71
popq %r14
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4b00
movl 0x18(%rbx), %ecx
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4b00
movb $0x0, 0x28(%rbx)
movb $0x1, 0x10(%rbx)
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::getSelfIndexFromTailList()
unsigned int getSelfIndexFromTailList() {
        for(unsigned int i=0; i<this->tailList.size(); i++) {
            if(this->rank == this->tailList[i].status.MPI_SOURCE){
                return i;
            }
        }
        return this->bodyList.size();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rax
movq 0x30(%rdi), %r8
subq %r8, %rax
movabsq $0x28, %rsi
cqto
idivq %rsi
movq %rax, %rcx
movl 0x8(%rdi), %edx
xorl %eax, %eax
movl %eax, %r9d
cmpq %r9, %rcx
jbe 0x41eb
imulq $0x28, %r9, %r9
cmpl 0x10(%r8,%r9), %edx
je 0x41f8
incl %eax
jmp 0x41d4
movq 0x50(%rdi), %rax
subq 0x48(%rdi), %rax
cqto
idivq %rsi
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::tryToAcceptOrder()
void tryToAcceptOrder() {
        std::sort(this->orderPriority.begin(), this->orderPriority.end(), comparePacketsLamport);
        unsigned int me = this->getIndexFromOrderPriority(this->rank);
        if(me == 0 && this->availableOrders > 0) { 
            printf("%u: Got the order , rank: %d\n",Monitor::getLamport(), this->rank);
            if(this->availableOrders > 0) 
                this->availableOrders -= 1;
            this->gettingResurrectionOrder = false;
            this->resurrecting = true;
            this->broadcastMessage(FREE_ORDER_PRIORITY, TAIL);
            this->orderPriority.erase(
                this->orderPriority.begin() + me);
            this->beginDragonResurrection();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
movq 0x68(%rbx), %rsi
leaq -0x71e(%rip), %rdx      # 0x3b85
callq 0x3294
movl 0x8(%rbx), %esi
movq %rbx, %rdi
callq 0x431a
testl %eax, %eax
jne 0x4311
cmpl $0x0, 0x24(%rbx)
jle 0x4311
leaq 0x60(%rbx), %r14
callq 0x45d2
movl 0x8(%rbx), %edx
leaq 0x1011(%rip), %rdi      # 0x52e1
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
movl 0x24(%rbx), %eax
testl %eax, %eax
jle 0x42e5
decl %eax
movl %eax, 0x24(%rbx)
movw $0x100, 0x29(%rbx)      # imm = 0x100
leaq -0x38(%rbp), %rdi
pushq $0x74
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rsi
callq 0x4d0e
movq 0x60(%rbx), %rsi
movq %r14, %rdi
callq 0x3c32
movq %rbx, %rdi
callq 0x4358
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::getIndexFromOrderPriority(int)
unsigned int getIndexFromOrderPriority(int rank) {
        for(unsigned int i=0; i<this->orderPriority.size(); i++) {
            if(rank == this->orderPriority[i].status.MPI_SOURCE){
                return i;
            }
        }
        return this->orderPriority.size();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x60(%rdi), %r8
movq 0x68(%rdi), %rax
subq %r8, %rax
movabsq $0x28, %rcx
cqto
idivq %rcx
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
cmpq %rdx, %rcx
jbe 0x4353
imulq $0x28, %rdx, %rdx
cmpl %esi, 0x10(%r8,%rdx)
je 0x4355
incl %eax
jmp 0x433d
movl %ecx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/Monitor.cpp
// Function: Monitor::receiveMessage()
packet_t Monitor::receiveMessage() {
    packet_t packet;
    MPI_Status status;
    MPI_Recv( &packet, sizeof(packet_t), MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
    packet.status = status;
    Monitor::incrementLamportOnReceive(packet);
    return packet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %r14, (%rsp)
movq 0x3b29(%rip), %rdx      # 0x7fc0
movq 0x3b32(%rip), %r9       # 0x7fd0
pushq $0x28
popq %rsi
pushq $-0x1
popq %rcx
movl %ecx, %r8d
callq 0x20f0
movups (%r14), %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x43e4
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/Monitor.cpp
// Function: Monitor::listen()
void Monitor::listen() {
    Monitor::listening = true;
    packet_t packet;
    while(Monitor::listening) {
        packet = Monitor::receiveMessage();   
        pthread_mutex_lock(&Monitor::messageQueueMutex); // dostęp do kolejki wiadomości
        Monitor::messageQueue.push(packet);
        pthread_mutex_unlock(&Monitor::messageQueueMutex);
        pthread_mutex_unlock(&Monitor::handleMutex); // odblokowanie handleLoop
        if(packet.status.MPI_TAG == END)
            listening = false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movb $0x1, 0x3c36(%rip)      # 0x8134
movb $0x1, %al
leaq -0x78(%rbp), %rbx
leaq 0x3c85(%rip), %r14      # 0x8190
leaq 0x3cf6(%rip), %r15      # 0x8208
leaq -0x50(%rbp), %r12
leaq 0x3c4b(%rip), %r13      # 0x8168
testb $0x1, %al
je 0x457d
movq %rbx, %rdi
callq 0x447a
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movups -0x78(%rbp), %xmm0
movups -0x68(%rbp), %xmm1
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq %r14, %rdi
callq 0x2180
movq %r15, %rdi
movq %r12, %rsi
callq 0x483e
movq %r14, %rdi
callq 0x20c0
movq %r13, %rdi
callq 0x20c0
cmpl $0x65, -0x3c(%rbp)
jne 0x4575
movb $0x0, 0x3bc3(%rip)      # 0x8134
xorl %eax, %eax
jmp 0x451d
movb 0x3bb9(%rip), %al       # 0x8134
jmp 0x451d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/Monitor.cpp
// Function: Monitor::incrementLamportOnSend()
unsigned int Monitor::incrementLamportOnSend() {
    pthread_mutex_lock(&Monitor::lamportMutex);
    Monitor::lamport += 1;
    unsigned int incrementedLamport = Monitor::lamport;
    pthread_mutex_unlock(&Monitor::lamportMutex);
    return incrementedLamport;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x3b98(%rip), %rbx      # 0x8140
movq %rbx, %rdi
callq 0x2180
movl 0x3b81(%rip), %r14d     # 0x8138
incl %r14d
movl %r14d, 0x3b77(%rip)     # 0x8138
movq %rbx, %rdi
callq 0x20c0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/specialists/Specialist.cpp
// Function: Specialist::Specialist(int, int)
Specialist::Specialist(int rank, int size) { 
    this->rank = rank;
    this->size = size;
    this->resurrectionCounter = 0;
    this->inTeam = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x3295(%rip), %rax      # 0x7d68
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
movl %edx, 0xc(%rdi)
andl $0x0, 0x14(%rdi)
movb $0x0, 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/specialists/Specialist.cpp
// Function: Specialist::createSelfPacket()
packet_t Specialist::createSelfPacket() {
    packet_t packet;
    packet.ressurectCounter = this->resurrectionCounter;
    packet.status.MPI_SOURCE = this->rank;
    packet.lamport = Monitor::getLamport();
    return packet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rsi), %eax
movl %eax, 0x4(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x10(%rdi)
callq 0x45d2
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/specialists/Specialist.cpp
// Function: Specialist::broadcastMessage(packet_t, int)
packet_t Specialist::broadcastMessage(packet_t packet, int tag) {
    packet.lamport = Monitor::incrementLamportOnSend();
    for(int i=1;i<this->size;i++){
        if(i != this->rank) {
            MPI_Send(&packet, sizeof(packet_t), MPI_BYTE, i, tag, MPI_COMM_WORLD);
        }
    }
    return packet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, -0x30(%rbp)
leaq 0x10(%rbp), %r14
callq 0x459a
movl %eax, 0x8(%r14)
pushq $0x1
popq %r13
pushq $0x28
popq %rbx
cmpl 0xc(%r12), %r13d
jge 0x4ce3
cmpl 0x8(%r12), %r13d
je 0x4cde
movq %r14, %rdi
movl %ebx, %esi
movq 0x32f4(%rip), %rdx      # 0x7fc0
movl %r13d, %ecx
movl %r15d, %r8d
movq 0x32f7(%rip), %r9       # 0x7fd0
callq 0x2070
incl %r13d
jmp 0x4cb2
movq 0x20(%r14), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Mirrvin[P]DragonsResurrectingInc/specialists/Specialist.cpp
// Function: Specialist::broadcastMessage(packet_t, int, int)
packet_t Specialist::broadcastMessage(packet_t packet, int tag, int targetType) {
    packet.lamport = Monitor::incrementLamportOnSend();
    for(int i=1;i<this->size;i++){
        if(i != this->rank && (i%3 + 1) == targetType) {
            MPI_Send(&packet, sizeof(packet_t), MPI_BYTE, i, tag, MPI_COMM_WORLD);
        }
    }
    return packet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, -0x30(%rbp)
leaq 0x10(%rbp), %rbx
callq 0x459a
movl %eax, 0x8(%rbx)
addl $-0x2, %r14d
pushq $0x1
popq %rbx
pushq $0x3
popq %r15
movl %ebx, %eax
xorl %edx, %edx
divl %r15d
cmpl 0xc(%r13), %ebx
jge 0x4df1
cmpl 0x8(%r13), %ebx
je 0x4dea
leal (%rax,%rax,2), %eax
addl %r14d, %eax
jne 0x4dea
leaq 0x10(%rbp), %rdi
pushq $0x28
popq %rsi
movq 0x31e7(%rip), %rdx      # 0x7fc0
movl %ebx, %ecx
movl %r12d, %r8d
movq 0x31eb(%rip), %r9       # 0x7fd0
callq 0x2070
incl %ebx
decl %r14d
jmp 0x4db0
leaq 0x10(%rbp), %rdx
movq 0x20(%rdx), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq