// File: agorenst[P]trie/./radixtree.h
// Function: void node<int>::insert<std::reverse_iterator<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int>>>>>(std::reverse_iterator<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int>>>>, std::reverse_iterator<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int>>>>)
void insert(Iter first, Iter last) {
                auto edge_iter = edge_to_follow(*first);

                // if no edge has any prefix with [first, last) then we make a new edge.
                if (edge_iter == edge_list.end()) {
                    edge to_add(std::list<T>(first, last), std::shared_ptr<node>(new node));
                    edge_list.push_back(to_add);
                    return;
                }

                auto edge_first = edge_iter->first.begin();
                auto edge_last = edge_iter->first.end();

                // this loop should always run at least once
                // we "consume" the common prefix between [edge_first, edge_list) and [first, last)
                std::list<T> prefix;
                while (first != last &&
                        edge_first != edge_last &&
                        (*edge_first) == (*first)) {
                    prefix.push_back(*first);
                    ++edge_first;
                    ++first;
                }
                assert(prefix.size() > 0);

                // this string is already included
                if (first == last && edge_first == edge_last) {
                    return;
                }
                // we input a superstring, ie, input = "abcde", edge = "abc"
                // recurse to the child
                if (first != last && edge_first == edge_last) {
                    return edge_iter->second->insert(first, last);
                }
                // something about the input sequence means we have to make a new node.
                if (edge_first != edge_last) {
                    // we clip off the prefix, this creates a copy edge with only the suffix sequence
                    edge clipped_orig(std::list<T>(edge_first, edge_last), edge_iter->second);

                    // this creates the new intermediary node
                    edge prefix_edge(prefix, std::shared_ptr<node>(new node(std::list<edge>{clipped_orig})));

                    edge_list.erase(edge_iter); // erase the old copy of our edge

                    edge_list.push_back(prefix_edge); // ok, we've rebuilt the tree with the new node.

                    if (first != last) {
                        prefix_edge.second->insert(first, last);
                    }
                    return;

                }
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rsi, -0x220(%rbp)
movq %rdi, %rax
movq -0x220(%rbp), %rdi
movq %rdi, -0x218(%rbp)
movq %rdx, -0x210(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x208(%rbp)
callq 0x4770
movq -0x208(%rbp), %rdi
movl (%rax), %esi
callq 0x46e0
movq -0x208(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x47d0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x47a0
testb $0x1, %al
jne 0x3d8e
jmp 0x3f13
movq -0x218(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x4680
movq -0x210(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x4680
leaq -0x79(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x4800
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
movq -0x228(%rbp), %rcx
leaq -0x68(%rbp), %rdi
callq 0x4820
jmp 0x3dec
movl $0x18, %edi
callq 0x2120
movq %rax, -0x240(%rbp)
jmp 0x3dff
movq -0x240(%rbp), %rdi
callq 0x2ac0
jmp 0x3e0d
movq -0x240(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x2af0
jmp 0x3e22
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x48e0
jmp 0x3e38
leaq -0xa0(%rbp), %rdi
callq 0x28f0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x79(%rbp), %rdi
callq 0x4910
movq -0x208(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4930
jmp 0x3e68
leaq -0x50(%rbp), %rdi
callq 0x30f0
jmp 0x4651
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x3ee5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x3edc
movq -0x240(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
callq 0x2100
jmp 0x3edc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x28f0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x79(%rbp), %rdi
callq 0x4910
jmp 0x4666
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x30f0
jmp 0x4666
leaq -0x20(%rbp), %rdi
callq 0x4970
movq %rax, %rdi
callq 0x4990
movq %rax, -0xa8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4970
movq %rax, %rdi
callq 0x49c0
movq %rax, -0xb0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x49f0
movq -0x210(%rbp), %rsi
movq -0x218(%rbp), %rdi
callq 0x4a10
movb %al, -0x241(%rbp)
jmp 0x3f6a
movb -0x241(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x242(%rbp)
jne 0x3f7f
jmp 0x3fe4
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4a40
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x242(%rbp)
jne 0x3fa3
jmp 0x3fe4
leaq -0xa8(%rbp), %rdi
callq 0x4a70
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x254(%rbp)
callq 0x4770
movq %rax, -0x250(%rbp)
jmp 0x3fcc
movl -0x254(%rbp), %eax
movq -0x250(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
movb %al, -0x242(%rbp)
movb -0x242(%rbp), %al
testb $0x1, %al
jne 0x3ff0
jmp 0x4050
movq -0x218(%rbp), %rdi
callq 0x4770
movq %rax, -0x260(%rbp)
jmp 0x4005
movq -0x260(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4a90
jmp 0x401a
leaq -0xa8(%rbp), %rdi
callq 0x4ad0
movq -0x218(%rbp), %rdi
callq 0x4af0
jmp 0x4034
jmp 0x3f4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x465a
leaq -0xc8(%rbp), %rdi
callq 0x4b20
cmpq $0x0, %rax
jbe 0x4064
jmp 0x4083
leaq 0x3077(%rip), %rdi      # 0x70e2
leaq 0x3082(%rip), %rsi      # 0x70f4
movl $0x38, %edx
leaq 0x3084(%rip), %rcx      # 0x7102
callq 0x20d0
movq -0x210(%rbp), %rsi
movq -0x218(%rbp), %rdi
callq 0x4b50
movb %al, -0x261(%rbp)
jmp 0x409e
movb -0x261(%rbp), %al
testb $0x1, %al
jne 0x40aa
jmp 0x40d2
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4b90
testb $0x1, %al
jne 0x40c3
jmp 0x40d2
movl $0x1, -0xcc(%rbp)
jmp 0x4645
movq -0x210(%rbp), %rsi
movq -0x218(%rbp), %rdi
callq 0x4a10
movb %al, -0x262(%rbp)
jmp 0x40ed
movb -0x262(%rbp), %al
testb $0x1, %al
jne 0x40fc
jmp 0x4186
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4b90
testb $0x1, %al
jne 0x4115
jmp 0x4186
leaq -0x20(%rbp), %rdi
callq 0x4970
movq %rax, %rdi
addq $0x18, %rdi
callq 0x3cf0
movq -0x218(%rbp), %rsi
movq %rax, -0x270(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x4680
jmp 0x4146
movq -0x210(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x4680
jmp 0x415b
movq -0x270(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x3d10
jmp 0x4177
movl $0x1, -0xcc(%rbp)
jmp 0x4645
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4a40
testb $0x1, %al
jne 0x41a2
jmp 0x463b
movq -0xa8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x4800
movq -0x278(%rbp), %rcx
movq -0x128(%rbp), %rsi
movq -0x130(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x4bc0
jmp 0x41f4
leaq -0x20(%rbp), %rdi
callq 0x4970
movq %rax, %rsi
addq $0x18, %rsi
leaq -0x148(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x4c50
movq -0x280(%rbp), %rdx
leaq -0x108(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x48e0
jmp 0x4233
leaq -0x148(%rbp), %rdi
callq 0x28f0
leaq -0x120(%rbp), %rdi
callq 0x3140
leaq -0x131(%rbp), %rdi
callq 0x4910
movl $0x18, %edi
callq 0x2120
movq %rax, -0x288(%rbp)
jmp 0x426a
movb $0x1, -0x1da(%rbp)
leaq -0x1d0(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
leaq -0x108(%rbp), %rsi
callq 0x4c80
jmp 0x428d
leaq -0x1d0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq $0x1, -0x1a0(%rbp)
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x4cb0
movq -0x290(%rbp), %rcx
movq -0x1a8(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
leaq -0x198(%rbp), %rdi
callq 0x4cd0
jmp 0x42dc
movq -0x288(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x4d80
jmp 0x42f1
movq -0x288(%rbp), %rsi
movb $0x0, -0x1da(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x2af0
jmp 0x430d
leaq -0x170(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x48e0
jmp 0x4329
leaq -0x180(%rbp), %rdi
callq 0x28f0
leaq -0x198(%rbp), %rdi
callq 0x2f00
leaq -0x1d9(%rbp), %rdi
callq 0x4db0
leaq -0x1d0(%rbp), %rax
movq %rax, -0x2a0(%rbp)
addq $0x28, %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x30f0
movq -0x2a0(%rbp), %rcx
movq -0x2a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x298(%rbp)
jne 0x4366
leaq -0x1e8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4e20
movq -0x208(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
callq 0x4dd0
movq -0x208(%rbp), %rdi
movq %rax, -0x1f0(%rbp)
leaq -0x170(%rbp), %rsi
callq 0x4930
jmp 0x43d6
movq -0x210(%rbp), %rsi
movq -0x218(%rbp), %rdi
callq 0x4a10
movb %al, -0x2a9(%rbp)
jmp 0x43f1
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0x4400
jmp 0x4609
leaq -0x158(%rbp), %rdi
callq 0x3cf0
movq -0x218(%rbp), %rsi
movq %rax, -0x2b8(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x4680
jmp 0x4428
movq -0x210(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x4680
jmp 0x443d
movq -0x2b8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x3d10
jmp 0x4459
jmp 0x4609
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x449c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x28f0
leaq -0x120(%rbp), %rdi
callq 0x3140
leaq -0x131(%rbp), %rdi
callq 0x4910
jmp 0x465a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x462d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
movq -0x1d8(%rbp), %rax
leaq -0x1d0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x2c0(%rbp)
je 0x4521
movq -0x2c0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x30f0
movq -0x2c8(%rbp), %rax
leaq -0x1d0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x2c0(%rbp)
jne 0x44f0
jmp 0x45d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4578
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x456c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x28f0
leaq -0x198(%rbp), %rdi
callq 0x2f00
leaq -0x1d9(%rbp), %rdi
callq 0x4db0
leaq -0x1d0(%rbp), %rax
movq %rax, -0x2d8(%rbp)
addq $0x28, %rax
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x30f0
movq -0x2d8(%rbp), %rcx
movq -0x2e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2d0(%rbp)
jne 0x459d
jmp 0x45d0
testb $0x1, -0x1da(%rbp)
jne 0x45db
jmp 0x45e7
movq -0x288(%rbp), %rdi
callq 0x2100
jmp 0x462d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x30f0
jmp 0x462d
movl $0x1, -0xcc(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x30f0
leaq -0x108(%rbp), %rdi
callq 0x30f0
jmp 0x4645
leaq -0x108(%rbp), %rdi
callq 0x30f0
jmp 0x465a
movl $0x0, -0xcc(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x3140
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
leaq -0xc8(%rbp), %rdi
callq 0x3140
movq -0x88(%rbp), %rdi
callq 0x21d0
nopw %cs:(%rax,%rax)
nopl (%rax)