// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_EDX
void __bea_callspec__ Addr_EDX(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[10]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[2+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[2]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[2];
        }
    }
    else if (GV.AddressSize == 32) {

        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[10]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[2+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[2]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[2];
        }
    }
    else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, BPSI_);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[5];
            (*pMyArgument).Memory.IndexRegister = REGS[6];
    }
	#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 0x46484
movq -0x8(%rbp), %rdi
leaq 0xc143(%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 0x464f5
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x464cf
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c76d(%rip), %rsi     # 0x62c28
callq 0x81c0
movl 0x1ca02(%rip), %ecx     # 0x62ec8
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x464f0
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c72a(%rip), %rsi     # 0x62c08
callq 0x81c0
movl 0x1c9bf(%rip), %ecx     # 0x62ea8
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46588
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x46558
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x46535
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c76f(%rip), %rsi     # 0x62c90
callq 0x81c0
movl 0x1c99c(%rip), %ecx     # 0x62ec8
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46556
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c70c(%rip), %rsi     # 0x62c50
callq 0x81c0
movl 0x1c959(%rip), %ecx     # 0x62ea8
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46586
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c985(%rip), %rsi     # 0x62eec
callq 0x81c0
movl 0x1c942(%rip), %ecx     # 0x62eb4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movl 0x1c939(%rip), %ecx     # 0x62eb8
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
jmp 0x46588
movq -0x8(%rbp), %rdi
callq 0x80b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x465c5
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xadde(%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)