// File: /workspace/github_cpp_makefile_star2_O1/besm6[P]pascal-re/pascompl.cc
// Function: prepLoad()
void prepLoad()
{
    int64_t helper, l4int2z, l4int3z;
    TypesPtr l4typ4z;
    Kind l4var5z;
    state l4st6z;
    bool l4bool7z, l4bool8z, l4bool9z;

    l4typ4z = insnList->typ;
    switch (insnList->ilm) {
        case ilCONST: {
            curVal = insnList->ilf5;
            if (l4typ4z->size == 1)
              curVal.i = getFCSToffset();
            addToInsnList(constRegTemplate + curInsnTemplate + curVal.i);
        } break;
        case il1: {
            helper = insnList->ilf7;
            l4int2z = insnList->ilf5.i;
            l4int3z = insnList->ilf6;
            if (15 < helper) {
                /* empty */
            } else {
                if (helper == 15) { /* P/CP */
                    addToInsnList(macro + mcACC2ADDR);
                } else {
                    helper = indexreg[insnList->ilf7];
                    if ((l4int2z == 0) and (insnList->st == st0)) {
                        addInsnAndOffset(helper + curInsnTemplate,
                                         l4int3z);
                        goto L4602;
                    } else {
                        addToInsnList(helper + InsnTemp[UTC]);
                    }
                }
            }
            l4st6z = insnList->st;
            if (l4st6z == st0) {
                addInsnAndOffset(l4int2z + curInsnTemplate, l4int3z);
            } else {
                l4var5z = l4typ4z->k;
                if (l4var5z < kindSet or
                    (l4var5z == kindRecord and optSflags.m.has(S6))) {
                    l4bool7z = true;
                    l4bool8z = typeCheck(l4typ4z, IntegerType);
                } else {
                    l4bool7z = false;
                    l4bool8z = false;
                }
                if (l4st6z == st1) {
                    if ((l4int3z != l4int2z) or
                        (helper != 18) or /* P/RC */
                        (l4int2z != 0))
                        addInsnAndOffset(l4int2z + InsnTemp[XTA],
                                         l4int3z);
                    l4int3z = insnList->shift;
                    l4int2z = insnList->width;
                    l4bool9z = true;
                    helper = l4int3z + l4int2z;
                    if (l4bool7z) {
                        if (30 < l4int3z) {
                            addToInsnList(ASN64-48 + l4int3z);
                            addToInsnList(InsnTemp[YTA]);
                            if (helper == 48) /* P/RDR */
                                l4bool9z = false;
                        } else {
                            if (l4int3z != 0)
                                addToInsnList(ASN64 + l4int3z);
                        }; /* 4477 */
                        if (l4bool9z) {
                            curVal.m = BitRange(48 - l4int2z, 47);
                            addToInsnList(KAAX+I8 + getFCSToffset());
                        }
                    } else { /* 4511 */
                        if (helper != 48)
                            addToInsnList(ASN64-48 + helper);
                        curVal.m = BitRange(0, l4int2z-1);
                        addToInsnList(KAAX+I8 + getFCSToffset());
                    }; /* 4525 */
                    if (l4bool8z)
                        addToInsnList(KAEX+ZERO);
                } else { /* 4531 */
                    if (l4bool7z)
                        helper = l4bool8z+74; /* P/LDAR[IN] */
                    else
                        helper = 56; /* P/RR */
                    addToInsnList(getHelperProc(helper));
                    insnList->next->mode = 1;
                }
            }
            goto L4545;
        } break;
        case il2: {
L4545:      if (bool49z and (l4typ4z == BooleanType) and
                insnList->regsused.has(16))
                addToInsnList(KAEX+E1);
        } break;
        case il3: { /* 4555 */
            if (bool49z)
                addInsnAndOffset(macro+20,
                                 insnList->regsused.has(16)*010000 + insnList->ilf5.i);
        } break;
    } /* case */
L4602:
    insnList->ilm = il2;
    insnList->regsused = insnList->regsused + Bits(0L);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x5c11a(%rip), %rax     # 0x64ab8
movl 0x20(%rax), %ecx
cmpq $0x3, %rcx
ja 0x8c9f
movq 0x10(%rax), %rbx
leaq 0x13ade(%rip), %rdx     # 0x1c494
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x28(%rax), %rax
movq %rax, 0x5c076(%rip)     # 0x64a40
cmpq $0x1, (%rbx)
jne 0x89e4
callq 0x5f9d
leaq 0x5c064(%rip), %rdi     # 0x64a40
movq %rax, %rsi
callq 0x3bf2
movq 0x5be85(%rip), %rax     # 0x64870
addq 0x1b89e(%rip), %rax     # 0x24290
movq 0x5c047(%rip), %rdi     # 0x64a40
shlq $0x17, %rdi
sarq $0x17, %rdi
addq %rax, %rdi
jmp 0x8c9a
movq 0x38(%rax), %r15
movq 0x28(%rax), %r14
movq 0x30(%rax), %r13
shlq $0x17, %r14
cmpq $0xf, %r15
jg 0x8a9c
jne 0x8a73
movl $0xf, %r15d
movl $0x1000006, %edi        # imm = 0x1000006
jmp 0x8a97
cmpb $0x1, 0x5bdd5(%rip)     # 0x6480a
jne 0x8c9f
movl 0x18(%rax), %ecx
shrl $0x13, %ecx
andl $0x1000, %ecx           # imm = 0x1000
movq 0x28(%rax), %rbx
shlq $0x17, %rbx
sarq $0x17, %rbx
addq %rcx, %rbx
movl $0x1000014, %edi        # imm = 0x1000014
callq 0x88e5
movq 0x5c051(%rip), %rax     # 0x64ab8
movq (%rax), %rax
movq %rbx, 0x18(%rax)
jmp 0x8c9f
leaq 0x60406(%rip), %rcx     # 0x68e80
movq (%rcx,%r15,8), %r15
testq %r14, %r14
jne 0x8a8d
cmpl $0x0, 0x40(%rax)
je 0x8cd7
movq 0x60a24(%rip), %rdi     # 0x694b8
addq %r15, %rdi
callq 0x88e5
sarq $0x17, %r14
movq 0x5c011(%rip), %rax     # 0x64ab8
movl 0x40(%rax), %ebp
testl %ebp, %ebp
je 0x8adc
movl 0x10(%rbx), %eax
cmpl $0x4, %eax
jge 0x8afe
movq 0x5bf3b(%rip), %rdx     # 0x649f8
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x83b2
movb (%r12), %al
addq $-0x8, 0xb48e1(%rip)    # 0xbd3b8
movb $0x1, %r12b
jmp 0x8b11
addq 0x5bd8d(%rip), %r14     # 0x64870
movq %r14, %rdi
callq 0x88e5
movq 0x5bfc6(%rip), %rax     # 0x64ab8
movq (%rax), %rax
movq %r13, 0x18(%rax)
jmp 0x8c76
cmpl $0x6, %eax
jne 0x8b0c
testb $0x10, 0x5bf7b(%rip)    # 0x64a85
jne 0x8ab6
xorl %eax, %eax
xorl %r12d, %r12d
cmpl $0x1, %ebp
jne 0x8b8d
movl %eax, %ebp
xorq $0x12, %r15
movq %r14, %rax
orq %r13, %rax
orq %r15, %rax
je 0x8b44
addq 0x60892(%rip), %r14     # 0x693c0
movq %r14, %rdi
callq 0x88e5
movq 0x5bf7b(%rip), %rax     # 0x64ab8
movq (%rax), %rax
movq %r13, 0x18(%rax)
movq 0x5bf6d(%rip), %rax     # 0x64ab8
movq 0x48(%rax), %r14
movq 0x50(%rax), %rdi
leaq (%r14,%rdi), %r15
testb %r12b, %r12b
je 0x8bc4
cmpq $0x1f, %rdi
jl 0x8c0f
addq $0x1e010, %rdi          # imm = 0x1E010
callq 0x88e5
movq 0x608cf(%rip), %rdi     # 0x69448
callq 0x88e5
cmpq $0x30, %r15
jne 0x8c20
jmp 0x8c67
movzbl %al, %eax
orq $0x4a, %rax
testb %r12b, %r12b
movl $0x38, %edi
cmovneq %rax, %rdi
callq 0x5cbc
movq %rax, %rdi
callq 0x88e5
movq 0x5bf04(%rip), %rax     # 0x64ab8
movq (%rax), %rax
movq $0x1, 0x8(%rax)
jmp 0x8c76
cmpq $0x30, %r15
je 0x8bd9
addq $0x1e010, %r15          # imm = 0x1E010
movq %r15, %rdi
callq 0x88e5
testq %r14, %r14
jle 0x8c4d
movl $0x2f, %ecx
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
xorl %eax, %eax
movl $0x1, %esi
shlq %cl, %rsi
andq %rdx, %rsi
orq %rsi, %rax
leaq (%r14,%rcx), %rsi
decq %rsi
decq %rcx
cmpq $0x2f, %rsi
jne 0x8bef
jmp 0x8c4f
testq %rdi, %rdi
je 0x8c20
addq $0x1e040, %rdi          # imm = 0x1E040
callq 0x88e5
testq %r14, %r14
jle 0x8c4d
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
decq %r14
xorl %eax, %eax
movl $0x1, %esi
movl %r14d, %ecx
shlq %cl, %rsi
andq %rdx, %rsi
orq %rsi, %rax
addq $-0x1, %r14
jb 0x8c34
jmp 0x8c4f
xorl %eax, %eax
movq %rax, 0x5bdea(%rip)     # 0x64a40
callq 0x5f9d
leaq 0x809000(%rax), %rdi
callq 0x88e5
testb %bpl, %bpl
je 0x8c76
movl $0x10a009, %edi         # imm = 0x10A009
callq 0x88e5
cmpb $0x1, 0x5bb8d(%rip)     # 0x6480a
jne 0x8c9f
cmpq 0x5bd62(%rip), %rbx     # 0x649e8
jne 0x8c9f
movq 0x5be29(%rip), %rax     # 0x64ab8
testb $-0x80, 0x1b(%rax)
je 0x8c9f
movl $0x10a008, %edi         # imm = 0x10A008
callq 0x88e5
movq 0x5be12(%rip), %rax     # 0x64ab8
movl $0x2, 0x20(%rax)
movabsq $0x7fffffffffff, %rcx   # imm = 0x7FFFFFFFFFFF
movq 0x18(%rax), %rdx
andq %rcx, %rdx
addq %rdx, %rcx
incq %rcx
movq %rcx, 0x18(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq 0x5bb92(%rip), %r15     # 0x64870
movq %r15, %rdi
callq 0x88e5
movq 0x5bdcb(%rip), %rax     # 0x64ab8
movq (%rax), %rax
movq %r13, 0x18(%rax)
jmp 0x8c9f