// File: /workspace/github_cpp_makefile_star2_O3/BUSEC[P]RPKI_Downgrade_Detector/./exp.cpp
// Function: NotValidToValid(ROAGroup, ROAGroup, std::unordered_map<int, PrefixRange*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, PrefixRange*>>>*)
void NotValidToValid(ROAGroup newPrefixes, ROAGroup oldPrefixes, unordered_map<int, PrefixRange*>* notValidToValidPrefixes){ 
  set<int>* ASes = newPrefixes.getASes();

  for( set<int>::iterator i = ASes->begin(); i != ASes->end(); ++i) {
    int as = *i;

    PrefixRange* rPrimeValid = newPrefixes.getByAS(as); 

    PrefixRange empty = PrefixRange();

    PrefixRange* oldValid = &empty; 

    // If oldPrefixes has the as we are working on then set it
    if ( oldPrefixes.hasAS(as) ) oldValid = oldPrefixes.getByAS(as); 

    rPrimeValid->denseIntersectWith( oldValid->complement() , true);

    if ( ! rPrimeValid->empty() ) notValidToValidPrefixes->insert( make_pair(as, new PrefixRange( *rPrimeValid ) ) );
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, 0x40(%rsp)
movq 0x60(%rdi), %r14
leaq 0x50(%rdi), %rax
movq %rax, 0x58(%rsp)
cmpq %rax, %r14
je 0x2f32
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x28(%rsp), %r12
movq %rsi, 0x48(%rsp)
movq %rdi, 0x50(%rsp)
movl 0x20(%r14), %r15d
movl %r15d, 0x10(%rsp)
movl %r15d, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x619e
testq %rax, %rax
je 0x2f41
movq %rbx, %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0x710e
movq (%rax), %rbx
movq $0x0, 0x30(%rsp)
movq %r12, %rdi
movl $0x20, %esi
callq 0x6062
movl %r15d, 0x10(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x619e
movq %r12, %rsi
testq %rax, %rax
je 0x2df7
movl %r15d, 0xc(%rsp)
movl %r15d, 0x10(%rsp)
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x619e
testq %rax, %rax
je 0x2f41
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x710e
movq (%rax), %rsi
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x4ace
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x4a4a
movq 0x10(%rsp), %r13
testq %r13, %r13
je 0x2e66
movq %r14, 0x60(%rsp)
movq -0x8(%r13), %r14
testq %r14, %r14
je 0x2e43
imulq $0x38, %r14, %rbp
leaq -0x38(%r13), %r12
leaq (%r12,%rbp), %rdi
callq 0x618a
addq $-0x38, %rbp
jne 0x2e34
addq $-0x8, %r13
imulq $0x38, %r14, %rsi
addq $0x8, %rsi
movq %r13, %rdi
callq 0x2390
movq 0x48(%rsp), %rbp
movq 0x60(%rsp), %r14
leaq 0x28(%rsp), %r12
movslq 0x14(%rbx), %rax
testq %rax, %rax
jle 0x2ece
movq (%rbx), %rcx
cmpq $0x0, 0x28(%rcx)
jne 0x2e9d
addq $0x60, %rcx
movl $0x1, %esi
movq %rsi, %rdx
cmpq %rsi, %rax
je 0x2e98
leaq 0x1(%rdx), %rsi
cmpq $0x0, (%rcx)
leaq 0x38(%rcx), %rcx
je 0x2e82
cmpq %rax, %rdx
jae 0x2ece
movl $0x18, %edi
callq 0x2230
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4c54
movl %r15d, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x739e
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x2f17
movq %r14, %r13
movq -0x8(%rbx), %r14
testq %r14, %r14
je 0x2efb
imulq $0x38, %r14, %r15
leaq -0x38(%rbx), %r12
leaq (%r12,%r15), %rdi
callq 0x618a
addq $-0x38, %r15
jne 0x2eec
addq $-0x8, %rbx
imulq $0x38, %r14, %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x2390
movq %r13, %r14
leaq 0x28(%rsp), %r12
movq %r14, %rdi
callq 0x2290
movq %rax, %r14
cmpq 0x58(%rsp), %rax
movq 0x50(%rsp), %rbx
jne 0x2d64
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5249(%rip), %rdi      # 0x8191
leaq 0x5131(%rip), %rsi      # 0x8080
leaq 0x5245(%rip), %rcx      # 0x819b
movl $0x2d9, %edx            # imm = 0x2D9
callq 0x2150
movq %rax, %rbx
movl $0x18, %esi
movq %r13, %rdi
callq 0x2240
jmp 0x2f88
jmp 0x2f85
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4bf8
jmp 0x2f88
jmp 0x2f85
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4bf8
movq %rbx, %rdi
callq 0x2360