// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/pascompl.cc
// Function: genFullExpr::tryFlip(bool)
void tryFlip(bool commutes) {
        int64_t l5var1z;
        InsnList * l5var2z;
        InsnList * &saved = formOperator::super.back()->saved;
        int64_t &nextInsn = formOperator::super.back()->nextInsn;

        if (not otherIns->regsused.has(0)) {
            l5var1z = 0;
        } else if (not insnList->regsused.has(0)) {
            l5var1z = commutes + 1;
        } else {
            l5var1z = 3;
        }
        switch (l5var1z) {
        case 0: {
L100:     prepLoad();
          saved = insnList;
          insnList = otherIns;
          curInsnTemplate = nextInsn;
          prepLoad();
          curInsnTemplate = InsnTemp[XTA];
        } break;
        case 1:
            if (nextInsn == InsnTemp[SUB]) {
                nextInsn = InsnTemp[RSUB];
                goto L22;
            } else
                goto L33;
            break;
        case 2: {
L22:        saved = insnList;
            insnList = otherIns;
            otherIns = saved;
            goto L100;
        } break;
        case 3: {
L33:        prepLoad();
            addToInsnList(indexreg[15] + nextInsn);
            l5var2z = insnList;
            insnList = otherIns;
            P4606();
              saved = insnList;
              insnList = l5var2z;
        } break;
        }; /* case */
        insnList->next->mode = 0;
        saved->next->next = insnList->next2;
        insnList->next2 = saved->next2;
        insnList->regsused = insnList->regsused + Bits(0L);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x800000000000, %r14   # imm = 0x800000000000
movq 0xa8334(%rip), %rax     # 0xbc3c0
movq -0x8(%rax), %r15
movq 0x10(%rdi), %rax
testb $-0x80, 0x1d(%rax)
je 0x140d7
movq 0x4fa07(%rip), %rax     # 0x63aa8
testq %r14, 0x18(%rax)
jne 0x1411d
testb %sil, %sil
jne 0x140c4
movq 0x18(%r15), %rcx
cmpq 0x542e1(%rip), %rcx     # 0x68398
jne 0x1411d
movq 0x542e0(%rip), %rcx     # 0x683a0
movq %rcx, 0x18(%r15)
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rcx
movq %rcx, 0x4f9d5(%rip)     # 0x63aa8
movq %rax, 0x10(%rbx)
callq 0x79ed
movq 0x4f9c5(%rip), %rax     # 0x63aa8
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x4f9b6(%rip)     # 0x63aa8
movq 0x18(%r15), %rax
movq %rax, 0x4f763(%rip)     # 0x63860
callq 0x79ed
movq 0x542a7(%rip), %rax     # 0x683b0
movq %rax, 0x4f750(%rip)     # 0x63860
movq 0x4f991(%rip), %r12     # 0x63aa8
movq 0x58(%r15), %rax
jmp 0x1415b
callq 0x79ed
movq 0x18(%r15), %rdi
addq 0x53dbb(%rip), %rdi     # 0x67ee8
callq 0x794e
movq 0x4f96f(%rip), %r12     # 0x63aa8
movq 0x10(%rbx), %rax
movq %rax, 0x4f964(%rip)     # 0x63aa8
callq 0x7ccd
movq 0x4f958(%rip), %rax     # 0x63aa8
movq %rax, 0x58(%r15)
movq %r12, 0x4f94d(%rip)     # 0x63aa8
movq (%r12), %rcx
andq $0x0, 0x8(%rcx)
movq 0x8(%r12), %rcx
movq (%rax), %rax
movq %rcx, (%rax)
movq 0x58(%r15), %rax
movq 0x8(%rax), %rax
movq 0x4f92a(%rip), %rcx     # 0x63aa8
movq %rax, 0x8(%rcx)
leaq -0x1(%r14), %rax
andq 0x18(%rcx), %rax
orq %r14, %rax
movq %rax, 0x18(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop