// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/Routines_ModRM.c
// Function: Addr_EBX
void __bea_callspec__ Addr_EBX(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[11]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers64Bits[3]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3];
        }
    }
    else if (GV.AddressSize == 32) {

        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[11]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, Registers32Bits[3]);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[3];
        }
    }
    else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyArgument).ArgMnemonic+i, BPDI_);
            #endif
            (*pMyArgument).Memory.BaseRegister = REGS[5];
            (*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 0x46614
movq -0x8(%rbp), %rdi
leaq 0xbfb3(%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 0x46685
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x4665f
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c5e1(%rip), %rsi     # 0x62c2c
callq 0x81c0
movl 0x1c876(%rip), %ecx     # 0x62ecc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46680
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c59e(%rip), %rsi     # 0x62c0c
callq 0x81c0
movl 0x1c833(%rip), %ecx     # 0x62eac
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46718
movq -0x10(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x466e8
movq -0x10(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x466c5
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c5e7(%rip), %rsi     # 0x62c98
callq 0x81c0
movl 0x1c810(%rip), %ecx     # 0x62ecc
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x466e6
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c584(%rip), %rsi     # 0x62c58
callq 0x81c0
movl 0x1c7cd(%rip), %ecx     # 0x62eac
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
jmp 0x46716
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0x1c7fb(%rip), %rsi     # 0x62ef2
callq 0x81c0
movl 0x1c7b2(%rip), %ecx     # 0x62eb4
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movl 0x1c7ad(%rip), %ecx     # 0x62ebc
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
jmp 0x46718
movq -0x8(%rbp), %rdi
callq 0x80b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x46755
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq 0xac4e(%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)