// File: /workspace/github_c_makefile_star2_O3/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_ESI
void __bea_callspec__ Addr_ESI(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    long MyNumber;
    #ifndef BEA_LIGHT_DISASSEMBLY
	size_t i = 0;
    if (GV.SYNTAX_ == ATSyntax) {
        (void) strcpy((char*) (*pMyArgument).ArgMnemonic, "(%");
        i += 2;
    }
	#endif
    (*pMyArgument).ArgType = MEMORY_TYPE;
    if (GV.AddressSize == 64) {
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[14]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[6+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[6]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[6];
        }
    }
    else if (GV.AddressSize == 32) {

        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[14]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[6+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[6]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[6];
        }
    }
    else {
        GV.DECALAGE_EIP+=2;
        MyNumber = *((UInt16*)(UIntPtr) (GV.EIP_+2));
        (*pMyArgument).Memory.Displacement = MyNumber;
        if (!Security(2, pMyDisasm)) return;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyArgument).ArgMnemonic+i,"%.4X", (Int64)MyNumber);
        #endif
    }
    #ifndef BEA_LIGHT_DISASSEMBLY
    i = strlen ((char*) &(*pMyArgument).ArgMnemonic);
    if (GV.SYNTAX_ == ATSyntax) {
        (void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, ")");
        i += 1;
    }
	#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x400, 0x24c(%rsi)     # imm = 0x400
jne 0x26e6b
movb $0x0, 0x2(%rbx)
movw $0x2528, (%rbx)         # imm = 0x2528
movl $0x2, %eax
jmp 0x26e6d
xorl %eax, %eax
movl $0x40000000, 0x40(%rbx) # imm = 0x40000000
movl 0x214(%r14), %ecx
cmpl $0x20, %ecx
je 0x26e9b
cmpl $0x40, %ecx
jne 0x26ebf
addq %rbx, %rax
cmpb $0x1, 0x287(%r14)
jne 0x26ef6
leaq 0x11d3f(%rip), %rsi     # 0x38bd8
jmp 0x26eaf
addq %rbx, %rax
cmpb $0x1, 0x287(%r14)
jne 0x26eff
leaq 0x11da1(%rip), %rsi     # 0x38c50
movq %rax, %rdi
callq 0x8150
movl 0x11fbb(%rip), %eax     # 0x38e78
jmp 0x26f14
addl $0x2, 0x244(%r14)
movq 0x1f0(%r14), %rdx
movzwl 0x2(%rdx), %ecx
addq $0x2, %rdx
movq %rcx, 0x5c(%rbx)
movq 0x250(%r14), %rsi
decq %rsi
cmpq %rdx, %rsi
jae 0x26f3a
movl $0x1, 0x289(%r14)
jmp 0x26f32
leaq 0x11cbb(%rip), %rsi     # 0x38bb8
jmp 0x26f06
leaq 0x11d0a(%rip), %rsi     # 0x38c10
movq %rax, %rdi
callq 0x8150
movl 0x11f44(%rip), %eax     # 0x38e58
movl %eax, 0x50(%rbx)
cmpl $0x400, 0x24c(%r14) # imm = 0x400
jne 0x26f32
movq %rbx, %rdi
callq 0x8090
movw $0x29, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq %rbx, %rax
leaq 0x6b2e(%rip), %rdx      # 0x2da72
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a60b
jmp 0x26f17