// File: /workspace/github_cpp_makefile_star2_O1/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 0xa6542(%rip), %rax     # 0xbd3d0
movq 0x10(%rdi), %rcx
testb $-0x80, 0x1d(%rcx)
jne 0x16e9c
xorl %ecx, %ecx
jmp 0x16eb7
movq 0x4dc15(%rip), %rcx     # 0x64ab8
movzbl %sil, %edx
incq %rdx
testq %r14, 0x18(%rcx)
movl $0x3, %ecx
cmoveq %rdx, %rcx
movq -0x8(%rax), %r15
leaq 0x5aae(%rip), %rax      # 0x1c970
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x18(%r15), %rax
cmpq 0x524d2(%rip), %rax     # 0x693a8
jne 0x16f38
movq 0x524d1(%rip), %rax     # 0x693b0
movq %rax, 0x18(%r15)
movq 0x4dbce(%rip), %rax     # 0x64ab8
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rcx
movq %rcx, 0x4dbbf(%rip)     # 0x64ab8
movq %rax, 0x10(%rbx)
callq 0x8989
movq 0x4dbaf(%rip), %rax     # 0x64ab8
movq %rax, 0x58(%r15)
movq 0x10(%rbx), %rax
movq %rax, 0x4dba0(%rip)     # 0x64ab8
movq 0x18(%r15), %rax
movq %rax, 0x4d94d(%rip)     # 0x64870
callq 0x8989
movq 0x52491(%rip), %rax     # 0x693c0
movq %rax, 0x4d93a(%rip)     # 0x64870
jmp 0x16f80
callq 0x8989
movq 0x18(%r15), %rdi
addq 0x51fb0(%rip), %rdi     # 0x68ef8
callq 0x88e5
movq 0x4db64(%rip), %r12     # 0x64ab8
movq 0x10(%rbx), %rax
movq %rax, 0x4db59(%rip)     # 0x64ab8
callq 0x8989
movl $0x1000005, %edi        # imm = 0x1000005
callq 0x88e5
movq 0x4db43(%rip), %rax     # 0x64ab8
movq %rax, 0x58(%r15)
movq %r12, 0x4db38(%rip)     # 0x64ab8
movq 0x4db31(%rip), %rax     # 0x64ab8
movq (%rax), %rcx
movq $0x0, 0x8(%rcx)
movq 0x8(%rax), %rax
movq 0x58(%r15), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx)
movq 0x58(%r15), %rax
movq 0x8(%rax), %rax
movq 0x4db09(%rip), %rcx     # 0x64ab8
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