// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: cdq_
void __bea_callspec__ cdq_(PDISASM pMyDisasm)
{
    (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
    (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REG0+REG2;
    (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+GENERAL_REG+REG0;
    if (GV.OperandSize == 64) {
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cqto ");
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cqo ");
            #endif
        }
        (*pMyDisasm).Argument1.ArgSize = 64;
    }
    else if (GV.OperandSize ==32) {
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cltd ");
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cdq ");
            #endif
        }
        (*pMyDisasm).Argument1.ArgSize = 32;
    }
    else {
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cwtd ");
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cwd ");
            #endif
        }
        (*pMyDisasm).Argument1.ArgSize = 16;
    }
    GV.EIP_++;
}

// 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), %rax
movl $0x20020005, 0xdc(%rax) # imm = 0x20020005
movq -0x8(%rbp), %rax
movl $0x20020001, 0x144(%rax) # imm = 0x20020001
movq -0x8(%rbp), %rax
cmpl $0x40, 0x20c(%rax)
jne 0x20e15
movq -0x8(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x20dea
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x306f1(%rip), %rsi     # 0x514d4
callq 0x81c0
jmp 0x20e02
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x306dd(%rip), %rsi     # 0x514da
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x40, 0xe0(%rax)
jmp 0x20ec6
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x20e74
movq -0x8(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x20e4c
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x3069a(%rip), %rsi     # 0x514df
callq 0x81c0
jmp 0x20e64
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x30686(%rip), %rsi     # 0x514e5
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x20, 0xe0(%rax)
jmp 0x20ec4
movq -0x8(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x20e9e
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x30653(%rip), %rsi     # 0x514ea
callq 0x81c0
jmp 0x20eb6
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x3063f(%rip), %rsi     # 0x514f0
callq 0x81c0
movq -0x8(%rbp), %rax
movl $0x10, 0xe0(%rax)
jmp 0x20ec6
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1f0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)