// File: /workspace/github_c_makefile_star2_O0/buptlxb[P]xRay/disasm/instr_set/opcodes_A_M.c
// Function: jecxz_
void __bea_callspec__ jecxz_(PDISASM pMyDisasm)
{
    UInt64 MyAddress;
    Int64 MyNumber;
    if ((*pMyDisasm).Prefix.CSPrefix == InUsePrefix) {
        (*pMyDisasm).Prefix.CSPrefix = NotUsedPrefix;
        (*pMyDisasm).Prefix.BranchNotTaken = InUsePrefix;
    }
    if ((*pMyDisasm).Prefix.DSPrefix == InUsePrefix) {
        (*pMyDisasm).Prefix.DSPrefix = NotUsedPrefix;
        (*pMyDisasm).Prefix.BranchTaken = InUsePrefix;
    }
    (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+CONTROL_TRANSFER;
    (*pMyDisasm).Instruction.BranchType = JECXZ;
    (*pMyDisasm).Argument1.ArgSize = GV.OperandSize;
    if (GV.AddressSize == 64) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "jrcxz ");
        #endif
    }
    else if (GV.AddressSize == 32) {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "jecxz ");
        #endif
    }
    else {
        #ifndef BEA_LIGHT_DISASSEMBLY
           (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "jcxz ");
        #endif
    }
    if (GV.OperandSize >= 32) {
        if (!Security(5, pMyDisasm)) return;
        MyNumber = *((Int8*)(UIntPtr) (GV.EIP_+1));
        CalculateRelativeAddress(&MyAddress,(Int64) GV.NB_PREFIX+2+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).Argument1.AccessMode = READ;
        (*pMyDisasm).Instruction.AddrValue = MyAddress;
        GV.EIP_+=2;
        FillFlags(pMyDisasm,49);
    }
    else {
        if (!Security(3, pMyDisasm)) return;
        MyNumber = *((Int8*)(UIntPtr) (GV.EIP_+1));
        CalculateRelativeAddress(&MyAddress,(Int64) GV.NB_PREFIX+2+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).Argument1.AccessMode = READ;
        (*pMyDisasm).Instruction.AddrValue = MyAddress;
        GV.EIP_+=2;
        FillFlags(pMyDisasm,49);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1e5(%rax), %eax
cmpl $0x1, %eax
jne 0x2c5b2
movq -0x8(%rbp), %rax
movb $0x0, 0x1e5(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1e8(%rax)
movq -0x8(%rbp), %rax
movzbl 0x1e6(%rax), %eax
cmpl $0x1, %eax
jne 0x2c5d8
movq -0x8(%rbp), %rax
movb $0x0, 0x1e6(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1e7(%rax)
movq -0x8(%rbp), %rax
movl $0x10006, 0x60(%rax)    # imm = 0x10006
movq -0x8(%rbp), %rax
movl $0xa, 0x78(%rax)
movq -0x8(%rbp), %rax
movl 0x20c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xe0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x214(%rax)
jne 0x2c629
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x25029(%rip), %rsi     # 0x5164b
callq 0x81c0
jmp 0x2c66a
movq -0x8(%rbp), %rax
cmpl $0x20, 0x214(%rax)
jne 0x2c650
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x25009(%rip), %rsi     # 0x51652
callq 0x81c0
jmp 0x2c668
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x24ff6(%rip), %rsi     # 0x51659
callq 0x81c0
jmp 0x2c66a
movq -0x8(%rbp), %rax
cmpl $0x20, 0x20c(%rax)
jl 0x2c76b
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x2c693
jmp 0x2c833
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movsbq 0x1(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq 0x264(%rax), %rsi
addq $0x2, %rsi
addq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0x4db60
movabsq $0x100000000, %rax      # imm = 0x100000000
cmpq %rax, -0x10(%rbp)
jb 0x2c6f8
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
movq -0x10(%rbp), %rcx
leaq 0x24db7(%rip), %rdx     # 0x514a8
callq 0x4d3a0
jmp 0x2c717
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
movq -0x10(%rbp), %rcx
leaq 0x24d9e(%rip), %rdx     # 0x514b0
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x84000000, 0xdc(%rax) # imm = 0x84000000
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rdi
movl $0x31, %esi
callq 0x4d560
jmp 0x2c833
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x4d340
cmpl $0x0, %eax
jne 0x2c783
jmp 0x2c833
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rax
movsbq 0x1(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq 0x264(%rax), %rsi
addq $0x2, %rsi
addq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0x4db60
movq -0x10(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
movq -0x10(%rbp), %rcx
leaq 0x24ce7(%rip), %rdx     # 0x514c6
callq 0x4d3a0
movq -0x8(%rbp), %rax
movl $0x84000000, 0xdc(%rax) # imm = 0x84000000
movq -0x8(%rbp), %rax
movl $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x1f0(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rdi
movl $0x31, %esi
callq 0x4d560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)