// File: /workspace/github_cpp_makefile_star2_O1/Mirrvin[P]DragonsResurrectingInc/./specialists/BodySpecialist.cpp
// Function: BodySpecialist::handle(packet_t)
bool handle(packet_t packet) {        
        bool success = true;
        switch(packet.status.MPI_TAG){
            case NEED_BODY:
                success = this->handleNeedBody(packet); break;
            case NEED_BODY_ACK:
                success = this->handleNeedBodyAck(packet); break;
            case FINISH_NEED_BODY:
                success = this->handleFinishNeedBody(packet); break;
            case NEED_TAIL_POSITIVE:
                success = this->handleNeedTailPositive(packet); break;
            case NEED_TAIL_NEGATIVE:
                success = this->handleNeedTailNegative(packet); break;
            case AVENGERS_ASSEMBLE:
                success = this->handleAvengersAssemble(packet); break;
            case NEED_DESK_REQUEST:
                success = this->handleNeedDeskRequest(packet); break;
            case NEED_DESK_REPLY:
                success = this->handleNeedDeskReply(packet); break;
            case FREE_DESK:
                success = this->handleFreeDesk(packet); break;
            case DO_PAPERWORK:
                success = this->handleDoPaperwork(packet); break;
            case DONE_PAPERWORK:
                success = this->handleDonePaperwork(packet); break;
            case RESURRECTION_FINISHED:
                success = this->handleResurrectionFinished(packet); break;
            case NEED_BODY_POSITIVE:
                success = this->handleNeedBodyPositive(packet); break;
            case NEED_BODY_NEGATIVE:
                success = this->handleNeedBodyNegative(packet); break;
            case END:
                success = this->handleEnd(packet); break;
            default: 
                printf("%u: No handler for tag %d in BodySpecialist\n",Monitor::getLamport(), packet.status.MPI_TAG); break;                
        }
        return success;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl 0x24(%rbp), %r14d
leal -0x65(%r14), %ecx
cmpl $0x15, %ecx
ja 0x2d4e
movq %rdi, %rbx
leaq 0x10(%rbp), %rax
leaq 0x43c1(%rip), %rdx      # 0x702c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6334
movl 0x20(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x20(%rbx)
cmpl $0x1, %eax
jle 0x2dcc
jmp 0x2e54
movl 0x1c(%rbx), %ecx
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl $0x76, %edx
jmp 0x2e4f
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x383a
cmpb $0x1, 0x10(%rbx)
jne 0x2e54
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6032
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 -0x68(%rbp), %rdi
movq %rbx, %rsi
movl $0x67, %edx
movl $0x3, %ecx
callq 0x623a
jmp 0x2e54
movl 0x10(%rax), %eax
movl %eax, 0x18(%rbx)
movl 0x8(%rbx), %ecx
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl $0x68, %edx
callq 0x5fa0
movb $0x0, 0x24(%rbx)
jmp 0x2e54
movb $0x0, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
jmp 0x2e54
callq 0x5b08
leaq 0x44a2(%rip), %rdi      # 0x71fc
movl %eax, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2030
jmp 0x2e54
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2e74
movl $0x0, 0x18(%rbx)
movb $0x0, 0x24(%rbx)
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl $0x68, %edx
movl $0x1, %ecx
callq 0x61ca
jmp 0x2e54
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x37fe
movl 0x10(%rax), %esi
movq %rbx, %rdi
callq 0x44d8
cmpb $0x1, 0x25(%rbx)
jne 0x2e54
movq %rbx, %rdi
callq 0x4132
jmp 0x2e54
movq 0x20(%rax), %rcx
movq %rcx, -0x20(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
cmpb $0x0, 0x10(%rbx)
jne 0x2e54
movq 0x48(%rbx), %rsi
cmpq 0x50(%rbx), %rsi
je 0x2e62
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq 0x20(%rax), %rax
movq %rax, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x28, 0x48(%rbx)
jmp 0x2e54
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2f8a
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x38a2
movl 0x8(%rbx), %ecx
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl $0x68, %edx
callq 0x5fa0
movb $0x1, %al
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
addq $0x40, %rbx
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x390c
jmp 0x2e54