// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: imul_GvEvIv
void __bea_callspec__ imul_GvEvIv(PDISASM pMyDisasm)
{
    (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+ARITHMETIC_INSTRUCTION;
    #ifndef BEA_LIGHT_DISASSEMBLY
       (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "imul ");
    #endif
    if (GV.OperandSize >= 32) {
        if (GV.OperandSize == 64) {
            GV.MemDecoration = Arg2qword;
        }
        else {
            GV.MemDecoration = Arg2dword;
        }
        GV.ImmediatSize = 32;
        MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
        Reg_Opcode(&(*pMyDisasm).Argument1, pMyDisasm);
        GV.EIP_+= GV.DECALAGE_EIP+6;
        if (!Security(0, pMyDisasm)) return;
        GV.third_arg = 1;
        (*pMyDisasm).Instruction.Immediat = *((UInt32*)(UIntPtr) (GV.EIP_- 4));
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyDisasm).Argument3.ArgMnemonic, "%.8X",(Int64) *((UInt32*)(UIntPtr) (GV.EIP_- 4)));
        #endif
        (*pMyDisasm).Argument3.ArgType = CONSTANT_TYPE+ABSOLUTE_;
        (*pMyDisasm).Argument3.ArgSize = 32;

        FillFlags(pMyDisasm, 38);
    }
    else {
        GV.MemDecoration = Arg2word;
        GV.ImmediatSize = 16;
        MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
        Reg_Opcode(&(*pMyDisasm).Argument1, pMyDisasm);
        GV.EIP_+= GV.DECALAGE_EIP+4;
        if (!Security(0, pMyDisasm)) return;
        GV.third_arg = 1;
        (*pMyDisasm).Instruction.Immediat = *((UInt16*)(UIntPtr) (GV.EIP_- 2));
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyDisasm).Argument3.ArgMnemonic, "%.4X",(Int64) *((UInt16*)(UIntPtr) (GV.EIP_- 2)));
        #endif
        (*pMyDisasm).Argument3.ArgType = CONSTANT_TYPE+ABSOLUTE_;
        (*pMyDisasm).Argument3.ArgSize = 16;

        FillFlags(pMyDisasm, 38);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x10002, 0x60(%rax)    # imm = 0x10002
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x35a0e(%rip), %rsi     # 0x51c18
callq 0x81c0
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jl 0x1c342
movq -0x8(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x1c23d
movq -0x8(%rbp), %rax
movl $0x68, 0x210(%rax)
jmp 0x1c24b
movq -0x8(%rbp), %rax
movl $0x67, 0x210(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0x260(%rax)
movq -0x8(%rbp), %rdi
addq $0x104, %rdi            # imm = 0x104
movq -0x8(%rbp), %rsi
callq 0x4dbc0
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
movq -0x8(%rbp), %rsi
callq 0x4dd40
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 0x1c2b9
jmp 0x1c444
movq -0x8(%rbp), %rax
movl $0x1, 0x278(%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)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x16c, %rsi            # imm = 0x16C
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x4, %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x351a2(%rip), %rdx     # 0x514b0
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x88000000, 0x1ac(%rax) # imm = 0x88000000
movq -0x8(%rbp), %rax
movl $0x20, 0x1b0(%rax)
movq -0x8(%rbp), %rdi
movl $0x26, %esi
callq 0x4d560
jmp 0x1c444
movq -0x8(%rbp), %rax
movl $0x66, 0x210(%rax)
movq -0x8(%rbp), %rax
movl $0x10, 0x260(%rax)
movq -0x8(%rbp), %rdi
addq $0x104, %rdi            # imm = 0x104
movq -0x8(%rbp), %rsi
callq 0x4dbc0
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
movq -0x8(%rbp), %rsi
callq 0x4dd40
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 0x1c3be
jmp 0x1c444
movq -0x8(%rbp), %rax
movl $0x1, 0x278(%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)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x16c, %rsi            # imm = 0x16C
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
subq $0x2, %rax
movzwl (%rax), %eax
movl %eax, %ecx
leaq 0x350b1(%rip), %rdx     # 0x514c6
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x88000000, 0x1ac(%rax) # imm = 0x88000000
movq -0x8(%rbp), %rax
movl $0x10, 0x1b0(%rax)
movq -0x8(%rbp), %rdi
movl $0x26, %esi
callq 0x4d560
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)