LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/main.c
// Function: extendedcmd
int extendedcmd (int f, int n)
{
  int (*cmd)();
  int c;

  c = getctl();
  switch (c)
    {
    case 'A': cmd = backline; break;
    case 'B': cmd = forwline; break;
    case 'C': cmd = forwchar; break;
    case 'D': cmd = backchar; break;
    case 'H': cmd = gotobob; break;
    case 'W': cmd = gotoeob; break;
    case '5': cmd = backpage; getctl(); break;
    case '6': cmd = forwpage; getctl(); break;
    case '7': cmd = gotobob; getctl(); break;
    case '8': cmd = gotoeob; getctl(); break;
    default: mlwrite ("\007[Key not bound]");
      return (FALSE);
    }
  return cmd(f, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
leaq 0x76c7(%rip), %r14      # 0xd790
xorl %eax, %eax
callq *0x20(%r14)
leal -0x61(%rax), %ecx
leal -0x20(%rax), %edx
cmpl $0x1a, %ecx
cmovael %eax, %edx
movl %edx, %eax
orl $0x140, %eax            # imm = 0x140
cmpl $0x20, %edx
cmovael %edx, %eax
leal -0x35(%rax), %ecx
cmpl $0x13, %ecx
ja 0x610f
leaq 0x321d(%rip), %rax      # 0x9314
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
callq *0x20(%r14)
leaq -0x38c4(%rip), %rcx     # 0x2849
jmp 0x6178
cmpl $0x57, %eax
je 0x6138
leaq 0x3269(%rip), %rdi      # 0x9384
xorl %eax, %eax
callq 0x446e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x3dbe(%rip), %rcx     # 0x2372
jmp 0x6178
xorl %eax, %eax
callq *0x20(%r14)
leaq -0x3c19(%rip), %rcx     # 0x2526
jmp 0x6178
leaq -0x3cd4(%rip), %rcx     # 0x2474
jmp 0x6178
xorl %eax, %eax
callq *0x20(%r14)
leaq -0x3c62(%rip), %rcx     # 0x24f5
jmp 0x6178
xorl %eax, %eax
callq *0x20(%r14)
leaq -0x39a2(%rip), %rcx     # 0x27c4
jmp 0x6178
leaq -0x3c1b(%rip), %rcx     # 0x2554
jmp 0x6178
leaq -0x3da8(%rip), %rcx     # 0x23d0
movl %ebp, %edi
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/random.c
// Function: showcpos
int showcpos (int f, int n)
{
  LINE *clp;
  long nch, nbc;
  int cbo, cac, ratio, col;

  clp = lforw (curbp->b_linep);	/* Grovel the data */
  cbo = 0;
  nch = 0;
  nbc = 0;
  cac = 0;
  for (;;)
    {
      if (clp == curwp->w_dotp && cbo == curwp->w_doto)
	{
	  nbc = nch;
	  if (cbo == llength (clp))
	    cac = '\n';
	  else
	    cac = lgetc (clp, cbo);
	}
      if (cbo == llength (clp))
	{
	  if (clp == curbp->b_linep)
	    break;
	  clp = lforw (clp);
	  cbo = 0;
	}
      else
	++cbo;
      ++nch;
    }
  col = getccol (FALSE);       /* Get real column */
  ratio = 0;		       /* Ratio before dot */
  if (nch != 0)
    ratio = (100L * nbc) / nch;
  mlwrite ("Char: %c (0%o, %d, 0x%x)  point=%D of %D(%d%%) column %d",
	   ((cac > 31) && (cac < 128) ? cac : 32),
	   cac, cac, cac, nbc + 1, nch, ratio, col);
  return (TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x7696(%rip), %rax      # 0xd848
movq (%rax), %rax
movq 0x28(%rax), %rax
movq (%rax), %rcx
leaq 0x7695(%rip), %rdx      # 0xd858
movq (%rdx), %rdx
movq 0x18(%rdx), %rsi
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %edi, %edi
xorl %r14d, %r14d
cmpq %rsi, %rcx
jne 0x61f9
movslq %edi, %r8
cmpq %r8, 0x20(%rdx)
jne 0x61f9
movl $0xa, %r14d
movq %r12, %rbx
cmpl 0x14(%rcx), %edi
je 0x61f9
movzbl 0x18(%rcx,%r8), %r14d
movq %r12, %rbx
cmpl 0x14(%rcx), %edi
jne 0x620a
cmpq %rax, %rcx
je 0x6211
movq (%rcx), %rcx
xorl %edi, %edi
jmp 0x620c
incl %edi
incq %r12
jmp 0x61d4
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x627b
movl %eax, %r10d
testq %r12, %r12
je 0x622f
imulq $0x64, %rbx, %rax
cqto
idivq %r12
movq %rax, %r15
leal -0x20(%r14), %eax
cmpl $0x60, %eax
movl $0x20, %esi
cmovbl %r14d, %esi
incq %rbx
subq $0x8, %rsp
leaq 0x31ca(%rip), %rdi      # 0x9417
movl %r14d, %edx
movl %r14d, %ecx
movl %r14d, %r8d
movq %rbx, %r9
xorl %eax, %eax
pushq %r10
pushq %r15
pushq %r12
callq 0x446e
addq $0x20, %rsp
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/random.c
// Function: twiddle
int twiddle (int f, int n)
{
  LINE *dotp;
  int doto, cl, cr;

  dotp = curwp->w_dotp;
  doto = curwp->w_doto;
  if (doto == llength (dotp) && --doto < 0)
    return (FALSE);
  cr = lgetc (dotp, doto);
  if (--doto < 0)
    return (FALSE);
  cl = lgetc (dotp, doto);
  lputc (dotp, doto + 0, cr);
  lputc (dotp, doto + 1, cl);
  lchange (WFEDIT);
  return (TRUE);
}

// Assembly:
leaq 0x7570(%rip), %rax      # 0xd858
movq (%rax), %rcx
movq 0x18(%rcx), %rax
movl 0x20(%rcx), %ecx
cmpl %ecx, 0x14(%rax)
jne 0x62fd
testl %ecx, %ecx
jle 0x632e
decl %ecx
testl %ecx, %ecx
jle 0x632e
pushq %rax
movl %ecx, %edx
decl %ecx
movb 0x18(%rax,%rdx), %sil
movb 0x18(%rax,%rcx), %dil
movb %sil, 0x18(%rax,%rcx)
movb %dil, 0x18(%rax,%rdx)
movl $0x4, %edi
callq 0x516b
movl $0x1, %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/random.c
// Function: openline
int openline (int f, int n)
{
  int i, s;

  if (n < 0)
    return (FALSE);
  if (n == 0)
    return (TRUE);
  i = n;		       /* Insert newlines */
  do
    {
      s = lnewline ();
    }
  while (s == TRUE && --i);
  if (s == TRUE)	       /* Then back up overtop */
    s = backchar (f, n);       /* of them all */
  return (s);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x63d9
je 0x63dd
movl %esi, %ebx
movl %edi, %ebp
movl $0x1, %r14d
xorl %eax, %eax
callq 0x53d0
cmpl $0x1, %eax
jne 0x63c7
leal 0x1(%r14), %ecx
cmpl %r14d, %ebx
movl %ecx, %r14d
jne 0x63af
cmpl $0x1, %eax
jne 0x63e2
movl %ebp, %edi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2372
xorl %eax, %eax
jmp 0x63e2
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/search.c
// Function: forwsearch
int forwsearch (int f, int n)
{
  int status=FALSE;

  if (n == 0)			/* resolve the repeat count */
    n = 1;
  if (n < 1)			/* search backwards */
    return (backsearch (f, -n));

  /* ask the user for the text of a pattern */
  if ((status = readpattern ("Search")) != TRUE)
    return (status);

  /* search for the pattern */
  while (n-- > 0)
    {
      if ((status = forscan (&pat[0], PTEND)) == FALSE)
	break;
    }

  /* and complain if not there */
  if (status == FALSE)
    mlwrite ("Not found");
  return (status);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
cmpl $0x1, %esi
adcl $0x0, %ebx
testl %ebx, %ebx
jle 0x684f
leaq 0x2c64(%rip), %rdi      # 0x9483
callq 0x68ac
movl %eax, %ebp
cmpl $0x1, %eax
jne 0x6873
incl %ebx
leaq 0x705c(%rip), %r14      # 0xd890
decl %ebx
testl %ebx, %ebx
jle 0x685c
movq %r14, %rdi
movl $0x2, %esi
callq 0x6962
testl %eax, %eax
jne 0x6834
xorl %ebp, %ebp
jmp 0x6861
negl %ebx
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x687a
movl $0x1, %ebp
testl %ebx, %ebx
jle 0x6873
leaq 0x2c1e(%rip), %rdi      # 0x948a
xorl %eax, %eax
callq 0x446e
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/search.c
// Function: backsearch
int backsearch (int f, int n)
{
  int s;

  if (n == 0)			/* resolve null and negative arguments */
    n = 1;
  if (n < 1)
    return (forwsearch (f, -n));

  if ((s = readpattern("Reverse search")) != TRUE)/* get a pattern to search */
    return (s);

  return bsearch (f, n);	/* and go search for it */
}

// Assembly:
pushq %rbx
movl %esi, %ebx
cmpl $0x1, %esi
adcl $0x0, %ebx
testl %ebx, %ebx
jle 0x68a0
leaq 0x2c15(%rip), %rdi      # 0x94a3
callq 0x68ac
cmpl $0x1, %eax
jne 0x68aa
movl %ebx, %esi
popq %rbx
jmp 0x6b2c
negl %ebx
movl %ebx, %esi
popq %rbx
jmp 0x6808
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/search.c
// Function: readpattern
int readpattern (char *prompt)
{
  char tpat[NPAT + 20];
  int s;

  strncpy (tpat, prompt, NPAT-12); /* copy prompt to output string */
  strncat (tpat, " [", 3);	/* build new prompt string */
  expandp (&pat[0], &tpat[strlen (tpat)], NPAT / 2); /* add old pattern */
  strncat (tpat, "]<ESC>: ", 9);

  s = mlreplyt (tpat, tpat, NPAT, 27); /* Read pattern */

  if (s == TRUE)		/* Specified */
    strncpy (pat, tpat, NPAT);
  else if (s == FALSE && pat[0] != 0) /* CR, but old one */
    s = TRUE;

  return (s);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rsi
movq %rsp, %rbx
movl $0x44, %edx
movq %rbx, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x20c0
xorl %ebp, %ebp
movb %bpl, 0x2(%rsp,%rax)
movw $0x5b20, (%rsp,%rax)    # imm = 0x5B20
movq %rbx, %rdi
callq 0x20c0
leaq (%rsp,%rax), %rsi
leaq 0x6fa1(%rip), %r14      # 0xd890
movq %r14, %rdi
movl $0x28, %edx
callq 0x6cac
movq %rbx, %rdi
callq 0x20c0
movabsq $0x203a3e4353453c5d, %rcx # imm = 0x203A3E4353453C5D
movq %rcx, (%rsp,%rax)
movb %bpl, 0x8(%rsp,%rax)
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x50, %edx
movl $0x1b, %ecx
callq 0x40e3
testl %eax, %eax
je 0x6950
cmpl $0x1, %eax
jne 0x6959
leaq 0x6f54(%rip), %rdi      # 0xd890
movq %rsp, %rsi
movl $0x50, %edx
callq 0x2060
movl $0x1, %eax
jmp 0x6959
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/search.c
// Function: forwhunt
int forwhunt (int f, int n)
{
  int status=FALSE;

  /* resolve the repeat count */
  if (n == 0)
    n = 1;
  if (n < 1)			/* search backwards */
    return (backhunt (f, -n));

  /* Make sure a pattern exists */
  if (pat[0] == 0)
    {
      mlwrite ("No pattern set");
      return (FALSE);
    }
  /* search for the pattern */
  while (n-- > 0)
    {
      if ((status = forscan (&pat[0], PTEND)) == FALSE)
	break;
    }

  /* and complain if not there */
  if (status == FALSE)
    mlwrite ("Not found");
  return (status);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
cmpl $0x1, %esi
adcl $0x0, %ebp
testl %ebp, %ebp
jle 0x6ac4
leaq 0x6df6(%rip), %rax      # 0xd890
cmpb $0x0, (%rax)
je 0x6ad1
incl %ebp
leaq 0x6de8(%rip), %r14      # 0xd890
movq %r14, %rdi
movl $0x2, %esi
callq 0x6962
testl %eax, %eax
je 0x6adc
movl %eax, %ebx
decl %ebp
cmpl $0x2, %ebp
jge 0x6aa8
jmp 0x6ade
negl %ebp
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x6af7
leaq 0x29bc(%rip), %rdi      # 0x9494
xorl %ebx, %ebx
jmp 0x6ae9
xorl %ebx, %ebx
testl %ebx, %ebx
jne 0x6af0
leaq 0x29a1(%rip), %rdi      # 0x948a
xorl %eax, %eax
callq 0x446e
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/search.c
// Function: backhunt
int backhunt (int f, int n)
{
  if (n == 0)			/* resolve null and negative arguments */
    n = 1;
  if (n < 1)
    return (forwhunt (f, -n));

  if (pat[0] == 0)		/* Make sure a pattern exists */
    {
      mlwrite ("No pattern set");
      return (FALSE);
    }
  return bsearch (f, n);	/* go search */
}

// Assembly:
cmpl $0x1, %esi
adcl $0x0, %esi
testl %esi, %esi
jle 0x6b12
leaq 0x6d88(%rip), %rax      # 0xd890
cmpb $0x0, (%rax)
je 0x6b19
jmp 0x6b2c
negl %esi
jmp 0x6a83
pushq %rax
leaq 0x2973(%rip), %rdi      # 0x9494
xorl %eax, %eax
callq 0x446e
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/window.c
// Function: enlargewind
int enlargewind (int f, int n)
{
  WINDOW *adjwp;
  LINE *lp;
  int i;

  if (n < 0)
    return (shrinkwind (f, -n));
  if (wheadp->w_wndp == NULL)
    {
      mlwrite ("Only one window");
      return (FALSE);
    }
  if ((adjwp = curwp->w_wndp) == NULL)
    {
      adjwp = wheadp;
      while (adjwp->w_wndp != curwp)
	adjwp = adjwp->w_wndp;
    }
  if (adjwp->w_ntrows <= n)
    {
      mlwrite ("Impossible change");
      return (FALSE);
    }
  if (curwp->w_wndp == adjwp)
    {				/* Shrink below */
      lp = adjwp->w_linep;
      for (i = 0; i < n && lp != adjwp->w_bufp->b_linep; ++i)
	lp = lforw (lp);
      adjwp->w_linep = lp;
      adjwp->w_toprow += n;
    }
  else
    {				/* Shrink above */
      lp = curwp->w_linep;
      for (i = 0; i < n && lback (lp) != curbp->b_linep; ++i)
	lp = lback (lp);
      curwp->w_linep = lp;
      curwp->w_toprow -= n;
    }
  curwp->w_ntrows += n;
  adjwp->w_ntrows -= n;
  curwp->w_flag |= WFMODE | WFHARD;
  adjwp->w_flag |= WFMODE | WFHARD;
  return (TRUE);
}

// Assembly:
testl %esi, %esi
js 0x786c
pushq %rbx
leaq 0x6077(%rip), %rax      # 0xd870
movq (%rax), %rdi
cmpq $0x0, (%rdi)
je 0x7873
leaq 0x604f(%rip), %rax      # 0xd858
movq (%rax), %rax
movq (%rax), %rdx
movq %rdx, %rcx
testq %rdx, %rdx
jne 0x7822
movq %rdi, %rcx
movq (%rdi), %rdi
cmpq %rax, %rdi
jne 0x7817
movsbl 0x39(%rcx), %edi
cmpl %esi, %edi
jle 0x787c
cmpq %rcx, %rdx
je 0x788e
movq 0x10(%rax), %rdx
testl %esi, %esi
je 0x78c2
leaq 0x6006(%rip), %rdi      # 0xd848
movq (%rdi), %rdi
movq 0x28(%rdi), %rdi
cmpl $0x2, %esi
movl $0x1, %r8d
cmovgel %esi, %r8d
movq %rdx, %r9
movq 0x8(%rdx), %rdx
cmpq %rdi, %rdx
je 0x78c5
movq %rdx, %r9
decl %r8d
jne 0x7856
jmp 0x78c5
negl %esi
jmp 0x78e6
leaq 0x1e55(%rip), %rdi      # 0x96cf
jmp 0x7883
leaq 0x1e5c(%rip), %rdi      # 0x96df
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x446e
jmp 0x78e2
movq 0x10(%rcx), %rdx
testl %esi, %esi
je 0x78b8
movq 0x8(%rcx), %rdi
movq 0x28(%rdi), %rdi
cmpl $0x2, %esi
movl $0x1, %r8d
cmovgel %esi, %r8d
cmpq %rdi, %rdx
je 0x78b8
movq (%rdx), %rdx
decl %r8d
jne 0x78ab
movq %rdx, 0x10(%rcx)
addb %sil, 0x38(%rcx)
jmp 0x78cd
movq %rdx, %r9
movq %r9, 0x10(%rax)
subb %sil, 0x38(%rax)
addb %sil, 0x39(%rax)
subb %sil, 0x39(%rcx)
orb $0x18, 0x3b(%rax)
orb $0x18, 0x3b(%rcx)
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/window.c
// Function: shrinkwind
int shrinkwind (int f, int n)
{
  WINDOW *adjwp;
  LINE *lp;
  int i;

  if (n < 0)
    return (enlargewind (f, -n));
  if (wheadp->w_wndp == NULL)
    {
      mlwrite ("Only one window");
      return (FALSE);
    }
  if ((adjwp = curwp->w_wndp) == NULL)
    {
      adjwp = wheadp;
      while (adjwp->w_wndp != curwp)
	adjwp = adjwp->w_wndp;
    }
  if (curwp->w_ntrows <= n)
    {
      mlwrite ("Impossible change");
      return (FALSE);
    }
  if (curwp->w_wndp == adjwp)
    {				/* Grow below */
      lp = adjwp->w_linep;
      for (i = 0; i < n && lback (lp) != adjwp->w_bufp->b_linep; ++i)
	lp = lback (lp);
      adjwp->w_linep = lp;
      adjwp->w_toprow -= n;
    }
  else
    {				/* Grow above */
      lp = curwp->w_linep;
      for (i = 0; i < n && lp != curbp->b_linep; ++i)
	lp = lforw (lp);
      curwp->w_linep = lp;
      curwp->w_toprow += n;
    }
  curwp->w_ntrows -= n;
  adjwp->w_ntrows += n;
  curwp->w_flag |= WFMODE | WFHARD;
  adjwp->w_flag |= WFMODE | WFHARD;
  return (TRUE);
}

// Assembly:
testl %esi, %esi
js 0x7962
pushq %rbx
leaq 0x5f7e(%rip), %rax      # 0xd870
movq (%rax), %rdx
cmpq $0x0, (%rdx)
je 0x7969
leaq 0x5f56(%rip), %rax      # 0xd858
movq (%rax), %rax
movq (%rax), %rdi
movq %rdi, %rcx
testq %rdi, %rdi
jne 0x791b
movq %rdx, %rcx
movq (%rdx), %rdx
cmpq %rax, %rdx
jne 0x7910
movsbl 0x39(%rax), %edx
cmpl %esi, %edx
jle 0x7972
cmpq %rcx, %rdi
je 0x7984
movq 0x10(%rax), %rdi
testl %esi, %esi
je 0x7958
leaq 0x5f11(%rip), %r8       # 0xd848
movq (%r8), %r8
movq 0x28(%r8), %r8
cmpl $0x2, %esi
movl $0x1, %r9d
cmovgel %esi, %r9d
cmpq %r8, %rdi
je 0x7958
movq (%rdi), %rdi
decl %r9d
jne 0x794b
movq %rdi, 0x10(%rax)
addb %sil, 0x38(%rax)
jmp 0x79c2
negl %esi
jmp 0x77ed
leaq 0x1d5f(%rip), %rdi      # 0x96cf
jmp 0x7979
leaq 0x1d66(%rip), %rdi      # 0x96df
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x446e
jmp 0x79d9
movq 0x10(%rcx), %rdi
testl %esi, %esi
je 0x79b7
movq 0x8(%rcx), %r8
movq 0x28(%r8), %r8
cmpl $0x2, %esi
movl $0x1, %r9d
cmovgel %esi, %r9d
movq %rdi, %r10
movq 0x8(%rdi), %rdi
cmpq %r8, %rdi
je 0x79ba
movq %rdi, %r10
decl %r9d
jne 0x79a1
jmp 0x79ba
movq %rdi, %r10
movq %r10, 0x10(%rcx)
subb %sil, 0x38(%rcx)
subb %sil, %dl
movb %dl, 0x39(%rax)
addb %sil, 0x39(%rcx)
orb $0x18, 0x3b(%rax)
orb $0x18, 0x3b(%rcx)
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: backword
int backword (int f, int n)
{
  if (n < 0)
    return (forwword (f, -n));
  if (backchar (FALSE, 1) == FALSE)
    return (FALSE);
  while (n--)
    {
      while (inword () == FALSE)
	{
	  if (backchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
      while (inword () != FALSE)
	{
	  if (backchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
    }
  return (forwchar (FALSE, 1));
}

// Assembly:
pushq %rbx
movl %esi, %ebx
testl %esi, %esi
js 0x7b8b
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
je 0x7b87
testl %ebx, %ebx
je 0x7b95
decl %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7b7c
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
jne 0x7b51
jmp 0x7b87
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
je 0x7b87
callq 0x7f04
testl %eax, %eax
jne 0x7b6c
jmp 0x7b4b
xorl %eax, %eax
popq %rbx
retq
negl %ebx
movl %ebx, %esi
popq %rbx
jmp 0x7ba2
xorl %edi, %edi
movl $0x1, %esi
popq %rbx
jmp 0x23d0
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: forwword
int forwword (int f, int n)
{
  if (n < 0)
    return (backword (f, -n));
  while (n--)
    {
      while (inword () != FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
      while (inword () == FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
    }
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x7bf2
je 0x7c01
decl %ebx
callq 0x7f04
testl %eax, %eax
je 0x7bde
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
jne 0x7baf
jmp 0x7c06
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7c06
callq 0x7f04
testl %eax, %eax
je 0x7bcc
movl $0x1, %ebp
testl %ebx, %ebx
jne 0x7bad
jmp 0x7c06
negl %ebx
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7b34
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: upperword
int upperword (int f, int n)
{
  int c;

  if (n < 0)
    return (FALSE);
  while (n--)
    {
      while (inword () == FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
      while (inword () != FALSE)
	{
	  c = lgetc (curwp->w_dotp, curwp->w_doto);
	  if (c >= 'a' && c <= 'z')
	    {
	      c -= 'a' - 'A';
	      lputc (curwp->w_dotp, curwp->w_doto, c);
	      lchange (WFHARD);
	    }
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
    }
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x7c90
je 0x7c94
movl %esi, %ebx
leaq 0x5c36(%rip), %r14      # 0xd858
decl %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7c7c
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
jne 0x7c24
jmp 0x7c99
movq (%r14), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movb 0x18(%rax,%rcx), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x7c6a
addb $-0x20, %dl
movb %dl, 0x18(%rax,%rcx)
movl $0x8, %edi
callq 0x516b
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7c99
callq 0x7f04
testl %eax, %eax
jne 0x7c41
movl $0x1, %ebp
testl %ebx, %ebx
jne 0x7c22
jmp 0x7c99
xorl %ebp, %ebp
jmp 0x7c99
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: lowerword
int lowerword (int f, int n)
{
  int c;

  if (n < 0)
    return (FALSE);
  while (n--)
    {
      while (inword () == FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
      while (inword () != FALSE)
	{
	  c = lgetc (curwp->w_dotp, curwp->w_doto);
	  if (c >= 'A' && c <= 'Z')
	    {
	      c += 'a' - 'A';
	      lputc (curwp->w_dotp, curwp->w_doto, c);
	      lchange (WFHARD);
	    }
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
    }
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x7d21
je 0x7d25
movl %esi, %ebx
leaq 0x5ba5(%rip), %r14      # 0xd858
decl %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7d0d
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
jne 0x7cb5
jmp 0x7d2a
movq (%r14), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movb 0x18(%rax,%rcx), %dl
leal -0x41(%rdx), %esi
cmpb $0x19, %sil
ja 0x7cfb
orb $0x20, %dl
movb %dl, 0x18(%rax,%rcx)
movl $0x8, %edi
callq 0x516b
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7d2a
callq 0x7f04
testl %eax, %eax
jne 0x7cd2
movl $0x1, %ebp
testl %ebx, %ebx
jne 0x7cb3
jmp 0x7d2a
xorl %ebp, %ebp
jmp 0x7d2a
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: capword
int capword (int f, int n)
{
  int c;

  if (n < 0)
    return (FALSE);
  while (n--)
    {
      while (inword () == FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	}
      if (inword () != FALSE)
	{
	  c = lgetc (curwp->w_dotp, curwp->w_doto);
	  if (c >= 'a' && c <= 'z')
	    {
	      c -= 'a' - 'A';
	      lputc (curwp->w_dotp, curwp->w_doto, c);
	      lchange (WFHARD);
	    }
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	  while (inword () != FALSE)
	    {
	      c = lgetc (curwp->w_dotp, curwp->w_doto);
	      if (c >= 'A' && c <= 'Z')
		{
		  c += 'a' - 'A';
		  lputc (curwp->w_dotp, curwp->w_doto, c);
		  lchange (WFHARD);
		}
	      if (forwchar (FALSE, 1) == FALSE)
		return (FALSE);
	    }
	}
    }
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x7ddb
je 0x7ddf
movl %esi, %ebx
leaq 0x5b0c(%rip), %r14      # 0xd858
decl %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7d6b
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
jne 0x7d4e
jmp 0x7de4
movq (%r14), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movb 0x18(%rax,%rcx), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x7d94
addb $-0x20, %dl
movb %dl, 0x18(%rax,%rcx)
movl $0x8, %edi
callq 0x516b
xorl %ebp, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7de4
callq 0x7f04
testl %eax, %eax
je 0x7dcc
movq (%r14), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movb 0x18(%rax,%rcx), %dl
leal -0x41(%rdx), %esi
cmpb $0x19, %sil
ja 0x7d94
orb $0x20, %dl
jmp 0x7d86
movl $0x1, %ebp
testl %ebx, %ebx
jne 0x7d4c
jmp 0x7de4
xorl %ebp, %ebp
jmp 0x7de4
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: delfword
int delfword (int f, int n)
{
  LINE *dotp;
  int size, doto;

  if (n < 0)
    return (FALSE);
  dotp = curwp->w_dotp;
  doto = curwp->w_doto;
  size = 0;
  while (n--)
    {
      while (inword () != FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	  ++size;
	}
      while (inword () == FALSE)
	{
	  if (forwchar (FALSE, 1) == FALSE)
	    return (FALSE);
	  ++size;
	}
    }
  curwp->w_dotp = dotp;
  curwp->w_doto = doto;
  return (ldelete (size, TRUE));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
js 0x7e4d
leaq 0x5a5a(%rip), %r15      # 0xd858
movq (%r15), %rax
movq 0x18(%rax), %r12
movq 0x20(%rax), %r14
je 0x7e58
movl %esi, %ebx
xorl %ebp, %ebp
callq 0x7f04
testl %eax, %eax
je 0x7e3e
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7e4d
incl %ebp
jmp 0x7e0f
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7e4d
incl %ebp
callq 0x7f04
testl %eax, %eax
je 0x7e2c
decl %ebx
jne 0x7e0f
jmp 0x7e5a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
movq (%r15), %rax
movq %r12, 0x18(%rax)
movslq %r14d, %rcx
movq %rcx, 0x20(%rax)
movl %ebp, %edi
movl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x54cf
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: delbword
int delbword (int f, int n)
{
  int size;

  if (n < 0)
    return (FALSE);
  if (backchar (FALSE, 1) == FALSE)
    return (FALSE);
  size = 0;
  while (n--)
    {
      while (inword () == FALSE)
	{
	  if (backchar (FALSE, 1) == FALSE)
	    return (FALSE);
	  ++size;
	}
      while (inword () != FALSE)
	{
	  if (backchar (FALSE, 1) == FALSE)
	    return (FALSE);
	  ++size;
	}
    }
  if (forwchar (FALSE, 1) == FALSE)
    return (FALSE);
  return (ldelete (size, TRUE));
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x7efb
movl %esi, %ebp
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
je 0x7efb
testl %ebp, %ebp
je 0x7ed9
xorl %ebx, %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7ecc
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
je 0x7efb
incl %ebx
jmp 0x7e9d
xorl %edi, %edi
movl $0x1, %esi
callq 0x2372
testl %eax, %eax
je 0x7efb
incl %ebx
callq 0x7f04
testl %eax, %eax
jne 0x7eba
decl %ebp
jne 0x7e9d
xorl %edi, %edi
movl $0x1, %esi
callq 0x23d0
testl %eax, %eax
je 0x7efb
movl %ebx, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x54cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ThomasMadappattu[P]Sandmacs/word.c
// Function: inword
int inword ()
{
  int c;

  if (curwp->w_doto == llength (curwp->w_dotp))
    return (FALSE);
  c = lgetc (curwp->w_dotp, curwp->w_doto);
  if (c >= 'a' && c <= 'z')
    return (TRUE);
  if (c >= 'A' && c <= 'Z')
    return (TRUE);
  if (c >= '0' && c <= '9')
    return (TRUE);
  if (c == '$' || c == '_')	/* For identifiers */
    return (TRUE);
  return (FALSE);
}

// Assembly:
leaq 0x594d(%rip), %rax      # 0xd858
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdx
movslq 0x14(%rcx), %rsi
xorl %eax, %eax
cmpq %rsi, %rdx
je 0x7f50
movb 0x18(%rcx,%rdx), %cl
leal -0x30(%rcx), %edx
movl $0x1, %eax
cmpb $0xa, %dl
jb 0x7f50
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x7f50
cmpb $0x5f, %cl
sete %al
cmpb $0x24, %cl
sete %cl
orb %al, %cl
movzbl %cl, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/rikuu[P]kermit/kermit-color.c
// Function: color_stats
static void color_stats(const km_multicolor_t *colors, const size_t n_reads)
{
	size_t uncolored=0, ones=0, twos=0, multis=0;
	for (size_t i = 0; i < n_reads; i++) {
		if (colors[i].n == 0) uncolored++;
		else if (colors[i].n == 1) ones++;
		else if (colors[i].n == 2) twos++;
		else multis++;
	}
	fprintf(stderr, "[M::%s] %zu ones, %zu twos, %zu multis, %zu uncolored\n", __func__, ones, twos, multis, uncolored);
}

// Assembly:
pushq %rax
testq %rsi, %rsi
jne 0x2838
xorl %eax, %eax
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
jmp 0x2871
xorl %r9d, %r9d
xorl %r8d, %r8d
xorl %ecx, %ecx
xorl %eax, %eax
movq (%rdi), %rdx
cmpq $0x2, %rdx
je 0x2860
cmpq $0x1, %rdx
je 0x285b
testq %rdx, %rdx
jne 0x2865
incq %rax
jmp 0x2868
incq %rcx
jmp 0x2868
incq %r8
jmp 0x2868
incq %r9
addq $0x18, %rdi
decq %rsi
jne 0x2842
movq 0xb780(%rip), %rdx      # 0xdff8
movq (%rdx), %rdi
movq %rax, (%rsp)
leaq 0x82ea(%rip), %rsi      # 0xab70
leaq 0x831a(%rip), %rdx      # 0xaba7
xorl %eax, %eax
callq 0x1100
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/rikuu[P]kermit/kermit-color.c
// Function: km_align_reference
km_multicolor_t *km_align_reference(km_idx_t *idx, size_t n_reads, int unicolor)
{
	km_multicolor_t *colors = (km_multicolor_t*) calloc(n_reads, sizeof(km_multicolor_t));
	for (size_t i = 0; i < idx->d->n_seq; i++) {
		km_target_t *target = &idx->targets[i];
		for (size_t j = 0; j < target->n_bins; j++) {
			const uint64_t color = unicolor ? (i << 16) : (i << 16 | (j + 1));
			for (size_t k = 0; k < target->bins[j].n; k++) {
				int32_t id = target->bins[j].a[k].qn;
				if (id == -1 || id >= (int32_t) n_reads || (colors[id].n > 0 && colors[id].a[colors[id].n - 1] == color)) continue;
				kv_push(uint64_t, colors[id], color);
			}
		}
	}
	color_stats(colors, n_reads);
	return colors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x10d0
movq %rbx, %rsi
movq %rax, %rdi
movq 0x8(%r14), %rax
cmpl $0x0, (%rax)
je 0x2a05
xorl %ecx, %ecx
movq %r14, 0x18(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x10(%r14), %r8
movq %rcx, 0x10(%rsp)
movq %rcx, %rax
shlq $0x4, %rax
cmpl $0x0, (%r8,%rax)
je 0x29e9
addq %rax, %r8
movq 0x10(%rsp), %rax
shlq $0x10, %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq %r8, 0x40(%rsp)
leaq 0x1(%rcx), %rax
cmpl $0x0, 0xc(%rsp)
movl $0x0, %r14d
movq %rax, 0x28(%rsp)
cmoveq %rax, %r14
movq 0x8(%r8), %rax
imulq $0x18, %rcx, %r13
cmpq $0x0, (%rax,%r13)
je 0x29d8
orq 0x20(%rsp), %r14
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x10(%rax,%r13), %rax
movslq (%rax,%r12), %rax
cmpl $-0x1, %eax
sete %cl
cmpl %esi, %eax
setge %dl
orb %cl, %dl
jne 0x29c3
imulq $0x18, %rax, %rax
leaq (%rdi,%rax), %r15
movq (%rdi,%rax), %rbp
testq %rbp, %rbp
je 0x2979
movq 0x10(%r15), %rax
cmpq %r14, -0x8(%rax,%rbp,8)
je 0x29c3
movq 0x8(%r15), %rax
cmpq %rax, %rbp
jne 0x29b4
leaq (%rax,%rax), %rsi
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r15)
movq 0x10(%r15), %rdi
shlq $0x3, %rsi
callq 0x1160
movq 0x40(%rsp), %r8
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, 0x10(%r15)
movq 0x10(%r15), %rax
leaq 0x1(%rbp), %rcx
movq %rcx, (%r15)
movq %r14, (%rax,%rbp,8)
incq %rbx
movq 0x8(%r8), %rax
addq $0xc, %r12
cmpq (%rax,%r13), %rbx
jb 0x2945
movl (%r8), %eax
movq 0x28(%rsp), %rcx
cmpq %rax, %rcx
jb 0x2910
movq 0x10(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %r14
movq 0x8(%r14), %rax
movl (%rax), %eax
cmpq %rax, %rcx
jb 0x28dd
movq %rdi, %rbx
callq 0x2826
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mijallen[P]SimpleHTTPServer/lib/libyaml/tests/run-dumper.c
// Function: compare_documents
int compare_documents(yaml_document_t *document1, yaml_document_t *document2)
{
    int k;

    if ((document1->version_directive && !document2->version_directive)
            || (!document1->version_directive && document2->version_directive)
            || (document1->version_directive && document2->version_directive
                && (document1->version_directive->major != document2->version_directive->major
                    || document1->version_directive->minor != document2->version_directive->minor)))
        return 0;

    if ((document1->tag_directives.end - document1->tag_directives.start) !=
            (document2->tag_directives.end - document2->tag_directives.start))
        return 0;
    for (k = 0; k < (document1->tag_directives.end - document1->tag_directives.start); k ++) {
        if ((strcmp((char *)document1->tag_directives.start[k].handle,
                        (char *)document2->tag_directives.start[k].handle) != 0)
                || (strcmp((char *)document1->tag_directives.start[k].prefix,
                    (char *)document2->tag_directives.start[k].prefix) != 0))
            return 0;
    }

    if ((document1->nodes.top - document1->nodes.start) !=
            (document2->nodes.top - document2->nodes.start))
        return 0;

    if (document1->nodes.top != document1->nodes.start) {
        if (!compare_nodes(document1, 1, document2, 1))
            return 0;
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x16e4
cmpq $0x0, 0x18(%rbx)
je 0x16eb
testq %rax, %rax
jne 0x1703
cmpq $0x0, 0x18(%rbx)
je 0x16fe
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rax, %rax
je 0x171c
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x171c
movl (%rax), %edx
xorl %ebp, %ebp
cmpl (%rcx), %edx
jne 0x16ed
movl 0x4(%rax), %eax
cmpl 0x4(%rcx), %eax
jne 0x16ed
movq 0x20(%r14), %r15
movq 0x28(%r14), %r12
subq %r15, %r12
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %rax
subq %r13, %rax
xorl %ebp, %ebp
cmpq %rax, %r12
jne 0x16ed
sarq $0x4, %r12
testq %r12, %r12
jle 0x1779
movl $0x8, %ebp
movq -0x8(%r15,%rbp), %rdi
movq -0x8(%r13,%rbp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x16eb
movq (%r15,%rbp), %rdi
movq (%r13,%rbp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x16eb
addq $0x10, %rbp
decq %r12
jne 0x1747
movq (%r14), %rax
movq 0x10(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x10(%rbx), %rsi
subq (%rbx), %rsi
cmpq %rsi, %rdx
jne 0x16eb
cmpq %rax, %rcx
movl $0x0, %ebp
je 0x17bd
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x14cb
testl %eax, %eax
je 0x16ed
movl $0x1, %ebp
jmp 0x16ed
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/aes.c
// Function: Cipher
static void Cipher(state_t* state, uint8_t* RoundKey)
{
  uint8_t round = 0;

  // Add the First round key to the state before starting the rounds.
  AddRoundKey(0, state, RoundKey); 
  
  // There will be Nr rounds.
  // The first Nr-1 rounds are identical.
  // These Nr-1 rounds are executed in the loop below.
  for (round = 1; round < Nr; ++round)
  {
    SubBytes(state);
    ShiftRows(state);
    MixColumns(state);
    AddRoundKey(round, state, RoundKey);
  }
  
  // The last round is given below.
  // The MixColumns function is not here in the last round.
  SubBytes(state);
  ShiftRows(state);
  AddRoundKey(Nr, state, RoundKey);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
movq %rsi, %rcx
movq %rdi, %rdx
xorl %esi, %esi
movb (%rcx,%rsi), %dil
xorb %dil, (%rdx,%rsi)
incq %rsi
cmpq $0x4, %rsi
jne 0x2391
incq %rax
addq $0x4, %rdx
addq $0x4, %rcx
cmpq $0x4, %rax
jne 0x238f
leaq 0x10(%rbx), %r12
movl $0x1, %r13d
leaq 0x5c4c(%rip), %r15      # 0x8010
movq %r14, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rax,%rdx,4), %esi
movb (%rsi,%r15), %sil
movb %sil, (%rax,%rdx,4)
incq %rdx
cmpq $0x4, %rdx
jne 0x23cb
incq %rcx
incq %rax
cmpq $0x4, %rcx
jne 0x23c9
movq %r14, %rdi
callq 0x28d7
movl $0x3, %eax
movb -0x3(%r14,%rax), %cl
movb -0x2(%r14,%rax), %r8b
movb -0x1(%r14,%rax), %dl
movl %edx, %esi
xorb %r8b, %sil
leal (%rsi,%rsi), %edi
xorb %r8b, %dil
xorb %cl, %r8b
movb (%r14,%rax), %r10b
leal (%r8,%r8), %r9d
xorb %cl, %r9b
xorb %r10b, %cl
leal (%rcx,%rcx), %r11d
xorb %r10b, %r11b
xorb %dl, %r10b
movl %r10d, %ebp
xorb %r8b, %bpl
sarb $0x7, %r8b
andb $0x1b, %r8b
xorb %r8b, %r9b
xorb %bpl, %r9b
movb %r9b, -0x3(%r14,%rax)
sarb $0x7, %sil
andb $0x1b, %sil
xorb %sil, %dil
xorb %bpl, %dil
movb %dil, -0x2(%r14,%rax)
leal (%r10,%r10), %esi
sarb $0x7, %r10b
andb $0x1b, %r10b
xorb %dl, %sil
xorb %r10b, %sil
xorb %bpl, %sil
movb %sil, -0x1(%r14,%rax)
sarb $0x7, %cl
andb $0x1b, %cl
xorb %cl, %r11b
xorb %bpl, %r11b
movb %r11b, (%r14,%rax)
addq $0x4, %rax
cmpq $0x13, %rax
jne 0x23f9
movq %r12, %rax
movq %r14, %rcx
xorl %edx, %edx
xorl %esi, %esi
movb (%rax,%rsi), %dil
xorb %dil, (%rcx,%rsi)
incq %rsi
cmpq $0x4, %rsi
jne 0x249c
incq %rdx
addq $0x4, %rcx
addq $0x4, %rax
cmpq $0x4, %rdx
jne 0x249a
incq %r13
addq $0x10, %r12
cmpq $0xa, %r13
jne 0x23c4
xorl %eax, %eax
movq %r14, %rcx
xorl %edx, %edx
movzbl (%rcx,%rdx,4), %esi
movb (%rsi,%r15), %sil
movb %sil, (%rcx,%rdx,4)
incq %rdx
cmpq $0x4, %rdx
jne 0x24d6
incq %rax
incq %rcx
cmpq $0x4, %rax
jne 0x24d4
movq %r14, %rdi
callq 0x28d7
addq $0xa0, %rbx
xorl %eax, %eax
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
xorb %dl, (%r14,%rcx)
incq %rcx
cmpq $0x4, %rcx
jne 0x250a
incq %rax
addq $0x4, %r14
addq $0x4, %rbx
cmpq $0x4, %rax
jne 0x2508
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/aes.c
// Function: AES_CBC_encrypt_buffer
void AES_CBC_encrypt_buffer(struct AES_ctx *ctx,uint8_t* buf, uint32_t length)
{
  uintptr_t i;
  uint8_t *Iv = ctx->Iv;
  for (i = 0; i < length; i += AES_BLOCKLEN)
  {
    XorWithIv(buf, Iv);
    Cipher((state_t*)buf, ctx->RoundKey);
    Iv = buf;
    buf += AES_BLOCKLEN;
    //printf("Step %d - %d", i/16, i);
  }
  /* store Iv in ctx for next call */
  memcpy(ctx->Iv, Iv, AES_BLOCKLEN);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xb0(%rdi), %r15
movq %r15, %r14
testl %edx, %edx
je 0x2859
movq %rdi, %rbx
movl %edx, %r12d
xorl %r13d, %r13d
movq %r15, %rax
movq %rsi, %r14
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
xorb %dl, (%r14,%rcx)
incq %rcx
cmpq $0x10, %rcx
jne 0x282e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2376
leaq 0x10(%r14), %rsi
addq $0x10, %r13
movq %r14, %rax
cmpq %r12, %r13
jb 0x2829
movups (%r14), %xmm0
movups %xmm0, (%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/aes.c
// Function: AES_CBC_decrypt_buffer
void AES_CBC_decrypt_buffer(struct AES_ctx* ctx, uint8_t* buf,  uint32_t length)
{
  uintptr_t i;
  uint8_t storeNextIv[AES_BLOCKLEN];
  for (i = 0; i < length; i += AES_BLOCKLEN)
  {
    memcpy(storeNextIv, buf, AES_BLOCKLEN);
    InvCipher((state_t*)buf, ctx->RoundKey);
    XorWithIv(buf, ctx->Iv);
    memcpy(ctx->Iv, storeNextIv, AES_BLOCKLEN);
    buf += AES_BLOCKLEN;
  }

}

// Assembly:
testl %edx, %edx
je 0x28d6
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
leaq 0xb0(%rdi), %r12
xorl %r13d, %r13d
movups (%rbx), %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2545
xorl %eax, %eax
movb (%r12,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x28a3
movaps (%rsp), %xmm0
movups %xmm0, (%r12)
addq $0x10, %rbx
addq $0x10, %r13
cmpq %r15, %r13
jb 0x288f
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/aes.c
// Function: InvShiftRows
static void InvShiftRows(state_t* state)
{
  uint8_t temp;

  // Rotate first row 1 columns to right  
  temp = (*state)[3][1];
  (*state)[3][1] = (*state)[2][1];
  (*state)[2][1] = (*state)[1][1];
  (*state)[1][1] = (*state)[0][1];
  (*state)[0][1] = temp;

  // Rotate second row 2 columns to right 
  temp = (*state)[0][2];
  (*state)[0][2] = (*state)[2][2];
  (*state)[2][2] = temp;

  temp = (*state)[1][2];
  (*state)[1][2] = (*state)[3][2];
  (*state)[3][2] = temp;

  // Rotate third row 3 columns to right
  temp = (*state)[0][3];
  (*state)[0][3] = (*state)[1][3];
  (*state)[1][3] = (*state)[2][3];
  (*state)[2][3] = (*state)[3][3];
  (*state)[3][3] = temp;
}

// Assembly:
movb 0xd(%rdi), %al
movb 0x9(%rdi), %cl
movb %cl, 0xd(%rdi)
movb 0x5(%rdi), %cl
movb %cl, 0x9(%rdi)
movb 0x1(%rdi), %cl
movb 0x2(%rdi), %dl
movb %cl, 0x5(%rdi)
movb %al, 0x1(%rdi)
movb 0xa(%rdi), %al
movb %al, 0x2(%rdi)
movb %dl, 0xa(%rdi)
movb 0x6(%rdi), %al
movb 0xe(%rdi), %cl
movb %cl, 0x6(%rdi)
movb %al, 0xe(%rdi)
movb 0x3(%rdi), %al
movb 0x7(%rdi), %cl
movb %cl, 0x3(%rdi)
movb 0xb(%rdi), %cl
movb %cl, 0x7(%rdi)
movb 0xf(%rdi), %cl
movb %cl, 0xb(%rdi)
movb %al, 0xf(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/crypto.c
// Function: aes128_cbc_encrypt
int aes128_cbc_encrypt(void *key, void *plaintext, void *ciphertext, int length, void *iv) {
    struct AES_ctx ctx;

    unsigned char *temp = (unsigned char *)malloc(length);
    if(!temp) {
        return 1;
    }

    memcpy(temp, plaintext, length);

    AES_init_ctx_iv(&ctx, key, iv);
    AES_CBC_encrypt_buffer(&ctx, temp, length);

    memcpy(ciphertext, temp, length);
    free(temp);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %r12
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r13
movslq %ecx, %r14
movq %r14, %rdi
callq 0x2140
testq %rax, %rax
je 0x29e5
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2130
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x233e
movq %rbp, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2806
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2130
movq %r15, %rdi
callq 0x2030
xorl %eax, %eax
jmp 0x29ea
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/crypto.c
// Function: aes128_cbc_decrypt
int aes128_cbc_decrypt(void *key, void *ciphertext, void *plaintext, int length, void *iv) {
    struct AES_ctx ctx;

    unsigned char *temp = (unsigned char *)malloc(length);
    if(!temp) {
        return 1;
    }

    memcpy(temp, ciphertext, length);

    AES_init_ctx_iv(&ctx, key, iv);
    AES_CBC_decrypt_buffer(&ctx, temp, length);

    memcpy(plaintext, temp, length);
    free(temp);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %r12
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r13
movslq %ecx, %r14
movq %r14, %rdi
callq 0x2140
testq %rax, %rax
je 0x2a75
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2130
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x233e
movq %rbp, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x286b
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2130
movq %r15, %rdi
callq 0x2030
xorl %eax, %eax
jmp 0x2a7a
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: find_consolemap
struct consolemap_entry *find_consolemap(char *model) {
    int i, k;
    int good;
    char *m;

    for(i = 0; i < NUM_CONSOLES; i++) {
        m = g_consolemap[i].model;

        // loop and take wildcard into account
        good = 0;
        for(k = 0; k < MIN(strlen(m), strlen(model)); k++) {
            if(m[k] == '?' || m[k] == model[k]) {
                good = 1;
            } else {
                good = 0;
                break;
            }
        }

        if(good) {
            return &g_consolemap[i];
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2090
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x8b4c(%rip), %rbp      # 0xc0e0
movq %r13, %r15
shlq $0x4, %r15
movq (%r15,%rbp), %r12
movq %r12, %rdi
callq 0x2090
cmpq %r14, %rax
cmovaeq %r14, %rax
testq %rax, %rax
je 0x35d0
addq %rbp, %r15
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
cmpb $0x3f, %dl
je 0x35c6
cmpb (%rbx,%rcx), %dl
jne 0x35d0
incq %rcx
cmpq %rcx, %rax
jne 0x35b8
jmp 0x35dc
incq %r13
cmpq $0x6, %r13
jne 0x3594
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: find_codename
struct codename_entry *find_codename(char *codename) {
    int i;

    for(i = 0; i < NUM_CODENAMES; i++) {
        if(!strcmp(g_codenames[i].codename, codename)) {
            return &g_codenames[i];
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
leaq 0x8b3e(%rip), %r15      # 0xc140
xorl %r12d, %r12d
movq (%r12,%r15), %rdi
movq %r14, %rsi
callq 0x2100
testl %eax, %eax
je 0x3624
addq $0x18, %r12
cmpq $0x1e0, %r12            # imm = 0x1E0
jne 0x3605
jmp 0x362a
addq %r12, %r15
movq %r15, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: hexdump
void hexdump(unsigned char *data, int length, int newlines) {
    int i, k;

    for(i = 0; i < length; i++) {
        printf("%02X ", data[i]);

        if(newlines) {
            if(i != 0 && (i + 1) % 16 == 0) {
                printf("\n");
            }
        }
    }

    printf("\n");
}

// Assembly:
testl %esi, %esi
jle 0x36a2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %r12d
leaq 0x4e5a(%rip), %r15      # 0x84b1
xorl %r13d, %r13d
testl %ebx, %ebx
sete %bpl
movzbl (%r14,%r13), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20b0
testq %r13, %r13
sete %al
orb %bpl, %al
jne 0x368c
leal 0x1(%r13), %eax
testb $0xf, %al
jne 0x368c
movl $0xa, %edi
callq 0x2040
incq %r13
cmpq %r13, %r12
jne 0x365a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0xa, %edi
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: dumpbin
int dumpbin(unsigned char *filename, unsigned char *data, int length) {
    FILE *fp;

    fp = fopen(filename, "wb");
    if(!fp) {
        return 1;
    }
    
    fwrite(data, 1, length, fp);
    fclose(fp);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x4dfb(%rip), %rsi      # 0x84b7
callq 0x2170
testq %rax, %rax
je 0x36e8
movq %rax, %r14
movslq %ebp, %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2180
movq %r14, %rdi
callq 0x2080
xorl %eax, %eax
jmp 0x36ed
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: readbin
int readbin(unsigned char *filename, unsigned char **data, int *length) {
    FILE *fp;
    unsigned char *ptr;
    long size;

    fp = fopen(filename, "rb");
    if(!fp) {
        return 1;
    }

    fseek(fp, 0, SEEK_END);
    size = ftell(fp);
    fseek(fp, 0, SEEK_SET);
    
    ptr = (unsigned char *)malloc(size);
    if(!ptr) {
        return 1;
    }

    memset(ptr, 0, size);
    fread(ptr, 1, size, fp);
    fclose(fp);

    if(data) {
        *data = ptr;
    } else {
        free(ptr);
    }

    if(length) {
        *length = size;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4db0(%rip), %rsi      # 0x84ba
callq 0x2170
movl $0x1, %ebp
testq %rax, %rax
je 0x3796
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2150
movq %r12, %rdi
callq 0x2120
movq %rax, %r15
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2150
movq %r15, %rdi
callq 0x2140
testq %rax, %rax
je 0x3796
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movl $0x1, %esi
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2070
movq %r12, %rdi
callq 0x2080
testq %r14, %r14
je 0x3784
movq %r13, (%r14)
jmp 0x378c
movq %r13, %rdi
callq 0x2030
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x3796
movl %r15d, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jogolden[P]ps4flashtool/flashtool.c
// Function: load_flashdump
unsigned char *load_flashdump(char *flashfile) {
    FILE *fp;
    unsigned char *data;
    int length;

    printf("loading flash dump '%s' ...\n", flashfile);

    if(readbin(flashfile, &data, &length)) {
        return NULL;
    }

    if(length != FLASH_SIZE) {
        printf("warning: flash size mismatch. is your flash really 32MB?\n");
    }

    return data;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x4d05(%rip), %rdi      # 0x84bd
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x20b0
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x36f2
testl %eax, %eax
jne 0x37f5
cmpl $0x2000000, 0xc(%rsp)   # imm = 0x2000000
je 0x37f0
leaq 0x5112(%rip), %rdi      # 0x88fd
callq 0x2060
movq 0x10(%rsp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq