LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/leg.c
// Function: yy_action
YY_RULE(int) yy_action()
{  int yypos0= yypos, yythunkpos0= yythunkpos;
  yyprintf((stderr, "%s\n", "action"));  if (!yymatchChar('{')) goto l72;  yyText(yybegin, yyend);  if (!(YY_BEGIN)) goto l72;
  l73:;	
  {  int yypos74= yypos, yythunkpos74= yythunkpos;  if (!yy_braces()) goto l74;  goto l73;
  l74:;	  yypos= yypos74; yythunkpos= yythunkpos74;
  }  yyText(yybegin, yyend);  if (!(YY_END)) goto l72;  if (!yymatchChar('}')) goto l72;  if (!yy__()) goto l72;
  yyprintf((stderr, "  ok   %s @ %s\n", "action", yybuf+yypos));
  return 1;
  l72:;	  yypos= yypos0; yythunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "action", yybuf+yypos));
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x7e1b(%rip), %ebx      # 0xa150
movl 0x7e0d(%rip), %ebp      # 0xa148
pushq $0x7b
popq %rdi
callq 0x1b4e
testl %eax, %eax
je 0x2456
movl %ebp, (%rsp)
movl %ebx, 0x4(%rsp)
movl 0x7e00(%rip), %edi      # 0xa158
movl 0x7df6(%rip), %esi      # 0xa154
callq 0x189d
movl 0x7de6(%rip), %r12d     # 0xa150
movl %r12d, 0x7de7(%rip)     # 0xa158
pushq $0x7b
popq %rbx
pushq $0x7d
popq %rbp
movl 0x7dca(%rip), %r13d     # 0xa148
movl %ebx, %edi
callq 0x1b4e
testl %eax, %eax
je 0x23d2
movl 0x7dc0(%rip), %r14d     # 0xa150
movl 0x7db1(%rip), %r15d     # 0xa148
movl %ebp, %edi
callq 0x1b4e
testl %eax, %eax
jne 0x23b9
movl %r14d, 0x7da7(%rip)     # 0xa150
movl %r15d, 0x7d98(%rip)     # 0xa148
callq 0x1cdf
testl %eax, %eax
jne 0x2389
movl %r14d, 0x7d90(%rip)     # 0xa150
movl %r15d, 0x7d81(%rip)     # 0xa148
movl %ebp, %edi
callq 0x1b4e
testl %eax, %eax
jne 0x2402
movl %r12d, 0x7d77(%rip)     # 0xa150
movl %r13d, 0x7d68(%rip)     # 0xa148
movl %ebp, %edi
callq 0x1b4e
testl %eax, %eax
jne 0x240e
movl %r12d, 0x7d5e(%rip)     # 0xa150
movl %r13d, 0x7d4f(%rip)     # 0xa148
callq 0x1cdf
testl %eax, %eax
je 0x240e
movl 0x7d47(%rip), %r12d     # 0xa150
jmp 0x2377
movl %r12d, 0x7d3b(%rip)     # 0xa150
movl %r13d, 0x7d2c(%rip)     # 0xa148
movl 0x7d36(%rip), %edi      # 0xa158
movl 0x7d2c(%rip), %esi      # 0xa154
callq 0x189d
movl 0x7d1d(%rip), %eax      # 0xa150
movl %eax, 0x7d1b(%rip)      # 0xa154
pushq $0x7d
popq %rdi
callq 0x1b4e
testl %eax, %eax
movl 0x4(%rsp), %ebx
movl (%rsp), %ebp
je 0x2456
callq 0x1a74
pushq $0x1
popq %rax
jmp 0x2464
movl %ebx, 0x7cf4(%rip)      # 0xa150
movl %ebp, 0x7ce6(%rip)      # 0xa148
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeRule
Node *makeRule(char *name)
{
  Node *node= newNode(Rule);
  node->rule.name= strdup(name);
  node->rule.id= ++ruleCount;
  node->rule.flags= 0;
  node->rule.next= rules;
  rules= node;
  return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x2c15
movq %rax, %r14
movq %rbx, %rdi
callq 0x1190
movq %rax, 0x10(%r14)
movl 0x75d5(%rip), %eax      # 0xa1bc
incl %eax
movl %eax, 0x75cd(%rip)      # 0xa1bc
movl %eax, 0x28(%r14)
andl $0x0, 0x2c(%r14)
movq 0x7599(%rip), %rax      # 0xa198
movq %rax, 0x8(%r14)
movq %r14, 0x758e(%rip)      # 0xa198
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: findRule
Node *findRule(char *name)
{
  Node *n;
  char *ptr;
  for (ptr= name;  *ptr;  ptr++) if ('-' == *ptr) *ptr= '_';
  for (n= rules;  n;  n= n->any.next)
    {
      assert(Rule == n->type);
      if (!strcmp(name, n->rule.name))
	return n;
    }
  return makeRule(name);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %rax
movzbl (%rax), %ecx
cmpl $0x2d, %ecx
je 0x2c3e
testl %ecx, %ecx
jne 0x2c41
jmp 0x2c46
movb $0x5f, (%rax)
incq %rax
jmp 0x2c30
leaq 0x754b(%rip), %r14      # 0xa198
movq (%r14), %r14
testq %r14, %r14
je 0x2c71
cmpl $0x1, (%r14)
jne 0x2c8b
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x10b0
testl %eax, %eax
je 0x2c80
addq $0x8, %r14
jmp 0x2c4d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2bc0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x267a(%rip), %rdi      # 0x530c
leaq 0x2683(%rip), %rsi      # 0x531c
leaq 0x2683(%rip), %rcx      # 0x5323
pushq $0x40
popq %rdx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: Rule_setExpression
void Rule_setExpression(Node *node, Node *expression)
{
  assert(node);
#ifdef DEBUG
  Node_print(node);  fprintf(stderr, " [%d]<- ", node->type);  Node_print(expression);  fprintf(stderr, "\n");
#endif
  assert(Rule == node->type);
  node->rule.expression= expression;
  if (!start || !strcmp(node->rule.name, "start"))
    start= node;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2cf3
movq %rdi, %rbx
cmpl $0x1, (%rdi)
jne 0x2d0c
movq %rsi, 0x20(%rbx)
cmpq $0x0, 0x74d4(%rip)      # 0xa1a8
je 0x2cea
movq 0x10(%rbx), %rdi
leaq 0x2699(%rip), %rsi      # 0x537a
callq 0x10b0
testl %eax, %eax
jne 0x2cf1
movq %rbx, 0x74b7(%rip)      # 0xa1a8
popq %rbx
retq
leaq 0x2640(%rip), %rdi      # 0x533a
leaq 0x261b(%rip), %rsi      # 0x531c
leaq 0x2637(%rip), %rcx      # 0x533f
pushq $0x4f
jmp 0x2d23
leaq 0x2654(%rip), %rdi      # 0x5367
leaq 0x2602(%rip), %rsi      # 0x531c
leaq 0x261e(%rip), %rcx      # 0x533f
pushq $0x53
popq %rdx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeVariable
Node *makeVariable(char *name)
{
  Node *node;
  assert(thisRule);
  for (node= thisRule->rule.variables;  node;  node= node->variable.next)
    if (!strcmp(name, node->variable.name))
      return node;
  node= newNode(Variable);
  node->variable.name= strdup(name);
  node->variable.next= thisRule->rule.variables;
  thisRule->rule.variables= node;
  return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x746c(%rip), %rbx      # 0xa1a0
testq %rbx, %rbx
je 0x2d96
movq %rdi, %r14
addq $0x18, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2d5e
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x10b0
testl %eax, %eax
je 0x2d8b
addq $0x8, %rbx
jmp 0x2d40
pushq $0x2
popq %rdi
pushq $0x28
popq %rsi
callq 0x2c15
movq %rax, %rbx
movq %r14, %rdi
callq 0x1190
movq %rax, 0x10(%rbx)
movq 0x7421(%rip), %rax      # 0xa1a0
movq 0x18(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq %rbx, 0x18(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x25e3(%rip), %rdi      # 0x5380
leaq 0x2578(%rip), %rsi      # 0x531c
leaq 0x25de(%rip), %rcx      # 0x5389
pushq $0x5c
popq %rdx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeName
Node *makeName(Node *rule)
{
  Node *node= newNode(Name);
  node->name.rule= rule;
  node->name.variable= 0;
  rule->rule.flags |= RuleUsed;
  return node;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x3
popq %rdi
pushq $0x20
popq %rsi
callq 0x2c15
movq %rbx, 0x10(%rax)
andq $0x0, 0x18(%rax)
orb $0x1, 0x2c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeAction
Node *makeAction(char *text)
{
  Node *node= newNode(Action);
  char name[1024];
  assert(thisRule);
  sprintf(name, "_%d_%s", ++actionCount, thisRule->rule.name);
  node->action.name= strdup(name);
  node->action.text= strdup(text);
  node->action.list= actions;
  node->action.rule= thisRule;
  actions= node;
  {
    char *ptr;
    for (ptr= node->action.text;  *ptr;  ++ptr)
      if ('$' == ptr[0] && '$' == ptr[1])
	ptr[1]= ptr[0]= 'y';
  }
  return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %r14
pushq $0x8
popq %rdi
pushq $0x30
popq %rsi
callq 0x2c15
movq %rax, %rbx
movq 0x731c(%rip), %rax      # 0xa1a0
testq %rax, %rax
je 0x2f17
movl 0x7325(%rip), %edx      # 0xa1b8
incl %edx
movl %edx, 0x731d(%rip)      # 0xa1b8
movq 0x10(%rax), %rcx
leaq 0x2517(%rip), %rsi      # 0x53bd
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x1160
movq %r15, %rdi
callq 0x1190
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x1190
movq %rax, 0x10(%rbx)
movq 0x72be(%rip), %rcx      # 0xa190
movq %rcx, 0x18(%rbx)
movq 0x72c3(%rip), %rcx      # 0xa1a0
movq %rcx, 0x28(%rbx)
movq %rbx, 0x72a8(%rip)      # 0xa190
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0x24, %ecx
je 0x2efa
testl %ecx, %ecx
jne 0x2ee8
jmp 0x2f07
cmpb $0x24, (%rax)
jne 0x2ee8
movw $0x7979, -0x1(%rax)     # imm = 0x7979
jmp 0x2ee8
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2462(%rip), %rdi      # 0x5380
leaq 0x23f7(%rip), %rsi      # 0x531c
leaq 0x2478(%rip), %rcx      # 0x53a4
movl $0x8e, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeAlternate
Node *makeAlternate(Node *e)
{
  if (Alternate != e->type)
    {
      Node *node= newNode(Alternate);
      assert(e);
      assert(!e->any.next);
      node->alternate.first=
	node->alternate.last= e;
      return node;
    }
  return e;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0xa, (%rdi)
je 0x2f88
pushq $0xa
popq %rdi
pushq $0x20
popq %rsi
callq 0x2c15
cmpq $0x0, 0x8(%rbx)
jne 0x2f8d
movq %rbx, 0x18(%rax)
movq %rbx, 0x10(%rax)
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x244c(%rip), %rdi      # 0x53e0
leaq 0x2381(%rip), %rsi      # 0x531c
leaq 0x2422(%rip), %rcx      # 0x53c4
movl $0xab, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: Alternate_append
Node *Alternate_append(Node *a, Node *e)
{
  assert(a);
  a= makeAlternate(a);
  assert(a->alternate.last);
  assert(e);
  a->alternate.last->any.next= e;
  a->alternate.last= e;
  return a;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2fd2
movq %rsi, %rbx
callq 0x2f62
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x2ff1
testq %rbx, %rbx
je 0x3010
movq %rbx, 0x8(%rcx)
movq %rbx, 0x18(%rax)
popq %rbx
retq
leaq 0x2414(%rip), %rdi      # 0x53ed
leaq 0x233c(%rip), %rsi      # 0x531c
leaq 0x2408(%rip), %rcx      # 0x53ef
movl $0xb5, %edx
callq 0x1060
leaq 0x241e(%rip), %rdi      # 0x5416
leaq 0x231d(%rip), %rsi      # 0x531c
leaq 0x23e9(%rip), %rcx      # 0x53ef
movl $0xb7, %edx
callq 0x1060
leaq 0x2326(%rip), %rdi      # 0x533d
leaq 0x22fe(%rip), %rsi      # 0x531c
leaq 0x23ca(%rip), %rcx      # 0x53ef
movl $0xb8, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: makeSequence
Node *makeSequence(Node *e)
{
  if (Sequence != e->type)
    {
      Node *node= newNode(Sequence);
      assert(e);
      assert(!e->any.next);
      node->sequence.first=
	node->sequence.last= e;
      return node;
    }
  return e;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0xb, (%rdi)
je 0x3055
pushq $0xb
popq %rdi
pushq $0x20
popq %rsi
callq 0x2c15
cmpq $0x0, 0x8(%rbx)
jne 0x305a
movq %rbx, 0x18(%rax)
movq %rbx, 0x10(%rax)
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x237f(%rip), %rdi      # 0x53e0
leaq 0x22b4(%rip), %rsi      # 0x531c
leaq 0x23b9(%rip), %rcx      # 0x5428
movl $0xc4, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: Sequence_append
Node *Sequence_append(Node *a, Node *e)
{
  assert(a);
  a= makeSequence(a);
  assert(a->sequence.last);
  assert(e);
  a->sequence.last->any.next= e;
  a->sequence.last= e;
  return a;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x309f
movq %rsi, %rbx
callq 0x302f
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x30be
testq %rbx, %rbx
je 0x30dd
movq %rbx, 0x8(%rcx)
movq %rbx, 0x18(%rax)
popq %rbx
retq
leaq 0x2347(%rip), %rdi      # 0x53ed
leaq 0x226f(%rip), %rsi      # 0x531c
leaq 0x238f(%rip), %rcx      # 0x5443
movl $0xce, %edx
callq 0x1060
leaq 0x23a4(%rip), %rdi      # 0x5469
leaq 0x2250(%rip), %rsi      # 0x531c
leaq 0x2370(%rip), %rcx      # 0x5443
movl $0xd0, %edx
callq 0x1060
leaq 0x2259(%rip), %rdi      # 0x533d
leaq 0x2231(%rip), %rsi      # 0x531c
leaq 0x2351(%rip), %rcx      # 0x5443
movl $0xd1, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: push
Node *push(Node *node)
{
  assert(node);
  assert(stackPointer < stack + 1023);
#ifdef DEBUG
  dumpStack();  fprintf(stderr, " PUSH ");  Node_print(node);  fprintf(stderr, "\n");
#endif
  return *++stackPointer= node;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3192
movq 0x6f7e(%rip), %rax      # 0xa0f0
leaq 0x903f(%rip), %rcx      # 0xc1b8
cmpq %rcx, %rax
jae 0x31b1
leaq 0x8(%rax), %rcx
movq %rcx, 0x6f67(%rip)      # 0xa0f0
movq %rdi, 0x8(%rax)
movq %rdi, %rax
popq %rcx
retq
leaq 0x21a1(%rip), %rdi      # 0x533a
leaq 0x217c(%rip), %rsi      # 0x531c
leaq 0x22d3(%rip), %rcx      # 0x547a
movl $0x10e, %edx            # imm = 0x10E
callq 0x1060
leaq 0x22d5(%rip), %rdi      # 0x548d
leaq 0x215d(%rip), %rsi      # 0x531c
leaq 0x22b4(%rip), %rcx      # 0x547a
movl $0x10f, %edx            # imm = 0x10F
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/tree.c
// Function: Rule_print
static void Rule_fprint(FILE *stream, Node *node)
{
  assert(node);
  assert(Rule == node->type);
  fprintf(stream, "%s.%d =", node->rule.name, node->rule.id);
  if (node->rule.expression)
    Node_fprint(stream, node->rule.expression);
  else
    fprintf(stream, " UNDEFINED");
  fprintf(stream, " ;\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x34d2
movq %rdi, %r14
cmpl $0x1, (%rdi)
jne 0x34f1
movq 0x6b86(%rip), %rax      # 0x9ff8
movq (%rax), %rbx
movq 0x10(%r14), %rdx
movl 0x28(%r14), %ecx
leaq 0x20dc(%rip), %rsi      # 0x5560
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x20(%r14), %rsi
testq %rsi, %rsi
jne 0x34ae
leaq 0x20ca(%rip), %rdi      # 0x5568
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1180
jmp 0x34b6
movq %rbx, %rdi
callq 0x3258
leaq 0x20b6(%rip), %rdi      # 0x5573
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1180
leaq 0x1e61(%rip), %rdi      # 0x533a
leaq 0x1e3c(%rip), %rsi      # 0x531c
leaq 0x2058(%rip), %rcx      # 0x553f
movl $0x156, %edx            # imm = 0x156
callq 0x1060
leaq 0x1e6f(%rip), %rdi      # 0x5367
leaq 0x1e1d(%rip), %rsi      # 0x531c
leaq 0x2039(%rip), %rcx      # 0x553f
movl $0x157, %edx            # imm = 0x157
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/compile.c
// Function: Rule_compile_c_header
void Rule_compile_c_header(void)
{
  fprintf(output, "/* A recursive-descent parser generated by peg %d.%d.%d */\n", PEG_MAJOR, PEG_MINOR, PEG_LEVEL);
  fprintf(output, "\n");
  fprintf(output, "%s", header);
  fprintf(output, "#define YYRULECOUNT %d\n", ruleCount);
}

// Assembly:
pushq %rbx
leaq 0x6c98(%rip), %rbx      # 0xa1b0
movq (%rbx), %rdi
leaq 0x2112(%rip), %rsi      # 0x5634
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
xorl %edx, %edx
xorl %eax, %eax
callq 0x10c0
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x1090
movq (%rbx), %rsi
leaq 0x2235(%rip), %rdi      # 0x577c
callq 0x1070
movq (%rbx), %rdi
leaq 0x6c66(%rip), %rax      # 0xa1bc
movl (%rax), %edx
leaq 0x2111(%rip), %rsi      # 0x5670
xorl %eax, %eax
popq %rbx
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/macournoyer[P]peg/compile.c
// Function: consumesInput
int consumesInput(Node *node)
{
  if (!node) return 0;

  switch (node->type)
    {
    case Rule:
      {
	int result= 0;
	if (RuleReached & node->rule.flags)
	  fprintf(stderr, "possible infinite left recursion in rule '%s'\n", node->rule.name);
	else
	  {
	    node->rule.flags |= RuleReached;
	    result= consumesInput(node->rule.expression);
	    node->rule.flags &= ~RuleReached;
	  }
	return result;
      }
      break;

    case Dot:		return 1;
    case Name:		return consumesInput(node->name.rule);
    case Character:
    case String:	return strlen(node->string.value) > 0;
    case Class:		return 1;
    case Action:	return 0;
    case Predicate:	return 0;

    case Alternate:
      {
	Node *n;
	for (n= node->alternate.first;  n;  n= n->alternate.next)
	  if (!consumesInput(n))
	    return 0;
      }
      return 1;

    case Sequence:
      {
	Node *n;
	for (n= node->alternate.first;  n;  n= n->alternate.next)
	  if (consumesInput(n))
	    return 1;
      }
      return 0;

    case PeekFor:	return 0;
    case PeekNot:	return 0;
    case Query:		return 0;
    case Star:		return 0;
    case Plus:		return consumesInput(node->plus.element);

    default:
      fprintf(stderr, "\nconsumesInput: illegal node type %d\n", node->type);
      exit(1);
    }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rax
leaq 0x1fff(%rip), %rcx      # 0x5578
xorl %ebx, %ebx
testq %r14, %r14
je 0x361a
movl (%r14), %edx
leal -0x1(%rdx), %esi
cmpl $0xf, %esi
ja 0x3642
movslq (%rcx,%rsi,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movq 0x10(%r14), %r14
jmp 0x357b
movl %eax, %ebx
jmp 0x361a
movq 0x10(%r14), %rax
xorl %ebx, %ebx
cmpb $0x0, (%rax)
jmp 0x3617
addq $0x10, %r14
movq (%r14), %r15
testq %r15, %r15
je 0x35cd
movq %r15, %rdi
callq 0x3567
leaq 0x8(%r15), %r14
testl %eax, %eax
jne 0x35b5
xorl %ebx, %ebx
testq %r15, %r15
sete %bl
jmp 0x361a
movl 0x2c(%r14), %eax
testb $0x2, %al
jne 0x3622
orl $0x2, %eax
movl %eax, 0x2c(%r14)
movq 0x20(%r14), %rdi
callq 0x3567
andb $-0x3, 0x2c(%r14)
jmp 0x361c
addq $0x10, %r14
movq (%r14), %r15
testq %r15, %r15
je 0x3612
movq %r15, %rdi
callq 0x3567
leaq 0x8(%r15), %r14
testl %eax, %eax
je 0x35fa
xorl %ebx, %ebx
testq %r15, %r15
setne %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x69cf(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq 0x10(%r14), %rdx
leaq 0x2051(%rip), %rsi      # 0x5688
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10c0
jmp 0x361a
movq 0x69af(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x2064(%rip), %rsi      # 0x56b7
xorl %eax, %eax
callq 0x10c0
pushq $0x1
popq %rdi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_create
void test_create(void) {
	Vector vec = vector_create(0, NULL);
	Vector vec2 = vector_create(10, NULL);	// 10 αρχικά στοιχεία

	vector_set_destroy_value(vec, NULL);
	vector_set_destroy_value(vec2, NULL);

	TEST_ASSERT(vector_size(vec) == 0);
	TEST_ASSERT(vector_size(vec2) == 10);

	vector_destroy(vec);
	vector_destroy(vec2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %edi, %edi
xorl %esi, %esi
callq 0x4804
movq %rax, %rbx
pushq $0xa
popq %rdi
xorl %esi, %esi
callq 0x4804
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x49d1
movq %r14, %rdi
xorl %esi, %esi
callq 0x49d1
movq %rbx, %rdi
callq 0x483e
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x185f(%rip), %rsi      # 0x5318
leaq 0x1b43(%rip), %rcx      # 0x5603
leaq 0x1862(%rip), %r8       # 0x5329
pushq $0x14
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3b20
movq %r14, %rdi
callq 0x483e
xorl %edi, %edi
cmpl $0xa, %eax
sete %dil
leaq 0x182b(%rip), %rsi      # 0x5318
leaq 0x1b0f(%rip), %rcx      # 0x5603
leaq 0x1844(%rip), %r8       # 0x533f
pushq $0x15
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3b20
movq %rbx, %rdi
callq 0x49da
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x49da
callq 0x2bc0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_insert_last
void test_insert_last(void) {
	Vector vec = vector_create(0, NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));		// Στο vector θα προσθέσουμε pointers προς τα στοιχεία αυτού του πίνακα

	// insert 1000 στοιχεία ώστε να συμβούν πολλαπλά resizes
	for (int i = 0; i < 1000; i++) {
		vector_insert_last(vec, &array[i]);
		TEST_ASSERT(vector_size(vec) == i+1);		// Το size ενημερώθηκε;
		TEST_ASSERT(vector_get_at(vec, i) == &array[i]);	// Μπορούμε να κάνουμε at το στοιχείο που μόλις βάλαμε;
	}

	// Δοκιμή ότι μετά τα resizes τα στοιχεία είναι ακόμα προσπελάσιμα
	for (int i = 0; i < 1000; i++)
		TEST_ASSERT(vector_get_at(vec, i) == &array[i]);

	vector_destroy(vec);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %edi, %edi
xorl %esi, %esi
callq 0x4804
movq %rax, 0x8(%rsp)
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21a0
movq %rax, (%rsp)
leaq 0x17c2(%rip), %r12      # 0x5318
leaq 0x1aa6(%rip), %rbx      # 0x5603
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x8(%rsp), %r15
cmpq $0xfa0, %r14            # imm = 0xFA0
je 0x3c01
movq (%rsp), %rax
leaq (%rax,%r14), %rbp
movq %r15, %rdi
movq %rbp, %rsi
callq 0x48cb
movq %r15, %rdi
callq 0x483e
leaq 0x1(%r13), %rcx
movl %eax, %eax
xorl %edi, %edi
movq %rcx, 0x10(%rsp)
cmpq %rax, %rcx
sete %dil
movq %r12, %rsi
pushq $0x23
popq %rdx
movq %rbx, %rcx
leaq 0x17a3(%rip), %r8       # 0x5357
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3c5c
movq %r15, %rdi
movl %r13d, %esi
callq 0x4842
xorl %edi, %edi
cmpq %rax, %rbp
sete %dil
movq %r12, %rsi
pushq $0x24
popq %rdx
movq %rbx, %rcx
leaq 0x1788(%rip), %r8       # 0x536f
xorl %eax, %eax
callq 0x239c
addq $0x4, %r14
movq 0x10(%rsp), %r13
testl %eax, %eax
jne 0x3b68
jmp 0x3c5c
leaq 0x19fb(%rip), %r12      # 0x5603
leaq 0x1760(%rip), %r13      # 0x536f
pushq $0x29
popq %rbp
movq (%rsp), %r15
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
cmpq $0x3e8, %r14            # imm = 0x3E8
je 0x3c61
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4842
xorl %edi, %edi
cmpq %rax, %r15
sete %dil
leaq 0x16d6(%rip), %rsi      # 0x5318
movl %ebp, %edx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x239c
incq %r14
addq $0x4, %r15
testl %eax, %eax
jne 0x3c1e
callq 0x2bc0
movq %rbx, %rdi
callq 0x49da
movq (%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_remove_last
void test_remove_last(void) {
	Vector vec = vector_create(1000, NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));

	// replace για προσθήκη δεδομένων, χωρίς ελέγχους (έχουμε ξεχωριστό test για το replace)
	for (int i = 0; i < 1000; i++)
		vector_set_at(vec, i, &array[i]);

	// Διαδοχικά remove ώστε να συμβούν και resizes
	for (int i = 999; i >= 0; i--) {
		TEST_ASSERT(vector_get_at(vec, i) == &array[i]);
		vector_remove_last(vec);
		TEST_ASSERT(vector_size(vec) == i);
	}

	vector_destroy(vec);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
movl $0x3e8, %edi            # imm = 0x3E8
xorl %esi, %esi
callq 0x4804
movq %rax, %rbx
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21a0
movq %rax, %r14
movq %rax, %r12
cmpq $0x3e8, %r15            # imm = 0x3E8
je 0x3ccd
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x4873
incq %r15
addq $0x4, %r12
jmp 0x3cad
movl $0x3e7, %ebp            # imm = 0x3E7
leaq 0x163f(%rip), %r15      # 0x5318
leaq 0x1923(%rip), %r12      # 0x5603
pushq $0x3c
popq %r13
testl %ebp, %ebp
js 0x3d56
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4842
movl %ebp, %ecx
leaq (%r14,%rcx,4), %rcx
xorl %edi, %edi
cmpq %rcx, %rax
sete %dil
movq %r15, %rsi
pushq $0x3a
popq %rdx
movq %r12, %rcx
leaq 0x165e(%rip), %r8       # 0x536f
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3d51
movq %rbx, %rdi
callq 0x490f
movq %rbx, %rdi
callq 0x483e
xorl %edi, %edi
cmpl %eax, %ebp
sete %dil
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
leaq 0x164e(%rip), %r8       # 0x5392
xorl %eax, %eax
callq 0x239c
decl %ebp
testl %eax, %eax
jne 0x3ce4
callq 0x2bc0
movq %rbx, %rdi
callq 0x49da
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_get_set_at
void test_get_set_at(void) {
	int N = 1000;
	Vector vec = vector_create(N/2, NULL);		// αρχικοποίηση με N/2 NULLs
	TEST_ASSERT(vector_size(vec) == N/2);

	// insert επιπλέον N/2 NULLs, θα τα αλλάξουμε μετά με replace
	for (int i = 0; i < N/2; i++)
		vector_insert_last(vec, NULL);

	int* array = malloc(N * sizeof(*array));
	for (int i = 0; i < N; i++) {
		TEST_ASSERT(vector_get_at(vec, i) == NULL);
		vector_set_at(vec, i, &array[i]);
		TEST_ASSERT(vector_get_at(vec, i) == &array[i]);
	}

	vector_destroy(vec);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1f4, %ebp            # imm = 0x1F4
movl $0x1f4, %edi            # imm = 0x1F4
xorl %esi, %esi
callq 0x4804
movq %rax, %rbx
movq %rax, %rdi
callq 0x483e
xorl %edi, %edi
cmpl $0x1f4, %eax            # imm = 0x1F4
sete %dil
leaq 0x156b(%rip), %rsi      # 0x5318
leaq 0x184f(%rip), %rcx      # 0x5603
leaq 0x15ed(%rip), %r8       # 0x53a8
pushq $0x46
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
jne 0x3dd8
jmp 0x3e7f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x48cb
subl $0x1, %ebp
jae 0x3dce
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21a0
movq %rax, %rbp
leaq 0x1527(%rip), %r15      # 0x5318
leaq 0x180b(%rip), %r12      # 0x5603
pushq $0x50
popq %r13
movq %rax, (%rsp)
xorl %r14d, %r14d
cmpq $0x3e8, %r14            # imm = 0x3E8
je 0x3e84
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4842
xorl %edi, %edi
testq %rax, %rax
sete %dil
movq %r15, %rsi
pushq $0x4e
popq %rdx
movq %r12, %rcx
leaq 0x1590(%rip), %r8       # 0x53c0
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3e7f
movq %rbx, %rdi
movl %r14d, %esi
movq %rbp, %rdx
callq 0x4873
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4842
xorl %edi, %edi
cmpq %rax, %rbp
sete %dil
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
leaq 0x1502(%rip), %r8       # 0x536f
xorl %eax, %eax
callq 0x239c
incq %r14
addq $0x4, %rbp
testl %eax, %eax
jne 0x3e03
callq 0x2bc0
movq %rbx, %rdi
callq 0x49da
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_find
void test_find(void) {
	Vector vec = vector_create(1000, NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));

	// replace για προσθήκη δεδομένων
	for (int i = 0; i < 1000; i++) {
		array[i] = i;
		vector_set_at(vec, i, &array[i]);
	}

	for (int i = 0; i < 1000; i++) {
		int* p = vector_find(vec, &i, compare_ints);
		TEST_ASSERT(*p == i);

		VectorNode node = vector_find_node(vec, &i, compare_ints);
		TEST_ASSERT(*(int*)vector_node_value(vec, node) == i);
	}

	int not_exists = -12;
	TEST_ASSERT(vector_find(vec, &not_exists, compare_ints) == NULL);
	TEST_ASSERT(vector_find_node(vec, &not_exists, compare_ints) == VECTOR_EOF);

	vector_destroy(vec);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r14d, %r14d
movl $0x3e8, %edi            # imm = 0x3E8
xorl %esi, %esi
callq 0x4804
movq %rax, %rbx
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21a0
movq %rax, %r15
movq %rax, 0x10(%rsp)
cmpq $0x3e8, %r14            # imm = 0x3E8
je 0x410c
movl %r14d, (%r15)
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x4873
incq %r14
addq $0x4, %r15
jmp 0x40e9
leaq -0x61(%rip), %r15       # 0x40b2
leaq 0x8(%rsp), %r12
leaq 0x11f9(%rip), %r13      # 0x5318
leaq 0x14dd(%rip), %rbp      # 0x5603
leaq 0x135e(%rip), %r14      # 0x548b
xorl %eax, %eax
movl %eax, 0x8(%rsp)
cmpl $0x3e8, %eax            # imm = 0x3E8
jge 0x41c6
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4988
movl (%rax), %eax
xorl %edi, %edi
cmpl 0x8(%rsp), %eax
sete %dil
movq %r13, %rsi
movl $0x82, %edx
movq %rbp, %rcx
leaq 0x1319(%rip), %r8       # 0x5483
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x4271
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4a6e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4a6a
movl (%rax), %eax
xorl %edi, %edi
cmpl 0x8(%rsp), %eax
sete %dil
movq %r13, %rsi
movl $0x85, %edx
movq %rbp, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x4271
movl 0x8(%rsp), %eax
incl %eax
jmp 0x412f
leaq 0xc(%rsp), %rsi
movl $0xfffffff4, (%rsi)     # imm = 0xFFFFFFF4
leaq -0x126(%rip), %rdx      # 0x40b2
movq %rbx, %rdi
callq 0x4988
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x1128(%rip), %rsi      # 0x5318
leaq 0x140c(%rip), %rcx      # 0x5603
leaq 0x12b6(%rip), %r8       # 0x54b4
movl $0x89, %edx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x4271
leaq -0x163(%rip), %rdx      # 0x40b2
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x4a6e
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x10e6(%rip), %rsi      # 0x5318
leaq 0x13ca(%rip), %rcx      # 0x5603
leaq 0x12a8(%rip), %r8       # 0x54e8
movl $0x8a, %edx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x4271
movq %rbx, %rdi
callq 0x49da
movq 0x10(%rsp), %rdi
callq 0x22a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2bc0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/ADTVector_test.c
// Function: test_destroy
void test_destroy(void) {
	// Απλά εκτελούμε την destroy, για να ελέγξουμε αν όντως δουλεύει
	// σωστά τρέχουμε το test με valgrind.

	Vector vec = vector_create(1, free);

	vector_set_at(vec, 0, malloc(1));
	vector_insert_last(vec, malloc(1));
	vector_remove_last(vec);

	vector_destroy(vec);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x4d3f(%rip), %rsi      # 0x8fc0
pushq $0x1
popq %rdi
callq 0x4804
movq %rax, %rbx
pushq $0x1
popq %r14
movq %r14, %rdi
callq 0x21a0
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x4873
movq %r14, %rdi
callq 0x21a0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x48cb
movq %rbx, %rdi
callq 0x490f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x49da
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: open_unsortedLCP_files
void open_unsortedLCP_files(g_data *g)
{
  char filename[Filename_size];
  snprintf(filename,Filename_size,"%s.pair.lcp",g->outPath);
  g->unsortedLcp = fopen(filename,"wb");
  if(g->unsortedLcp==NULL) {perror(filename); die(__func__);}
  snprintf(filename,Filename_size,"%s.size.lcp",g->outPath);
  g->unsortedLcp_size = fopen(filename,"wb");
  if(g->unsortedLcp_size==NULL) {perror(filename); die(__func__);}
  // write total size of the LCP array to first position of .size.lcp file 
  size_t e = fwrite(&(g->mergeLen),sizeof(customInt),1,g->unsortedLcp_size);  
  if(e!=1) die(__func__);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
movq 0x80(%rdi), %rcx
leaq 0xa5c7(%rip), %rdx      # 0xdbf3
movq %rsp, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0xa2e9(%rip), %rsi      # 0xd92e
movq %r14, %rdi
callq 0x21e0
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x36b4
movq 0x80(%rbx), %rcx
leaq 0xa5b2(%rip), %rdx      # 0xdc16
movq %rsp, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0xa2b1(%rip), %rsi      # 0xd92e
movq %r14, %rdi
callq 0x21e0
movq %rax, 0x60(%rbx)
testq %rax, %rax
je 0x36b4
addq $0x28, %rbx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2390
cmpq $0x1, %rax
jne 0x36bc
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movq %rsp, %rdi
callq 0x2320
leaq 0xa53c(%rip), %rdi      # 0xdbff
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: writeLcp
void writeLcp(customInt k, uint32_t lcp, g_data *g)
{
  assert(g->unsortedLcp!=NULL);
  assert(lcp <= MAX_LCP_SIZE);
  if(k>=(1ULL<<(8*POS_SIZE))) { // at most pos_size bytes for the position
    fprintf(stderr,"%d bytes per position are not enough. Increase POS_SIZE and recompile\n",POS_SIZE); 
    exit(EXIT_FAILURE);
  } 
  size_t e = fwrite(&lcp,BSIZE,1,g->unsortedLcp);
  if(e!=1) die(__func__);
  e = fwrite(&k,POS_SIZE,1,g->unsortedLcp);
  if(e!=1) die(__func__);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
shrq $0x28, %rdi
jne 0x3725
movq %rdx, %rbx
movq 0x58(%rdx), %rcx
leaq 0x4(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
callq 0x2390
cmpq $0x1, %rax
jne 0x3719
movq 0x58(%rbx), %rcx
leaq 0x8(%rsp), %rdi
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
cmpq $0x1, %rax
jne 0x3719
addq $0x10, %rsp
popq %rbx
retq
leaq 0xa549(%rip), %rdi      # 0xdc69
callq 0x35b7
movq 0xf8cc(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0xa4ec(%rip), %rsi      # 0xdc22
pushq $0x5
popq %rdx
xorl %eax, %eax
callq 0x21c0
pushq $0x1
popq %rdi
callq 0x2380
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: writeLcp_EOF
void writeLcp_EOF(uint64_t size, g_data *g)
{
  assert(g->unsortedLcp!=NULL && g->unsortedLcp_size!=NULL);

  // write eof to .pair.lcp file
  uint64_t b = ~0ULL; // all 1's 
  size_t e = fwrite(&b,BSIZE,1,g->unsortedLcp);  
  if(e!=1) die(__func__);
  e = fwrite(&b,POS_SIZE,1,g->unsortedLcp);  
  if(e!=1) die(__func__);
  // write size of complete LCP segment to .size.lcp file 
  e = fwrite(&size,8,1,g->unsortedLcp_size);  
  if(e!=1) die(__func__);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq %rsp, %rdi
orq $-0x1, (%rdi)
movq 0x58(%rsi), %rcx
pushq $0x1
popq %rdx
movq %rdx, %rsi
callq 0x2390
cmpq $0x1, %rax
jne 0x37a9
movq 0x58(%rbx), %rcx
movq %rsp, %rdi
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
cmpq $0x1, %rax
jne 0x37a9
movq 0x60(%rbx), %rcx
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
cmpq $0x1, %rax
jne 0x37a9
addq $0x10, %rsp
popq %rbx
retq
leaq 0xa4c2(%rip), %rdi      # 0xdc72
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: initLCPmem
void initLCPmem(g_data *g)
{
  char filename[Filename_size];
  
  assert(g->lcpMerge);
  // allocate g->lcps and g->lcp[0..]
  g->lcps = (lcpInt **) malloc(g->numBwt*sizeof(lcpInt *));
  if(!g->lcps) die(__func__);
  
  snprintf(filename,Filename_size,"%s.%s",g->lcpinPath,LCP_EXT);
  int fd = open(filename,O_RDWR);
  if(fd == -1) die(__func__);
  // mmap lcp values, init lcps[] with a copy of the LCP values  
  g->lcps[0] = mmap(NULL,g->mergeLen*sizeof(lcpInt),PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
  if(g->lcps[0] == MAP_FAILED) die(__func__);
  #ifdef USE_MMAP_ADVISE
  madvise(g->lcps[0], g->mergeLen*sizeof(lcpInt), MADV_DONTNEED);// lcp values are not need untill the end of the bwt-merge phase 
  #endif
  if(close(fd)!=0) die(__func__);

  // init lcps[1..]
  for(int i=0;i<g->numBwt-1;i++)
    g->lcps[i+1] = g->lcps[i] + g->bwtLen[i];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
movslq 0x20(%rdi), %rdi
shlq $0x3, %rdi
callq 0xbce0
movq %rax, 0x88(%rbx)
testq %rax, %rax
je 0x38bc
movq 0x78(%rbx), %rcx
leaq 0xa11c(%rip), %rdx      # 0xd91e
leaq 0xa481(%rip), %r8       # 0xdc8a
movq %rsp, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %eax, %eax
callq 0x2140
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x22f0
cmpl $-0x1, %eax
je 0x38bc
movl %eax, %ebp
movq 0x28(%rbx), %rsi
pushq $0x3
popq %rdx
pushq $0x1
popq %r14
xorl %edi, %edi
movl %r14d, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x2230
movq 0x88(%rbx), %rcx
movq %rax, (%rcx)
movq 0x88(%rbx), %rax
movq (%rax), %rdi
cmpq $-0x1, %rdi
je 0x38bc
movq 0x28(%rbx), %rsi
pushq $0x4
popq %rdx
callq 0x22e0
movl %ebp, %edi
callq 0x2160
testl %eax, %eax
jne 0x38bc
movl 0x20(%rbx), %eax
cmpl $0x2, %eax
cmovgel %eax, %r14d
decl %r14d
xorl %eax, %eax
cmpq %rax, %r14
je 0x38b0
movq 0x8(%rbx), %rcx
movq 0x88(%rbx), %rdx
movq (%rdx,%rax,8), %rsi
addq (%rcx,%rax,8), %rsi
movq %rsi, 0x8(%rdx,%rax,8)
incq %rax
jmp 0x388e
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xa3bc(%rip), %rdi      # 0xdc7f
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: openDAFile
static FILE *openDAFile(g_data *g)
{
  char filename[Filename_size];

  if(g->verbose>1) puts("Writing Document Array");
  assert(g->outputDA);
  snprintf(filename,Filename_size,"%s.%d.%s",g->outPath,g->outputDA,DA_EXT);
  FILE *f = fopen(filename,"wb");
  if(f==NULL) die("Error opening Document array file");
  return f;
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
cmpl $0x2, 0x94(%rdi)
jl 0x3bb6
leaq 0xa7f7(%rip), %rdi      # 0xe3a8
callq 0x2090
movq 0x80(%rbx), %rcx
movl 0x44(%rbx), %r8d
leaq 0x9f71(%rip), %rdx      # 0xdb39
leaq 0x972e(%rip), %r9       # 0xd2fd
movq %rsp, %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0x9d46(%rip), %rsi      # 0xd92e
movq %rbx, %rdi
callq 0x21e0
testq %rax, %rax
je 0x3bfe
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
leaq 0xa7ba(%rip), %rdi      # 0xe3bf
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: openSAFile
static FILE *openSAFile(g_data *g)
{
  char filename[Filename_size];

  if(g->verbose>1) puts("Writing Suffix Array");
  assert(g->outputSA);
  snprintf(filename,Filename_size,"%s.%d.%s",g->outPath,g->outputSA,SA_EXT);
  FILE *f = fopen(filename,"wb");
  if(f==NULL) die("Error opening Suffix array file");
  return f;
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
cmpl $0x2, 0x94(%rdi)
jl 0x4339
leaq 0xa0ad(%rip), %rdi      # 0xe3e1
callq 0x2090
movq 0x80(%rbx), %rcx
movl 0x4c(%rbx), %r8d
leaq 0x97ee(%rip), %rdx      # 0xdb39
leaq 0x8fe8(%rip), %r9       # 0xd33a
movq %rsp, %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0x95c3(%rip), %rsi      # 0xd92e
movq %rbx, %rdi
callq 0x21e0
testq %rax, %rax
je 0x4381
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
leaq 0xa06e(%rip), %rdi      # 0xe3f6
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: openSLFile
static FILE *openSLFile(g_data *g)
{
  char filename[Filename_size];

  if(g->verbose>1) puts("Writing Suffix Array");
  assert(g->outputSL);
  snprintf(filename,Filename_size,"%s.%d.%s",g->outPath,g->outputSL,SL_EXT);
  FILE *f = fopen(filename,"wb");
  if(f==NULL) die("Error opening Suffixes' lengths file");
  return f;
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
cmpl $0x2, 0x94(%rdi)
jl 0x43ad
leaq 0xa039(%rip), %rdi      # 0xe3e1
callq 0x2090
movq 0x80(%rbx), %rcx
movl 0x50(%rbx), %r8d
leaq 0x977a(%rip), %rdx      # 0xdb39
leaq 0x97da(%rip), %r9       # 0xdba0
movq %rsp, %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0x954f(%rip), %rsi      # 0xd92e
movq %rbx, %rdi
callq 0x21e0
testq %rax, %rax
je 0x43f5
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
leaq 0xa01a(%rip), %rdi      # 0xe416
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: openQSFile
static FILE *openQSFile(g_data *g)
{
  char filename[Filename_size];

  if(g->verbose>1) puts("Writing QS");
  assert(g->outputQS);
  snprintf(filename,Filename_size,"%s.%s",g->outPath,QS_EXT);
  FILE *f = fopen(filename,"wb");
  if(f==NULL) die("Error opening QS file");
  return f;
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
cmpl $0x2, 0x94(%rdi)
jl 0x4421
leaq 0xa06f(%rip), %rdi      # 0xe48b
callq 0x2090
movq 0x80(%rbx), %rcx
leaq 0x94ef(%rip), %rdx      # 0xd91e
leaq 0x8f4e(%rip), %r8       # 0xd384
movq %rsp, %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
leaq 0x94df(%rip), %rsi      # 0xd92e
movq %rbx, %rdi
callq 0x21e0
testq %rax, %rax
je 0x4465
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
leaq 0xa02a(%rip), %rdi      # 0xe496
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: free_merge_arrays
void free_merge_arrays(g_data *g) {
  if(g->extMem) {
    int e = unlink(g->merge_fname);
    if(e!=0) perror("Error deleting temporary merge file (1)");
    e = unlink(g->newmerge_fname);
    if(e!=0) perror("Error deleting temporary merge file (2)");
    free(g->merge_fname); // deallocate file names 
    free(g->newmerge_fname);
  }
  else if(g->mmapZ) {
    int e = munmap(g->mergeColor,g->mergeLen*sizeof(palette));
    if(e!=0) die("gap (unmap mergeColor)");
    e = munmap(g->newMergeColor,g->mergeLen*sizeof(palette));
    if(e!=0) die("gap (unmap newMergeColor)");  }
  else {
    free(g->newMergeColor);
    free(g->mergeColor);
  }
  g->newMergeColor = NULL;
  g->mergeColor = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x69(%rdi)
jne 0x4fd2
movq 0x50d8(%rbx), %rdi
callq 0x2060
testl %eax, %eax
jne 0x5039
movq 0x50e0(%rbx), %rdi
callq 0x2060
testl %eax, %eax
jne 0x504a
leaq 0x50e0(%rbx), %r14
movq 0x50d8(%rbx), %rdi
callq 0xbdb4
jmp 0x501f
cmpb $0x1, 0x70(%rbx)
jne 0x500c
movq 0x50e8(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x2290
testl %eax, %eax
jne 0x505b
movq 0x50f0(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x2290
testl %eax, %eax
je 0x5027
leaq 0x92ea(%rip), %rdi      # 0xe2f1
callq 0x35b7
movq 0x50f0(%rbx), %rdi
callq 0xbdb4
leaq 0x50e8(%rbx), %r14
movq (%r14), %rdi
callq 0xbdb4
xorps %xmm0, %xmm0
movups %xmm0, 0x50e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x924a(%rip), %rdi      # 0xe28a
callq 0x2320
jmp 0x4fa9
leaq 0x9261(%rip), %rdi      # 0xe2b2
callq 0x2320
jmp 0x4fbd
leaq 0x9278(%rip), %rdi      # 0xe2da
callq 0x35b7
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: alloc_merge_array
void alloc_merge_array(g_data *g) {
  if(g->mmapZ) {
    g->mergeColor = mmap(NULL,g->mergeLen*sizeof(palette),PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
    if(g->mergeColor== MAP_FAILED) die(__func__);
  }
  else {
    g->mergeColor =  calloc(g->mergeLen,sizeof(palette)); 
     if(!g->mergeColor) die(__func__);
  }
  // make sure these are not used 
  g->newMergeColor = NULL;
  g->mergeColor16=NULL;
  g->array32 = NULL;
  g->fmergeColor = NULL;
  g->fnewMergeColor = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpb $0x1, 0x70(%rdi)
jne 0x50a5
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rax, %rsi
xorl %r9d, %r9d
callq 0x2230
movq %rax, 0x50e8(%rbx)
cmpq $-0x1, %rax
jne 0x50bc
leaq 0x926b(%rip), %rdi      # 0xe30b
callq 0x35b7
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xbe60
movq %rax, 0x50e8(%rbx)
testq %rax, %rax
je 0x5099
xorps %xmm0, %xmm0
movups %xmm0, 0x50c8(%rbx)
movups %xmm0, 0x50f0(%rbx)
andq $0x0, 0x5100(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: free_merge_array
void free_merge_array(g_data *g) {
  assert(g->newMergeColor==NULL);
  if(g->mmapZ) {
    int e = munmap(g->mergeColor,g->mergeLen*sizeof(palette));
    if(e!=0) die("gap (unmap mergeColor)");
  }
  else {
    free(g->mergeColor);
  }
  g->mergeColor = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50e8(%rdi), %rdi
cmpb $0x1, 0x70(%rbx)
jne 0x5101
movq 0x28(%rbx), %rsi
callq 0x2290
testl %eax, %eax
je 0x5106
leaq 0x91de(%rip), %rdi      # 0xe2da
callq 0x35b7
callq 0xbdb4
andq $0x0, 0x50e8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: alloc0_B_array
void alloc0_B_array(g_data *g) {
  if(g->mmapB) {
    // zero intialized 
    g->blockBeginsAt = mmap(NULL,g->mergeLen*sizeof(lcpInt),PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
    if(g->blockBeginsAt== MAP_FAILED) die(__func__);
  }
  else {
    g->blockBeginsAt = (lcpInt *) calloc(g->mergeLen,sizeof(lcpInt));
    if(!g->blockBeginsAt) die(__func__);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpb $0x1, 0x71(%rdi)
jne 0x514e
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rax, %rsi
xorl %r9d, %r9d
callq 0x2230
movq %rax, 0x98(%rbx)
cmpq $-0x1, %rax
jne 0x5165
leaq 0x91d4(%rip), %rdi      # 0xe31d
callq 0x35b7
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xbe60
movq %rax, 0x98(%rbx)
testq %rax, %rax
je 0x5142
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: free_B_array
void free_B_array(g_data *g) {
  if(g->mmapB) {
    int e = munmap(g->blockBeginsAt,g->mergeLen*sizeof(lcpInt));
    if(e) die(__func__);
  }
  else free(g->blockBeginsAt); // if used free storage for lcp values
  g->blockBeginsAt = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
cmpb $0x1, 0x71(%rbx)
jne 0x5191
movq 0x28(%rbx), %rsi
callq 0x2290
testl %eax, %eax
je 0x5196
leaq 0x91a0(%rip), %rdi      # 0xe32c
callq 0x35b7
callq 0xbdb4
andq $0x0, 0x98(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: alloc_merge_array16
void alloc_merge_array16(g_data *g) {
  if(g->mmapZ) {
    g->mergeColor16 = mmap(NULL,g->mergeLen*sizeof(uint16_t),PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
    if(g->mergeColor16 == MAP_FAILED) die(__func__);
  }
  else {
    g->mergeColor16 =  calloc(g->mergeLen,sizeof(uint16_t)); 
     if(!g->mergeColor16) die(__func__);
  }
  g->mergeColor = g->newMergeColor = NULL;
  g->array32 = NULL;
  g->fmergeColor = NULL;
  g->fnewMergeColor = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpb $0x1, 0x70(%rdi)
jne 0x51e1
addq %rax, %rax
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rax, %rsi
xorl %r9d, %r9d
callq 0x2230
movq %rax, 0x50f8(%rbx)
cmpq $-0x1, %rax
jne 0x51f8
leaq 0x915d(%rip), %rdi      # 0xe339
callq 0x35b7
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0xbe60
movq %rax, 0x50f8(%rbx)
testq %rax, %rax
je 0x51d5
andq $0x0, 0x5100(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50c8(%rbx)
movups %xmm0, 0x50e8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: free_merge_array16
void free_merge_array16(g_data *g) {
  assert(g->mergeColor==NULL && g->newMergeColor==NULL && g->array32==NULL);
  if(g->mmapZ) {
    int e = munmap(g->mergeColor16,g->mergeLen*sizeof(uint16_t));
    if(e!=0) die("gap (unmap mergeColor16)");
  }
  else {
    free(g->mergeColor16);
  }
  g->mergeColor16 = NULL; // make sure it is no longer used
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50f8(%rdi), %rdi
cmpb $0x1, 0x70(%rbx)
jne 0x5240
movq 0x28(%rbx), %rsi
addq %rsi, %rsi
callq 0x2290
testl %eax, %eax
je 0x5245
leaq 0x9112(%rip), %rdi      # 0xe34d
callq 0x35b7
callq 0xbdb4
andq $0x0, 0x50f8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: alloc_array32
void alloc_array32(g_data *g) {
  if(g->mmapZ) {
    g->array32 = mmap(NULL,g->mergeLen*sizeof(uint32_t),PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
    if(g->array32 == MAP_FAILED) die(__func__);
  }
  else {
    g->array32 =  calloc(g->mergeLen,sizeof(uint32_t)); 
    if(!g->array32) die(__func__);
  }
  g->mergeColor = g->newMergeColor = NULL;
  g->mergeColor16 = NULL; // make sure it is not used
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpb $0x1, 0x70(%rdi)
jne 0x5291
shlq $0x2, %rax
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rax, %rsi
xorl %r9d, %r9d
callq 0x2230
movq %rax, 0x5100(%rbx)
cmpq $-0x1, %rax
jne 0x52a8
leaq 0x90da(%rip), %rdi      # 0xe366
callq 0x35b7
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0xbe60
movq %rax, 0x5100(%rbx)
testq %rax, %rax
je 0x5285
xorps %xmm0, %xmm0
movups %xmm0, 0x50e8(%rbx)
andq $0x0, 0x50f8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/util.c
// Function: free_array32
void free_array32(g_data *g) {
  assert(g->mergeColor==NULL && g->newMergeColor==NULL && g->mergeColor16 == NULL);
  if(g->mmapZ) {
    int e = munmap(g->array32,g->mergeLen*sizeof(uint32_t));
    if(e!=0) die("gap (unmap array32)");
  }
  else {
    free(g->array32);
  }
  g->array32 = NULL; // make sure it is no longer used
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x5100(%rdi), %rdi
cmpb $0x1, 0x70(%rbx)
jne 0x52ea
movq 0x28(%rbx), %rsi
shlq $0x2, %rsi
callq 0x2290
testl %eax, %eax
je 0x52ef
leaq 0x908f(%rip), %rdi      # 0xe374
callq 0x35b7
callq 0xbdb4
andq $0x0, 0x5100(%rbx)
popq %rbx
retq
nopl (%rax)