// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: dec_eax
void __bea_callspec__ dec_eax(PDISASM pMyDisasm)
{
    if (GV.Architecture == 64) {
        if (!Security(0, pMyDisasm)) return;
        GV.REX.W_ = 1;
        GV.REX.R_ = 0;
        GV.REX.X_ = 0;
        GV.REX.B_ = 0;
        GV.REX.state = InUsePrefix;
        GV.EIP_++;
        GV.NB_PREFIX++;
        (*pMyDisasm).Prefix.Number++;
        GV.OperandSize = 64;
        (*pMyDisasm).Instruction.Opcode = *((UInt8*) (UIntPtr)GV.EIP_);
        (void) opcode_map1[*((UInt8*) (UIntPtr)GV.EIP_)](pMyDisasm);
        GV.OperandSize = 32;

    }
    else {
        if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
            (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
        }
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+ARITHMETIC_INSTRUCTION;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "dec ");
        #endif
        if (GV.OperandSize == 32) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers32Bits[0]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[0];
            (*pMyDisasm).Argument1.ArgSize = 32;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((char*) (*pMyDisasm).Argument1.ArgMnemonic, Registers16Bits[0]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REGS[0];
            (*pMyDisasm).Argument1.ArgSize = 16;
        }
        GV.EIP_++;
        FillFlags(pMyDisasm, 30);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x25c(%rax)
jne 0x18cbc
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x18bf2
jmp 0x18da3
movq -0x8(%rbp), %rax
movb $0x1, 0x284(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x285(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x286(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x287(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x288(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rax
movl 0x264(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x264(%rax)
movq -0x8(%rbp), %rax
movl 0x1d4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1d4(%rax)
movq -0x8(%rbp), %rax
movl $0x40, 0x20c(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x4a261(%rip), %rax     # 0x62f00
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x20, 0x20c(%rax)
jmp 0x18da3
movq -0x8(%rbp), %rax
movzbl 0x1dc(%rax), %eax
cmpl $0x4, %eax
jne 0x18cd7
movq -0x8(%rbp), %rax
movb $0x1, 0x1dc(%rax)
movq -0x8(%rbp), %rax
movl $0x10002, 0x60(%rax)    # imm = 0x10002
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x3985c(%rip), %rsi     # 0x52551
callq 0x81c0
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x18d44
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x49f27(%rip), %rsi     # 0x62c40
callq 0x81c0
movl 0x4a17c(%rip), %ecx     # 0x62ea0
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
movq -0x8(%rbp), %rax
movl $0x20, 0xe0(%rax)
jmp 0x18d7f
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x49f6a(%rip), %rsi     # 0x62cc0
callq 0x81c0
movl 0x4a13f(%rip), %ecx     # 0x62ea0
addl $0x20020000, %ecx       # imm = 0x20020000
movq -0x8(%rbp), %rax
movl %ecx, 0xdc(%rax)
movq -0x8(%rbp), %rax
movl $0x10, 0xe0(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rdi
movl $0x1e, %esi
callq 0x4d560
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)