// File: /workspace/github_c_makefile_star2_O2/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 0x17215
movb $0x0, 0x6c(%rbx)
movl $0x203f3f3f, 0x68(%rbx) # imm = 0x203F3F3F
movl $0x1, 0x280(%rbx)
jmp 0x1736e
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 0x1725c
movw $0x20, 0x4(%rax)
movl $0x706d6a6c, (%rax)     # imm = 0x706D6A6C
movw $0x24, (%r15)
pushq $0x1
popq %r12
jmp 0x17270
movabsq $0x2072616620706d6a, %rcx # imm = 0x2072616620706D6A
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
xorl %r12d, %r12d
movq 0x250(%rbx), %rcx
decq %rcx
cmpl $0x20, 0x20c(%rbx)
movq 0x1f0(%rbx), %rax
jne 0x17297
leaq 0x7(%rax), %rdx
cmpq %rdx, %rcx
jb 0x172a0
pushq $0x5
jmp 0x172b1
leaq 0x5(%rax), %rdx
cmpq %rdx, %rcx
jae 0x172af
movl $0x1, 0x289(%rbx)
jmp 0x1736e
pushq $0x3
popq %rcx
movzwl (%rax,%rcx), %r14d
leaq (%r15,%r12), %rsi
leaq 0x137b0(%rip), %rdx     # 0x2aa72
movq %rbx, %rdi
movq %r14, %rcx
callq 0x283ec
addq %r12, %rax
addq %r15, %rax
cmpl $0x400, 0x24c(%rbx)     # imm = 0x400
jne 0x172ed
movb $0x0, 0x4(%rax)
movl $0x24202c20, (%rax)     # imm = 0x24202C20
pushq $0x4
jmp 0x172f5
movl $0x203a20, (%rax)       # imm = 0x203A20
pushq $0x3
popq %rcx
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 0x1373f(%rip), %rdx     # 0x2aa5c
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0x283ec
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 0x1f0a6(%rip), %rax     # 0x36404
movq %rax, 0x7c(%rbx)
movl 0x1f0a4(%rip), %eax     # 0x3640c
movl %eax, 0x84(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq