// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x25c(%rax)
jne 0x2d04f
movq -0x8(%rbp), %rdi
callq 0x30050
jmp 0x2d2b2
movq -0x8(%rbp), %rax
movl $0x10006, 0x60(%rax)    # imm = 0x10006
movq -0x8(%rbp), %rax
movl $0xb, 0x78(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x2d0c0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x245c9(%rip), %rsi     # 0x5165f
callq 0x81c0
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
leaq 0x24421(%rip), %rsi     # 0x514ce
callq 0x81c0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2d0d8
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x24592(%rip), %rsi     # 0x51665
callq 0x81c0
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x2d13d
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x2d0fd
jmp 0x2d2b2
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movzwl 0x5(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
addq -0x20(%rbp), %rsi
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x24398(%rip), %rdx     # 0x514c6
callq 0x4d3a0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2d193
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x2d155
jmp 0x2d2b2
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movzwl 0x3(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
addq -0x20(%rbp), %rsi
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x24340(%rip), %rdx     # 0x514c6
callq 0x4d3a0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x400, 0x24c(%rax)     # imm = 0x400
jne 0x2d1cc
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
addq -0x20(%rbp), %rdi
leaq 0x24312(%rip), %rsi     # 0x514cb
callq 0x81c0
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0x2d1f3
movq -0x8(%rbp), %rdi
addq $0x9c, %rdi
addq -0x20(%rbp), %rdi
leaq 0x242ee(%rip), %rsi     # 0x514d0
callq 0x81c0
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shll $0x4, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movl 0x1(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x10, 0x20c(%rax)
jne 0x2d228
movl -0xc(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
addq -0x20(%rbp), %rsi
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x24269(%rip), %rdx     # 0x514b0
callq 0x4d3a0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jne 0x2d279
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x7, %rcx
movq %rcx, 0x1f0(%rax)
jmp 0x2d28f
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x5, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rdi
movl $0x33, %esi
callq 0x4d560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)