// File: /workspace/github_cpp_makefile_star2_O3/ahupowerdns[P]spamidea/getsender.cc
// Function: MailTreeNode::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MailTreeNode* add(const std::string& name)
  {
    string rname = flattenDomain(name, {"sendgrid.net", "github.net", "outlook.com"});

    if(rname == d_name) {
      ++d_count;
      return this;
    }
    
    for(auto& mtn : d_children) {
      if(mtn->d_name == rname) {
        ++mtn->d_count;
        ++d_count;
        return mtn.get();
      }
    }
    d_children.emplace_back(std::make_unique<MailTreeNode>(rname));
    (*d_children.rbegin())->d_count = 1;
    ++d_count;
    return d_children.rbegin()->get();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf551(%rip), %rsi      # 0x151ba
leaq 0xf556(%rip), %rdx      # 0x151c6
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x62b4
leaq 0x68(%rsp), %r15
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf535(%rip), %rsi      # 0x151c7
leaq 0xf538(%rip), %rdx      # 0x151d1
movq %r15, %rdi
callq 0x62b4
leaq 0x88(%rsp), %r15
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xf516(%rip), %rsi      # 0x151d2
leaq 0xf51a(%rip), %rdx      # 0x151dd
movq %r15, %rdi
callq 0x62b4
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
callq 0x63de
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r12, %rsi
callq 0x48ec
leaq 0x30(%rsp), %rdi
callq 0x6426
movq $-0x60, %r14
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x5d1c
movq (%r13), %rsi
incq %rsi
callq 0x4320
addq $-0x20, %r13
addq $0x20, %r14
jne 0x5d07
movq 0x18(%rsp), %r14
cmpq 0x8(%rbx), %r14
jne 0x5d58
movq %rbx, %r15
testq %r14, %r14
je 0x5e08
movq (%rbx), %rsi
movq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x4340
movq %rbx, %r15
testl %eax, %eax
je 0x5e08
movq 0x28(%rbx), %r13
movq 0x30(%rbx), %rbp
cmpq %rbp, %r13
je 0x5d98
movq 0x10(%rsp), %r12
movq (%r13), %r15
cmpq %r14, 0x8(%r15)
jne 0x5d8f
testq %r14, %r14
je 0x5e04
movq (%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x4340
testl %eax, %eax
je 0x5e04
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x5d6a
movl $0x40, %edi
callq 0x4310
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movq 0x10(%rsp), %rsi
addq %rsi, %r14
movq %r15, %rdi
movq %r14, %rdx
callq 0x6cce
leaq 0x28(%rbx), %rdi
movl $0x0, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
movq $0x0, 0x38(%r15)
leaq 0x48(%rsp), %rsi
movq %r15, (%rsi)
callq 0x6484
leaq 0x48(%rsp), %rdi
callq 0x6392
movq 0x30(%rbx), %rax
movq -0x8(%rax), %r15
movl $0x1, 0x20(%r15)
jmp 0x5e08
incl 0x20(%r15)
incl 0x20(%rbx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e26
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4320
movq %r15, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6392
jmp 0x5e5f
movq %rax, %rbx
movl $0x40, %esi
movq %r15, %rdi
callq 0x4320
jmp 0x5e5f
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5eeb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4320
jmp 0x5eeb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6426
jmp 0x5e8e
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x88(%rsp,%r14), %rdi
leaq (%r14,%r13), %rax
cmpq %rdi, %rax
je 0x5ead
movq (%rax), %rsi
incq %rsi
callq 0x4320
addq $-0x20, %r14
cmpq $-0x60, %r14
jne 0x5e91
jmp 0x5eeb
jmp 0x5ebb
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x5ed6
movq (%r15), %rsi
incq %rsi
callq 0x4320
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x5ec2
jmp 0x5eeb
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4520
nop