// File: /workspace/github_c_makefile_star2_O3/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: rESP
void __bea_callspec__ _rESP(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    int i = 0;
    GV.MemDecoration = 0;
    if (GV.MMX_  == 1) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersMMX[4+0]);
        #endif
        (*pMyArgument).ArgType = REGISTER_TYPE+MMX_REG+REGS[4+0];
        (*pMyArgument).ArgSize = 64;
        return;
    }

    if (GV.SSE_ == 1) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersSSE[4+8]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+SSE_REG+REGS[4+8];
            (*pMyArgument).ArgSize = 128;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, RegistersSSE[4+0]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+SSE_REG+REGS[4+0];
            (*pMyArgument).ArgSize = 128;
        }
        return;
    }
    if (GV.OperandSize == 64) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[4+8]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+8];
            (*pMyArgument).ArgSize = 64;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[4+0]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+0];
            (*pMyArgument).ArgSize = 64;
        }
    }
    else if (GV.OperandSize == 32) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[4+8]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+8];
            (*pMyArgument).ArgSize = 32;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[4+0]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+0];
            (*pMyArgument).ArgSize = 32;
        }
    }
    else if (GV.OperandSize == 16) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers16Bits[4+8]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+8];
            (*pMyArgument).ArgSize = 16;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers16Bits[4+0]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+0];
            (*pMyArgument).ArgSize = 16;
        }
    }
    else if (GV.OperandSize == 8) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers8Bits[4+8]);
            #endif
            (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+8];
            (*pMyArgument).ArgSize = 8;
        }
        else {
            if (GV.REX.state == 0) {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers8BitsLegacy[4+0]);
                #endif
                (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS8BITS[4+0];
				(*pMyArgument).ArgPosition = HighPosition;
                (*pMyArgument).ArgSize = 8;
            }
            else {
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers8Bits[4+0]);
                #endif
                (*pMyArgument).ArgType = REGISTER_TYPE+GENERAL_REG+REGS[4+0];
                (*pMyArgument).ArgSize = 8;
            }
        }
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x210(%rsi)
cmpl $0x1, 0x22c(%rsi)
jne 0x28f5f
leaq 0xfe73(%rip), %rsi      # 0x38db0
movq %rbx, %rdi
callq 0x8150
movl $0x20010000, %eax       # imm = 0x20010000
addl 0xff00(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x40, 0x44(%rbx)
jmp 0x28ffe
cmpl $0x1, 0x230(%rsi)
jne 0x28f8d
cmpb $0x1, 0x287(%rsi)
jne 0x28fda
leaq 0xfea8(%rip), %rsi      # 0x38e20
movq %rbx, %rdi
callq 0x8150
movl $0x20080000, %eax       # imm = 0x20080000
addl 0xfee5(%rip), %eax      # 0x38e70
jmp 0x28ff4
movl 0x20c(%rsi), %eax
addl $-0x8, %eax
roll $0x1d, %eax
cmpl $0x7, %eax
ja 0x28ffe
leaq 0x4963(%rip), %rcx      # 0x2d908
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0x287(%rsi)
jne 0x290a6
leaq 0xfdbe(%rip), %rsi      # 0x38d80
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfe9b(%rip), %eax      # 0x38e70
jmp 0x290c9
leaq 0xfdff(%rip), %rsi      # 0x38de0
movq %rbx, %rdi
callq 0x8150
movl $0x20080000, %eax       # imm = 0x20080000
addl 0xfe5c(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x80, 0x44(%rbx)
popq %rbx
retq
cmpb $0x1, 0x287(%rsi)
jne 0x2907d
leaq 0xfc30(%rip), %rsi      # 0x38c40
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfe4d(%rip), %eax      # 0x38e70
jmp 0x29097
cmpb $0x1, 0x287(%rsi)
jne 0x290d8
leaq 0xfc87(%rip), %rsi      # 0x38cc0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfe24(%rip), %eax      # 0x38e70
jmp 0x290f2
cmpb $0x1, 0x287(%rsi)
jne 0x29101
leaq 0xfb6b(%rip), %rsi      # 0x38bd0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfdf8(%rip), %eax      # 0x38e70
jmp 0x28f50
leaq 0xfb7c(%rip), %rsi      # 0x38c00
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfdb9(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
jmp 0x28ffe
cmpb $0x0, 0x288(%rsi)
je 0x2911a
leaq 0xfc8a(%rip), %rsi      # 0x38d40
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfd87(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x8, 0x44(%rbx)
jmp 0x28ffe
leaq 0xfba1(%rip), %rsi      # 0x38c80
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfd5e(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x10, 0x44(%rbx)
jmp 0x28ffe
leaq 0xfaa8(%rip), %rsi      # 0x38bb0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
jmp 0x28f4a
leaq 0xfbcf(%rip), %rsi      # 0x38cf0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xfbdc(%rip), %eax      # 0x38d10
movl %eax, 0x40(%rbx)
movabsq $0x100000008, %rax      # imm = 0x100000008
movq %rax, 0x44(%rbx)
jmp 0x28ffe