// File: /workspace/github_c_makefile_star2_O2/aspone[P]OrderBook/./FeedHandler.h
// Function: OrderBook::FeedHandler<unsigned int, OrderLevelEntry>::processMessage(char*)
void processMessage(char *line) {
#ifdef DEBUG
      uint32_t len = strlen(line);
      char orig_msg[len];
      strncpy(orig_msg, line, strlen(line));
#endif
      MessageType mt = parser_.getMessageType(line);
      bool valid_message = false;
      if (mt == eMT_Unknown) {
         FHErrorTracker::instance()->corruptMessage();
         return;
      }
      else if (mt == eMT_Trade) {
         STARTPROFILE();
         TradeMessage tm;
         parser_.parseTrade(line, tm);
         if (tm.trade_price_ != 0) {
            valid_message = true;
            DB("%s", orig_msg);
            order_book_.handleTrade(tm);
         }
         STOPPROFILE(trade_);
      }
      else {
         // Poked hole in memory model to avoid temporary stack-based ORDERTYPE
         // and copy ctor onto heap object.  Premature optimization out the
         // wazoo on this one, but "MOST OPTIMIZED CODE POSSIBLE" (within the
         // time constraint of the time I have to work on this) meant this nasty
         // split.  All "delete" calls are within OrderBook except for on bad
         // messages, and new / delete calls are kept tight here to attempt to
         // keep flow clear.  As mentioned in documentation - I'd be curious to
         // see how this performs with a ref counted shared_ptr from boost.
         STARTPROFILE();
         ORDERTYPE *ole = new ORDERTYPE();
         parser_.parseOrder(line, *ole);
         if (ole->order_side_ == eS_Unknown) {
            delete ole;
         }
         else {
            switch (mt) {
               case eMT_Add:
                  order_book_.addOrder(ole);
                  STOPPROFILE(add_);
                  valid_message = true;
                  break;
               case eMT_Modify:
                  order_book_.modifyOrder(ole);
                  STOPPROFILE(modify_);
                  valid_message = true;
                  break;
               case eMT_Remove:
                  order_book_.removeOrder(ole);
                  STOPPROFILE(remove_);
                  valid_message = true;
                  break;
               default:
                  fprintf(stderr, "Unknown order type hit in switch.  This should not happen.\n");
                  delete ole;
                  FAILASSERT();
                  break;
            }
         }
      }
      if (valid_message) {
#ifdef DEBUG
         DB("%s", orig_msg);
         order_book_.printBook();
#endif
         STARTPROFILE();
         order_book_.printMidpoint();
         STOPPROFILE(midquote_);
      }
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x180(%rdi), %r12
movq %r12, %rdi
callq 0x32a2
cmpl $0x4, %eax
je 0x28b3
movl %eax, %ebp
testl %eax, %eax
jne 0x28d8
callq 0x2842
incl 0x14(%rax)
jmp 0x2942
movq %rsp, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x32fa
cmpq $0x0, 0x8(%r14)
je 0x2942
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3402
jmp 0x293a
pushq $0x28
popq %rdi
callq 0x21d0
movq %rax, %r14
andl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3670
cmpl $0x0, 0x14(%r14)
je 0x296b
cmpl $0x3, %ebp
je 0x2922
cmpl $0x2, %ebp
je 0x292f
cmpl $0x1, %ebp
jne 0x294f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37d0
jmp 0x293a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3878
jmp 0x293a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39e2
movq %rbx, %rdi
callq 0x3acc
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x7682(%rip), %rax      # 0x9fd8
movq (%rax), %rcx
leaq 0x3866(%rip), %rdi      # 0x61c6
pushq $0x3b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2300
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21a0
nop