// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Reg_Opcode
void __bea_callspec__ Reg_Opcode(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    size_t i = 0;
    if (!Security(1, pMyDisasm)) return;
    GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
    if (GV.REX.R_ == 1) {
        GV.REGOPCODE += 0x8;
    }
    if (GV.MMX_  == 1) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersMMX[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+MMX_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 64;
    }
    else if (GV.SEG_ == 1) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersSEG[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+SEGMENT_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 16;
    }
    else if (GV.CR_ == 1) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersCR[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+CR_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 32;
    }
    else if (GV.DR_ == 1) {
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersDR_AT[GV.REGOPCODE]);
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersDR[GV.REGOPCODE]);
            #endif
        }
        (*pMyArgument).ArgType = REGISTER_TYPE+DR_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 32;
    }
    else if (GV.SSE_ == 1) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersSSE[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+SSE_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 128;
    }
    else if (GV.OperandSize == 8) {
        if (GV.REX.state == 0) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers8BitsLegacy[GV.REGOPCODE]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS8BITS[GV.REGOPCODE];
			if (GV.REGOPCODE >= 4) {
				(*pMyArgument).ArgPosition = HighPosition;
			}
            (*pMyArgument).ArgSize = 8;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers8Bits[GV.REGOPCODE]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[GV.REGOPCODE];
            (*pMyArgument).ArgSize = 8;
        }
    }
    else if (GV.OperandSize == 16) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers16Bits[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 16;
    }
    else if (GV.OperandSize == 32) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 32;
    }
    else if (GV.OperandSize == 64) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[GV.REGOPCODE]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[GV.REGOPCODE];
        (*pMyArgument).ArgSize = 64;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl $0x1, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x4dd70
jmp 0x4e204
movq -0x10(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl 0x1(%rax), %ecx
sarl $0x3, %ecx
andl $0x7, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x240(%rax)
movq -0x10(%rbp), %rax
movzbl 0x285(%rax), %eax
cmpl $0x1, %eax
jne 0x4ddb2
movq -0x10(%rbp), %rax
movl 0x240(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x240(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x22c(%rax)
jne 0x4de17
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x15027(%rip), %rsi     # 0x62e00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x150a9(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20010000, %ecx       # imm = 0x20010000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x40, 0x44(%rax)
jmp 0x4e204
movq -0x10(%rbp), %rax
cmpl $0x1, 0x23c(%rax)
jne 0x4de7c
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14b42(%rip), %rsi     # 0x62980
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x15044(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x21000000, %ecx       # imm = 0x21000000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x10, 0x44(%rax)
jmp 0x4e202
movq -0x10(%rbp), %rax
cmpl $0x1, 0x234(%rax)
jne 0x4dee1
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14cdd(%rip), %rsi     # 0x62b80
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14fdf(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20100000, %ecx       # imm = 0x20100000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0x44(%rax)
jmp 0x4e200
movq -0x10(%rbp), %rax
cmpl $0x1, 0x238(%rax)
jne 0x4df82
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x4df2a
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14be4(%rip), %rsi     # 0x62b00
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
jmp 0x4df50
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14b3c(%rip), %rsi     # 0x62a80
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14f3e(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20200000, %ecx       # imm = 0x20200000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0x44(%rax)
jmp 0x4e1fe
movq -0x10(%rbp), %rax
cmpl $0x1, 0x230(%rax)
jne 0x4dfe7
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14e77(%rip), %rsi     # 0x62e20
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14ed9(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20080000, %ecx       # imm = 0x20080000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x80, 0x44(%rax)
jmp 0x4e1fc
movq -0x10(%rbp), %rax
cmpl $0x8, 0x20c(%rax)
jne 0x4e0cd
movq -0x10(%rbp), %rax
movzbl 0x288(%rax), %eax
cmpl $0x0, %eax
jne 0x4e075
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14d1e(%rip), %rsi     # 0x62d40
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14d20(%rip), %rax     # 0x62d60
movl (%rax,%rcx,4), %ecx
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpl $0x4, 0x240(%rax)
jl 0x4e068
movq -0x8(%rbp), %rax
movl $0x1, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x8, 0x44(%rax)
jmp 0x4e0c8
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14cf1(%rip), %rsi     # 0x62d80
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14df3(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x8, 0x44(%rax)
jmp 0x4e1fa
movq -0x10(%rbp), %rax
cmpl $0x10, 0x20c(%rax)
jne 0x4e132
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14bcc(%rip), %rsi     # 0x62cc0
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14d8e(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x10, 0x44(%rax)
jmp 0x4e1f8
movq -0x10(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x4e194
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14ae7(%rip), %rsi     # 0x62c40
shlq $0x3, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14d29(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0x44(%rax)
jmp 0x4e1f6
movq -0x10(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x4e1f4
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rax
leaq 0x14a45(%rip), %rsi     # 0x62c00
shlq $0x2, %rax
addq %rax, %rsi
callq 0x81c0
movq -0x10(%rbp), %rax
movslq 0x240(%rax), %rcx
leaq 0x14cc7(%rip), %rax     # 0x62ea0
movl (%rax,%rcx,4), %ecx
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x40, 0x44(%rax)
jmp 0x4e1f6
jmp 0x4e1f8
jmp 0x4e1fa
jmp 0x4e1fc
jmp 0x4e1fe
jmp 0x4e200
jmp 0x4e202
jmp 0x4e204
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)