// File: /workspace/github_cpp_makefile_star2_O2/akshayrajput[P]ARMV8_Simulator/simulo.cpp
// Function: decode()
void decode()
{

    NIO = 4;
    int sf = (IR.getLowerData() & SF_MASK)>>31;
    int type_inst = (IR.getLowerData() & TYPE_MASK) >>25;//instruction group
    int sw = 0;
    
    if(type_inst == 8 || type_inst == 9)  //operand data processing immediate
    {
	    if(skip)
	{ 
	   printf("[log]- Skipping instruction\n"); 
	   return;
	}
	sw = 0;
	
        int inst = (IR.getData() & INST_IMM_TYPE) >> 23;

        if(inst == 0 || inst == 1) // PC relative addressing
        {
		//ADR , ADRP
            printf("[log] - PC relative\n");
	    if(sf == 1)
	    {
		    printf("[log]- ADRP\n");
		    ADR();
	    }
	    else
	    {
		    printf("[log] - ADR\n");
		    ADR();
	    }
        }
        else if(inst == 2 || inst == 3) // Add or subtract
        {
		int opc = (IR.getLowerData() & 0x60000000)>>29;//op + S
		int op1 = IR.getLowerData() & 0x0000001f ;//Rd
		int op2 = (IR.getLowerData() & 0x000003e0) >> 5 ;//Rn
		int op3 = (IR.getLowerData() & 0x003ffc00)>>10;//imm10
		if(opc == 0)
		{
			
			ADD(sf,sw,op1,op2,op3);
		}
		else if(opc == 1)
		{
			//TODO - adds
			ADDS();
		}
		else if(opc == 2)
		{
			
			SUB(sf,sw,op1,op2,op3);
			
		}
		else if(opc == 3)
		{
			//TODO - subs
			ADDS();
		}
        }
        
        else if(inst == 4)  //Logical 
        {
       		//only AND 
		int op1 = IR.getLowerData() & 0x0000001f ;//Rd
		int op2 = (IR.getLowerData() & 0x000003e0) >> 5 ;//Rn
		int op3 = (IR.getLowerData() & 0x04000000) >> 22;//N
		int op4 = (IR.getLowerData() & 0x0000fc00 ) >> 10 ;//imms
		int op5 = (IR.getLowerData() & 0x003f0000)>>16;//immr

		AND(sf,sw,op1,op2,0,op3,op4,op5);
        }
        
        else if(inst == 5)  //Move wide
        {
		printf("[log] - move instruction\n");
		int op1 = IR.getLowerData() & 0x0000001f ;//Rd
		int op2 = (IR.getLowerData() & 0x001fffe0 )>> 5; //imm16
		MOV(sf, sw,op1,op2);
       		 
        }
        
        else if(inst == 6)  //Bit field
        {

		printf("[log] - lsr|lsl|asr instruction\n");
		int opc = (IR.getLowerData() & 0x60000000)>>29;//op + S
		int op1 = IR.getLowerData() & 0x0000001f ;//Rd
		int op2 = (IR.getLowerData() & 0x000003e0) >> 5 ;//Rn
		int op3 = (IR.getLowerData() & 0x04000000) >> 22;//N
		int op4 = (IR.getLowerData() & 0x0000fc00 ) >> 10 ;//imms
		int op5 = (IR.getLowerData() & 0x003f0000)>>16;//immr

		if(opc == 0)
		{
			ASR(sf,sw,op1,op2,op5);
		}

		else if(opc == 2)
		{
			if(op4  == 31 || op4 == 63 )
			{
				printf("[log] - lsr instruction\n");
			 	LSR(sf,sw,op1,op2,op5);

			}

			else
			{
			 	printf("[log] - lsl instruction");
				LSL(sf,sw,op1,op2,op5);

			} 
		}
        }
        
        else if (inst == 7) //Extract
        {
        
        }
        
    }
    
    else if (type_inst == 5 || type_inst == 13)  //operand data processing register
    { 
	    if(skip)
	{ 
	   printf("[log]- Skipping instruction\n"); 
	   return;
	}
	sw  = 1;
        int inst = (IR.getLowerData() & INST_REG_TYPE)>>21;

        if(inst >= 80 && inst <=87)
        {
	   int opc = (IR.getLowerData() & 0x60000000)>>29;//opc
	   int op1 = IR.getLowerData() & 0x0000001f ;//Rd
	   int op2 = (IR.getLowerData() & 0x000003e0) >> 5 ;//Rn
	   int op3 = (IR.getLowerData() & 0x001f0000)>>16; //Rm
	   int op4 = (IR.getLowerData() & 0x0000fc00)>>10;//imm6


            printf("[log] - Logical shifted register instruction\n");

	    if(opc == 0)
	    {
		    printf("[log]- AND instruction\n");
		    AND(sf,sw,op1,op2,op3,0,0,0);
	    }
	    else if(opc == 1)
	    {
		    printf("[log]- MOV instruction\n");
		    MOV(sf, sw,op1,op3);

	    }


        }
        
        else if(inst == 88 || inst == 90 || inst == 92 || inst == 94)
        {
            printf("[log] - Add/ sub shifted register instruction\n");
		int opc = (IR.getLowerData() & 0x60000000)>>29;//op + S
		int op1 = IR.getLowerData() & 0x0000001f ;//Rd
		int op2 = (IR.getLowerData() & 0x000003e0) >> 5 ;//Rn
		int op3 = (IR.getLowerData() & 0x001f0000)>>16; //Rm
		int op4 = (IR.getLowerData() & 0x0000fc00)>>10;//imm6
		if(opc == 0)
		{
			// TODO - add
			ADD(sf,sw,op1,op2,op3);

		}
		else if(opc == 1)
		{
			//TODO - adds
			ADDS();
		}
		else if(opc == 2)
		{
			//TODO - sub
			SUB(sf,sw,op1,op2,op3);
		}
		else if(opc == 3)
		{
			//TODO - subs
			ADDS();
		}

        }
        
        else if(inst == 89 || inst == 91 || inst == 93 || inst == 95)
        {
            printf("[log] - Add/ sub extended register instruction\n");
        }
        
        else if(inst == 208)
        {
            printf("[log ] - Add/ sub with instruction\n");
        }
        
        else if(inst == 210)
        {
            printf("[log ] - condition compare register or immediate instruction\n");
        }
        
        else if(inst == 212)
        {
            printf("[log] - condition select instruction\n");
        }
        
          
    }

    else if (type_inst == 10 || type_inst == 11) // branch instructions 
  {

	 int inst = (IR.getLowerData() & INST_B_TYPE)>>25;

	 if(inst  == 10 || inst == 11)//unconditional branch
	 {
		if(skip)
		{ 
		   printf("[log]- Skipping instruction\n"); 
		   return;
		}
		 int op  = sf;//opcode for unconditional types
		 int64_t imm = IR.getLowerData()&0x03ffffff;
		 imm = signExtend(imm,25);
		 uint64_t offset = ((imm-1)*4) + PC.getData();
		 NIO = offset - PC.getData();
		 BBL(op,offset);
	 }
	 else if(inst == 42)
	 {
		 //conditional branch
		if(skip)
		{	 
	 	  printf("[log]- Skipping instruction\n"); 
	 	  return;
		}	

		if(sf ==1)
		{
			NOP();
			return;
		}

		int64_t imm = (IR.getLowerData()&0x00ffffe0)>>5;
		imm = signExtend(imm,25);
		int cond = IR.getLowerData()&0x0000000f;
			
		uint64_t offset = ((imm-1)*4)+PC.getData();//FIXME - take BR.getData() and imm*4 instead
		NIO = offset - PC.getData();
		BCOND(offset,cond);	

	 }
	 else if(inst == 43)
	 {
		 //unconditional branch register
		 int op = (IR.getLowerData() & 0x00600000)>>21;
		 int RN = (IR.getLowerData() & 0x000003e0)>>5;
		 if(op == 1 || op == 0)
		{
			//unconditional call register
		if(skip)
			{	 
	 		  printf("[log]- Skipping instruction\n"); 
	 		  return;
			}	

			BBRL(op,RN);

		}
		else if(op ==2)
		{
		
			//unconditional ret
			RN = 30;
			RET(RN);

		}
	 }
	 else if(inst == 26)
	 {
		if(skip)
			{	 
	 		  printf("[log]- Skipping instruction\n"); 
	 		  return;
			}
				
		//compare and branch immediate
		int op  = (IR.getLowerData() & 0x01000000)>>24;//opcode
		 int64_t imm = (IR.getLowerData()&0x00ffffe0)>>5;
		 imm = signExtend(imm,25);
		 int RT = IR.getLowerData()&0x0000001f ;
		 uint64_t offset = ((imm-1)*4)+PC.getData();//FIXME - use imm and BR.getData()
		 assert(RT >=0 && RT <= 31);

		 NIO = offset - PC.getData();
		 CBZNZ(sf,op,RT,offset);

	 }

  }
  else //load / store
  {
	int inst = (IR.getLowerData() & 0x10000000)>>28;

	  if(skip)
		{	 
	 		  printf("[log]- Skipping instruction\n"); 
	 		  return;
		}	
	
	if(inst == 0)
	{
		//TODO - STP,LDP 
		printf("[log] - LDP/STP instruction\n");
		LDP();
	}

	else if(inst == 1)
	{
	//TODO - LDR,LDRSW,STR
	printf("[log] - LDR/STR instruction\n");
	LDR();
	}

  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x4, 0x1505a(%rip)     # 0x1a1f8
leaq 0x1503b(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
movl %eax, %ebx
shrl $0x1f, %ebx
movq %r14, %rdi
callq 0x5b26
movl %eax, %r14d
andl $0x1c000000, %r14d      # imm = 0x1C000000
cmpl $0x10000000, %r14d      # imm = 0x10000000
jne 0x5219
cmpb $0x1, 0x15027(%rip)     # 0x1a1fd
je 0x5417
leaq 0x14ffd(%rip), %rdi     # 0x1a1e0
callq 0x5b22
movl %eax, %ecx
shrl $0x17, %ecx
andl $0x7, %ecx
cmpl $0x1, %ecx
ja 0x538f
leaq 0x1dce(%rip), %rdi      # 0x6fce
callq 0x1120
testl %ebp, %ebp
js 0x564b
leaq 0x1dce(%rip), %rdi      # 0x6fe2
jmp 0x5652
andl $0xe000000, %eax        # imm = 0xE000000
cmpl $0xa000000, %eax        # imm = 0xA000000
jne 0x52f4
cmpb $0x1, 0x14fcd(%rip)     # 0x1a1fd
je 0x5417
leaq 0x14fa3(%rip), %rdi     # 0x1a1e0
callq 0x5b26
movl %eax, %ecx
andl $0x1f000000, %ecx       # imm = 0x1F000000
cmpl $0xa000000, %ecx        # imm = 0xA000000
jne 0x5431
leaq 0x14f83(%rip), %r13     # 0x1a1e0
movq %r13, %rdi
callq 0x5b26
movl %eax, %r12d
shrl $0x1d, %r12d
andl $0x3, %r12d
movq %r13, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r13, %rdi
callq 0x5b26
movl %eax, %r15d
movq %r13, %rdi
callq 0x5b26
movl %eax, %r14d
shrl $0x10, %r14d
andl $0x1f, %r14d
movq %r13, %rdi
callq 0x5b26
leaq 0x1c78(%rip), %rdi      # 0x6f22
callq 0x1120
cmpl $0x1, %r12d
je 0x5695
testl %r12d, %r12d
jne 0x5617
shrl $0x5, %r15d
andl $0x1f, %r15d
leaq 0x1c95(%rip), %rdi      # 0x6f66
callq 0x1120
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x1
popq %rsi
movl %ebx, %edi
movl %ebp, %edx
movl %r15d, %ecx
movl %r14d, %r8d
xorl %r9d, %r9d
jmp 0x5612
leaq 0x14ee5(%rip), %rdi     # 0x1a1e0
callq 0x5b26
cmpl $0x14000000, %r14d      # imm = 0x14000000
jne 0x540a
movl %eax, %ecx
andl $0x7c000000, %ecx       # imm = 0x7C000000
cmpl $0x14000000, %ecx       # imm = 0x14000000
jne 0x54df
cmpb $0x1, 0x14ed5(%rip)     # 0x1a1fd
je 0x5417
leaq 0x14eab(%rip), %rdi     # 0x1a1e0
callq 0x5b26
andl $0x3ffffff, %eax        # imm = 0x3FFFFFF
pushq $0x19
popq %rsi
movq %rax, %rdi
callq 0x12ec
movq %rax, %r14
leaq 0x14e94(%rip), %r15     # 0x1a1e8
movq %r15, %rdi
callq 0x5b22
leaq (%rax,%r14,4), %r14
addq $-0x4, %r14
movq %r15, %rdi
callq 0x5b22
movl %r14d, %ecx
subl %eax, %ecx
movl %ecx, 0x14e81(%rip)     # 0x1a1f8
movl %ebx, %edi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13e7
andl $0x3000000, %eax        # imm = 0x3000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x5589
leaq 0x14e3a(%rip), %r12     # 0x1a1e0
movq %r12, %rdi
callq 0x5b26
movl %eax, %r14d
shrl $0x1d, %r14d
andl $0x3, %r14d
movq %r12, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r12, %rdi
callq 0x5b26
movl %eax, %r15d
shrl $0x5, %r15d
andl $0x1f, %r15d
movq %r12, %rdi
callq 0x5b26
shrl $0xa, %eax
andl $0xfff, %eax            # imm = 0xFFF
leaq 0xc7c(%rip), %rcx       # 0x606c
movslq (%rcx,%r14,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %eax, %r8d
jmp 0x58ec
cmpb $0x1, 0x14dec(%rip)     # 0x1a1fd
jne 0x5626
leaq 0x1bdc(%rip), %rdi      # 0x6ffa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1120
movl %eax, %ecx
andl $0x1fa00000, %ecx       # imm = 0x1FA00000
addl $0xf5000000, %ecx       # imm = 0xF5000000
shrl $0x15, %ecx
cmpl $0x5, %ecx
ja 0x5890
leaq 0xbf2(%rip), %rdx       # 0x6044
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1a92(%rip), %rdi      # 0x6ef4
callq 0x1120
leaq 0x14d72(%rip), %r15     # 0x1a1e0
movq %r15, %rdi
callq 0x5b26
movl %eax, %r14d
shrl $0x1d, %r14d
andl $0x3, %r14d
movq %r15, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r15, %rdi
callq 0x5b26
movl %eax, %r12d
shrl $0x5, %r12d
andl $0x1f, %r12d
movq %r15, %rdi
callq 0x5b26
movl %eax, %r13d
shrl $0x10, %r13d
andl $0x1f, %r13d
movq %r15, %rdi
callq 0x5b26
leaq 0xb99(%rip), %rax       # 0x605c
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22cf
shrl $0x19, %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
je 0x575a
cmpl $0x2b, %eax
je 0x56b0
cmpl $0x2a, %eax
jne 0x5617
cmpb $0x1, 0x14cf6(%rip)     # 0x1a1fd
je 0x5417
testl %ebp, %ebp
js 0x596d
leaq 0x14cc4(%rip), %rbx     # 0x1a1e0
movq %rbx, %rdi
callq 0x5b26
shrl $0x5, %eax
andl $0x7ffff, %eax          # imm = 0x7FFFF
pushq $0x19
popq %rsi
movq %rax, %rdi
callq 0x12ec
movq %rax, %r14
movq %rbx, %rdi
callq 0x5b26
movl %eax, %ebx
andl $0xf, %ebx
leaq 0x14c9a(%rip), %r15     # 0x1a1e8
movq %r15, %rdi
callq 0x5b22
leaq (%rax,%r14,4), %r14
addq $-0x4, %r14
movq %r15, %rdi
callq 0x5b22
movl %r14d, %ecx
subl %eax, %ecx
movl %ecx, 0x14c87(%rip)     # 0x1a1f8
movq %r14, %rdi
movl %ebx, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1459
cmpl $0x6, %ecx
je 0x57f2
cmpl $0x5, %ecx
je 0x5702
cmpl $0x4, %ecx
jne 0x5617
leaq 0x14c39(%rip), %r15     # 0x1a1e0
movq %r15, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r15, %rdi
callq 0x5b26
movl %eax, %r14d
shrl $0x5, %r14d
andl $0x1f, %r14d
movq %r15, %rdi
callq 0x5b26
movl %eax, %r12d
shrl $0x16, %r12d
andl $0x10, %r12d
movq %r15, %rdi
callq 0x5b26
movl %eax, %r13d
shrl $0xa, %r13d
andl $0x3f, %r13d
movq %r15, %rdi
callq 0x5b26
shrl $0x10, %eax
andl $0x3f, %eax
movl %eax, 0x8(%rsp)
movl %r13d, (%rsp)
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x1cf8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
btl $0x1c, %eax
jb 0x566a
leaq 0x17f1(%rip), %rdi      # 0x6e24
callq 0x1120
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b89
leaq 0x199c(%rip), %rdi      # 0x6fee
callq 0x1120
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3dc7
leaq 0x1797(%rip), %rdi      # 0x6e08
callq 0x1120
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3e6e
leaq 0x1835(%rip), %rdi      # 0x6ec5
jmp 0x541e
leaq 0x18b3(%rip), %rdi      # 0x6f4f
callq 0x1120
pushq $0x1
popq %rsi
movl %ebx, %edi
movl %ebp, %edx
movl %r14d, %ecx
jmp 0x5736
leaq 0x14b29(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebx
shrl $0x15, %ebx
andl $0x3, %ebx
movq %r14, %rdi
callq 0x5b26
cmpl $0x1, %ebx
ja 0x58c0
cmpb $0x1, 0x14b1e(%rip)     # 0x1a1fd
je 0x5417
shrl $0x5, %eax
andl $0x1f, %eax
movl %ebx, %edi
movl %eax, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1330
leaq 0x18ac(%rip), %rdi      # 0x6fb5
callq 0x1120
leaq 0x14acb(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r14, %rdi
callq 0x5b26
shrl $0x5, %eax
movzwl %ax, %ecx
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c5c
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %eax, %r8d
jmp 0x590c
cmpb $0x1, 0x14a9c(%rip)     # 0x1a1fd
je 0x5417
leaq 0x14a72(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
movq %r14, %rdi
callq 0x5b26
shrl $0x5, %eax
andl $0x7ffff, %eax          # imm = 0x7FFFF
pushq $0x19
popq %rsi
movq %rax, %rdi
callq 0x12ec
movq %rax, %r15
movq %r14, %rdi
callq 0x5b26
movl %eax, %r14d
leaq 0x14a40(%rip), %r12     # 0x1a1e8
movq %r12, %rdi
callq 0x5b22
leaq (%rax,%r15,4), %r15
addq $-0x4, %r15
andl $0x1f, %r14d
shrl $0x18, %ebp
andl $0x1, %ebp
movq %r12, %rdi
callq 0x5b22
movl %r15d, %ecx
subl %eax, %ecx
movl %ecx, 0x14a23(%rip)     # 0x1a1f8
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
movq %r15, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14f7
leaq 0x1784(%rip), %rdi      # 0x6f7d
callq 0x1120
leaq 0x149db(%rip), %r15     # 0x1a1e0
movq %r15, %rdi
callq 0x5b26
movl %eax, %r12d
shrl $0x1d, %r12d
andl $0x3, %r12d
movq %r15, %rdi
callq 0x5b26
movl %eax, %ebp
andl $0x1f, %ebp
movq %r15, %rdi
callq 0x5b26
movl %eax, %r14d
shrl $0x5, %r14d
andl $0x1f, %r14d
movq %r15, %rdi
callq 0x5b26
movq %r15, %rdi
callq 0x5b26
movl %eax, %r13d
movq %r15, %rdi
callq 0x5b26
movl %eax, %r15d
shrl $0x10, %r15d
andl $0x3f, %r15d
cmpl $0x2, %r12d
je 0x591f
testl %r12d, %r12d
jne 0x5617
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl %r15d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18a2
shrl $0x15, %eax
cmpb $-0x2c, %al
je 0x5961
movzbl %al, %eax
cmpl $0xd2, %eax
je 0x5955
cmpl $0xd0, %eax
jne 0x5617
leaq 0x15e7(%rip), %rdi      # 0x6ea2
jmp 0x541e
cmpl $0x2, %ebx
jne 0x5617
pushq $0x1e
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1579
pushq $0x1
popq %rsi
movl %ebx, %edi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1615
pushq $0x1
popq %rsi
movl %ebx, %edi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b31
notl %r13d
testw $0x7c00, %r13w          # imm = 0x7C00
jne 0x5980
leaq 0x166c(%rip), %rdi      # 0x6f9d
callq 0x1120
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl %r15d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1a93
leaq 0x1509(%rip), %rdi      # 0x6e65
jmp 0x541e
leaq 0x14d8(%rip), %rdi      # 0x6e40
jmp 0x541e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1324
leaq 0x909(%rip), %rdi       # 0x6290
xorl %eax, %eax
callq 0x1030
movl %ebx, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl %r15d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x199b