// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/pascompl.cc
// Function: parseDecls(long)
void parseDecls(int64_t l3arg1z)
{
    int64_t l3int1z;
    Word frame;
    bool l3var3z;

    IdentRecPtr &l2idr2z = programme::super.back()->l2idr2z;
    int64_t &l2int11z = programme::super.back()->l2int11z;

    switch (l3arg1z) {
    case 0: {
        int93z = 0;
        inSymbol();
        if (SY != IDENT)
            errAndSkip(3, skipToSet + Bits(IDENT));
    } break;
    case 2: {
        padToLeft();
        l3var3z = l2idr2z->flags().has(22);
        l3arg1z = l2idr2z->pos();
        frame.i = moduleOffset - 040000;
        if (l3arg1z != 0)
            symTab[l3arg1z] = 041000000 + (frame.ii & halfWord);
        l2idr2z->pos() = moduleOffset;
        l3arg1z = F3307(l2idr2z);
        if (l3var3z) {
            if (41 >= entryPtCnt) {
                curVal.ii = l2idr2z->id;
                entryPtTable[entryPtCnt] = makeNameWithStars(true);
                entryPtTable[entryPtCnt+1] = (1L << 46) | frame.i;
                entryPtCnt = entryPtCnt + 2;
            } else
                error(87); /* errTooManyEntryProcs */
        };
        if (l2idr2z->typ == NULL) {
            frame.i = 3;
        } else {
            frame.i = 4;
        };
        if (l3var3z)
            form2Insn((KVTM+I14) + l3arg1z + (frame.i - 3) * 01000,
                      getHelperProc(94 /*"P/NN"*/) - 010000000);
        if (1 < l3arg1z) {
            frame.i = getValueOrAllocSymtab(-(frame.i+l3arg1z));
        }
        if (optSflags.m.has(S5) and
            curProcNesting == 1)
            l3int1z = 59;  /* P/LV */
        else
            l3int1z = curProcNesting;
        l3int1z = getHelperProc(l3int1z) - (-04000000);
        if (l3arg1z == 1) {
            form1Insn((KATX+SP) + frame.i);
        } else if (l3arg1z != 0) {
            form2Insn(KATX+SP, (KUTM+SP) + frame.i);
        }
        formAndAlign(l3int1z);
        savedObjIdx = objBufIdx;
        if (curProcNesting != 1)
            form1Insn(0);
        if (l3var3z)
            form1Insn(KVTM+I8+074001);
        if (l2int11z != 0) {
            form1Insn(InsnTemp[XTA]);
            formAndAlign(KVJM+I13 + l2int11z);
            curVal.i = l2int11z;
            P0715(2, 49 /* "P/RDC" */);
        }
        if (curProcNesting == 1) {
            if (heapCallsCnt != 0 and
                heapSize == 0)
                error(65 /*errCannotHaveK0AndNew*/);
            l3var3z = (heapSize == 0) or
                ((heapCallsCnt == 0) and (heapSize == 100));
            if (heapSize == 100)
                heapSize = 4;
            if (not l3var3z) {
                form2Insn(KVTM+I14+getValueOrAllocSymtab(heapSize*02000),
                          getHelperProc(26 /*"P/GD"*/));
                padToLeft();
            }
        }
        if (doPMD)
            formPMD();
    } break;
    } /* case */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
cmpq $0x2, %rdi
je 0xca81
testq %rdi, %rdi
jne 0xcd76
andq $0x0, 0x56f06(%rip)     # 0x63948
leaq 0x10(%rsp), %rdi
callq 0x6316
cmpl $0x0, 0x56dc9(%rip)     # 0x6381c
je 0xcd76
movabsq $0x7fffffffffff, %rax   # imm = 0x7FFFFFFFFFFF
movq 0x56d7e(%rip), %rcx     # 0x637e8
andq %rax, %rcx
leaq (%rcx,%rax), %rsi
incq %rsi
pushq $0x3
popq %rdi
callq 0x71de
jmp 0xcd76
movq 0xaf8f0(%rip), %rax     # 0xbc378
movq -0x8(%rax), %r12
callq 0x51a1
movq (%r12), %rdi
callq 0x13ee4
movq (%rax), %r13
movq (%r12), %rdi
callq 0x13eb6
movq (%rax), %rbx
movq $-0x4000, %rsi          # imm = 0xC000
addq 0x56dd1(%rip), %rsi     # 0x63888
leaq 0x8(%rsp), %rdi
callq 0x381c
testq %rbx, %rbx
je 0xcae1
movq 0x8(%rsp), %rax
andl $0xffffff, %eax         # imm = 0xFFFFFF
addq $0x840000, %rax         # imm = 0x840000
leaq 0x5d213(%rip), %rcx     # 0x69cf0
movq %rax, (%rcx,%rbx,8)
movq 0x56da0(%rip), %rbx     # 0x63888
movq (%r12), %rdi
callq 0x13eb6
movq %rbx, (%rax)
movq (%r12), %rdi
callq 0x7856
movq %rax, %rbx
btl $0x19, %r13d
jae 0xcb65
cmpq $0x29, 0x56d31(%rip)    # 0x63840
jg 0xcb5d
movq (%r12), %rax
movq (%rax), %rax
movq %rax, 0x56f11(%rip)     # 0x63a30
pushq $0x1
popq %rdi
callq 0x788a
movq 0x56d12(%rip), %rcx     # 0x63840
leaq 0x5b0bb(%rip), %rdx     # 0x67bf0
movq %rax, (%rdx,%rcx,8)
movq 0x8(%rsp), %rax
shlq $0x17, %rax
sarq $0x17, %rax
btsq $0x2e, %rax
movq %rax, 0x8(%rdx,%rcx,8)
addq $0x2, %rcx
movq %rcx, 0x56ce5(%rip)     # 0x63840
jmp 0xcb65
pushq $0x57
popq %rdi
callq 0x4f2c
movq (%r12), %rax
movzwl 0xe(%rsp), %ecx
shlq $0x30, %rcx
movabsq $0xd00000000003, %rdx   # imm = 0xD00000000003
leaq 0x1(%rdx), %r14
cmpq $0x0, 0x18(%rax)
cmoveq %rdx, %r14
orq %r14, %rcx
btl $0x19, %r13d
movq %rcx, 0x8(%rsp)
jae 0xcbc3
movl %r14d, %eax
andl $0x7, %eax
shll $0x9, %eax
leaq (%rbx,%rax), %r15
addq $0xe9fa00, %r15         # imm = 0xE9FA00
pushq $0x5e
popq %rdi
callq 0x52d1
leaq -0x200000(%rax), %rsi
movq %r15, %rdi
callq 0x50e3
cmpq $0x2, %rbx
jl 0xcbe8
andl $0x7, %r14d
addq %rbx, %r14
negq %r14
movq %r14, %rdi
callq 0x569a
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x381c
movq 0x56e81(%rip), %rax     # 0x63a70
shrq $0x2d, %rax
movq 0x56ca6(%rip), %rcx     # 0x638a0
cmpq $0x1, %rcx
pushq $0x3b
popq %rdi
cmovneq %rcx, %rdi
testb $0x1, %al
cmoveq %rcx, %rdi
callq 0x52d1
movq %rax, %r14
addq $0x100000, %r14         # imm = 0x100000
testq %rbx, %rbx
je 0xcc5e
cmpq $0x1, %rbx
jne 0xcc40
movq 0x8(%rsp), %rdi
shlq $0x17, %rdi
sarq $0x17, %rdi
addq $0xf00000, %rdi         # imm = 0xF00000
callq 0x4fcb
jmp 0xcc5e
movq 0x8(%rsp), %rsi
shlq $0x17, %rsi
sarq $0x17, %rsi
addq $0xfa8000, %rsi         # imm = 0xFA8000
movl $0xf00000, %edi         # imm = 0xF00000
callq 0x50e3
movq %r14, %rdi
callq 0x51c4
movq 0x56ccb(%rip), %rax     # 0x63938
movq %rax, 0x56bb4(%rip)     # 0x63828
cmpq $0x1, 0x56c24(%rip)     # 0x638a0
je 0xcc85
xorl %edi, %edi
callq 0x4fcb
btl $0x19, %r13d
jae 0xcc96
movl $0x8a7801, %edi         # imm = 0x8A7801
callq 0x4fcb
cmpq $0x0, 0x48(%r12)
je 0xccd5
movq 0x5b70b(%rip), %rdi     # 0x683b0
callq 0x4fcb
movl $0xdc8000, %edi         # imm = 0xDC8000
addq 0x48(%r12), %rdi
callq 0x51c4
movq 0x48(%r12), %rsi
leaq 0x56d6b(%rip), %rdi     # 0x63a30
callq 0x381c
pushq $0x2
popq %rdi
pushq $0x31
popq %rsi
callq 0x56f1
cmpq $0x1, 0x56bc3(%rip)     # 0x638a0
jne 0xcd58
cmpq $0x0, 0x56be1(%rip)     # 0x638c8
setne %al
movq 0x56bdf(%rip), %rdi     # 0x638d0
testq %rdi, %rdi
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xcd0d
pushq $0x41
popq %rdi
callq 0x4f2c
movq 0x56bc3(%rip), %rdi     # 0x638d0
testq %rdi, %rdi
je 0xcd58
cmpq $0x64, %rdi
jne 0xcd30
cmpq $0x0, 0x56ba8(%rip)     # 0x638c8
movq $0x4, 0x56ba5(%rip) # 0x638d0
je 0xcd58
pushq $0x4
popq %rdi
shlq $0xa, %rdi
callq 0x569a
leaq 0xea0000(%rax), %rbx
pushq $0x1a
popq %rdi
callq 0x52d1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x50e3
callq 0x51a1
cmpb $0x1, 0x56c1a(%rip)     # 0x63979
jne 0xcd76
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc645
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq