// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_EDI
void __bea_callspec__ Addr_EDI(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[15]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[7+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[7]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[7];
        }
    }
    else if (GV.AddressSize == 32) {

        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[15]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[7+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[7]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[7];
        }
    }
    else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers16Bits[3]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3];
    }
    #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 0x46c24
movq -0x8(%rbp), %rdi
leaq 0xb9a3(%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 0x46c95
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x46c6f
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1bfe1(%rip), %rsi     # 0x62c3c
callq 0x81c0
movl 0x1c276(%rip), %ecx     # 0x62edc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46c90
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1bf9e(%rip), %rsi     # 0x62c1c
callq 0x81c0
movl 0x1c233(%rip), %ecx     # 0x62ebc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46d1b
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x46cf8
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x46cd5
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1bff7(%rip), %rsi     # 0x62cb8
callq 0x81c0
movl 0x1c210(%rip), %ecx     # 0x62edc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46cf6
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1bf94(%rip), %rsi     # 0x62c78
callq 0x81c0
movl 0x1c1cd(%rip), %ecx     # 0x62ebc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46d19
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1bfd1(%rip), %rsi     # 0x62cd8
callq 0x81c0
movl 0x1c19a(%rip), %ecx     # 0x62eac
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46d1b
movq -0x8(%rbp), %rdi
callq 0x80b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x46d58
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xa64b(%rip), %rsi      # 0x51392
callq 0x81c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nop