// File: Mirrvin[P]DragonsResurrectingInc/./specialists/TailSpecialist.cpp
// Function: TailSpecialist::handle(packet_t)
bool handle(packet_t packet) {
        bool success = true;
        switch(packet.status.MPI_TAG){
            case NEED_TAIL:
                success = this->handleNeedTail(packet); break;
            case NEED_TAIL_ACK:
                success = this->handleNeedTailAck(packet); break;
            case FINISH_NEED_TAIL:
                success = this->handleFinishNeedTail(packet); break;
            case AVENGERS_ASSEMBLED:
                success = this->handleAvengersAssembled(packet); break;
            case REQUEST_ORDER_PRIORITY:
                success = this->handleRequestOrderPriority(packet); break;
            case REPLY_ORDER_PRIORITY:
                success = this->handleReplyOrderPriority(packet); break;
            case FREE_ORDER_PRIORITY:
                success = this->handleFreeOrderPriority(packet); break;
            case NEW_ORDER:
                success = this->handleNewOrder(packet); break;
            case DONE_PAPERWORK:
                success = this->handleDonePaperwork(packet); break;
            case RESURRECTION_FINISHED:
                success = this->handleResurrectionFinished(packet); break;
            case NEED_TAIL_POSITIVE:
                success = this->handleNeedTailPositive(packet); break;
            case NEED_TAIL_NEGATIVE:
                success = this->handleNeedTailNegative(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 $0x260, %rsp            # imm = 0x260
leaq 0x10(%rbp), %rax
movq %rax, -0x230(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x228(%rbp)
movb $0x1, -0x9(%rbp)
movl 0x14(%rax), %eax
addl $-0x64, %eax
movl %eax, %ecx
movq %rcx, -0x220(%rbp)
subl $0x13, %eax
ja 0x11be1
movq -0x220(%rbp), %rax
leaq 0x38c9(%rip), %rcx      # 0x150a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x230(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11c10
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11d20
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11d60
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11eb0
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11f60
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%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 0x11fb0
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x128(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x108(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x128(%rbp), %xmm0
movups -0x118(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x11ff0
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x150(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x130(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x150(%rbp), %xmm0
movups -0x140(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x120e0
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x178(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x158(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x178(%rbp), %xmm0
movups -0x168(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12120
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x180(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x1a0(%rbp), %xmm0
movups -0x190(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12160
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x1a8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x1c8(%rbp), %xmm0
movups -0x1b8(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12220
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x1d0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x1f0(%rbp), %xmm0
movups -0x1e0(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12280
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
movq -0x230(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x28, %edx
callq 0x84d0
movq -0x228(%rbp), %rdi
movq -0x1f8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x218(%rbp), %xmm0
movups -0x208(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x14270
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x11c00
callq 0x12e00
movl %eax, %esi
movq -0x230(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0x35fa(%rip), %rdi      # 0x151f3
movb $0x0, %al
callq 0x8040
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nop