// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1048, %rsp           # imm = 0x1048
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movb %dl, (%rdi)
leaq 0x50(%rdi), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movups %xmm0, 0x90(%rdi)
movups %xmm0, 0xa0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xd0(%rdi)
leaq 0xe0(%rdi), %rax
movq %rax, 0x10(%rsp)
movups %xmm0, 0xf0(%rdi)
movups %xmm0, 0x100(%rdi)
movups %xmm0, 0x110(%rdi)
movups %xmm0, 0x120(%rdi)
movups %xmm0, 0x130(%rdi)
movups %xmm0, 0x140(%rdi)
movups %xmm0, 0x150(%rdi)
movups %xmm0, 0x160(%rdi)
movq 0xb0dac(%rip), %rax     # 0xbc3f8
movq -0x8(%rax), %r13
leaq 0xe8(%r13), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%r13), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rsi
movq %rdi, (%rsi)
leaq 0xb0d94(%rip), %rdi     # 0xbc408
callq 0x182b8
movq $0x3, 0x582c4(%rip) # 0x63948
leaq 0xed8(%rsp), %rdi
callq 0x6316
movl 0x58185(%rip), %eax     # 0x6381c
leaq 0xd68(%rsp), %r15
leaq 0xbf8(%rsp), %rbp
pushq $0x3
popq %r12
testl %eax, %eax
jne 0xb7a9
andq $0x0, 0x30(%r14)
xorl %eax, %eax
testl %eax, %eax
je 0xb6c8
movq %r12, %rdi
callq 0x4f2c
jmp 0xb737
cmpq $0x0, 0x582d0(%rip)     # 0x639a0
je 0xb6da
pushq $0x2
popq %rdi
callq 0x4f2c
pushq $0x60
popq %rdi
callq 0x390b
movl $0x6, 0x20(%rax)
movq %rax, 0xc8(%r13)
movq %r14, %rdi
callq 0x146c6
movq 0x30(%r14), %rdi
movq 0xc8(%r13), %rbx
testq %rdi, %rdi
je 0xb719
callq 0x12d6e
movq %rbx, (%rax)
movq 0xc8(%r13), %rbx
jmp 0xb720
movq %rbx, 0xd0(%r13)
movq %rbx, 0x30(%r14)
movq $0x3, 0x58219(%rip) # 0x63948
movq %r15, %rdi
callq 0x6316
cmpl $0xe, 0x580de(%rip)     # 0x6381c
setne 0x9(%r13)
jne 0xb76a
movq $0x3, 0x581f8(%rip) # 0x63948
movq %rbp, %rdi
callq 0x6316
testb $0x1, 0x9(%r13)
jne 0xb76a
movl 0x580b7(%rip), %eax     # 0x6381c
jmp 0xb6ba
pushq $0x12
popq %rdi
callq 0x7429
callq 0xb206
movl 0x5809f(%rip), %eax     # 0x6381c
cmpl $0xf, %eax
jne 0xb6ab
movq $0x3, 0x581b7(%rip) # 0x63948
leaq 0xa88(%rsp), %rdi
callq 0x6316
movl 0x58078(%rip), %eax     # 0x6381c
jmp 0xb6ab
cmpl $0x21, %eax
jne 0xbb77
movq $0x3, 0x5818b(%rip) # 0x63948
leaq 0x918(%rsp), %rdi
callq 0x6316
movq 0x58217(%rip), %rax     # 0x639e8
movq %rax, 0x10(%r14)
cmpl $0x0, 0x58040(%rip)     # 0x6381c
je 0xb807
pushq $0x3
popq %rdi
callq 0x4f2c
movabsq $0xffffffffffdf, %rdi   # imm = 0xFFFFFFFFFFDF
andq (%r13), %rdi
orq $0x20, %rdi
callq 0x7165
movq 0x18(%rsp), %rbx
jmp 0xb904
movq 0x58232(%rip), %rax     # 0x63a40
movq %rax, 0x40(%r14)
movq 0x5809f(%rip), %rax     # 0x638b8
movq %rax, 0x48(%r14)
movq 0x5817c(%rip), %rax     # 0x639a0
movq %rax, 0xc8(%r13)
leaq 0x7a8(%rsp), %rdi
callq 0x6316
cmpl $0x12, 0x57fdd(%rip)    # 0x6381c
movq 0x18(%rsp), %rbx
jne 0xb8ae
cmpq $0x0, 0xc8(%r13)
je 0xb858
pushq $0x2
popq %rdi
callq 0x4f2c
pushq $0x60
popq %rdi
callq 0x390b
movl $0x6, 0x20(%rax)
movq %rax, 0xc8(%r13)
movq 0x40(%r14), %rax
movq %rax, 0x581c7(%rip)     # 0x63a40
movq 0x48(%r14), %rax
movq %rax, 0x58034(%rip)     # 0x638b8
movq %r14, %rdi
callq 0x146c6
leaq 0x638(%rsp), %rdi
callq 0x6316
movq 0xc8(%r13), %rax
movq %rax, 0xd0(%r13)
callq 0xb206
jmp 0xb904
movq 0x40(%r14), %rcx
movq 0x48(%r14), %rax
leaq 0x5d913(%rip), %rdx     # 0x691d0
leaq (%rdx,%rax,8), %rax
movq (%rax), %rax
movq %rax, 0xc8(%r13)
testq %rax, %rax
je 0xb8db
cmpq %rcx, (%rax)
je 0xb8e5
addq $0x10, %rax
jmp 0xb8c1
pushq $0xb
popq %rdi
callq 0x4f2c
jmp 0xb904
cmpl $0x0, 0x20(%rax)
je 0xb8fc
pushq $0x4
popq %rdi
callq 0x4f2c
movq 0x580ee(%rip), %rax     # 0x639e8
jmp 0xb900
movq 0x18(%rax), %rax
movq %rax, 0x10(%r14)
movq 0x10(%r14), %rdi
cmpl $0x2, 0x10(%rdi)
jne 0xb91b
callq 0x12d9c
movq 0x18(%rax), %rax
movq %rax, 0x10(%r14)
pushq $0x2a
popq %rdi
callq 0x7429
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1474c
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1474c
andq $0x0, 0x8(%r14)
leaq 0x20(%r14), %rbp
leaq 0x38(%r14), %rbx
pushq $0x6
popq %r12
andq $0x0, 0x18(%r14)
movq %rbp, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x71f0
movq (%rbp), %rsi
movq %r12, %rdi
testq %rsi, %rsi
je 0xb98c
movq 0x10(%r14), %rdx
leaq 0x30(%rsp), %rdi
callq 0x74d4
addq $-0x8, 0xb0a26(%rip)    # 0xbc3a8
cmpb $0x0, 0x30(%rsp)
pushq $0x7
popq %rdi
jne 0xb991
callq 0x4f2c
pushq $0x38
popq %rdi
callq 0x390b
movq %rax, %r15
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x38(%r14), %rcx
movq %rax, (%r15)
movq $0x30, 0x8(%r15)
movl $0x8, 0x10(%r15)
movq %rcx, 0x18(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r15)
andq $0x0, 0x30(%r15)
movq %r15, 0x28(%r14)
movq 0x18(%r14), %rdi
movq 0x8(%rsp), %rax
testq %rdi, %rdi
je 0xb9e7
callq 0x14770
addq $0x30, %rax
movq %r15, (%rax)
movq 0x28(%r14), %rax
movq %rax, 0x18(%r14)
leaq 0x4c8(%rsp), %rdi
callq 0x6316
cmpl $0xe, 0x57e16(%rip)     # 0x6381c
setne 0x9(%r13)
jne 0xba25
leaq 0x358(%rsp), %rdi
callq 0x6316
testb $0x1, 0x9(%r13)
je 0xb953
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xba42
movq 0x8(%rsp), %r12
movq (%r12), %r15
callq 0x14770
movq %r15, 0x28(%rax)
jmp 0xba8c
movq 0xf0(%r13), %rdi
callq 0x12d3e
cmpq $0x0, 0x18(%rax)
movq 0xe8(%r13), %r15
je 0xba6c
movq 0x20(%rsp), %rdi
callq 0x14770
movq %r15, 0x20(%rax)
jmp 0xba87
movq %r15, %rdi
callq 0x14770
movq %rax, %r15
movq 0xf0(%r13), %rdi
callq 0x12d3e
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %r12
movq (%r12), %rax
movq %rax, 0x8(%r14)
pushq $0x12
popq %rdi
callq 0x7429
cmpl $0x7, 0x57d79(%rip)     # 0x6381c
movq 0x18(%rsp), %r15
je 0xbab2
pushq $0x7
popq %rdi
callq 0x5c72
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x1e8(%rsp), %rdi
xorl %edx, %edx
callq 0xb5a8
addq $-0x8, 0xb093f(%rip)    # 0xbc410
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq (%r15), %rax
pushq $0x6
popq %r12
jge 0xbaf1
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x1474c
jmp 0xbb1e
cmpb $0x1, 0x8(%r13)
jne 0xbb1e
pushq $0x1
popq %rax
movq %rax, 0x10(%r13)
movq %rax, 0xe0(%r14)
movq %rax, 0x18(%r13)
movq %rax, 0xe8(%r14)
movq 0x30(%r13), %rax
cmpq 0x100(%r14), %rax
jl 0xbae2
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0x1474c
pushq $0xc
popq %rdi
callq 0x7429
movl 0x57ce3(%rip), %eax     # 0x6381c
cmpl $0xf, %eax
setne 0x9(%r13)
jne 0xbb53
leaq 0x78(%rsp), %rdi
callq 0x6316
movl 0x57cc9(%rip), %eax     # 0x6381c
cmpl $0x27, %eax
je 0xbb65
testb $0x1, 0x9(%r13)
je 0xb94e
jmp 0xbb6a
movb $0x1, 0x9(%r13)
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x1474c
movq 0x10(%r13), %rax
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
cmpq $0x1, %rax
sete %al
andb 0x8(%r13), %al
cmpb $0x1, %al
jne 0xbba9
cmpq $0x1, 0x18(%r13)
jne 0xbba9
pushq $0x30
popq %rax
subq 0x30(%r13), %rax
movq 0x20(%rsp), %rcx
movq %rax, 0x8(%rcx)
addq $0x1048, %rsp           # imm = 0x1048
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop