// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: SIB_0
size_t __bea_callspec__ SIB_0(ARGTYPE* pMyArgument, size_t i, PDISASM pMyDisasm)
{

    /* ========================= Interpret Base */
    size_t j;
    if ((GV.BASE_  == 5) && (GV.MOD_ == 0)) {
        GV.DECALAGE_EIP += 4;
        if (!Security(7, pMyDisasm)) return i;
        j = i;
        #ifndef BEA_LIGHT_DISASSEMBLY
           i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+j,"%.8X",(Int64) *((UInt32*)(UIntPtr) (GV.EIP_+3)));
        #endif
        (*pMyArgument).Memory.Displacement = *((UInt32*)(UIntPtr) (GV.EIP_+3));

    }
    else {

        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "(%");
            #endif
            i += 2;
        }
        if (GV.AddressSize == 64) {
            if (GV.REX.B_ == 0) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[GV.BASE_ ]);
                #endif
                (*pMyArgument).Memory.BaseRegister = REGS[GV.BASE_ ];
                i += strlen(Registers64Bits[GV.BASE_ ]);
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[GV.BASE_ +8]);
                #endif
                (*pMyArgument).Memory.BaseRegister = REGS[GV.BASE_ +8];
                i += strlen( Registers64Bits[GV.BASE_ +8]);
            }
        }
        else if (GV.AddressSize == 32) {
            if (GV.REX.B_ == 0) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[GV.BASE_ ]);
                #endif
                (*pMyArgument).Memory.BaseRegister = REGS[GV.BASE_ ];
                i += strlen( Registers32Bits[GV.BASE_ ]);
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[GV.BASE_ +8]);
                #endif
                (*pMyArgument).Memory.BaseRegister = REGS[GV.BASE_ +8];
                i += strlen( Registers32Bits[GV.BASE_ +8]);
            }
        }
    }
    /* ======================== Interpret Index */


    if (GV.INDEX_  != 4 || GV.REX.X_) {
        if (GV.SYNTAX_ == ATSyntax) {
            if (GV.BASE_  == 5) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "(,%");
                #endif
                i+=3;
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, ",%");
                #endif
                i+=2;
            }
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "+");
            #endif
            i+=1;
        }

        if (GV.AddressSize == 64) {
            if (GV.REX.X_ == 0) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[GV.INDEX_ ]);
                #endif
                (*pMyArgument).Memory.IndexRegister = REGS[GV.INDEX_ ];
                i += strlen( Registers64Bits[GV.INDEX_ ]);
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[GV.INDEX_ +8]);
                #endif
                (*pMyArgument).Memory.IndexRegister = REGS[GV.INDEX_ +8];
                i += strlen( Registers64Bits[GV.INDEX_ +8]);
            }
        }
        else if (GV.AddressSize == 32) {
            if (GV.REX.X_ == 0) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[GV.INDEX_ ]);
                #endif
                (*pMyArgument).Memory.IndexRegister = REGS[GV.INDEX_ ];
                i += strlen( Registers32Bits[GV.INDEX_ ]);
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[GV.INDEX_ +8]);
                #endif
                (*pMyArgument).Memory.IndexRegister = REGS[GV.INDEX_ +8];
                i += strlen( Registers32Bits[GV.INDEX_ +8]);
            }
        }
    }
    (*pMyArgument).Memory.Scale = 1;
    if ((GV.SYNTAX_ == ATSyntax) && ((GV.BASE_  != 5) || (GV.INDEX_  != 4 || GV.REX.X_))) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, ")");
        #endif
        i++;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x5, 0x228(%rax)
jne 0x4ba0e
movq -0x20(%rbp), %rax
cmpl $0x0, 0x218(%rax)
jne 0x4ba0e
movq -0x20(%rbp), %rax
movl 0x244(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x244(%rax)
movq -0x20(%rbp), %rsi
movl $0x7, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x4b9b9
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4bf63
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x1f0(%rax), %rax
movl 0x3(%rax), %eax
movl %eax, %ecx
leaq 0x5acc(%rip), %rdx      # 0x514b0
callq 0x4d3a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq 0x1f0(%rax), %rax
movl 0x3(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x5c(%rax)
jmp 0x4bc49
movq -0x20(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x4ba3e
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x6b89(%rip), %rsi      # 0x525b6
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x40, 0x214(%rax)
jne 0x4bb43
movq -0x20(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x0, %eax
jne 0x4bac9
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rax
leaq 0x17187(%rip), %rsi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rcx
leaq 0x17409(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rax
leaq 0x1714d(%rip), %rdi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bb3e
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x17119(%rip), %rsi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
movslq %eax, %rcx
leaq 0x17396(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x170d6(%rip), %rdi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bc47
movq -0x20(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x4bc45
movq -0x20(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x0, %eax
jne 0x4bbce
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rax
leaq 0x170c2(%rip), %rsi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rcx
leaq 0x17304(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movslq 0x228(%rax), %rax
leaq 0x17088(%rip), %rdi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bc43
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x17054(%rip), %rsi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
movslq %eax, %rcx
leaq 0x17291(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movl 0x228(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x17011(%rip), %rdi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bc45
jmp 0x4bc47
jmp 0x4bc49
movq -0x20(%rbp), %rax
cmpl $0x4, 0x220(%rax)
jne 0x4bc6a
movq -0x20(%rbp), %rax
movzbl 0x286(%rax), %eax
cmpl $0x0, %eax
je 0x4bef6
movq -0x20(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x4bccb
movq -0x20(%rbp), %rax
cmpl $0x5, 0x228(%rax)
jne 0x4bca9
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x6927(%rip), %rsi      # 0x525bd
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
jmp 0x4bcc9
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x6906(%rip), %rsi      # 0x525be
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x4bceb
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x68e1(%rip), %rsi      # 0x525bb
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x40, 0x214(%rax)
jne 0x4bdf0
movq -0x20(%rbp), %rax
movzbl 0x286(%rax), %eax
cmpl $0x0, %eax
jne 0x4bd76
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rax
leaq 0x16eda(%rip), %rsi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rcx
leaq 0x1715c(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rax
leaq 0x16ea0(%rip), %rdi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bdeb
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x16e6c(%rip), %rsi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
movslq %eax, %rcx
leaq 0x170e9(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x16e29(%rip), %rdi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bef4
movq -0x20(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x4bef2
movq -0x20(%rbp), %rax
movzbl 0x286(%rax), %eax
cmpl $0x0, %eax
jne 0x4be7b
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rax
leaq 0x16e15(%rip), %rsi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rcx
leaq 0x17057(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x20(%rbp), %rax
movslq 0x220(%rax), %rax
leaq 0x16ddb(%rip), %rdi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bef0
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x16da7(%rip), %rsi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
movslq %eax, %rcx
leaq 0x16fe4(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x20(%rbp), %rax
movl 0x220(%rax), %eax
addl $0x8, %eax
cltq
leaq 0x16d64(%rip), %rdi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rdi
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4bef2
jmp 0x4bef4
jmp 0x4bef6
movq -0x10(%rbp), %rax
movl $0x1, 0x58(%rax)
movq -0x20(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x4bf5b
movq -0x20(%rbp), %rax
cmpl $0x5, 0x228(%rax)
jne 0x4bf3b
movq -0x20(%rbp), %rax
cmpl $0x4, 0x220(%rax)
jne 0x4bf3b
movq -0x20(%rbp), %rax
movzbl 0x286(%rax), %eax
cmpl $0x0, %eax
je 0x4bf5b
movq -0x10(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x5448(%rip), %rsi      # 0x51392
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)