// File: /workspace/github_c_makefile_star2_O1/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: jmp_far
void __bea_callspec__ jmp_far(PDISASM pMyDisasm)
{
    UInt32 MyNumber;
    UInt64 MyAddress;
    size_t i = 0;
    if (GV.Architecture == 64) {
        FailDecode(pMyDisasm);
    }
    else {
        (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+CONTROL_TRANSFER;
        (*pMyDisasm).Instruction.BranchType = JmpType;
        (*pMyDisasm).Argument1.AccessMode = READ;
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "ljmp ");
            #endif
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic,"\x24");
            #endif
            i++;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "jmp far ");
            #endif
        }
        if (GV.OperandSize ==32) {
            if (!Security(7, pMyDisasm)) return;
            MyNumber = *((UInt16*)(UIntPtr) (GV.EIP_+5));
            #ifndef BEA_LIGHT_DISASSEMBLY
               i += CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument1.ArgMnemonic+i, "%.4X",(Int64) MyNumber);
            #endif
        }
        else {
            if (!Security(5, pMyDisasm)) return;
            MyNumber = *((UInt16*)(UIntPtr) (GV.EIP_+3));
            #ifndef BEA_LIGHT_DISASSEMBLY
               i += CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument1.ArgMnemonic+i, "%.4X",(Int64) MyNumber);
            #endif
        }
        if (GV.SYNTAX_ == ATSyntax) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic+i, " , \x24");
            #endif
            i+=4;
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) strcpy ((*pMyDisasm).Argument1.ArgMnemonic+i, " : ");
            #endif
            i+=3;
        }
        MyAddress = MyNumber*16;
        MyNumber = *((UInt32*)(UIntPtr) (GV.EIP_+1));
        if (GV.OperandSize == 16) {
            MyNumber = MyNumber & 0xffff;
        }
        #ifndef BEA_LIGHT_DISASSEMBLY
           i += CopyFormattedNumber(pMyDisasm, (char*) &(*pMyDisasm).Argument1.ArgMnemonic+i, "%.8X",(Int64) MyNumber);
        #endif
        if (GV.OperandSize == 32) {
            GV.EIP_+=7;
        }
        else {
            GV.EIP_+=5;
        }
        (*pMyDisasm).Instruction.AddrValue = MyAddress + MyNumber;
        FillFlags(pMyDisasm,51);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x40, 0x25c(%rdi)
jne 0x17be8
movb $0x0, 0x6c(%rbx)
movl $0x203f3f3f, 0x68(%rbx) # imm = 0x203F3F3F
movl $0x1, 0x280(%rbx)
jmp 0x17d5e
movl $0x10006, 0x60(%rbx)    # imm = 0x10006
movl $0xb, 0x78(%rbx)
leaq 0x9c(%rbx), %r15
movl $0x1, 0xe8(%rbx)
leaq 0x68(%rbx), %rax
cmpl $0x400, 0x24c(%rbx)     # imm = 0x400
jne 0x17c31
movw $0x20, 0x4(%rax)
movl $0x706d6a6c, (%rax)     # imm = 0x706D6A6C
movw $0x24, (%r15)
movl $0x1, %r12d
jmp 0x17c45
movabsq $0x2072616620706d6a, %rcx # imm = 0x2072616620706D6A
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
xorl %r12d, %r12d
cmpl $0x20, 0x20c(%rbx)
movq 0x250(%rbx), %rcx
jne 0x17c6c
movl $0x5, %eax
testq %rcx, %rcx
je 0x17c8a
movq 0x1f0(%rbx), %rdx
addq $0x7, %rdx
jmp 0x17c81
movl $0x3, %eax
testq %rcx, %rcx
je 0x17c8a
movq 0x1f0(%rbx), %rdx
addq $0x5, %rdx
cmpq %rcx, %rdx
jae 0x17d54
movq 0x1f0(%rbx), %rcx
movzwl (%rcx,%rax), %r14d
leaq (%r15,%r12), %rsi
leaq 0x15dd1(%rip), %rdx     # 0x2da72
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2acdf
addq %r12, %rax
addq %r15, %rax
cmpl $0x400, 0x24c(%rbx)     # imm = 0x400
jne 0x17ccf
movb $0x0, 0x4(%rax)
movl $0x24202c20, (%rax)     # imm = 0x24202C20
movl $0x4, %ecx
jmp 0x17cda
movl $0x203a20, (%rax)       # imm = 0x203A20
movl $0x3, %ecx
shll $0x4, %r14d
movq 0x1f0(%rbx), %rdx
movl 0x1(%rdx), %edx
cmpl $0x10, 0x20c(%rbx)
movzwl %dx, %r15d
cmovnel %edx, %r15d
addq %rcx, %rax
leaq 0x15d5b(%rip), %rdx     # 0x2da5c
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0x2acdf
xorl %eax, %eax
cmpl $0x20, 0x20c(%rbx)
sete %al
movq 0x1f0(%rbx), %rcx
leaq (%rcx,%rax,2), %rax
addq $0x5, %rax
movq %rax, 0x1f0(%rbx)
addq %r15, %r14
movq %r14, 0x88(%rbx)
movq 0x206a2(%rip), %rax     # 0x383e4
movq %rax, 0x7c(%rbx)
movl 0x206a0(%rip), %eax     # 0x383ec
movl %eax, 0x84(%rbx)
jmp 0x17d5e
movl $0x1, 0x289(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq