LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_concat()
auto test_concat() -> void {
  using Prelude::concat;
  auto expect = std::vector<int>{1, 2, 3, 4, 5, 6, 7, 8, 9};
  auto result = concat(
      std::array<std::vector<int>, 3>{{{1, 2, 3}, {4, 5}, {6, 7, 8, 9}}});
  assert(result == expect);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movups 0x6ea7(%rip), %xmm0     # 0xaaec
leaq 0x40(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x6e87(%rip), %xmm0     # 0xaadc
movaps %xmm0, (%rsi)
movl $0x9, 0x20(%rsi)
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movl $0x9, %edx
callq 0x6c08
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq 0x94(%rsp), %rsi
movq %rax, (%rsi)
movl $0x3, 0x8(%rsi)
leaq 0x40(%rsp), %rbx
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
movq %rbx, %rdi
callq 0x6c08
leaq 0x58(%rsp), %r15
movabsq $0x500000004, %rax      # imm = 0x500000004
leaq 0x8c(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xe(%rsp), %rcx
movl $0x2, %edx
movq %r15, %rdi
callq 0x6c08
leaq 0x70(%rsp), %r15
movaps 0x6352(%rip), %xmm0     # 0xa030
leaq 0xa0(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xd(%rsp), %rcx
movl $0x4, %edx
movq %r15, %rdi
callq 0x6c08
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6d80
movl $0x48, %ebx
movq 0x28(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x3d26
movq 0x38(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x20f0
addq $-0x18, %rbx
jne 0x3d0f
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %rax
movq %rax, %rdx
subq %r14, %rdx
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rcx
subq %rbx, %rcx
cmpq %rcx, %rdx
jne 0x3d9e
cmpq %r14, %rax
je 0x3d62
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
testl %eax, %eax
jne 0x3d9e
testq %r14, %r14
je 0x3d7c
movq 0x38(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x20f0
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x3d91
movq 0x20(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x20f0
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x62fb(%rip), %rdi      # 0xa0a0
leaq 0x62c3(%rip), %rsi      # 0xa06f
leaq 0x66df(%rip), %rcx      # 0xa492
movl $0xac, %edx
callq 0x2090
movq %rax, %r14
movl $0x48, %ebx
movq 0x28(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x3ddc
movq 0x38(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x20f0
addq $-0x18, %rbx
jne 0x3dc5
jmp 0x3e0c
jmp 0x3de6
movq %rax, %r14
movq -0x18(%r15), %rdi
testq %rdi, %rdi
je 0x3dfe
movq -0x8(%r15), %rsi
subq %rdi, %rsi
callq 0x20f0
addq $-0x18, %r15
cmpq %rbx, %r15
jne 0x3de9
jmp 0x3e0c
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3e23
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %r14, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_concatMap()
auto test_concatMap() -> void {
  using Prelude::concatMap;
  auto expect = std::vector<int>{1, 1, 1, 2, 2, 2, 3, 3, 3};
  auto result = concatMap([](int x) {
    return std::vector<int>{x, x, x};
  }, std::list<int>{1, 2, 3});
  assert(result == expect);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movups 0x6ccd(%rip), %xmm0     # 0xab10
leaq 0x50(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x6cad(%rip), %xmm0     # 0xab00
movaps %xmm0, (%rsi)
movl $0x3, %ebx
movl %ebx, 0x20(%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %r14
movl $0x9, %edx
movq %r14, %rcx
callq 0x6c08
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq 0xac(%rsp), %rsi
movq %rax, (%rsi)
movl %ebx, 0x8(%rsi)
leaq 0x78(%rsp), %rbx
leaq 0xe(%rsp), %rcx
movl $0x3, %edx
movq %rbx, %rdi
callq 0x6e30
movq %r14, 0x18(%rsp)
movq %r14, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x78(%rsp), %rbp
cmpq %rbx, %rbp
je 0x3f58
leaq 0x50(%rsp), %r14
leaq 0x2c(%rsp), %r15
leaq 0xf(%rsp), %r12
leaq 0x10(%rsp), %r13
movl 0x10(%rbp), %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0x30(%rsp)
movl %eax, 0x34(%rsp)
movl $0x3, %edx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x6c08
movl $0x28, %edi
callq 0x20e0
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x10(%rax)
movq 0x60(%rsp), %rcx
movq %rcx, 0x20(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %rax, %rdi
movq %r13, %rsi
callq 0x2030
incq 0x20(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3f4f
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rbp), %rbp
cmpq %rbx, %rbp
jne 0x3ed9
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x84ef
leaq 0x10(%rsp), %rdi
callq 0x85a4
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f93
movq (%rdi), %r14
movl $0x18, %esi
callq 0x20f0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x3f7e
movq 0x90(%rsp), %r14
movq 0x98(%rsp), %rax
movq %rax, %rdx
subq %r14, %rdx
movq 0x38(%rsp), %rbx
movq 0x40(%rsp), %rcx
subq %rbx, %rcx
cmpq %rcx, %rdx
jne 0x4013
cmpq %r14, %rax
je 0x3fcf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
testl %eax, %eax
jne 0x4013
testq %r14, %r14
je 0x3fec
movq 0xa0(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x20f0
movq 0x38(%rsp), %rbx
testq %rbx, %rbx
je 0x4001
movq 0x48(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x20f0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6086(%rip), %rdi      # 0xa0a0
leaq 0x604e(%rip), %rsi      # 0xa06f
leaq 0x647d(%rip), %rcx      # 0xa4a5
movl $0xb5, %edx
callq 0x2090
jmp 0x4039
movq %rax, %r14
jmp 0x4081
movq %rax, %r14
jmp 0x4058
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4058
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
leaq 0x10(%rsp), %rdi
callq 0x85a4
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4081
movq (%rdi), %r15
movl $0x18, %esi
callq 0x20f0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x406c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4098
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %r14, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_maximum()
auto test_maximum() -> void {
  using Prelude::maximum;
  auto expect = 23;
  auto result = maximum(std::vector<int>{1, 2, 3, 23, 4, 5});
  assert(result == expect);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movups 0x6a78(%rip), %xmm0     # 0xab24
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x500000004, %rax      # imm = 0x500000004
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rcx
movl $0x6, %edx
movq %rbx, %rdi
callq 0x6c08
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
cmpq %rax, %rdi
sete %dl
leaq 0x4(%rdi), %rcx
cmpq %rax, %rcx
sete %sil
orb %dl, %sil
movq %rdi, %rdx
jne 0x4115
movl (%rdi), %esi
movq %rdi, %rdx
movl (%rcx), %r8d
cmpl %r8d, %esi
cmovlel %r8d, %esi
cmovlq %rcx, %rdx
addq $0x4, %rcx
cmpq %rax, %rcx
jne 0x40fe
movl (%rdx), %ebx
testq %rdi, %rdi
je 0x4129
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
cmpl $0x17, %ebx
jne 0x4134
addq $0x40, %rsp
popq %rbx
retq
leaq 0x5f65(%rip), %rdi      # 0xa0a0
leaq 0x5f2d(%rip), %rsi      # 0xa06f
leaq 0x6372(%rip), %rcx      # 0xa4bb
movl $0xbc, %edx
callq 0x2090
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_minimum()
auto test_minimum() -> void {
  using Prelude::minimum;
  auto expect = -23;
  auto result = minimum(std::vector<int>{1, 2, 3, 4, -23, 5});
  assert(result == expect);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movups 0x69dd(%rip), %xmm0     # 0xab3c
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x5ffffffe9, %rax      # imm = 0x5FFFFFFE9
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rcx
movl $0x6, %edx
movq %rbx, %rdi
callq 0x6c08
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
cmpq %rax, %rdi
sete %dl
leaq 0x4(%rdi), %rcx
cmpq %rax, %rcx
sete %sil
orb %dl, %sil
movq %rdi, %rdx
jne 0x41c8
movl (%rdi), %esi
movq %rdi, %rdx
movl (%rcx), %r8d
cmpl %esi, %r8d
cmovll %r8d, %esi
cmovlq %rcx, %rdx
addq $0x4, %rcx
cmpq %rax, %rcx
jne 0x41b1
movl (%rdx), %ebx
testq %rdi, %rdi
je 0x41dc
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
cmpl $-0x17, %ebx
jne 0x41e7
addq $0x40, %rsp
popq %rbx
retq
leaq 0x5eb2(%rip), %rdi      # 0xa0a0
leaq 0x5e7a(%rip), %rsi      # 0xa06f
leaq 0x62d3(%rip), %rcx      # 0xa4cf
movl $0xc3, %edx
callq 0x2090
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_dropWhile()
auto test_dropWhile() -> void {
  using Prelude::dropWhile;
  auto expect = std::vector<int>{5, 6, 7, 8};
  auto result = dropWhile([](int x) { return x < 5; },
                          std::vector<int>{1, 2, 3, 4, 5, 6, 7, 8});
  assert(result == expect);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movaps 0x4fde(%rip), %xmm0     # 0xa050
leaq 0x50(%rsp), %rbx
movaps %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rcx
movl $0x4, %edx
movq %rbx, %rsi
callq 0x6c08
movups 0x5b14(%rip), %xmm0     # 0xabac
movaps %xmm0, 0x10(%rbx)
movups 0x5af9(%rip), %xmm0     # 0xab9c
movaps %xmm0, (%rbx)
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x6(%rsp), %rcx
movl $0x8, %edx
callq 0x6c08
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rdx, %rax
subq %rsi, %rax
sarq $0x2, %rax
testq %rax, %rax
jle 0x5103
movq %rax, %rcx
shrq %rcx
movq %rcx, %rdi
notq %rdi
addq %rax, %rdi
leaq (%rsi,%rcx,4), %rax
addq $0x4, %rax
cmpl $0x5, -0x4(%rax)
cmovlq %rax, %rsi
cmovgeq %rcx, %rdi
movq %rdi, %rax
testq %rdi, %rdi
jg 0x50d8
leaq 0x38(%rsp), %rdi
leaq 0x7(%rsp), %rcx
callq 0x80e2
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5129
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x38(%rsp), %r14
movq 0x40(%rsp), %rax
movq %rax, %rdx
subq %r14, %rdx
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rcx
subq %rbx, %rcx
cmpq %rcx, %rdx
jne 0x5196
cmpq %r14, %rax
je 0x515f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
testl %eax, %eax
jne 0x5196
testq %r14, %r14
je 0x5179
movq 0x48(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x20f0
movq 0x20(%rsp), %rbx
testq %rbx, %rbx
je 0x518e
movq 0x30(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x20f0
addq $0x78, %rsp
popq %rbx
popq %r14
retq
leaq 0x4f03(%rip), %rdi      # 0xa0a0
leaq 0x4ecb(%rip), %rsi      # 0xa06f
leaq 0x53df(%rip), %rcx      # 0xa58a
movl $0xff, %edx
callq 0x2090
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x51d4
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
jmp 0x51d4
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x51eb
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_zip()
auto test_zip() -> void {
  using Prelude::zip;
  auto expect = std::vector<std::tuple<int, bool>>{std::make_tuple(1, true),
                                                   std::make_tuple(2, false),
                                                   std::make_tuple(3, true)};
  auto result =
      zip(std::vector<int>{1, 2, 3}, std::list<bool>{true, false, true});
  assert(result == expect);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movb $0x1, %al
leaq 0x40(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, 0x4(%rsi)
movb $0x0, 0x8(%rsi)
movl $0x2, 0xc(%rsi)
movb %al, 0x10(%rsi)
movl $0x3, %ebx
movl %ebx, 0x14(%rsi)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0x3, %edx
callq 0x6f38
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq 0x74(%rsp), %rsi
movq %rax, (%rsi)
movl %ebx, 0x8(%rsi)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rcx
movl $0x3, %edx
callq 0x6c08
leaq 0xd(%rsp), %rsi
movw $0x1, (%rsi)
movb $0x1, 0x2(%rsi)
leaq 0x58(%rsp), %rdi
leaq 0xb(%rsp), %rcx
movl $0x3, %edx
callq 0x7006
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %r14
movq %r14, %rdx
callq 0x6f7d
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x5897
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x20f0
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x5882
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x58ae
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
cmpq %rsi, %rdx
jne 0x5934
cmpq %rcx, %rax
je 0x58fb
leaq 0x4(%rdi), %rdx
movq %rax, %rsi
movl 0x4(%rsi), %r8d
cmpl (%rdx), %r8d
jne 0x5934
movb -0x4(%rdx), %r8b
cmpb %r8b, (%rsi)
jne 0x5934
addq $0x8, %rsi
addq $0x8, %rdx
cmpq %rcx, %rsi
jne 0x58dc
testq %rax, %rax
je 0x5915
movq 0x50(%rsp), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x20f0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5927
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4765(%rip), %rdi      # 0xa0a0
leaq 0x472d(%rip), %rsi      # 0xa06f
leaq 0x4c7b(%rip), %rcx      # 0xa5c4
movl $0x11f, %edx            # imm = 0x11F
callq 0x2090
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x597a
movq (%rdi), %r15
movl $0x18, %esi
callq 0x20f0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x5960
jmp 0x597a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5996
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
jmp 0x5996
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x59ad
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: main
int main() {
  test_not_();
  // List operations
  test_map();
  test_join();
  test_filter();
  test_head();
  test_last();
  test_tail();
  test_init();
  test_null();
  test_at();
  test_reverse();
  // Reducing lists (folds)
  test_foldl();
  test_foldl1();
  test_foldr();
  test_foldr1();
  // Special folds
  test_and_();
  test_or_();
  test_any();
  test_all();
  test_sum();
  test_product();
  test_concat();
  test_concatMap();
  test_maximum();
  test_minimum();
  // Sublists
  test_take();
  test_drop();
  test_splitAt();
  test_takeWhile();
  test_dropWhile();
  test_span();
  test_break_();
  // Zipping and unzipping lists
  test_zip();
  test_zip3();
  test_zipWith();
  test_zipWith3();
  test_unzip();
  test_unzip3();

  std::cout << "Looking good!\n";
}

// Assembly:
pushq %rax
callq 0x241c
callq 0x2514
callq 0x26dc
callq 0x287a
callq 0x2a58
callq 0x2ae4
callq 0x2b79
callq 0x2cc0
callq 0x2e07
callq 0x2ee0
callq 0x2f72
callq 0x30af
callq 0x3137
callq 0x31d7
callq 0x32e5
callq 0x3479
callq 0x35c8
callq 0x3710
callq 0x3915
callq 0x3b1a
callq 0x3ba2
callq 0x3c32
callq 0x3e2b
callq 0x40a0
callq 0x4153
callq 0x4206
callq 0x4460
callq 0x4743
callq 0x4ed2
callq 0x5064
callq 0x51f3
callq 0x54a5
callq 0x57d0
callq 0x59b5
callq 0x5c09
callq 0x5e78
callq 0x627a
callq 0x65ff
movq 0x8463(%rip), %rdi      # 0xefd8
leaq 0x3ad4(%rip), %rsi      # 0xa650
movl $0xe, %edx
callq 0x2110
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/./prelude.h
// Function: std::vector<int, std::allocator<int>> Prelude::concat<std::__cxx11::list<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>, std::vector<int, std::allocator<int>>>(std::__cxx11::list<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)
auto concat(const _Container& c) -> Inner {
  auto res = Inner{};
  for (const auto _c : c) {
    res.insert(std::end(res), std::begin(_c), std::end(_c));
  }
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
cmpq %rsi, %r12
je 0x855a
movq %rsi, %r14
movq %rsp, %r15
leaq 0x10(%r12), %rsi
movq %r15, %rdi
callq 0x7bb2
movq 0x8(%rbx), %rsi
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq 0x7c32
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x8551
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%r12), %r12
cmpq %r14, %r12
jne 0x8519
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x8587
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x8587
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x859b
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/./prelude.h
// Function: std::vector<std::tuple<int, bool>, std::allocator<std::tuple<int, bool>>> Prelude::zip<std::vector, int, std::allocator<int>, std::__cxx11::list, bool, std::allocator<bool>, std::vector, std::tuple<int, bool>, std::allocator<std::tuple<int, bool>>>(std::vector<int, std::allocator<int>> const&, std::__cxx11::list<bool, std::allocator<bool>> const&)
auto zip(const CA<A, AllocA>& left, const CB<B, AllocB>& right)
    -> CRES<RES, AllocRES> {
  auto res = CRES<RES, AllocRES>{};
  auto l = std::begin(left);
  auto r = std::begin(right);
  while (l != std::end(left) && r != std::end(right)) {
    res.emplace_back(*l, *r);
    ++l;
    ++r;
  }
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
movq (%rdx), %r13
cmpq 0x8(%rsi), %r12
setne %al
cmpq %rdx, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x6fd9
movq %rdx, %r14
movq %rsi, %r15
leaq 0x10(%r13), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x88d2
addq $0x4, %r12
cmpq 0x8(%r15), %r12
je 0x6fd9
movq (%r13), %r13
cmpq %r14, %r13
jne 0x6fb7
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6ffd
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/./prelude.h
// Function: std::tuple<std::vector<int, std::allocator<int>>, std::vector<bool, std::allocator<bool>>> Prelude::unzip<std::vector, std::tuple<int, bool>, std::allocator<std::tuple<int, bool>>, std::vector, int, std::allocator<int>, std::vector, bool, std::allocator<bool>>(std::vector<std::tuple<int, bool>, std::allocator<std::tuple<int, bool>>> const&)
auto unzip(const CN<TUP, AllocTUP>& c)
    -> std::tuple<CA<A, AllocA>, CB<B, AllocB>> {
  auto ca = CA<A, AllocA>{};
  auto cb = CB<B, AllocB>{};
  for (const auto& t : c) {
    // wanted to use emplace_back but not
    // available for vector<bool>, maybe use back_inserter...
    ca.push_back(std::get<0>(t));
    cb.push_back(std::get<1>(t));
  }
  return std::make_tuple(ca, cb);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq (%rsi), %r14
movq 0x8(%rsi), %r13
cmpq %r13, %r14
je 0x7303
addq $0x4, %r14
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x72db
movl (%r14), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x72e6
movq %r15, %rdi
movq %r14, %rdx
callq 0x7ece
movzbl -0x4(%r14), %esi
movq %r12, %rdi
callq 0x777e
leaq 0x8(%r14), %rax
addq $0x4, %r14
cmpq %r13, %r14
movq %rax, %r14
jne 0x72bf
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x9346
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x732a
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7340
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x7353
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x736d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7383
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/./prelude.h
// Function: std::tuple<std::vector<int, std::allocator<int>>, std::vector<char, std::allocator<char>>, std::vector<bool, std::allocator<bool>>> Prelude::unzip3<std::vector, std::tuple<int, char, bool>, std::allocator<std::tuple<int, char, bool>>, std::vector, int, std::allocator<int>, std::vector, char, std::allocator<char>, std::vector, bool, std::allocator<bool>>(std::vector<std::tuple<int, char, bool>, std::allocator<std::tuple<int, char, bool>>> const&)
auto unzip3(const CN<TUP, AllocTUP>& c)
    -> std::tuple<CA<A, AllocA>, CB<B, AllocB>, CC<C, AllocC>> {
  auto ca = CA<A, AllocA>{};
  auto cb = CB<B, AllocB>{};
  auto cc = CC<C, AllocC>{};
  for (const auto& t : c) {
    ca.push_back(std::get<0>(t));
    cb.push_back(std::get<1>(t));
    cc.push_back(std::get<2>(t));
  }
  return std::make_tuple(ca, cb, cc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %rax, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq (%rsi), %r13
movq 0x8(%rsi), %rbp
cmpq %rbp, %r13
je 0x743c
leaq 0x20(%rsp), %r14
movq %rsp, %r15
leaq 0x40(%rsp), %r12
leaq 0x4(%r13), %rdx
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x73fb
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x7403
movq %r14, %rdi
callq 0x7ece
leaq 0x1(%r13), %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x741e
movb (%rdx), %al
movb %al, (%rsi)
incq 0x8(%rsp)
jmp 0x7426
movq %r15, %rdi
callq 0x9504
movzbl (%r13), %esi
movq %r12, %rdi
callq 0x777e
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x73dc
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
callq 0x95f6
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7468
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x747e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x7495
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x74a9
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x74c3
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x74d9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x74f0
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_db.cc
// Function: to_string[abi:cxx11](unsigned int, int)
std::string to_string(unsigned int n, int n_digits) {
	std::string r;
	while (n_digits-- > 0 || n > 0) {
		r = std::to_string(n%10) + r;
		n /= 10;
	}
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %edx, %edx
setle %al
testl %esi, %esi
sete %cl
testb %cl, %al
jne 0x3be8
movl %edx, %ebp
movl %esi, %r14d
leaq 0x38(%rsp), %r12
movq %rsp, %r15
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %esi
movq %r15, %rdi
xorl %edx, %edx
callq 0x32a0
movl %r14d, %r13d
movl $0xcccccccd, %eax       # imm = 0xCCCCCCCD
imulq %rax, %r13
shrq $0x23, %r13
leal (,%r13,2), %eax
leal (%rax,%rax,4), %eax
movl %r14d, %edx
subl %eax, %edx
movq (%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x4697
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x3090
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3b7d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3b85
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x32e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bb9
callq 0x3220
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3bcc
callq 0x3220
cmpl $0x2, %ebp
setge %al
cmpl $0xa, %r14d
setae %cl
orb %al, %cl
decl %ebp
movl %r13d, %r14d
testb %cl, %cl
jne 0x3b06
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3c15
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3c15
callq 0x3220
movq (%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x3c24
callq 0x3220
movq %r14, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_db.cc
// Function: DNS_DB::DomainIterator::~DomainIterator()
DNS_DB::DomainIterator::~DomainIterator() {
	for (unsigned int i = 0; i < db->iterators.size(); i++) {
		if (db->iterators[i] == this) {
			db->iterators.erase(db->iterators.begin()+i);
			break;
		}
	}
}

// Assembly:
pushq %rbx
movq 0x30(%rdi), %rbx
movq 0x88(%rbx), %rax
movq 0x90(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x45a4
sarq $0x3, %rcx
movl $0x1, %esi
xorl %r8d, %r8d
cmpq %rdi, (%rax,%r8,8)
je 0x4579
movl %esi, %r8d
incl %esi
cmpq %r8, %rcx
ja 0x4567
jmp 0x45a4
leaq (%rax,%r8,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x4599
leaq (%rax,%r8,8), %rdi
subq %rsi, %rdx
callq 0x33b0
movq 0x90(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::DnsIndex(DNS_DB*)
DNS_DB::DnsIndex::DnsIndex(DNS_DB * db) : database(db) {
	Node n;
	n.dnsblock_id = 0;
	memset(n.min, 0, sizeof(n.min));
	memset(n.max,~0, sizeof(n.min));
	nodes.push_back(n);
	current_id = 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %rsp, %rdx
movdqa %xmm0, (%rdx)
movdqa %xmm0, 0x10(%rdx)
movl $0x0, 0x1f(%rdx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x42(%rdx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x23(%rdx)
movdqu %xmm0, 0x33(%rdx)
xorl %esi, %esi
callq 0x59ce
movl $0x1, 0x20(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4a50
callq 0x3220
movq %r14, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::serialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DNS_DB::DnsIndex::serialize(std::string file) {
	// Write to file
	FILE * fd = fopen(file.c_str(),"wb");
	uint32_t s = nodes.size();
	fwrite(&s, 1, 4, fd);
	for (unsigned int i = 0; i < nodes.size(); i++) {
		fwrite(&nodes[i], 1, MAX_DNS_SIZE*2 + 4, fd);
	}
	fclose(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x5720(%rip), %rsi      # 0xa18c
callq 0x32b0
movq %rax, %r14
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq %rax
imull $0x914c1bad, %eax, %eax # imm = 0x914C1BAD
leaq 0x4(%rsp), %rdi
movl %eax, (%rdi)
movl $0x1, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x3480
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4aea
movl $0x1, %ebp
xorl %ecx, %ecx
movabsq $0x14c1bacf914c1bad, %r15 # imm = 0x14C1BACF914C1BAD
imulq $0x4a, %rcx, %rdi
addq %rax, %rdi
movl $0x1, %esi
movl $0x4a, %edx
movq %r14, %rcx
callq 0x3480
movl %ebp, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
imulq %r15, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x4ab7
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3240
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::unserialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void DNS_DB::DnsIndex::unserialize(const std::string & file) {
	// Read from file
	if (!FileMapper::getInstance().fileExists(file)) {
		fprintf(stderr,"Warning: Could not read DB index!\n");
		return;
	}

	// Discard our own index
	nodes.clear();

	void * fptr = FileMapper::getInstance().mapFile(file);

	uint32_t nblks = *(uint32_t*)fptr;
	char * cptr = (char*)fptr;
	cptr += 4;

	for (unsigned int i = 0; i < nblks; i++) {
		Node * nodeptr = (Node*)cptr;
		nodes.push_back(*nodeptr);
		cptr += MAX_DNS_SIZE*2 + 4;
	}
	FileMapper::getInstance().unmap(fptr);

	// Find the biggest id
	current_id = 0;
	for (unsigned i = 0; i < nodes.size(); i++)
		if (nodes[i].dnsblock_id > current_id)
			current_id = nodes[i].dnsblock_id;
	current_id++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x45b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x785c
testb %al, %al
je 0x4be6
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4b2e
movq %rax, 0x8(%rbx)
callq 0x45b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x74d8
movq %rax, %r14
movl (%rax), %ebp
testl %ebp, %ebp
je 0x4b82
movq %r14, %r15
addq $0x4, %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4b6f
movl $0x4a, %edx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x3200
addq $0x4a, 0x8(%rbx)
jmp 0x4b7a
movq %rbx, %rdi
movq %r15, %rdx
callq 0x59ce
addq $0x4a, %r15
decl %ebp
jne 0x4b4e
callq 0x45b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x7734
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
je 0x4bd3
sarq %rcx
movabsq $0x14c1bacf914c1bad, %rdx # imm = 0x14C1BACF914C1BAD
imulq %rcx, %rdx
addq $0x46, %rax
xorl %ecx, %ecx
movl $0x1, %esi
movl (%rax), %edi
cmpl %ecx, %edi
cmoval %edi, %ecx
movl %esi, %edi
addq $0x4a, %rax
incq %rsi
cmpq %rdi, %rdx
ja 0x4bba
incl %ecx
jmp 0x4bd8
movl $0x1, %ecx
movl %ecx, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x352d
jmp 0x4bdb
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::check()
void DNS_DB::DnsIndex::check() {
	// Check consistency
	for (unsigned int i = 0; i < nodes.size(); i++) {
		if (!less(nodes[i].min, nodes[i].max)) {
			fprintf(stderr, "DB index error!!!\n");
		}
	}

	// Make sure the index is sorted
	for (unsigned int i = 1; i < nodes.size(); i++) {
		if (!less(nodes[i-1].min, nodes[i].min) ||
			!  eq(nodes[i-1].max, nodes[i].min)) {

			fprintf(stderr, "DB index error!!!\n");
		}
	}

	for (unsigned int i = 0; i < nodes.size(); i++) {
		DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[i].dnsblock_id);
		blk->check();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rbp
movq 0x8(%rdi), %r14
movq %r14, %rcx
movabsq $0x14c1bacf914c1bad, %rax # imm = 0x14C1BACF914C1BAD
subq %rbp, %rcx
je 0x4c8f
movl $0x1, %r12d
xorl %eax, %eax
movq 0xa3a9(%rip), %r13      # 0xefd0
leaq 0x5584(%rip), %r15      # 0xa1b2
imulq $0x4a, %rax, %rax
leaq (%rax,%rbp), %rdi
leaq (%rax,%rbp), %rsi
addq $0x23, %rsi
movl $0x23, %edx
callq 0x3110
testl %eax, %eax
jns 0x4c70
movl %r12d, %eax
movq %r14, %rcx
subq %rbp, %rcx
sarq %rcx
movabsq $0x14c1bacf914c1bad, %rdx # imm = 0x14C1BACF914C1BAD
imulq %rdx, %rcx
incl %r12d
cmpq %rax, %rcx
ja 0x4c2e
jmp 0x4c96
movq (%r13), %rcx
movl $0x12, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x3480
movq (%rbx), %rbp
movq 0x8(%rbx), %r14
jmp 0x4c4c
sarq %rcx
imulq %rax, %rcx
cmpq $0x2, %rcx
jb 0x4d36
movl $0x1, %eax
movl $0x2, %r13d
leal -0x2(%r13), %ecx
imulq $0x4a, %rcx, %r15
addq %rbp, %r15
imulq $0x4a, %rax, %r12
addq %rbp, %r12
movl $0x23, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3110
testl %eax, %eax
jns 0x4d0d
addq $0x23, %r15
movl $0x23, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3110
testl %eax, %eax
jne 0x4d0d
movl %r13d, %eax
movq %r14, %rcx
subq %rbp, %rcx
sarq %rcx
movabsq $0x14c1bacf914c1bad, %r12 # imm = 0x14C1BACF914C1BAD
imulq %r12, %rcx
incl %r13d
cmpq %rax, %rcx
ja 0x4cab
jmp 0x4d40
movq 0xa2bc(%rip), %rax      # 0xefd0
movq (%rax), %rcx
movl $0x12, %esi
movl $0x1, %edx
leaq 0x548a(%rip), %rdi      # 0xa1b2
callq 0x3480
movq (%rbx), %rbp
movq 0x8(%rbx), %r14
jmp 0x4ce9
movabsq $0x14c1bacf914c1bad, %r12 # imm = 0x14C1BACF914C1BAD
cmpq %rbp, %r14
je 0x4d9b
movl $0x1, %r15d
xorl %eax, %eax
leaq 0x8(%rsp), %r14
movq 0x18(%rbx), %rsi
imulq $0x4a, %rax, %rax
movl 0x46(%rbp,%rax), %edx
movq %r14, %rdi
callq 0x7e88
movq 0x8(%rsp), %rdi
callq 0x6c40
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4d7f
callq 0x4628
movl %r15d, %eax
movq (%rbx), %rbp
movq 0x8(%rbx), %rcx
subq %rbp, %rcx
sarq %rcx
imulq %r12, %rcx
incl %r15d
cmpq %rax, %rcx
ja 0x4d52
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4dbc
callq 0x4628
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::getIterator(char const*)
DNS_DB::DnsIndex::Iterator DNS_DB::DnsIndex::getIterator(const char * domint) {
	if (domint) {
		int n = lookupNode(domint);
		return DNS_DB::DnsIndex::Iterator(this, n, domint, database);
	}else{
		return DNS_DB::DnsIndex::Iterator(this, 0, 0, database);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x4df3
movq %rdx, %r15
movq %r14, %rdi
movq %rdx, %rsi
callq 0x4928
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movq %r15, %rcx
jmp 0x4e01
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x592a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::replaceIpv4(char const*, IPv4_Record const&, IPv4_Record const&)
void DNS_DB::DnsIndex::replaceIpv4(const char * domain, const IPv4_Record & oldrec, const IPv4_Record & newrec) {
	char domint[MAX_DNS_SIZE];
	if (!domain2idom(domain, domint)) {
		fprintf(stderr, "Domain too long!\n");
		return;
	}

	int n = lookupNode(domint);
	DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[n].dnsblock_id);
	blk->replaceDomainIpv4(domint, oldrec, newrec);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %r15
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x73ac
testb %al, %al
je 0x4e90
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x4928
movq (%r15), %rcx
movq 0x18(%r15), %rsi
cltq
imulq $0x4a, %rax, %rax
movl 0x46(%rcx,%rax), %edx
movq %rsp, %r15
movq %r15, %rdi
callq 0x7e88
movq (%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x686a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4e84
callq 0x4628
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x3595
jmp 0x4e84
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4ea9
callq 0x4628
movq %rbx, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::hasDomain(char const*)
bool DNS_DB::DnsIndex::hasDomain(const char * domain) {
	char domint[MAX_DNS_SIZE];
	if (!domain2idom(domain, domint))
		return false;

	int n = lookupNode(domint);
	DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[n].dnsblock_id);
	
	return blk->hasDomain(domint);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x73ac
testb %al, %al
je 0x5548
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4928
movq (%rbx), %rcx
movq 0x18(%rbx), %rsi
cltq
imulq $0x4a, %rax, %rax
movl 0x46(%rcx,%rax), %edx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x7e88
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x6530
movl %eax, %ebx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x554a
callq 0x4628
jmp 0x554a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5566
callq 0x4628
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::DnsBlock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
DNS_DB::DnsBlock::DnsBlock(const std::string & file, int blkid) {
	if (!FileMapper::getInstance().fileExists(file))
		FileMapper::getInstance().createFile(file, DNS_DB::DnsBlock::blockSize);
	
	void * ptr = FileMapper::getInstance().mapFile(file);

	this->blockptr = (InternalBlock *)ptr;
	this->endptr = &this->blockptr[numBlocks];
	this->blockid = blkid;
	this->bitmap.reset(new Bitmap(numBlocks));

	updateBM();

	assert(sizeof(InternalBlock) == 64);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
callq 0x45b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x785c
testb %al, %al
jne 0x6080
callq 0x45b2
movl 0x9207(%rip), %edx      # 0xf27c
movq %rax, %rdi
movq %r14, %rsi
callq 0x7884
callq 0x45b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x74d8
movq %rax, (%rbx)
movl 0x91e6(%rip), %r14d     # 0xf280
movq %r14, %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
movl %ebp, 0x10(%rbx)
movl $0x18, %edi
callq 0x3250
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
callq 0x7cc0
leaq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x70b2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x610a
movq %rax, %r14
movq %r15, %rdi
callq 0x3220
jmp 0x60f3
jmp 0x60f0
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x6101
callq 0x4628
movq %r14, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::lookupDomain(char const*) const
DNS_DB::DnsBlock::InternalBlock * DNS_DB::DnsBlock::lookupDomain(const char * domain) const {
	// Pick the specified element
	int p;
	int res = lookupEmptyDomainSpot(domain, &p);
	if (res != ALREADY_EXISTS || p < 0 || p >= numBlocks) return 0;

	DNS_DB::DnsBlock::InternalBlock * ptr = &blockptr[p];

	assert(ptr->header & flagDomain);
	assert(memcmp(domain, ptr->data.domain.domain, MAX_DNS_SIZE) == 0);
	
	return ptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc(%rsp), %rdx
callq 0x62c6
xorl %ebx, %ebx
cmpl $-0x2, %eax
jne 0x627a
movl 0xc(%rsp), %eax
testl %eax, %eax
js 0x627a
cmpl 0x9032(%rip), %eax      # 0xf280
jae 0x627a
movq (%r15), %rbx
shlq $0x6, %rax
movb 0x901c(%rip), %cl       # 0xf279
testb %cl, (%rbx,%rax)
je 0x6287
addq %rax, %rbx
leaq 0x1(%rbx), %rsi
movl $0x23, %edx
movq %r14, %rdi
callq 0x3260
testl %eax, %eax
jne 0x62a6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4105(%rip), %rdi      # 0xa393
leaq 0x4064(%rip), %rsi      # 0xa2f9
leaq 0x4110(%rip), %rcx      # 0xa3ac
movl $0x4b, %edx
callq 0x3180
leaq 0x4153(%rip), %rdi      # 0xa400
leaq 0x4045(%rip), %rsi      # 0xa2f9
leaq 0x40f1(%rip), %rcx      # 0xa3ac
movl $0x4c, %edx
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::getIpsv4(int) const
std::vector <IPv4_Record> DNS_DB::DnsBlock::getIpsv4(int p) const {
	std::vector <IPv4_Record> ret;
	const DNS_DB::DnsBlock::InternalBlock * ptr = &blockptr[p];
	if (ptr == 0)
		return ret;

	assert((ptr->header & DNS_DB::DnsBlock::flagDomain) != 0);
	assert((ptr->header & DNS_DB::DnsBlock::flagUsed) != 0);

	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i].ip != 0)
					ret.push_back(ptr->data.domain.records[i]);
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i].ip != 0)
					ret.push_back(ptr->data.records.records[i]);
		}
		ptr++;
	} while (ptr != endptr && !(ptr->header & DNS_DB::DnsBlock::flagDomain) && (ptr->header & DNS_DB::DnsBlock::flagUsed));

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x64c5
movslq %edx, %rdx
shlq $0x6, %rdx
leaq (%rsi,%rdx), %r15
movb (%r15), %al
movb 0x8e90(%rip), %cl       # 0xf279
testb %al, %cl
je 0x64d7
testb %al, 0x8e81(%rip)       # 0xf278
je 0x64f6
leaq (%rdx,%rsi), %r12
addq $0x4, %r12
testb %al, %cl
je 0x6460
leaq 0x24(%r15), %r13
movb $0x1, %bpl
xorl %eax, %eax
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0x8(%r13,%rax,4)
je 0x644e
leaq (,%rax,4), %rdx
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6446
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x644e
movq %rbx, %rdi
callq 0x71aa
movl $0x1, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x6412
jmp 0x649e
xorl %r13d, %r13d
cmpl $0x0, 0x8(%r12,%r13)
je 0x6494
leaq (%r12,%r13), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x648c
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x6494
movq %rbx, %rdi
callq 0x71aa
addq $0xc, %r13
cmpq $0x3c, %r13
jne 0x6463
addq $0x40, %r15
cmpq 0x8(%r14), %r15
je 0x64c5
movb (%r15), %al
movb 0x8dc8(%rip), %cl       # 0xf279
testb %al, %cl
jne 0x64c5
addq $0x40, %r12
testb %al, 0x8db9(%rip)       # 0xf278
jne 0x6405
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f5d(%rip), %rdi      # 0xa43b
leaq 0x3e14(%rip), %rsi      # 0xa2f9
leaq 0x3f81(%rip), %rcx      # 0xa46d
movl $0x58, %edx
callq 0x3180
leaq 0x3faf(%rip), %rdi      # 0xa4ac
leaq 0x3df5(%rip), %rsi      # 0xa2f9
leaq 0x3f62(%rip), %rcx      # 0xa46d
movl $0x59, %edx
callq 0x3180
jmp 0x6517
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6527
callq 0x3220
movq %r14, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::addDomain(char const*)
DNS_DB::queryError DNS_DB::DnsBlock::addDomain(const char * domint) {
	int spot, res;
	res = lookupEmptyDomainSpot(domint, &spot);

	if (res == NO_EMPTY_SPOT) {
		// No spece between records or at the end of the block,
		// we need to do some relocs or split the chunk

		// Try to find a place again
		makeRoomMove(domint);
		res = lookupEmptyDomainSpot(domint,&spot);
		assert(res != ALREADY_EXISTS);  // We would have detected this before, obviously

		if (res == NO_EMPTY_SPOT)
			return resNoSpaceLeft;
	}
	else if (res == ALREADY_EXISTS)
		return resAlreadyExists;

	DNS_DB::DnsBlock::InternalBlock * place = &blockptr[spot];
	assert((!(place->header & DNS_DB::DnsBlock::flagUsed) && !(place->header & DNS_DB::DnsBlock::flagDomain)));

	// Insert the new register
	memset(place, 0, sizeof(InternalBlock));
	place->header = DNS_DB::DnsBlock::flagUsed | DNS_DB::DnsBlock::flagDomain;
	memcpy(place->data.domain.domain, domint, MAX_DNS_SIZE);
	bitmap->setBit(spot,true);

	#ifdef EXTRA_CHECK
	checkBM();
	#endif

	return resOK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
callq 0x62c6
cmpl $-0x2, %eax
je 0x660e
cmpl $-0x1, %eax
jne 0x6596
movq %rbx, %rdi
movq %r14, %rsi
callq 0x665a
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x62c6
movl %eax, %ecx
movl $0x1, %eax
cmpl $-0x1, %ecx
je 0x6613
cmpl $-0x2, %ecx
je 0x663a
movq (%rbx), %rax
movslq 0x4(%rsp), %rcx
movq %rcx, %rdi
shlq $0x6, %rdi
movb (%rax,%rdi), %r8b
movb 0x8cc9(%rip), %dl       # 0xf278
testb %r8b, %dl
jne 0x661b
movb 0x8cbe(%rip), %sil      # 0xf279
testb %r8b, %sil
jne 0x661b
movl %ecx, %ecx
addq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x21(%rax)
movups %xmm0, 0x11(%rax)
movups %xmm0, 0x1(%rax)
orb %dl, %sil
movb %sil, (%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, 0x1(%rax)
movups %xmm1, 0x11(%rax)
movl 0x1f(%r14), %edx
movl $0x1, %esi
shll %cl, %esi
movl %edx, 0x20(%rax)
movq 0x18(%rbx), %rax
movq (%rax), %rax
shrl $0x5, %ecx
orl %esi, (%rax,%rcx,4)
xorl %eax, %eax
jmp 0x6613
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3f0d(%rip), %rdi      # 0xa52f
leaq 0x3cd0(%rip), %rsi      # 0xa2f9
leaq 0x3ec2(%rip), %rcx      # 0xa4f2
movl $0xff, %edx
callq 0x3180
leaq 0x3e9b(%rip), %rdi      # 0xa4dc
leaq 0x3cb1(%rip), %rsi      # 0xa2f9
leaq 0x3ea3(%rip), %rcx      # 0xa4f2
movl $0xf6, %edx
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::replaceDomainIpv4(char const*, IPv4_Record const&, IPv4_Record const&)
bool DNS_DB::DnsBlock::replaceDomainIpv4(const char * domint, const IPv4_Record & oldrec, const IPv4_Record & newrec) {
	DNS_DB::DnsBlock::InternalBlock * ptr = lookupDomain(domint);
	if (ptr == 0)
		return false;

	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i] == oldrec) {
					ptr->data.domain.records[i] = newrec;
					return true;
				}
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i] == oldrec) {
					ptr->data.records.records[i] = newrec;
					return true;
				}
		}

		ptr++;
	} while ( ptr != endptr && (ptr->header & DNS_DB::DnsBlock::flagUsed) && !(ptr->header & DNS_DB::DnsBlock::flagDomain));

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x6220
testq %rax, %rax
je 0x692e
movb 0x89eb(%rip), %dl       # 0xf279
movl 0x8(%r14), %esi
movl (%r14), %edi
movl 0x4(%r14), %r8d
movq 0x8(%r15), %r10
movb 0x89d4(%rip), %r11b     # 0xf278
movb (%rax), %bpl
movq %rax, %r9
addq $0x4, %r9
testb %bpl, %dl
je 0x68ea
leaq 0x24(%rax), %rcx
movb $0x1, %bpl
xorl %r14d, %r14d
leaq (%r14,%r14,2), %r14
cmpl %esi, 0x8(%rcx,%r14,4)
jne 0x68d7
leaq (%rcx,%r14,4), %r14
cmpl %edi, (%r14)
jne 0x68d7
cmpl %r8d, 0x4(%r14)
je 0x6938
movl $0x1, %r14d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x68bd
jmp 0x690a
xorl %ecx, %ecx
cmpl %esi, 0x8(%r9,%rcx)
jne 0x6900
cmpl %edi, (%r9,%rcx)
jne 0x6900
cmpl %r8d, 0x4(%r9,%rcx)
je 0x6932
addq $0xc, %rcx
cmpq $0x3c, %rcx
jne 0x68ec
addq $0x40, %rax
cmpq %r10, %rax
je 0x692e
movb (%rax), %bpl
xorl %ecx, %ecx
testb %dl, %bpl
jne 0x6947
movl %r11d, %r14d
andb %bpl, %r14b
addq $0x40, %r9
testb %r14b, %r14b
jne 0x68ae
jmp 0x6947
xorl %ecx, %ecx
jmp 0x6947
addq %rcx, %r9
movq %r9, %r14
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
movq (%rbx), %rax
movq %rax, (%r14)
movb $0x1, %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::addDomainIpv4_int(char const*, IPv4_Record const&, bool)
bool DNS_DB::DnsBlock::addDomainIpv4_int(const char * domint, const IPv4_Record & iprec, bool ret) {
	DNS_DB::DnsBlock::InternalBlock * ptr = lookupDomain(domint);
	if (ptr == 0)
		return false;

	// Take a look to see whether we can make use of an existing record chain
	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i].ip == 0) {
					ptr->data.domain.records[i] = iprec;
					return true;
				}
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i].ip == 0) {
					ptr->data.records.records[i] = iprec;
					return true;
				}
		}

		ptr++;
	} while ( ptr != endptr && (ptr->header & DNS_DB::DnsBlock::flagUsed) && !(ptr->header & DNS_DB::DnsBlock::flagDomain));

	// We reached here, there is no block which can be reused, try to allocate
	// the next block
	if (ptr != endptr && !(ptr->header & DNS_DB::DnsBlock::flagUsed)) {
		memset(ptr, 0, sizeof(InternalBlock));
		ptr->header = DNS_DB::DnsBlock::flagUsed;
		ptr->data.records.records[0] = iprec;
		updateBM(); // FIXME do this with bit set!
		return true;
	}
	else if (ret) {
		// Try to move blocks away, only once!
		makeRoomMove(domint);
		// Try again now
		return addDomainIpv4_int(domint, iprec, false);
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x6220
testq %rax, %rax
je 0x6a1e
movb 0x88f4(%rip), %sil      # 0xf279
movq 0x8(%r14), %rdi
movb 0x88e9(%rip), %dl       # 0xf278
movb (%rax), %r8b
movq %rax, %rcx
testb %r8b, %sil
je 0x69af
cmpl $0x0, 0x2c(%rcx)
je 0x6a2d
cmpl $0x0, 0x38(%rcx)
jne 0x69c4
jmp 0x6a34
movl $0xc, %eax
cmpl $0x0, (%rcx,%rax)
je 0x6a0b
addq $0xc, %rax
cmpq $0x48, %rax
jne 0x69b4
leaq 0x40(%rcx), %rax
cmpq %rdi, %rax
je 0x69e2
movb (%rax), %r8b
testb %sil, %r8b
jne 0x69dd
movl %edx, %r9d
andb %r8b, %r9b
jne 0x6992
testb %r8b, %dl
je 0x6a49
testb $0x1, %bpl
je 0x6a1e
movq %r14, %rdi
movq %r15, %rsi
callq 0x665a
movq %r14, %rdi
movq %r15, %rsi
callq 0x6220
xorl %ebp, %ebp
testq %rax, %rax
jne 0x697e
jmp 0x6a20
movl 0x8(%rbx), %edx
movl %edx, (%rcx,%rax)
movq (%rbx), %rdx
movq %rdx, -0x8(%rcx,%rax)
movb $0x1, %bpl
jmp 0x6a20
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x24, %eax
jmp 0x6a39
movl $0x30, %eax
movl 0x8(%rbx), %edx
movl %edx, 0x8(%rcx,%rax)
movq (%rbx), %rdx
movq %rdx, (%rcx,%rax)
jmp 0x6a19
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rcx)
movups %xmm0, 0x61(%rcx)
movups %xmm0, 0x51(%rcx)
movups %xmm0, 0x41(%rcx)
movb %dl, 0x40(%rcx)
movq (%rbx), %rax
movq %rax, 0x44(%rcx)
movl 0x8(%rbx), %eax
movl %eax, 0x4c(%rcx)
movq %r14, %rdi
callq 0x610a
jmp 0x6a19