// File: gasparfm[P]anapache/anapacheapp.cpp
// Function: AnapacheApp::ipCount_Results(AnapacheApp::AnalizerOptions)
void AnapacheApp::ipCount_Results(AnalizerOptions opts)
{
  std::cout << "Found "<<ipCount_data.queryCount.size()<<" different IPs"<<std::endl;
  std::cout << "Ordering IPs.."<<std::endl;
  std::vector < std::pair<std::string, unsigned long> >orderedIps;
  for (auto ip : ipCount_data.queryCount)
    {
      auto pos = orderedIps.begin();

      while ( (pos!=orderedIps.end()) && (pos->second<ip.second) )
      	pos++;
      orderedIps.insert(pos, ip);
      /* std:: cout << ip.first <<": "<<ip.second<<std::endl; */
    }
  std::cout << "ready!"<<std::endl;
  for (auto ip : orderedIps)
    {
      std:: cout << ip.first <<": "<<ip.second<<std::endl;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl %esi, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movq 0x1485c(%rip), %rdi     # 0x1bfb0
leaq 0xbbda(%rip), %rsi      # 0x13335
callq 0x4410
movq -0x110(%rbp), %rdi
movq %rax, -0x118(%rbp)
addq $0x78, %rdi
callq 0x8c90
movq -0x118(%rbp), %rdi
movq %rax, %rsi
callq 0x4110
movq %rax, %rdi
leaq 0xbbac(%rip), %rsi      # 0x1333c
callq 0x4410
movq %rax, %rdi
movq 0x147d9(%rip), %rsi     # 0x1bf78
callq 0x4470
movq 0x14805(%rip), %rdi     # 0x1bfb0
leaq 0xbb99(%rip), %rsi      # 0x1334b
callq 0x4410
movq %rax, %rdi
movq 0x147b7(%rip), %rsi     # 0x1bf78
callq 0x4470
leaq -0x28(%rbp), %rdi
callq 0x8cb0
movq -0x110(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8cd0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8ba0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8d00
testb $0x1, %al
jne 0x780e
jmp 0x7955
leaq -0x38(%rbp), %rdi
callq 0x8d30
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x8d50
jmp 0x7825
leaq -0x28(%rbp), %rdi
callq 0x8d90
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8e00
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x8dc0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x119(%rbp)
jne 0x7863
jmp 0x787d
leaq -0x80(%rbp), %rdi
callq 0x8e30
movq 0x20(%rax), %rax
cmpq -0x48(%rbp), %rax
setb %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x7889
jmp 0x78ae
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x8e50
movq %rax, -0x90(%rbp)
jmp 0x7832
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x7aa2
leaq -0x98(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8ed0
leaq -0xc0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8f10
jmp 0x78d0
movq -0x98(%rbp), %rsi
leaq -0x28(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x8e90
movq %rax, -0x128(%rbp)
jmp 0x78f0
movq -0x128(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x8f50
leaq -0x68(%rbp), %rdi
callq 0x8c50
leaq -0x38(%rbp), %rdi
callq 0x8f70
jmp 0x77f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x7947
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x8f50
leaq -0x68(%rbp), %rdi
callq 0x8c50
jmp 0x7aa2
movq 0x14654(%rip), %rdi     # 0x1bfb0
leaq 0xb9f7(%rip), %rsi      # 0x1335a
callq 0x4410
movq %rax, -0x130(%rbp)
jmp 0x7971
movq -0x130(%rbp), %rdi
movq 0x145f9(%rip), %rsi     # 0x1bf78
callq 0x4470
jmp 0x7986
leaq -0x28(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x8d90
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x8e00
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x8dc0
testb $0x1, %al
jne 0x79d3
jmp 0x7a90
leaq -0xd8(%rbp), %rdi
callq 0x8fa0
movq %rax, %rsi
leaq -0x108(%rbp), %rdi
callq 0x8fc0
jmp 0x79f0
movq 0x145b9(%rip), %rdi     # 0x1bfb0
leaq -0x108(%rbp), %rsi
callq 0x43d0
movq %rax, -0x138(%rbp)
jmp 0x7a0c
movq -0x138(%rbp), %rdi
leaq 0xb6ab(%rip), %rsi      # 0x130c5
callq 0x4410
movq %rax, -0x140(%rbp)
jmp 0x7a28
movq -0x140(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x4110
movq %rax, -0x148(%rbp)
jmp 0x7a44
movq -0x148(%rbp), %rdi
movq 0x14526(%rip), %rsi     # 0x1bf78
callq 0x4470
jmp 0x7a59
leaq -0x108(%rbp), %rdi
callq 0x8f50
leaq -0xd8(%rbp), %rdi
callq 0x9000
jmp 0x79b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x8f50
jmp 0x7aa2
leaq -0x28(%rbp), %rdi
callq 0x9020
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x9020
movq -0x70(%rbp), %rdi
callq 0x46c0
nopw %cs:(%rax,%rax)