// File: besm6[P]pascal-re/pascompl.cc
// Function: initTables::initInsnTemplates()
void initInsnTemplates() {
        Insn l3var1z;
        Operator l3var2z;

        for (l3var1z = ATX; l3var1z <= JADDM; succ(l3var1z))
            InsnTemp[l3var1z] = l3var1z * 010000;
        InsnTemp[ELFUN] = 0500000;
        jdx = KUTC;
        for (l3var1z = UTC; l3var1z <= VJM; succ(l3var1z)) {
            InsnTemp[l3var1z] = jdx;
            jdx = (jdx + 0100000);
        }
        for (idx=1; idx <= 15; ++idx)
            indexreg[idx] = idx * frameRegTemplate;
        jumpType = InsnTemp[UJ];
        for (l3var2z = MUL; l3var2z<=ASSIGNOP; succ(l3var2z)) {
            opFlags[l3var2z] = opfCOMM;
            opToInsn[l3var2z] = 0;
            if (Bits(MUL, RDIVOP, PLUSOP, MINUSOP).has(l3var2z)) {
                opToMode[l3var2z] = 3;
            } else if (Bits(IDIVOP, IMODOP).has(l3var2z)) {
                opToMode[l3var2z] = 2;
            } else if (Bits(IMULOP, INTPLUS, INTMINUS, badop27).has(l3var2z)) {
                opToMode[l3var2z] = 1;
            } else if (Bits(IDIVROP, badop30, badop31).has(l3var2z)) {
                opToMode[l3var2z] = 4;
            } else {
                opToMode[l3var2z] = 0;
            }
        }
        opToInsn[MUL] = InsnTemp[AMULX];
        opToInsn[RDIVOP] = InsnTemp[ADIVX];
        opToInsn[IDIVOP] = 17; /* P/DI */
        opToInsn[IMODOP] = 11; /* P/MD */
        opToInsn[PLUSOP] = InsnTemp[ADD];
        opToInsn[MINUSOP] = InsnTemp[SUB];
        opToInsn[IMULOP] = InsnTemp[AMULX];
        opToInsn[SETAND] = InsnTemp[AAX];
        opToInsn[SETXOR] = InsnTemp[AEX];
        opToInsn[SETOR] = InsnTemp[AOX];
        opToInsn[INTPLUS] = InsnTemp[ADD];
        opToInsn[INTMINUS] = InsnTemp[SUB];
        opToInsn[IDIVROP] = 67; /* P/IS */
        opToInsn[badop27] = 22; /* P/II unused, undefined */
        opToInsn[badop30] = 23; /* P/RR */
        opToInsn[badop31] = 24; /* P/RI */
        opToInsn[MKRANGE] = 61; /* P/PI */
        opToInsn[SETSUB] = InsnTemp[AAX];
        opFlags[AMPERS] = opfAND;
        opFlags[IDIVOP] = opfDIV;
        opFlags[OROP] = opfOR;
        opFlags[IMULOP] = opfMULMSK;
        opFlags[IMODOP] = opfMOD;
        opFlags[badop27] = opfHELP;
        opFlags[badop30] = opfHELP;
        opFlags[badop31] = opfHELP;
        opFlags[MKRANGE] = opfHELP;
        opFlags[IDIVROP] = opfHELP;
        opFlags[ASSIGNOP] = opfASSN;
        opFlags[SETSUB] = opfINV;
        for (jdx = 0; jdx <= 6; ++jdx) {
            funcInsn[jdx] = (0500000 + jdx);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x25, -0xc(%rbp)
jg 0x29885
movl -0xc(%rbp), %eax
shll $0xc, %eax
movslq %eax, %rdx
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x5b1ba(%rip), %rax     # 0x84a30
movq %rdx, (%rax,%rcx,8)
leaq -0xc(%rbp), %rdi
callq 0x29e80
jmp 0x2985b
movq -0x38(%rbp), %rax
movq $0x28000, 0x5b2cc(%rip) # imm = 0x28000
movq $0x90000, 0x8(%rax)     # imm = 0x90000
movl $0x27, -0xc(%rbp)
cmpl $0x2e, -0xc(%rbp)
jg 0x298db
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x5b173(%rip), %rcx     # 0x84a30
movq %rsi, (%rcx,%rdx,8)
movq 0x8(%rax), %rcx
addq $0x8000, %rcx           # imm = 0x8000
movq %rcx, 0x8(%rax)
leaq -0xc(%rbp), %rdi
callq 0x29e80
jmp 0x298a3
movq -0x38(%rbp), %rax
movq $0x1, (%rax)
movq -0x38(%rbp), %rax
cmpq $0xf, (%rax)
jg 0x2991d
movq -0x38(%rbp), %rax
movq (%rax), %rdx
imulq 0x159e9(%rip), %rdx     # 0x3f2e8
movq (%rax), %rcx
leaq 0x5ac27(%rip), %rax     # 0x84530
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x298e6
movq 0x5b274(%rip), %rax     # 0x84b98
movq %rax, 0x56595(%rip)     # 0x7fec0
movl $0x0, -0x10(%rbp)
cmpl $0x1b, -0x10(%rbp)
jg 0x29a9f
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5af68(%rip), %rax     # 0x848b0
movl $0x0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5ac55(%rip), %rax     # 0x845b0
movq $0x0, (%rax,%rcx,8)
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x4a00
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
callq 0x1e5f0
testb $0x1, %al
jne 0x29993
jmp 0x299ac
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5ad91(%rip), %rax     # 0x84730
movq $0x3, (%rax,%rcx,8)
jmp 0x29a8f
movl $0x3, %edi
movl $0x4, %esi
callq 0x4940
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdi
callq 0x1e5f0
testb $0x1, %al
jne 0x299d3
jmp 0x299ec
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5ad51(%rip), %rax     # 0x84730
movq $0x2, (%rax,%rcx,8)
jmp 0x29a8d
movl $0xf, %edi
movl $0x15, %esi
movl $0x16, %edx
movl $0x17, %ecx
callq 0x4a00
movq %rax, -0x28(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x1e5f0
testb $0x1, %al
jne 0x29a1d
jmp 0x29a33
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5ad07(%rip), %rax     # 0x84730
movq $0x1, (%rax,%rcx,8)
jmp 0x29a8b
movl $0x10, %edi
movl $0x18, %esi
movl $0x19, %edx
callq 0x4990
movq %rax, -0x30(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x1e5f0
testb $0x1, %al
jne 0x29a5f
jmp 0x29a75
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5acc5(%rip), %rax     # 0x84730
movq $0x4, (%rax,%rcx,8)
jmp 0x29a89
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x5acaf(%rip), %rax     # 0x84730
movq $0x0, (%rax,%rcx,8)
jmp 0x29a8b
jmp 0x29a8d
jmp 0x29a8f
jmp 0x29a91
leaq -0x10(%rbp), %rdi
callq 0x29ea0
jmp 0x29932
movq -0x38(%rbp), %rax
movq 0x5affe(%rip), %rcx     # 0x84aa8
movq %rcx, 0x5aaff(%rip)     # 0x845b0
movq 0x5afe8(%rip), %rcx     # 0x84aa0
movq %rcx, 0x5aaf9(%rip)     # 0x845b8
movq $0x11, 0x5aafe(%rip) # 0x845c8
movq $0xb, 0x5aafb(%rip) # 0x845d0
movq 0x5af74(%rip), %rcx     # 0x84a50
movq %rcx, 0x5aaf5(%rip)     # 0x845d8
movq 0x5af6e(%rip), %rcx     # 0x84a58
movq %rcx, 0x5aaef(%rip)     # 0x845e0
movq 0x5afb0(%rip), %rcx     # 0x84aa8
movq %rcx, 0x5ab29(%rip)     # 0x84628
movq 0x5af72(%rip), %rcx     # 0x84a78
movq %rcx, 0x5ab2b(%rip)     # 0x84638
movq 0x5af6c(%rip), %rcx     # 0x84a80
movq %rcx, 0x5ab25(%rip)     # 0x84640
movq 0x5af76(%rip), %rcx     # 0x84a98
movq %rcx, 0x5ab1f(%rip)     # 0x84648
movq 0x5af20(%rip), %rcx     # 0x84a50
movq %rcx, 0x5ab21(%rip)     # 0x84658
movq 0x5af1a(%rip), %rcx     # 0x84a58
movq %rcx, 0x5ab1b(%rip)     # 0x84660
movq $0x43, 0x5aae0(%rip) # 0x84630
movq $0x16, 0x5ab0d(%rip) # 0x84668
movq $0x17, 0x5ab0a(%rip) # 0x84670
movq $0x18, 0x5ab07(%rip) # 0x84678
movq $0x3d, 0x5ab04(%rip) # 0x84680
movq 0x5aef5(%rip), %rcx     # 0x84a78
movq %rcx, 0x5aac6(%rip)     # 0x84650
movl $0x2, 0x5ad24(%rip)     # 0x848b8
movl $0x4, 0x5ad1e(%rip)     # 0x848bc
movl $0x3, 0x5ad24(%rip)     # 0x848cc
movl $0x6, 0x5ad3a(%rip)     # 0x848ec
movl $0x5, 0x5ad04(%rip)     # 0x848c0
movl $0x1, 0x5ad46(%rip)     # 0x8490c
movl $0x1, 0x5ad40(%rip)     # 0x84910
movl $0x1, 0x5ad3a(%rip)     # 0x84914
movl $0x1, 0x5ad34(%rip)     # 0x84918
movl $0x1, 0x5ad02(%rip)     # 0x848f0
movl $0x7, 0x5ad24(%rip)     # 0x8491c
movl $0x8, 0x5acfe(%rip)     # 0x84900
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
cmpq $0x6, 0x8(%rax)
jg 0x29c45
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
addq $0x28000, %rdx          # imm = 0x28000
movq 0x8(%rax), %rcx
leaq 0x5ad41(%rip), %rax     # 0x84970
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x29c0a
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)