// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_Disasm.c
// Function: EvIv
void __bea_callspec__ EvIv(PDISASM pMyDisasm)
{
    if (GV.OperandSize >= 32) {
        if (GV.OperandSize == 64) {
            GV.MemDecoration = Arg1qword;
        }
        else {
            GV.MemDecoration = Arg1dword;
        }
        GV.ImmediatSize = 32;                       /* place this instruction before MOD_RM routine to inform it there is an immediat value */
        MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
        GV.EIP_ += GV.DECALAGE_EIP+6;
        if (!Security(0, pMyDisasm)) return;
        #ifndef BEA_LIGHT_DISASSEMBLY
            if (GV.OperandSize == 64) {
                (void) CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument2.ArgMnemonic,"%.16llX",(Int64) *((Int32*)(UIntPtr) (GV.EIP_-4)));
            }
            else {
                (void) CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument2.ArgMnemonic,"%.8X",(Int64) *((UInt32*)(UIntPtr) (GV.EIP_-4)));
            }
        #endif

        (*pMyDisasm).Argument2.ArgType = CONSTANT_TYPE+ABSOLUTE_;
        (*pMyDisasm).Argument2.ArgSize = 32;
        (*pMyDisasm).Instruction.Immediat = *((UInt32*)(UIntPtr) (GV.EIP_-4));
    }
    else {
        GV.MemDecoration = Arg1word;
        GV.ImmediatSize = 16;
        MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
        GV.EIP_ += GV.DECALAGE_EIP+4;
        if (!Security(0, pMyDisasm)) return;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument2.ArgMnemonic,"%.4X",(Int64)*((UInt16*)(UIntPtr) (GV.EIP_-2)));
        #endif
        (*pMyDisasm).Argument2.ArgType = CONSTANT_TYPE+ABSOLUTE_;
        (*pMyDisasm).Argument2.ArgSize = 16;
        (*pMyDisasm).Instruction.Immediat = *((UInt16*)(UIntPtr) (GV.EIP_-2));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jl 0x4e63b
movq -0x8(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x4e52a
movq -0x8(%rbp), %rax
movl $0x4, 0x210(%rax)
jmp 0x4e538
movq -0x8(%rbp), %rax
movl $0x3, 0x210(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0x260(%rax)
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
movq -0x8(%rbp), %rsi
callq 0x4dbc0
movq -0x8(%rbp), %rax
movl 0x244(%rax), %eax
addl $0x6, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x1f0(%rax), %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x4e592
jmp 0x4e70a
movq -0x8(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x4e5ce
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x104, %rsi            # imm = 0x104
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x4, %rax
movslq (%rax), %rcx
leaq 0x2ee1(%rip), %rdx      # 0x514a8
callq 0x4d3a0
jmp 0x4e5fc
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x104, %rsi            # imm = 0x104
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x4, %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x2eb9(%rip), %rdx      # 0x514b0
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x88000000, 0x144(%rax) # imm = 0x88000000
movq -0x8(%rbp), %rax
movl $0x20, 0x148(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x4, %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
jmp 0x4e70a
movq -0x8(%rbp), %rax
movl $0x2, 0x210(%rax)
movq -0x8(%rbp), %rax
movl $0x10, 0x260(%rax)
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
movq -0x8(%rbp), %rsi
callq 0x4dbc0
movq -0x8(%rbp), %rax
movl 0x244(%rax), %eax
addl $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x1f0(%rax), %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x4e6a0
jmp 0x4e70a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x104, %rsi            # imm = 0x104
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x2, %rax
movzwl (%rax), %eax
movl %eax, %ecx
leaq 0x2dfc(%rip), %rdx      # 0x514c6
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x88000000, 0x144(%rax) # imm = 0x88000000
movq -0x8(%rbp), %rax
movl $0x10, 0x148(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x2, %rax
movzwl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
addq $0x10, %rsp
popq %rbp
retq