// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_Grp8.c
// Function: G8_EvIb
void __bea_callspec__ G8_EvIb(PDISASM pMyDisasm)
{
    GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
    EvIb(pMyDisasm);
    if (GV.REGOPCODE == 4) {
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+BIT_UInt8;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "bt ");
        #endif
        (*pMyDisasm).Argument1.AccessMode = READ;
        FillFlags(pMyDisasm, 11);
    }
    else if (GV.REGOPCODE == 5) {
        if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
            (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
        }
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+BIT_UInt8;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "bts ");
        #endif
        (*pMyDisasm).Argument1.AccessMode = READ;
        FillFlags(pMyDisasm, 11);
    }
    else if (GV.REGOPCODE == 6) {
        if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
            (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
        }
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+BIT_UInt8;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "btr ");
        #endif
        (*pMyDisasm).Argument1.AccessMode = READ;
        FillFlags(pMyDisasm, 11);
    }
    else if (GV.REGOPCODE == 7) {
        if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
            (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
        }
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+BIT_UInt8;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "btc ");
        #endif
        (*pMyDisasm).Argument1.AccessMode = READ;
        FillFlags(pMyDisasm, 11);
    }
    else {
        FailDecode(pMyDisasm);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl 0x1(%rax), %ecx
sarl $0x3, %ecx
andl $0x7, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x240(%rax)
movq -0x8(%rbp), %rdi
callq 0x4e7d0
movq -0x8(%rbp), %rax
cmpl $0x4, 0x240(%rax)
jne 0x3c295
movq -0x8(%rbp), %rax
movl $0x10005, 0x60(%rax)    # imm = 0x10005
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x1522b(%rip), %rsi     # 0x5149a
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x8(%rbp), %rdi
movl $0xb, %esi
callq 0x4d560
jmp 0x3c3e2
movq -0x8(%rbp), %rax
cmpl $0x5, 0x240(%rax)
jne 0x3c301
movq -0x8(%rbp), %rax
movzbl 0x1dc(%rax), %eax
cmpl $0x4, %eax
jne 0x3c2bd
movq -0x8(%rbp), %rax
movb $0x1, 0x1dc(%rax)
movq -0x8(%rbp), %rax
movl $0x10005, 0x60(%rax)    # imm = 0x10005
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x151c8(%rip), %rsi     # 0x514a3
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x8(%rbp), %rdi
movl $0xb, %esi
callq 0x4d560
jmp 0x3c3e0
movq -0x8(%rbp), %rax
cmpl $0x6, 0x240(%rax)
jne 0x3c36a
movq -0x8(%rbp), %rax
movzbl 0x1dc(%rax), %eax
cmpl $0x4, %eax
jne 0x3c329
movq -0x8(%rbp), %rax
movb $0x1, 0x1dc(%rax)
movq -0x8(%rbp), %rax
movl $0x10005, 0x60(%rax)    # imm = 0x10005
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x15157(%rip), %rsi     # 0x5149e
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x8(%rbp), %rdi
movl $0xb, %esi
callq 0x4d560
jmp 0x3c3de
movq -0x8(%rbp), %rax
cmpl $0x7, 0x240(%rax)
jne 0x3c3d3
movq -0x8(%rbp), %rax
movzbl 0x1dc(%rax), %eax
cmpl $0x4, %eax
jne 0x3c392
movq -0x8(%rbp), %rax
movb $0x1, 0x1dc(%rax)
movq -0x8(%rbp), %rax
movl $0x10005, 0x60(%rax)    # imm = 0x10005
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x150e5(%rip), %rsi     # 0x51495
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x8(%rbp), %rdi
movl $0xb, %esi
callq 0x4d560
jmp 0x3c3dc
movq -0x8(%rbp), %rdi
callq 0x30050
jmp 0x3c3de
jmp 0x3c3e0
jmp 0x3c3e2
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)