// File: /workspace/github_cpp_makefile_star2_O3/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 0xa61c0(%rip), %rax     # 0xbd3c0
movq -0x8(%rax), %r15
movq 0x10(%rdi), %rax
testb $-0x80, 0x1d(%rax)
je 0x1724b
movq 0x4d893(%rip), %rax     # 0x64aa8
testq %r14, 0x18(%rax)
jne 0x17291
testb %sil, %sil
jne 0x17238
movq 0x18(%r15), %rcx
cmpq 0x5216d(%rip), %rcx     # 0x69398
jne 0x17291
movq 0x5216c(%rip), %rcx     # 0x693a0
movq %rcx, 0x18(%r15)
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rcx
movq %rcx, 0x4d861(%rip)     # 0x64aa8
movq %rax, 0x10(%rbx)
callq 0x899b
movq 0x4d851(%rip), %rax     # 0x64aa8
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x4d842(%rip)     # 0x64aa8
movq 0x18(%r15), %rax
movq %rax, 0x4d5ef(%rip)     # 0x64860
callq 0x899b
movq 0x52133(%rip), %rax     # 0x693b0
movq %rax, 0x4d5dc(%rip)     # 0x64860
movq 0x4d81d(%rip), %r12     # 0x64aa8
movq 0x58(%r15), %rax
jmp 0x172d9
callq 0x899b
movq 0x18(%r15), %rdi
addq 0x51c47(%rip), %rdi     # 0x68ee8
callq 0x88f7
movq 0x4d7fb(%rip), %r12     # 0x64aa8
movq 0x10(%rbx), %rax
movq %rax, 0x4d7f0(%rip)     # 0x64aa8
callq 0x899b
movl $0x1000005, %edi        # imm = 0x1000005
callq 0x88f7
movq 0x4d7da(%rip), %rax     # 0x64aa8
movq %rax, 0x58(%r15)
movq %r12, 0x4d7cf(%rip)     # 0x64aa8
movq (%r12), %rcx
movq $0x0, 0x8(%rcx)
movq 0x8(%r12), %rcx
movq (%rax), %rax
movq %rcx, (%rax)
movq 0x58(%r15), %rax
movq 0x8(%rax), %rax
movq 0x4d7a9(%rip), %rcx     # 0x64aa8
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