// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xb7e85(%rip), %rdi     # 0xd8a78
callq 0x203f0
movq (%rax), %rax
addq $0x58, %rax
movq %rax, -0x28(%rbp)
leaq 0xb7e6e(%rip), %rdi     # 0xd8a78
callq 0x203f0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq (%rcx), %rcx
addq $0x18, %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1e5f0
testb $0x1, %al
jne 0x20c40
movq $0x0, -0x18(%rbp)
jmp 0x20c75
movq 0x5f521(%rip), %rdi     # 0x80168
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1e5f0
testb $0x1, %al
jne 0x20c6b
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addl $0x1, %eax
cltq
movq %rax, -0x18(%rbp)
jmp 0x20c73
movq $0x3, -0x18(%rbp)
jmp 0x20c75
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
subq $0x3, %rax
ja 0x20d88
movq -0x50(%rbp), %rax
leaq 0x10d1a(%rip), %rcx     # 0x319ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x20c9d
callq 0xbd10
movq -0x48(%rbp), %rax
movq 0x5f4bb(%rip), %rdx     # 0x80168
movq -0x28(%rbp), %rcx
movq %rdx, (%rcx)
movq 0x10(%rax), %rax
movq %rax, 0x5f4a9(%rip)     # 0x80168
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x5f253(%rip)     # 0x7ff20
callq 0xbd10
movq 0x63d97(%rip), %rax     # 0x84a70
movq %rax, 0x5f240(%rip)     # 0x7ff20
jmp 0x20d88
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq 0x63d65(%rip), %rax     # 0x84a58
jne 0x20d05
movq 0x63d64(%rip), %rcx     # 0x84a60
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x20d09
jmp 0x20d38
jmp 0x20d09
movq -0x48(%rbp), %rax
movq 0x5f454(%rip), %rdx     # 0x80168
movq -0x28(%rbp), %rcx
movq %rdx, (%rcx)
movq 0x10(%rax), %rcx
movq %rcx, 0x5f442(%rip)     # 0x80168
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x20c9d
jmp 0x20d38
callq 0xbd10
movq 0x63864(%rip), %rdi     # 0x845a8
movq -0x30(%rbp), %rax
addq (%rax), %rdi
callq 0xbbb0
movq -0x48(%rbp), %rax
movq 0x5f40d(%rip), %rcx     # 0x80168
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
movq %rax, 0x5f3fe(%rip)     # 0x80168
callq 0xc1f0
movq 0x5f3f2(%rip), %rcx     # 0x80168
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, 0x5f3e0(%rip)     # 0x80168
movq 0x5f3d9(%rip), %rax     # 0x80168
movq (%rax), %rax
movq $0x0, 0x8(%rax)
movq 0x5f3c7(%rip), %rax     # 0x80168
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq 0x5f3a4(%rip), %rax     # 0x80168
movq %rcx, 0x8(%rax)
movq 0x5f399(%rip), %rax     # 0x80168
addq $0x18, %rax
movq %rax, -0x58(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x48e0
movq -0x58(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x1db20
movq %rax, -0x38(%rbp)
movq 0x5f36c(%rip), %rax     # 0x80168
movq -0x38(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)