// File: /workspace/github_c_makefile_star2_O1/buptlxb[P]xRay/disasm/instr_set/opcodes_FPU.c
// Function: DD_
void __bea_callspec__ DD_(PDISASM pMyDisasm)
{
    long MyMODRM;
    char (*pRegistersFPU)[8][8] ;

    GV.DECALAGE_EIP = 0;
    if (!Security(1, pMyDisasm)) {return;}
    MyMODRM = *((UInt8*)(UIntPtr) (GV.EIP_+1));
    pRegistersFPU = &RegistersFPU_Masm;
    if (GV.SYNTAX_ == NasmSyntax) {
        pRegistersFPU = &RegistersFPU_Nasm;
    }
    if (MyMODRM <= 0xbf) {

        GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
        if (GV.REGOPCODE == 0) {
            GV.MemDecoration = Arg2qword;
            MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fld ");
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument1.ArgSize = 80;
        }
        else if (GV.REGOPCODE == 1) {
            GV.MemDecoration = Arg1qword;
            MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fisttp ");
            #endif
            (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument2.ArgSize = 80;
        }
        else if (GV.REGOPCODE == 2) {
            GV.MemDecoration = Arg1qword;
            MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fst ");
            #endif
            (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument2.ArgSize = 80;
        }
        else if (GV.REGOPCODE == 3) {
            GV.MemDecoration = Arg1qword;
            MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fstp ");
            #endif
            (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument2.ArgSize = 80;
        }
        else if (GV.REGOPCODE == 4) {
            GV.MemDecoration = Arg2multibytes;
            MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+FPUCONTROL;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "frstor ");
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument1.ArgSize = 108*8;
        }
        else if (GV.REGOPCODE == 6) {
            GV.MemDecoration = Arg1multibytes;
            MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+FPUCONTROL;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fsave ");
            #endif
            (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG+REG0;
            (*pMyDisasm).Argument2.ArgSize = 108*8;
        }
        else if (GV.REGOPCODE == 7) {
            GV.MemDecoration = Arg1word;
            MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
            (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+FPUCONTROL;
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fstsw ");
            #endif
            (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG;
            (*pMyDisasm).Argument2.ArgSize = 16;
        }
        else {
            FailDecode(pMyDisasm);
        }
    }
    else {
        if ((MyMODRM & 0xf0) == 0xc0) {
            if (((MyMODRM & 0xf) >=0) && ((MyMODRM & 0xf) <=7)) {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+FPUCONTROL;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "ffree ");
                #endif
            }
            else {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fxch4 ");
                #endif
                (*pMyDisasm).Argument2.AccessMode = WRITE;
            }
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic, (*pRegistersFPU)[(MyMODRM & 0xf)%8]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REGS[(MyMODRM & 0xf)%8];
            (*pMyDisasm).Argument1.ArgSize = 80;
        }
        else if ((MyMODRM & 0xf0) == 0xd0) {
            if (((MyMODRM & 0xf) >=0) && ((MyMODRM & 0xf) <=7)) {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fst ");
                #endif
            }
            else {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+DATA_TRANSFER;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fstp ");
                #endif
                (*pMyDisasm).Argument2.AccessMode = WRITE;
            }
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic, (*pRegistersFPU)[(MyMODRM & 0xf)%8]);
            #endif
            (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REGS[(MyMODRM & 0xf)%8];
            (*pMyDisasm).Argument1.ArgSize = 80;

        }
        else if ((MyMODRM & 0xf0) == 0xe0) {
            if (((MyMODRM & 0xf) >=0) && ((MyMODRM & 0xf) <=7)) {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+COMPARISON_INSTRUCTION;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fucom ");
                #endif
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Argument2.ArgMnemonic, (*pRegistersFPU)[0]);
                #endif
                (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+FPU_REG+REGS[0];
                (*pMyDisasm).Argument2.ArgSize = 80;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic, (*pRegistersFPU)[(MyMODRM & 0xf)%8]);
                #endif
                (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REGS[(MyMODRM & 0xf)%8];
                (*pMyDisasm).Argument1.ArgSize = 80;
            }
            else {
                (*pMyDisasm).Instruction.Category = FPU_INSTRUCTION+COMPARISON_INSTRUCTION;
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "fucomp ");
                #endif
                #ifndef BEA_LIGHT_DISASSEMBLY
                   (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic, (*pRegistersFPU)[(MyMODRM & 0xf)%8]);
                #endif
                (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+FPU_REG+REGS[(MyMODRM & 0xf)%8];
                (*pMyDisasm).Argument1.ArgSize = 80;
            }

        }

        else {
            FailDecode(pMyDisasm);
        }
    }
    GV.EIP_ += GV.DECALAGE_EIP+2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x244(%rdi)
movq 0x250(%rdi), %rax
testq %rax, %rax
je 0x165b8
movq 0x1f0(%rbx), %rcx
incq %rcx
cmpq %rax, %rcx
jae 0x1668a
movq 0x1f0(%rbx), %rax
movzbl 0x1(%rax), %r15d
cmpl $0x200, 0x24c(%rbx)     # imm = 0x200
leaq 0x2240b(%rip), %rax     # 0x389e0
leaq 0x223c4(%rip), %r14     # 0x389a0
cmoveq %rax, %r14
cmpq $0xbf, %r15
ja 0x16642
shrl $0x3, %r15d
andl $0x7, %r15d
movl %r15d, 0x240(%rbx)
leaq 0x170e1(%rip), %rax     # 0x2d6e0
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x68, 0x210(%rbx)
leaq 0x104(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
movl $0x20646c66, 0x68(%rbx) # imm = 0x20646C66
movb $0x0, 0x6c(%rbx)
movl $0x20040001, 0xdc(%rbx) # imm = 0x20040001
jmp 0x168e3
movl %r15d, %eax
andb $-0x10, %al
cmpb $-0x20, %al
je 0x166d7
movl %r15d, %eax
andl $-0x10, %eax
cmpl $0xd0, %eax
je 0x166b3
cmpl $0xc0, %eax
jne 0x16699
leaq 0x68(%rbx), %rax
testb $0x8, %r15b
jne 0x1689b
movl $0x20012, 0x60(%rbx)    # imm = 0x20012
movl $0x206565, 0x3(%rax)    # imm = 0x206565
movl $0x65726666, (%rax)     # imm = 0x65726666
jmp 0x168b9
movl $0x1, 0x289(%rbx)
jmp 0x16944
movb $0x0, 0x6c(%rbx)
movl $0x203f3f3f, 0x68(%rbx) # imm = 0x203F3F3F
movl $0x1, %eax
movl $0x280, %ecx            # imm = 0x280
jmp 0x16931
leaq 0x68(%rbx), %rax
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
testb $0x8, %r15b
jne 0x167c4
movb $0x0, 0x4(%rax)
movl $0x20747366, (%rax)     # imm = 0x20747366
jmp 0x168b9
movl %r15d, %r12d
andl $0xf, %r12d
movl $0x2000d, 0x60(%rbx)    # imm = 0x2000D
cmpq $0x7, %r12
ja 0x16849
leaq 0x68(%rbx), %rax
movl $0x206d6f, 0x3(%rax)    # imm = 0x206D6F
movl $0x6f637566, (%rax)     # imm = 0x6F637566
leaq 0x104(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
leaq 0x2272a(%rip), %r15     # 0x38e40
movl $0x20040000, %ebp       # imm = 0x20040000
movl 0x2271f(%rip), %eax     # 0x38e40
addl %ebp, %eax
movl %eax, 0x144(%rbx)
movl $0x50, 0x148(%rbx)
leaq 0x9c(%rbx), %rdi
leaq (%r14,%r12,8), %rsi
callq 0x8150
addl (%r15,%r12,4), %ebp
movl %ebp, 0xdc(%rbx)
jmp 0x168e3
movl $0x69, 0x210(%rbx)
leaq 0x104(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20012, 0x60(%rbx)    # imm = 0x20012
movabsq $0x20726f74737266, %rax # imm = 0x20726F74737266
movq %rax, 0x68(%rbx)
movl $0x20040001, 0xdc(%rbx) # imm = 0x20040001
movl $0x360, %eax            # imm = 0x360
jmp 0x168e8
movl $0x4, 0x210(%rbx)
leaq 0x9c(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
movl $0x20747366, 0x68(%rbx) # imm = 0x20747366
movb $0x0, 0x6c(%rbx)
jmp 0x16887
movw $0x20, 0x4(%rax)
movl $0x70747366, (%rax)     # imm = 0x70747366
jmp 0x168af
movl $0x4, 0x210(%rbx)
leaq 0x9c(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
movl $0x70747366, 0x68(%rbx) # imm = 0x70747366
movw $0x20, 0x6c(%rbx)
jmp 0x16887
movl $0x2, 0x210(%rbx)
leaq 0x9c(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20012, 0x60(%rbx)    # imm = 0x20012
movl $0x73747366, 0x68(%rbx) # imm = 0x73747366
movl $0x207773, 0x6b(%rbx)   # imm = 0x207773
movl $0x20040000, 0x144(%rbx) # imm = 0x20040000
movl $0x10, %eax
jmp 0x1692c
movabsq $0x20706d6f637566, %rax # imm = 0x20706D6F637566
movq %rax, 0x68(%rbx)
jmp 0x168b9
movl $0x4, 0x210(%rbx)
leaq 0x9c(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
movabsq $0x20707474736966, %rax # imm = 0x20707474736966
movq %rax, 0x68(%rbx)
movl $0x20040001, 0x144(%rbx) # imm = 0x20040001
movl $0x50, %eax
jmp 0x1692c
movl $0x20001, 0x60(%rbx)    # imm = 0x20001
movl $0x203468, 0x3(%rax)    # imm = 0x203468
movl $0x68637866, (%rax)     # imm = 0x68637866
movl $0x2, 0x150(%rbx)
leaq 0x9c(%rbx), %rdi
andl $0x7, %r15d
leaq (%r14,%r15,8), %rsi
callq 0x8150
leaq 0x2256c(%rip), %rax     # 0x38e40
movl $0x20040000, %ecx       # imm = 0x20040000
addl (%rax,%r15,4), %ecx
movl %ecx, 0xdc(%rbx)
movl $0x50, %eax
movl $0xe0, %ecx
jmp 0x16931
movl $0x5, 0x210(%rbx)
leaq 0x9c(%rbx), %rdi
movq %rbx, %rsi
callq 0x2b196
movl $0x20012, 0x60(%rbx)    # imm = 0x20012
movl $0x76617366, 0x68(%rbx) # imm = 0x76617366
movl $0x206576, 0x6b(%rbx)   # imm = 0x206576
movl $0x20040001, 0x144(%rbx) # imm = 0x20040001
movl $0x360, %eax            # imm = 0x360
movl $0x148, %ecx            # imm = 0x148
movl %eax, (%rbx,%rcx)
movl 0x244(%rbx), %eax
addl $0x2, %eax
addq %rax, 0x1f0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq