// File: besm6[P]pascal-re/pascompl.cc
// Function: standProc::writeProc()
void writeProc() {
        l4exp9z = NULL;
        l4var13z.ii = true;
        do {
            startReadOrWrite(true);
            if (l4exp7z != l4exp9z) {
                if (not l4var13z.ii) {
                  helperNo = 29;         /* P/PF */
                  P17037();
                } else {
                    checkElementForReadWrite();
                    l4var5z = NULL;
                    l4var4z = NULL;
                    if (SY == COLON)
                        parseWidthSpecifier(l4var4z);
                    if (SY == COLON) {
                        parseWidthSpecifier(l4var5z);
                    if (helperNo != 37)    /* P/WR */
                        error(35); /* errSecondSpecifierForWriteOnlyForReal */
                    } else {
                        if (curToken.ii == litOct) {
                            helperNo = 42; /* P/WO */
                            l4var15z = 17;
                            if (l4typ3z->size != 1)
                                error(34); /* errTypeIsNotAFileElementType */
                            inSymbol();
                        }
                    }
                    l4bool11z = false;
                    if (l4var4z == NULL and
                        BitRange(38,40).has(helperNo)) {  /* WC,A6,A7 */
                        helperNo = helperNo + 5;       /* CW,6A,7A */
                        l4bool11z = true;
                    } else {
                        if (l4var4z == NULL) {
                            curVal.i = l4var15z;
                            (void) formOperator(MKINT);
                        } else {
                            curExpr = l4var4z;
                            (void) formOperator(LOAD);
                        }
                    }
                    if (helperNo == 37) {       /* P/WR */
                        if (l4var5z == NULL) {
                            curVal.i = 4;
                            form1Insn(KXTS+I8 + getFCSToffset());
                        } else {
                            curExpr = l4var5z;
                            (void) formOperator(MKPUSH);
                        }
                    }
                    curExpr = l4exp7z;
                    if (l4bool11z) {
                        if (helperNo == 45)     /* P/7A */
                            l4var18z = gen11;
                        else
                            l4var18z = LOAD;
                    } else {
                        if (helperNo == 40 or       /* P/A7 */
                            helperNo == 81)     /* P/WA */
                            l4var18z = gen12;
                        else
                            l4var18z = MKPUSH;
                    }
                    (void) formOperator(l4var18z);
                    if (Bits(39,40,44,45).has(helperNo) or /* A6,A7,6A,7A */
                        helperNo == 81)
                        form1Insn(KVTM+I10 + l4var15z);
                    else {
                        if (helperNo == 41) /* P/WX */
                            form1Insn(KVTM+I11 + l4typ3z->cast<ScalarT>().start);
                    }
                    callHelperWithArg();
                }
            }
        } while (SY == COMMA);
        if (procNo == 11) {
            helperNo = 46;                 /* P/WL */
            callHelperWithArg();
        }
        regsUsed = regsUsed + Bits(12);
        if (l4var14z.i == moduleOffset)
            error(36); /*errTooFewArguments */
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x340(%rbp)
movq $0x0, 0x40(%rax)
movq $0x1, 0x50(%rax)
movq -0x340(%rbp), %rdi
movl $0x1, %esi
callq 0x29030
movq -0x340(%rbp), %rcx
movq 0x30(%rcx), %rax
cmpq 0x40(%rcx), %rax
je 0x28948
movq -0x340(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x285c7
movq -0x340(%rbp), %rdi
movq $0x1d, 0x70(%rdi)
callq 0x29270
jmp 0x28946
movq -0x340(%rbp), %rdi
callq 0x293e0
movq -0x340(%rbp), %rax
movq $0x0, 0x20(%rax)
movq $0x0, 0x18(%rax)
cmpl $0x12, 0x578eb(%rip)    # 0x7fedc
jne 0x28606
movq -0x340(%rbp), %rdi
movq %rdi, %rsi
addq $0x18, %rsi
callq 0x295e0
cmpl $0x12, 0x578cf(%rip)    # 0x7fedc
jne 0x2863c
movq -0x340(%rbp), %rdi
movq %rdi, %rsi
addq $0x20, %rsi
callq 0x295e0
movq -0x340(%rbp), %rax
cmpq $0x25, 0x70(%rax)
je 0x2863a
movl $0x23, %edi
callq 0x7b40
jmp 0x28685
movq 0x57aa5(%rip), %rax     # 0x800e8
cmpq 0x57aee(%rip), %rax     # 0x80138
jne 0x28683
movq -0x340(%rbp), %rax
movq $0x2a, 0x70(%rax)
movq $0x11, 0x60(%rax)
movq 0x10(%rax), %rax
cmpq $0x1, (%rax)
je 0x28677
movl $0x22, %edi
callq 0x7b40
leaq -0x178(%rbp), %rdi
callq 0x9790
jmp 0x28685
movq -0x340(%rbp), %rcx
movb $0x0, 0x49(%rcx)
xorl %eax, %eax
cmpq $0x0, 0x18(%rcx)
movb %al, -0x341(%rbp)
jne 0x286d5
movl $0x26, %edi
movl $0x28, %esi
callq 0x4a60
movq %rax, %rcx
movq -0x340(%rbp), %rax
movq %rcx, -0x180(%rbp)
movq 0x70(%rax), %rsi
leaq -0x180(%rbp), %rdi
callq 0x1e5f0
movb %al, -0x341(%rbp)
movb -0x341(%rbp), %al
testb $0x1, %al
jne 0x286e1
jmp 0x286fa
movq -0x340(%rbp), %rax
movq 0x70(%rax), %rcx
addq $0x5, %rcx
movq %rcx, 0x70(%rax)
movb $0x1, 0x49(%rax)
jmp 0x2876f
movq -0x340(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x2873e
movq -0x340(%rbp), %rax
movq 0x60(%rax), %rsi
leaq 0x579d6(%rip), %rdi     # 0x800f0
callq 0x4ad0
leaq -0x1e8(%rbp), %rdi
movl $0x9, %esi
callq 0x112d0
leaq -0x1e8(%rbp), %rdi
callq 0x21850
jmp 0x2876d
movq -0x340(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x57a10(%rip)     # 0x80160
leaq -0x250(%rbp), %rdi
movl $0x2, %esi
callq 0x112d0
leaq -0x250(%rbp), %rdi
callq 0x21850
jmp 0x2876f
movq -0x340(%rbp), %rax
cmpq $0x25, 0x70(%rax)
jne 0x287e3
movq -0x340(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x287b2
leaq 0x5795e(%rip), %rdi     # 0x800f0
movl $0x4, %esi
callq 0x4ad0
callq 0x8580
movq %rax, %rdi
addq $0x803000, %rdi         # imm = 0x803000
callq 0x7c20
jmp 0x287e1
movq -0x340(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x5799c(%rip)     # 0x80160
leaq -0x2b8(%rbp), %rdi
movl $0xa, %esi
callq 0x112d0
leaq -0x2b8(%rbp), %rdi
callq 0x21850
jmp 0x287e3
movq -0x340(%rbp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x5796b(%rip)     # 0x80160
testb $0x1, 0x49(%rax)
je 0x28829
movq -0x340(%rbp), %rax
cmpq $0x2d, 0x70(%rax)
jne 0x28819
movq -0x340(%rbp), %rax
movl $0xb, 0x78(%rax)
jmp 0x28827
movq -0x340(%rbp), %rax
movl $0x2, 0x78(%rax)
jmp 0x28865
movq -0x340(%rbp), %rax
cmpq $0x28, 0x70(%rax)
je 0x28845
movq -0x340(%rbp), %rax
cmpq $0x51, 0x70(%rax)
jne 0x28855
movq -0x340(%rbp), %rax
movl $0xc, 0x78(%rax)
jmp 0x28863
movq -0x340(%rbp), %rax
movl $0xa, 0x78(%rax)
jmp 0x28865
movq -0x340(%rbp), %rax
movl 0x78(%rax), %esi
leaq -0x320(%rbp), %rdi
callq 0x112d0
leaq -0x320(%rbp), %rdi
callq 0x21850
movl $0x27, %edi
movl $0x28, %esi
movl $0x2c, %edx
movl $0x2d, %ecx
callq 0x4a00
movq %rax, %rcx
movq -0x340(%rbp), %rax
movq %rcx, -0x328(%rbp)
movq 0x70(%rax), %rsi
leaq -0x328(%rbp), %rdi
callq 0x1e5f0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x342(%rbp)
jne 0x288e5
movq -0x340(%rbp), %rax
cmpq $0x51, 0x70(%rax)
sete %al
movb %al, -0x342(%rbp)
movb -0x342(%rbp), %al
testb $0x1, %al
jne 0x288f1
jmp 0x2890a
movq -0x340(%rbp), %rax
movq 0x60(%rax), %rdi
addq $0xaa0000, %rdi         # imm = 0xAA0000
callq 0x7c20
jmp 0x2893a
movq -0x340(%rbp), %rax
cmpq $0x29, 0x70(%rax)
jne 0x28938
movq -0x340(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1ea60
movq 0x28(%rax), %rdi
addq $0xba0000, %rdi         # imm = 0xBA0000
callq 0x7c20
jmp 0x2893a
movq -0x340(%rbp), %rdi
callq 0x29660
jmp 0x28948
jmp 0x2894a
cmpl $0xe, 0x5758b(%rip)     # 0x7fedc
je 0x2857a
movq -0x340(%rbp), %rax
cmpq $0xb, 0x68(%rax)
jne 0x28979
movq -0x340(%rbp), %rdi
movq $0x2e, 0x70(%rdi)
callq 0x29660
movl $0xc, %edi
callq 0x48e0
movq %rax, -0x338(%rbp)
movq -0x338(%rbp), %rsi
leaq 0x57778(%rip), %rdi     # 0x80110
callq 0x1db20
movq -0x340(%rbp), %rdi
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rax
movq %rax, 0x57757(%rip)     # 0x80110
addq $0x58, %rdi
callq 0x1dfb0
cmpq 0x5757f(%rip), %rax     # 0x7ff48
jne 0x289d5
movl $0x24, %edi
callq 0x7b40
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nop