LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/db.c
// Function: JFDB_fold
JFT_Status JFDB_fold(JFDB *db,
                     JFT_Stem *stem,
                     JFT_Symbol *stop,
                     JFDB_FoldFun fun,
                     void *restrict acc,
                     int flags) {
  // fold all active tries in the DB simultaneously, in order
  // as usual, stem serves as both input and output
  JFT_Amount N = db->tip.level, i = 0;
  JFT_Cursor cursors[N];
  JFT *trie;
  for (JFT_Offset pos = db->tip.cp.offset; pos; pos = JFT_parent_offset(trie)) {
    // we want all the cursors to be at the same position, so only add them if they have the prefix
    trie = JFDB_get_trie(db, pos);
    cursors[i] = JFT_cursor(trie);
    if (JFT_cursor_find(&cursors[i], stem) < JFT_SYMBOL_NIL)
      i++;
  }
  JFDB_Slice slice = (JFDB_Slice) {
    .db = db,
    .stem = stem,
    .stop = stop,
    .zero = stem->size,
    .fun = fun,
    .acc = acc
  };
  if (i)
    return JFT_cursor_merge(cursors, i, &splice_fold, &slice, flags);
  return Ok;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, %r15
movzbl 0xc8(%rdi), %eax
movq %rsp, %r12
imull $0x38, %eax, %eax
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
movq 0x128(%rdi), %r13
xorl %ebx, %ebx
testq %r13, %r13
je 0x32e8
movq %r15, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
movq 0x98(%rdi), %r14
leaq (%r14,%r13), %rdx
imulq $0x38, %rbx, %r15
leaq (%r12,%r15), %rax
movq %rax, -0x60(%rbp)
leaq -0x90(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rdx, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
movl $0x1, %esi
callq 0x35c4
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups -0x78(%rbp), %xmm2
movups %xmm0, (%r12,%r15)
movups %xmm1, 0x10(%r12,%r15)
movups %xmm2, 0x20(%r12,%r15)
movq -0x68(%rbp), %rax
movq %rax, 0x30(%r12,%r15)
movq -0x58(%rbp), %r15
movq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x3af3
movq -0x50(%rbp), %rdi
cmpq $-0x2, %rax
adcq $0x0, %rbx
movq (%r14,%r13), %r13
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %r13
jne 0x3245
movq %rdi, -0x98(%rbp)
movq %r15, -0x90(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movzwl 0x8(%r15), %eax
movw %ax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
testq %rbx, %rbx
movl $0x0, %eax
je 0x3341
leaq 0x25(%rip), %rdx        # 0x3350
leaq -0x98(%rbp), %rcx
movq %r12, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %r8d
callq 0x3dcc
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/db.c
// Function: splice_fold
static JFT_Status splice_fold(JFT_Cursor *cursors, JFT_MergeContext *ctx, JFT_Phase phase) {
  JFT_MergeFrame *frame = ctx->frame;
  JFDB_Slice *slice = (JFDB_Slice *)ctx->acc;
  JFT_Cursor *cursor = cursors + ffsll(frame->active) - 1;
  JFT_KeySize depth = frame - ctx->stack;

  if (phase == Out)
    return Ok;

  if ((slice->stem->size = slice->zero + depth))
    JFT_set_symbol_at_point(slice->stem, slice->stem->size - 1, cursor->symbol);

  if (JFT_cursor_at_terminal(cursor)) {
    return slice->fun(cursor, slice, True);
  } else if (slice->stop && cursor->symbol == *slice->stop && depth) {
    return slice->fun(cursor, slice, False);
  }
  return Step;
}

// Assembly:
movq %rsi, %rax
movq 0x8(%rsi), %r8
movq 0x8(%r8), %rcx
bsfq %rcx, %rsi
movq $-0x1, %rcx
cmovneq %rsi, %rcx
cmpl $-0x1, %edx
je 0x33b5
movq 0x20(%rax), %rsi
imulq $0x38, %rcx, %rcx
leaq (%rcx,%rdi), %r9
addq $0x38, %r9
subq (%rax), %r8
movl %r8d, %edx
shrl $0x5, %edx
movq 0x8(%rsi), %rax
addw 0x18(%rsi), %dx
movw %dx, 0x8(%rax)
je 0x33cf
movzwl %dx, %r10d
movq -0x8(%r9), %rdx
decq %r10
je 0x33b8
cmpq $0x1, (%rax)
movq 0x10(%rax), %rax
adcq $-0x1, %rax
movb %dl, (%rax,%r10)
jmp 0x33cf
xorl %eax, %eax
retq
xorl %r10d, %r10d
cmpq $0x100, %rdx            # imm = 0x100
cmovaeq %rdx, %r10
movq %r10, (%rax)
movq 0x10(%rax), %rax
movb %dl, (%rax)
movq -0x30(%r9), %rax
movq (%rax), %rax
shrq $0x3e, %rax
cmpl $0x3, %eax
jb 0x33f2
movzwl -0x20(%r9), %eax
decq %rax
movl $0x1, %edx
cmpq %rax, -0x10(%r9)
je 0x3414
movq 0x10(%rsi), %rdx
movl $0x1, %eax
testq %rdx, %rdx
je 0x3420
testl $0x1fffe0, %r8d         # imm = 0x1FFFE0
je 0x3420
movq (%rdx), %r8
xorl %edx, %edx
cmpq %r8, -0x8(%r9)
jne 0x3420
addq %rdi, %rcx
movq 0x20(%rsi), %rax
movq %rcx, %rdi
jmpq *%rax
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/db.c
// Function: JFDB_vfree
static void JFDB_vfree(JFDB *db, JFDB_Region region) {
  if (db->freeList.size < JFDB_MAX_FREE - 1)
    JFDB_add_to_free_list(db, region);
  if (db->freeList.size >= JFDB_MAX_FREE)
    db->oughtFlush = True;
}

// Assembly:
movq 0x138(%rdi), %rax
cmpq $0xfe, %rax
ja 0x35b1
movq %rsi, %rcx
shrq $0x20, %rcx
leal 0xff(%rcx), %edx
shrl $0x8, %edx
addl %esi, %edx
cmpl %esi, 0x130(%rdi)
jbe 0x3589
movl %esi, 0x130(%rdi)
cmpl 0x134(%rdi), %edx
jbe 0x3597
movl %edx, 0x134(%rdi)
leaq 0x1(%rax), %rdx
movq %rdx, 0x138(%rdi)
movl %esi, 0x140(%rdi,%rax,8)
movl %ecx, 0x144(%rdi,%rax,8)
retq
cmpq $0xff, %rax
je 0x35c3
movl $0x1, 0x984(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_init
JFT_Symbol JFT_cursor_init(JFT_Cursor *cursor, JFT_Phase phase, JFT *node) {
  // initialize the cursor at node, if it exists, and return the symbol
  // we assume non-root branches always have children
  // it is impossible to construct such a node without children
  // we assume non-root nodes cannot have an empty stem
  // although technically it is possible to construct such a node, it would be invalid
  if (node == NULL)
    return cursor->symbol = JFT_SYMBOL_NIL;
  switch (JFT_node_type(node)) {
    case Root:
      cursor->node = node;
      cursor->stem = (JFT_Stem) {0};
      cursor->point = 0;
      cursor->symbol = JFT_SYMBOL_TOP;
      break;
    default:
      cursor->node = node;
      cursor->stem = JFT_stem(node);
      cursor->point = phase == In ? 0 : cursor->stem.size - 1;
      cursor->symbol = JFT_cursor_symbol_at_point(cursor);
      break;
  }
  return cursor->symbol;
}

// Assembly:
testq %rdx, %rdx
je 0x35f7
movq (%rdx), %rcx
movq %rcx, %rax
shrq $0x3e, %rax
movq %rdx, 0x8(%rdi)
jne 0x3607
leaq 0x10(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $-0x3, 0x30(%rdi)
movq $-0x3, %rax
retq
movq $-0x2, 0x30(%rdi)
movq $-0x2, %rax
retq
btq $0x3d, %rcx
jb 0x3616
addq $0x8, %rdx
xorl %eax, %eax
jmp 0x3624
movzbl 0x8(%rdx), %eax
orq $-0x100, %rax
addq $0x9, %rdx
shrq $0x30, %rcx
movl %ecx, %r8d
andl $0xfff, %r8d            # imm = 0xFFF
movq %rax, 0x10(%rdi)
movw %r8w, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
cmpl $0x1, %esi
jne 0x3655
movq $0x0, 0x28(%rdi)
testq %rax, %rax
jne 0x367a
xorl %ecx, %ecx
jmp 0x3674
andl $0xfff, %ecx            # imm = 0xFFF
decq %rcx
movq %rcx, 0x28(%rdi)
testq %rax, %rax
je 0x3674
testq %rcx, %rcx
je 0x367a
addq %rcx, %rdx
decq %rdx
jmp 0x3677
addq %rcx, %rdx
movzbl (%rdx), %eax
movq %rax, 0x30(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_step
JFT_Symbol JFT_cursor_step(JFT_Cursor *cursor, JFT_Direction direction) {
  if (cursor->symbol == JFT_SYMBOL_NIL)
    return cursor->symbol;
  if (++cursor->point >= cursor->stem.size)
    switch (JFT_node_type(cursor->node)) {
      case Leaf:
        return cursor->symbol = JFT_SYMBOL_ANY;
      default:
        return JFT_cursor_init(cursor, In, JFT_child(cursor->node, JFT_SYMBOL_NIL, direction));
    }
  return cursor->symbol = JFT_cursor_symbol_at_point(cursor);
}

// Assembly:
pushq %rbx
movq $-0x2, %rax
cmpq $-0x2, 0x30(%rdi)
je 0x3766
movq %rdi, %rbx
movq 0x28(%rdi), %rcx
incq %rcx
movq %rcx, 0x28(%rdi)
movzwl 0x18(%rdi), %eax
cmpq %rax, %rcx
jge 0x371b
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x375b
testq %rcx, %rcx
je 0x3762
movq 0x20(%rbx), %rax
addq %rax, %rcx
decq %rcx
jmp 0x375f
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
shrq $0x3e, %rax
cmpl $0x3, %eax
jb 0x373c
movq $-0x1, 0x30(%rbx)
movq $-0x1, %rax
jmp 0x3766
movl %esi, %edx
movq $-0x2, %rsi
callq 0x3768
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
popq %rbx
jmp 0x35c4
addq 0x20(%rbx), %rcx
movzbl (%rcx), %eax
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_next
JFT_Symbol JFT_cursor_next(JFT_Cursor *cursor, JFT_Direction direction) {
  if (cursor->symbol == JFT_SYMBOL_ANY)
    return cursor->symbol;
  if (cursor->point == 0)
    return JFT_cursor_init(cursor, In, JFT_child(JFT_parent(cursor->node), cursor->symbol, direction));
  if (cursor->symbol == JFT_SYMBOL_NIL && cursor->point < cursor->stem.size)
    return cursor->symbol = JFT_cursor_symbol_at_point(cursor);
  return cursor->symbol = JFT_SYMBOL_NIL;
}

// Assembly:
pushq %rbx
movl %esi, %edx
movq 0x30(%rdi), %rsi
cmpq $-0x1, %rsi
je 0x3aaf
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x3ac9
cmpq $-0x2, %rsi
jne 0x3ab8
movzwl 0x18(%rbx), %ecx
cmpq %rcx, %rax
jge 0x3ab8
addq 0x20(%rbx), %rax
cmpq $0x1, 0x10(%rbx)
adcq $-0x1, %rax
movzbl (%rax), %eax
movq %rax, 0x30(%rbx)
jmp 0x3ac7
movq $-0x1, %rax
jmp 0x3ac7
movq $-0x2, 0x30(%rbx)
movq $-0x2, %rax
popq %rbx
retq
movq 0x8(%rbx), %rdi
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq (%rdi), %rax
subq %rax, %rdi
callq 0x3768
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
popq %rbx
jmp 0x35c4
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: move_into_frame
static JFT_MergeFrame *move_into_frame(JFT_Cursor *cursors,
                                       JFT_CursorFun advance,
                                       JFT_Mask relevant,
                                       JFT_MergeFrame *frame,
                                       JFT_Direction direction) {
  // compute the new active set and bound from the relevant cursors
  // advance the active cursors (assumed to be a subset of relevant)
  JFT_Symbol bound = JFT_SYMBOL_NIL, symbol;
  JFT_Mask definite = 0, possible = 0, preclude = 0;
  for (JFT_Amount b = ffsll(relevant); b; b = ffsll(relevant &= relevant - 1)) {
    JFT_Amount i = b - 1;
    JFT_Mask m = 1LLU << i;
    if (frame->active & m)
      advance(&cursors[i], direction);
    symbol = cursors[i].symbol;
    if (symbol == JFT_SYMBOL_NIL) {
      // the symbol is NIL: not active and has no more siblings
      preclude |= m;
    } else if (symbol == JFT_SYMBOL_ANY) {
      // the symbol is ANY: definitely active, but does not tighten the bound
      definite |= m;
    } else if (symbol == bound) {
      // the symbol matches the bound: potentially include it in active set
      possible |= m;
    } else if ((direction == Forward && symbol < bound) ||
               (direction == Reverse && symbol > bound) ||
               (bound == JFT_SYMBOL_NIL)) {
      // the symbol beats the bound: replace the potential active set
      bound = symbol;
      possible = m;
    }
  }
  frame->bound = bound;
  frame->active = possible | definite;
  frame->done = preclude;
  return frame;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rsi, 0x20(%rsp)
testq %rdx, %rdx
je 0x4121
movl %r8d, %ebp
movq %rdx, %r14
movq %rdi, %r12
bsfq %rdx, %r13
movq $-0x2, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, %r15d
movl %r13d, %ecx
shlq %cl, %r15
movq 0x8(%rbx), %rax
btq %r13, %rax
jae 0x4095
imulq $0x38, %r13, %rdi
addq %r12, %rdi
movl %ebp, %esi
callq *0x20(%rsp)
imulq $0x38, %r13, %rax
movq 0x30(%r12,%rax), %rax
cmpq $-0x1, %rax
je 0x40b1
cmpq $-0x2, %rax
jne 0x40b8
orq %r15, 0x18(%rsp)
jmp 0x40e6
orq %r15, 0x10(%rsp)
jmp 0x40e6
movq 0x8(%rsp), %rdx
cmpq %rdx, %rax
jne 0x40c8
orq %r15, (%rsp)
jmp 0x40e6
cmpl $0x1, %ebp
jne 0x40d2
cmpq %rdx, %rax
jb 0x40dd
cmpl $-0x1, %ebp
je 0x40f9
cmpq $-0x2, %rdx
jne 0x40e6
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
leaq -0x1(%r14), %rax
andq %rax, %r14
bsfq %r14, %r13
jne 0x4072
jmp 0x410c
cmpq %rdx, %rax
seta %cl
cmpq $-0x2, %rdx
sete %dl
orb %cl, %dl
jne 0x40dd
jmp 0x40e6
movq (%rsp), %rdx
orq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
jmp 0x412c
movq $-0x2, %rcx
xorl %eax, %eax
xorl %edx, %edx
movq %rcx, (%rbx)
movq %rdx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_merge_new
JFT *JFT_cursor_merge_new(JFT_Cursor *cursors,
                          JFT_Amount num,
                          JFT_Buffer *output,
                          int flags) {
  // perform a cursor merge to produce a new trie
  // if 'atoms' are the base case, this is the induction step
  JFT_Cons cons = (JFT_Cons) {.buffer = JFT_buffer_reset(output)};
  JFT_Status result = JFT_cursor_merge(cursors, num, splice_new, &cons, flags);
  free(cons.stem.data);
  free(cons.iters);
  if (cons.TLBs) {
    for (JFT_Amount k = 0; k < num; k++)
      free(cons.TLBs[k]);
    free(cons.TLBs);
  }
  free(cons.TLBSizes);
  if (result != Ok)
    return NULL;
  return (JFT *)output->data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r8d
movq %rdx, %rbx
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r15
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x28(%r15)
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
xorl %eax, %eax
movq %rax, 0x68(%r15)
movq %rax, 0x10(%rdx)
movq %rdx, (%r15)
leaq 0x6e(%rip), %rdx        # 0x4204
movq %r15, %rcx
callq 0x3dcc
movl %eax, %ebp
movq 0x50(%r15), %rdi
callq 0x1030
movq 0x58(%r15), %rdi
callq 0x1030
movq 0x60(%r15), %rdi
testq %rdi, %rdi
je 0x41e3
testq %r14, %r14
je 0x41de
xorl %r15d, %r15d
movq 0x68(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %r14
jne 0x41c3
movq 0x68(%rsp), %rdi
callq 0x1030
movq 0x70(%rsp), %rdi
callq 0x1030
testl %ebp, %ebp
je 0x41f5
xorl %eax, %eax
jmp 0x41f9
movq 0x18(%rbx), %rax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_iter_any_next
JFT_Boolean JFT_iter_any_next(JFT_Iter *iter) {
  // if all iterators are exhausted we are done
  if (!iter->sub.many.active)
    return False;

  JFT_Word *words = iter->batch.data = iter->words;
  for (iter->batch.size = 0; iter->batch.size < JFT_ITER_WORDS; ) {
    // scour the active iters for the next min element, until we fill a batch
    JFT_Mask hasMin = 0;
    JFT_Word min = -1, elem;
    JFT_Mask active = iter->sub.many.active;
    for (int b = ffsll(active); b; b = ffsll(active &= active - 1)) {
      JFT_Amount k = b - 1;
      JFT_Iter *i = iter->sub.many.iters + k;
      // as long as the position is out of bounds on the iter, reload it
      // if the iter is exhausted, remove it from active and skip to next
      while (i->batch.position >= i->batch.size)
        if (!JFT_iter_next(i)) {
          iter->sub.many.active &= ~(1LLU << k);
          goto nextActive;
        }
      if ((elem = i->batch.data[i->batch.position]) == min) {
        hasMin |= (1LLU << k);
      } else if (elem < min) {
        min = elem;
        hasMin = (1LLU << k);
      }
    nextActive:
      /* done with the active iter, move on to next */;
    }
    // if we can't find another min, all iters are exhausted and we are done
    // add the min to the batch always (main difference b/w any & all)
    if (!hasMin)
      break;
    else
      words[iter->batch.size++] = min;
    // advance any iters we found the min on
    for (int b = ffsll(hasMin); b; b = ffsll(hasMin &= hasMin - 1))
      iter->sub.many.iters[b - 1].batch.position++;
  }
  return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0xb0(%rdi)
je 0x5101
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x10(%rdi)
movl $0x0, 0xc(%rdi)
movq 0xb0(%rbx), %rbp
movl $0x1, 0x4(%rsp)
testq %rbp, %rbp
je 0x5109
bsfq %rbp, %r14
movq $-0x1, %r13
xorl %r12d, %r12d
imulq $0xc8, %r14, %r15
addq 0xa0(%rbx), %r15
movl 0x8(%r15), %eax
cmpl 0xc(%r15), %eax
jb 0x5089
movl $0x0, 0x8(%r15)
movq %r15, %rdi
callq *(%r15)
testl %eax, %eax
jne 0x5057
movq $-0x2, %rax
movl %r14d, %ecx
rolq %cl, %rax
andq %rax, 0xb0(%rbx)
jmp 0x50b2
movq 0x10(%r15), %rcx
movq (%rcx,%rax,8), %rax
cmpq %r13, %rax
jne 0x509c
btsq %r14, %r12
jmp 0x50b2
movl $0x1, %edx
movl %r14d, %ecx
shlq %cl, %rdx
cmpq %r13, %rax
cmovbq %rax, %r13
cmovbq %rdx, %r12
leaq -0x1(%rbp), %rax
andq %rax, %rbp
bsfq %rbp, %r14
jne 0x5049
testq %r12, %r12
je 0x5109
movl 0xc(%rbx), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rbx)
movq %r13, 0x18(%rbx,%rcx,8)
bsfq %r12, %rcx
movq 0xa0(%rbx), %rdx
imulq $0xc8, %rcx, %rcx
incl 0x8(%rdx,%rcx)
leaq -0x1(%r12), %rcx
andq %rcx, %r12
bsfq %r12, %rcx
jne 0x50d6
cmpl $0xf, %eax
jbe 0x5023
jmp 0x5109
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_iter_all_next
JFT_Boolean JFT_iter_all_next(JFT_Iter *iter) {
  // if any iterators are exhausted, we are done
  if (!iter->sub.many.active || iter->sub.many.active != iter->sub.many.exists)
    return False;

  JFT_Word *words = iter->batch.data = iter->words;
  for (iter->batch.size = 0; iter->batch.size < JFT_ITER_WORDS; ) {
    // scour the active iters for the next min element, until we fill a batch
    JFT_Mask hasMin = 0;
    JFT_Word min = -1, elem;
    JFT_Mask active = iter->sub.many.active;
    for (int b = ffsll(active); b; b = ffsll(active &= active - 1)) {
      JFT_Amount k = b - 1;
      JFT_Iter *i = iter->sub.many.iters + k;
      // as long as the position is out of bounds on the iter, reload it
      // if the iter is exhausted, remove it from active and skip to next
      while (i->batch.position >= i->batch.size)
        if (!JFT_iter_next(i)) {
          iter->sub.many.active &= ~(1LLU << k);
          goto nextActive;
        }
      if ((elem = i->batch.data[i->batch.position]) == min) {
        hasMin |= (1LLU << k);
      } else if (elem < min) {
        min = elem;
        hasMin = (1LLU << k);
      }
    nextActive:
      /* done with the active iter, move on to next */;
    }
    // if we can't find another min, all iters are exhausted and we are done
    // add the min to the batch iff everyone has it (main difference b/w any & all)
    if (!hasMin)
      break;
    else if (hasMin == iter->sub.many.exists)
      words[iter->batch.size++] = min;
    // advance any iters we found the min on
    for (int b = ffsll(hasMin); b; b = ffsll(hasMin &= hasMin - 1))
      iter->sub.many.iters[b - 1].batch.position++;
  }
  return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xb0(%rdi), %rax
movl $0x0, 0x4(%rsp)
testq %rax, %rax
je 0x5244
movq %rdi, %rbx
cmpq 0xa8(%rdi), %rax
jne 0x5244
leaq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movl $0x0, 0xc(%rbx)
movq 0xb0(%rbx), %rbp
movl $0x1, 0x4(%rsp)
testq %rbp, %rbp
je 0x5244
bsfq %rbp, %r14
movq $-0x1, %r13
xorl %r12d, %r12d
imulq $0xc8, %r14, %r15
addq 0xa0(%rbx), %r15
movl 0x8(%r15), %eax
cmpl 0xc(%r15), %eax
jb 0x51c4
movl $0x0, 0x8(%r15)
movq %r15, %rdi
callq *(%r15)
testl %eax, %eax
jne 0x5192
movq $-0x2, %rax
movl %r14d, %ecx
rolq %cl, %rax
andq %rax, 0xb0(%rbx)
jmp 0x51ed
movq 0x10(%r15), %rcx
movq (%rcx,%rax,8), %rax
cmpq %r13, %rax
jne 0x51d7
btsq %r14, %r12
jmp 0x51ed
movl $0x1, %edx
movl %r14d, %ecx
shlq %cl, %rdx
cmpq %r13, %rax
cmovbq %rax, %r13
cmovbq %rdx, %r12
leaq -0x1(%rbp), %rax
andq %rax, %rbp
bsfq %rbp, %r14
jne 0x5184
testq %r12, %r12
je 0x5244
cmpq 0xa8(%rbx), %r12
jne 0x5216
movl 0xc(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
movq %r13, 0x18(%rbx,%rax,8)
bsfq %r12, %rax
movq 0xa0(%rbx), %rcx
imulq $0xc8, %rax, %rax
incl 0x8(%rcx,%rax)
leaq -0x1(%r12), %rax
andq %rax, %r12
bsfq %r12, %rax
jne 0x521a
cmpl $0xf, 0xc(%rbx)
jbe 0x515e
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_membuf_ensure
int JFT_membuf_ensure(JFT_Buffer *buf, size_t more) {
  size_t minSize = buf->mark + more;
  if (buf->size < minSize) {
    size_t newSize = buf->factor * minSize;
    uint8_t *data = realloc(buf->data, newSize);
    if (data == NULL)
      return ENoMem;
    buf->size = newSize;
    buf->data = data;
  }
  return Ok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
addq 0x10(%rdi), %r14
xorl %ebx, %ebx
cmpq %r14, 0x8(%rdi)
jae 0x53fb
movq %rdi, %r15
movslq (%rdi), %rax
imulq %rax, %r14
movq 0x18(%rdi), %rdi
movq %r14, %rsi
callq 0x1160
testq %rax, %rax
je 0x53f6
movq %r14, 0x8(%r15)
movq %rax, 0x18(%r15)
jmp 0x53fb
movl $0x5, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jflatow[P]jfdb/src/trie.c
// Function: JFT_membuf
JFT_Buffer *JFT_membuf() {
  JFT_Buffer *buf = calloc(1, sizeof(JFT_Buffer));
  if (buf == NULL)
    return NULL;
  buf->factor = 2;
  buf->ensure = JFT_membuf_ensure;
  return buf;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x28, %esi
callq 0x1120
testq %rax, %rax
je 0x5429
movl $0x2, (%rax)
leaq -0x68(%rip), %rcx       # 0x53bd
movq %rcx, 0x20(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_fetch_add.c
// Function: shmem_int_atomic_fetch_add
int shmem_int_atomic_fetch_add( int* ptr, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((const void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	int r = *remote_ptr;
	*remote_ptr = __sum(r,val);
	__clear_spin_lock(x);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edx, %esi
callq 0x1c44
movq %rax, %r14
leaq 0x31a8(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebx, %esi
callq 0x1c44
movq %rax, %rbx
movq %rax, %rdi
callq 0x331f
movl (%r14), %r15d
addl %r15d, %ebp
movl %ebp, (%r14)
movq %rbx, %rdi
callq 0x3310
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: panic
void
panic(char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, "\n");
	va_end(ap);
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r10
leaq -0xd0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x14d0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x3b04(%rip), %rbx      # 0x4ff8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x1120
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1080
movl $0x1, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: mustmalloc
void*
mustmalloc(size_t size)
{
	void *p;
	p = malloc(size);
	if(p == nil)
		panic("out of memory");
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x10f0
testq %rax, %rax
je 0x1551
popq %rbp
retq
leaq 0x1acb(%rip), %rdi      # 0x3023
xorl %eax, %eax
callq 0x147c
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: list
void
list(char *left)
{
	if(left == nil)
		left = "          \t";
	if(line[0])
		fprintf(lstfp, "%s%05d    %s", left, lastlistline, line);
	else
		fprintf(lstfp, "%s\n", left);
	line[0] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
leaq 0x1ac4(%rip), %rdx      # 0x3031
cmovneq %rdi, %rdx
cmpb $0x0, 0x3dd8(%rip)      # 0x5350
movq 0x3e21(%rip), %rdi      # 0x53a0
je 0x159e
movl 0x3b51(%rip), %ecx      # 0x50d8
leaq 0x1aaf(%rip), %rsi      # 0x303d
leaq 0x3dbb(%rip), %r8       # 0x5350
xorl %eax, %eax
callq 0x10c0
jmp 0x15ac
leaq 0x1aa5(%rip), %rsi      # 0x304a
xorl %eax, %eax
callq 0x10c0
movb $0x0, 0x3d9d(%rip)      # 0x5350
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: listsyms
void
listsyms(void)
{
	Sym *s;

	qsort(symtab, MAXSYM, sizeof(Sym), cmpsym);
	fprintf(lstfp, "\n    SYMBOL TABLE\n");
	for(s = symtab; s < &symtab[MAXSYM]; s++){
		if((s->type&7) != SymValue)
			continue;
		fprintf(lstfp, "%-07s %06o\n", s->name, s->val);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3de0(%rip), %rbx      # 0x53b0
leaq -0x22(%rip), %rcx       # 0x15b5
movl $0xfa0, %esi            # imm = 0xFA0
movl $0x18, %edx
movq %rbx, %rdi
callq 0x1050
movq 0x3db0(%rip), %rcx      # 0x53a0
leaq 0x1a57(%rip), %rdi      # 0x304e
movl $0x12, %esi
movl $0x1, %edx
callq 0x1150
leaq 0x1a54(%rip), %r14      # 0x3061
xorl %r15d, %r15d
movl 0x8(%r15,%rbx), %eax
andl $0x7, %eax
cmpl $0x1, %eax
jne 0x1638
leaq (%rbx,%r15), %rdx
movq 0x3d78(%rip), %rdi      # 0x53a0
movzwl 0x10(%r15,%rbx), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
leaq 0x18(%r15), %rax
cmpq $0x176e8, %r15          # imm = 0x176E8
movq %rax, %r15
jb 0x1610
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: ch
int
ch(void)
{
	int c;

tail:
	if(peekc){
		c = peekc;
		peekc = 0;
		return c;
	}

	/* listing */
	if(pass2 && lastlistline != lineno){
		/* if line hasn't been printed yet, do it now */
		if(line[0])
			list(nil);

		int pos = ftell(infp);
		char *p;
		for(p = line; p < &line[80-2]; p++){
			c = getc(infp);
			if(c == '\n' || c == EOF)
				break;
			*p = c;
		}
		if(!(p == line && c == EOF))
			*p++ = '\n';
		*p++ = '\0';
		fseek(infp, pos, SEEK_SET);
		lastlistline = lineno;
	}

	c = getc(infp);
	if(c == EOF)
		return EOF;
	if(c == '\n')
		lineno++;
	// We only want ASCII!!
	c &= 0177;
	if(tmpfp)
		putc(c, tmpfp);

	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x1b44c(%rip), %ebx     # 0x1cab0
testl %ebx, %ebx
je 0x167d
movl $0x0, 0x1b43e(%rip)     # 0x1cab0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x1b430(%rip)     # 0x1cab4
je 0x1733
movl 0x3a48(%rip), %eax      # 0x50d8
cmpl 0x3a3e(%rip), %eax      # 0x50d4
je 0x1733
cmpb $0x0, 0x3cad(%rip)      # 0x5350
je 0x16ac
xorl %edi, %edi
callq 0x155f
movq 0x1b405(%rip), %rdi     # 0x1cab8
callq 0x10d0
movq %rax, %rbx
xorl %r15d, %r15d
leaq 0x3c8b(%rip), %r14      # 0x5350
leaq 0x3cd2(%rip), %r12      # 0x539e
movq 0x1b3e5(%rip), %rdi     # 0x1cab8
callq 0x1160
cmpl $-0x1, %eax
je 0x16f1
cmpl $0xa, %eax
je 0x16f1
movb %al, (%r15,%r14)
incq %r15
cmpq $0x4e, %r15
jne 0x16cc
jmp 0x1707
testq %r15, %r15
sete %cl
cmpl $-0x1, %eax
sete %al
testb %al, %cl
jne 0x1712
addq %r15, %r14
movq %r14, %r12
movb $0xa, (%r12)
incq %r12
movq %r12, %r14
movb $0x0, (%r14)
movq 0x1b39b(%rip), %rdi     # 0x1cab8
movslq %ebx, %rsi
xorl %edx, %edx
callq 0x1100
movl 0x39a7(%rip), %eax      # 0x50d4
movl %eax, 0x39a5(%rip)      # 0x50d8
movq 0x1b37e(%rip), %rdi     # 0x1cab8
callq 0x1160
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x1672
cmpl $0xa, %ebx
jne 0x1755
incl 0x397f(%rip)            # 0x50d4
andl $0x7f, %ebx
movq 0x1b361(%rip), %rsi     # 0x1cac0
testq %rsi, %rsi
je 0x1672
movl %ebx, %edi
callq 0x10b0
jmp 0x1672
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: getsym
Sym*
getsym(char *name)
{
	Sym *s;
	s = findsym(name);
	if(s == nil){
		for(s = symtab; s < &symtab[MAXSYM]; s++)
			if(s->name[0] == 0)
				goto found;
		panic("symbol table full");
found:
		strncpy(s->name, name, SYMLEN);
		s->type = None;
		s->val = 0;
	}
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq $-0x18, %r15
leaq 0x3b64(%rip), %rbx      # 0x53b0
leaq (%r15,%rbx), %rdi
addq $0x18, %rdi
movl $0x6, %edx
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x189c
addq $0x18, %r15
cmpq $0x176e8, %r15          # imm = 0x176E8
jb 0x184c
movq $-0x18, %rax
cmpb $0x0, (%rbx)
je 0x18ad
addq $0x18, %rbx
addq $0x18, %rax
cmpq $0x176e7, %rax          # imm = 0x176E7
jbe 0x1879
leaq 0x17d8(%rip), %rdi      # 0x306d
xorl %eax, %eax
callq 0x147c
leaq 0x3b0d(%rip), %rax      # 0x53b0
leaq (%r15,%rax), %rbx
addq $0x18, %rbx
jmp 0x18ca
movl $0x6, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030
movl $0x0, 0x8(%rbx)
movw $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: number
Token
number(void)
{
	int c;
	Token t;

	t.type = TokWord;
	t.w = 0;
	while(isdigit(c = ch())){
		if(c-'0' >= radix)
			err(0, "warning: invalid digit in current base");
		t.w = t.w*radix + c-'0';
	}
	peekc = c;
	if(c && !ispunc(c)){
		err(0, "warning: ignored characters after number");
		while(c = ch(), c != EOF && !ispunc(c));
		peekc = c;
	}
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x1170
movq %rax, %r14
movq (%rax), %r12
callq 0x1653
movl %eax, %ebx
cltq
xorl %r15d, %r15d
testb $0x8, 0x1(%r12,%rax,2)
je 0x197b
leaq 0x1767(%rip), %r15      # 0x3096
xorl %r12d, %r12d
leal -0x30(%rbx), %ecx
movl 0x3795(%rip), %eax      # 0x50d0
cmpl %eax, %ecx
jge 0x1964
imull %r12d, %eax
addl %ebx, %eax
addl $0xffd0, %eax           # imm = 0xFFD0
movzwl %ax, %r12d
movq (%r14), %r13
callq 0x1653
movl %eax, %ebx
cltq
testb $0x8, 0x1(%r13,%rax,2)
jne 0x1932
jmp 0x1978
xorl %edi, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1190
movl 0x375a(%rip), %eax      # 0x50d0
jmp 0x193f
movl %r12d, %r15d
movl %ebx, 0x1b12f(%rip)     # 0x1cab0
testl %ebx, %ebx
je 0x199e
movsbl %bl, %esi
leaq 0x16f0(%rip), %rdi      # 0x307f
movl $0x17, %edx
callq 0x1090
testq %rax, %rax
je 0x19b5
movl $0x82, %eax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1268
jmp 0x199e
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: symbol
Token
symbol(void)
{
	char symbuf[SYMLEN+1];
	int c;
	Token t;
	int len;

	len = 0;
	memset(symbuf, 0, sizeof(symbuf));
	while(c = ch(), issymchar(c))
		if(len<SYMLEN)
			symbuf[len++] = tolower(c);
	peekc = c;
	t.type = TokSymbol;
	t.sym = getsym(symbuf);
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %r14d, %r14d
movl %r14d, -0x15(%rbp)
movl %r14d, -0x18(%rbp)
callq 0x1653
movl %eax, %ebx
callq 0x1170
movq (%rax), %rax
movslq %ebx, %rcx
movzwl (%rax,%rcx,2), %eax
testb $0x8, %al
jne 0x1a2b
cmpl $0x5f, %ebx
je 0x1a2b
cmpl $0x2e, %ebx
jne 0x1a44
cmpl $0x5, %r14d
ja 0x1a07
movl %ebx, %edi
callq 0x10e0
movl %r14d, %ecx
incl %r14d
movb %al, -0x18(%rbp,%rcx)
jmp 0x1a07
movl %ebx, 0x1b066(%rip)     # 0x1cab0
leaq -0x18(%rbp), %rdi
callq 0x1831
movq %rax, %rdx
movl $0x81, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: token
Token
token(void)
{
	static char *self = "+-!,=$*&()[]<>";
	int c;
	Token t;

tail:
	if(peekt.type != None){
		t = peekt;
		peekt.type = None;
		return t;
	}

	while(c = chsp(), c != EOF){
		if(isdigit(c)){
			peekc = c;
			return number();
		}else if(isalpha(c)){
			peekc = c;
			t = symbol();
			return t;
		}else if(strchr(self, c)){
			t.type = c;
			return t;
		}else switch(c){
		case '.':
			t.type = TokSymbol;
			t.sym = dot;
			return t;
		case ';':
		case '\n':
			t.type = TokEol;
			return t;
		case '"':
			t.type = TokWord;
			t.w = ch() | 0200;
			return t;
		case '/':
			while(ch() != '\n');
			t.type = TokEol;
			return t;
		default:
			err(0, "warning: ignored character %c", ch());
		}
	}
	t.type = TokEol;
	return t;
}

// Assembly:
movl 0x1b05e(%rip), %eax     # 0x1cac8
testl %eax, %eax
je 0x1a80
movq 0x1b05b(%rip), %rdx     # 0x1cad0
movl $0x0, 0x1b049(%rip)     # 0x1cac8
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1655(%rip), %rbx      # 0x30e6
movabsq $0x200005400, %r15      # imm = 0x200005400
callq 0x1653
movl %eax, %r14d
leal 0x1(%r14), %eax
cmpl $0x21, %eax
ja 0x1ab7
btq %rax, %r15
jb 0x1a9b
testq %rax, %rax
je 0x1b34
callq 0x1170
movq (%rax), %rax
movslq %r14d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xb, %eax
jb 0x1b66
btl $0xa, %eax
jb 0x1b74
movl $0xf, %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1090
movq %rax, %rcx
movl %r14d, %eax
testq %rcx, %rcx
jne 0x1b5b
cmpl $0x2d, %r14d
jle 0x1b0f
cmpl $0x2e, %r14d
je 0x1b3b
cmpl $0x3b, %r14d
je 0x1b34
cmpl $0x2f, %r14d
je 0x1b2a
jmp 0x1b20
movl $0x80, %eax
cmpl $0xa, %r14d
je 0x1b5b
cmpl $0x22, %r14d
je 0x1b49
callq 0x12c0
jmp 0x1a9b
callq 0x1653
cmpl $0xa, %eax
jne 0x1b2a
movl $0x80, %eax
jmp 0x1b5b
movl $0x81, %eax
movq 0x1af91(%rip), %rdx     # 0x1cad8
jmp 0x1b5b
callq 0x1653
orl $0x80, %eax
movzwl %ax, %edx
movl $0x82, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, 0x1af43(%rip)    # 0x1cab0
callq 0x18fb
jmp 0x1b56
movl %r14d, 0x1af35(%rip)    # 0x1cab0
callq 0x19f1
movl $0x81, %eax
jmp 0x1b5b
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: putword
void
putword(word w)
{
	static char left[64];

	if(pass2){
		/* listing */
		sprintf(left, "%04o  %06o\t", dot->val, w);
		list(left);

		fprintf(outfp, "%o: %o\n", dot->val++, w);
	}else{
		// this is probably useless...
		memory[dot->val++] = w;
	}
	dot->val &= W;
}

// Assembly:
cmpl $0x0, 0x1af26(%rip)     # 0x1cab4
movq 0x1af43(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
je 0x1bf4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl %di, %ebx
leaq 0x1af34(%rip), %r14     # 0x1cae0
leaq 0x1560(%rip), %rsi      # 0x3113
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x155f
movq 0x1af52(%rip), %rdi     # 0x1cb20
movq 0x1af03(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
leal 0x1(%rdx), %ecx
movw %cx, 0x10(%rax)
leaq 0x1538(%rip), %rsi      # 0x311f
movl %ebx, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x10c0
leal 0x1(%rdx), %ecx
movw %cx, 0x10(%rax)
movl %edx, %eax
leaq 0x1af2c(%rip), %rcx     # 0x1cb30
movw %di, (%rcx,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: writelits
void
writelits(void)
{
	word a;
	static char left[64];

	fprintf(lstfp, "\n    LITERALS\n");
	for(a = litdot; a < 04000; a++){
		/* listing */
		sprintf(left, "%04o  %06o\t", a, memory[a]);
		list(left);

		fprintf(outfp, "%o: %o\n", a, memory[a]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x3782(%rip), %rcx      # 0x53a0
leaq 0x1502(%rip), %rdi      # 0x3127
movl $0xe, %esi
movl $0x1, %edx
callq 0x1150
movzwl 0x1bf35(%rip), %ebx     # 0x1db70
cmpq $0x7ff, %rbx            # imm = 0x7FF
ja 0x1ca9
leaq 0x1aee5(%rip), %rax     # 0x1cb30
leaq (%rax,%rbx,2), %r13
leaq 0x1beda(%rip), %r14     # 0x1db30
leaq 0x14b6(%rip), %r15      # 0x3113
leaq 0x14bb(%rip), %r12      # 0x311f
movzwl (%r13), %ecx
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x155f
movq 0x1ae99(%rip), %rdi     # 0x1cb20
movzwl (%r13), %ecx
movq %r12, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10c0
incq %rbx
movzwl %bx, %eax
addq $0x2, %r13
cmpl $0x800, %eax            # imm = 0x800
jne 0x1c64
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: putlit
word
putlit(word w)
{
	word a;

	for(a = litdot; a < 04000; a++)
		if(memory[a] == w)
			return a;
	if(litdot == 0)
		err(1, "error: too many literals");
	a = --litdot;
	memory[a] = w;
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movzwl 0x1bea8(%rip), %eax     # 0x1db70
leaq 0x1ae61(%rip), %r14     # 0x1cb30
cmpq $0x7ff, %rax            # imm = 0x7FF
ja 0x1cfa
leaq (%r14,%rax,2), %rdx
movq %rax, %rcx
cmpw %bx, (%rdx)
je 0x1d0d
incq %rcx
movzwl %cx, %esi
addq $0x2, %rdx
cmpl $0x800, %esi            # imm = 0x800
jne 0x1cde
testw %ax, %ax
je 0x1d14
decl %eax
movw %ax, 0x1be6d(%rip)      # 0x1db70
movzwl %ax, %ecx
movw %bx, (%r14,%rcx,2)
jmp 0x1d0f
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x141b(%rip), %rsi      # 0x3136
movl $0x1, %edi
xorl %eax, %eax
callq 0x1190
movzwl 0x1be42(%rip), %eax     # 0x1db70
jmp 0x1cfa
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: combine
word
combine(int op, word w1, word w2)
{
	switch(op){
	case 0:
		return w2;
	case '+':
		w1 += w2;
		if(w1 & 0200000)
			w1 += 1;
		return w1 & W;
	case '-':
		w1 += ~w2 & W;
		if(w1 & 0200000)
			w1 += 1;
		return w1 & W;
	case ' ':
	case '!':
		return (w1 | w2) & W;
	case '&':
		return (w1 & w2) & W;
	default:
		panic("unknown operator %c", op);
	}
	return 0;
}

// Assembly:
movl %edi, %eax
cmpl $0x25, %edi
jg 0x1d43
leal -0x20(%rax), %ecx
cmpl $0x2, %ecx
jae 0x1d56
orl %esi, %edx
jmp 0x1d78
cmpl $0x26, %eax
je 0x1d76
cmpl $0x2d, %eax
je 0x1d6e
cmpl $0x2b, %eax
jne 0x1d5a
addl %esi, %edx
jmp 0x1d78
testl %eax, %eax
je 0x1d78
pushq %rbp
movq %rsp, %rbp
leaq 0x13ea(%rip), %rdi      # 0x314f
movl %eax, %esi
xorl %eax, %eax
callq 0x147c
notl %edx
addl %edx, %esi
movl %esi, %edx
jmp 0x1d78
andl %esi, %edx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: expr
word
expr(int mustdef)
{
	word w, v;
	Token t;
	int op;
	int stype;

	/* operators:
	 * + add
	 * - sub
	 * ! or
	 * & and
	 * space combine */

	op = 0;
	w = 0;
	// not quite sure about expression delimiter here...
	while(t = token(), t.type != TokEol &&
	      t.type != ')' && t.type != ']' && t.type != ','){
		switch(t.type){
		case TokWord:
			w = combine(op, w, t.w);
			op = ' ';
			break;

		case TokSymbol:
			stype = t.sym->type & 7;
			v = 0;
			if(stype == SymValue)
				v = t.sym->val;
			else if(stype != None || pass2)
				err(1, "error: bad symbol in expression");
			if(mustdef && stype == None)
				err(1, "error: undefined symbol");
			w = combine(op, w, v);
			op = ' ';
			break;

		case '(':
			v = expr(0);
			v = putlit(v);
			w = combine(op, w, v);
			op = ' ';
			t = token();
			if(t.type != ')' && t.type != TokEol)
				err(1, "err: literal not closed");
			if(t.type != ')')
				peekt = t;
			break;

		case '+':
		case '-':
		case '!':
		case '&':
			op = t.type;
			break;
		}
	}
	peekt = t;
	return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, -0x2c(%rbp)
xorl %r15d, %r15d
movl $0x1421, %ebx           # imm = 0x1421
movabsq $0x1000000000000900, %r13 # imm = 0x1000000000000900
xorl %r14d, %r14d
callq 0x1a64
cmpl $0x7f, %eax
jg 0x1e21
movl %eax, %ecx
addl $-0x21, %ecx
cmpl $0x3c, %ecx
ja 0x1da4
btq %rcx, %rbx
jb 0x1e47
btq %rcx, %r13
jb 0x1eba
cmpq $0x7, %rcx
jne 0x1da4
xorl %edi, %edi
callq 0x1d7b
movzwl %ax, %edi
callq 0x1cb8
movzwl %r14w, %esi
movzwl %ax, %edx
movl %r15d, %edi
callq 0x1d30
movl %eax, %r14d
callq 0x1a64
movl $0x20, %r15d
cmpl $0x29, %eax
je 0x1da4
movl %eax, %r12d
cmpl $0x80, %eax
jne 0x1e98
movl %r12d, 0x1acb0(%rip)    # 0x1cac8
movq %rdx, 0x1acb1(%rip)     # 0x1cad0
jmp 0x1da4
cmpl $0x80, %eax
je 0x1eba
cmpl $0x81, %eax
je 0x1e4f
cmpl $0x82, %eax
jne 0x1da4
movzwl %r14w, %esi
movzwl %dx, %edx
jmp 0x1e82
movl %eax, %r15d
jmp 0x1da4
movl 0x8(%rdx), %r12d
andl $0x7, %r12d
cmpl $0x1, %r12d
jne 0x1e63
movzwl 0x10(%rdx), %eax
jmp 0x1e7b
movl 0x1ac4b(%rip), %eax     # 0x1cab4
orl %r12d, %eax
jne 0x1eb3
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
je 0x1e7b
testl %r12d, %r12d
je 0x1eaa
movzwl %r14w, %esi
movzwl %ax, %edx
movl %r15d, %edi
callq 0x1d30
movl %eax, %r14d
movl $0x20, %r15d
jmp 0x1da4
movq %rdx, -0x38(%rbp)
callq 0x12dc
movq -0x38(%rbp), %rdx
jmp 0x1e11
callq 0x130c
xorl %eax, %eax
jmp 0x1e7b
callq 0x12f4
jmp 0x1e6e
movl %eax, 0x1ac08(%rip)     # 0x1cac8
movq %rdx, 0x1ac09(%rip)     # 0x1cad0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: statement
void
statement(void)
{
	Token t;
	Sym *s;
	word w;

	while(t = token(), t.type != TokEol){
		switch(t.type){
		case TokSymbol:
			s = t.sym;
			if(peek() == ','){
				peekc = 0;
				if(s->type == None ||
				   s->type & SymLabel && s->val == dot->val){
					s->type = SymValue | SymLabel;
					s->val = dot->val;
				}else{
					err(1, "error: redefinition by label");
				}
			}else if(peek() == '='){
				peekc = 0;
				w = expr(0);
				if(s->type == None || (s->type & SymLabel) == 0){
					s->type = SymValue;
					s->val = w;
				}else
					err(1, "error: redefinition by equ");
			}else{
				peekt = t;
				w = expr(0);
				putword(w);
			}
			break;
		case '-':
		case TokWord:
			peekt = t;
			w = expr(0);
			putword(w);
			break;

		case '$':
			t = token();
			if(t.type == TokWord)
				startaddr = t.w;
			else if(t.type == TokSymbol){
				startaddr = t.sym->val;
			}else
				err(1, "error: expected word or symbol");
			// end assembly
			peekc = EOF;
			return;

		case '*':
			w = expr(1);
			dot->val = w;
			break;

		default:
			err(1, "unknown token %c", t.type);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1323(%rip), %rbx      # 0x320a
callq 0x1a64
movq %rdx, %r14
cmpl $0x7f, %eax
jg 0x1f0c
cmpl $0x2a, %eax
je 0x1f3c
cmpl $0x2d, %eax
je 0x1f1e
cmpl $0x24, %eax
je 0x2022
jmp 0x2002
cmpl $0x81, %eax
je 0x1f53
cmpl $0x82, %eax
jne 0x1ffb
movl %eax, 0x1aba4(%rip)     # 0x1cac8
movq %r14, 0x1aba5(%rip)     # 0x1cad0
xorl %edi, %edi
callq 0x1d7b
movzwl %ax, %edi
callq 0x1b87
jmp 0x1ee7
movl $0x1, %edi
callq 0x1d7b
movq 0x1ab8b(%rip), %rcx     # 0x1cad8
movw %ax, 0x10(%rcx)
jmp 0x1ee7
callq 0x1653
movl %eax, 0x1ab52(%rip)     # 0x1cab0
cmpl $0x2c, %eax
jne 0x1f95
movl $0x0, 0x1ab43(%rip)     # 0x1cab0
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x1fde
testb $0x8, %al
je 0x1f8b
movzwl 0x10(%r14), %ecx
movq 0x1ab53(%rip), %rax     # 0x1cad8
cmpw 0x10(%rax), %cx
je 0x1fe5
callq 0x1354
jmp 0x1ee7
callq 0x1653
movl %eax, 0x1ab10(%rip)     # 0x1cab0
cmpl $0x3d, %eax
jne 0x1fcf
movl $0x0, 0x1ab01(%rip)     # 0x1cab0
xorl %edi, %edi
callq 0x1d7b
testb $0x8, 0x8(%r14)
jne 0x2018
movl $0x1, 0x8(%r14)
movw %ax, 0x10(%r14)
jmp 0x1ee7
movl $0x81, 0x1aaef(%rip)    # 0x1cac8
jmp 0x1f24
movq 0x1aaf3(%rip), %rax     # 0x1cad8
movl $0x9, 0x8(%r14)
movzwl 0x10(%rax), %eax
movw %ax, 0x10(%r14)
jmp 0x1ee7
cmpl $0x80, %eax
je 0x2053
movl $0x1, %edi
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x1190
jmp 0x1ee7
callq 0x133c
jmp 0x1ee7
callq 0x1a64
cmpl $0x81, %eax
je 0x203e
cmpl $0x82, %eax
jne 0x2058
movw %dx, 0x1bb36(%rip)      # 0x1db72
jmp 0x2049
movzwl 0x10(%rdx), %eax
movw %ax, 0x1bb29(%rip)      # 0x1db72
movl $0xffffffff, 0x1aa5d(%rip) # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
callq 0x1324
jmp 0x2049
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: assemble
void
assemble(void)
{
	peekt.type = None;
	while(peek() != EOF)
		statement();

	// list last line
	if(pass2 && line[0])
		list(nil);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x1aa5b(%rip)     # 0x1cac8
callq 0x1653
movl %eax, 0x1aa38(%rip)     # 0x1cab0
cmpl $-0x1, %eax
je 0x2084
callq 0x1ed9
jmp 0x206d
cmpl $0x0, 0x1aa29(%rip)     # 0x1cab4
je 0x209e
cmpb $0x0, 0x32bc(%rip)      # 0x5350
je 0x209e
xorl %edi, %edi
popq %rbp
jmp 0x155f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: checkundef
void
checkundef(void)
{
	int i;
	int e;

	e = 0;
	for(i = 0; i < MAXSYM; i++)
		if(symtab[i].name[0] && symtab[i].type == None){
			err(0, "error: %s undefined", symtab[i].name);
			e = 1;
		}
	if(e)
		err(1, "errors in first pass");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %r14b
xorl %r15d, %r15d
leaq 0x32f8(%rip), %r12      # 0x53b0
leaq 0x115c(%rip), %rbx      # 0x321b
leaq (%r15,%r15,2), %rax
incq %r15
leaq (%r12,%rax,8), %rdx
cmpb $0x0, (%rdx)
je 0x20d5
cmpl $0x0, 0x8(%rdx)
je 0x20e7
incq %r15
addq $0x18, %rdx
cmpq $0xfa1, %r15            # imm = 0xFA1
jne 0x20ca
jmp 0x2101
xorl %r14d, %r14d
xorl %edi, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1190
cmpq $0xfa0, %r15            # imm = 0xFA0
jne 0x20bf
jmp 0x2110
testb $0x1, %r14b
je 0x2110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x136c
jmp 0x2107
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: initsymtab
void
initsymtab(void)
{
	int i;
	Sym *s;

	for(i = 0; valtab[i].sym; i++){
		s = getsym(valtab[i].sym);
		s->type = SymValue;
		s->val = valtab[i].val;
	}
/*
	for(i = 0; pseudtab[i].sym; i++){
		s = getsym(sixbit(pseudtab[i].sym));
		s->type = SymPseudo;
		s->f = pseudtab[i].f;
	}
*/
	dot = findsym(".");
	dot->type = SymValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x2fbc(%rip), %rdi      # 0x50e0
testq %rdi, %rdi
je 0x2150
leaq 0x2fc0(%rip), %rbx      # 0x50f0
callq 0x1831
movl $0x1, 0x8(%rax)
movzwl -0x8(%rbx), %ecx
movw %cx, 0x10(%rax)
movq (%rbx), %rdi
addq $0x10, %rbx
testq %rdi, %rdi
jne 0x2130
xorl %eax, %eax
leaq 0x3257(%rip), %rcx      # 0x53b0
xorl %edx, %edx
cmpb $0x2e, (%rdx,%rcx)
jne 0x2168
cmpb $0x0, 0x1(%rdx,%rcx)
je 0x217a
leaq 0x18(%rdx), %rsi
cmpq $0x176e7, %rdx          # imm = 0x176E7
movq %rsi, %rdx
jbe 0x215b
jmp 0x2180
addq %rdx, %rcx
movq %rcx, %rax
movq %rax, 0x1a951(%rip)     # 0x1cad8
movl $0x1, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]rx-0/misc/wwas.c
// Function: main
int
main(int argc, char *argv[])
{
	int i;

	infp = stdin;
	filename = "<stdin>";
	tmpfp = mustopen("tmptmp", "wb");

	initsymtab();

	litdot = 04000;
	dot->val = 040;
	pass2 = 0;
	assemble();

	checkundef();

	pass2 = 1;
	fclose(tmpfp);
	tmpfp = nil;
	infp = mustopen("tmptmp", "rb");
	outfp = mustopen("out.mem", "wb");

	lstfp = mustopen("out.lst", "w");
	litdot = 04000;
	dot->val = 040;
	lineno = 1;
	peekc = 0;
	assemble();

	writelits();

	fclose(infp);
	fclose(outfp);

	listsyms();

	printf("start: %o\n", startaddr);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2e2e(%rip), %rax      # 0x4fd8
movq (%rax), %rax
movq %rax, 0x1a904(%rip)     # 0x1cab8
leaq 0x10fa(%rip), %rax      # 0x32b5
movq %rax, 0x317e(%rip)      # 0x5340
leaq 0x10f4(%rip), %r14      # 0x32bd
leaq 0x10f4(%rip), %rbx      # 0x32c4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1516
movq %rax, 0x1a8de(%rip)     # 0x1cac0
callq 0x2117
movw $0x800, %ax             # imm = 0x800
movw %ax, 0x1b97e(%rip)      # 0x1db70
movq 0x1a8df(%rip), %rax     # 0x1cad8
movw $0x20, %r12w
movw %r12w, 0x10(%rax)
xorl %r13d, %r13d
movl %r13d, 0x1a8a7(%rip)    # 0x1cab4
callq 0x205f
callq 0x20a0
movl $0x1, %r15d
movl %r15d, 0x1a890(%rip)    # 0x1cab4
movq 0x1a895(%rip), %rdi     # 0x1cac0
callq 0x1060
movq $0x0, 0x1a885(%rip) # 0x1cac0
leaq 0x1085(%rip), %rsi      # 0x32c7
movq %r14, %rdi
callq 0x1516
movq %rax, 0x1a867(%rip)     # 0x1cab8
leaq 0x1072(%rip), %rdi      # 0x32ca
movq %rbx, %rsi
callq 0x1516
movq %rax, 0x1a8b9(%rip)     # 0x1cb20
leaq 0x1064(%rip), %rdi      # 0x32d2
leaq 0x1065(%rip), %rsi      # 0x32da
callq 0x1516
movq %rax, 0x311f(%rip)      # 0x53a0
movw $0x800, %ax             # imm = 0x800
movw %ax, 0x1b8e4(%rip)      # 0x1db70
movq 0x1a845(%rip), %rax     # 0x1cad8
movw %r12w, 0x10(%rax)
movl %r15d, 0x2e35(%rip)     # 0x50d4
movl %r13d, 0x1a80a(%rip)    # 0x1cab0
callq 0x205f
callq 0x1c09
movq 0x1a801(%rip), %rdi     # 0x1cab8
callq 0x1060
movq 0x1a85d(%rip), %rdi     # 0x1cb20
callq 0x1060
callq 0x15bf
movzwl 0x1b89e(%rip), %esi     # 0x1db72
leaq 0x1001(%rip), %rdi      # 0x32dc
xorl %eax, %eax
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq