// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_SIB_disp8
void __bea_callspec__ Addr_SIB_disp8(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    size_t i = 0, j;
    long MyNumber;
    if (!Security(2, pMyDisasm)) return;
    if (GV.AddressSize >= 32) {
        MyNumber = *((Int8*)(UIntPtr) (GV.EIP_+3));
    }
    else {
        MyNumber = *((Int8*)(UIntPtr) (GV.EIP_+2));
    }
    (*pMyArgument).Memory.Displacement = MyNumber;
    if (GV.SYNTAX_ == ATSyntax) {
        if (MyNumber < 0) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "-");
            #endif
            i++;
            j=i;
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+j,"%.2X",(Int64) ~MyNumber+1);
            #endif
        }
        else {
            j=i;
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+j,"%.2X",(Int64) MyNumber);
            #endif
        }
        /*#ifndef BEA_LIGHT_DISASSEMBLY
   (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "(%");
#endif
         *i+=2; */
    }
    (*pMyArgument).ArgType = MEMORY_TYPE;
    if (GV.AddressSize >= 32) {
        GV.DECALAGE_EIP++;
        GV.BASE_  = (*((UInt8*)(UIntPtr) (GV.EIP_+2))) & 0x7;
        GV.SCALE_  = ((*((UInt8*)(UIntPtr) (GV.EIP_+2))) & 0xc0) >> 6;
        GV.INDEX_  = ((*((UInt8*)(UIntPtr) (GV.EIP_+2))) & 0x38) >> 3;
        j = i;
        i += SIB[GV.SCALE_ ](pMyArgument, j, pMyDisasm);
    }
    else {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic, Registers16Bits[6]);
        #endif
        i += strlen (Registers16Bits[6]);
        (*pMyArgument).Memory.BaseRegister = REGS[6];

    }

    if (GV.SYNTAX_ == ATSyntax) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, ")");
        #endif
        i++;
    }
    else {
        if (MyNumber < 0) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "-");
            #endif
            i++;
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+i,"%.2X",(Int64) ~MyNumber+1);
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, "+");
            #endif
            i++;
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+i,"%.2X",(Int64) MyNumber);
            #endif
        }
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl $0x2, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x47910
jmp 0x47bb5
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jl 0x47933
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movsbq 0x3(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x47947
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movsbq 0x2(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x5c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x479f2
cmpq $0x0, -0x28(%rbp)
jge 0x479c4
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xac3c(%rip), %rsi      # 0x525b9
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rcx
xorq $-0x1, %rcx
addq $0x1, %rcx
leaq 0x9aa6(%rip), %rdx      # 0x5145b
callq 0x4d3a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x479f0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq 0x9a78(%rip), %rdx      # 0x5145b
callq 0x4d3a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x479f2
movq -0x8(%rbp), %rax
movl $0x40000000, 0x40(%rax) # imm = 0x40000000
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jl 0x47ab4
movq -0x10(%rbp), %rax
movl 0x244(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x244(%rax)
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl 0x2(%rax), %ecx
andl $0x7, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x228(%rax)
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl 0x2(%rax), %ecx
andl $0xc0, %ecx
sarl $0x6, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x224(%rax)
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl 0x2(%rax), %ecx
andl $0x38, %ecx
sarl $0x3, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x220(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq 0x224(%rax), %rcx
leaq 0x1d568(%rip), %rax     # 0x65000
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq *%rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x47ae5
movq -0x8(%rbp), %rdi
leaq 0x1b231(%rip), %rsi     # 0x62cf0
callq 0x81c0
leaq 0x1b225(%rip), %rdi     # 0x62cf0
callq 0x80b0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x1b3da(%rip), %ecx     # 0x62eb8
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x47b1a
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x988e(%rip), %rsi      # 0x51392
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x47bb5
cmpq $0x0, -0x28(%rbp)
jge 0x47b6f
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xaa89(%rip), %rsi      # 0x525b9
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
xorq $-0x1, %rcx
addq $0x1, %rcx
leaq 0x98fb(%rip), %rdx      # 0x5145b
callq 0x4d3a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x47bb3
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xaa3d(%rip), %rsi      # 0x525bb
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq 0x98b5(%rip), %rdx      # 0x5145b
callq 0x4d3a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x47bb5
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)