// File: /workspace/github_c_makefile_star2_O3/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: jmp_near
void __bea_callspec__ jmp_near(PDISASM pMyDisasm)
{
    UInt64 MyAddress;
    long MyNumber;
    (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+CONTROL_TRANSFER;
    (*pMyDisasm).Instruction.BranchType = JmpType;
    (*pMyDisasm).Argument1.AccessMode = READ;
    (*pMyDisasm).Argument1.ArgSize = GV.OperandSize;
    #ifndef BEA_LIGHT_DISASSEMBLY
       (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "jmp ");
    #endif
    if (GV.OperandSize >= 32) {
        if (!Security(5, pMyDisasm)) return;
        MyNumber = *((Int32*)(UIntPtr) (GV.EIP_+1));
        CalculateRelativeAddress(&MyAddress,(Int64) GV.NB_PREFIX+5+MyNumber, pMyDisasm);
        if (MyAddress >= W64LIT (0x100000000)) {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyDisasm).Argument1.ArgMnemonic, "%.16llX",(Int64) MyAddress);
            #endif
        }
        else {
            #ifndef BEA_LIGHT_DISASSEMBLY
               (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyDisasm).Argument1.ArgMnemonic, "%.8X",(Int64) MyAddress);
            #endif
        }
        (*pMyDisasm).Argument1.ArgType = CONSTANT_TYPE+RELATIVE_;

        (*pMyDisasm).Instruction.AddrValue = MyAddress;
        GV.EIP_+=5;
        FillFlags(pMyDisasm,51);
    }
    else {
        if (!Security(3, pMyDisasm)) return;
        MyNumber = *((Int16*)(UIntPtr) (GV.EIP_+1));
        CalculateRelativeAddress(&MyAddress,(Int64) GV.NB_PREFIX+3+MyNumber, pMyDisasm);
        MyAddress = MyAddress & 0xffff;
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) CopyFormattedNumber(pMyDisasm, (char*) (*pMyDisasm).Argument1.ArgMnemonic, "%.4X",(Int64) MyAddress);
        #endif
        (*pMyDisasm).Argument1.ArgType = CONSTANT_TYPE+RELATIVE_;
        (*pMyDisasm).Instruction.AddrValue = MyAddress;
        GV.EIP_+=3;
        FillFlags(pMyDisasm,51);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10006, 0x60(%rdi)    # imm = 0x10006
movl $0xb, 0x78(%rdi)
leaq 0x9c(%rdi), %rsi
movl $0x1, 0xe8(%rdi)
movl 0x20c(%rdi), %edx
movl %edx, 0xe0(%rdi)
movl $0x20706d6a, 0x68(%rdi) # imm = 0x20706D6A
movb $0x0, 0x6c(%rdi)
movq 0x250(%rdi), %rcx
decq %rcx
movq 0x1f0(%rdi), %rax
cmpl $0x20, %edx
jl 0x175c9
movq %rax, %rdx
addq $0x5, %rdx
cmpq %rdx, %rcx
jb 0x175d5
movslq 0x1(%rax), %rax
movslq 0x264(%rbx), %rcx
movl $0x1, 0x258(%rbx)
movq 0x1f8(%rbx), %rdx
testq %rdx, %rdx
jne 0x1757f
movq 0x200(%rbx), %rdx
addq %rcx, %rax
leaq (%rdx,%rax), %r14
addq $0x5, %r14
movq %r14, %rax
shrq $0x20, %rax
leaq 0x164bc(%rip), %rax     # 0x2da54
leaq 0x164bd(%rip), %rdx     # 0x2da5c
cmovneq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2a60b
movl $0x84000000, 0xdc(%rbx) # imm = 0x84000000
movq %r14, 0x88(%rbx)
addq $0x5, 0x1f0(%rbx)
jmp 0x1763e
movq %rax, %rdx
addq $0x3, %rdx
cmpq %rdx, %rcx
jae 0x175e1
movl $0x1, 0x289(%rbx)
jmp 0x17655
movzwl 0x1(%rax), %ecx
movl 0x264(%rbx), %eax
movl $0x1, 0x258(%rbx)
movq 0x1f8(%rbx), %rdx
testq %rdx, %rdx
jne 0x17608
movq 0x200(%rbx), %rdx
addl %ecx, %eax
addl %edx, %eax
addl $0x3, %eax
movzwl %ax, %r14d
leaq 0x16458(%rip), %rdx     # 0x2da72
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2a60b
movl $0x84000000, 0xdc(%rbx) # imm = 0x84000000
movq %r14, 0x88(%rbx)
addq $0x3, 0x1f0(%rbx)
movq 0x20d9f(%rip), %rax     # 0x383e4
movq %rax, 0x7c(%rbx)
movl 0x20d9d(%rip), %eax     # 0x383ec
movl %eax, 0x84(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq