// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_ECX
void __bea_callspec__ Addr_ECX(ARGTYPE* pMyArgument, PDISASM pMyDisasm)
{
    #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[9]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[1+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[1]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[1];
        }
    }
    else if (GV.AddressSize == 32) {

        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[9]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[1+8];

        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[1]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[1];
        }
    }
    else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, BXDI_);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3];
            (*pMyArgument).Memory.IndexRegister = REGS[7];
    }
	#ifndef BEA_LIGHT_DISASSEMBLY
		i = strlen ((char*) &(*pMyArgument).ArgMnemonic);
		if (GV.SYNTAX_ == ATSyntax) {
			(void) strcpy((char*) (*pMyArgument).ArgMnemonic+i, ")");
			i += 1;
		}
	#endif

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x462f4
movq -0x8(%rbp), %rdi
leaq 0xc2d3(%rip), %rsi      # 0x525b6
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl $0x40000000, 0x40(%rax) # imm = 0x40000000
movq -0x10(%rbp), %rax
cmpl $0x40, 0x214(%rax)
jne 0x46365
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x4633f
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c8f9(%rip), %rsi     # 0x62c24
callq 0x81c0
movl 0x1cb8e(%rip), %ecx     # 0x62ec4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46360
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c8b6(%rip), %rsi     # 0x62c04
callq 0x81c0
movl 0x1cb4b(%rip), %ecx     # 0x62ea4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x463f8
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x463c8
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x463a5
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c8f7(%rip), %rsi     # 0x62c88
callq 0x81c0
movl 0x1cb28(%rip), %ecx     # 0x62ec4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x463c6
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c894(%rip), %rsi     # 0x62c48
callq 0x81c0
movl 0x1cae5(%rip), %ecx     # 0x62ea4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x463f6
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1cb0f(%rip), %rsi     # 0x62ee6
callq 0x81c0
movl 0x1caca(%rip), %ecx     # 0x62eac
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movl 0x1cacd(%rip), %ecx     # 0x62ebc
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
jmp 0x463f8
movq -0x8(%rbp), %rdi
callq 0x80b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x46435
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xaf6e(%rip), %rsi      # 0x51392
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)