// File: besm6[P]pascal-re/pascompl.cc
// Function: parseRecordDecl::parseRecordDecl(Types*, bool)
parseRecordDecl::parseRecordDecl(TypesPtr rectype, bool isOuterDecl_)
    : isOuterDecl(isOuterDecl_)
{
    bool &cond = parseTypeRef::super.back()->cond;
    TypesPtr &curType = parseTypeRef::super.back()->curType;
    TypesPtr &tempType = parseTypeRef::super.back()->tempType;
    IdentRecPtr &curField = parseTypeRef::super.back()->curField;
    IdentRecPtr &curEnum = parseTypeRef::super.back()->curEnum;
    bool &isPacked = parseTypeRef::super.back()->isPacked;
    parseTypeRef::caserec &cases = parseTypeRef::super.back()->cases;
    Bitset &skipTarget = parseTypeRef::super.back()->skipTarget;

    super.push_back(this);

    int93z = 3;
    inSymbol();
    while (SY == IDENT) {
        l4var6z = NULL;
        do {
            if (SY != IDENT) {
                error(errNoIdent);
            } else {
                if (hashTravPtr != NULL)
                    error(errIdentAlreadyDefined);
                curEnum = new IdentRec;
                addFieldToHash();
                if (l4var6z == NULL) {
                    curField = curEnum;
                } else {
                    l4var6z->list() = curEnum;
                }
                l4var6z = curEnum;
                int93z = 3;
                inSymbol();
            }
            cond = (SY != COMMA);
            if (not cond) {
                int93z = 3;
                inSymbol();
            }
        } while (!cond);
        checkSymAndRead(COLON);
        packFields();
        if (SY == SEMICOLON) {
            int93z = 3;
            inSymbol();
        }
    } /*11752*/
    if (SY == CASESY) {
        int93z = 3;
        inSymbol();
        selType = IntegerType;
/*(identif)*/
        if (SY != IDENT) {
            error(3);
            skip(skipTarget + Bits(OFSY));
        } else { /* 11766 */
            l4var8z = curIdent;
            l4var9z = bucket;
            curEnum = hashTravPtr;
            inSymbol();
            if (SY == COLON) {
                if (curEnum != NULL)
                    error(errIdentAlreadyDefined);
                curEnum = new IdentRec;
                curIdent = l4var8z;
                bucket = l4var9z;
                addFieldToHash();
                inSymbol();
                curField = curEnum;
                packFields();
            } else {
                curEnum = symHashTabBase[l4var9z];
                while (curEnum != NULL) {
                    if (curEnum->id != l4var8z) {
                        curEnum = curEnum->next;
                    } else {
                        if (curEnum->cl != TYPEID) {
                            error(errNotAType);
                            selType = IntegerType;
                        } else {
                            selType = curEnum->typ;
                        }
                        goto exit_identif;
                    }
                }
                error(errNotDefined);
            }
        } exit_identif:; /* 12035 */
        if (selType->k == kindRange)
            selType = selType->cast<RangeT>().base;
        checkSymAndRead(OFSY);
        cases1 = cases;
        cases2 = cases;
        l4typ1z = NULL;
        do {
            l4var3z = NULL;
            do {
                parseLiteral(l4var4z, l4var7z, false);
                if (l4var4z == NULL)
                    error(errNoConstant);
                else if (not typeCheck(l4var4z, selType))
                    error(errConstOfOtherTypeNeeded);
                l4var5z = new CasesT(cases.size, l4var7z, NULL, NULL, NULL);
                if (l4var3z == NULL) {
                    tempType = l4var5z;
                } else {
                    l4var3z->cast<CasesT>().sameAs = l4var5z;
                }
                l4var3z = l4var5z;
                inSymbol();
                cond = (SY != COMMA);
                if (not cond)
                    inSymbol();
            } while (!cond);
            if (l4typ1z == NULL) {
                if (curType->cast<RecordT>().cases == NULL) {
                  curType->cast<RecordT>().cases = &tempType->cast<CasesT>();
                } else {
                    rectype->cast<CasesT>().first = tempType;
                }
            } else {
                l4typ1z->cast<CasesT>().next = tempType;
            }
            l4typ1z = tempType;
            checkSymAndRead(COLON);
            if (SY != LPAREN)
                requiredSymErr(LPAREN);
            parseRecordDecl(tempType, false);
            if ((cases2.size < cases.size) or
                (isPacked and (cases.size = 1) and (cases2.size = 1) and
                 (cases.count = 1) and (cases2.count = 1) and
                 (cases.pairs[1].first < cases2.pairs[1].first))) {
                cases2 = cases;
            } /* 12201 */
            cases = cases1;
            checkSymAndRead(RPAREN);
            cond = SY != SEMICOLON;
            if (not cond)
                inSymbol();
            if (SY == ENDSY)
                cond = true;
        } while (!cond);
        cases = cases2;
    } /* 12232 */
    rectype->size = cases.size;
    if (isPacked and (cases.size == 1) and (cases.count == 1)) {
        rectype->bits = 48 - cases.pairs[1].first;
    }
    /* 12242 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1110, %rsp           # imm = 0x1110
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10a8(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movb %al, (%rdi)
addq $0x50, %rdi
callq 0x21aa0
movq -0x10a8(%rbp), %rdi
addq $0xe0, %rdi
callq 0x21aa0
leaq 0xc65e1(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0x9, %rax
movq %rax, -0x20(%rbp)
leaq 0xc65ca(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0xf0, %rax
movq %rax, -0x28(%rbp)
leaq 0xc65b1(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0xe8, %rax
movq %rax, -0x30(%rbp)
leaq 0xc6598(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0xd0, %rax
movq %rax, -0x38(%rbp)
leaq 0xc657f(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0xc8, %rax
movq %rax, -0x40(%rbp)
leaq 0xc6566(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
leaq 0xc654f(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq (%rax), %rax
addq $0x10, %rax
movq %rax, -0x50(%rbp)
leaq 0xc6538(%rip), %rdi     # 0xd8ab0
callq 0x21970
movq %rax, %rcx
movq -0x10a8(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
leaq 0xc652f(%rip), %rdi     # 0xd8ac8
leaq -0x60(%rbp), %rsi
callq 0x21af0
movq $0x3, 0x6da5b(%rip) # 0x80008
leaq -0x1d0(%rbp), %rdi
callq 0x9790
cmpl $0x0, 0x6d91c(%rip)     # 0x7fedc
jne 0x12744
movq -0x10a8(%rbp), %rax
movq $0x0, 0x30(%rax)
cmpl $0x0, 0x6d900(%rip)     # 0x7fedc
je 0x125ed
movl $0x3, %edi
callq 0x7b40
jmp 0x126cb
cmpq $0x0, 0x6da6b(%rip)     # 0x80060
je 0x12601
movl $0x2, %edi
callq 0x7b40
movl $0x60, %edi
callq 0x1e2e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x10b0(%rbp)
callq 0x21b20
jmp 0x1261f
movq -0x10a8(%rbp), %rdi
movq -0x10b0(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
callq 0x21b40
movq -0x10a8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x1267a
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0x126a2
movq -0x10b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
callq 0x1e330
jmp 0x12e28
movq -0x10a8(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, -0x10b8(%rbp)
movq 0x30(%rax), %rdi
callq 0x1e970
movq -0x10b8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10a8(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x30(%rax)
movq $0x3, 0x6d949(%rip) # 0x80008
leaq -0x350(%rbp), %rdi
callq 0x9790
cmpl $0xe, 0x6d80a(%rip)     # 0x7fedc
setne %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
jne 0x126fe
movq $0x3, 0x6d916(%rip) # 0x80008
leaq -0x4c0(%rbp), %rdi
callq 0x9790
jmp 0x12700
movq -0x20(%rbp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x125d5
movl $0x12, %edi
callq 0xb110
callq 0x11e40
cmpl $0xf, 0x6d7b6(%rip)     # 0x7fedc
jne 0x1273f
movq $0x3, 0x6d8d5(%rip) # 0x80008
leaq -0x630(%rbp), %rdi
callq 0x9790
jmp 0x125b9
cmpl $0x21, 0x6d791(%rip)    # 0x7fedc
jne 0x12dde
movq $0x3, 0x6d8ac(%rip) # 0x80008
leaq -0x7a0(%rbp), %rdi
callq 0x9790
movq -0x10a8(%rbp), %rax
movq 0x6d932(%rip), %rcx     # 0x800a8
movq %rcx, 0x10(%rax)
cmpl $0x0, 0x6d75b(%rip)     # 0x7fedc
je 0x127d4
movl $0x3, %edi
callq 0x7b40
movq -0x58(%rbp), %rax
movq %rax, -0x10c0(%rbp)
movl $0x2a, %edi
callq 0x48e0
movq -0x10c0(%rbp), %rdi
movq %rax, -0x7b0(%rbp)
movq -0x7b0(%rbp), %rsi
callq 0x1db20
movq %rax, -0x7a8(%rbp)
movq -0x7a8(%rbp), %rdi
callq 0xac60
jmp 0x12964
movq -0x10a8(%rbp), %rax
movq 0x6d91e(%rip), %rcx     # 0x80100
movq %rcx, 0x40(%rax)
movq 0x6d78b(%rip), %rcx     # 0x7ff78
movq %rcx, 0x48(%rax)
movq 0x6d868(%rip), %rcx     # 0x80060
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
leaq -0x920(%rbp), %rdi
callq 0x9790
cmpl $0x12, 0x6d6ca(%rip)    # 0x7fedc
jne 0x128c1
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1282c
movl $0x2, %edi
callq 0x7b40
movl $0x60, %edi
callq 0x1e2e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x10c8(%rbp)
callq 0x21b20
jmp 0x1284a
movq -0x10a8(%rbp), %rdi
movq -0x10c8(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq 0x40(%rdi), %rax
movq %rax, 0x6d896(%rip)     # 0x80100
movq 0x48(%rdi), %rax
movq %rax, 0x6d703(%rip)     # 0x7ff78
callq 0x21b40
leaq -0xa90(%rbp), %rdi
callq 0x9790
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
callq 0x11e40
jmp 0x12962
movq -0x10c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
callq 0x1e330
jmp 0x12e28
movq -0x10a8(%rbp), %rax
movq 0x48(%rax), %rcx
leaq 0x72fbd(%rip), %rax     # 0x85890
movq (%rax,%rcx,8), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
je 0x12958
movq -0x10a8(%rbp), %rcx
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq 0x40(%rcx), %rax
je 0x12913
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12956
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
je 0x1293e
movl $0x4, %edi
callq 0x7b40
movq -0x10a8(%rbp), %rax
movq 0x6d770(%rip), %rcx     # 0x800a8
movq %rcx, 0x10(%rax)
jmp 0x12954
movq -0x10a8(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x12966
jmp 0x128de
movl $0xb, %edi
callq 0x7b40
jmp 0x12964
jmp 0x12966
movq -0x10a8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, 0x10(%rax)
jne 0x12999
movq -0x10a8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1ea10
movq %rax, %rcx
movq -0x10a8(%rbp), %rax
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
movl $0x2a, %edi
callq 0xb110
movq -0x10a8(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq $0x50, %rdi
callq 0x21c30
movq -0x10a8(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq $0xe0, %rdi
callq 0x21c30
movq -0x10a8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10a8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10a8(%rbp), %rsi
movq %rsi, %rdi
addq $0x20, %rdi
addq $0x38, %rsi
xorl %edx, %edx
callq 0xad20
movq -0x10a8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x12a22
movl $0x6, %edi
callq 0x7b40
jmp 0x12aaf
movq -0x10a8(%rbp), %rax
movq 0x10(%rax), %rdx
movq 0x20(%rax), %rsi
leaq -0xad8(%rbp), %rdi
movq %rdi, -0x10d8(%rbp)
callq 0xb280
movq -0x10d8(%rbp), %rdi
callq 0x1e950
movb %al, -0x10c9(%rbp)
jmp 0x12a58
movb -0x10c9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x10d9(%rbp)
leaq -0xad8(%rbp), %rdi
callq 0x1e9c0
movb -0x10d9(%rbp), %al
testb $0x1, %al
jne 0x12a7e
jmp 0x12aad
movl $0x7, %edi
callq 0x7b40
jmp 0x12aad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0xad8(%rbp), %rdi
callq 0x1e9c0
jmp 0x12e28
jmp 0x12aaf
movl $0x38, %edi
callq 0x1e2e0
movq %rax, %rdi
movq -0x10a8(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x10e8(%rbp)
movq -0x50(%rbp), %rcx
movq (%rcx), %rsi
movq 0x38(%rax), %rax
movq %rax, -0xae0(%rbp)
movq -0xae0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rcx
movq %r9, %r8
callq 0x21cb0
jmp 0x12af8
movq -0x10a8(%rbp), %rax
movq -0x10e8(%rbp), %rcx
movq %rcx, 0x28(%rax)
cmpq $0x0, 0x18(%rax)
jne 0x12b48
movq -0x10a8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12b6e
movq -0x10e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
callq 0x1e330
jmp 0x12e28
movq -0x10a8(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x10f0(%rbp)
movq 0x18(%rax), %rdi
callq 0x21d20
movq -0x10f0(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x10a8(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x18(%rax)
leaq -0xc50(%rbp), %rdi
callq 0x9790
cmpl $0xe, 0x6d34c(%rip)     # 0x7fedc
setne %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
jne 0x12bb1
leaq -0xdc0(%rbp), %rdi
callq 0x9790
jmp 0x12bb3
movq -0x20(%rbp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x129ec
movq -0x10a8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x12c34
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x1e840
cmpq $0x0, 0x18(%rax)
jne 0x12c10
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x21d20
movq %rax, -0x10f8(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x1e840
movq -0x10f8(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x12c32
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1100(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21d20
movq -0x1100(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x12c5d
movq -0x10a8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, -0x1108(%rbp)
movq 0x8(%rax), %rdi
callq 0x21d20
movq -0x1108(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x10a8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movl $0x12, %edi
callq 0xb110
cmpl $0x7, 0x6d25c(%rip)     # 0x7fedc
je 0x12c8c
movl $0x7, %edi
callq 0x90f0
movq -0x30(%rbp), %rax
movq (%rax), %rsi
leaq -0xf30(%rbp), %rdi
xorl %edx, %edx
callq 0x12480
leaq -0xf30(%rbp), %rdi
callq 0x21d70
movq -0x10a8(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x50(%rbp), %rcx
cmpq (%rcx), %rax
jl 0x12d48
movq -0x48(%rbp), %rax
testb $0x1, (%rax)
je 0x12d5f
movq -0x50(%rbp), %rax
movq $0x1, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x12ce8
jmp 0x12d5f
movq -0x10a8(%rbp), %rax
movq $0x1, 0xe0(%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x12d02
jmp 0x12d5f
movq -0x50(%rbp), %rax
movq $0x1, 0x8(%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x12d16
jmp 0x12d5f
movq -0x10a8(%rbp), %rax
movq $0x1, 0xe8(%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x12d30
jmp 0x12d5f
movq -0x10a8(%rbp), %rcx
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
cmpq 0x100(%rcx), %rax
jge 0x12d5f
movq -0x10a8(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq $0xe0, %rdi
callq 0x21c30
movq -0x10a8(%rbp), %rsi
addq $0x50, %rsi
movq -0x50(%rbp), %rdi
callq 0x21c30
movl $0xc, %edi
callq 0xb110
cmpl $0xf, 0x6d158(%rip)     # 0x7fedc
setne %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
jne 0x12da5
leaq -0x10a0(%rbp), %rdi
callq 0x9790
cmpl $0x27, 0x6d130(%rip)    # 0x7fedc
jne 0x12db5
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
jmp 0x12db7
movq -0x20(%rbp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x129dd
movq -0x10a8(%rbp), %rsi
addq $0xe0, %rsi
movq -0x50(%rbp), %rdi
callq 0x21c30
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
testb $0x1, (%rax)
je 0x12e1f
movq -0x50(%rbp), %rax
cmpq $0x1, (%rax)
jne 0x12e1f
movq -0x50(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jne 0x12e1f
movq -0x50(%rbp), %rax
movl $0x30, %ecx
subq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x1110, %rsp           # imm = 0x1110
popq %rbp
retq
movq -0x1d8(%rbp), %rdi
callq 0x44c0
nopw %cs:(%rax,%rax)