// File: /workspace/github_c_makefile_star2_O1/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 0x2962b
leaq 0xf7a7(%rip), %rsi      # 0x38db0
movq %rbx, %rdi
callq 0x8150
movl $0x20010000, %eax       # imm = 0x20010000
addl 0xf834(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x40, 0x44(%rbx)
jmp 0x296ca
cmpl $0x1, 0x230(%rsi)
jne 0x29659
cmpb $0x1, 0x287(%rsi)
jne 0x296a6
leaq 0xf7dc(%rip), %rsi      # 0x38e20
movq %rbx, %rdi
callq 0x8150
movl $0x20080000, %eax       # imm = 0x20080000
addl 0xf819(%rip), %eax      # 0x38e70
jmp 0x296c0
movl 0x20c(%rsi), %eax
addl $-0x8, %eax
roll $0x1d, %eax
cmpl $0x7, %eax
ja 0x296ca
leaq 0x4297(%rip), %rcx      # 0x2d908
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1, 0x287(%rsi)
jne 0x29772
leaq 0xf6f2(%rip), %rsi      # 0x38d80
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf7cf(%rip), %eax      # 0x38e70
jmp 0x29795
leaq 0xf733(%rip), %rsi      # 0x38de0
movq %rbx, %rdi
callq 0x8150
movl $0x20080000, %eax       # imm = 0x20080000
addl 0xf790(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x80, 0x44(%rbx)
popq %rbx
retq
cmpb $0x1, 0x287(%rsi)
jne 0x29749
leaq 0xf564(%rip), %rsi      # 0x38c40
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf781(%rip), %eax      # 0x38e70
jmp 0x29763
cmpb $0x1, 0x287(%rsi)
jne 0x297a4
leaq 0xf5bb(%rip), %rsi      # 0x38cc0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf758(%rip), %eax      # 0x38e70
jmp 0x297be
cmpb $0x1, 0x287(%rsi)
jne 0x297cd
leaq 0xf49f(%rip), %rsi      # 0x38bd0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf72c(%rip), %eax      # 0x38e70
jmp 0x2961c
leaq 0xf4b0(%rip), %rsi      # 0x38c00
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf6ed(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
jmp 0x296ca
cmpb $0x0, 0x288(%rsi)
je 0x297e6
leaq 0xf5be(%rip), %rsi      # 0x38d40
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf6bb(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x8, 0x44(%rbx)
jmp 0x296ca
leaq 0xf4d5(%rip), %rsi      # 0x38c80
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf692(%rip), %eax      # 0x38e50
movl %eax, 0x40(%rbx)
movl $0x10, 0x44(%rbx)
jmp 0x296ca
leaq 0xf3dc(%rip), %rsi      # 0x38bb0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
jmp 0x29616
leaq 0xf503(%rip), %rsi      # 0x38cf0
movq %rbx, %rdi
callq 0x8150
movl $0x20020000, %eax       # imm = 0x20020000
addl 0xf510(%rip), %eax      # 0x38d10
movl %eax, 0x40(%rbx)
movabsq $0x100000008, %rax      # imm = 0x100000008
movq %rax, 0x44(%rbx)
jmp 0x296ca