// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: bswap_esi
void __bea_callspec__ bswap_esi(PDISASM pMyDisasm)
{

    (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
    #ifndef BEA_LIGHT_DISASSEMBLY
       (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "bswap ");
    #endif
    if (GV.OperandSize == 64) {
        (*pMyDisasm).Argument1.ArgSize = 64;
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers64Bits[6+8]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers64Bits[6+0]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+0];
        }
    }
    else if (GV.OperandSize == 32){
        (*pMyDisasm).Argument1.ArgSize = 32;
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers32Bits[6+8]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers32Bits[6+0]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+0];
        }
    }
    else {
        (*pMyDisasm).Argument1.ArgSize = 16;
        if (GV.REX.B_ == 1) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers16Bits[6+8]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+8];
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers16Bits[6+0]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[6+0];
        }
    }
    GV.EIP_++;
    FillFlags(pMyDisasm,10);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x10001, 0x60(%rax)    # imm = 0x10001
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x135ba(%rip), %rsi     # 0x51484
callq 0x81c0
movq -0x8(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x3df5b
movq -0x8(%rbp), %rax
movl $0x40, 0xe0(%rax)
movq -0x8(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x3df29
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24d2c(%rip), %rsi     # 0x62c38
callq 0x81c0
movl 0x24fc1(%rip), %ecx     # 0x62ed8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3df56
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24cdd(%rip), %rsi     # 0x62c18
callq 0x81c0
movl 0x24f72(%rip), %ecx     # 0x62eb8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3e062
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x3dfe4
movq -0x8(%rbp), %rax
movl $0x20, 0xe0(%rax)
movq -0x8(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x3dfb5
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24d18(%rip), %rsi     # 0x62cb0
callq 0x81c0
movl 0x24f35(%rip), %ecx     # 0x62ed8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3dfe2
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24ca9(%rip), %rsi     # 0x62c70
callq 0x81c0
movl 0x24ee6(%rip), %ecx     # 0x62eb8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3e060
movq -0x8(%rbp), %rax
movl $0x10, 0xe0(%rax)
movq -0x8(%rbp), %rax
movzbl 0x287(%rax), %eax
cmpl $0x1, %eax
jne 0x3e031
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24d1c(%rip), %rsi     # 0x62d30
callq 0x81c0
movl 0x24eb9(%rip), %ecx     # 0x62ed8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3e05e
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24cad(%rip), %rsi     # 0x62cf0
callq 0x81c0
movl 0x24e6a(%rip), %ecx     # 0x62eb8
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
jmp 0x3e060
jmp 0x3e062
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0x4d560
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)