// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb8, %rsp
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf569(%rip), %rsi      # 0x151ba
leaq 0xf56e(%rip), %rdx      # 0x151c6
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x62de
leaq 0x78(%rsp), %r14
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf54a(%rip), %rsi      # 0x151c7
leaq 0xf54d(%rip), %rdx      # 0x151d1
movq %r14, %rdi
callq 0x62de
leaq 0x98(%rsp), %r14
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xf52b(%rip), %rsi      # 0x151d2
leaq 0xf52f(%rip), %rdx      # 0x151dd
movq %r14, %rdi
callq 0x62de
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
callq 0x63fc
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r12, %rsi
callq 0x48ec
leaq 0x40(%rsp), %rdi
callq 0x6444
movq $-0x60, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x5d07
movq (%r13), %rsi
incq %rsi
callq 0x4320
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x5cf2
movq 0x20(%rsp), %r14
cmpq 0x8(%rbp), %r14
jne 0x5d44
movq %rbp, %rbx
testq %r14, %r14
je 0x5e2a
movq (%rbp), %rsi
movq 0x18(%rsp), %rdi
movq %r14, %rdx
callq 0x4340
movq %rbp, %rbx
testl %eax, %eax
je 0x5e2a
movq 0x28(%rbp), %r13
movq %rbp, 0x10(%rsp)
movq 0x30(%rbp), %r12
cmpq %r12, %r13
sete %bpl
je 0x5db6
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq (%r13), %r15
movq 0x8(%r15), %rdx
cmpq %r14, %rdx
jne 0x5d8a
testq %rdx, %rdx
je 0x5d8e
movq (%r15), %rdi
movq 0x38(%rsp), %rsi
callq 0x4340
testl %eax, %eax
sete %al
jmp 0x5d90
xorl %eax, %eax
jmp 0x5d90
movb $0x1, %al
testb %al, %al
je 0x5da3
incl 0x20(%r15)
movq 0x10(%rsp), %rcx
incl 0x20(%rcx)
movq %r15, %rbx
testb %al, %al
jne 0x5db6
addq $0x8, %r13
cmpq %r12, %r13
sete %bpl
jne 0x5d64
jmp 0x5db6
testb $0x1, %bpl
je 0x5e2d
movl $0x40, %edi
callq 0x4310
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movq 0x18(%rsp), %rsi
addq %rsi, %r14
movq %r15, %rdi
movq %r14, %rdx
callq 0x6d00
movq 0x10(%rsp), %rbp
leaq 0x28(%rbp), %rdi
movl $0x0, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
movq $0x0, 0x38(%r15)
leaq 0x58(%rsp), %rsi
movq %r15, (%rsi)
callq 0x64a0
leaq 0x58(%rsp), %rdi
callq 0x63b0
movq 0x30(%rbp), %rax
movq -0x8(%rax), %rbx
movl $0x1, 0x20(%rbx)
incl 0x20(%rbp)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e48
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4320
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x63b0
jmp 0x5e81
movq %rax, %rbx
movl $0x40, %esi
movq %r15, %rdi
callq 0x4320
jmp 0x5e81
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f2c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4320
jmp 0x5f2c
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x6444
jmp 0x5eb7
movq %rax, %rbx
xorl %r12d, %r12d
movq 0x98(%rsp,%r12), %rdi
leaq (%r12,%r13), %rax
cmpq %rdi, %rax
je 0x5ed6
movq (%rax), %rsi
incq %rsi
callq 0x4320
addq $-0x20, %r12
cmpq $-0x60, %r12
jne 0x5eba
movb $0x1, %al
jmp 0x5ef5
jmp 0x5ee6
movq %rax, %rbx
xorl %eax, %eax
jmp 0x5ef5
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x5f2c
addq $-0x10, %r14
leaq 0x58(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x5f1c
movq (%r14), %rsi
incq %rsi
callq 0x4320
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x5f08
movq %rbx, %rdi
callq 0x4520