// File: /workspace/github_cpp_makefile_star2_O2/akshayrajput[P]ARMV8_Simulator/./LDR.cpp
// Function: LDR()
void LDR()
{
    int bit_see = (IR.getLowerData() & 0x01000000);    //24th bit to check post index, pre index, unsigned offset
    int instr_type = (IR.getLowerData() & 0x00400000) >> 22; //22nd bit to check for load/ store
    if(instr_type)      //load LDR immediate
    {
    	printf("[log] - LDR immediate\n");
        if(!bit_see)    //post-index or pre-index
        {
        	
            int size = (IR.getLowerData() & 0xc0000000) >> 30;
            int opc = (IR.getLowerData() & 0x00c00000) >> 22;
            int imm9 = (IR.getLowerData() & 0x001ff000) >> 12;
            int rn = (IR.getLowerData() & 0x000003e0) >> 5;
            int rt = (IR.getLowerData() & 0x0000001f);
            int eleventh_bit = (IR.getLowerData() & 0x00000800);
            
            if(!eleventh_bit)   //post index
            {
                printf("[log] - LDR immediate post index\n");
                if(size == 2)   //32 bit variant
                {
                	printf("[log] - LDR immediate post index 32\n");
                    int addr = R[rn].getLowerData();
                    int imm;
                    //signed extention
                    imm = signExtend(imm9,8);
                    
                    
                    int dat = (int)Memory[addr].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 1].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 2].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 3].getData();
                    
                    R[rt].setLowerData(dat);
                    
                    addr = addr + imm;
                    R[rn].setLowerData(addr);
                }
                
                else            //64 bit variant
                {
                	printf("[log] - LDR immediate post index 64\n");
                    uint64_t addr = R[rn].getData();
                    uint64_t imm;
                    //int bit = (imm9 & 0x00000100) >> 8;
                    //signed extention

                     imm = signExtend(imm9,8);
                    uint64_t dat = (int)Memory[addr].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 1].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 2].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 3].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 4].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 5].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 6].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 7].getData();
                    
                    R[rt].setData(dat);
                    
                    addr = addr + (uint64_t)imm;
                    R[rn].setData(addr);
                }
            }
            
            else                //preindex
            {
            	printf(" [log] - LDR immediate pre index\n");
                if(size == 2)   //32 bit registers
                {
                	printf("[log] - LDR immediate pre index 32\n");
                    int addr = R[rn].getLowerData();
                    int imm;
                    //signed extention
                    
                    imm = signExtend(imm9,8);
                    addr = addr + imm;
                    R[rn].setLowerData(addr);
                    int dat = (int)Memory[addr].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 1].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 2].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 3].getData();
                    
                    R[rt].setLowerData(dat);
  
                    
                }
                
                else        //64 bit registers
                {
                	printf("[log] - LDR immediate pre index 64\n");
                    uint64_t addr = R[rn].getData();
                    uint64_t imm;
                    //signed extention
                    imm = signExtend(imm9,8);
                    addr = addr + imm;
                    R[rn].setData(addr);
                    uint64_t dat = (int)Memory[addr].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 1].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 2].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 3].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 4].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 5].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 6].getData();
                    dat = dat << 8;
                    dat = dat | (int)Memory[addr + 7].getData();
                    
                    R[rt].setData(dat);
                    
                   
                }
            }
        }
        
        else    // unsigned offset
        {
        	printf("[log] - LDR immediate unsigned offset\n");
            int size = (IR.getLowerData() & 0xc0000000) >> 30;
            int opc = (IR.getLowerData() & 0x00c00000) >> 22;
            int imm12 = (IR.getLowerData() & 0x003ffc00) >> 10;
            int rn = (IR.getLowerData() & 0x000003e0) >> 5;
            int rt = (IR.getLowerData() & 0x0000001f);
            if(size == 2)   //32 bit variant
            {
            	printf("LDR immediate unsigned offset 32\n");
                int pimm = imm12 * 4;
                uint64_t addr = R[rn].getData();
                addr += (uint64_t)pimm;
                int dat = (int)Memory[addr].getData();
                dat = dat << 8;
                dat = dat | (int)Memory[addr + 1].getData();
                dat = dat << 8;
                dat = dat | (int)Memory[addr + 2].getData();
                dat = dat << 8;
                dat = dat | (int)Memory[addr + 3].getData();
                
                R[rt].setLowerData(dat);
            }
            
            else    //64 bit variant
            {
            	printf("[log] - LDR immediate unsigned offset 64\n");
                int pimm = imm12 * 8;
                uint64_t addr = R[rn].getData();
                addr += (uint64_t)pimm;
                uint64_t dat = (uint64_t)Memory[addr].getData();
                dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 1].getData();
                dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 2].getData();
                dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 3].getData();
                 dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 4].getData();
                 dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 5].getData();
                 dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 6].getData();
                 dat = dat << 8;
                dat = dat | (uint64_t)Memory[addr + 7].getData();
                
                R[rt].setData(dat);
            }
        }
    }
    
    else    //store STR immediate
    {
    	printf("[log] -STR immediate\n");
        if(!bit_see)    // post or pre index
        {
            int eleventh_bit = (IR.getLowerData() & 0x00000800) >> 11;
            if(!eleventh_bit)   //post index
            {
            	printf("[log] - STR immediate post index\n");
                int size = (IR.getLowerData() & 0xc0000000) >> 30;
                int opc = (IR.getLowerData() & 0x00c00000) >> 22;
                int imm9 = (IR.getLowerData() & 0x001ff000) >> 12;
                int rn = (IR.getLowerData() & 0x000003e0) >> 5;
                
                int rt = (IR.getLowerData() & 0x0000001f);
                uint64_t offset = signExtend(imm9,8);
                uint64_t addr = R[rn].getData();
                addr -= Memory[0].addr;
                if(size == 2)   //32 bit registers
                {
                	printf(" [log] - STR immediate post index 32\n");
                    int data = R[rt].getLowerData();
                    uint8_t dat = (data & 0xff000000)>>24;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff0000)>>16;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff00)>>8;
                    Memory[addr + 2].setData(dat);
                    dat = data & 0xff0000ff;
                    Memory[addr + 3].setData(dat);
                }
                
                else  //64 bit registers
                {
                	printf("[log] - STR immediate post index 64\n");
                    uint64_t data = R[rt].getData();
                    uint8_t dat;
                    dat = (data & 0xff00000000000000)>>56;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff000000000000)>>48;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff0000000000)>>40;
                    Memory[addr + 2].setData(dat);
                    dat = (data & 0x000000ff00000000)>>32;
                    Memory[addr + 3].setData(dat);
                    dat = (data & 0x00000000ff000000)>>24;
                    Memory[addr + 4].setData(dat);
                    dat = (data & 0xff00000000ff0000)>>16;
                    Memory[addr + 5].setData(dat);
                    dat = (data & 0x000000000000ff00)>>8;
                    Memory[addr + 6].setData(dat);
                    dat = data & 0x00000000000000ff;
                    Memory[addr + 7].setData(dat);
                }
                
                addr = addr + offset;
                R[rn].setData(addr);
            }
            
            else        //pre index
            {
            	printf("[log] - STR immediate pre index\n");
                int size = (IR.getLowerData() & 0xc0000000) >> 30;
                int opc = (IR.getLowerData() & 0x00c00000) >> 22;
                int imm9 = (IR.getLowerData() & 0x001ff000) >> 12;
                int rn = (IR.getLowerData() & 0x000003e0) >> 5;
                
                int rt = (IR.getLowerData() & 0x0000001f);
                uint64_t offset = signExtend(imm9,8);
                uint8_t addr = R[rn].getData();
                
                addr = addr + offset;
                addr -= Memory[0].addr;
                R[rn].setData(addr);
                if(size == 2)   //32 bit registers
                {
                	printf("[log] - STR immediate pre index 32\n");
                    int data = R[rt].getLowerData();
                    uint8_t dat = (data & 0xff000000)>>24;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff0000)>>16;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff00)>>8;
                    Memory[addr + 2].setData(dat);
                    dat = data & 0xff0000ff;
                    Memory[addr + 3].setData(dat);
                }
                
                else  //64 bit registers
                {
                	printf("[log] - STR immediate pre index 64\n");
                    uint64_t data = R[rt].getData();
                    uint8_t dat;
                    dat = (data & 0xff00000000000000)>>56;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff000000000000)>>48;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff0000000000)>>40;
                    Memory[addr + 2].setData(dat);
                    dat = (data & 0x000000ff00000000)>>32;
                    Memory[addr + 3].setData(dat);
                    dat = (data & 0x00000000ff000000)>>24;
                    Memory[addr + 4].setData(dat);
                    dat = (data & 0xff00000000ff0000)>>16;
                    Memory[addr + 5].setData(dat);
                    dat = (data & 0x000000000000ff00)>>8;
                    Memory[addr + 6].setData(dat);
                    dat = data & 0x00000000000000ff;
                    Memory[addr + 7].setData(dat);
                }
                
               
            }
        }
        
        else    //unsigned offset
        {
        	printf("[log] - STR immediate unsigned offset\n");
            int size = (IR.getLowerData() & 0xc0000000) >> 30;
            int opc = (IR.getLowerData() & 0x00c00000) >> 22;
            int imm12 = (IR.getLowerData() & 0x003ffc00) >> 10;
            int rn = (IR.getLowerData() & 0x000003e0) >> 5;
            int rt = (IR.getLowerData() & 0x0000001f);
            
            uint64_t addr = R[rn].getData();
            uint64_t offset = (0x0000000000000fff) & (uint64_t)imm12;
            addr += offset;
            addr -= Memory[0].addr;
            
            if(size == 2)   //32 bit registers
            {
            	printf("[log] - STR immediate unsigned offset 32\n");
                int data = R[rt].getLowerData();
                uint8_t dat = (data & 0xff000000)>>24;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff0000)>>16;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff00)>>8;
                    Memory[addr + 2].setData(dat);
                    dat = data & 0xff0000ff;
                    Memory[addr + 3].setData(dat);
            
                
            }
            
            else        //64 bit registers
            {
            	printf("[log] - STR immediate unsigned offset 64\n");
                uint64_t data = R[rt].getData();
                uint8_t dat;
                    dat = (data & 0xff00000000000000)>>56;
                    Memory[addr].setData(dat);
                    dat = (data & 0x00ff000000000000)>>48;
                    Memory[addr + 1].setData(dat);
                    dat = (data & 0x0000ff0000000000)>>40;
                    Memory[addr + 2].setData(dat);
                    dat = (data & 0x000000ff00000000)>>32;
                    Memory[addr + 3].setData(dat);
                    dat = (data & 0x00000000ff000000)>>24;
                    Memory[addr + 4].setData(dat);
                    dat = (data & 0xff00000000ff0000)>>16;
                    Memory[addr + 5].setData(dat);
                    dat = (data & 0x000000000000ff00)>>8;
                    Memory[addr + 6].setData(dat);
                    dat = data & 0x00000000000000ff;
                    Memory[addr + 7].setData(dat);
            }
            
        }
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x1635d(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebx
movq %r14, %rdi
callq 0x5b26
btl $0x16, %eax
jb 0x3fe0
leaq 0x2af8(%rip), %rdi      # 0x699e
callq 0x1120
btl $0x18, %ebx
jb 0x413b
leaq 0x16324(%rip), %rdi     # 0x1a1e0
callq 0x5b26
btl $0xb, %eax
jb 0x4332
leaq 0x2ae1(%rip), %rdi      # 0x69b3
callq 0x1120
leaq 0x16302(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
movq %r14, %rdi
callq 0x5b26
movq %r14, %rdi
callq 0x5b26
movl %eax, %r15d
shrl $0xc, %r15d
andl $0x1ff, %r15d           # imm = 0x1FF
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebx
movq %r14, %rdi
callq 0x5b26
movl %eax, %r13d
andl $0x1f, %r13d
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x12ec
movq %rax, (%rsp)
shrl $0x2, %ebx
andl $0xf8, %ebx
leaq 0x61a2(%rip), %r14      # 0xa0e0
addq %r14, %rbx
movq %rbx, %rdi
callq 0x5b22
movq %rax, %r15
leaq 0x628d(%rip), %r12      # 0xa1e0
subq 0x6286(%rip), %r15      # 0xa1e0
andl $0xc0000000, %ebp       # imm = 0xC0000000
movq %r15, 0x8(%rsp)
shlq $0x4, %r15
leaq (%r12,%r15), %rax
movq %rax, 0x10(%rsp)
negl %ebp
leaq (%r14,%r13,8), %r13
leaq 0x10(%r15,%r12), %rbp
leaq 0x20(%r15,%r12), %r14
jno 0x46ac
leaq 0x2a69(%rip), %rdi      # 0x69f8
callq 0x1120
movq %r13, %rdi
callq 0x5b26
movl %eax, %r13d
movl %eax, %esi
shrl $0x18, %esi
movq 0x10(%rsp), %rdi
callq 0x5b12
movl %r13d, %esi
shrl $0x10, %esi
movq %r14, %r15
movl $0xff, %r14d
andl %r14d, %esi
movq %rbp, %rdi
callq 0x5b12
movl %r13d, %esi
shrl $0x8, %esi
andl %r14d, %esi
movq %r15, %rdi
callq 0x5b12
pushq $0x3
jmp 0x475f
leaq 0x2b14(%rip), %rdi      # 0x6afb
callq 0x1120
btl $0x18, %ebx
jb 0x423d
leaq 0x161e3(%rip), %r15     # 0x1a1e0
movq %r15, %rdi
callq 0x5b26
movl %eax, %ebp
movq %r15, %rdi
callq 0x5b26
movq %r15, %rdi
callq 0x5b26
movl %eax, %r12d
shrl $0xc, %r12d
andl $0x1ff, %r12d           # imm = 0x1FF
movq %r15, %rdi
callq 0x5b26
movl %eax, %r14d
movq %r15, %rdi
callq 0x5b26
movl %eax, %r13d
andl $0x1f, %r13d
movq %r15, %rdi
callq 0x5b26
andl $0xc0000000, %ebp       # imm = 0xC0000000
shrl $0x2, %r14d
andl $0xf8, %r14d
leaq 0x6081(%rip), %rcx      # 0xa0e0
addq %rcx, %r14
btl $0xb, %eax
jb 0x4460
movl %r13d, (%rsp)
leaq 0x2a9a(%rip), %rdi      # 0x6b11
callq 0x1120
negl %ebp
jno 0x478a
leaq 0x2acb(%rip), %rdi      # 0x6b56
callq 0x1120
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x12ec
movq %rax, 0x8(%rsp)
movslq %ebp, %r12
movq %r12, %r13
shlq $0x4, %r13
leaq 0x6125(%rip), %rbp      # 0xa1e0
movq %rbp, %rdi
addq %r13, %rdi
callq 0x5b1e
movzbl %al, %r15d
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
callq 0x5b1e
movzbl %al, %ebx
shll $0x10, %r15d
shll $0x8, %ebx
orl %r15d, %ebx
leaq 0x20(,%rbp), %rdi
addq %r13, %rdi
callq 0x5b1e
movzbl %al, %r15d
orl %ebx, %r15d
shll $0x8, %r15d
leaq 0x30(,%rbp), %rdi
addq %r13, %rdi
callq 0x5b1e
movzbl %al, %esi
orl %r15d, %esi
movl (%rsp), %eax
leaq 0x5fbe(%rip), %rcx      # 0xa0e0
leaq (%rcx,%rax,8), %rdi
callq 0x5b30
addl 0x8(%rsp), %r12d
movq %r14, %rdi
movl %r12d, %esi
jmp 0x450d
leaq 0x2941(%rip), %rdi      # 0x6a83
callq 0x1120
leaq 0x16092(%rip), %r14     # 0x1a1e0
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
movq %r14, %rdi
callq 0x5b26
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebx
shrl $0xa, %ebx
movq %r14, %rdi
callq 0x5b26
movl %eax, %r15d
movq %r14, %rdi
callq 0x5b26
movl %eax, %r14d
andl $0x1f, %r14d
shrl $0x2, %r15d
andl $0xf8, %r15d
leaq 0x5f47(%rip), %r12      # 0xa0e0
addq %r12, %r15
movq %r15, %rdi
callq 0x5b22
andl $0xfff, %ebx            # imm = 0xFFF
addq %rax, %rbx
subq 0x602c(%rip), %rbx      # 0xa1e0
leaq 0x6025(%rip), %r15      # 0xa1e0
andl $0xc0000000, %ebp       # imm = 0xC0000000
shlq $0x4, %rbx
leaq (%r15,%rbx), %r13
negl %ebp
leaq (%r12,%r14,8), %r14
leaq 0x10(%rbx,%r15), %r12
leaq 0x20(%rbx,%r15), %rax
movq %rax, (%rsp)
jno 0x4520
leaq 0x28e8(%rip), %rdi      # 0x6ad2
callq 0x1120
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
movl %eax, %esi
shrl $0x18, %esi
movq %r13, %rdi
callq 0x5b12
movl %ebp, %esi
shrl $0x10, %esi
movl $0xff, %r14d
andl %r14d, %esi
movq %r12, %rdi
callq 0x5b12
movl %ebp, %esi
shrl $0x8, %esi
andl %r14d, %esi
movq (%rsp), %rdi
callq 0x5b12
leaq (%rbx,%r15), %rdi
addq $0x30, %rdi
andl %r14d, %ebp
jmp 0x4459
leaq 0x299d(%rip), %rdi      # 0x6be1
callq 0x1120
leaq 0x15f90(%rip), %rbx     # 0x1a1e0
movq %rbx, %rdi
callq 0x5b26
movl %eax, %r14d
movq %rbx, %rdi
callq 0x5b26
movq %rbx, %rdi
callq 0x5b26
movl %eax, %ebp
shrl $0xa, %ebp
andl $0xfff, %ebp            # imm = 0xFFF
movq %rbx, %rdi
callq 0x5b26
movl %eax, %r15d
movq %rbx, %rdi
callq 0x5b26
movl %eax, %ebx
andl $0x1f, %ebx
andl $0xc0000000, %r14d      # imm = 0xC0000000
shrl $0x2, %r15d
andl $0xf8, %r15d
leaq 0x5e39(%rip), %r12      # 0xa0e0
addq %r12, %r15
negl %r14d
jno 0x45ce
leaq 0x2976(%rip), %rdi      # 0x6c30
callq 0x1120
movq %r15, %rdi
callq 0x5b22
movl %ebp, %ecx
leaq (%rax,%rcx,4), %r14
shlq $0x4, %r14
leaq 0x5f08(%rip), %r15      # 0xa1e0
leaq (%r15,%r14), %rdi
callq 0x5b1e
movzbl %al, %ebp
leaq (%r14,%r15), %rdi
addq $0x10, %rdi
callq 0x5b1e
movzbl %al, %r13d
shll $0x10, %ebp
shll $0x8, %r13d
orl %ebp, %r13d
leaq (%r14,%r15), %rdi
addq $0x20, %rdi
callq 0x5b1e
movzbl %al, %ebp
orl %r13d, %ebp
shll $0x8, %ebp
leaq (%r14,%r15), %rdi
addq $0x30, %rdi
callq 0x5b1e
movzbl %al, %esi
orl %ebp, %esi
movl %ebx, %eax
leaq (%r12,%rax,8), %rdi
jmp 0x450d
leaq 0x26e4(%rip), %rdi      # 0x6a1d
callq 0x1120
leaq 0x15e9b(%rip), %rbx     # 0x1a1e0
movq %rbx, %rdi
callq 0x5b26
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5b26
movq %rbx, %rdi
callq 0x5b26
movl %eax, %r15d
shrl $0xc, %r15d
andl $0x1ff, %r15d           # imm = 0x1FF
movq %rbx, %rdi
callq 0x5b26
movl %eax, %r12d
movq %rbx, %rdi
callq 0x5b26
movl %eax, %r14d
andl $0x1f, %r14d
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x12ec
movq %rax, %r15
shrl $0x2, %r12d
andl $0xf8, %r12d
leaq 0x5d39(%rip), %r13      # 0xa0e0
addq %r13, %r12
movq %r12, %rdi
callq 0x5b22
movq %rax, %rbx
addq %r15, %rbx
subq 0x5e21(%rip), %rbx      # 0xa1e0
movzbl %bl, %r15d
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b2a
andl $0xc0000000, %ebp       # imm = 0xC0000000
negl %ebp
jno 0x488c
leaq 0x267d(%rip), %rdi      # 0x6a60
callq 0x1120
movl %r14d, %eax
leaq (,%rax,8), %rdi
addq %r13, %rdi
callq 0x5b26
movl %eax, %ebp
movl %eax, %esi
shrl $0x18, %esi
shll $0x4, %r15d
leaq 0x5dd3(%rip), %r14      # 0xa1e0
addq %r14, %r15
movq %r15, %rdi
callq 0x5b12
movl %ebp, %esi
shrl $0x10, %esi
movl $0xff, %r15d
andl %r15d, %ebx
shll $0x4, %ebx
leaq (%rbx,%r14), %rdi
addq $0x10, %rdi
andl %r15d, %esi
callq 0x5b12
movl %ebp, %esi
shrl $0x8, %esi
leaq (%rbx,%r14), %rdi
addq $0x20, %rdi
andl %r15d, %esi
callq 0x5b12
leaq (%rbx,%r14), %rdi
addq $0x30, %rdi
andl %r15d, %ebp
movl %ebp, %esi
jmp 0x4962
leaq 0x2713(%rip), %rdi      # 0x6b7a
callq 0x1120
negl %ebp
jno 0x4975
leaq 0x2743(%rip), %rdi      # 0x6bbe
callq 0x1120
movq %r14, %rdi
callq 0x5b26
movl %eax, %ebp
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x12ec
movq %rax, %r15
addl %ebp, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5b30
movslq %r15d, %r14
shlq $0x4, %r14
leaq 0x5d2c(%rip), %r15      # 0xa1e0
leaq (%r15,%r14), %rdi
callq 0x5b1e
movzbl %al, %ebx
leaq (%r14,%r15), %rdi
addq $0x10, %rdi
callq 0x5b1e
movzbl %al, %ebp
shll $0x10, %ebx
shll $0x8, %ebp
orl %ebx, %ebp
leaq (%r14,%r15), %rdi
addq $0x20, %rdi
callq 0x5b1e
movzbl %al, %ebx
orl %ebp, %ebx
shll $0x8, %ebx
leaq (%r14,%r15), %rdi
addq $0x30, %rdi
callq 0x5b1e
movzbl %al, %esi
orl %ebx, %esi
movl %r13d, %eax
leaq 0x5bd7(%rip), %rcx      # 0xa0e0
leaq (%rcx,%rax,8), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b30
leaq 0x2582(%rip), %rdi      # 0x6aa9
callq 0x1120
movq %r14, %rdi
callq 0x5b22
movq %rax, %r14
movq %rax, %rsi
shrq $0x38, %rsi
movq %r13, %rdi
callq 0x5b12
movq %r14, %rsi
shrq $0x30, %rsi
movl $0xff, %ebp
andl %ebp, %esi
movq %r12, %rdi
callq 0x5b12
movq %r14, %rsi
shrq $0x28, %rsi
andl %ebp, %esi
movq (%rsp), %rdi
callq 0x5b12
movq %r14, %rsi
shrq $0x20, %rsi
leaq (%rbx,%r15), %rdi
addq $0x30, %rdi
andl %ebp, %esi
callq 0x5b12
movl %r14d, %esi
shrl $0x18, %esi
leaq (%rbx,%r15), %rdi
addq $0x40, %rdi
callq 0x5b12
movl %r14d, %esi
shrl $0x10, %esi
leaq (%rbx,%r15), %rdi
addq $0x50, %rdi
andl %ebp, %esi
callq 0x5b12
movl %r14d, %esi
shrl $0x8, %esi
leaq (%rbx,%r15), %rdi
addq $0x60, %rdi
andl %ebp, %esi
callq 0x5b12
leaq (%rbx,%r15), %rdi
addq $0x70, %rdi
jmp 0x495c
leaq 0x2632(%rip), %rdi      # 0x6c07
callq 0x1120
movq %r15, %rdi
callq 0x5b22
movl %ebp, %ecx
leaq (%rax,%rcx,8), %r14
shlq $0x4, %r14
leaq 0x5bed(%rip), %r15      # 0xa1e0
leaq (%r15,%r14), %rdi
callq 0x5b1e
movl %eax, %ebp
leaq (%r14,%r15), %rdi
addq $0x10, %rdi
callq 0x5b1e
movzbl %bpl, %ecx
shll $0x10, %ecx
movzbl %al, %ebp
shll $0x8, %ebp
orl %ecx, %ebp
leaq (%r14,%r15), %rdi
addq $0x20, %rdi
callq 0x5b1e
movzbl %al, %r13d
orl %ebp, %r13d
leaq (%r14,%r15), %rdi
addq $0x30, %rdi
callq 0x5b1e
shlq $0x10, %r13
movzbl %al, %ebp
shll $0x8, %ebp
orq %r13, %rbp
leaq (%r14,%r15), %rdi
addq $0x40, %rdi
callq 0x5b1e
movzbl %al, %r13d
orq %rbp, %r13
leaq (%r14,%r15), %rdi
addq $0x50, %rdi
callq 0x5b1e
shlq $0x10, %r13
movzbl %al, %ebp
shll $0x8, %ebp
orq %r13, %rbp
leaq (%r14,%r15), %rdi
addq $0x60, %rdi
callq 0x5b1e
movzbl %al, %r13d
orq %rbp, %r13
shlq $0x8, %r13
leaq (%r14,%r15), %rdi
addq $0x70, %rdi
callq 0x5b1e
movzbl %al, %esi
orq %r13, %rsi
movl %ebx, %eax
leaq (%r12,%rax,8), %rdi
jmp 0x4a73
leaq 0x2321(%rip), %rdi      # 0x69d4
callq 0x1120
movq %r13, %rdi
callq 0x5b22
movq %rax, %r13
movq %rax, %rsi
shrq $0x38, %rsi
movq 0x10(%rsp), %rdi
callq 0x5b12
movq %r13, %rsi
shrq $0x30, %rsi
movl $0xff, %eax
andl %eax, %esi
movq %rbp, %rdi
callq 0x5b12
movq %r13, %rsi
shrq $0x28, %rsi
movl $0xff, %eax
andl %eax, %esi
movl $0xff, %ebp
movq %r14, %rdi
callq 0x5b12
movq %r13, %rsi
shrq $0x20, %rsi
leaq (%r15,%r12), %rdi
addq $0x30, %rdi
andl %ebp, %esi
movl $0xff, %ebp
callq 0x5b12
movl %r13d, %esi
shrl $0x18, %esi
leaq (%r15,%r12), %rdi
addq $0x40, %rdi
callq 0x5b12
movl %r13d, %esi
shrl $0x10, %esi
leaq (%r15,%r12), %rdi
addq $0x50, %rdi
andl %ebp, %esi
callq 0x5b12
movl %r13d, %esi
shrl $0x8, %esi
leaq (%r15,%r12), %rdi
addq $0x60, %rdi
andl %ebp, %esi
callq 0x5b12
pushq $0x7
popq %rax
movq 0x8(%rsp), %r14
addq %r14, %rax
shlq $0x4, %rax
addq %rax, %r12
movzbl %r13b, %esi
movq %r12, %rdi
callq 0x5b12
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
jmp 0x4a73
leaq 0x23a1(%rip), %rdi      # 0x6b32
callq 0x1120
movq %r14, %rdi
callq 0x5b22
movq %rax, %r13
movq %rax, 0x8(%rsp)
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x12ec
movq %rax, %r12
shlq $0x4, %r13
leaq 0x5a21(%rip), %r15      # 0xa1e0
leaq (%r15,%r13), %rdi
callq 0x5b1e
movl %eax, %ebp
leaq (%r15,%r13), %rdi
addq $0x10, %rdi
callq 0x5b1e
movzbl %bpl, %ecx
shll $0x10, %ecx
movzbl %al, %ebx
shll $0x8, %ebx
orl %ecx, %ebx
leaq (%r15,%r13), %rdi
addq $0x20, %rdi
callq 0x5b1e
movzbl %al, %ebp
orl %ebx, %ebp
leaq (%r15,%r13), %rdi
addq $0x30, %rdi
callq 0x5b1e
shlq $0x10, %rbp
movzbl %al, %ebx
shll $0x8, %ebx
orq %rbp, %rbx
leaq (%r15,%r13), %rdi
addq $0x40, %rdi
callq 0x5b1e
movzbl %al, %ebp
orq %rbx, %rbp
leaq (%r15,%r13), %rdi
addq $0x50, %rdi
callq 0x5b1e
shlq $0x10, %rbp
movzbl %al, %ebx
shll $0x8, %ebx
orq %rbp, %rbx
leaq (%r15,%r13), %rdi
addq $0x60, %rdi
callq 0x5b1e
movzbl %al, %ebp
orq %rbx, %rbp
shlq $0x8, %rbp
leaq (%r15,%r13), %rdi
addq $0x70, %rdi
callq 0x5b1e
movzbl %al, %esi
orq %rbp, %rsi
movl (%rsp), %eax
leaq 0x586d(%rip), %rcx      # 0xa0e0
leaq (%rcx,%rax,8), %rdi
callq 0x5b2a
addq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
jmp 0x4a73
leaq 0x21aa(%rip), %rdi      # 0x6a3d
callq 0x1120
movl %r14d, %eax
leaq (,%rax,8), %rdi
addq %r13, %rdi
callq 0x5b22
movq %rax, %r14
movq %rax, %rsi
shrq $0x38, %rsi
shll $0x4, %r15d
leaq 0x5920(%rip), %r12      # 0xa1e0
addq %r12, %r15
movq %r15, %rdi
callq 0x5b12
movq %r14, %rsi
shrq $0x30, %rsi
movl $0xff, %ebp
andl %ebp, %ebx
shll $0x4, %ebx
leaq (%rbx,%r12), %rdi
addq $0x10, %rdi
andl %ebp, %esi
callq 0x5b12
movq %r14, %rsi
shrq $0x28, %rsi
leaq (%rbx,%r12), %rdi
addq $0x20, %rdi
andl %ebp, %esi
callq 0x5b12
movq %r14, %rsi
shrq $0x20, %rsi
leaq (%rbx,%r12), %rdi
addq $0x30, %rdi
andl %ebp, %esi
callq 0x5b12
movl %r14d, %esi
shrl $0x18, %esi
leaq (%rbx,%r12), %rdi
addq $0x40, %rdi
callq 0x5b12
movl %r14d, %esi
shrl $0x10, %esi
leaq (%rbx,%r12), %rdi
addq $0x50, %rdi
andl %ebp, %esi
callq 0x5b12
movl %r14d, %esi
shrl $0x8, %esi
leaq (%rbx,%r12), %rdi
addq $0x60, %rdi
andl %ebp, %esi
callq 0x5b12
leaq (%rbx,%r12), %rdi
addq $0x70, %rdi
andl %ebp, %r14d
movl %r14d, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b12
leaq 0x221f(%rip), %rdi      # 0x6b9b
callq 0x1120
movq %r14, %rdi
callq 0x5b22
movl %r13d, (%rsp)
movq %rax, %r13
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x12ec
movq %rax, %r15
addq %r13, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b2a
shlq $0x4, %r15
leaq 0x5829(%rip), %r14      # 0xa1e0
leaq (%r14,%r15), %rdi
callq 0x5b1e
movl %eax, %ebp
leaq (%r15,%r14), %rdi
addq $0x10, %rdi
callq 0x5b1e
movzbl %bpl, %ecx
shll $0x10, %ecx
movzbl %al, %ebx
shll $0x8, %ebx
orl %ecx, %ebx
leaq (%r15,%r14), %rdi
addq $0x20, %rdi
callq 0x5b1e
movzbl %al, %r12d
orl %ebx, %r12d
leaq (%r15,%r14), %rdi
addq $0x30, %rdi
callq 0x5b1e
shlq $0x10, %r12
movzbl %al, %ebx
shll $0x8, %ebx
orq %r12, %rbx
leaq (%r15,%r14), %rdi
addq $0x40, %rdi
callq 0x5b1e
movzbl %al, %r12d
orq %rbx, %r12
leaq (%r15,%r14), %rdi
addq $0x50, %rdi
callq 0x5b1e
shlq $0x10, %r12
movzbl %al, %ebx
shll $0x8, %ebx
orq %r12, %rbx
leaq (%r15,%r14), %rdi
addq $0x60, %rdi
callq 0x5b1e
movzbl %al, %r12d
orq %rbx, %r12
shlq $0x8, %r12
leaq (%r15,%r14), %rdi
addq $0x70, %rdi
callq 0x5b1e
movzbl %al, %esi
orq %r12, %rsi
movl (%rsp), %eax
leaq 0x5671(%rip), %rcx      # 0xa0e0
leaq (%rcx,%rax,8), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b2a