// File: jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: WithBlock::collectAndPrependContext(std::__cxx11::list<WithBlock, std::allocator<WithBlock>> const&, std::vector<ContextChange*, std::allocator<ContextChange*>>*)
vector<ContextChange *> *WithBlock::collectAndPrependContext(const list<WithBlock> &stack, vector<ContextChange *> *contvec)

{ // Make new list of ContextChanges, prepending everything from stack to -contvec-, delete old contvec
  vector<ContextChange *> *res = (vector<ContextChange *> *)0;
  list<WithBlock>::const_iterator iter;
  for(iter=stack.begin();iter!=stack.end();++iter) {
    const vector<ContextChange *> &changelist( (*iter).contvec );
    if (changelist.size() == 0) continue;
    if (res == (vector<ContextChange *> *)0)
      res = new vector<ContextChange *>();
    for(int4 i=0;i<changelist.size();++i) {
      res->push_back(changelist[i]->clone());
    }
  }
  if (contvec != (vector<ContextChange *> *)0) {
    if (contvec->size() != 0) {
      if (res == (vector<ContextChange *> *)0)
	res = new vector<ContextChange *>();
      for(int4 i=0;i<contvec->size();++i)
	res->push_back((*contvec)[i]);		// lay claim to contvecs pointer
    }
    delete contvec;
  }
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x6a360
movq -0x8(%rbp), %rdi
callq 0x6a380
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6a3e0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6a3b0
testb $0x1, %al
jne 0x5a98c
jmp 0x5aa54
leaq -0x20(%rbp), %rdi
callq 0x6a410
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x6a250
cmpq $0x0, %rax
jne 0x5a9b1
jmp 0x5aa46
cmpq $0x0, -0x18(%rbp)
jne 0x5a9e6
movl $0x18, %edi
callq 0x11440
movq %rax, %rdi
movq %rdi, -0x58(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x11290
movq -0x58(%rbp), %rdi
callq 0x6a460
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
callq 0x6a250
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0x5aa44
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x3c(%rbp), %rsi
callq 0x6a4b0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq -0x68(%rbp), %rdi
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x6a480
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5a9ed
jmp 0x5aa46
leaq -0x20(%rbp), %rdi
callq 0x6a440
jmp 0x5a969
cmpq $0x0, -0x10(%rbp)
je 0x5ab29
movq -0x10(%rbp), %rdi
callq 0x6a250
cmpq $0x0, %rax
je 0x5aaf9
cmpq $0x0, -0x18(%rbp)
jne 0x5aaa7
movl $0x18, %edi
callq 0x11440
movq %rax, %rdi
movq %rdi, -0x70(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x11290
movq -0x70(%rbp), %rdi
callq 0x6a460
movq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x4c(%rbp)
movslq -0x4c(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a250
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x5aaf7
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x4c(%rbp), %rsi
callq 0x6a2e0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x6a270
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x5aaae
jmp 0x5aaf9
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x5ab27
movq -0x88(%rbp), %rdi
callq 0x6a300
movq -0x88(%rbp), %rdi
movl $0x18, %esi
callq 0x11450
jmp 0x5ab29
movq -0x18(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)