// File: /workspace/github_cpp_makefile_star2_O2/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 0x5c0a6(%rip), %rax     # 0x63aa8
movl 0x20(%rax), %ecx
cmpq $0x3, %rcx
ja 0x7c83
movq 0x10(%rax), %rbx
leaq 0x11a7a(%rip), %rdx     # 0x19494
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x28(%rax), %rdi
movq %rdi, 0x5c002(%rip)     # 0x63a30
cmpq $0x1, (%rbx)
jne 0x7a4f
callq 0x554f
leaq 0x5bff0(%rip), %rdi     # 0x63a30
movq %rax, %rsi
callq 0x381c
movq 0x5bfe1(%rip), %rdi     # 0x63a30
movq 0x5be0a(%rip), %rax     # 0x63860
addq 0x1b823(%rip), %rax     # 0x23280
shlq $0x17, %rdi
sarq $0x17, %rdi
addq %rax, %rdi
jmp 0x7c7e
movq 0x38(%rax), %r12
movq 0x28(%rax), %r15
movq 0x30(%rax), %r14
shlq $0x17, %r15
cmpq $0xf, %r12
jg 0x7af0
jne 0x7ac7
pushq $0xf
popq %r12
movl $0x1000006, %edi        # imm = 0x1000006
jmp 0x7aeb
cmpb $0x1, 0x5bd63(%rip)     # 0x637fa
jne 0x7c83
movl 0x18(%rax), %ecx
shrl $0x13, %ecx
andl $0x1000, %ecx           # imm = 0x1000
movq 0x28(%rax), %rsi
shlq $0x17, %rsi
sarq $0x17, %rsi
addq %rcx, %rsi
movl $0x1000014, %edi        # imm = 0x1000014
callq 0x798d
jmp 0x7c83
leaq 0x603a2(%rip), %rcx     # 0x67e70
movq (%rcx,%r12,8), %r12
testq %r15, %r15
jne 0x7ae1
cmpl $0x0, 0x40(%rax)
je 0x7cbb
movq 0x609c0(%rip), %rdi     # 0x684a8
addq %r12, %rdi
callq 0x794e
sarq $0x17, %r15
movq 0x5bfad(%rip), %rax     # 0x63aa8
movl 0x40(%rax), %ebp
testl %ebp, %ebp
je 0x7b30
movl 0x10(%rbx), %eax
cmpl $0x4, %eax
jge 0x7b47
movq 0x5bed7(%rip), %rdx     # 0x639e8
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x74d4
movb (%r13), %al
addq $-0x8, 0xb487d(%rip)    # 0xbc3a8
movb $0x1, %r13b
jmp 0x7b5a
addq 0x5bd29(%rip), %r15     # 0x63860
movq %r15, %rdi
movq %r14, %rsi
callq 0x798d
jmp 0x7c5a
cmpl $0x6, %eax
jne 0x7b55
testb $0x10, 0x5bf22(%rip)    # 0x63a75
jne 0x7b0a
xorl %eax, %eax
xorl %r13d, %r13d
cmpl $0x1, %ebp
jne 0x7bc3
movl %eax, %ebp
xorq $0x12, %r12
movq %r15, %rax
orq %r14, %rax
orq %r12, %rax
je 0x7b82
addq 0x60839(%rip), %r15     # 0x683b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x798d
movq 0x5bf1f(%rip), %rax     # 0x63aa8
movq 0x48(%rax), %r14
movq 0x50(%rax), %rdi
leaq (%r14,%rdi), %r15
testb %r13b, %r13b
je 0x7bf5
cmpq $0x1f, %rdi
jl 0x7c14
addq $0x1e010, %rdi          # imm = 0x1E010
callq 0x794e
movq 0x60885(%rip), %rdi     # 0x68438
callq 0x794e
cmpq $0x30, %r15
jne 0x7c25
jmp 0x7c4b
movzbl %al, %eax
orq $0x4a, %rax
testb %r13b, %r13b
pushq $0x38
popq %rdi
cmovneq %rax, %rdi
callq 0x52d1
movq %rax, %rdi
callq 0x794e
movq 0x5bec0(%rip), %rax     # 0x63aa8
movq (%rax), %rax
movq $0x1, 0x8(%rax)
jmp 0x7c5a
cmpq $0x30, %r15
je 0x7c0a
addq $0x1e010, %r15          # imm = 0x1E010
movq %r15, %rdi
callq 0x794e
decq %r14
xorl %edi, %edi
movq %r14, %rsi
jmp 0x7c2e
testq %rdi, %rdi
je 0x7c25
addq $0x1e040, %rdi          # imm = 0x1E040
callq 0x794e
pushq $0x30
popq %rdi
subq %r14, %rdi
pushq $0x2f
popq %rsi
callq 0x37ec
movq %rax, 0x5bdf6(%rip)     # 0x63a30
callq 0x554f
leaq 0x809000(%rax), %rdi
callq 0x794e
testb %bpl, %bpl
je 0x7c5a
movl $0x10a009, %edi         # imm = 0x10A009
callq 0x794e
cmpb $0x1, 0x5bb99(%rip)     # 0x637fa
jne 0x7c83
cmpq 0x5bd6e(%rip), %rbx     # 0x639d8
jne 0x7c83
movq 0x5be35(%rip), %rax     # 0x63aa8
testb $-0x80, 0x1b(%rax)
je 0x7c83
movl $0x10a008, %edi         # imm = 0x10A008
callq 0x794e
movq 0x5be1e(%rip), %rax     # 0x63aa8
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 0x5bb9e(%rip), %r12     # 0x63860
movq %r12, %rdi
movq %r14, %rsi
jmp 0x7abd