LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: waitforkey
void waitforkey(c)
     char c;
{
  char keystr;
  XEvent ev;

  XFlush(d);                    /* out with the old */
  while (XPending(d))
    XNextEvent(d, &ev);
                                /* now wait for the new */
  while (1) {
    XWindowEvent(d, w, KeyPressMask|ButtonPressMask, &ev);
    switch(ev.type) {
    case KeyPress:
      if (!c || XLookupString(&ev.xkey,&keystr,1,(KeySym *) 0,
                        (XComposeStatus *) 0) == 1 &&
          keystr == c)
        return;
      break;
    case ButtonPress:
      if (!c)
        return;
      break;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edi, %ebx
movq 0xc41b(%rip), %rdi      # 0x13638
callq 0x4410
leaq 0x8(%rsp), %r14
movq 0xc40a(%rip), %rdi      # 0x13638
callq 0x45d0
testl %eax, %eax
je 0x7248
movq 0xc3fa(%rip), %rdi      # 0x13638
movq %r14, %rsi
callq 0x4340
jmp 0x7227
movsbl %bl, %r13d
pushq $0x5
popq %r14
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %r12
pushq $0x1
popq %rbp
movq 0xc3d4(%rip), %rdi      # 0x13638
movq 0xc3d5(%rip), %rsi      # 0x13640
movq %r14, %rdx
movq %r15, %rcx
callq 0x4350
movl 0x8(%rsp), %eax
cmpl $0x4, %eax
je 0x72ab
cmpl $0x2, %eax
jne 0x725d
testb %bl, %bl
je 0x72af
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x40e0
cmpl $0x1, %eax
jne 0x725d
movsbl 0x7(%rsp), %eax
cmpl %eax, %r13d
jne 0x725d
jmp 0x72af
testb %bl, %bl
jne 0x725d
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_graphics.c
// Function: message
void message(number, bell)
     int number;
     Bool bell;
{
  static int xpt = 70;
  static int ypt[] = {507, 567, 627};
  static char* messages[] = {"ENEMY TANK IN FIRING ARC",
                               "MOVEMENT BLOCKED BY OBJECT",
                               "SALVO FIRED BY ENEMY TANK"};
  int ind;
  char text[41];

  ind = abs(number) - 1;
  if (number < 0)
    sprintf(text,"%-40s"," ");
  else
    sprintf(text,"%-40s",messages[ind]);

  gprsetclippingactive(False);
  printstring(xpt, ypt[ind], text, 40);
  gprsetclippingactive(True);
  if (bell)
    tonetime();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movl %edi, %ebp
negl %ebp
cmovsl %edi, %ebp
decl %ebp
testl %edi, %edi
js 0x73df
movslq %ebp, %r14
leaq 0x6377(%rip), %rax      # 0xd73c
movslq (%rax,%r14,4), %rdx
addq %rax, %rdx
leaq 0x662b(%rip), %rsi      # 0xd9fe
movq %rsp, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x73fa
leaq 0x6618(%rip), %rsi      # 0xd9fe
leaq 0x6617(%rip), %rdx      # 0xda04
movq %rsp, %rdi
xorl %eax, %eax
callq 0x42e0
movslq %ebp, %r14
xorl %edi, %edi
xorl %eax, %eax
callq 0x6cb6
leaq 0x6326(%rip), %rax      # 0xd730
movl (%rax,%r14,4), %esi
pushq $0x46
popq %rdi
movq %rsp, %rdx
pushq $0x28
popq %rcx
xorl %eax, %eax
callq 0x69e2
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x6cb6
testl %ebx, %ebx
je 0x7433
xorl %eax, %eax
callq 0x6d41
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_graphics.c
// Function: screeninit
void screeninit()
{
  controlfont = gprloadfontfile(CONTROLFONT);
  titlefont = gprloadfontfile(TITLEFONT);
  generalfont = gprloadfontfile(GENERALFONT);
  staticscreen();
}

// Assembly:
pushq %rax
leaq 0x65c2(%rip), %rdi      # 0xda06
xorl %eax, %eax
callq 0x701b
movq %rax, 0xc2fe(%rip)      # 0x13750
leaq 0x65da(%rip), %rdi      # 0xda33
xorl %eax, %eax
callq 0x701b
movq %rax, 0xc2f1(%rip)      # 0x13758
leaq 0x65f3(%rip), %rdi      # 0xda61
xorl %eax, %eax
callq 0x701b
movq %rax, 0xc2e4(%rip)      # 0x13760
popq %rax
jmp 0x7482
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_graphics.c
// Function: xhairs
void xhairs (aligned)
     Bool aligned;
{
  static Bool last = False;
  static short pt1[] = {500, 215, 500, 235, 500, 285, 500, 305, 475, 240,
                          475, 235, 475, 235, 525, 235, 525, 235, 525, 240,
                          475, 280, 475, 285, 475, 285, 525, 285, 525, 285,
                          525, 280};
  static short pt2[] = {500, 215, 500, 235, 500, 285, 500, 305, 475, 245,
                          500, 235, 500, 235, 525, 245, 475, 275, 500, 285,
                          500, 285, 525, 275};
  static Bool draw = True;
  if (draw) {
    if (aligned) {
      if (!last) {
        gprsetdrawvalue(opt->cpi[COLOR_BG]);       /* erase the old */
        multiline(pt1, 8);
        last = True;
      }
      gprsetdrawvalue(opt->cpi[COLOR_XHAIR]);        /* draw the new */
      multiline(pt2, 6);
    }
    else {
      if (last) {
        gprsetdrawvalue(opt->cpi[COLOR_BG]);       /* erase the old */
        multiline(pt2, 6);
        last = False;
      }
      gprsetdrawvalue(opt->cpi[COLOR_XHAIR]);        /* draw the new */
      multiline(pt1, 8);
    }
  }
  draw = !draw;
}

// Assembly:
cmpl $0x0, 0xb473(%rip)      # 0x13410
je 0x8062
pushq %rax
movb 0xb7fe(%rip), %al       # 0x137a8
testl %edi, %edi
je 0x8003
testb $0x1, %al
jne 0x7fe1
leaq 0xb5d7(%rip), %rax      # 0x13590
movq (%rax), %rax
movl 0xf0(%rax), %edi
xorl %eax, %eax
callq 0x7092
leaq 0xb3d0(%rip), %rdi      # 0x133a0
pushq $0x8
popq %rsi
xorl %eax, %eax
callq 0x6abd
movb $0x1, 0xb7c7(%rip)      # 0x137a8
leaq 0xb5a8(%rip), %rax      # 0x13590
movq (%rax), %rax
movl 0x104(%rax), %edi
xorl %eax, %eax
callq 0x7092
leaq 0xb3e1(%rip), %rdi      # 0x133e0
pushq $0x6
jmp 0x8056
testb $0x1, %al
je 0x8036
leaq 0xb582(%rip), %rax      # 0x13590
movq (%rax), %rax
movl 0xf0(%rax), %edi
xorl %eax, %eax
callq 0x7092
leaq 0xb3bb(%rip), %rdi      # 0x133e0
pushq $0x6
popq %rsi
xorl %eax, %eax
callq 0x6abd
movb $0x0, 0xb772(%rip)      # 0x137a8
leaq 0xb553(%rip), %rax      # 0x13590
movq (%rax), %rax
movl 0x104(%rax), %edi
xorl %eax, %eax
callq 0x7092
leaq 0xb34c(%rip), %rdi      # 0x133a0
pushq $0x8
popq %rsi
xorl %eax, %eax
callq 0x6abd
addq $0x8, %rsp
xorl %eax, %eax
cmpl $0x0, 0xb3a5(%rip)      # 0x13410
sete %al
movl %eax, 0xb39c(%rip)      # 0x13410
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_main.c
// Function: initarray
void initarray(o)
     Genericp o;
{
  Genericp s;
  Genericp g;
  Genericp pl = o;
  int i, j;

  pl->type = IS_PLAYER;                 /* player is always the first */
  pl->attr = START_LIVING;              /* object.  Same size as the */
  pl->criticalx = 45.0;                 /* other tanks.  */
  pl->criticaly = 70.0;
  for (g=o; g<o+opt->mobjects; g++) {
    g->ca = 1.0;                        /* for those objects which */
    for (j=0; j<5; j++)                 /* have rotating parts, set */
      g->dc[j].ctp = g->dc[j].cta = 1.0;  /* the cos to 1.0 */
  }

  s = o+opt->sstart;                    /* player gets msalvos, each  */
  pl->salvo = s;                        /* enemy gets one.  the salvos */
  for (i=0; i<opt->msalvos; i++) {      /* must know who their owner */
    s->salvo = pl;                      /* is for a variety of reasons */
    s->type = IS_SALVO;                 /* first the player */
    s->lntype = LN_SALVO;
    s++;
  }
  for (g=o+opt->estart; g<o+opt->lstart; g++) {
    g->salvo = s;                       /* now the enemies */
    s->salvo = g;
    s->type = IS_SALVO;
    s->lntype = LN_SALVO;
    s++;
  }
}

// Assembly:
movl $0x100, (%rdi)          # imm = 0x100
movl $0x3, 0x8(%rdi)
movsd 0x53e7(%rip), %xmm0     # 0xdad0
movsd %xmm0, 0x38(%rdi)
movq 0xae9b(%rip), %rax      # 0x13590
movslq 0x1c(%rax), %rcx
imulq $0x660, %rcx, %rcx      # imm = 0x660
addq %rdi, %rcx
movl $0x3f800000, %edx       # imm = 0x3F800000
movq %rdi, %rsi
cmpq %rcx, %rsi
jae 0x8741
movl $0x3f800000, 0x24(%rsi) # imm = 0x3F800000
movl $0x180, %r8d            # imm = 0x180
cmpq $0x770, %r8             # imm = 0x770
je 0x8738
movl %edx, -0x8(%rsi,%r8)
movl %edx, (%rsi,%r8)
addq $0x130, %r8             # imm = 0x130
jmp 0x871d
addq $0x660, %rsi            # imm = 0x660
jmp 0x870b
movslq 0x28(%rax), %rcx
imulq $0x660, %rcx, %rcx      # imm = 0x660
addq %rdi, %rcx
movq %rcx, 0x650(%rdi)
movl 0x10(%rax), %edx
xorl %esi, %esi
testl %edx, %edx
cmovgl %edx, %esi
movabsq $0x700000080, %rdx      # imm = 0x700000080
subl $0x1, %esi
jb 0x8782
movq %rdi, 0x650(%rcx)
movq %rdx, (%rcx)
addq $0x660, %rcx            # imm = 0x660
jmp 0x876a
movslq 0x20(%rax), %rsi
imulq $0x660, %rsi, %rsi      # imm = 0x660
addq %rdi, %rsi
movslq 0x24(%rax), %rax
imulq $0x660, %rax, %rax      # imm = 0x660
addq %rdi, %rax
movl $0x660, %edi            # imm = 0x660
cmpq %rax, %rsi
jae 0x87c1
movq %rcx, 0x650(%rsi)
movq %rsi, 0x650(%rcx)
movq %rdx, (%rcx)
addq %rdi, %rcx
addq %rdi, %rsi
jmp 0x87a3
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_move.c
// Function: movelander
void movelander(g, pl)
     Genericp g;
     Genericp pl;
{
  float dx, dy, theta;

  if (++g->pcount > 20) {
    g->pcount = 0;

    if (g->range <= 750.0) {
      dx = g->x - pl->x;
      dy = g->y - pl->y;
      theta = atan (dy / (fabs(dx) + 1.0));
      if (dx <= 0.0)
        theta = PI - theta;
      /* the original fortran went to all the trouble of calculating
       * theta above, but never used it.  perhaps the following
       * statement was left out.
       */
      g->azm = theta;
    }

    if (frand() >= 0.5) {
      g->azm += frand() * PI / 4.0;
    }
    else {
      g->azm -= frand() * PI / 4.0;
    }
    g->speed = frand() * 20.0;
  }
}

// Assembly:
movl 0x4c(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4c(%rdi)
cmpl $0x14, %eax
jl 0xc04f
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
andl $0x0, 0x4c(%rdi)
movss 0x1e36(%rip), %xmm0     # 0xdd6c
ucomiss 0x34(%rdi), %xmm0
jb 0xbfa9
movss 0xc(%rbx), %xmm2
movss 0x10(%rbx), %xmm0
subss 0xc(%rsi), %xmm2
movaps %xmm2, (%rsp)
subss 0x10(%rsi), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x10f1(%rip), %xmm1     # 0xd050
andps %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
addsd 0x118a(%rip), %xmm1     # 0xd0f8
divsd %xmm1, %xmm0
callq 0x4270
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1d49(%rip), %xmm2     # 0xdcd0
subsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm1
xorps %xmm2, %xmm2
movaps (%rsp), %xmm3
cmpnless %xmm2, %xmm3
andps %xmm3, %xmm0
andnps %xmm1, %xmm3
orps %xmm0, %xmm3
movss %xmm3, 0x20(%rbx)
callq 0x4520
movl $0xffff, %ebp           # imm = 0xFFFF
andl %ebp, %eax
cvtsi2sd %eax, %xmm0
divsd 0x10af(%rip), %xmm0     # 0xd070
movsd %xmm0, (%rsp)
callq 0x4520
andl %ebp, %eax
cvtsi2sd %eax, %xmm0
divsd 0x1097(%rip), %xmm0     # 0xd070
mulsd 0x1cef(%rip), %xmm0     # 0xdcd0
mulsd 0x1d2f(%rip), %xmm0     # 0xdd18
cvtss2sd 0x20(%rbx), %xmm1
movapd 0x161a(%rip), %xmm2     # 0xd610
xorpd %xmm0, %xmm2
movsd 0x1c46(%rip), %xmm3     # 0xdc48
cmpnlesd (%rsp), %xmm3
movapd %xmm3, %xmm4
andnpd %xmm0, %xmm4
andpd %xmm2, %xmm3
orpd %xmm4, %xmm3
addsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm0
movss %xmm0, 0x20(%rbx)
callq 0x4520
andl %ebp, %eax
cvtsi2sd %eax, %xmm0
divsd 0x1038(%rip), %xmm0     # 0xd070
mulsd 0x1038(%rip), %xmm0     # 0xd078
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x2c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_parseopts.c
// Function: pager
int pager(file)
     char* file;
{
  char buf[100], *pager, *getenv();
  static char defaultpager[] = PAGER;
  FILE *f;

  if ((pager = getenv("PAGER")) == NULL)
    pager = defaultpager;
  sprintf(buf,"%s%s",TANKDIR,file);
  if ((f=fopen(buf,"r")) != NULL) {
    fclose(f);
    switch (fork()) {
    case 0:
#ifndef WIN31
      execl(pager,pager,buf,0);
#endif
      fprintf(stderr,"Exec of %s failed\n", pager);
      return 1;
    case -1:
      fprintf(stderr,"Unable to fork process\n");
      return 1;
    default:
#ifndef WIN31
      wait(0);
#endif
      break;
    }
  }
  else {
    fprintf(stderr,"File %s not found or unreadable.\n", buf);
    return 1;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %r14
leaq 0x1e15(%rip), %rdi      # 0xde78
callq 0x43e0
testq %rax, %rax
leaq 0x7536(%rip), %rbx      # 0x135a8
cmovneq %rax, %rbx
leaq 0x1e01(%rip), %rsi      # 0xde7e
leaq 0x1dff(%rip), %rdx      # 0xde83
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x42e0
leaq 0x1a09(%rip), %rsi      # 0xdaa4
movq %r15, %rdi
callq 0x41a0
testq %rax, %rax
je 0xc0d3
movq %rax, %rdi
callq 0x4510
callq 0x4540
cmpl $-0x1, %eax
je 0xc118
testl %eax, %eax
je 0xc0e9
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x4090
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x4f0e(%rip), %rax      # 0x10fe8
movq (%rax), %rdi
leaq 0x1dd4(%rip), %rsi      # 0xdeb8
movq %rsp, %rdx
jmp 0xc10f
movq %rsp, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x4160
movq 0x4ee6(%rip), %rax      # 0x10fe8
movq (%rax), %rdi
leaq 0x1d81(%rip), %rsi      # 0xde8d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4580
jmp 0xc134
movq 0x4ec9(%rip), %rax      # 0x10fe8
movq (%rax), %rcx
leaq 0x1d77(%rip), %rdi      # 0xdea0
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x4560
pushq $0x1
popq %rbx
jmp 0xc0c7
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_parseopts.c
// Function: getoptionint
int getoptionint(s)
     char *s;
{
  char rest[100];
  int num;

  if (sscanf(s, "%d%s", &num, rest) != 1) {
    printf("Error in optional argument %s; use -help for help.\n",
           s);
    exit(0);
  }
  return(num);
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x1d8f(%rip), %rsi      # 0xdeda
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x40f0
cmpl $0x1, %eax
jne 0xc16e
movl 0xc(%rsp), %eax
addq $0x80, %rsp
popq %rbx
retq
leaq 0x1d6a(%rip), %rdi      # 0xdedf
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4050
xorl %edi, %edi
callq 0x4110
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_scores.c
// Function: printandwait
void printandwait(s, c)                 /* print a string and then */
     char* s;                           /* wait for a character c  */
     char c;                            /* to be pressed.  If c==0 */
{                                       /* then any keypress will  */
  y += ydelta;                          /* do.                     */
  xprintf(s, True);
  waitforkey(c);
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl 0x73ea(%rip), %eax      # 0x1391c
addl %eax, 0x73e0(%rip)      # 0x13918
callq 0xc4e4
movsbl %bl, %edi
xorl %eax, %eax
popq %rbx
jmp 0x7203
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/add.c
// Function: main
int
main()
{
    int me;

    shmem_init();
    me = shmem_my_pe();

    dst = 22;
    shmem_barrier_all();

    if (me == 0) {
        shmem_int_atomic_add(&dst, 44, 1);
    }
    shmem_barrier_all();

    printf("%d: dst = %d\n", me, dst);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbx
callq 0x1080
callq 0x1060
movl %eax, %ebx
movl $0x16, 0x2eb9(%rip)     # 0x405c
callq 0x1070
testl %ebx, %ebx
jne 0x11be
leaq 0x2ea9(%rip), %rdi      # 0x405c
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x1050
callq 0x1070
movl 0x2e93(%rip), %edx      # 0x405c
leaq 0xe34(%rip), %rdi       # 0x2004
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1040
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/xpack.c
// Function: get_suffix
static const tchar *
get_suffix(const tchar *path, const tchar *suffix)
{
	const tchar *dot = tstrrchr(get_filename(path), '.');

	if (dot != NULL && tstrxcmp(dot + 1, suffix) == 0)
		return dot;
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x20c3
pushq $0x2e
popq %rsi
movq %rax, %rdi
callq 0x10c0
testq %rax, %rax
je 0x1d77
movq %rax, %rbx
leaq 0x1(%rax), %rdi
movq %r14, %rsi
callq 0x1120
testl %eax, %eax
je 0x1d79
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/xpack.c
// Function: stat_file
static int
stat_file(struct file_stream *in, struct stat *stbuf, bool allow_hard_links)
{
	if (fstat(in->fd, stbuf) != 0) {
		msg("%"TS": unable to stat file", in->name);
		return -1;
	}

	if (!S_ISREG(stbuf->st_mode) && !in->is_standard_stream) {
		msg("%"TS" is %s -- skipping",
		    in->name, S_ISDIR(stbuf->st_mode) ? "a directory" :
							"not a regular file");
		return -2;
	}

	if (stbuf->st_nlink > 1 && !allow_hard_links) {
		msg("%"TS" has multiple hard links -- skipping "
		    "(use -f to process anyway)", in->name);
		return -2;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x11d0
testl %eax, %eax
je 0x1db1
movq 0x8(%rbx), %rsi
leaq 0x562e(%rip), %rdi      # 0x73d4
xorl %eax, %eax
callq 0x1eb8
pushq $-0x1
jmp 0x1e15
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%r14), %eax
cmpl $0x8000, %eax           # imm = 0x8000
je 0x1dc7
cmpb $0x0, 0x10(%rbx)
je 0x1dea
cmpq $0x2, 0x10(%r14)
setb %cl
xorl %eax, %eax
orb %bpl, %cl
jne 0x1e16
movq 0x8(%rbx), %rsi
leaq 0x563f(%rip), %rdi      # 0x7420
xorl %eax, %eax
callq 0x1eb8
jmp 0x1e13
movq 0x8(%rbx), %rsi
cmpl $0x4000, %eax           # imm = 0x4000
leaq 0x5607(%rip), %rax      # 0x7401
leaq 0x560c(%rip), %rdx      # 0x740d
cmoveq %rax, %rdx
leaq 0x55e0(%rip), %rdi      # 0x73ec
xorl %eax, %eax
callq 0x1eb8
pushq $-0x2
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: do_msg
static void
do_msg(const char *format, bool with_errno, va_list va)
{
	int saved_errno = errno;

	fprintf(stderr, "%"TS": ", program_invocation_name);
	vfprintf(stderr, format, va);
	if (with_errno)
		fprintf(stderr, ": %s\n", strerror(saved_errno));
	else
		fprintf(stderr, "\n");

	errno = saved_errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
callq 0x1050
movq %rax, %rbx
movl (%rax), %ebp
movq 0x8091(%rip), %r13      # 0x9ff8
movq (%r13), %rdi
movq 0x81a6(%rip), %rdx      # 0xa118
leaq 0x592d(%rip), %rsi      # 0x78a6
xorl %eax, %eax
callq 0x1140
movq (%r13), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r13), %r14
testl %r15d, %r15d
jne 0x1fb4
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x1100
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
callq 0x11e0
leaq 0x58e9(%rip), %rsi      # 0x78ab
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x1fa3
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: xmalloc
void *
xmalloc(size_t size)
{
	void *p = malloc(size);
	if (p == NULL && size == 0)
		p = malloc(1);
	if (p == NULL)
		msg("Out of memory");
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1160
movq %rax, %rbx
orq %rax, %r14
jne 0x207b
pushq $0x1
popq %rdi
callq 0x1160
movq %rax, %rbx
testq %rbx, %rbx
jne 0x208e
leaq 0x560d(%rip), %rdi      # 0x7694
xorl %eax, %eax
callq 0x1eb8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: xopen_for_read
int
xopen_for_read(const tchar *path, struct file_stream *strm)
{
	if (path == NULL) {
		strm->is_standard_stream = true;
		strm->name = T("standard input");
		strm->fd = STDIN_FILENO;
	#ifdef _WIN32
		_setmode(strm->fd, O_BINARY);
	#endif
		return 0;
	}

	strm->is_standard_stream = false;

	strm->name = quote_path(path);
	if (strm->name == NULL)
		return -1;

	strm->fd = topen(path, O_RDONLY | O_BINARY | O_NOFOLLOW);
	if (strm->fd < 0) {
		msg_errno("Can't open %"TS" for reading", strm->name);
		free(strm->name);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x213e
movq %rdi, %r14
movb $0x0, 0x10(%rbx)
callq 0x215f
movq %rax, 0x8(%rbx)
pushq $-0x1
popq %r15
testq %rax, %rax
je 0x2139
xorl %ebp, %ebp
movq %r14, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
callq 0x1180
movl %eax, (%rbx)
testl %eax, %eax
jns 0x2152
movq 0x8(%rbx), %rsi
leaq 0x5588(%rip), %rdi      # 0x76b1
xorl %eax, %eax
callq 0x1fd1
movq 0x8(%rbx), %rdi
callq 0x1040
movl %r15d, %ebp
jmp 0x2152
movb $0x1, 0x10(%rbx)
leaq 0x5559(%rip), %rax      # 0x76a2
movq %rax, 0x8(%rbx)
andl $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: quote_path
static tchar *
quote_path(const tchar *path)
{
	size_t len = tstrlen(path);
	tchar *result;

	result = xmalloc((1 + len + 1 + 1) * sizeof(tchar));
	if (result == NULL)
		return NULL;
	result[0] = '"';
	tmemcpy(&result[1], path, len);
	result[1 + len] = '"';
	result[1 + len + 1] = '\0';
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x10a0
movq %rax, %r14
leaq 0x3(%rax), %rdi
callq 0x205c
movq %rax, %r15
testq %rax, %rax
je 0x219d
movb $0x22, (%r15)
movq %r15, %rdi
incq %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1150
movw $0x22, 0x1(%r15,%r14)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: xopen_for_write
int
xopen_for_write(const tchar *path, bool overwrite, struct file_stream *strm)
{
	if (path == NULL) {
		strm->is_standard_stream = true;
		strm->name = T("standard output");
		strm->fd = STDOUT_FILENO;
	#ifdef _WIN32
		_setmode(strm->fd, O_BINARY);
	#endif
		return 0;
	}

	strm->is_standard_stream = false;

	strm->name = quote_path(path);
	if (strm->name == NULL)
		goto err;
retry:
	strm->fd = topen(path, O_WRONLY | O_BINARY | O_NOFOLLOW |
				O_CREAT | O_EXCL, 0644);
	if (strm->fd < 0) {
		if (errno != EEXIST) {
			msg_errno("Can't open %"TS" for writing", strm->name);
			goto err;
		}
		if (!overwrite) {
			if (!isatty(STDERR_FILENO) || !isatty(STDIN_FILENO)) {
				msg("%"TS" already exists; use -f to overwrite",
				    strm->name);
				goto err;
			}
			fprintf(stderr, "%"TS": %"TS" already exists; "
				"overwrite? (y/n) ",
				program_invocation_name, strm->name);
			if (getchar() != 'y') {
				msg("Not overwriting.");
				goto err;
			}
		}
		if (tunlink(path) != 0) {
			msg_errno("Unable to delete %"TS, strm->name);
			goto err;
		}
		goto retry;
	}

	return 0;

err:
	free(strm->name);
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdi, %rdi
je 0x2270
movl %esi, %ebp
movq %rdi, %r14
movb $0x0, 0x10(%rbx)
callq 0x215f
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x22b0
pushq $0x2
popq %r12
xorl %r15d, %r15d
leaq 0x5536(%rip), %r13      # 0x771c
movq %r14, %rdi
movl $0x200c1, %esi          # imm = 0x200C1
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1180
movl %eax, (%rbx)
testl %eax, %eax
jns 0x22bd
callq 0x1050
cmpl $0x11, (%rax)
jne 0x229e
testb %bpl, %bpl
jne 0x2257
movl %r12d, %edi
callq 0x1080
testl %eax, %eax
je 0x228a
xorl %edi, %edi
callq 0x1080
testl %eax, %eax
je 0x228a
movq 0x7dc3(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq 0x7ed9(%rip), %rdx      # 0xa118
movq 0x8(%rbx), %rcx
movq %r13, %rsi
xorl %eax, %eax
callq 0x1140
callq 0x1130
cmpl $0x79, %eax
jne 0x22cf
movq %r14, %rdi
callq 0x1060
testl %eax, %eax
je 0x21e6
movq 0x8(%rbx), %rsi
leaq 0x54e8(%rip), %rdi      # 0x7756
jmp 0x22a9
movb $0x1, 0x10(%rbx)
leaq 0x5450(%rip), %rax      # 0x76cb
movq %rax, 0x8(%rbx)
movl $0x1, (%rbx)
xorl %r15d, %r15d
jmp 0x22bd
movq 0x8(%rbx), %rsi
leaq 0x5460(%rip), %rdi      # 0x76f5
xorl %eax, %eax
callq 0x1eb8
jmp 0x22b0
movq 0x8(%rbx), %rsi
leaq 0x5432(%rip), %rdi      # 0x76db
xorl %eax, %eax
callq 0x1fd1
movq 0x8(%rbx), %rdi
callq 0x1040
pushq $-0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x546f(%rip), %rdi      # 0x7745
xorl %eax, %eax
callq 0x1eb8
jmp 0x22b0
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: xread
ssize_t
xread(struct file_stream *strm, void *buf, size_t count)
{
	char *p = buf;
	size_t orig_count = count;

	while (count != 0) {
		ssize_t res = read(strm->fd, p, MIN(count, INT_MAX));
		if (res == 0)
			break;
		if (res < 0) {
			msg_errno("Error reading from %"TS, strm->name);
			return -1;
		}
		p += res;
		count -= res;
	}
	return orig_count - count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %rdx, %r12
testq %r12, %r12
je 0x2325
movl (%r14), %edi
cmpq %r13, %r12
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmovbq %r12, %rdx
movq %r15, %rsi
callq 0x1110
testq %rax, %rax
je 0x2325
js 0x232a
addq %rax, %r15
subq %rax, %r12
jmp 0x22fa
subq %r12, %rbx
jmp 0x233f
movq 0x8(%r14), %rsi
leaq 0x5435(%rip), %rdi      # 0x776a
xorl %eax, %eax
callq 0x1fd1
pushq $-0x1
popq %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: skip_bytes
int
skip_bytes(struct file_stream *strm, size_t count)
{
	size_t bufsize;
	char *buffer;
	ssize_t ret;

	if (count == 0)
		return 0;

	bufsize = MIN(count, 4096);
	buffer = xmalloc(bufsize);
	if (buffer == NULL)
		return -1;
	do {
		size_t n = MIN(count, bufsize);
		ret = xread(strm, buffer, n);
		if (ret < 0)
			goto out;
		if (ret != n) {
			msg("%"TS": unexpected end-of-file", strm->name);
			ret = -1;
			goto out;
		}
		count -= ret;
	} while (count != 0);
	ret = 0;
out:
	free(buffer);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x23ae
movq %rsi, %r15
movq %rdi, %r14
movl $0x1000, %r12d          # imm = 0x1000
cmpq %r12, %rsi
cmovbq %rsi, %r12
movq %r12, %rdi
callq 0x205c
testq %rax, %rax
je 0x23b3
movq %rax, %rbx
cmpq %r12, %r15
movq %r12, %rbp
cmovbq %r15, %rbp
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x22df
movq %rax, %r13
testq %rax, %rax
js 0x23cf
cmpq %rbp, %r13
jne 0x23b9
subq %rbp, %r15
jne 0x237f
xorl %r13d, %r13d
jmp 0x23cf
xorl %r13d, %r13d
jmp 0x23d7
pushq $-0x1
popq %r13
jmp 0x23d7
movq 0x8(%r14), %rsi
leaq 0x50af(%rip), %rdi      # 0x7473
xorl %eax, %eax
callq 0x1eb8
pushq $-0x1
popq %r13
movq %rbx, %rdi
callq 0x1040
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: full_write
int
full_write(struct file_stream *strm, const void *buf, size_t count)
{
	const char *p = buf;

	while (count != 0) {
		ssize_t res = write(strm->fd, p, MIN(count, INT_MAX));
		if (res <= 0) {
			msg_errno("Error writing to %"TS, strm->name);
			return -1;
		}
		p += res;
		count -= res;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
testq %rbx, %rbx
je 0x2429
movl (%r14), %edi
cmpq %r12, %rbx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmovbq %rbx, %rdx
movq %r15, %rsi
callq 0x1090
testq %rax, %rax
jle 0x242d
addq %rax, %r15
subq %rax, %rbx
jmp 0x2400
xorl %eax, %eax
jmp 0x2442
movq 0x8(%r14), %rsi
leaq 0x5348(%rip), %rdi      # 0x7780
xorl %eax, %eax
callq 0x1fd1
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: xclose
int
xclose(struct file_stream *strm)
{
	int ret = 0;
	if (strm->fd >= 0 && !strm->is_standard_stream) {
		if (close(strm->fd) != 0) {
			msg_errno("Error closing %"TS, strm->name);
			ret = -1;
		}
		free(strm->name);
	}
	strm->fd = -1;
	strm->name = NULL;
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
xorl %ebp, %ebp
testl %edi, %edi
js 0x248d
cmpb $0x0, 0x10(%rbx)
jne 0x248d
callq 0x10f0
testl %eax, %eax
je 0x2482
movq 0x8(%rbx), %rsi
leaq 0x531e(%rip), %rdi      # 0x7794
xorl %eax, %eax
callq 0x1fd1
pushq $-0x1
popq %rbp
jmp 0x2484
xorl %ebp, %ebp
movq 0x8(%rbx), %rdi
callq 0x1040
orl $-0x1, (%rbx)
andq $0x0, 0x8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: alloc_compressor
struct xpack_compressor *
alloc_compressor(u32 chunk_size, int level)
{
	struct xpack_compressor *c;

	c = xpack_alloc_compressor(chunk_size, level);
	if (c == NULL) {
		msg_errno("Unable to allocate compressor with "
			  "chunk size %"PRIu32" and compression level %d",
			  chunk_size, level);
	}
	return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movl %edi, %edi
callq 0x27a8
movq %rax, %r14
testq %rax, %rax
jne 0x2559
leaq 0x52ee(%rip), %rdi      # 0x783c
movl %ebp, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1fd1
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/programs/prog_util.c
// Function: alloc_decompressor
struct xpack_decompressor *
alloc_decompressor(void)
{
	struct xpack_decompressor *d;

	d = xpack_alloc_decompressor();
	if (d == NULL)
		msg_errno("Unable to allocate decompressor");

	return d;
}

// Assembly:
pushq %rbx
callq 0x6265
movq %rax, %rbx
testq %rax, %rax
jne 0x257d
leaq 0x5310(%rip), %rdi      # 0x7886
xorl %eax, %eax
callq 0x1fd1
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmac/getoptn.c
// Function: getoptn
int getoptn(int argc,char *argv[],char *optstring)
{
char *ptr;

/* check for end of arg list */
if(optnind==argc || *(argv[optnind])!='-' || strlen(argv[optnind])<=1)
  return(-1);

if((ptr=strchr(optstring,argv[optnind][optnpos]))==NULL)
  return('?');		/* error: unknown option */
else
  {
  optnopt=*ptr;
  if(ptr[1]==':')
    {
    if(optnind==argc-1) return(':');	/* error: missing option */
    optnarg=argv[optnind+1];
    optnpos=1;
    optnind+=2;
    return(optnopt);	/* return early, avoiding the normal increment */
    }
  }

/* now increment position ready for next time.
 * no checking is done for the end of args yet - this is done on
 * the next call.
 */
optnpos++;
if(optnpos>=strlen(argv[optnind]))
  {
  optnpos=1;
  optnind++;
  }

return(optnopt);	/* return the found option */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0xbe12(%rip), %r13      # 0xe100
pushq $-0x1
popq %rbx
cmpl %edi, %r13d
je 0x2399
movq %rsi, %r14
movq (%rsi,%r13,8), %r15
cmpb $0x2d, (%r15)
jne 0x2399
movq %rdx, %r12
movl %edi, %ebp
movq %r15, %rdi
callq 0x2080
cmpq $0x2, %rax
jb 0x2399
movl 0xbde0(%rip), %ebx      # 0xe104
movsbl (%r15,%rbx), %esi
movq %r12, %rdi
callq 0x2060
testq %rax, %rax
je 0x2353
movq %rbx, %rcx
movsbl (%rax), %ebx
movl %ebx, 0xcdd6(%rip)      # 0xf118
cmpb $0x3a, 0x1(%rax)
jne 0x2358
decl %ebp
cmpl %ebp, %r13d
jne 0x2376
pushq $0x3a
jmp 0x2355
pushq $0x3f
popq %rbx
jmp 0x2399
movq %rcx, %r14
incl %r14d
movl %r14d, 0xbd9f(%rip)     # 0xe104
movq %r15, %rdi
callq 0x2080
cmpq %r14, %rax
ja 0x2399
pushq $0x1
jmp 0x2384
movq 0x8(%r14,%r13,8), %rax
movq %rax, 0xcd9e(%rip)      # 0xf120
pushq $0x2
popq %rax
movl $0x1, 0xbd75(%rip)      # 0xe104
addl %eax, %r13d
movl %r13d, 0xbd67(%rip)     # 0xe100
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfputc
int mfputc(unsigned int c,FILE *f)
{
	unsigned char *p;
	UNUSED (f);
	while (mptr >= mhead + msize) {
		if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1) {
			fputs("mio: out of memory\n",stderr);
			return (-1);
		}
		else {
			msize += MALLOC_SIZE;
			mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
			mhead = p;
		}
	}
	*mptr = c & 255;
	mend = ++mptr;
	return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0xcd1f(%rip), %r12      # 0xf138
movq 0xcd08(%rip), %r15      # 0xf128
movl 0xcd09(%rip), %r14d     # 0xf130
movl %r14d, %eax
addq %r15, %rax
cmpq %rax, %r12
jb 0x246a
addl $0x2710, %r14d          # imm = 0x2710
movq %r15, %rdi
movq %r14, %rsi
callq 0x21b0
cmpq $-0x1, %rax
je 0x248d
movl %r14d, 0xccdf(%rip)     # 0xf130
subl %r15d, %r12d
addq %rax, %r12
movq %r12, 0xccda(%rip)      # 0xf138
movq %rax, 0xccc3(%rip)      # 0xf128
movq %rax, %r15
jmp 0x2427
movb %bl, (%r12)
incq %r12
movq %r12, 0xccc0(%rip)      # 0xf138
movq %r12, 0xccc1(%rip)      # 0xf140
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xbb4c(%rip), %rax      # 0xdfe0
movq (%rax), %rsi
leaq 0x5b66(%rip), %rdi      # 0x8004
callq 0x2100
pushq $-0x1
popq %rbx
jmp 0x247f
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfseek
int mfseek(FILE *f,long loc,int origin)
{
	UNUSED (f);
	if (origin != 0) {
		fputs("mseek() only implemented with 0 origin",stderr);
		return (-1);
	}
	mptr = mhead + loc;
	return (0);
}

// Assembly:
testl %edx, %edx
jne 0x24e0
addq 0xcc52(%rip), %rsi      # 0xf128
movq %rsi, 0xcc5b(%rip)      # 0xf138
xorl %eax, %eax
retq
pushq %rax
movq 0xbaf8(%rip), %rax      # 0xdfe0
movq (%rax), %rsi
leaq 0x5b26(%rip), %rdi      # 0x8018
callq 0x2100
pushq $-0x1
popq %rax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfread
int mfread(char *ptr, unsigned int size, unsigned int nitems, FILE *f)
{
	unsigned int i = 0;
	UNUSED (f);
	while (i < nitems) {
		if ((mptr + size) > mend)
			break;
		memcpy(ptr,mptr,size);
		ptr += size;
		mptr += size;
		i++;
	}
	return (i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r13d
movq %rdi, 0x8(%rsp)
movq 0xcc1c(%rip), %rcx      # 0xf138
movl %esi, %r15d
movq 0xcc1a(%rip), %rdx      # 0xf140
movq %rdx, 0x10(%rsp)
movq %rcx, (%rsp)
leaq (%rcx,%r15), %rbp
xorl %r14d, %r14d
xorl %ebx, %ebx
cmpl %ebx, %r13d
je 0x2572
leaq (%r14,%rbp), %r12
cmpq 0x10(%rsp), %r12
ja 0x256f
movq (%rsp), %rcx
leaq (%rcx,%r14), %rsi
movq 0x8(%rsp), %rcx
leaq (%rcx,%r14), %rdi
movq %r15, %rdx
callq 0x2090
movq %r12, 0xcbd0(%rip)      # 0xf138
incl %ebx
addq %r15, %r14
jmp 0x2538
movl %ebx, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfwrite
int mfwrite(char *ptr, int size, int nitems, FILE *f)
{
	int i = 0;
	unsigned char *p;
	UNUSED (f);
	while (i < nitems) {
		while (mptr + size >= mhead + msize) {
			if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1){
				fputs("mio: out of memory\n",stderr);
				return (-1);
			}
			else {
				msize += MALLOC_SIZE;
				mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
				mhead = p;
			}
		}
		if ((mptr + size) > mhead + msize)
			break;
		memcpy(mend,ptr,size);
		ptr += size;
		mend += size;
		mptr = mend;
	}
	return (i);
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
jg 0x258b
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
movq 0xcb9d(%rip), %r15      # 0xf140
movq 0xcb7e(%rip), %r13      # 0xf128
movq 0xcb87(%rip), %rbp      # 0xf138
movl 0xcb78(%rip), %r12d     # 0xf130
leaq (%r14,%rbp), %rax
movl %r12d, %ecx
addq %r13, %rcx
cmpq %rcx, %rax
jb 0x25ff
addl $0x2710, %r12d          # imm = 0x2710
movq %r13, %rdi
movq %r12, %rsi
callq 0x21b0
cmpq $-0x1, %rax
je 0x2626
movl %r12d, 0xcb4a(%rip)     # 0xf130
subl %r13d, %ebp
addq %rax, %rbp
movq %rbp, 0xcb45(%rip)      # 0xf138
movq %rax, 0xcb2e(%rip)      # 0xf128
movq %rax, %r13
jmp 0x25b8
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2090
addq %r14, %rbx
addq %r14, %r15
movq %r15, 0xcb26(%rip)      # 0xf140
movq %r15, 0xcb17(%rip)      # 0xf138
movq %r15, %rbp
jmp 0x25b8
movq 0xb9b3(%rip), %rax      # 0xdfe0
movq (%rax), %rsi
leaq 0x59cd(%rip), %rdi      # 0x8004
callq 0x2100
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vusec[P]fpvi-scsb/leak_rate_win_size/leak_rate.c
// Function: unblock_signal
static void unblock_signal(int signum __attribute__((__unused__))) {              
  sigset_t sigs;                                                                  
  sigemptyset(&sigs);                                                             
  sigaddset(&sigs, signum);                                                       
  sigprocmask(SIG_UNBLOCK, &sigs, NULL);                                          
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x401100
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0x4011a0
pushq $0x1
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x401030
addq $0x80, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vusec[P]fpvi-scsb/common/helper.c
// Function: set_cpu
void set_cpu(int core_idx)
{
    cpu_set_t main_thread_mask;
    CPU_ZERO(&main_thread_mask);
    CPU_SET(core_idx, &main_thread_mask);
    if(sched_setaffinity(getpid(), sizeof(cpu_set_t), &main_thread_mask) == -1){
        fprintf(stderr, "Error setaffinity main thread\n");
        fflush(stdout);
        exit(EXIT_FAILURE);
    }

    assert(sched_getcpu() == core_idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
cmpl $0x3ff, %edi            # imm = 0x3FF
ja 0x40b0b5
pushq $0x1
popq %rax
movl %ebx, %ecx
shlq %cl, %rax
movl %ebx, %ecx
shrl $0x6, %ecx
orq %rax, -0x90(%rbp,%rcx,8)
callq 0x401070
leaq -0x90(%rbp), %rdx
movl $0x80, %esi
movl %eax, %edi
callq 0x4010b0
cmpl $-0x1, %eax
je 0x40b0e5
callq 0x401160
cmpl %ebx, %eax
jne 0x40b118
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movq 0x2f0c(%rip), %rax      # 0x40dff8
movq (%rax), %rcx
leaq 0x104c(%rip), %rdi      # 0x40c142
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x401180
movq 0x2ee0(%rip), %rax      # 0x40dfe8
movq (%rax), %rdi
callq 0x401110
pushq $0x1
popq %rdi
callq 0x401170
leaq 0x1042(%rip), %rdi      # 0x40c161
leaq 0x1056(%rip), %rsi      # 0x40c17c
leaq 0x1058(%rip), %rcx      # 0x40c185
pushq $0x1e
popq %rdx
callq 0x4010a0
// File: /workspace/github_c_makefile_star2_O2/vusec[P]fpvi-scsb/common/helper.c
// Function: create_thread
pthread_t create_thread(int core_idx, void *(*target_loop) (void *), void *arg)
{
    pthread_attr_t target_thread_attrs;
    pthread_attr_init(&target_thread_attrs);
    cpu_set_t target_thread_mask;

    CPU_ZERO(&target_thread_mask);
    CPU_SET(core_idx, &target_thread_mask);

    if(pthread_attr_setaffinity_np(&target_thread_attrs, sizeof(cpu_set_t), &target_thread_mask))
    {
        printf("Error setaffinity CPUID thread\n");
        fflush(stdout);
        exit(EXIT_FAILURE);
    }

    pthread_t target_thread;
    pthread_create(&target_thread, &target_thread_attrs, target_loop, arg);

    return target_thread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
leaq -0xd8(%rbp), %rdi
callq 0x4010d0
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
cmpl $0x3ff, %r15d           # imm = 0x3FF
ja 0x40b1a1
pushq $0x1
popq %rax
movl %r15d, %ecx
shlq %cl, %rax
shrl $0x6, %r15d
orq %rax, -0xa0(%rbp,%r15,8)
leaq -0xd8(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
movl $0x80, %esi
callq 0x401040
testl %eax, %eax
jne 0x40b1e7
leaq -0x20(%rbp), %r15
leaq -0xd8(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x401120
movq (%r15), %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfa9(%rip), %rdi       # 0x40c197
callq 0x401050
movq 0x2dee(%rip), %rax      # 0x40dfe8
movq (%rax), %rdi
callq 0x401110
pushq $0x1
popq %rdi
callq 0x401170
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: getNow
uint64_t getNow(void)
{
  struct timeval tv;

  if (*fixedTimestamp != '\0')
  {
    return UINT64_C(1672527600000); // 2023-01-01 00:00
  }

  if (gettimeofday(&tv, (void *) 0) == 0)
  {
    uint64_t t    = tv.tv_sec;
    uint64_t msec = tv.tv_usec / 1000L;

    return t * 1000L + msec;
  }
  return 0L;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x4b3c(%rip)      # 0x7190
je 0x2662
movabsq $0x1856a69d980, %rbx    # imm = 0x1856A69D980
jmp 0x268c
xorl %ebx, %ebx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x2120
testl %eax, %eax
jne 0x268c
movq 0x8(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
imulq $0x3e8, (%rsp), %rbx    # imm = 0x3E8
addq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: fmtTimestamp
const char *fmtTimestamp(char str[DATE_LENGTH], uint64_t when)
{
  if (fixedTimestamp[0] != '\0')
  {
    return (const char *) fixedTimestamp;
  }
  else
  {
    time_t    t;
    struct tm tm;
    int       msec;
    size_t    len;

    if (when == UINT64_C(0))
    {
      when = getNow();
    }

    t    = when / 1000L;
    msec = when % 1000L;
    gmtime_r(&t, &tm);
    strftime(str, DATE_LENGTH - 5, "%Y-%m-%dT%H:%M:%S", &tm);
    len = strlen(str);
    snprintf(str + len, DATE_LENGTH - len, ".%3.3dZ", msec);
    return str;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
cmpb $0x0, 0x4aeb(%rip)      # 0x7190
je 0x26b0
leaq 0x4ae2(%rip), %rbx      # 0x7190
jmp 0x271b
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x26c0
callq 0x2648
movq %rax, %rsi
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r14
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2110
leaq 0x1d6e(%rip), %rdx      # 0x4458
pushq $0x37
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x21d0
movq %rbx, %rdi
callq 0x20b0
leaq (%rbx,%rax), %rdi
pushq $0x3c
popq %rsi
subq %rax, %rsi
leaq 0x1d59(%rip), %rdx      # 0x446a
movl %r14d, %ecx
xorl %eax, %eax
callq 0x20e0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: logAbort
void logAbort(const char *format, ...)
{
  va_list ap;
  va_start(ap, format);

  logBase(LOGLEVEL_FATAL, format, ap);
  va_end(ap);
  fflush(stderr);
  fflush(stdout);
  exit(2);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x29bc
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
xorl %edi, %edi
movq %r10, %rsi
callq 0x27c0
movq 0x460b(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
callq 0x21a0
movq 0x45dc(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x21a0
pushq $0x2
popq %rdi
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: die
void die(const char *t)
{
  int   e = errno;
  char *s = 0;

  if (e)
  {
    s = strerror(e);
  }

  if (s)
  {
    logAbort("%s: %s\n", t, s);
  }
  else
  {
    logAbort("%s\n", t);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2050
movl (%rax), %edi
testl %edi, %edi
je 0x2a25
callq 0x2260
testq %rax, %rax
jne 0x2a36
leaq 0x1c6e(%rip), %rdi      # 0x469a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x295e
leaq 0x1b70(%rip), %rdi      # 0x45ad
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x295e
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: setProgName
void setProgName(char *name)
{
  progName = strrchr(name, '/');
  if (!progName)
  {
    progName = strrchr(name, '\\');
  }
  if (!progName)
  {
    progName = name;
  }
  else
  {
    progName++;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x2f
popq %rsi
callq 0x2100
testq %rax, %rax
jne 0x2a8d
pushq $0x5c
popq %rsi
movq %rbx, %rdi
callq 0x2100
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, 0x4731(%rip)      # 0x71d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: sbDelete
void sbDelete(StringBuffer *sb, size_t start, size_t end)
{
  if (end >= sb->len)
  {
    sbTruncate(sb, start);
  }
  else if (start < sb->len && sb->data)
  {
    end = CB_MIN(sb->len, end);
    if (end < sb->len)
    {
      memmove(sb->data + start, sb->data + end, sb->len - end);
    }
    sb->len -= end - start;
    sbTerminate(sb);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq %rax, %rdx
subq %r15, %rdx
jbe 0x2b74
cmpq %rbx, %rax
jbe 0x2b8d
movq (%r14), %rsi
testq %rsi, %rsi
je 0x2b8d
leaq (%rsi,%rbx), %rdi
addq %r15, %rsi
callq 0x21e0
subq %r15, %rbx
addq 0x8(%r14), %rbx
jmp 0x2b7b
cmpq %rbx, %rax
cmovbq %rax, %rbx
movq %rbx, 0x8(%r14)
movq (%r14), %rax
testq %rax, %rax
je 0x2b8d
addq %rbx, %rax
movb $0x0, (%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: sbAppendData
void sbAppendData(StringBuffer *sb, const void *data, size_t len)
{
  sbEnsureCapacity(sb, sb->len + len);
  memcpy(sb->data + sb->len, data, len);
  sb->len += len;
  sb->data[sb->len] = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rsi
addq %rdx, %rsi
callq 0x2ac3
movq (%r15), %rdi
addq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2170
addq 0x8(%r15), %rbx
movq %rbx, 0x8(%r15)
movq (%r15), %rax
movb $0x0, (%rax,%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/nmea0183/../common/common.c
// Function: sbAppendEncodeHex
void sbAppendEncodeHex(StringBuffer *sb, const void *data, size_t len, char separator)
{
  sbEnsureCapacity(sb, sb->len + len * 3);

  for (; len > 0; len--, data++)
  {
    sbAppendFormat(sb, "%c%c", hexDigit(((uint8_t *) data)[0] >> 4), hexDigit(((uint8_t *) data)[0] & 0x0f));
    if (len > 1 && separator != '\0')
    {
      sbAppendData(sb, &separator, 1);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
leaq 0xb(%rsp), %rax
movl %ecx, 0xc(%rsp)
movb %cl, (%rax)
leaq (%rdx,%rdx,2), %rsi
addq 0x8(%rdi), %rsi
callq 0x2ac3
leaq -0x1(%r14), %r13
movl $0xff, %ebp
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x2c9b
cmpb $0x0, 0xc(%rsp)
sete %bl
movq 0x10(%rsp), %rax
movb (%rax,%r15), %al
movl %eax, %ecx
shrb $0x4, %cl
leal 0x57(%rcx), %edx
orb $0x30, %cl
cmpb $-0x60, %al
movzbl %dl, %esi
movzbl %cl, %edx
cmovael %esi, %edx
andl %ebp, %edx
andb $0xf, %al
leal 0x57(%rax), %ecx
leal 0x30(%rax), %esi
cmpb $0xa, %al
movzbl %cl, %eax
movzbl %sil, %ecx
cmovael %eax, %ecx
andl %ebp, %ecx
movq %r12, %rdi
leaq 0x181f(%rip), %rsi      # 0x4494
xorl %eax, %eax
callq 0x2caa
cmpq %r15, %r13
sete %al
orb %bl, %al
jne 0x2c96
movq %r12, %rdi
leaq 0xb(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2b93
incq %r15
jmp 0x2c27
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq