// File: besm6[P]pascal-re/pascompl.cc
// Function: formPMD()
void formPMD()
{
    TypesPtr l3typ1z;
    Word l3var2z;
    Bitset l3var3z;
    bool l3var4z;
    Kind l3var5z;
    IdentRecPtr &l2idr2z = programme::super.back()->l2idr2z;
    IdentRecPtr &curIdRec = programme::super.back()->curIdRec;

    for (int bb = 0; bb <= 1; ++bb) {
        l3var4z = bb;
        if (l3var4z) {
            optSflags.m = optSflags.m + Bits(S3);
            curVal.i = 074001;
            P0715(2, 34); /*"P/DS"*/
            curVal.ii = l2idr2z->id;
            toFCST();
            curVal.i = lineCnt;
            toFCST();
        } /* 13063 */
        for (int jj = 0; jj <= 127; ++jj)  {
            curIdRec = symHashTabBase[jj];
            /*13066*/
            while (curIdRec != NULL and l2idr2z < curIdRec) {
                if (curIdRec->typ != NULL) // check added; in the BESM-6 dereferencing NULL is OK
                    l3var2z.i = curIdRec->typ->size;
                if ((curIdRec->cl == VARID || curIdRec->cl == FORMALID) and
                    (curIdRec->value() < 074000)) {
                    curVal.ii = curIdRec->id;
                    if (l3var4z)
                        toFCST();
                    l3typ1z = curIdRec->typ;
                    l3var5z = l3typ1z->k;
                    l3var3z = Bits();
                    if (l3var5z == kindPtr) {
                        l3typ1z = l3typ1z->cast<PtrT>().pbase;
                        l3var5z = l3typ1z->k;
                        l3var3z = Bits(0);
                    }
                    if (l3typ1z == RealType)
                        curVal.i = 0;
                    else if (typeCheck(l3typ1z, IntegerType))
                        curVal.i = 0100000;
                    else if (typeCheck(l3typ1z, CharType))
                        curVal.i = 0200000;
                    else if (l3var5z == kindArray)
                        curVal.i = 0400000;
                    else if (l3var5z == kindScalar) {
                        dumpEnumNames(static_cast<ScalarT*>(l3typ1z));
                        curVal.i = 01000000 * l3typ1z->cast<ScalarT>().start + 0300000;
                    } else if (l3var5z == kindFile)
                        curVal.i = 0600000;
                    else {
                        curVal.i = 0500000;
                    }
                    curVal.i = curVal.i + curIdRec->value();
                    l3var2z.m = l3var2z.m << 33;
                    curVal.m = curVal.m * BitRange(15,47) + l3var2z.m + l3var3z;
                    if (l3var4z)
                        toFCST();
                } /* 13164 */
                curIdRec = curIdRec->next;
            } /* 13166 */
        } /*13167+*/
        curVal.m = Bits();
        if (l3var4z)
            toFCST();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
leaq 0xc494e(%rip), %rdi     # 0xd8a30
callq 0x1e890
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0xc493b(%rip), %rdi     # 0xd8a30
callq 0x1e890
movq (%rax), %rax
addq $0x28, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x1, -0x34(%rbp)
jg 0x145c9
cmpl $0x0, -0x34(%rbp)
setne %al
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x141a2
xorl %eax, %eax
movl %eax, %edi
callq 0x48e0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq 0x6bff0(%rip), %rdi     # 0x80130
callq 0x1db20
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, 0x6bfdc(%rip)     # 0x80130
leaq 0x6bf95(%rip), %rdi     # 0x800f0
movl $0x7801, %esi           # imm = 0x7801
callq 0x4ad0
movl $0x2, %edi
movl $0x22, %esi
callq 0x8910
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x6bf6b(%rip)     # 0x800f0
callq 0x8140
movq 0x6bddf(%rip), %rsi     # 0x7ff70
leaq 0x6bf58(%rip), %rdi     # 0x800f0
callq 0x4ad0
callq 0x8140
movl $0x0, -0x4c(%rbp)
cmpl $0x7f, -0x4c(%rbp)
jg 0x14594
movslq -0x4c(%rbp), %rcx
leaq 0x716d2(%rip), %rax     # 0x85890
movq (%rax,%rcx,8), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x141(%rbp)
je 0x141f2
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
setb %al
movb %al, -0x141(%rbp)
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x14201
jmp 0x14584
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x14226
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
leaq -0x10(%rbp), %rdi
callq 0x4ad0
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x3, 0x20(%rax)
je 0x14244
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, 0x20(%rax)
jne 0x1456d
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x1e6b0
cmpq $0x7800, (%rax)         # imm = 0x7800
jge 0x1456d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x6be82(%rip)     # 0x800f0
testb $0x1, -0x19(%rbp)
je 0x14279
callq 0x8140
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
callq 0x48c0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x3, -0x20(%rbp)
jne 0x142d9
movq -0x8(%rbp), %rdi
callq 0x1eab0
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x48e0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq 0x6bdcc(%rip), %rax     # 0x800b0
jne 0x142fb
leaq 0x6be03(%rip), %rdi     # 0x800f0
xorl %eax, %eax
movl %eax, %esi
callq 0x4ad0
jmp 0x14483
movq -0x8(%rbp), %rsi
movq 0x6bda2(%rip), %rdx     # 0x800a8
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xb280
movq -0x150(%rbp), %rdi
callq 0x1e950
movb %al, -0x142(%rbp)
jmp 0x1432d
leaq -0xa8(%rbp), %rdi
callq 0x1e9c0
movb -0x142(%rbp), %al
testb $0x1, %al
jne 0x14345
jmp 0x1437e
leaq 0x6bda4(%rip), %rdi     # 0x800f0
movl $0x8000, %esi           # imm = 0x8000
callq 0x4ad0
jmp 0x14481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1e9c0
jmp 0x145d2
movq -0x8(%rbp), %rsi
movq 0x6bd2f(%rip), %rdx     # 0x800b8
leaq -0x100(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0xb280
movq -0x160(%rbp), %rdi
callq 0x1e950
movb %al, -0x151(%rbp)
jmp 0x143b0
leaq -0x100(%rbp), %rdi
callq 0x1e9c0
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x143c8
jmp 0x14401
leaq 0x6bd21(%rip), %rdi     # 0x800f0
movl $0x10000, %esi          # imm = 0x10000
callq 0x4ad0
jmp 0x1447f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x1e9c0
jmp 0x145d2
cmpl $0x5, -0x20(%rbp)
jne 0x1441a
leaq 0x6bce2(%rip), %rdi     # 0x800f0
movl $0x20000, %esi          # imm = 0x20000
callq 0x4ad0
jmp 0x1447d
cmpl $0x1, -0x20(%rbp)
jne 0x1444f
movq -0x8(%rbp), %rdi
callq 0x14060
movq -0x8(%rbp), %rdi
callq 0x1ea60
movq 0x28(%rax), %rsi
shlq $0x12, %rsi
addq $0x18000, %rsi          # imm = 0x18000
leaq 0x6bca8(%rip), %rdi     # 0x800f0
callq 0x4ad0
jmp 0x1447b
cmpl $0x7, -0x20(%rbp)
jne 0x14468
leaq 0x6bc94(%rip), %rdi     # 0x800f0
movl $0x30000, %esi          # imm = 0x30000
callq 0x4ad0
jmp 0x14479
leaq 0x6bc81(%rip), %rdi     # 0x800f0
movl $0x28000, %esi          # imm = 0x28000
callq 0x4ad0
jmp 0x1447b
jmp 0x1447d
jmp 0x1447f
jmp 0x14481
jmp 0x14483
leaq 0x6bc66(%rip), %rdi     # 0x800f0
callq 0x1dfb0
movq %rax, -0x168(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x1e6b0
movq -0x168(%rbp), %rsi
addq (%rax), %rsi
leaq 0x6bc3d(%rip), %rdi     # 0x800f0
callq 0x4ad0
leaq -0x10(%rbp), %rdi
movl $0x21, %esi
callq 0x1e650
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0xf, %edi
movl $0x2f, %esi
callq 0x4a60
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rsi
leaq 0x6bbf4(%rip), %rdi     # 0x800f0
callq 0x1e580
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x1db20
movq %rax, -0x118(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x1db20
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, 0x6bb90(%rip)     # 0x800f0
testb $0x1, -0x19(%rbp)
je 0x1456b
callq 0x8140
jmp 0x1456d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x141c9
jmp 0x14586
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x141a9
callq 0x48c0
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, 0x6bb42(%rip)     # 0x800f0
testb $0x1, -0x19(%rbp)
je 0x145b9
callq 0x8140
jmp 0x145bb
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1410c
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x44c0
nop