// File: /workspace/github_c_makefile_star2_O1/buptlxb[P]xRay/disasm/instr_set/opcodes_Grp9.c
// Function: G9_
void __bea_callspec__ G9_(PDISASM pMyDisasm)
{
    GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
    GV.MemDecoration = Arg2qword;
    MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
    if (GV.REGOPCODE == 1) {
        if (GV.REX.W_ == 1) {
            GV.MemDecoration = Arg2dqword;
            (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cmpxchg16b ");
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REG0+REG2;
            (*pMyDisasm).Argument1.ArgSize = 128;
            (*pMyDisasm).Argument1.AccessMode = READ;
            FillFlags(pMyDisasm, 23);
            GV.EIP_ += GV.DECALAGE_EIP+2;
        }
        else {
            (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cmpxchg8b ");
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REG0+REG2;
            (*pMyDisasm).Argument1.ArgSize = 64;
            (*pMyDisasm).Argument1.AccessMode = READ;
            FillFlags(pMyDisasm, 23);
            GV.EIP_ += GV.DECALAGE_EIP+2;
        }
    }
    else if (GV.REGOPCODE == 6) {
        (*pMyDisasm).Instruction.Category = VM_INSTRUCTION;
        if (GV.OperandSize == 16) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmclear ");
            #endif
        }
        else if (GV.PrefRepe == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmxon ");
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmptrld ");
            #endif
        }
        GV.EIP_ += GV.DECALAGE_EIP+2;

    }
    else if (GV.REGOPCODE == 7) {
        (*pMyDisasm).Instruction.Category = VM_INSTRUCTION;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmptrst ");
        #endif
        GV.EIP_ += GV.DECALAGE_EIP+2;
    }
    else {
        FailDecode(pMyDisasm);
    }

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x1f0(%rdi), %rax
movzbl 0x1(%rax), %eax
shrl $0x3, %eax
andl $0x7, %eax
movl %eax, 0x240(%rdi)
movl $0x68, 0x210(%rdi)
addq $0x104, %rdi            # imm = 0x104
movq %rbx, %rsi
callq 0x2b196
movl 0x240(%rbx), %eax
cmpl $0x7, %eax
je 0x20bdd
cmpl $0x6, %eax
je 0x20bc1
cmpl $0x1, %eax
jne 0x20bfb
cmpb $0x1, 0x284(%rbx)
jne 0x20c2e
movl $0x6c, 0x210(%rbx)
movl $0x10001, 0x60(%rbx)    # imm = 0x10001
movabsq $0x3167686378706d63, %rax # imm = 0x3167686378706D63
movq %rax, 0x68(%rbx)
movl $0x206236, 0x70(%rbx)   # imm = 0x206236
movabsq $0x8020020005, %rax     # imm = 0x8020020005
jmp 0x20c54
movl $0x4000000, 0x60(%rbx)  # imm = 0x4000000
cmpl $0x10, 0x20c(%rbx)
jne 0x20c12
movabsq $0x207261656c636d76, %rax # imm = 0x207261656C636D76
jmp 0x20bee
movl $0x4000000, 0x60(%rbx)  # imm = 0x4000000
movabsq $0x2074737274706d76, %rax # imm = 0x2074737274706D76
movq %rax, 0x68(%rbx)
movb $0x0, 0x70(%rbx)
jmp 0x20c7c
movb $0x0, 0x6c(%rbx)
movl $0x203f3f3f, 0x68(%rbx) # imm = 0x203F3F3F
movl $0x1, 0x280(%rbx)
jmp 0x20c8c
leaq 0x68(%rbx), %rax
cmpl $0x1, 0x268(%rbx)
jne 0x20c8e
movl $0x206e6f, 0x3(%rax)    # imm = 0x206E6F
movl $0x6f786d76, (%rax)     # imm = 0x6F786D76
jmp 0x20c7c
movl $0x10001, 0x60(%rbx)    # imm = 0x10001
movabsq $0x3867686378706d63, %rax # imm = 0x3867686378706D63
movq %rax, 0x68(%rbx)
movl $0x206238, 0x6f(%rbx)   # imm = 0x206238
movabsq $0x4020020005, %rax     # imm = 0x4020020005
movq %rax, 0xdc(%rbx)
movl $0x1, 0xe8(%rbx)
movq 0x17628(%rip), %rax     # 0x38294
movq %rax, 0x7c(%rbx)
movl 0x17626(%rip), %eax     # 0x3829c
movl %eax, 0x84(%rbx)
movl 0x244(%rbx), %eax
addl $0x2, %eax
addq %rax, 0x1f0(%rbx)
popq %rbx
retq
movabsq $0x20646c7274706d76, %rcx # imm = 0x20646C7274706D76
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
jmp 0x20c7c