// File: /workspace/github_c_makefile_star2_O1/jflatow[P]jfdb/src/trie.c
// Function: splice_new
static JFT_Status splice_new(JFT_Cursor *cursors,
                             JFT_MergeContext *ctx,
                             JFT_Phase phase) {
  // determine what to do based on the most recent / highest precedence cursor
  // (cursors should be given in order of recency / precedence)
  JFT_MergeFrame *frame = ctx->frame;
  JFT_Mask active = frame->active;
  JFT_Amount b = ffsll(active);
  JFT_Cursor *cursor = cursors + b - 1;
  JFT_Cons *cons = (JFT_Cons *)ctx->acc;
  JFT_Buffer *buf = cons->buffer;
  JFT_NodeType type = JFT_node_type(cursor->node);

  if (phase == Out) {
    // do nothing during phase out, except finishing touches
    // copy the changed root data back into the buffer
    if (type == Root) {
      JFT_Root *root = (JFT_Root *)buf->data;
      root->extent = buf->mark;
      root->numPrimary = cons->root.numPrimary;
      root->numIndices = cons->root.numIndices;
      root->maxIndices = cons->root.maxIndices;
      root->maxKeySize = ctx->maxKeySize;
    }
    return Ok;
  }

  if (type == Root) {
    // on the root: make space for the new root in buffer
    // root is a parent, mark it's offset before writing
    frame->offset = buf->mark;
    if (!make_root(buf))
      return ENoMem;

    // keep a root in cons and update it later (NB: cannot rely on buf pointers)
    // allocate memory to store the compressed stem before we write it
    cons->root.head = JFT_head(Root, False, 0, 0, 0);
    cons->stem = (JFT_Stem) {.data = malloc(ctx->maxKeySize)};
    if (cons->stem.data == NULL)
      return ENoMem;

    // allocate the iterators for indices
    cons->iters = malloc(ctx->numCursors * sizeof(JFT_Iter));

    // allocate the offset translation tables for indices (if we are translating)
    if (!(ctx->flags & JFT_FLAGS_ATOM)) {
      cons->TLBs = malloc(ctx->numCursors * sizeof(JFT_Offset *));
      cons->TLBSizes = calloc(ctx->numCursors, sizeof(JFT_Count));
      for (JFT_Amount k = 0; k < ctx->numCursors; k++)
        cons->TLBs[k] = malloc(2 * ((JFT_Root *)cursors[k].root)->numPrimary * sizeof(JFT_Offset));
    }

    // step into the tree
    return Step;
  }

  // add the symbol to the budding stem
  // if its a keyspace, mark the keyspace in the cons
  if (cursor->symbol == JFT_SYMBOL_PRIMARY ||
      cursor->symbol == JFT_SYMBOL_INDICES) {
      cons->stem.pre = cons->keySpace = cursor->symbol;
      cons->stem.size++;
  } else {
      cons->stem.data[cons->stem.size - (cons->stem.pre ? 1 : 0)] = cursor->symbol;
      cons->stem.size++;
  }

  // if cursor is on a terminal node: overwrite
  if (JFT_cursor_at_terminal(cursor)) {
    int doTranslate = !(ctx->flags & JFT_FLAGS_ATOM);
    JFT_Leaf leaf = JFT_leaf(cursor->node);
    // simply skip empty leaves: the offset in parent will remain zero and thus will not branch
    // eventually (next merge), the node will get phased out of the trie completely
    if ((ctx->flags & JFT_FLAGS_PRUNE) && leaf.size == 0)
      return Next;

    if (cons->keySpace == JFT_SYMBOL_PRIMARY) {
      // at value node
      // if we are translating, store the translation of old value offset to new
      if (doTranslate) {
        cons->TLBs[b - 1][cons->TLBSizes[b - 1]++] = cursor->node - cursor->root;
        cons->TLBs[b - 1][cons->TLBSizes[b - 1]++] = buf->mark;
      }

      // emit the leaf node
      frame->offset = buf->mark;
      if (!make_leaf(buf, (frame - 1)->offset, &cons->stem, &leaf))
        return ENoMem;

      cons->root.numPrimary++;
    } else {
      // at index node
      // wrap each cursors' words in an iterator
      // which yields batches of sorted (maybe translated) words
      JFT_Count maxWords = 0, numWords = 0;
      do {
        cursor = cursors + b - 1;
        leaf = JFT_leaf(cursor->node);
        if (!(JFT_cursor_at_terminal(cursor)))
          break;
        if (doTranslate) {
          // use a translation iterator, translates a static size batch at a time
          cons->iters[b - 1] = JFT_iter_trans(leaf, cons->TLBs[b - 1], cons->TLBSizes[b - 1]);
        } else {
          // use an iterator that just returns the raw leaf words in one batch
          cons->iters[b - 1] = JFT_iter_leaf(leaf);
        }
        maxWords += leaf.size;
      } while ((b = ffsll(active &= active - 1)));

      // emit the leaf node using an upper bound on the number of words
      frame->offset = buf->mark;
      if (!(prep_leaf(buf, (frame - 1)->offset, &cons->stem, maxWords)))
        return ENoMem;

      // write the indices, count the actual words
      JFT_Iter i = JFT_iter_any(cons->iters, frame->active ^ active);
      do {
        JFT_buffer_paste(buf, i.batch.data, i.batch.size * sizeof(JFT_Word));
        numWords += i.batch.size;
      } while (JFT_iter_next(&i));

      // correct the leaf node using the actual number of words
      edit_leaf(buf, frame->offset, &cons->stem, maxWords, numWords);

      if (numWords > cons->root.maxIndices)
        cons->root.maxIndices = numWords;
      cons->root.numIndices++;
    }

    // reset the bud
    cons->stem.pre = 0;
    cons->stem.size = 0;

    // done with this subtree
    return Next;
  }

  // cursor is non-terminal, maybe emit a branch
  // look at the other cursors and count # unique subsequent symbols
  JFT_Range range = {.min = 255, .max = 0};
  JFT_SymbolSet set = {};
  int count;
  do {
    if (cursor->symbol != JFT_SYMBOL_ANY)
      JFT_cursor_mark_subsequent(cursor, &range, &set);
    b = ffsll(active &= active - 1);
  } while (b && !JFT_cursor_at_terminal(cursor = cursors + b - 1));

  if ((count = JFT_symbol_set_count(&set)) > 1) {
    // more than one possible symbol: emit a branch node
    frame->offset = buf->mark;
    if (!make_branch(buf, (frame - 1)->offset, &cons->stem, &range, &set, count))
      return ENoMem;

    // reset the bud
    cons->stem.pre = 0;
    cons->stem.size = 0;
  }
  return Step;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r15
movq 0x8(%rsi), %r11
movq 0x20(%rsi), %r13
movq 0x8(%r11), %rbp
bsfq %rbp, %rcx
movq $-0x1, %rax
cmovneq %rcx, %rax
incq %rax
imulq $0x38, %rax, %rsi
movq (%r13), %rbx
movq -0x30(%rdi,%rsi), %rcx
movq (%rcx), %rcx
cmpl $-0x1, %edx
je 0x47c1
movq %rdi, %r14
shrq $0x3e, %rcx
jne 0x47fc
movq 0x10(%rbx), %rax
movq %rax, 0x18(%r11)
movl $0x30, %esi
movq %rbx, %rdi
callq *0x20(%rbx)
movl $0x5, %ebp
testq %rbx, %rbx
je 0x4f8e
testl %eax, %eax
jne 0x4f8e
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rcx,%rax)
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
addq $0x30, 0x10(%rbx)
je 0x4f8e
xorl %ebx, %ebx
movq %rbx, 0x10(%r13)
movzwl 0x10(%r15), %edi
callq 0x1150
movq %rbx, 0x40(%r13)
movw $0x0, 0x48(%r13)
movq %rax, 0x50(%r13)
testq %rax, %rax
je 0x4f8e
movq 0x18(%r15), %rbx
imulq $0xc8, %rbx, %rdi
callq 0x1150
movq %rax, 0x58(%r13)
movl $0x1, %ebp
testb $0x4, 0x28(%r15)
jne 0x4f8e
leaq (,%rbx,8), %rdi
callq 0x1150
movq %rax, 0x60(%r13)
movl $0x4, %esi
movq %rbx, %rdi
callq 0x1120
movq %rax, 0x68(%r13)
testq %rbx, %rbx
je 0x4f8e
xorl %r15d, %r15d
movq (%r14), %rax
movl 0x20(%rax), %edi
addl %edi, %edi
shlq $0x3, %rdi
callq 0x1150
movq 0x60(%r13), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
addq $0x38, %r14
cmpq %r15, %rbx
jne 0x4797
jmp 0x4f8e
xorl %ebp, %ebp
shrq $0x3e, %rcx
jne 0x4f8e
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rax, 0x18(%rcx)
movl 0x30(%r13), %eax
movl %eax, 0x20(%rcx)
movl 0x34(%r13), %eax
movl %eax, 0x24(%rcx)
movl 0x38(%r13), %eax
movl %eax, 0x28(%rcx)
movzwl 0x10(%r15), %eax
movw %ax, 0x2c(%rcx)
jmp 0x4f8e
leaq (%r14,%rsi), %rcx
movq -0x8(%rcx), %rdx
leaq 0x5(%rdx), %rdi
cmpq $0x1, %rdi
ja 0x4818
movq %rdx, 0x8(%r13)
movq %rdx, 0x40(%r13)
jmp 0x482e
movq 0x50(%r13), %rdi
cmpq $0x1, 0x40(%r13)
movzwl 0x48(%r13), %r8d
adcq $-0x1, %rdi
movb %dl, (%rdi,%r8)
leaq (%r14,%rsi), %rdx
addq $-0x38, %rdx
movabsq $-0x4000000000000001, %r9 # imm = 0xBFFFFFFFFFFFFFFF
incw 0x48(%r13)
movq -0x30(%rcx), %rsi
movq (%rsi), %rsi
shrq $0x3e, %rsi
cmpl $0x3, %esi
jb 0x48bd
movzwl -0x20(%rcx), %esi
decq %rsi
cmpq %rsi, -0x10(%rcx)
jne 0x48bd
movl 0x28(%r15), %esi
movl %esi, 0xc(%rsp)
movq -0x30(%rcx), %rcx
movq (%rcx), %rsi
movq %rsi, %r15
shrq $0x28, %r15
movl $0xff, %edi
andl %edi, %r15d
shrq $0x30, %rsi
andl $0xfff, %esi            # imm = 0xFFF
leaq (%rcx,%rsi), %r12
addq $0x8, %r12
cmpl %edi, %r15d
jne 0x489f
movl (%r12), %r15d
addq $0x4, %r12
testb $0x2, 0xc(%rsp)
je 0x4bd1
testl %r15d, %r15d
jne 0x4bd1
movl $0x2, %ebp
jmp 0x4f8e
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movl $0xff, %r15d
xorl %r12d, %r12d
leaq 0x2b06(%rip), %rax      # 0x73e0
cmpq $-0x1, 0x30(%rdx)
je 0x49ac
movq 0x28(%rdx), %rsi
movzwl 0x18(%rdx), %ecx
decq %rcx
cmpq %rcx, %rsi
jne 0x4969
movq 0x8(%rdx), %rsi
movq (%rsi), %rdi
movq %rdi, %rcx
shrq $0x3e, %rcx
cmpq $0x2, %rcx
je 0x49e6
cmpl $0x1, %ecx
jne 0x49ac
movq %rdi, %rcx
shrq $0x28, %rcx
testb %cl, %cl
je 0x49ac
shrq $0x30, %rdi
andl $0xfff, %edi            # imm = 0xFFF
leaq (%rsi,%rdi), %rdx
addq $0x8, %rdx
movzbl %cl, %esi
xorl %edi, %edi
movzbl (%rdx,%rdi), %ecx
cmpq %rcx, %r15
cmovaeq %rcx, %r15
cmpq %rcx, %r12
cmovbeq %rcx, %r12
movl $0x1, %r8d
shlq %cl, %r8
shrl $0x6, %ecx
orq %r8, 0x30(%rsp,%rcx,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x493c
jmp 0x49ac
incq %rsi
movq 0x10(%rdx), %rcx
testq %rcx, %rcx
je 0x4986
testq %rsi, %rsi
je 0x498d
movq 0x20(%rdx), %rcx
addq %rcx, %rsi
decq %rsi
jmp 0x498a
addq 0x20(%rdx), %rsi
movzbl (%rsi), %ecx
cmpq %rcx, %r15
cmovaeq %rcx, %r15
cmpq %rcx, %r12
cmovbeq %rcx, %r12
movl $0x1, %edx
shlq %cl, %rdx
shrq $0x6, %rcx
orq %rdx, 0x30(%rsp,%rcx,8)
leaq -0x1(%rbp), %rcx
andq %rcx, %rbp
je 0x4a4b
bsfq %rbp, %rcx
imulq $0x38, %rcx, %rcx
leaq (%r14,%rcx), %rdx
movq 0x8(%r14,%rcx), %rcx
cmpq %r9, (%rcx)
jbe 0x48da
movzwl 0x18(%rdx), %ecx
decq %rcx
cmpq %rcx, 0x28(%rdx)
jne 0x48da
jmp 0x4a4b
movq %rdi, %rcx
shrq $0x28, %rcx
movzbl %cl, %edx
shll $0x4, %edx
movq (%rdx,%rax), %rcx
movq 0x8(%rdx,%rax), %rdx
cmpq %rdx, %rcx
ja 0x49ac
shrq $0x30, %rdi
andl $0xfff, %edi            # imm = 0xFFF
addq %rdi, %rsi
addq $0x8, %rsi
cmpq $0x0, (%rsi)
je 0x4a3a
cmpq %rcx, %r15
cmovaeq %rcx, %r15
cmpq %rcx, %r12
cmovbeq %rcx, %r12
movl $0x1, %edi
shlq %cl, %rdi
movq %rcx, %r8
shrq $0x6, %r8
orq %rdi, 0x30(%rsp,%r8,8)
incq %rcx
addq $0x8, %rsi
cmpq %rdx, %rcx
jbe 0x4a12
jmp 0x49ac
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %r8
movq %rdx, %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq %rcx, %rax
subq %rax, %rdx
movabsq $0x3333333333333333, %rax # imm = 0x3333333333333333
movq %rdx, %rsi
andq %rax, %rsi
shrq $0x2, %rdx
andq %rax, %rdx
addq %rsi, %rdx
movq %rdx, %r9
shrq $0x4, %r9
addq %rdx, %r9
movabsq $0xf0f0f0f0f0f0f0f, %rdx # imm = 0xF0F0F0F0F0F0F0F
andq %rdx, %r9
movabsq $0x101010101010101, %rsi # imm = 0x101010101010101
imulq %rsi, %r9
shrq $0x38, %r9
movq %r8, %rdi
shrq %rdi
andq %rcx, %rdi
subq %rdi, %r8
movq %r8, %rdi
andq %rax, %rdi
shrq $0x2, %r8
andq %rax, %r8
addq %rdi, %r8
movq %r8, %rdi
shrq $0x4, %rdi
addq %r8, %rdi
andq %rdx, %rdi
imulq %rsi, %rdi
shrq $0x38, %rdi
addl %r9d, %edi
movq 0x40(%rsp), %r9
movq %r9, %r8
shrq %r8
andq %rcx, %r8
subq %r8, %r9
movq %r9, %r8
andq %rax, %r8
shrq $0x2, %r9
andq %rax, %r9
addq %r8, %r9
movq %r9, %r8
shrq $0x4, %r8
addq %r9, %r8
andq %rdx, %r8
imulq %rsi, %r8
shrq $0x38, %r8
movq 0x48(%rsp), %r9
movq %r9, %r10
shrq %r10
andq %rcx, %r10
subq %r10, %r9
movq %r9, %rcx
andq %rax, %rcx
shrq $0x2, %r9
andq %rax, %r9
addq %rcx, %r9
movq %r9, %r14
shrq $0x4, %r14
addq %r9, %r14
andq %rdx, %r14
imulq %rsi, %r14
shrq $0x38, %r14
addl %r8d, %r14d
addl %edi, %r14d
movl $0x1, %ebp
cmpl $0x2, %r14d
jb 0x4f8e
movq 0x10(%rbx), %rax
movq %rax, 0x18(%r11)
movq -0x8(%r11), %rbp
leaq 0x40(%r13), %rdx
cmpl $0x10, %r14d
jae 0x4b91
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %r8d
callq 0x5e30
jmp 0x4cdb
movq %r13, (%rsp)
movl $0x1, %ecx
leaq 0x2857(%rip), %rdi      # 0x73f8
xorl %r13d, %r13d
cmpq -0x8(%rdi), %r15
jb 0x4bb3
cmpq (%rdi), %r12
jbe 0x4c6c
cmpq $0x4, %rcx
leaq 0x1(%rcx), %rsi
setae %r13b
addq $0x10, %rdi
movq %rsi, %rcx
cmpq $0x5, %rsi
jne 0x4ba4
jmp 0x4c87
cmpq $-0x5, 0x8(%r13)
jne 0x4cfd
testb $0x4, 0xc(%rsp)
jne 0x4c13
subq (%rdx), %rcx
movq 0x60(%r13), %rdx
movq 0x68(%r13), %rsi
movq -0x8(%rdx,%rax,8), %rdx
movl -0x4(%rsi,%rax,4), %edi
leal 0x1(%rdi), %r8d
movl %r8d, -0x4(%rsi,%rax,4)
movq %rcx, (%rdx,%rdi,8)
movq 0x10(%rbx), %rcx
addl $0x2, %edi
movl %edi, -0x4(%rsi,%rax,4)
movq %rcx, (%rdx,%r8,8)
movq 0x10(%rbx), %rax
movq %rax, 0x18(%r11)
movq -0x8(%r11), %rsi
leaq 0x40(%r13), %rdx
movq %rbx, %rdi
movl %r15d, %ecx
callq 0x5adc
testl %r15d, %r15d
movl $0x2, %ebp
je 0x4c5a
movq 0x18(%rbx), %rcx
movl %r15d, %edx
xorl %esi, %esi
movq (%r12,%rsi,8), %rdi
movq 0x10(%rbx), %r8
movq %rdi, (%rcx,%r8)
addq $0x8, 0x10(%rbx)
incq %rsi
cmpq %rsi, %rdx
jne 0x4c41
testq %rax, %rax
je 0x4f5b
incl 0x30(%r13)
jmp 0x4f7f
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbp, 0x10(%rsp)
movq %rdx, %rbp
callq 0x60e6
movq %rbp, %rdx
movq 0x10(%rsp), %rbp
testb $0x1, %r13b
je 0x4cd7
cmpl $0x20, %r14d
movq (%rsp), %r13
jb 0x4b79
movl $0x5, %ecx
leaq 0x2791(%rip), %rdi      # 0x7438
xorl %r13d, %r13d
cmpq -0x8(%rdi), %r15
jb 0x4cb9
cmpq (%rdi), %r12
jbe 0x4fa2
cmpq $0xa, %rcx
leaq 0x1(%rcx), %rsi
setae %r13b
addq $0x10, %rdi
movq %rsi, %rcx
cmpq $0xb, %rsi
jne 0x4caa
jmp 0x4fb3
movq (%rsp), %r13
testq %rax, %rax
je 0x4f5b
movq $0x0, 0x40(%r13)
movw $0x0, 0x48(%r13)
movl $0x1, %ebp
jmp 0x4f8e
movq %r13, (%rsp)
xorl %edi, %edi
movl $0xff, %r12d
movq %r11, 0x20(%rsp)
imulq $0x38, %rax, %rcx
movq -0x30(%r14,%rcx), %rdx
movq (%rdx), %rsi
movq %rsi, %r15
shrq $0x28, %r15
andl %r12d, %r15d
shrq $0x30, %rsi
andl $0xfff, %esi            # imm = 0xFFF
leaq (%rdx,%rsi), %r13
addq $0x8, %r13
cmpl %r12d, %r15d
jne 0x4d43
movl (%r13), %r15d
addq $0x4, %r13
addq %r14, %rcx
movq -0x30(%rcx), %rdx
cmpq %r9, (%rdx)
jbe 0x4e90
movzwl -0x20(%rcx), %edx
decq %rdx
cmpq %rdx, -0x10(%rcx)
jne 0x4e90
movl %edi, 0x10(%rsp)
testb $0x4, 0xc(%rsp)
jne 0x4e15
leaq -0x1(%rax), %rcx
imulq $0xc8, %rcx, %rcx
movq (%rsp), %rdi
movq 0x58(%rdi), %rdx
movq 0x60(%rdi), %rsi
movq -0x8(%rsi,%rax,8), %rsi
movq %rsi, 0x28(%rsp)
movq 0x68(%rdi), %rsi
movl -0x4(%rsi,%rax,4), %eax
movl %eax, 0x1c(%rsp)
leaq 0x8(%rdx,%rcx), %r12
leaq 0x67a(%rip), %rax       # 0x5426
movq %rax, -0x8(%r12)
movl $0x98, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x10f0
movl %r15d, 0x98(%r12)
movl $0x0, 0x9c(%r12)
movq %r13, 0xa0(%r12)
movq 0x28(%rsp), %rax
movq %rax, 0xa8(%r12)
movl 0x1c(%rsp), %eax
movl %eax, 0xb0(%r12)
movq $0x0, 0xb4(%r12)
movl $0xffffffff, 0xbc(%r12) # imm = 0xFFFFFFFF
movl $0xff, %r12d
jmp 0x4e55
movq (%rsp), %rcx
movq 0x58(%rcx), %rcx
imulq $0xc8, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0xb0, %rdi
leaq 0x5ed(%rip), %rax       # 0x5423
movq %rax, -0x18(%rdi)
movl $0x0, -0x10(%rdi)
movl %r15d, -0xc(%rdi)
movq %r13, -0x8(%rdi)
movl $0xb0, %edx
xorl %esi, %esi
callq 0x10f0
addl 0x10(%rsp), %r15d
leaq -0x1(%rbp), %rax
andq %rax, %rbp
bsfq %rbp, %rax
movq $-0x1, %rcx
cmoveq %rcx, %rax
incq %rax
movl %r15d, %edi
testq %rbp, %rbp
movq 0x20(%rsp), %r11
movabsq $-0x4000000000000001, %r9 # imm = 0xBFFFFFFFFFFFFFFF
jne 0x4d0e
jmp 0x4e93
movl %edi, %r15d
movq 0x10(%rbx), %rax
movq %rax, 0x18(%r11)
movq -0x8(%r11), %rsi
movq (%rsp), %r14
leaq 0x40(%r14), %rdx
movq %rbx, %rdi
movl %r15d, %ecx
movq %r11, %r13
callq 0x5adc
testq %rax, %rax
je 0x4f5b
movq 0x58(%r14), %r12
xorq 0x8(%r13), %rbp
leaq 0x30(%rsp), %r14
xorl %r13d, %r13d
movl $0xc8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x10f0
leaq 0x674(%rip), %rax       # 0x5558
movq %rax, (%r14)
movq %r12, 0xa0(%r14)
movq %rbp, 0xa8(%r14)
movq %rbp, 0xb0(%r14)
movq 0x40(%rsp), %rsi
movl 0x3c(%rsp), %r12d
shlq $0x3, %r12
movq 0x18(%rbx), %rdi
addq 0x10(%rbx), %rdi
movq %r12, %rdx
callq 0x1140
addq %r12, 0x10(%rbx)
addl 0x3c(%rsp), %r13d
movl $0x0, 0x38(%rsp)
movq %r14, %rdi
callq *0x30(%rsp)
testl %eax, %eax
jne 0x4efc
movq 0x18(%rbx), %rax
movq 0x20(%rsp), %rcx
addq 0x18(%rcx), %rax
cmpl $0xfe, %r15d
movl $0x2, %ebp
ja 0x4f62
movb %r13b, 0x5(%rax)
movq (%rsp), %rdx
jmp 0x4f6f
movl $0x5, %ebp
jmp 0x4f8e
movq (%rsp), %rdx
movzwl 0x48(%rdx), %ecx
movl %r13d, 0x8(%rax,%rcx)
cmpl 0x38(%rdx), %r13d
jbe 0x4f79
movl %r13d, 0x38(%rdx)
incl 0x34(%rdx)
movq %rdx, %r13
movq $0x0, 0x40(%r13)
movw $0x0, 0x48(%r13)
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %rbp, %rsi
movq %rdx, %r15
callq 0x60e6
movq %r15, %rdx
testb $0x1, %r13b
movq (%rsp), %r13
jne 0x4b79
jmp 0x4cdb