// File: 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
subq $0x140, %rsp            # imm = 0x140
leaq 0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x110(%rbp)
movb $0x1, -0x9(%rbp)
movl 0x14(%rax), %eax
addl $-0x65, %eax
movl %eax, %ecx
movq %rcx, -0x108(%rbp)
subl $0x12, %eax
ja 0xdf1a
movq -0x108(%rbp), %rax
leaq 0x72b5(%rip), %rcx      # 0x15004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x118(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xdf50
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
movq -0x118(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x60(%rbp), %xmm0
movups -0x50(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xdfc0
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
movq -0x118(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0x68(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe030
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
movq -0x118(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0x90(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0xb0(%rbp), %xmm0
movups -0xa0(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe060
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
movq -0x118(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0xb8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0xd8(%rbp), %xmm0
movups -0xc8(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe080
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
movq -0x118(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x110(%rbp), %rdi
movq -0xe0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x100(%rbp), %xmm0
movups -0xf0(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x14270
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0xdf39
callq 0x12e00
movl %eax, %esi
movq -0x118(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0x72c1(%rip), %rdi      # 0x151f3
movb $0x0, %al
callq 0x8040
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw (%rax,%rax)