// File: besm6[P]pascal-re/pascompl.cc
// Function: parseCallArgs(IdentRec*)
void parseCallArgs(IdentRecPtr l4arg1z)
{
    bool l4var1z;
    ExprPtr l4exp2z, l4exp3z, l4exp4z;
    IdentRecPtr l4idr5z = NULL;
    Operator l4op6z;
    IdClass l4idc7z;

    if (l4arg1z->typ != NULL)
        set146z = set146z - l4arg1z->flags();
    l4var1z = (l4arg1z->list() == NULL) and not (l4arg1z->flags().has(24));
    l4exp3z = new Expr;
    l4exp4z = l4exp3z;
    bool48z = true;
    l4exp3z->typ = l4arg1z->typ;
    l4exp3z->op = ALNUM;
    l4exp3z->id2 = l4arg1z;
    l4exp3z->id1 = NULL;
    if (SY == LPAREN) {
        if (l4var1z) {
            l4idr5z = l4arg1z->argList();
            if (l4idr5z == NULL) {
                error(errTooManyArguments);
                throw 8888;
            }
        }
        do {
            if (l4var1z and l4arg1z == l4idr5z) {
                error(errTooManyArguments);
                throw 8888;
            }
            parsingParam = true;
            expression();
            l4op6z = curExpr->op;
            /* (a) */
            if (l4var1z) {
                l4idc7z = l4idr5z->cl;
                if (l4op6z == PCALL) {
                    if (l4idc7z != ROUTINEID or
                        l4idr5z->typ != NULL) {
L13736:
                        error(39); /*errIncompatibleArgumentKinds*/
                        goto exit_a;
                    }
                } else { /* 13741 */
                    if (l4op6z == FCALL) {
                        if (l4idc7z == ROUTINEID) {
                            if (l4idr5z->typ == NULL)
                                goto L13736;
                        } else if (curExpr->id2->argList() == NULL and
                                   l4idc7z == VARID) {
                            curExpr->op = ALNUM;
                            curExpr->expr1 = NULL;
                        } else
                            goto L13736;
                    } else if (lvalOpSet.has(l4op6z)) {
                        if (l4idc7z != VARID and
                            l4idc7z != FORMALID)
                            goto L13736;
                    } else {
                        if (l4idc7z != VARID)
                            goto L13736;
                    }
                }
                arg1Type = curExpr->typ;
                if (arg1Type != NULL) {
                    if (not typeCheck(arg1Type, l4idr5z->typ))
                        error(40); /*errIncompatibleArgumentTypes*/
                }
            } exit_a:; /* 14006 */
            l4exp2z = new Expr;
            l4exp2z->typ = NULL;
            l4exp2z->expr1 = NULL;
            l4exp2z->expr2 = curExpr;
            l4exp4z->expr1 = l4exp2z;
            l4exp4z = l4exp2z;
            if (l4var1z)
                l4idr5z = l4idr5z->list();
        } while (SY == COMMA);
        if (SY != RPAREN or
            (l4var1z and l4idr5z != l4arg1z))
            error(errNoCommaOrParenOrTooFewArgs);
        else
            inSymbol();
    } else { /* 14035 */
        if (l4var1z and l4arg1z->argList() != NULL)
            error(42); /*errNoArgList*/
    }
    curExpr = l4exp3z;
    /* 14042 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x15321
movq -0x8(%rbp), %rdi
callq 0x20960
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq 0x6ae0b(%rip), %rdi     # 0x80118
callq 0x1e4e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, 0x6adf7(%rip)     # 0x80118
movq -0x8(%rbp), %rdi
callq 0x1e970
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x211(%rbp)
jne 0x15359
movq -0x8(%rbp), %rdi
callq 0x20960
movq %rax, %rdi
movl $0x18, %esi
callq 0x1e5f0
xorb $-0x1, %al
movb %al, -0x211(%rbp)
movb -0x211(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movl $0x20, %edi
callq 0x1e2e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x1, 0x6ab38(%rip)     # 0x7feb9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl $0x25, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpl $0x7, 0x6ab22(%rip)     # 0x7fedc
jne 0x1568c
testb $0x1, -0x9(%rbp)
je 0x1540c
movq -0x8(%rbp), %rdi
callq 0x1ec30
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1540a
movl $0x26, %edi
callq 0x7b40
movl $0x4, %edi
callq 0x4130
movq %rax, %rdi
movl $0x22b8, (%rdi)         # imm = 0x22B8
movq 0x29b7f(%rip), %rsi     # 0x3ef80
xorl %eax, %eax
movl %eax, %edx
callq 0x44b0
jmp 0x1540c
jmp 0x1540e
testb $0x1, -0x9(%rbp)
je 0x1544b
movq -0x8(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x1544b
movl $0x26, %edi
callq 0x7b40
movl $0x4, %edi
callq 0x4130
movq %rax, %rdi
movl $0x22b8, (%rdi)         # imm = 0x22B8
movq 0x29b3e(%rip), %rsi     # 0x3ef80
xorl %eax, %eax
movl %eax, %edx
callq 0x44b0
movb $0x1, 0x6aa66(%rip)     # 0x7feb8
callq 0x14e90
movq 0x6ad02(%rip), %rax     # 0x80160
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
testb $0x1, -0x9(%rbp)
je 0x155ea
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x38(%rbp)
cmpl $0x26, -0x34(%rbp)
jne 0x154a5
cmpl $0x2, -0x38(%rbp)
jne 0x1548f
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x154a0
jmp 0x15491
movl $0x27, %edi
callq 0x7b40
jmp 0x155ec
jmp 0x1553c
cmpl $0x27, -0x34(%rbp)
jne 0x15501
cmpl $0x2, -0x38(%rbp)
jne 0x154c0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x154be
jmp 0x15491
jmp 0x154ff
movq 0x6ac99(%rip), %rax     # 0x80160
movq 0x18(%rax), %rdi
callq 0x1ec30
cmpq $0x0, (%rax)
jne 0x154fb
cmpl $0x3, -0x38(%rbp)
jne 0x154fb
movq 0x6ac7d(%rip), %rax     # 0x80160
movl $0x25, 0x8(%rax)
movq 0x6ac6f(%rip), %rax     # 0x80160
movq $0x0, 0x10(%rax)
jmp 0x154fd
jmp 0x15491
jmp 0x154ff
jmp 0x1553a
movl -0x34(%rbp), %eax
movl %eax, %esi
leaq 0x6a9a3(%rip), %rdi     # 0x7feb0
callq 0x1e5f0
testb $0x1, %al
jne 0x15518
jmp 0x1552b
cmpl $0x3, -0x38(%rbp)
je 0x15529
cmpl $0x4, -0x38(%rbp)
je 0x15529
jmp 0x15491
jmp 0x15538
cmpl $0x3, -0x38(%rbp)
je 0x15536
jmp 0x15491
jmp 0x15538
jmp 0x1553a
jmp 0x1553c
movq 0x6ac1d(%rip), %rax     # 0x80160
movq (%rax), %rax
movq %rax, 0x6ab7b(%rip)     # 0x800c8
cmpq $0x0, 0x6ab73(%rip)     # 0x800c8
je 0x155e8
movq 0x6ab66(%rip), %rsi     # 0x800c8
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0x90(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0xb280
movq -0x220(%rbp), %rdi
callq 0x1e950
movb %al, -0x212(%rbp)
jmp 0x15591
movb -0x212(%rbp), %al
xorb $-0x1, %al
movb %al, -0x221(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x1e9c0
movb -0x221(%rbp), %al
testb $0x1, %al
jne 0x155b7
jmp 0x155e6
movl $0x28, %edi
callq 0x7b40
jmp 0x155e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x1e9c0
jmp 0x156c1
jmp 0x155e8
jmp 0x155ea
jmp 0x155ec
movl $0x20, %edi
callq 0x1e2e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq 0x6ab48(%rip), %rcx     # 0x80160
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, -0x9(%rbp)
je 0x1564a
movq -0x30(%rbp), %rdi
callq 0x1e970
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x1564c
cmpl $0xe, 0x6a889(%rip)     # 0x7fedc
je 0x1540e
cmpl $0xc, 0x6a87c(%rip)     # 0x7fedc
jne 0x15672
testb $0x1, -0x9(%rbp)
je 0x1567e
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x1567e
movl $0x29, %edi
callq 0x7b40
jmp 0x1568a
leaq -0x210(%rbp), %rdi
callq 0x9790
jmp 0x156ad
testb $0x1, -0x9(%rbp)
je 0x156ab
movq -0x8(%rbp), %rdi
callq 0x1ec30
cmpq $0x0, (%rax)
je 0x156ab
movl $0x2a, %edi
callq 0x7b40
jmp 0x156ad
movq -0x20(%rbp), %rax
movq %rax, 0x6aaa8(%rip)     # 0x80160
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x44c0
nopl (%rax)