// File: eryxcc[P]lois/tests/tutorial.cpp
// Function: lois::lsetof<lois::lpair<lois::term, lois::term>> reach<lois::lpair<lois::term, lois::term>>(lois::lsetof<lois::lpair<lois::lpair<lois::term, lois::term>, lois::lpair<lois::term, lois::term>>>, lois::lsetof<lois::lpair<lois::term, lois::term>>)
lsetof<T> reach 
  (lsetof<lpair<T,T>> E, 
     lsetof<T> S) {
  lsetof<T> R = S;
  lsetof<T> P;
  While (P!=R) {
    P = R;
    for (auto& e: E) 
      If (memberof(e.first, R))
        R += e.second;
  }
  return R;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdx, -0x230(%rbp)
movq %rsi, %rax
movq -0x230(%rbp), %rsi
movq %rax, -0x228(%rbp)
movq %rdi, -0x220(%rbp)
movq %rdi, %rcx
movq %rcx, -0x218(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x4a3b0
leaq -0x48(%rbp), %rdi
callq 0x127b0
jmp 0x13ff4
leaq 0xae355(%rip), %rdi     # 0xc2350
movq %rdi, -0x60(%rbp)
callq 0x50d20
movb %al, -0x231(%rbp)
jmp 0x1400c
movb -0x231(%rbp), %al
movb %al, -0x61(%rbp)
leaq 0xae334(%rip), %rdi     # 0xc2350
callq 0x50d50
movb %al, -0x232(%rbp)
jmp 0x14029
movb -0x232(%rbp), %al
movb %al, -0x62(%rbp)
leaq -0x61(%rbp), %rdi
leaq -0x62(%rbp), %rsi
callq 0x4a560
movb %al, -0x233(%rbp)
jmp 0x14047
movb -0x233(%rbp), %al
testb $0x1, %al
jne 0x14056
jmp 0x14493
leaq -0x61(%rbp), %rdi
callq 0x4a590
movq %rax, -0x240(%rbp)
jmp 0x14068
movq -0x220(%rbp), %rdx
movq -0x240(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4a5e0
jmp 0x1408c
leaq -0x90(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4a5a0
jmp 0x140a1
leaq -0xa0(%rbp), %rdi
callq 0x12290
leaq -0x90(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x50c40
jmp 0x140ca
movq -0x78(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x50cd0
jmp 0x140dc
jmp 0x140de
leaq -0xd0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x122b0
testb $0x1, %al
jne 0x1418d
movl $0x4, -0x104(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x123d0
leaq -0xd0(%rbp), %rdi
callq 0x123d0
leaq -0x90(%rbp), %rdi
callq 0x12410
jmp 0x14481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x144d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x144b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x12290
jmp 0x144b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14473
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14467
leaq -0xd0(%rbp), %rdi
callq 0x122e0
andb $0x1, %al
movb %al, -0x105(%rbp)
testb $0x1, -0x105(%rbp)
je 0x141b6
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
jmp 0x14446
movq -0x220(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x4a660
jmp 0x141c8
movq -0x228(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x4a910
jmp 0x141eb
movq -0x110(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x4a940
jmp 0x14200
jmp 0x14202
leaq -0x140(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x4a970
movb %al, -0x241(%rbp)
jmp 0x1421d
movb -0x241(%rbp), %al
testb $0x1, %al
jne 0x14283
jmp 0x14229
movl $0x6, -0x104(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4aa80
leaq -0x140(%rbp), %rdi
callq 0x4aa80
jmp 0x14444
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1445b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14436
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1442a
leaq -0x140(%rbp), %rdi
callq 0x4aa20
movq %rax, -0x250(%rbp)
jmp 0x14298
movq -0x220(%rbp), %rdx
movq -0x250(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x13f60
jmp 0x142c2
leaq -0x198(%rbp), %rdi
movq %rdi, -0x258(%rbp)
leaq -0x1a8(%rbp), %rsi
movq %rsi, -0x260(%rbp)
callq 0x12250
movq -0x260(%rbp), %rdi
callq 0x12290
movq -0x258(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x50c40
jmp 0x14312
movq -0x180(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x50cd0
jmp 0x14327
jmp 0x14329
leaq -0x1d8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x122b0
testb $0x1, %al
jne 0x14392
movl $0x8, -0x104(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x123d0
leaq -0x1d8(%rbp), %rdi
callq 0x123d0
leaq -0x198(%rbp), %rdi
callq 0x12410
jmp 0x14415
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14407
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x143fb
leaq -0x1d8(%rbp), %rdi
callq 0x122e0
andb $0x1, %al
movb %al, -0x209(%rbp)
testb $0x1, -0x209(%rbp)
jne 0x143b1
jmp 0x143e6
movq -0x220(%rbp), %rdi
movq -0x178(%rbp), %rsi
addq $0x20, %rsi
callq 0x128c0
jmp 0x143ca
jmp 0x143e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x123d0
jmp 0x143fb
jmp 0x143e8
leaq -0x1d8(%rbp), %rdi
callq 0x50bf0
jmp 0x143f6
jmp 0x14329
leaq -0x1d8(%rbp), %rdi
callq 0x123d0
leaq -0x198(%rbp), %rdi
callq 0x12410
jmp 0x1442a
jmp 0x14417
leaq -0x140(%rbp), %rdi
callq 0x4aa40
jmp 0x14425
jmp 0x14202
leaq -0x170(%rbp), %rdi
callq 0x4aa80
leaq -0x140(%rbp), %rdi
callq 0x4aa80
jmp 0x1445b
jmp 0x14446
jmp 0x14448
leaq -0xd0(%rbp), %rdi
callq 0x50bf0
jmp 0x14456
jmp 0x140de
leaq -0x100(%rbp), %rdi
callq 0x123d0
leaq -0xd0(%rbp), %rdi
callq 0x123d0
leaq -0x90(%rbp), %rdi
callq 0x12410
jmp 0x144b2
jmp 0x14483
leaq -0x61(%rbp), %rdi
callq 0x4aad0
jmp 0x1448e
jmp 0x14032
movb $0x1, -0x19(%rbp)
movl $0x1, -0x104(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x147c0
testb $0x1, -0x19(%rbp)
jne 0x144c9
jmp 0x144bd
leaq -0x48(%rbp), %rdi
callq 0x147c0
jmp 0x144d9
movq -0x220(%rbp), %rdi
callq 0x147c0
movq -0x218(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x147c0
movq -0x50(%rbp), %rdi
callq 0x84c0
nop