// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_disp32
void __bea_callspec__ Addr_disp32(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    Int32 MyNumber;
    UInt64 MyAddress;
    size_t i = 0;
    (*pMyArgument).ArgType = MEMORY_TYPE;
    if (GV.AddressSize >= 32) {
        if (!Security(6, pMyDisasm)) return;
        GV.DECALAGE_EIP+=4;
        MyNumber = *((Int32*)(UIntPtr) (GV.EIP_+2));
        (*pMyArgument).Memory.Displacement = MyNumber;
        if (GV.Architecture == 64) {
            MyNumber += 6;
            MyNumber += GV.NB_PREFIX;
            if (GV.ImmediatSize == 32) {
                MyNumber += 4;
            }
            if (GV.ImmediatSize == 16) {
                MyNumber += 2;
            }
            if (GV.ImmediatSize == 8) {
                MyNumber += 1;
            }
            if ((*pMyDisasm).Instruction.Opcode >= 0x0F3800) {      /* add two bytes if opcode is a 3-bytes */
                MyNumber +=2;
            }
            else if ((*pMyDisasm).Instruction.Opcode >= 0x0100) {   /* add one byte if opcode is a 2-bytes */
                MyNumber +=1;
            }
            CalculateRelativeAddress(&MyAddress, (Int64)MyNumber, pMyDisasm);
            (*pMyDisasm).Instruction.AddrValue = MyAddress;
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+i,"%.16llX", (Int64)MyAddress);
            #endif
            (*pMyArgument).ArgType |= RELATIVE_;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               i+= CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+i,"%.8X", (Int64)MyNumber);
            #endif
        }
    }
    else {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic, Registers16Bits[7]);
        #endif
        (*pMyArgument).Memory.BaseRegister = REGS[7];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl $0x40000000, 0x40(%rax) # imm = 0x40000000
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jl 0x469f4
movq -0x10(%rbp), %rsi
movl $0x6, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x468ac
jmp 0x46a11
movq -0x10(%rbp), %rax
movl 0x244(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x244(%rax)
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movl 0x2(%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x5c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x40, 0x25c(%rax)
jne 0x469ce
movl -0x14(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x264(%rax), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x20, 0x260(%rax)
jne 0x4691c
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x10, 0x260(%rax)
jne 0x46932
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x8, 0x260(%rax)
jne 0x46948
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xf3800, 0x64(%rax)    # imm = 0xF3800
jl 0x46960
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x46978
movq -0x10(%rbp), %rax
cmpl $0x100, 0x64(%rax)      # imm = 0x100
jl 0x46976
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x46978
movslq -0x14(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x4db60
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0xaaf9(%rip), %rdx      # 0x514a8
callq 0x4d3a0
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x4000000, %ecx        # imm = 0x4000000
movl %ecx, 0x40(%rax)
jmp 0x469f2
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq -0x28(%rbp), %rsi
movslq -0x14(%rbp), %rcx
leaq 0xaacb(%rip), %rdx      # 0x514b0
callq 0x4d3a0
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x46a11
movq -0x8(%rbp), %rdi
leaq 0x1c2f9(%rip), %rsi     # 0x62cf8
callq 0x81c0
movl 0x1c4b2(%rip), %ecx     # 0x62ebc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)