// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunParseMessage(char*, unsigned int, StunMessage&, bool)
bool
stunParseMessage( char* buf, unsigned int bufLen, StunMessage& msg, bool verbose)
{
   if (verbose) clog << "Received stun message: " << bufLen << " bytes" << endl;
   memset(&msg, 0, sizeof(msg));
	
   if (sizeof(StunMsgHdr) > bufLen)
   {
      clog << "Bad message" << endl;
      return false;
   }
	
   memcpy(&msg.msgHdr, buf, sizeof(StunMsgHdr));
   msg.msgHdr.msgType = ntohs(msg.msgHdr.msgType);
   msg.msgHdr.msgLength = ntohs(msg.msgHdr.msgLength);
	
   if (msg.msgHdr.msgLength + sizeof(StunMsgHdr) != bufLen)
   {
      clog << "Message header length doesn't match message size: "
           << msg.msgHdr.msgLength << " - " << bufLen << endl;
      return false;
   }
	
   char* body = buf + sizeof(StunMsgHdr);
   unsigned int size = msg.msgHdr.msgLength;
	
   //clog << "bytes after header = " << size << endl;
	
   while ( size > 0 )
   {
      // !jf! should check that there are enough bytes left in the buffer
		
      StunAtrHdr* attr = reinterpret_cast<StunAtrHdr*>(body);
		
      unsigned int attrLen = ntohs(attr->length);
      int atrType = ntohs(attr->type);
		
      //if (verbose) clog << "Found attribute type=" << AttrNames[atrType] << " length=" << attrLen << endl;
      if ( attrLen+4 > size ) 
      {
         clog << "claims attribute is larger than size of message " 
              <<"(attribute type="<<atrType<<")"<< endl;
         return false;
      }
		
      body += 4; // skip the length and type in attribute header
      size -= 4;
		
      switch ( atrType )
      {
         case MappedAddress:
            msg.hasMappedAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.mappedAddress )== false )
            {
               clog << "problem parsing MappedAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "MappedAddress = " << msg.mappedAddress.ipv4 << endl;
            }
					
            break;  

         case ResponseAddress:
            msg.hasResponseAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.responseAddress )== false )
            {
               clog << "problem parsing ResponseAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "ResponseAddress = " << msg.responseAddress.ipv4 << endl;
            }
            break;  
				
         case ChangeRequest:
            msg.hasChangeRequest = true;
            if (stunParseAtrChangeRequest( body, attrLen, msg.changeRequest) == false)
            {
               clog << "problem parsing ChangeRequest" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "ChangeRequest = " << msg.changeRequest.value << endl;
            }
            break;
				
         case SourceAddress:
            msg.hasSourceAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.sourceAddress )== false )
            {
               clog << "problem parsing SourceAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "SourceAddress = " << msg.sourceAddress.ipv4 << endl;
            }
            break;  
				
         case ChangedAddress:
            msg.hasChangedAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.changedAddress )== false )
            {
               clog << "problem parsing ChangedAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "ChangedAddress = " << msg.changedAddress.ipv4 << endl;
            }
            break;  
				
         case Username: 
            msg.hasUsername = true;
            if (stunParseAtrString( body, attrLen, msg.username) == false)
            {
               clog << "problem parsing Username" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "Username = " << msg.username.value << endl;
            }
					
            break;
				
         case Password: 
            msg.hasPassword = true;
            if (stunParseAtrString( body, attrLen, msg.password) == false)
            {
               clog << "problem parsing Password" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "Password = " << msg.password.value << endl;
            }
            break;
				
         case MessageIntegrity:
            msg.hasMessageIntegrity = true;
            if (stunParseAtrIntegrity( body, attrLen, msg.messageIntegrity) == false)
            {
               clog << "problem parsing MessageIntegrity" << endl;
               return false;
            }
            else
            {
               //if (verbose) clog << "MessageIntegrity = " << msg.messageIntegrity.hash << endl;
            }
					
            // read the current HMAC
            // look up the password given the user of given the transaction id 
            // compute the HMAC on the buffer
            // decide if they match or not
            break;
				
         case ErrorCode:
            msg.hasErrorCode = true;
            if (stunParseAtrError(body, attrLen, msg.errorCode) == false)
            {
               clog << "problem parsing ErrorCode" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "ErrorCode = " << int(msg.errorCode.errorClass) 
                                 << " " << int(msg.errorCode.number) 
                                 << " " << msg.errorCode.reason << endl;
            }
					
            break;
				
         case UnknownAttribute:
            msg.hasUnknownAttributes = true;
            if (stunParseAtrUnknown(body, attrLen, msg.unknownAttributes) == false)
            {
               clog << "problem parsing UnknownAttribute" << endl;
               return false;
            }
            break;
				
         case ReflectedFrom:
            msg.hasReflectedFrom = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.reflectedFrom ) == false )
            {
               clog << "problem parsing ReflectedFrom" << endl;
               return false;
            }
            break;  
				
         case XorMappedAddress:
            msg.hasXorMappedAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.xorMappedAddress ) == false )
            {
               clog << "problem parsing XorMappedAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "XorMappedAddress = " << msg.mappedAddress.ipv4 << endl;
            }
            break;  

         case XorOnly:
            msg.xorOnly = true;
            if (verbose) 
            {
               clog << "xorOnly = true" << endl;
            }
            break;  
				
         case ServerName: 
            msg.hasServerName = true;
            if (stunParseAtrString( body, attrLen, msg.serverName) == false)
            {
               clog << "problem parsing ServerName" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "ServerName = " << msg.serverName.value << endl;
            }
            break;
				
         case SecondaryAddress:
            msg.hasSecondaryAddress = true;
            if ( stunParseAtrAddress(  body,  attrLen,  msg.secondaryAddress ) == false )
            {
               clog << "problem parsing secondaryAddress" << endl;
               return false;
            }
            else
            {
               if (verbose) clog << "SecondaryAddress = " << msg.secondaryAddress.ipv4 << endl;
            }
            break;  
					
         default:
            if (verbose) clog << "Unknown attribute: " << atrType << endl;
            if ( atrType <= 0x7FFF ) 
            {
               return false;
            }
      }
		
      body += attrLen;
      size -= attrLen;
   }
    
   return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r12
movl %esi, %r14d
movl %ecx, 0x4(%rsp)
testl %ecx, %ecx
je 0x32d2
movq 0x9d44(%rip), %r13      # 0xcfb8
leaq 0x61b9(%rip), %rsi      # 0x9434
movl $0x17, %edx
movq %r13, %rdi
callq 0x21f0
movq %r13, %rdi
movq %r14, %rsi
callq 0x2130
movq %rax, %r13
leaq 0x6fd9(%rip), %rsi      # 0xa276
movl $0x6, %edx
movq %rax, %rdi
callq 0x21f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movl $0x4c8, %edx            # imm = 0x4C8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
cmpl $0x13, %r15d
ja 0x3307
movq 0x9cca(%rip), %rbx      # 0xcfb8
leaq 0x6157(%rip), %rsi      # 0x944c
movl $0xb, %edx
movq %rbx, %rdi
callq 0x21f0
jmp 0x3e4c
movups (%r12), %xmm0
movups %xmm0, (%rbx)
movl 0x10(%r12), %eax
rolw $0x8, (%rbx)
movl %eax, 0x10(%rbx)
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movq %rbx, %r13
movzwl %ax, %ebx
leal 0x14(%rbx), %eax
cmpl %r15d, %eax
jne 0x3dff
addq $0x14, %r12
leaq 0x4bc(%r13), %rax
movq %rax, 0x90(%rsp)
leaq 0x4c0(%r13), %rax
movq %rax, 0x50(%rsp)
leaq 0x3b6(%r13), %rax
movq %rax, 0x30(%rsp)
leaq 0x3a8(%r13), %rax
movq %rax, 0x88(%rsp)
leaq 0x1c(%r13), %rax
movq %rax, 0x10(%rsp)
leaq 0x398(%r13), %rax
movq %rax, 0x80(%rsp)
leaq 0x27e(%r13), %rax
movq %rax, 0x18(%rsp)
leaq 0x265(%r13), %rax
movq %rax, 0x58(%rsp)
leaq 0x162(%r13), %rax
movq %rax, 0x28(%rsp)
leaq 0x5e(%r13), %rax
movq %rax, 0x20(%rsp)
leaq 0x50(%r13), %rax
movq %rax, 0x78(%rsp)
leaq 0x54(%r13), %rax
movq %rax, 0x48(%rsp)
leaq 0x40(%r13), %rax
movq %rax, 0x70(%rsp)
leaq 0x44(%r13), %rax
movq %rax, 0x40(%rsp)
leaq 0x28(%r13), %rax
movq %rax, 0x68(%rsp)
leaq 0x2c(%r13), %rax
movq %rax, 0x38(%rsp)
movq %r13, 0x8(%rsp)
leaq 0x18(%r13), %rax
movq %rax, 0x60(%rsp)
testl %ebx, %ebx
sete %al
je 0x3e75
movzwl (%r12), %r14d
movzwl 0x2(%r12), %eax
movl %eax, %ecx
rolw $0x8, %cx
rolw $0x8, %r14w
movzwl %cx, %r13d
movzwl %r14w, %ebp
leal 0x4(%r13), %ecx
cmpl %ebx, %ecx
jbe 0x34b2
movl $0x30, %edx
movq 0x9b7b(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x6048(%rip), %rsi      # 0x948f
callq 0x21f0
movl $0x10, %edx
movq %r14, %rdi
leaq 0x6065(%rip), %rsi      # 0x94c0
callq 0x21f0
movq %r14, %rdi
movl %ebp, %esi
callq 0x22a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x65d4(%rip), %rsi      # 0x9a50
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %eax, %eax
movq %r12, %r15
jmp 0x3df2
leaq 0x4(%r12), %r15
addl $-0x4, %ebx
cmpl $0x20, %ebp
jg 0x351f
leal -0x1(%rbp), %ecx
cmpl $0xa, %ecx
ja 0x39c6
leaq 0x5f0a(%rip), %rdx      # 0x93dc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%rsp), %rax
movb $0x1, 0x14(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x60(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3bf5
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x10, %edx
movq 0x9aa5(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x6189(%rip), %rsi      # 0x96a6
jmp 0x3584
cmpl $0x8021, %ebp           # imm = 0x8021
jg 0x3596
cmpl $0x21, %ebp
je 0x3786
cmpl $0x8020, %ebp           # imm = 0x8020
jne 0x39c6
movq 0x8(%rsp), %rax
movb $0x1, 0x3a4(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x88(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3c2b
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x13, %edx
movq 0x9a3e(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x611f(%rip), %rsi      # 0x96a3
callq 0x21f0
movq %r12, %rdi
movq 0x10(%rsp), %rsi
jmp 0x385b
cmpl $0x8022, %ebp           # imm = 0x8022
je 0x37b8
cmpl $0x8050, %ebp           # imm = 0x8050
jne 0x39c6
movq 0x8(%rsp), %rax
movb $0x1, 0x4b8(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x90(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3c46
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x13, %edx
movq 0x99cc(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x611a(%rip), %rsi      # 0x9710
callq 0x21f0
movq %r12, %rdi
movq 0x50(%rsp), %rsi
jmp 0x385b
movq 0x8(%rsp), %rax
movb $0x1, 0x4c(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x78(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3a2b
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x11, %edx
movq 0x9978(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5f55(%rip), %rsi      # 0x959f
callq 0x21f0
movq %r12, %rdi
movq 0x48(%rsp), %rsi
jmp 0x385b
movq 0x8(%rsp), %rcx
movb $0x1, 0x380(%rcx)
cmpw $0x12, %r13w
setb %dl
testb $0x3, %r13b
sete %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x36bf
movl %r13d, %edx
shrl $0x2, %edx
movq 0x8(%rsp), %rsi
movw %dx, 0x392(%rsi)
testw %ax, %ax
je 0x36b7
xorl %eax, %eax
movzwl (%r15,%rax,2), %edx
rolw $0x8, %dx
movw %dx, 0x382(%rsi,%rax,2)
incq %rax
movzwl 0x392(%rsi), %edx
cmpq %rdx, %rax
jb 0x3697
testb %cl, %cl
jne 0x3da1
movl $0x20, %edx
movq 0x98ed(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5f6e(%rip), %rsi      # 0x9643
jmp 0x3dc4
movq 0x8(%rsp), %rcx
movb $0x1, 0x34(%rcx)
movzwl %ax, %ebp
cmpl $0x400, %ebp            # imm = 0x400
jne 0x3a46
movl (%r15), %eax
bswapl %eax
movl %eax, 0x38(%rcx)
jmp 0x3af5
movq 0x8(%rsp), %rax
movb $0x1, 0x3c(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x70(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3b56
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x10, %edx
movq 0x9881(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5e2e(%rip), %rsi      # 0x956f
callq 0x21f0
movq %r12, %rdi
movq 0x40(%rsp), %rsi
jmp 0x385b
movq 0x8(%rsp), %rcx
movb $0x1, 0x264(%rcx)
movzwl %ax, %ebp
cmpl $0x1400, %ebp           # imm = 0x1400
jne 0x3b71
movl 0x10(%r15), %eax
movq 0x58(%rsp), %rcx
movl %eax, 0x10(%rcx)
movups (%r15), %xmm0
movups %xmm0, (%rcx)
jmp 0x3bb3
movq 0x8(%rsp), %rax
movb $0x1, 0x3b4(%rax)
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0xe, %edx
movq 0x980f(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5f04(%rip), %rsi      # 0x96b7
jmp 0x3d74
movq 0x8(%rsp), %rax
movb $0x1, 0x3b5(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x30(%rsp), %rdx
callq 0x400c
testb %al, %al
je 0x3bda
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0xd, %edx
movq 0x97c5(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5ee4(%rip), %rsi      # 0x96e1
callq 0x21f0
movq 0x30(%rsp), %r14
jmp 0x3d63
movq 0x8(%rsp), %rax
movb $0x1, 0x24(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x68(%rsp), %rdx
callq 0x3e87
testb %al, %al
je 0x3c10
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x12, %edx
movq 0x9774(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5cc1(%rip), %rsi      # 0x950f
callq 0x21f0
movq %r12, %rdi
movq 0x38(%rsp), %rsi
callq 0x3f5b
jmp 0x3d79
movq 0x8(%rsp), %rax
movb $0x1, 0x5c(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x20(%rsp), %rdx
callq 0x400c
testb %al, %al
je 0x3c61
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0xb, %edx
movq 0x971b(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5d23(%rip), %rsi      # 0x95ca
callq 0x21f0
movq 0x20(%rsp), %r14
jmp 0x3d63
movq 0x8(%rsp), %rax
movb $0x1, 0x160(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x28(%rsp), %rdx
callq 0x400c
testb %al, %al
je 0x3c7c
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0xb, %edx
movq 0x96c7(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5cf4(%rip), %rsi      # 0x95ef
callq 0x21f0
movq 0x28(%rsp), %r14
jmp 0x3d63
movq 0x8(%rsp), %rax
movb $0x1, 0x394(%rax)
movq %r15, %rdi
movl %r13d, %esi
movq 0x80(%rsp), %rdx
callq 0x3e87
testb %al, %al
jne 0x3da1
movl $0x1d, %edx
movq 0x967b(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5d1d(%rip), %rsi      # 0x9664
jmp 0x3dc4
movq 0x8(%rsp), %r14
movb $0x1, 0x279(%r14)
cmpl $0x106, %r13d           # imm = 0x106
jae 0x3c97
movzwl 0x4(%r12), %eax
rolw $0x8, %ax
movw %ax, 0x27a(%r14)
movb 0x6(%r12), %al
movb %al, 0x27c(%r14)
movb 0x7(%r12), %al
addq $0x8, %r12
movb %al, 0x27d(%r14)
leal -0x4(%r13), %eax
movw %ax, 0x37e(%r14)
movzwl %ax, %edx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x2170
movzwl 0x37e(%r14), %eax
movb $0x0, 0x27e(%r14,%rax)
jmp 0x3cd9
cmpb $0x0, 0x4(%rsp)
je 0x3a1c
movl $0x13, %edx
movq 0x95df(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x5d41(%rip), %rsi      # 0x9724
callq 0x21f0
movq %r12, %rdi
movl %ebp, %esi
callq 0x22a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
testw %r14w, %r14w
jns 0x3df0
jmp 0x3da1
movl $0x1e, %edx
movq 0x9581(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5b3f(%rip), %rsi      # 0x9580
jmp 0x3dc4
movl $0xd, %edx
movq 0x9566(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x679d(%rip), %rsi      # 0xa1f9
callq 0x21f0
movl %r13d, %esi
movq %r14, %rdi
callq 0x2130
movq %rax, %r12
movl $0xb, %edx
movq %rax, %rdi
leaq 0x6789(%rip), %rsi      # 0xa207
callq 0x21f0
movl $0x4, %esi
movq %r12, %rdi
callq 0x2130
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movl $0x20, %edx
movq %r14, %rdi
leaq 0x674a(%rip), %rsi      # 0xa213
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
cmpl $0x400, %ebp            # imm = 0x400
jne 0x3b3b
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0x10, %edx
movq 0x94a4(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5a22(%rip), %rsi      # 0x9540
callq 0x21f0
movq 0x8(%rsp), %rax
movl 0x38(%rax), %esi
movq %r14, %rdi
callq 0x2130
movq %rax, %r12
jmp 0x3d79
movl $0x1d, %edx
movq 0x9471(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x59d1(%rip), %rsi      # 0x9522
jmp 0x3dc4
movl $0x1d, %edx
movq 0x9456(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x59e5(%rip), %rsi      # 0x9551
jmp 0x3dc4
movl $0x21, %edx
movq 0x943b(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x66d4(%rip), %rsi      # 0xa25b
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
cmpl $0x1400, %ebp           # imm = 0x1400
je 0x3da1
movl $0x20, %edx
movq 0x93ed(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5a26(%rip), %rsi      # 0x95fb
jmp 0x3dc4
movl $0x1a, %edx
movq 0x93d2(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5ad6(%rip), %rsi      # 0x96c6
jmp 0x3dc4
movl $0x1d, %edx
movq 0x93b7(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x58c6(%rip), %rsi      # 0x94d1
jmp 0x3dc4
movl $0x1f, %edx
movq 0x939c(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x58c9(%rip), %rsi      # 0x94ef
jmp 0x3dc4
movl $0x20, %edx
movq 0x9381(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5a41(%rip), %rsi      # 0x9682
jmp 0x3dc4
movl $0x20, %edx
movq 0x9366(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5a93(%rip), %rsi      # 0x96ef
jmp 0x3dc4
movl $0x18, %edx
movq 0x934b(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x593a(%rip), %rsi      # 0x95b1
jmp 0x3dc4
movl $0x18, %edx
movq 0x9330(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5944(%rip), %rsi      # 0x95d6
jmp 0x3dc4
movl $0x17, %edx
movq 0x9315(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x65d0(%rip), %rsi      # 0xa27d
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
cmpl $0x106, %r13d           # imm = 0x106
jae 0x3dae
cmpb $0x0, 0x4(%rsp)
je 0x3da1
movl $0xc, %edx
movq 0x92bb(%rip), %r12      # 0xcfb8
movq %r12, %rdi
leaq 0x592f(%rip), %rsi      # 0x9636
callq 0x21f0
movq 0x8(%rsp), %r14
movzbl 0x27c(%r14), %esi
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x575a(%rip), %rbp      # 0x948d
movq %rbp, %rsi
callq 0x21f0
movzbl 0x27d(%r14), %esi
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21f0
movq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x20c0
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21f0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movl %r13d, %eax
addq %rax, %r15
subl %r13d, %ebx
movb $0x1, %al
jmp 0x3df2
movl $0x19, %edx
movq 0x91fe(%rip), %r14      # 0xcfb8
movq %r14, %rdi
leaq 0x5858(%rip), %rsi      # 0x961c
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %eax, %eax
movq %r15, %r12
testb %al, %al
jne 0x33fc
jmp 0x3e73
movq 0x91b2(%rip), %r15      # 0xcfb8
leaq 0x564b(%rip), %rsi      # 0x9458
movl $0x32, %edx
movq %r15, %rdi
callq 0x21f0
movzwl 0x2(%r13), %esi
movq %r15, %rdi
callq 0x2130
movq %rax, %rbx
leaq 0x565a(%rip), %rsi      # 0x948b
movl $0x3, %edx
movq %rax, %rdi
callq 0x21f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2130
movq %rax, %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq