// File: /workspace/github_cpp_makefile_star2_O2/eryxcc[P]lois/tests/mintest.cpp
// Function: void minimalize2<lois::elem, lois::term>(lois::lsetof<lois::elem>, lois::lsetof<lois::elem>, lois::lsetof<lois::transition<lois::elem, lois::term>>, lois::lsetof<lois::term>)
void minimalize2(lsetof<State> Q, lsetof<State> F, lsetof<transition<State,Symbol>> delta, lsetof<Symbol> alph) {
  cout << "Q = " << Q << endl;
  cout << "F = " << F << endl;
  cout << "delta = " << delta << endl;
  
  lsetof<lsetof<State>> classes;
  classes += F;
  classes += Q &~ F;
  
  int it = 0;
  
  lbool cont = true;
  
  While(cont) {
    lsetof<lsetof<State>> nclasses;
    cout << "classes = " << classes << endl << endl;
    cont = ffalse;
    
    for(auto& EC: classes) {
      for(State& q1: EC) {
        lset EC1;
        for(State& q2: EC) {
          lbool b = true;
          for(auto& t1: delta) for(auto& t2: delta) 
            If(t1.src == q1 && t2.src == q2 && t1.symbol == t2.symbol)
            If(EXISTS(c, classes, memberof(t1.tgt, c) && !memberof(t2.tgt, c)))
              b &= ffalse;
          Ife(b) EC1 += q2;
          else cont = ftrue;
          }
        nclasses += EC1;
        }
      }

    classes = optimize(nclasses); it++;
    }

  cout << "number of iterations: " << it << endl << endl;
  
  cout << "classes: " << classes << endl;  
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x548, %rsp            # imm = 0x548
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40063(%rip), %r15     # 0x4afd0
leaq 0x27306(%rip), %rsi     # 0x3227a
movq %r15, %rdi
callq 0x7230
movq %rbx, %rdi
movq %rax, %rsi
callq 0x153de
movq %rax, %rdi
callq 0x7130
leaq 0x272f3(%rip), %rsi     # 0x32289
movq %r15, %rdi
callq 0x7230
movq %r14, %rdi
movq %rax, %rsi
callq 0x153de
movq %rax, %rdi
callq 0x7130
leaq 0x272c7(%rip), %rsi     # 0x3227f
movq %r15, %rdi
callq 0x7230
movq %r12, %rdi
movq %rax, %rsi
callq 0x15968
movq %rax, %rdi
callq 0x7130
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x14f76
movq %r15, %rdi
movq %r14, %rsi
callq 0x14f92
leaq 0x3b0(%rsp), %rdi
movq %r14, %rsi
callq 0x146eb
leaq 0x188(%rsp), %rdi
leaq 0x3b0(%rsp), %rdx
movq %rbx, %rsi
callq 0x14523
leaq 0xe0(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x14f92
leaq 0x188(%rsp), %rdi
callq 0xaf32
leaq 0x3b0(%rsp), %rdi
callq 0xaf32
leaq 0x108(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x14a4c
leaq 0x4030c(%rip), %rdi     # 0x4b368
callq 0x1f6f5
movl %eax, 0x14(%rsp)
movq %r12, 0x20(%rsp)
leaq 0x402f7(%rip), %rdi     # 0x4b368
callq 0x1f6f8
leaq 0x118(%rsp), %rsi
movl $0x0, 0x10(%rsp)
leaq 0x1e8(%rsp), %r12
leaq 0x40313(%rip), %r14     # 0x4b3a8
leaq 0x3d8(%rsp), %r15
leaq 0x240(%rsp), %rbx
leaq 0x128(%rsp), %rbp
movb %al, 0xf(%rsp)
cmpb %al, 0x14(%rsp)
je 0xb835
leaq 0x348(%rsp), %r13
movq %r13, %rdi
callq 0xbc44
movq %r12, %rdi
movq %r13, %rsi
callq 0x14a86
leaq 0x350(%rsp), %rdi
callq 0xbbbe
leaq 0x188(%rsp), %rdi
movq %r12, %rsi
callq 0x1f698
leaq 0x518(%rsp), %rdi
movq %r12, %rsi
callq 0x1f6e0
movl 0x1b0(%rsp), %eax
cmpl 0x540(%rsp), %eax
je 0xb7f5
addl $-0x4, %eax
cmpl $-0x2, %eax
jae 0xb136
movl $0x0, 0x14(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x1f684
jmp 0xb103
leaq 0x320(%rsp), %rdi
callq 0x14f76
movq 0x3fe86(%rip), %rdi     # 0x4afd0
leaq 0x271c3(%rip), %rsi     # 0x32314
callq 0x7230
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x1cc7a
movq %rax, %rdi
callq 0x7130
movq %rax, %rdi
callq 0x7130
leaq 0x108(%rsp), %rdi
movq %r14, %rsi
callq 0xcd16
leaq 0x200(%rsp), %rdi
leaq 0xe0(%rsp), %r12
movq %r12, %rsi
callq 0x1d1be
leaq 0x4e8(%rsp), %rdi
movq %r12, %rsi
callq 0x1d1ce
leaq 0x200(%rsp), %rdi
leaq 0x4e8(%rsp), %rsi
callq 0x1d1e2
testb %al, %al
je 0xb79a
movq 0x210(%rsp), %r12
leaq 0x2f0(%rsp), %rdi
movq %r12, %rsi
callq 0x14ab8
leaq 0x4b8(%rsp), %rdi
movq %r12, %rsi
callq 0x14ac8
movq %r12, 0x38(%rsp)
leaq 0x2f0(%rsp), %rdi
leaq 0x4b8(%rsp), %rsi
callq 0x14adc
testb %al, %al
je 0xb76e
movq 0x300(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x388(%rsp), %rdi
callq 0x9462
leaq 0x2c0(%rsp), %rdi
movq %r12, %rsi
callq 0x14ab8
leaq 0x488(%rsp), %rdi
movq %r12, %rsi
callq 0x14ac8
leaq 0x2c0(%rsp), %r12
movq %r12, %rdi
leaq 0x488(%rsp), %rsi
callq 0x14adc
testb %al, %al
je 0xb71d
movq 0x2d0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x14a4c
leaq 0xb0(%rsp), %rdi
movq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x14b9c
leaq 0x1b8(%rsp), %rdi
movq %r12, %rsi
callq 0x14bac
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x14bc0
testb %al, %al
je 0xb618
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x158(%rsp), %rdi
movq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x14b9c
leaq 0x458(%rsp), %rdi
movq %r12, %rsi
callq 0x14bac
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x48(%rsp)
leaq 0x158(%rsp), %r12
movq %r12, %rdi
leaq 0x458(%rsp), %rsi
callq 0x14bc0
testb %al, %al
je 0xb5e9
movq 0x168(%rsp), %r12
leaq 0x80(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xda32
leaq 0x70(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xda32
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq (%rsi), %rax
leaq 0x90(%rsp), %rdi
callq *0x28(%rax)
leaq 0x60(%rsp), %rdi
movq %r12, 0x30(%rsp)
movq %r12, %rsi
callq 0xda32
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xda32
movq 0x60(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq (%rsi), %rax
leaq 0x148(%rsp), %r12
movq %r12, %rdi
callq *0x28(%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movq %r12, %rdx
callq 0x20d43
movq 0x30(%rsp), %rax
leaq 0x10(%rax), %rdx
leaq 0x138(%rsp), %r13
movq %r13, %rdi
movq 0x48(%rsp), %rsi
callq 0x21676
leaq 0x298(%rsp), %r12
movq %r12, %rdi
leaq 0xa0(%rsp), %rsi
movq %r13, %rdx
callq 0x20d43
leaq 0x2a8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x9333
leaq 0x2a0(%rsp), %rdi
callq 0xbbbe
leaq 0x140(%rsp), %rdi
callq 0xbbbe
leaq 0xa8(%rsp), %rdi
callq 0xbbbe
leaq 0x150(%rsp), %rdi
callq 0xbbbe
leaq 0x58(%rsp), %rdi
callq 0xbbbe
leaq 0x68(%rsp), %rdi
callq 0xbbbe
leaq 0x98(%rsp), %rdi
callq 0xbbbe
leaq 0x78(%rsp), %rdi
callq 0xbbbe
leaq 0x88(%rsp), %rdi
callq 0xbbbe
leaq 0x358(%rsp), %rdi
movq %r13, %rsi
callq 0x1f698
leaq 0x428(%rsp), %rdi
movq %r13, %rsi
callq 0x1f6e0
movl 0x380(%rsp), %eax
cmpl 0x450(%rsp), %eax
je 0xb5ad
addl $-0x4, %eax
cmpl $-0x3, %eax
ja 0xb59b
leaq 0xe0(%rsp), %rax
movq %rax, 0x240(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x248(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x250(%rsp)
leaq 0x270(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ec9a
leaq 0x280(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x9333
leaq 0x278(%rsp), %rdi
callq 0xbbbe
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1f698
leaq 0x3f8(%rsp), %rdi
movq %r13, %rsi
callq 0x1f6e0
movl 0x268(%rsp), %eax
cmpl 0x420(%rsp), %eax
je 0xb579
addl $-0x4, %eax
cmpl $-0x3, %eax
ja 0xb56f
movq %rbp, %rdi
movq %r14, %rsi
callq 0xbc44
movq %r15, %rdi
movq %rbp, %rsi
callq 0xcfee
leaq 0x130(%rsp), %rdi
callq 0xbbbe
movq %rbx, %rdi
callq 0x1f684
jmp 0xb534
leaq 0x3f8(%rsp), %rdi
callq 0x9346
movq %rbx, %rdi
callq 0x9346
leaq 0x288(%rsp), %rdi
callq 0xbbbe
leaq 0x358(%rsp), %rdi
callq 0x1f684
jmp 0xb49c
leaq 0x428(%rsp), %rdi
callq 0x9346
leaq 0x358(%rsp), %rdi
callq 0x9346
leaq 0x2b0(%rsp), %rdi
callq 0xbbbe
leaq 0x158(%rsp), %r12
movq %r12, %rdi
callq 0x14c06
jmp 0xb314
leaq 0x458(%rsp), %rdi
callq 0x14c1c
leaq 0x158(%rsp), %rdi
callq 0x14c1c
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
callq 0x14c06
jmp 0xb2b4
leaq 0x1b8(%rsp), %rdi
callq 0x14c1c
leaq 0xb0(%rsp), %rdi
callq 0x14c1c
leaq 0x230(%rsp), %r13
movq %r13, %rdi
leaq 0x3e8(%rsp), %rsi
callq 0xbc44
leaq 0x158(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x16a10
leaq 0x238(%rsp), %rdi
callq 0xbbbe
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x1f698
leaq 0x1b8(%rsp), %rdi
movq %r12, %rsi
callq 0x1f6e0
movl 0xd8(%rsp), %eax
cmpl 0x1e0(%rsp), %eax
je 0xb6d9
addl $-0x4, %eax
cmpl $-0x3, %eax
ja 0xb6b6
leaq 0x388(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x963a
jmp 0xb6ca
leaq 0x108(%rsp), %rdi
leaq 0x3fcd3(%rip), %rsi     # 0x4b398
callq 0xcd16
leaq 0xb0(%rsp), %rdi
callq 0x1f684
jmp 0xb68a
leaq 0x1b8(%rsp), %rdi
callq 0x9346
leaq 0xb0(%rsp), %rdi
callq 0x9346
leaq 0x160(%rsp), %rdi
callq 0xbbbe
movq %r15, %rdi
callq 0xd108
leaq 0x2c0(%rsp), %r12
movq %r12, %rdi
callq 0x14cea
jmp 0xb257
leaq 0x488(%rsp), %rdi
callq 0x14d00
leaq 0x2c0(%rsp), %rdi
callq 0x14d00
leaq 0x320(%rsp), %rdi
leaq 0x388(%rsp), %r12
movq %r12, %rsi
callq 0x14f92
movq %r12, %rdi
callq 0xaf32
leaq 0x2f0(%rsp), %rdi
callq 0x14cea
movq 0x38(%rsp), %r12
jmp 0xb1f8
leaq 0x4b8(%rsp), %rdi
callq 0x14d00
leaq 0x2f0(%rsp), %rdi
callq 0x14d00
leaq 0x200(%rsp), %rdi
callq 0x1d228
jmp 0xb1ae
leaq 0x4e8(%rsp), %rdi
callq 0x1d23e
leaq 0x200(%rsp), %r12
movq %r12, %rdi
callq 0x1d23e
movq %r12, %rdi
leaq 0x320(%rsp), %rsi
callq 0x15036
leaq 0xe0(%rsp), %rdi
movq %r12, %rsi
callq 0x151f6
movq %r12, %rdi
callq 0x153c4
incl 0x10(%rsp)
leaq 0x320(%rsp), %rdi
callq 0x153c4
jmp 0xb127
leaq 0x518(%rsp), %rdi
callq 0x9346
leaq 0x188(%rsp), %rdi
callq 0x9346
leaq 0x1f0(%rsp), %rdi
callq 0xbbbe
movb 0xf(%rsp), %al
leaq 0x118(%rsp), %rsi
leaq 0x1e8(%rsp), %r12
jmp 0xb0b1
movq 0x3f794(%rip), %rdi     # 0x4afd0
leaq 0x26a51(%rip), %rsi     # 0x32294
callq 0x7230
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x7400
movq %rax, %rdi
callq 0x7130
movq %rax, %rdi
callq 0x7130
movq 0x3f765(%rip), %rdi     # 0x4afd0
leaq 0x26a45(%rip), %rsi     # 0x322b7
callq 0x7230
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x1cc7a
movq %rax, %rdi
callq 0x7130
leaq 0x108(%rsp), %rdi
callq 0xd108
leaq 0xe0(%rsp), %rdi
callq 0x153c4
addq $0x548, %rsp            # imm = 0x548
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0x153c4
jmp 0xbb68
jmp 0xb985
jmp 0xb8f8
movq %rax, %rbx
jmp 0xbb34
jmp 0xb95b
jmp 0xb902
movq %rax, %rbx
jmp 0xbb5b
jmp 0xb985
movq %rax, %rbx
jmp 0xbb41
movq %rax, %rbx
jmp 0xbb4e
jmp 0xb902
movq %rax, %rbx
jmp 0xbb9c
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
callq 0xaf32
jmp 0xb91f
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
callq 0xaf32
jmp 0xbba9
jmp 0xb933
movq %rax, %rbx
jmp 0xbba9
movq %rax, %rbx
jmp 0xbb75
movq %rax, %rbx
jmp 0xbb82
movq %rax, %rbx
jmp 0xbb8f
movq %rax, %rbx
jmp 0xbb1a
movq %rax, %rbx
jmp 0xbb27
movq %rax, %rbx
jmp 0xbb0d
movq %rax, %rbx
jmp 0xb9a1
movq %rax, %rbx
jmp 0xb9ae
movq %rax, %rbx
jmp 0xbaf3
movq %rax, %rbx
jmp 0xbb00
movq %rax, %rbx
jmp 0xbb68
jmp 0xb9c0
jmp 0xb991
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x9346
leaq 0xb0(%rsp), %rdi
callq 0x9346
leaq 0x160(%rsp), %rdi
callq 0xbbbe
jmp 0xbb00
movq %rax, %rbx
jmp 0xbae6
movq %rax, %rbx
jmp 0xbad9
movq %rax, %rbx
jmp 0xbacc
movq %rax, %rbx
jmp 0xba04
movq %rax, %rbx
jmp 0xbabf
movq %rax, %rbx
jmp 0xba1e
movq %rax, %rbx
jmp 0xba3f
movq %rax, %rbx
jmp 0xba11
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0xbbbe
leaq 0xa8(%rsp), %rdi
callq 0xbbbe
leaq 0x150(%rsp), %rdi
callq 0xbbbe
leaq 0x58(%rsp), %rdi
callq 0xbbbe
leaq 0x68(%rsp), %rdi
callq 0xbbbe
leaq 0x98(%rsp), %rdi
callq 0xbbbe
leaq 0x78(%rsp), %rdi
callq 0xbbbe
leaq 0x88(%rsp), %rdi
jmp 0xbac7
movq %rax, %rbx
jmp 0xbab2
movq %rax, %rbx
jmp 0xba98
jmp 0xba64
movq %rax, %rbx
jmp 0xba8b
movq %rax, %rbx
jmp 0xbaa5
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbbbe
jmp 0xba7e
movq %rax, %rbx
leaq 0x3f8(%rsp), %rdi
callq 0x9346
leaq 0x240(%rsp), %rdi
callq 0x9346
leaq 0x288(%rsp), %rdi
callq 0xbbbe
leaq 0x428(%rsp), %rdi
callq 0x9346
leaq 0x358(%rsp), %rdi
callq 0x9346
leaq 0x2b0(%rsp), %rdi
callq 0xbbbe
leaq 0x458(%rsp), %rdi
callq 0x14c1c
leaq 0x158(%rsp), %rdi
callq 0x14c1c
leaq 0x1b8(%rsp), %rdi
callq 0x14c1c
leaq 0xb0(%rsp), %rdi
callq 0x14c1c
leaq 0x3d8(%rsp), %rdi
callq 0xd108
leaq 0x488(%rsp), %rdi
callq 0x14d00
leaq 0x2c0(%rsp), %rdi
callq 0x14d00
leaq 0x388(%rsp), %rdi
callq 0xaf32
leaq 0x4b8(%rsp), %rdi
callq 0x14d00
leaq 0x2f0(%rsp), %rdi
callq 0x14d00
leaq 0x4e8(%rsp), %rdi
callq 0x1d23e
leaq 0x200(%rsp), %rdi
callq 0x1d23e
leaq 0x320(%rsp), %rdi
callq 0x153c4
leaq 0x518(%rsp), %rdi
callq 0x9346
leaq 0x188(%rsp), %rdi
callq 0x9346
leaq 0x1f0(%rsp), %rdi
callq 0xbbbe
leaq 0x108(%rsp), %rdi
callq 0xd108
leaq 0xe0(%rsp), %rdi
callq 0x153c4
movq %rbx, %rdi
callq 0x7410