// File: /workspace/github_cpp_makefile_star2_O2/eryxcc[P]lois/tests/../include/lois.h
// Function: lois::lsetof<lois::lsetof<lois::term>> lois::substitute<lois::lsetof<lois::term>>(lois::lsetof<lois::lsetof<lois::term>> const&, std::vector<std::pair<std::shared_ptr<lois::Variable>, lois::term>, std::allocator<std::pair<std::shared_ptr<lois::Variable>, lois::term>>> const&)
lsetof<T> substitute(const lsetof<T>& where, const varsubstlist& l) {
  lsetof<T> res;

    autoindenter i3;
    if(debuglois) std::cout << ido << "set substitution" << std::endl;

  for(auto elt: where.elts) {
    autoindenter i4;
    if(debuglois) std::cout << ido << "substituting in: " << elt->a << "/" << "VAR" << "/" <<elt->phi << std::endl;
    res.elts.emplace_back(std::make_shared<SimpleSetOf<T>> (
      elt->var,
      substitute(elt->phi, l),
      substitute(elt->a, l))
      );
    }

    if(debuglois) std::cout << ido << "set substitution done" << std::endl;
  return res;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0xdc8c
leaq 0x36b6d(%rip), %rax     # 0x55448
addl $0x2, (%rax)
leaq 0x36e13(%rip), %rax     # 0x556f8
cmpb $0x1, (%rax)
jne 0x1e917
leaq 0x36967(%rip), %rax     # 0x55258
movq (%rax), %rsi
movq 0x366d5(%rip), %rdi     # 0x54fd0
callq 0x34cb4
leaq 0x1aac3(%rip), %rsi     # 0x393ca
movq %rax, %rdi
callq 0x7220
movq %rax, %rdi
callq 0x7120
movq 0x10(%r14), %rbx
movq 0x18(%r14), %rax
movq %rax, 0x28(%rsp)
movq %r12, (%rsp)
leaq 0x10(%r12), %rax
movq %rax, 0x20(%rsp)
leaq 0x30(%rsp), %r14
leaq 0x60(%rsp), %r12
leaq 0x40(%rsp), %rbp
movq %r15, 0x18(%rsp)
cmpq 0x28(%rsp), %rbx
je 0x1eaa7
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1e8a2
leaq 0x36ae3(%rip), %rax     # 0x55448
addl $0x2, (%rax)
leaq 0x36d89(%rip), %rax     # 0x556f8
cmpb $0x1, (%rax)
jne 0x1ea28
movq %r12, %r15
movq %rbp, %r12
movq %r14, %rbp
leaq 0x368d0(%rip), %rax     # 0x55258
movq (%rax), %rsi
movq 0x3663e(%rip), %rdi     # 0x54fd0
callq 0x34cb4
movq %rax, %rdi
leaq 0x1aa3a(%rip), %rsi     # 0x393db
callq 0x7220
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movq %rax, %rsi
callq 0x18a4e
movq %rax, %rdi
leaq 0x1aa2c(%rip), %rsi     # 0x393ed
callq 0x7220
movq %rax, %rdi
leaq 0x1aa1f(%rip), %rsi     # 0x393ef
callq 0x7220
movq %rax, %rdi
leaq 0x1aa0e(%rip), %rsi     # 0x393ed
callq 0x7220
movq %rax, %r13
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0xee5e
movq %r13, %rdi
movq %r14, %rsi
callq 0x2679c
movq %rax, %rdi
callq 0x7120
leaq 0x58(%rsp), %rdi
callq 0xedd8
movq %rbp, %r14
movq %r12, %rbp
movq %r15, %r12
movq 0x18(%rsp), %r15
movq 0x8(%rsp), %r13
leaq 0x18(%r13), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x28f28
movq 0x8(%rsp), %rsi
addq $0x28, %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x1c188
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x1eb78
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x1c120
leaq 0x48(%rsp), %rdi
callq 0xedd8
movq %r12, %rdi
callq 0xd90c
leaq 0x38(%rsp), %rdi
callq 0xedd8
leaq 0x369b7(%rip), %rax     # 0x55448
addl $-0x2, (%rax)
leaq 0x10(%rsp), %rdi
callq 0xedd8
addq $0x10, %rbx
jmp 0x1e946
leaq 0x36c4a(%rip), %rax     # 0x556f8
cmpb $0x0, (%rax)
movq (%rsp), %r12
je 0x1eae4
leaq 0x3679a(%rip), %rax     # 0x55258
movq (%rax), %rsi
movq 0x36508(%rip), %rdi     # 0x54fd0
callq 0x34cb4
leaq 0x1a91f(%rip), %rsi     # 0x393f3
movq %rax, %rdi
callq 0x7220
movq %rax, %rdi
callq 0x7120
leaq 0x3695d(%rip), %rax     # 0x55448
addl $-0x2, (%rax)
movq %r12, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x3693b(%rip), %r14     # 0x55448
jmp 0x1eb64
jmp 0x1eb48
movq %rax, %rbx
jmp 0x1eb32
movq %rax, %rbx
jmp 0x1eb28
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xedd8
leaq 0x60(%rsp), %rdi
callq 0xd90c
leaq 0x38(%rsp), %rdi
jmp 0x1eb41
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xedd8
jmp 0x1eb4b
movq %rax, %rbx
movq (%rsp), %r12
leaq 0x368f2(%rip), %r14     # 0x55448
addl $-0x2, (%r14)
leaq 0x10(%rsp), %rdi
callq 0xedd8
addl $-0x2, (%r14)
movq %r12, %rdi
callq 0xdf36
movq %rbx, %rdi
callq 0x7400