// File: /workspace/github_cpp_makefile_star2_O1/cegme[P]vose/VoseTree.cc
// Function: VoseTree::merge_bags()
Vose VoseTree::merge_bags() {
  Vose v;
  size_t i = 0;
  for(; i != nodes.size(); ++i) {
    if (!nodes[i].isBag) break;
    v = v.merge(nodes[i].bag);
  }
  nodes.erase(nodes.begin(), nodes.begin()+i-1); // -1 because we have to replace it
  nodes[0] = vosetreenode(v);
  
  branches.erase(branches.begin(), branches.begin()+i-1);
  branches[0] = v.weight();
  v.init();
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r15
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x90, %edx
xorl %esi, %esi
callq 0x2100
movq 0x38(%r15), %rdx
movq %r15, -0x30(%rbp)
cmpq %rdx, 0x40(%r15)
je 0x3311
leaq 0x20(%rbx), %rax
movq %rax, -0x58(%rbp)
movl $0x38, %r15d
leaq -0x120(%rbp), %r13
xorl %r14d, %r14d
cmpb $0x1, -0x38(%rdx,%r15)
jne 0x3311
movq %r14, %r12
addq %r15, %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x74f6
movq %rbx, %rdi
movq %r13, %rsi
callq 0x50ba
movq -0x58(%rbp), %rdi
leaq -0x100(%rbp), %r14
movq %r14, %rsi
callq 0x50ba
xorl %r13d, %r13d
movq %r13, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq 0x40(%rbx), %rax
movups 0x48(%rbx), %xmm0
movq -0xe0(%rbp), %rcx
movq %rcx, 0x40(%rbx)
movq -0xd8(%rbp), %rcx
movq %rcx, 0x48(%rbx)
movq -0xd0(%rbp), %rcx
movq %rcx, 0x50(%rbx)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rsi
movq %rax, -0x50(%rbp)
movups %xmm0, -0x48(%rbp)
movq %rcx, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
movq %rsi, -0xd0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x49e2
movq -0xc8(%rbp), %rax
movq %rax, 0x58(%rbx)
movq 0x60(%rbx), %rdi
movups 0x68(%rbx), %xmm0
movq -0xc0(%rbp), %rax
movq %rax, 0x60(%rbx)
movq -0xb8(%rbp), %rax
movq %rax, 0x68(%rbx)
movq -0xb0(%rbp), %rax
movq %rax, 0x70(%rbx)
movq %rdi, -0xc0(%rbp)
movups %xmm0, -0xb8(%rbp)
movq %r13, 0x50(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r14)
testq %rdi, %rdi
je 0x320f
callq 0x21c0
movq 0x78(%rbx), %rdi
movups 0x80(%rbx), %xmm0
movq -0xa8(%rbp), %rax
movq %rax, 0x78(%rbx)
movq -0xa0(%rbp), %rax
movq %rax, 0x80(%rbx)
movq -0x98(%rbp), %rax
movq %rax, 0x88(%rbx)
movq %rdi, -0xa8(%rbp)
movups %xmm0, -0xa0(%rbp)
leaq -0x100(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rax)
movq $0x0, 0x68(%rax)
testq %rdi, %rdi
je 0x326f
callq 0x21c0
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
leaq -0x120(%rbp), %r13
movq %r12, %r14
je 0x328a
callq 0x21c0
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x329b
callq 0x21c0
leaq -0xe0(%rbp), %rdi
callq 0x49e2
movq -0xf0(%rbp), %rax
testq %rax, %rax
je 0x32c4
leaq -0x100(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x110(%rbp), %rax
testq %rax, %rax
je 0x32dd
movq %r13, %rdi
movq %r13, %rsi
movl $0x3, %edx
callq *%rax
incq %r14
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdx
movq 0x40(%rax), %rax
subq %rdx, %rax
sarq $0x3, %rax
movabsq $-0x70a3d70a3d70a3d7, %rcx # imm = 0x8F5C28F5C28F5C29
imulq %rcx, %rax
addq $0xc8, %r15
cmpq %rax, %r14
jne 0x3113
movq -0x30(%rbp), %rax
leaq 0x38(%rax), %r15
imulq $0xc8, %r14, %rax
addq %rdx, %rax
addq $-0xc8, %rax
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5efe
leaq -0x1b0(%rbp), %rdi
movq %rbx, %rsi
callq 0x4340
leaq -0x120(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4416
movq (%r15), %r13
leaq -0x110(%rbp), %r15
movb -0x10(%r15), %al
movb %al, (%r13)
movq -0x8(%r15), %rax
movq %rax, 0x8(%r13)
leaq 0x10(%r13), %rdi
movq %r15, %rsi
callq 0x2220
movq 0x20(%r15), %rax
movq %rax, 0x30(%r13)
leaq 0x38(%r13), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x50ba
leaq 0x58(%r13), %rdi
leaq -0xc8(%rbp), %r12
movq %r12, %rsi
callq 0x50ba
xorl %r15d, %r15d
leaq -0x50(%rbp), %rdi
movq %r15, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq 0x78(%r13), %rax
movups 0x80(%r13), %xmm0
movq 0x20(%r12), %rcx
movq %rcx, 0x78(%r13)
movq 0x28(%r12), %rcx
movq %rcx, 0x80(%r13)
movq 0x30(%r12), %rcx
movq %rcx, 0x88(%r13)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, 0x20(%r12)
movq %rdx, 0x28(%r12)
movq %rsi, 0x30(%r12)
callq 0x49e2
movq 0x38(%r12), %rax
movq %rax, 0x90(%r13)
movq 0x98(%r13), %rdi
movq 0x40(%r12), %rax
movq %rax, 0x98(%r13)
movq 0x48(%r12), %rax
movq %rax, 0xa0(%r13)
movq 0x50(%r12), %rax
movq %rax, 0xa8(%r13)
movq %r15, 0x50(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r12)
testq %rdi, %rdi
je 0x345d
callq 0x21c0
movq 0xb0(%r13), %rdi
movq -0x70(%rbp), %rax
movq %rax, 0xb0(%r13)
movq -0x68(%rbp), %rax
movq %rax, 0xb8(%r13)
movq -0x60(%rbp), %rax
movq %rax, 0xc0(%r13)
xorps %xmm0, %xmm0
movups %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
testq %rdi, %rdi
je 0x349e
callq 0x21c0
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x34ac
callq 0x21c0
leaq -0xa8(%rbp), %r13
movq 0x20(%r13), %rdi
testq %rdi, %rdi
je 0x34c1
callq 0x21c0
movq %r13, %rdi
callq 0x49e2
movq -0xb8(%rbp), %rax
testq %rax, %rax
je 0x34e2
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq -0xd8(%rbp), %rax
testq %rax, %rax
movq -0x30(%rbp), %r13
je 0x3503
leaq -0xe8(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq -0x100(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3518
callq 0x21c0
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x3529
callq 0x21c0
movq -0x150(%rbp), %rdi
testq %rdi, %rdi
je 0x353a
callq 0x21c0
leaq -0x170(%rbp), %r15
movq %r15, %rdi
callq 0x49e2
movq -0x10(%r15), %rax
testq %rax, %rax
je 0x3563
leaq -0x190(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x1a0(%rbp), %rax
testq %rax, %rax
je 0x3580
leaq -0x1b0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x20(%r13), %r15
leaq (%r15,%r14,8), %r12
addq $-0x8, %r12
cmpq %r12, %r15
je 0x35bb
movq 0x28(%r13), %rdx
subq %r12, %rdx
je 0x35a5
movq %r15, %rdi
movq %r12, %rsi
callq 0x2270
movq 0x28(%r13), %rax
movq %rax, %rcx
subq %r12, %rcx
addq %rcx, %r15
cmpq %r15, %rax
je 0x35bb
movq %r15, 0x28(%r13)
movq 0x58(%rbx), %rax
movq 0x20(%r13), %rcx
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x6dd4
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3604
jmp 0x3604
jmp 0x3604
jmp 0x3604
jmp 0x360c
movq %rax, %r14
leaq -0x1b0(%rbp), %rdi
callq 0x4468
jmp 0x360f
jmp 0x360c
jmp 0x360c
jmp 0x3604
movq %rax, %rdi
callq 0x4733
movq %rax, %r14
movq %rbx, %rdi
callq 0x4468
movq %r14, %rdi
callq 0x22b0
nop