LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/frequent.c
// Function: frequent_add
void frequent_add(FREQUENT *freq,intptr_t key) // {{{
{
  assert(freq);
  int iA,zero=-1;
  for (iA=freq->size-1;iA>=0;iA--) {
    if (freq->pair[iA].key==key) {
      freq->pair[iA].count++;
      freq->sorted=0;
      return;
    } else if (freq->pair[iA].count==freq->czero) {
      zero=iA;
    }
  }
  if (zero>=0) { // insert into set
    freq->pair[zero].key=key;
    freq->pair[zero].count++; // i.e. czero+1
    freq->pair[zero].zero=freq->czero;
    // if it was sorted, the free entries are at the end. zero points to the first free entry, because of the loop direction
  } else { // out-of-set count
    freq->czero++;
  }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x7ed2
movslq (%rdi), %rdx
testq %rdx, %rdx
jle 0x7ea0
movq %rdx, %rax
shlq $0x4, %rax
leaq (%rax,%rdi), %rcx
addq $0x8, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl (%rcx), %r8d
cmpq %rsi, -0x8(%rcx)
je 0x7ec1
leaq -0x1(%rdx), %r9
decl %edx
cmpl 0x4(%rdi), %r8d
cmovel %edx, %eax
leaq 0x1(%r9), %r8
addq $-0x10, %rcx
movq %r9, %rdx
cmpq $0x1, %r8
jg 0x7e77
jmp 0x7ea5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x7ecd
movl %eax, %eax
shlq $0x4, %rax
movq %rsi, 0x10(%rdi,%rax)
incl 0x18(%rdi,%rax)
movl 0x4(%rdi), %ecx
movl %ecx, 0x1c(%rdi,%rax)
jmp 0x7ed0
incl %r8d
movl %r8d, (%rcx)
movb $0x0, 0x8(%rdi)
jmp 0x7ed0
incl 0x4(%rdi)
popq %rax
retq
leaq 0x3988(%rip), %rdi      # 0xb861
leaq 0x395a(%rip), %rsi      # 0xb83a
leaq 0x397f(%rip), %rcx      # 0xb866
movl $0x26, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/frequent.c
// Function: frequent_get
intptr_t frequent_get(FREQUENT *freq,int pos) // {{{
{
  assert(freq);
  if (!freq->sorted) {
    // sort by (count-zero)
    qsort(freq->pair,freq->size,sizeof(freq->pair[0]),frequent_cmp);
    freq->sorted=1;
  }
  if ( (pos<0)||(pos>=freq->size) ) {
    return INTPTR_MIN;
  }
  return freq->pair[pos].key;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7f44
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x8(%rdi)
jne 0x7f20
leaq 0x10(%rbx), %rdi
movslq (%rbx), %rsi
leaq 0x51(%rip), %rcx        # 0x7f63
movl $0x10, %edx
callq 0x2250
movb $0x1, 0x8(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
testl %ebp, %ebp
js 0x7f3d
cmpl %ebp, (%rbx)
jle 0x7f3d
movl %ebp, %eax
shlq $0x4, %rax
movq 0x10(%rbx,%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3916(%rip), %rdi      # 0xb861
leaq 0x38e8(%rip), %rsi      # 0xb83a
leaq 0x3935(%rip), %rcx      # 0xb88e
movl $0x47, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_subset.c
// Function: otf_copy_sfnt
int otf_copy_sfnt(OTF_FILE *otf,struct _OTF_WRITE_WOFF *woff,OUTPUT_FN output,void *context) // {{{
{
  assert(otf);
  assert(output);
  int iA;

  struct _OTF_WRITE_INFO otw={
    .version=otf->version,
    .numTables=otf->numTables
  };
  otw.tables=malloc(sizeof(struct _OTF_WRITE_TABLE)*otf->numTables);
  if (!otw.tables) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    return -1;
  }

  // just copy everything
  for (iA=0;iA<otf->numTables;iA++) {
    otw.tables[iA].tag=otf->tables[iA].tag;
    otw.tables[iA].action=otf_action_copy;
    otw.tables[iA].copy.otf=otf;
    otw.tables[iA].copy.table_no=iA;
  }
  otw.order=otf_tagorder_offset_sort(otf);

  const int ret=otf_write_sfnt(&otw,woff,output,context);

  free(otw.order);
  free(otw.tables);
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x8071
movq %rdx, %r14
testq %rdx, %rdx
je 0x8090
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
movzwl 0x38(%rdi), %eax
movw %ax, 0x4(%rsp)
shll $0x4, %eax
leaq (%rax,%rax,4), %rdi
callq 0x21c0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x8065
cmpw $0x0, 0x38(%r12)
je 0x8020
xorl %eax, %eax
leaq 0xfe0(%rip), %rcx       # 0x8fc8
xorl %edx, %edx
movq 0x40(%r12), %rsi
movl (%rsi,%rax), %esi
movq 0x8(%rsp), %rdi
movq %rsi, (%rdi,%rax,4)
movq %rcx, 0x8(%rdi,%rax,4)
movq %r12, 0x10(%rdi,%rax,4)
movq 0x8(%rsp), %rsi
movl %edx, 0x18(%rsi,%rax,4)
incq %rdx
movzwl 0x38(%r12), %esi
addq $0x14, %rax
cmpq %rsi, %rdx
jb 0x7fea
movq %r12, %rdi
callq 0x8efc
movq %rsp, %r12
movq %rax, 0x10(%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x914d
movl %eax, %ebx
movq 0x10(%r12), %rdi
callq 0x21a0
movq 0x8(%r12), %rdi
callq 0x21a0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x2de6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x8057
leaq 0x1fc0(%rip), %rdi      # 0xa038
leaq 0x3836(%rip), %rsi      # 0xb8b5
leaq 0x383d(%rip), %rcx      # 0xb8c3
movl $0xc, %edx
callq 0x20e0
leaq 0x2982(%rip), %rdi      # 0xaa19
leaq 0x3817(%rip), %rsi      # 0xb8b5
leaq 0x381e(%rip), %rcx      # 0xb8c3
movl $0xd, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_subset.c
// Function: otf_intersect_tables
int otf_intersect_tables(OTF_FILE *otf,struct _OTF_WRITE_TABLE *tables) // {{{
{
  int iA,iB,numTables=0;
  for (iA=0,iB=0;(iA<otf->numTables)&&(tables[iB].tag);) {
    if (otf->tables[iA].tag==tables[iB].tag) {
      if (tables[iB].action) {
        if (tables[iB].action==otf_action_copy) {
          tables[iB].copy.table_no=iA; // original table location found.
        }
        if (iB!=numTables) { // >, actually
          memmove(tables+numTables,tables+iB,sizeof(struct _OTF_WRITE_TABLE));
        }
        numTables++;
      } // else skip
      iA++;
      iB++;
    } else if (otf->tables[iA].tag<tables[iB].tag) {
      iA++;
    } else { // not in otf->tables
      if ( (tables[iB].action)&&(tables[iB].action!=otf_action_copy) ) { // keep
        if (iB!=numTables) { // >, actually
          memmove(tables+numTables,tables+iB,sizeof(struct _OTF_WRITE_TABLE));
        }
        numTables++;
      } // else delete
      iB++;
    }
  }
  return numTables;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpw $0x0, 0x38(%rdi)
je 0x81b6
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
leaq 0xec1(%rip), %r12       # 0x8fc8
xorl %ebp, %ebp
xorl %r13d, %r13d
movslq %ebp, %rax
leaq (%rax,%rax,4), %rsi
shlq $0x4, %rsi
movq (%r14,%rsi), %rax
testq %rax, %rax
je 0x81b8
addq %r14, %rsi
movq 0x40(%r15), %rcx
movslq %r13d, %rdx
leaq (%rdx,%rdx,4), %rdx
movl (%rcx,%rdx,4), %ecx
cmpq %rcx, %rax
jne 0x8171
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x816a
cmpq %r12, %rax
jne 0x814c
movl %r13d, 0x18(%rsi)
cmpl %ebx, %ebp
je 0x8168
movslq %ebx, %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq %r14, %rdi
movl $0x50, %edx
callq 0x2220
incl %ebx
incl %r13d
incl %ebp
jmp 0x8176
jbe 0x8182
incl %r13d
movzwl 0x38(%r15), %eax
cmpl %eax, %r13d
jl 0x810c
jmp 0x81b8
movq 0x8(%rsi), %rax
testq %rax, %rax
sete %cl
cmpq %r12, %rax
sete %al
orb %cl, %al
jne 0x816d
cmpl %ebx, %ebp
je 0x81b2
movslq %ebx, %rax
leaq (%rax,%rax,4), %rdi
shlq $0x4, %rdi
addq %r14, %rdi
movl $0x50, %edx
callq 0x2220
incl %ebx
jmp 0x816d
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_subset.c
// Function: otf_subset_glyf
static int otf_subset_glyf(OTF_FILE *otf,int curgid,int donegid,BITSET glyphs) // {{{
{
  int ret=0;
  if (get_SHORT(otf->gly)>=0) { // not composite
    return ret; // done
  }

  char *cur=otf->gly+10;

  unsigned short flags;
  do {
    flags=get_USHORT(cur);
    const unsigned short sub_gid=get_USHORT(cur+2);
    assert(sub_gid<otf->numGlyphs);
    if (!bit_check(glyphs,sub_gid)) {
      // bad: temporarily load sub glyph
      const int len=otf_get_glyph(otf,sub_gid);
      assert(len>0);
      bit_set(glyphs,sub_gid);
      if (sub_gid<donegid) {
        ret+=len;
        ret+=otf_subset_glyf(otf,sub_gid,donegid,glyphs); // composite of composites?, e.g. in DejaVu
      }
      const int res=otf_get_glyph(otf,curgid); // reload current glyph
      assert(res);
    }

    // skip parameters
    cur+=6;
    if (flags&0x01) {
      cur+=2;
    }
    if (flags&0x08) {
      cur+=2;
    } else if (flags&0x40) {
      cur+=4;
    } else if (flags&0x80) {
      cur+=8;
    }
  } while (flags&0x20); // more components

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0x14(%rsp)
movq 0x80(%rdi), %rbp
movl $0x0, 0xc(%rsp)
cmpb $0x0, (%rbp)
jns 0x89dc
movq %rcx, %r8
addq $0xa, %rbp
movl $0x0, 0xc(%rsp)
movzwl %si, %eax
movl %eax, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movzwl 0x2(%rbp), %eax
rolw $0x8, %ax
cmpw 0x4c(%rdi), %ax
jae 0x89ef
movzbl 0x1(%rbp), %r15d
movzwl %ax, %r13d
movl %r13d, %ebx
shrl $0x5, %ebx
movl (%r8,%rbx,4), %eax
movl $0x1, %r14d
movl %r13d, %ecx
shll %cl, %r14d
btl %r13d, %eax
jb 0x89a3
movl %r13d, %esi
callq 0x4b02
testl %eax, %eax
jle 0x8a2d
movq 0x20(%rsp), %rcx
orl %r14d, (%rcx,%rbx,4)
movl 0x14(%rsp), %edx
cmpl %edx, %r13d
jge 0x8986
movl %eax, %r12d
addl 0xc(%rsp), %r12d
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x88c1
addl %r12d, %eax
movl %eax, 0xc(%rsp)
jmp 0x898b
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl 0x10(%rsp), %esi
callq 0x4b02
testl %eax, %eax
movq 0x20(%rsp), %r8
movq %rbx, %rdi
je 0x8a0e
movl $0x2, %eax
testb $0x8, %r15b
jne 0x89c4
movl $0x4, %eax
testb $0x40, %r15b
jne 0x89c4
movl %r15d, %eax
shrb $0x4, %al
andb $0x8, %al
movzbl %al, %eax
movl %r15d, %ecx
andl $0x1, %ecx
leaq 0x6(%rbp,%rcx,2), %rbp
addq %rax, %rbp
testb $0x20, %r15b
jne 0x890c
movl 0xc(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3083(%rip), %rdi      # 0xba79
leaq 0x2eb8(%rip), %rsi      # 0xb8b5
leaq 0x308c(%rip), %rcx      # 0xba90
movl $0x65, %edx
callq 0x20e0
leaq 0x171b(%rip), %rdi      # 0xa130
leaq 0x2e99(%rip), %rsi      # 0xb8b5
leaq 0x306d(%rip), %rcx      # 0xba90
movl $0x70, %edx
callq 0x20e0
leaq 0x308e(%rip), %rdi      # 0xbac2
leaq 0x2e7a(%rip), %rsi      # 0xb8b5
leaq 0x304e(%rip), %rcx      # 0xba90
movl $0x69, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_subset.c
// Function: otf_cff_extract
int otf_cff_extract(OTF_FILE *otf,OUTPUT_FN output,void *context) // {{{ - returns number of bytes written
{
  assert(otf);
  assert(output);

  if (otf->flags&OTF_F_WOFF) {
    int len;
    char *data=otf_get_table(otf,OTF_TAG('C','F','F',' '),&len);
    if (!data) {
      return -1;
    }
    (*output)(data,len,context);
    return len;
  }

  int idx=otf_find_table(otf,OTF_TAG('C','F','F',' '));
  if (idx==-1) {
    return -1;
  }
  const OTF_DIRENT *table=otf->tables+idx;

  return copy_block(otf->f,table->offset,table->length,output,context);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdx, 0x8(%rsp)
testq %rdi, %rdi
je 0x8db3
movq %rsi, %rbx
testq %rsi, %rsi
je 0x8dd2
movq %rdi, %r12
testb $-0x80, 0x9(%rdi)
jne 0x8d6c
movq %r12, %rdi
movl $0x43464620, %esi       # imm = 0x43464620
callq 0x41e4
cmpl $-0x1, %eax
je 0x8d9c
movq (%r12), %r15
testq %r15, %r15
je 0x8df1
movq 0x40(%r12), %rcx
cltq
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,4), %rax
movl 0xc(%rax), %r14d
movl 0x8(%rax), %esi
xorl %ebp, %ebp
movq %r15, %rdi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x8d97
cmpl $0x1001, %r14d          # imm = 0x1001
jl 0x8d31
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rdi
movq %r15, %rcx
callq 0x21e0
movq %rax, %r13
cmpl $0x1000, %r13d          # imm = 0x1000
jl 0x8d9c
movq %r12, %rdi
movl %r13d, %esi
movq 0x8(%rsp), %rdx
callq *%rbx
addl %r13d, %ebp
subl %r13d, %r14d
cmpl $0x1000, %r14d          # imm = 0x1000
jg 0x8cf0
movslq %r14d, %r12
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %r15, %rcx
callq 0x21e0
movq %rax, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r15d, %r12d
jg 0x8da1
leaq 0x10(%rsp), %rdi
movl %r15d, %esi
movq 0x8(%rsp), %rdx
callq *%rbx
addl %r15d, %ebp
movl %ebp, %eax
jmp 0x8da1
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movl $0x43464620, %esi       # imm = 0x43464620
callq 0x4249
testq %rax, %rax
je 0x8d9c
movl 0x10(%rsp), %esi
movq %rax, %rdi
movq 0x8(%rsp), %rdx
callq *%rbx
movl 0x10(%rsp), %eax
jmp 0x8da1
callq 0x2e5c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x127e(%rip), %rdi      # 0xa038
leaq 0x2af4(%rip), %rsi      # 0xb8b5
leaq 0x2c7e(%rip), %rcx      # 0xba46
movl $0x166, %edx            # imm = 0x166
callq 0x20e0
leaq 0x1c40(%rip), %rdi      # 0xaa19
leaq 0x2ad5(%rip), %rsi      # 0xb8b5
leaq 0x2c5f(%rip), %rcx      # 0xba46
movl $0x167, %edx            # imm = 0x167
callq 0x20e0
leaq 0x126d(%rip), %rdi      # 0xa065
leaq 0x2ab6(%rip), %rsi      # 0xb8b5
leaq 0x2cc2(%rip), %rcx      # 0xbac8
movl $0x144, %edx            # imm = 0x144
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: otf_tagorder_win_sort
int *otf_tagorder_win_sort(const struct _OTF_WRITE_TABLE *tables,int numTables) // {{{
{
  int *order=malloc(sizeof(int)*numTables);
  if (!order) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    return NULL;
  }

  // reverse intersection of both sorted arrays
  int priolist[NUM_PRIO]={0,};
  int iA=numTables-1,iB=sizeof(otf_tagorder_win)/sizeof(otf_tagorder_win[0])-1;
  int ret=numTables-1;
  while ( (iA>=0)&&(iB>=0) ) {
    if (tables[iA].tag==otf_tagorder_win[iB].tag) {
      priolist[otf_tagorder_win[iB--].prio]=1+iA--;
    } else if (tables[iA].tag>otf_tagorder_win[iB].tag) { // no order known: put unchanged at end of result
      order[ret--]=iA--;
    } else { // <
      iB--;
    }
  }
  while (iA>=0) {
    order[ret--]=iA--;
  }
  for (iA=NUM_PRIO-1;iA>=0;iA--) { // pick the matched tables up in sorted order (bucketsort principle)
    if (priolist[iA]) {
      order[ret--]=priolist[iA]-1;
    }
  }
  return order;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movslq %esi, %rdi
shlq $0x2, %rdi
callq 0x21c0
testq %rax, %rax
je 0x8ef3
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
leal -0x1(%r14), %ecx
testl %r14d, %r14d
jle 0x8ead
movl $0x13, %esi
leaq 0x2ece(%rip), %rdi      # 0xbd30
movl %ecx, %edx
movl %edx, %r8d
leaq (%r8,%r8,4), %r9
shlq $0x4, %r9
movl %esi, %r8d
movl 0x4(%rdi,%r8,8), %r10d
cmpq %r10, (%rbx,%r9)
jne 0x8e92
leal -0x1(%rdx), %r9d
incl %edx
decl %esi
movslq (%rdi,%r8,8), %r8
movl %edx, (%rsp,%r8,4)
movl %r9d, %edx
jmp 0x8ea3
jbe 0x8ea1
movslq %ecx, %r8
decl %ecx
movl %edx, (%rax,%r8,4)
decl %edx
jmp 0x8ea3
decl %esi
testl %edx, %edx
js 0x8eaf
testl %esi, %esi
jns 0x8e64
jmp 0x8eaf
movl %ecx, %edx
testl %edx, %edx
js 0x8ecf
movslq %ecx, %rcx
leaq (%rax,%rcx,4), %rsi
movl %edx, %edi
notl %edi
addl %edi, %ecx
movl %edx, (%rsi)
leal -0x1(%rdx), %edi
addq $-0x4, %rsi
testl %edx, %edx
movl %edi, %edx
jg 0x8ec0
movl $0x13, %edx
movl (%rsp,%rdx,4), %esi
testl %esi, %esi
je 0x8ee5
decl %esi
movslq %ecx, %rdi
decl %ecx
movl %esi, (%rax,%rdi,4)
addq $-0x1, %rdx
jb 0x8ed4
addq $0x58, %rsp
popq %rbx
popq %r14
retq
callq 0x2e88
xorl %eax, %eax
jmp 0x8eeb
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: otf_tagorder_offset_sort
int *otf_tagorder_offset_sort(const OTF_FILE *otf) // {{{
{
  int *order=malloc(sizeof(int)*otf->numTables);
  if (!order) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    return NULL;
  }

  int iA;
  struct _OTF_KV tmp[otf->numTables]; // or tmp=malloc(sizeof(struct _OTF_KV)*otf->numTables); assert(tmp);
  for (iA=0;iA<otf->numTables;iA++) {
    tmp[iA].key=otf->tables[iA].offset;
    tmp[iA].value=iA;
  }
  qsort(tmp,otf->numTables,sizeof(struct _OTF_KV),otf_kv_compare); // qsort_r / qsort_s makes portability hard ...
  for (iA=0;iA<otf->numTables;iA++) {
    order[iA]=tmp[iA].value;
  }
  return order;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movzwl 0x38(%rdi), %r15d
leal (,%r15,4), %edi
callq 0x21c0
testq %rax, %rax
je 0x8fad
movq %rax, %rbx
movq %rsp, %r12
leal 0xf(,%r15,8), %eax
andl $-0x10, %eax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movzwl 0x38(%r14), %esi
testq %rsi, %rsi
je 0x8f6a
movq 0x40(%r14), %rax
addq $0x8, %rax
xorl %ecx, %ecx
movl (%rax), %edx
movl %edx, (%r15,%rcx,8)
movl %ecx, 0x4(%r15,%rcx,8)
incq %rcx
addq $0x14, %rax
cmpq %rcx, %rsi
jne 0x8f53
leaq 0x45(%rip), %rcx        # 0x8fb6
movl $0x8, %edx
movq %r15, %rdi
callq 0x2250
movzwl 0x38(%r14), %eax
testq %rax, %rax
je 0x8f9a
xorl %ecx, %ecx
movl 0x4(%r15,%rcx,8), %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x8f8a
movq %r12, %rsp
movq %rbx, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2eb4
xorl %ebx, %ebx
jmp 0x8f9d
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: otf_action_copy
void otf_action_copy(struct _OTF_WRITE_TABLE *self) // {{{
{
  OTF_FILE *otf=self->copy.otf;
  const OTF_DIRENT *table=otf->tables+self->copy.table_no;

  // get checksum and unpadded length
  self->info.table.tag=self->tag;
  self->info.table.checkSum=table->checkSum;
  self->info.table.offset=0; // later
  self->info.table.length=table->length; // unpadded
  self->info.table.compLength=table->length; // uncompressed

  self->info.data=NULL;
  self->info.load=action_copy_load;
  self->info.free=action_free;
}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x40(%rax), %rax
movslq 0x18(%rdi), %rcx
leaq (%rcx,%rcx,4), %rcx
movl (%rdi), %edx
movl %edx, 0x28(%rdi)
movl 0x4(%rax,%rcx,4), %edx
movl %edx, 0x2c(%rdi)
movl $0x0, 0x30(%rdi)
movl 0xc(%rax,%rcx,4), %edx
movl %edx, 0x34(%rdi)
movl 0xc(%rax,%rcx,4), %eax
movl %eax, 0x38(%rdi)
movq $0x0, 0x20(%rdi)
leaq 0x10(%rip), %rax        # 0x9018
movq %rax, 0x40(%rdi)
leaq 0x5e(%rip), %rax        # 0x9071
movq %rax, 0x48(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: action_copy_load
static int action_copy_load(struct _OTF_WRITE_TABLE *self) // {{{
{
  OTF_FILE *otf=self->copy.otf;
  const OTF_DIRENT *table=otf->tables+self->copy.table_no;

  char *data=otf_read_table(otf,NULL,table);
  if (!data) {
    return -1;
  }

  assert(!self->info.data);
  self->info.data=data;
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movslq 0x18(%rbx), %rax
leaq (%rax,%rax,4), %rdx
shlq $0x2, %rdx
addq 0x40(%rdi), %rdx
xorl %esi, %esi
callq 0x3858
testq %rax, %rax
je 0x904b
cmpq $0x0, 0x20(%rbx)
jne 0x9052
movq %rax, 0x20(%rbx)
xorl %eax, %eax
jmp 0x9050
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
leaq 0x2b7d(%rip), %rdi      # 0xbbd6
leaq 0x2a9d(%rip), %rsi      # 0xbafd
leaq 0x2b80(%rip), %rcx      # 0xbbe7
movl $0xbc, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: otf_action_replace
void otf_action_replace(struct _OTF_WRITE_TABLE *self) // {{{
{
  char *data=self->replace.data;
  int length=self->replace.length;

  // get checksum and unpadded length
  self->info.table.tag=self->tag;
  self->info.table.checkSum=otf_checksum(data,otf_padded(length));
  self->info.table.offset=0; // later
  self->info.table.length=length; // unpadded
  self->info.table.compLength=length; // uncompressed

  assert(data);
  if (otf_padded(length)>length) { // clear padding bytes
    memset(data+length,0,otf_padded(length)-length);
  }
  self->info.data=data;
  self->info.load=NULL;
  self->info.free=action_nop;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movl 0x18(%rdi), %eax
movl (%rdi), %ecx
movl %ecx, 0x28(%rdi)
leal 0x3(%rax), %edx
movl %edx, %ecx
andl $-0x4, %ecx
je 0x90e3
shrl $0x2, %edx
xorl %edi, %edi
xorl %esi, %esi
movl (%r14,%rdi,4), %r8d
bswapl %r8d
addl %r8d, %esi
incq %rdi
cmpl %edi, %edx
jne 0x90d0
jmp 0x90e5
xorl %esi, %esi
movl %esi, 0x2c(%rbx)
movl $0x0, 0x30(%rbx)
movl %eax, 0x34(%rbx)
movl %eax, 0x38(%rbx)
testq %r14, %r14
je 0x912d
subl %eax, %ecx
jle 0x910e
movslq %eax, %rdi
addq %r14, %rdi
movslq %ecx, %rdx
xorl %esi, %esi
callq 0x20c0
movq %r14, 0x20(%rbx)
movq $0x0, 0x40(%rbx)
leaq 0x2b(%rip), %rax        # 0x914c
movq %rax, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2aae(%rip), %rdi      # 0xbbe2
leaq 0x29c2(%rip), %rsi      # 0xbafd
leaq 0x29c8(%rip), %rcx      # 0xbb0a
movl $0x104, %edx            # imm = 0x104
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: action_load_data
static int action_load_data(struct _OTF_WRITE_TABLE *self) // {{{
{
  if (!self->info.data) {
    assert(self->info.load);
    if (!self->info.load) {
      return -1;
    }
    const int res=(*self->info.load)(self);
    if (res<0) {
      return -1;
    }
  }
  return 0;
}

// Assembly:
pushq %rax
cmpq $0x0, 0x20(%rdi)
jne 0x99b5
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x99c0
callq *%rax
testl %eax, %eax
js 0x99b9
xorl %eax, %eax
popq %rcx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x99b7
leaq 0x22be(%rip), %rdi      # 0xbc85
leaq 0x212f(%rip), %rsi      # 0xbafd
leaq 0x22c0(%rip), %rcx      # 0xbc95
movl $0xd9, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/smilingthax[P]libfontembed/sfnt_write.c
// Function: otf_write_compressed_raw
static char *otf_write_compressed_raw(const char *in,unsigned int length,unsigned long *compLength) // {{{
{
  assert(compLength);
#ifdef WOFF_SUPPORT
  *compLength=compressBound(length); // known to be > otf_padded(length)
  char *tmp=malloc(sizeof(char)*(*compLength));
  if (!tmp) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    *compLength=-1;
    return NULL;
  }
  if (compress2((unsigned char *)tmp,compLength,(const unsigned char *)in,length,9)!=Z_OK) {
    fprintf(stderr,"Compression failed\n");
    free(tmp);
    *compLength=-1;
    return NULL;
  }
  if (*compLength<length) {
    return tmp; // compressed
  }
  free(tmp);
#endif
  *compLength=length; // uncompressed
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x9a65
movq %rdx, %rbx
movq %rdi, %r12
movl %esi, %r14d
movq %r14, %rdi
callq 0x2200
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x21c0
testq %rax, %rax
je 0x9a3a
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl $0x9, %r8d
callq 0x20b0
testl %eax, %eax
jne 0x9a41
cmpq %r14, (%rbx)
jb 0x9a56
movq %r15, %rdi
callq 0x21a0
jmp 0x9a50
callq 0x2f35
jmp 0x9a49
movq %r15, %rdi
callq 0x2f0c
movq $-0x1, %r14
movq %r14, (%rbx)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2259(%rip), %rdi      # 0xbcc5
leaq 0x208a(%rip), %rsi      # 0xbafd
leaq 0x2256(%rip), %rcx      # 0xbcd0
movl $0x22, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/rng.c
// Function: randombytes
void randombytes(void *x, size_t l)
{
    static int fd = -1;
    ssize_t n;
    if (fd < 0 && 0 > (fd = open("/dev/urandom", O_RDONLY)))
        exit(1);
    for (size_t i = 0; i < l; i += n)
        if (0 >= (n = read(fd, (char *) x + i, l - i)))
            exit(2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x4eb2(%rip)      # 0x6060
jns 0x11ca
leaq 0x3021(%rip), %rdi      # 0x41d8
xorl %esi, %esi
xorl %eax, %eax
callq 0x1080
movl %eax, 0x4e9a(%rip)      # 0x6060
testl %eax, %eax
js 0x1204
testq %rbx, %rbx
je 0x11f4
xorl %r15d, %r15d
movl 0x4e88(%rip), %edi      # 0x6060
leaq (%r14,%r15), %rsi
movq %rbx, %rdx
subq %r15, %rdx
callq 0x1060
testq %rax, %rax
jle 0x11fa
addq %rax, %r15
cmpq %rbx, %r15
jb 0x11d2
popq %rbx
popq %r14
popq %r15
retq
movl $0x2, %edi
callq 0x1090
movl $0x1, %edi
callq 0x1090
nop
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/mont.c
// Function: xDBLADD
void xDBLADD(proj *R, proj *S, proj const *P, proj const *Q, proj const *PQ, proj const *A)
{
    fp a, b, c, d;

    fp_add3(&a, &Q->x, &Q->z);
    fp_sub3(&b, &Q->x, &Q->z);
    fp_add3(&c, &P->x, &P->z);
    fp_sub3(&d, &P->x, &P->z);
    fp_sq2(&R->x, &c);
    fp_sq2(&S->x, &d);
    fp_mul2(&c, &b);
    fp_mul2(&d, &a);
    fp_sub3(&b, &R->x, &S->x);
    fp_add3(&a, &A->z, &A->z); /* multiplication by 2 */
    fp_mul3(&R->z, &a, &S->x);
    fp_add3(&S->x, &A->x, &a);
    fp_add2(&R->z, &R->z); /* multiplication by 2 */
    fp_mul2(&R->x, &R->z);
    fp_mul2(&S->x, &b);
    fp_sub3(&S->z, &c, &d);
    fp_add2(&R->z, &S->x);
    fp_add3(&S->x, &c, &d);
    fp_mul2(&R->z, &b);
    fp_sq2(&d, &S->z);
    fp_sq2(&b, &S->x);
    fp_mul3(&S->x, &PQ->z, &b);
    fp_mul3(&S->z, &PQ->x, &d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x40(%rcx), %r12
leaq 0xd8(%rsp), %r13
movq %r13, %rdi
movq %rcx, %rsi
movq %r12, %rdx
callq 0x1553
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1567
leaq 0x40(%rbx), %r15
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1553
leaq 0x98(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1567
movq %rbp, %rdi
leaq 0x58(%rsp), %rbx
movq %rbx, %rsi
callq 0x21ea
movq %r14, %rdi
movq %r12, %rsi
callq 0x21ea
movq %rbx, %rdi
leaq 0x18(%rsp), %rbx
movq %rbx, %rsi
callq 0x21e2
movq %r12, %rdi
movq %r13, %rsi
callq 0x21e2
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1567
movq 0x8(%rsp), %rbx
leaq 0x40(%rbx), %rdx
movq %r13, %rdi
movq %rdx, %rsi
callq 0x1553
leaq 0x40(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1609
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1553
movq %r15, %rdi
movq %r15, %rsi
callq 0x155f
movq %rbp, %rdi
movq %r15, %rsi
callq 0x21e2
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x21e2
leaq 0x40(%r14), %rbx
movq %rbx, %rdi
leaq 0x58(%rsp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x1567
movq %r15, %rdi
movq %r14, %rsi
callq 0x155f
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1553
movq %r15, %rdi
leaq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0x21e2
movq %r12, %rdi
movq %rbx, %rsi
callq 0x21ea
movq %r13, %rdi
movq %r14, %rsi
callq 0x21ea
movq 0x10(%rsp), %r15
leaq 0x40(%r15), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x1609
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1609
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/mont.c
// Function: xDBL
void xDBL(proj *Q, proj const *A, proj const *P)
{
    fp a, b, c;
    fp_add3(&a, &P->x, &P->z);
    fp_sq1(&a);
    fp_sub3(&b, &P->x, &P->z);
    fp_sq1(&b);
    fp_sub3(&c, &a, &b);
    fp_add2(&b, &b); fp_add2(&b, &b); /* multiplication by 4 */
    fp_mul2(&b, &A->z);
    fp_mul3(&Q->x, &a, &b);
    fp_add3(&a, &A->z, &A->z); /* multiplication by 2 */
    fp_add2(&a, &A->x);
    fp_mul2(&a, &c);
    fp_add2(&a, &b);
    fp_mul3(&Q->z, &a, &c);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rdx), %rbp
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rbp, %rdx
callq 0x1553
movq %r14, %rdi
callq 0x21f2
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1567
movq %r12, %rdi
callq 0x21f2
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1567
movq %r12, %rdi
movq %r12, %rsi
callq 0x155f
movq %r12, %rdi
movq %r12, %rsi
callq 0x155f
leaq 0x40(%r15), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x21e2
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1609
movq %r14, %rdi
movq %rbp, %rsi
movq %rbp, %rdx
callq 0x1553
movq %r14, %rdi
movq %r15, %rsi
callq 0x155f
movq %r14, %rdi
movq %r13, %rsi
callq 0x21e2
movq %r14, %rdi
movq %r12, %rsi
callq 0x155f
addq $0x40, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1609
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/mont.c
// Function: xADD
void xADD(proj *S, proj const *P, proj const *Q, proj const *PQ)
{
    fp a, b, c, d;
    fp_add3(&a, &P->x, &P->z);
    fp_sub3(&b, &P->x, &P->z);
    fp_add3(&c, &Q->x, &Q->z);
    fp_sub3(&d, &Q->x, &Q->z);
    fp_mul2(&a, &d);
    fp_mul2(&b, &c);
    fp_add3(&c, &a, &b);
    fp_sub3(&d, &a, &b);
    fp_sq1(&c);
    fp_sq1(&d);
    fp_mul3(&S->x, &PQ->z, &c);
    fp_mul3(&S->z, &PQ->x, &d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, (%rsp)
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x40(%rsi), %r12
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0x1553
leaq 0xc8(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1567
leaq 0x40(%rbx), %r13
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1553
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1567
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21e2
movq %rbp, %rdi
movq %r12, %rsi
callq 0x21e2
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1553
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1567
movq %r12, %rdi
callq 0x21f2
movq %r15, %rdi
callq 0x21f2
movq (%rsp), %rbx
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1609
addq $0x40, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1609
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/csidh.c
// Function: csidh_private
__attribute__((visibility("default"))) void csidh_private(private_key *priv)
{
    memset(&priv->e, 0, sizeof(priv->e));
    for (size_t i = 0; i < NUM_PRIMES; ) {
        int8_t buf[64];
        randombytes(buf, sizeof(buf));
        for (size_t j = 0; j < sizeof(buf); ++j) {
            if (buf[j] <= MAX_EXPONENT && buf[j] >= -MAX_EXPONENT) {
                priv->e[i / 2] |= (buf[j] & 0xf) << i % 2 * 4;
                if (++i >= NUM_PRIMES)
                    break;
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, (%rdi)
movq $0x0, 0x1d(%rdi)
xorl %r15d, %r15d
movq %rsp, %r14
movl $0x40, %esi
movq %r14, %rdi
vzeroupper
callq 0x119c
xorl %eax, %eax
movb (%rsp,%rax), %dl
leal 0x5(%rdx), %ecx
cmpb $0xa, %cl
ja 0x3105
andb $0xf, %dl
leal (,%r15,4), %ecx
andb $0x4, %cl
shlb %cl, %dl
movq %r15, %rcx
shrq %rcx
orb %dl, (%rbx,%rcx)
incq %r15
cmpq $0x49, %r15
ja 0x310e
incq %rax
cmpq $0x40, %rax
jne 0x30d8
cmpq $0x4a, %r15
jb 0x30c6
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/csidh.c
// Function: validate
bool validate(public_key const *in)
{
    /* make sure the curve is nonsingular: A^2-4 != 0 */
    {
        ui dummy;
        if (!ui_sub3(&dummy, (ui *) &in->A, &p)) /* returns borrow */
            /* A >= p */
            return false;

        fp fp_pm2;
        fp_set(&fp_pm2, 2);
        if (!memcmp(&in->A, &fp_pm2, sizeof(fp)))
            /* A = 2 */
            return false;

        fp_sub3(&fp_pm2, &fp_0, &fp_pm2);
        if (!memcmp(&in->A, &fp_pm2, sizeof(fp)))
            /* A = -2 */
            return false;
    }

    const proj A = {in->A, fp_1};

    do {
        proj P;
        fp_random(&P.x);
        P.z = fp_1;

        /* maximal 2-power in p+1 */
        xDBL(&P, &A, &P);
        xDBL(&P, &A, &P);

        bool is_supersingular;
        ui order = ui_1;

        if (validate_rec(&P, &A, 0, NUM_PRIMES, &order, &is_supersingular))
            return is_supersingular;

    /* P didn't have big enough order to prove supersingularity. */
    } while (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %rbx
leaq 0xed7(%rip), %rdx       # 0x4010
leaq 0x150(%rsp), %rdi
movq %rbx, %rsi
callq 0x12a0
testb %al, %al
je 0x32d2
leaq 0xd0(%rsp), %r14
movl $0x2, %esi
movq %r14, %rdi
callq 0x1388
vmovdqu (%rbx), %ymm0
vmovdqu 0x20(%rbx), %ymm1
vpxor (%r14), %ymm0, %ymm0
vpternlogq $0xf6, 0x20(%r14), %ymm1, %ymm0
vptest %ymm0, %ymm0
je 0x32d2
leaq 0xec2(%rip), %rsi       # 0x4050
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %r14, %rdx
vzeroupper
callq 0x1567
vmovdqu (%rbx), %ymm0
vmovdqu 0x20(%rbx), %ymm1
vpxor (%r14), %ymm0, %ymm0
vpternlogq $0xf6, 0x20(%r14), %ymm1, %ymm0
vptest %ymm0, %ymm0
je 0x32d2
vmovups (%rbx), %ymm0
vmovups 0x20(%rbx), %ymm1
leaq 0x150(%rsp), %r14
vmovups %ymm1, 0x20(%r14)
vmovups %ymm0, (%r14)
leaq 0xea8(%rip), %rax       # 0x4090
vmovups (%rax), %ymm0
vmovdqu 0x20(%rax), %ymm1
vmovups %ymm0, 0x70(%rsp)
vmovups %ymm0, 0x40(%r14)
vmovdqu %ymm1, 0x50(%rsp)
vmovdqu %ymm1, 0x60(%r14)
leaq 0x110(%rsp), %rbp
xorl %ebx, %ebx
leaq 0xd0(%rsp), %r15
leaq 0xfc3(%rip), %rax       # 0x41e5
vmovups (%rax), %ymm0
vmovups %ymm0, 0x30(%rsp)
vmovdqu 0x20(%rax), %ymm0
vmovdqu %ymm0, 0x10(%rsp)
leaq 0x90(%rsp), %r12
leaq 0xf(%rsp), %r13
movq %r15, %rdi
vzeroupper
callq 0x2463
vmovups 0x50(%rsp), %ymm0
vmovups %ymm0, 0x20(%rbp)
vmovups 0x70(%rsp), %ymm0
vmovups %ymm0, (%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
vzeroupper
callq 0x26c4
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26c4
vmovups 0x10(%rsp), %ymm0
vmovups %ymm0, 0xb0(%rsp)
vmovdqu 0x30(%rsp), %ymm0
vmovdqu %ymm0, 0x90(%rsp)
movl $0x4a, %ecx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %r8
movq %r13, %r9
vzeroupper
callq 0x32ee
movzbl %bl, %ecx
movzbl 0xf(%rsp), %ebx
testb %al, %al
cmovel %ecx, %ebx
je 0x3244
jmp 0x32d4
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/ioerror[P]csidh-reference-implementation/csidh.c
// Function: csidh
__attribute__((visibility("default"))) bool csidh(public_key *out, public_key const *in, private_key const *priv)
{
    if (!validate(in)) {
        fp_random(&out->A);
        return false;
    }
    action(out, in, priv);
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x311e
movl %eax, %ebx
movq %r15, %rdi
testb %al, %al
je 0x3a25
movq %r12, %rsi
movq %r14, %rdx
callq 0x355d
jmp 0x3a2a
callq 0x2463
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c, unsigned long long *clen,         // Ciphertext out
    const unsigned char *m, unsigned long long mlen,    // Plaintext in
    const unsigned char *ad, unsigned long long adlen,  // AAD in
    const unsigned char *nsec,                          // Secret Nonce in
    const unsigned char *npub,                          // Public Nonce in
    const unsigned char *k)                             // Secret Key in
{
    sbob_t  cb;                         // Local state

    sbob_clr(&cb);                      // Clear state

#if (CRYPTO_KEYBYTES > 0)
    // Secret Key
    sbob_put(&cb, BLNK_KEY, k, CRYPTO_KEYBYTES);
    sbob_fin(&cb, BLNK_KEY);
#endif

#if (CRYPTO_NPUBBYTES > 0)
    // Mix the public seq. number
    sbob_put(&cb, BLNK_NPUB, npub, CRYPTO_NPUBBYTES);
    sbob_fin(&cb, BLNK_NPUB);
#endif

#if (CRYPTO_NSECBYTES > 0)
    // Secret Sequence Number, store at start of c
    sbob_enc(&cb, BLNK_NSEC, c, nsec, CRYPTO_NSECBYTES);
    sbob_fin(&cb, BLNK_NSEC);
    c += CRYPTO_NSEC_BYTES:
#endif

    // Associated Data
    sbob_put(&cb, BLNK_AAD, ad, (size_t) adlen);
    sbob_fin(&cb, BLNK_AAD);

    // Encrypt Message
    sbob_enc(&cb, BLNK_MSG, c, m, (size_t) mlen);
    sbob_fin(&cb, BLNK_MSG);
    c += mlen;

#if (SBOB_MACSIZE > 0)
    sbob_get(&cb, BLNK_MAC, c, SBOB_MACSIZE);
    //sbob_fin(&cb, BLNK_MAC);          // Required if MAC-and-Continue
#endif
    sbob_clr(&cb);                      // Clear sensitive data

    *clen = mlen + CRYPTO_ABYTES;       // store length

    return 0;                           // Success.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, (%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movq 0xa0(%rsp), %r13
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x1050
movl $0x18, %ecx
movq %r15, %rdi
movl $0x10, %esi
movq %r13, %rdx
callq 0x10d0
movq %r15, %rdi
movl $0x10, %esi
callq 0x10b0
movl $0x10, %ecx
movq %r15, %rdi
movl $0x20, %esi
movq 0x98(%rsp), %rdx
callq 0x10d0
movq %r15, %rdi
movl $0x20, %esi
callq 0x10b0
movq %r15, %rdi
movl $0x40, %esi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x10d0
movq %r15, %rdi
movl $0x40, %esi
callq 0x10b0
movq %r15, %rdi
movl $0x50, %esi
movq %r12, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x1070
movq %r15, %rdi
movl $0x50, %esi
callq 0x10b0
addq %rbx, %r12
movl $0x10, %ecx
movq %r15, %rdi
movl $0x60, %esi
movq %r12, %rdx
callq 0x1030
movq %r15, %rdi
callq 0x1050
addq $0x10, %rbx
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m, unsigned long long *outputmlen,   // Plaintext out
    unsigned char *nsec,                                // Secret Nonce out
    const unsigned char *c, unsigned long long clen,    // Ciphertext in
    const unsigned char *ad, unsigned long long adlen,  // AAD in
    const unsigned char *npub,                          // Public Nonce in
    const unsigned char *k)                             // Secret Key in
{
    sbob_t  cb;                         // Local state

    if (clen < CRYPTO_ABYTES)
        return -1;
    clen -= CRYPTO_ABYTES;

    sbob_clr(&cb);                      // Clear state

#if (CRYPTO_KEYBYTES > 0)
    // Secret Key
    sbob_put(&cb, BLNK_KEY, k, CRYPTO_KEYBYTES);
    sbob_fin(&cb, BLNK_KEY);
#endif

#if (CRYPTO_NPUBBYTES > 0)
    // Mix the public seq. number
    sbob_put(&cb, BLNK_NPUB, npub, CRYPTO_NPUBBYTES);
    sbob_fin(&cb, BLNK_NPUB);
#endif

#if (CRYPTO_NSECBYTES > 0)
    // Decrypt Secret Sequence Number, store at start of c
    sbob_dec(&cb, BLNK_NSEC, nsec, c, CRYPTO_NSECBYTES);
    sbob_fin(&cb, BLNK_NSEC);
    c += CRYPTO_NSEC_BYTES:
#endif

    // Associated Data
    sbob_put(&cb, BLNK_AAD, ad, (size_t) adlen);
    sbob_fin(&cb, BLNK_AAD);

    // Decrypt Message
    sbob_dec(&cb, BLNK_MSG, m, c, (size_t) clen);
    sbob_fin(&cb, BLNK_MSG);
    c += clen;

#if (SBOB_MACSIZE > 0)
    if (sbob_cmp(&cb, BLNK_MAC, c, SBOB_MACSIZE) != 0)
        return -1;                      // Authentication Failure
    //sbob_fin(&cb, BLNK_MAC);          // Required if MAC-and-Continue
#endif

    sbob_clr(&cb);                      // Clear sensitive data
    *outputmlen = clen;

    return 0;       // Success.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x10, %r8
jb 0x13cd
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %rbx
movq %rsi, (%rsp)
leaq -0x10(%r8), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x1050
movl $0x18, %ecx
movq %r13, %rdi
movl $0x10, %esi
movq 0xa0(%rsp), %rdx
callq 0x10d0
movq %r13, %rdi
movl $0x10, %esi
callq 0x10b0
movl $0x10, %ecx
movq %r13, %rdi
movl $0x20, %esi
movq 0x98(%rsp), %rdx
callq 0x10d0
movq %r13, %rdi
movl $0x20, %esi
callq 0x10b0
movq %r13, %rdi
movl $0x40, %esi
movq %r14, %rdx
movq 0x90(%rsp), %rcx
callq 0x10d0
movq %r13, %rdi
movl $0x40, %esi
callq 0x10b0
movq %r13, %rdi
movl $0x50, %esi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
movq %r12, %rcx
movq %rbx, %r8
callq 0x1040
movq %r13, %rdi
movl $0x50, %esi
callq 0x10b0
leaq (%r12,%r15), %rdx
addq $-0x10, %rdx
movl $0x10, %ecx
movq %r13, %rdi
movl $0x60, %esi
callq 0x10c0
testl %eax, %eax
jne 0x13cd
leaq 0x10(%rsp), %rdi
callq 0x1050
movq (%rsp), %rax
movq %rbx, (%rax)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_fin
void sbob_fin(sbob_t *sb, sbob_pad_t pad)
{
    // pad
    sb->s.b[sb->l] ^= BLNK_END;
    sb->s.b[SBOB_RATE] ^= pad | BLNK_FIN;

    // compress and zero the buffer
    SBOB_PI(&sb->s);
    sb->l = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x40(%rdi), %rax
xorb $0x1, (%rdi,%rax)
orb $0x2, %sil
xorb %sil, 0x20(%rdi)
callq 0x1080
movl $0x0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_put
void sbob_put(sbob_t *sb, sbob_pad_t pad, const void *in, size_t len)
{
    int j;
    size_t i;

    j = sb->l;
    for (i = 0; i < len; i++) {
        if (j == SBOB_RATE) {
            sb->s.b[SBOB_RATE] ^= pad;
            SBOB_PI(&sb->s);
            j = 0;
        }
        sb->s.b[j++] ^= ((const uint8_t *) in)[i];
    }
    sb->l = j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x40(%rdi), %eax
testq %rcx, %rcx
je 0x145f
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
xorl %r12d, %r12d
cmpl $0x20, %eax
jne 0x144b
xorb %bpl, 0x20(%rbx)
movq %rbx, %rdi
callq 0x1080
xorl %eax, %eax
movb (%r15,%r12), %cl
movslq %eax, %rdx
incl %eax
xorb %cl, (%rbx,%rdx)
incq %r12
cmpq %r12, %r14
jne 0x1438
movl %eax, 0x40(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_get
void sbob_get(sbob_t *sb, sbob_pad_t pad, void *out, size_t len)
{
    int j;
    size_t i;

    j = sb->l;
    for (i = 0; i < len; i++) {
        if (j == SBOB_RATE) {
            sb->s.b[SBOB_RATE] ^= pad;
            SBOB_PI(&sb->s);
            j = 0;
        }
        ((uint8_t *) out)[i] = sb->s.b[j++];
    }
    sb->l = j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x40(%rdi), %eax
testq %rcx, %rcx
je 0x14b0
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
xorl %r12d, %r12d
cmpl $0x20, %eax
jne 0x149c
xorb %bpl, 0x20(%rbx)
movq %rbx, %rdi
callq 0x1080
xorl %eax, %eax
movslq %eax, %rcx
incl %eax
movb (%rbx,%rcx), %cl
movb %cl, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x1489
movl %eax, 0x40(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_cmp
int sbob_cmp(sbob_t *sb, sbob_pad_t pad, const void *in, size_t len)
{
    int j, d;
    size_t i;

    j = sb->l;
    d = 0;
    for (i = 0; i < len; i++) {
        if (j == SBOB_RATE) {
            sb->s.b[SBOB_RATE] ^= pad;
            SBOB_PI(&sb->s);
            j = 0;
        }
        if (d == 0)
            d = ((int) ((const uint8_t *) in)[i]) - ((int) sb->s.b[j]);
        j++;
    }
    sb->l = j;

    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x40(%rdi), %eax
testq %rcx, %rcx
je 0x1513
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpl $0x20, %eax
jne 0x14f3
xorb %bpl, 0x20(%rbx)
movq %rbx, %rdi
callq 0x1080
xorl %eax, %eax
testl %r12d, %r12d
jne 0x1507
movzbl (%r15,%r13), %r12d
movslq %eax, %rcx
movzbl (%rbx,%rcx), %ecx
subl %ecx, %r12d
incl %eax
incq %r13
cmpq %r13, %r14
jne 0x14e0
jmp 0x1516
xorl %r12d, %r12d
movl %eax, 0x40(%rbx)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_enc
void sbob_enc(sbob_t *sb, sbob_pad_t pad,
    void *out, const void *in, size_t len)
{
    int j;
    size_t i;

    j = sb->l;
    for (i = 0; i < len; i++) {
        if (j == SBOB_RATE) {
            sb->s.b[SBOB_RATE] ^= pad;
            SBOB_PI(&sb->s);
            j = 0;
        }
        sb->s.b[j] ^= ((const uint8_t *) in)[i];
        ((uint8_t *) out)[i] = sb->s.b[j++];
    }
    sb->l = j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x40(%rdi), %eax
testq %r8, %r8
je 0x157c
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
xorl %r13d, %r13d
cmpl $0x20, %eax
jne 0x1562
xorb %bpl, 0x20(%rbx)
movq %rbx, %rdi
callq 0x1080
xorl %eax, %eax
cltq
movb (%rbx,%rax), %cl
xorb (%r15,%r13), %cl
movb %cl, (%rbx,%rax)
incl %eax
movb %cl, (%r12,%r13)
incq %r13
cmpq %r13, %r14
jne 0x154f
movl %eax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_finish_test_line_
static void
acutest_finish_test_line_(int result)
{
    if(acutest_tap_) {
        const char* str = (result == 0) ? "ok" : "not ok";

        printf("%s %d - %s\n", str, acutest_current_index_ + 1, acutest_current_test_->name);

        if(result == 0  &&  acutest_timer_) {
            printf("# Duration: ");
            acutest_timer_print_diff_();
            printf("\n");
        }
    } else {
        int color = (result == 0) ? ACUTEST_COLOR_GREEN_INTENSIVE_ : ACUTEST_COLOR_RED_INTENSIVE_;
        const char* str = (result == 0) ? "OK" : "FAILED";
        printf("[ ");
        acutest_colored_printf_(color, "%s", str);
        printf(" ]");

        if(result == 0  &&  acutest_timer_) {
            printf("  ");
            acutest_timer_print_diff_();
        }

        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpb $0x1, 0x7b33(%rip)      # 0xa2e0
jne 0x2801
testl %ebx, %ebx
leaq 0x3e6b(%rip), %rax      # 0x6623
leaq 0x3e60(%rip), %rsi      # 0x661f
cmoveq %rax, %rsi
movl 0x7b3f(%rip), %edx      # 0xa308
incl %edx
movq 0x79b6(%rip), %rax      # 0xa188
movq (%rax), %rcx
leaq 0x3e4a(%rip), %rdi      # 0x6626
xorl %eax, %eax
callq 0x20f0
testl %ebx, %ebx
jne 0x287b
cmpl $0x0, 0x7b1a(%rip)      # 0xa30c
je 0x287b
leaq 0x3e33(%rip), %rdi      # 0x6632
jmp 0x2861
xorl %ebp, %ebp
testl %ebx, %ebx
sete %bpl
leaq 0x3e2f(%rip), %rax      # 0x663f
leaq 0x3e2b(%rip), %r14      # 0x6642
cmoveq %rax, %r14
xorl $0x5, %ebp
leaq 0x3e24(%rip), %rdi      # 0x6649
xorl %eax, %eax
callq 0x20f0
leaq 0x3e58(%rip), %rsi      # 0x668b
movl %ebp, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x28e6
leaq 0x3e06(%rip), %rdi      # 0x664c
xorl %eax, %eax
callq 0x20f0
testl %ebx, %ebx
jne 0x286d
cmpl $0x0, 0x7ab4(%rip)      # 0xa30c
je 0x286d
leaq 0x38d3(%rip), %rdi      # 0x6134
xorl %eax, %eax
callq 0x20f0
callq 0x494a
movl $0xa, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x2030
popq %rbx
popq %r14
popq %rbp
retq