// File: /workspace/github_cpp_makefile_star2_O1/eryxcc[P]lois/tests/../include/lois.h
// Function: lois::lsetof<lois::term> lois::substitute<lois::term>(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 $0x68, %rsp
movq %rdx, %rbp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
leaq 0x3d1a5(%rip), %rsi     # 0x642c0
movq (%rsi), %rax
movq %rax, (%rdi)
movq %rdi, 0x10(%rsp)
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x15478
leaq 0x3d2f6(%rip), %rax     # 0x64430
addl $0x2, (%rax)
leaq 0x3d59c(%rip), %rax     # 0x646e0
cmpb $0x1, (%rax)
jne 0x2719d
leaq 0x3d108(%rip), %rax     # 0x64258
movq (%rax), %rsi
movq 0x3ce76(%rip), %rdi     # 0x63fd0
callq 0x48b80
movq %rax, %r15
leaq 0x27261(%rip), %rsi     # 0x4e3ca
movl $0x10, %edx
movq %rax, %rdi
callq 0x82b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8240
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x8180
movq 0x10(%rbx), %r13
movq 0x18(%rbx), %rax
movq %rax, 0x40(%rsp)
cmpq %rax, %r13
je 0x273ba
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x38(%rsp)
movq (%r13), %r12
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x271e5
movq 0x3cdf3(%rip), %rax     # 0x63fc8
cmpb $0x0, (%rax)
je 0x271e0
incl 0x8(%r15)
jmp 0x271e5
lock
incl 0x8(%r15)
leaq 0x3d244(%rip), %rax     # 0x64430
addl $0x2, (%rax)
leaq 0x3d4ea(%rip), %rax     # 0x646e0
cmpb $0x1, (%rax)
jne 0x27305
leaq 0x3d052(%rip), %rax     # 0x64258
movq (%rax), %rsi
movq 0x3cdc0(%rip), %rdi     # 0x63fd0
callq 0x48b80
movq %rax, %rbx
movl $0x11, %edx
movq %rax, %rdi
leaq 0x271b4(%rip), %rsi     # 0x4e3db
callq 0x82b0
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x27241
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
jmp 0x27255
movl $0xb, %edx
movq %rbx, %rdi
leaq 0x27092(%rip), %rsi     # 0x4e2e2
callq 0x82b0
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x27189(%rip), %rsi     # 0x4e3ed
callq 0x82b0
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x27177(%rip), %rsi     # 0x4e3ef
callq 0x82b0
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x27161(%rip), %rsi     # 0x4e3ed
callq 0x82b0
movq 0x18(%r12), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%r12), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x272bf
movq 0x3cd17(%rip), %rcx     # 0x63fc8
cmpb $0x0, (%rcx)
je 0x272bb
incl 0x8(%rax)
jmp 0x272bf
lock
incl 0x8(%rax)
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x36ea8
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x8180
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x27305
callq 0x14c44
leaq 0x18(%r12), %rsi
leaq 0x48(%rsp), %rdi
movq %rbp, %r14
movq %rbp, %rdx
callq 0x3a9e3
leaq 0x28(%r12), %rsi
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3a900
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
leaq 0xf(%rsp), %rdx
movq %r12, %rcx
leaq 0x48(%rsp), %r8
movq %rbx, %r9
callq 0x274bc
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x21196
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x27376
callq 0x14c44
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x27385
callq 0x14c44
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x27394
callq 0x14c44
leaq 0x3d095(%rip), %rax     # 0x64430
addl $-0x2, (%rax)
testq %r15, %r15
je 0x273ab
movq %r15, %rdi
callq 0x14c44
addq $0x10, %r13
cmpq 0x40(%rsp), %r13
jne 0x271c1
leaq 0x3d31f(%rip), %rax     # 0x646e0
cmpb $0x0, (%rax)
je 0x2741a
leaq 0x3ce8b(%rip), %rax     # 0x64258
movq (%rax), %rsi
movq 0x3cbf9(%rip), %rdi     # 0x63fd0
callq 0x48b80
movq %rax, %rbx
leaq 0x2700d(%rip), %rsi     # 0x4e3f3
movl $0x15, %edx
movq %rax, %rdi
callq 0x82b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x8180
leaq 0x3d00f(%rip), %rax     # 0x64430
addl $-0x2, (%rax)
movq 0x10(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2749f
jmp 0x27485
movq %rax, %rbx
jmp 0x2746a
movq %rax, %rbx
jmp 0x2745b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2745b
callq 0x14c44
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2746a
callq 0x14c44
movq 0x50(%rsp), %rdi
jmp 0x27479
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x27488
callq 0x14c44
jmp 0x27488
movq %rax, %rbx
leaq 0x3cfa1(%rip), %rax     # 0x64430
addl $-0x2, (%rax)
testq %r15, %r15
je 0x2749f
movq %r15, %rdi
callq 0x14c44
leaq 0x3cf8a(%rip), %rax     # 0x64430
addl $-0x2, (%rax)
movq 0x10(%rsp), %rdi
callq 0x12cc0
movq %rbx, %rdi
callq 0x8420
nop