LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_get_width
int otf_get_width(OTF_FILE *otf,unsigned short gid) // {{{  -1 on error
{
  assert(otf);

  if (gid>=otf->numGlyphs) {
    return -1;
  }

  // ensure hmtx is there
  if (!otf->hmtx) {
    if (otf_load_more(otf)!=0) {
      assert(0);
      return -1;
    }
  }

  return get_width_fast(otf,gid);
#if 0
  if (gid>=otf->numberOfHMetrics) {
    return get_USHORT(otf->hmtx+(otf->numberOfHMetrics-1)*2);
    // TODO? lsb=get_SHORT(otf->hmtx+otf->numberOfHMetrics*2+gid*2);  // lsb: left_side_bearing (also in table)
  }
  return get_USHORT(otf->hmtx+gid*4);
  // TODO? lsb=get_SHORT(otf->hmtx+gid*4+2);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4cec
jmp 0x4d0b
leaq 0x9345(%rip), %rdi      # 0xe038
leaq 0x9d95(%rip), %rsi      # 0xea8f
movl $0x317, %edx            # imm = 0x317
leaq 0x98a8(%rip), %rcx      # 0xe5ae
callq 0x2100
movzwl -0x12(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x4c(%rcx), %ecx
cmpl %ecx, %eax
jl 0x4d24
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4d6e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x4d5e
movq -0x10(%rbp), %rdi
callq 0x4710
cmpl $0x0, %eax
je 0x4d5c
leaq 0x9fbc(%rip), %rdi      # 0xed00
leaq 0x9d44(%rip), %rsi      # 0xea8f
movl $0x320, %edx            # imm = 0x320
leaq 0x9857(%rip), %rcx      # 0xe5ae
callq 0x2100
jmp 0x4d5e
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0x4d80
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_bsearch
static char *otf_bsearch(char *table, // {{{
                         const char *target,int len,
                         int searchRange,
                         int entrySelector,
                         int rangeShift,
                         int lower_bound) // return lower_bound, if !=0
{
  char *ret=table+rangeShift;
  if (memcmp(target,ret,len)<0) {
    ret=table;
  }

  for (;entrySelector>0;entrySelector--) {
    searchRange>>=1;
    ret+=searchRange;
    if (memcmp(target,ret,len)<0) {
      ret-=searchRange;
    }
  }
  const int result=memcmp(target,ret,len);
  if (result==0) {
    return ret;
  } else if (lower_bound) {
    if (result>0) {
      return ret+searchRange;
    }
    return ret;
  }
  return NULL; // not found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x20b0
cmpl $0x0, %eax
jge 0x553e
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5540
cmpl $0x0, -0x24(%rbp)
jle 0x5598
movl -0x20(%rbp), %eax
sarl %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x20b0
cmpl $0x0, %eax
jge 0x558b
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x558d
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5540
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x20b0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x55bc
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x55ed
cmpl $0x0, 0x10(%rbp)
je 0x55e3
cmpl $0x0, -0x34(%rbp)
jle 0x55d9
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x55ed
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x55ed
jmp 0x55e5
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_get_ttc_start
static int otf_get_ttc_start(OTF_FILE *otf,int use_ttc) // {{{
{
  char buf[4];

  if (!otf->numTTC) { // >0 if TTC...
    return 0;
  }

  int pos=0;
  if ( (use_ttc<0)||(use_ttc>=otf->numTTC)||
       (!otf_read(otf,buf,pos+12+4*use_ttc,4)) ) {
    fprintf(stderr,"Bad TTC subfont number\n");
    return -1;
  }
  return get_ULONG(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x5622
movl $0x0, -0x4(%rbp)
jmp 0x5691
movl $0x0, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x5664
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x5664
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
addl $0xc, %eax
movl -0x14(%rbp), %ecx
shll $0x2, %ecx
addl %ecx, %eax
movslq %eax, %rdx
movl $0x4, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x5685
movq 0xd975(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0x9183(%rip), %rsi      # 0xe7f8
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5691
leaq -0x18(%rbp), %rdi
callq 0x3540
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load_woff_directory
static int otf_load_woff_directory(OTF_FILE *otf,int pos) // {{{
{
  int iA;
  char buf[20];

  for (iA=0;iA<otf->numTables;iA++) {
    if (!otf_read(otf,buf,pos,20)) {
      return -1;
    }
    otf->tables[iA].tag=get_ULONG(buf);
    otf->tables[iA].offset=get_ULONG(buf+4);
    otf->tables[iA].compLength=get_ULONG(buf+8);
    otf->tables[iA].length=get_ULONG(buf+12);
    otf->tables[iA].checkSum=get_ULONG(buf+16);
    pos+=20;
  }
  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x57bc
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movl $0x14, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x56f1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x57c2
leaq -0x30(%rbp), %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
addq $0x4, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
leaq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
leaq -0x30(%rbp), %rdi
addq $0xc, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
leaq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x56b6
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load_directory
static int otf_load_directory(OTF_FILE *otf,int pos) // {{{
{
  int iA;
  char buf[16];

  for (iA=0;iA<otf->numTables;iA++) {
    if (!otf_read(otf,buf,pos,16)) {
      return -1;
    }
    otf->tables[iA].tag=get_ULONG(buf);
    otf->tables[iA].checkSum=get_ULONG(buf+4);
    otf->tables[iA].offset=get_ULONG(buf+8);
    otf->tables[iA].length=get_ULONG(buf+12);
    otf->tables[iA].compLength=otf->tables[iA].length;
    pos+=16;
  }
  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x58f3
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movl $0x10, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x5821
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x58f9
leaq -0x30(%rbp), %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
addq $0x4, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
leaq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
leaq -0x30(%rbp), %rdi
addq $0xc, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x57e6
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed.c
// Function: emb_close
void emb_close(EMB_PARAMS *emb) // {{{
{
  if (emb) {
    free(emb->subset);
    if (emb->plan&EMB_A_CLOSE_FONTFILE) {
      fontfile_close(emb->font);
    }
    free(emb);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5db7
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x5dae
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xa290
movq -0x8(%rbp), %rdi
callq 0x21b0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed.c
// Function: copy_file
static inline int copy_file(FILE *f,OUTPUT_FN output,void *context) // {{{
{
  assert(f);
  assert(output);

  char buf[4096];
  int iA,ret=0;

  ret=0;
  rewind(f);
  do {
    iA=fread(buf,1,4096,f);
    (*output)(buf,iA,context);
    ret+=iA;
  } while (iA>0);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6240
jmp 0x625f
leaq 0x7e1e(%rip), %rdi      # 0xe065
leaq 0x8680(%rip), %rsi      # 0xe8ce
movl $0xc, %edx
leaq 0x87d0(%rip), %rcx      # 0xea2a
callq 0x2100
cmpq $0x0, -0x10(%rbp)
je 0x6268
jmp 0x6287
leaq 0x87e4(%rip), %rdi      # 0xea53
leaq 0x8658(%rip), %rsi      # 0xe8ce
movl $0xd, %edx
leaq 0x87a8(%rip), %rcx      # 0xea2a
callq 0x2100
movl $0x0, -0x1028(%rbp)
movl $0x0, -0x1028(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2050
leaq -0x1020(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x21f0
movl %eax, -0x1024(%rbp)
movq -0x10(%rbp), %rax
leaq -0x1020(%rbp), %rdi
movl -0x1024(%rbp), %esi
movq -0x18(%rbp), %rdx
callq *%rax
movl -0x1024(%rbp), %eax
addl -0x1028(%rbp), %eax
movl %eax, -0x1028(%rbp)
cmpl $0x0, -0x1024(%rbp)
jg 0x62a4
movl -0x1028(%rbp), %eax
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_sfnt.c
// Function: emb_otf_get_rights
EMB_RIGHT_TYPE emb_otf_get_rights(OTF_FILE *otf) // {{{
{
  EMB_RIGHT_TYPE ret=EMB_RIGHT_FULL;

  int len;
  char *os2=otf_get_table(otf,OTF_TAG('O','S','/','2'),&len);
  if (os2) {
    const unsigned short os2_version=get_USHORT(os2);
    // check len
    assert( (os2_version!=0x0000)||(len==78) );
    assert( (os2_version!=0x0001)||(len==86) );
    assert( (os2_version<0x0002)||(os2_version>0x0004)||(len==96) );
    if (os2_version<=0x0004) {
      // get rights
      unsigned short fsType=get_USHORT(os2+8);
      // from Adobe's Fontpolicies_v9.pdf, pg 13:
      if (fsType==0x0002) {
        ret=EMB_RIGHT_NONE;
      } else {
        ret=fsType&0x0300; // EMB_RIGHT_BITMAPONLY, EMB_RIGHT_NO_SUBSET
        if ((fsType&0x000c)==0x0004) {
          ret|=EMB_RIGHT_READONLY;
        }
      }
    }
    free(os2);
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4f532f32, %esi       # imm = 0x4F532F32
leaq -0x10(%rbp), %rdx
callq 0x4000
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6444
movq -0x18(%rbp), %rdi
callq 0x6450
movw %ax, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
cmpl $0x0, %eax
jne 0x6360
cmpl $0x4e, -0x10(%rbp)
jne 0x6362
jmp 0x6381
leaq 0x86ff(%rip), %rdi      # 0xea68
leaq 0x8719(%rip), %rsi      # 0xea89
movl $0x14, %edx
leaq 0x871a(%rip), %rcx      # 0xea96
callq 0x2100
movzwl -0x1a(%rbp), %eax
cmpl $0x1, %eax
jne 0x6390
cmpl $0x56, -0x10(%rbp)
jne 0x6392
jmp 0x63b1
leaq 0x872b(%rip), %rdi      # 0xeac4
leaq 0x86e9(%rip), %rsi      # 0xea89
movl $0x15, %edx
leaq 0x86ea(%rip), %rcx      # 0xea96
callq 0x2100
movzwl -0x1a(%rbp), %eax
cmpl $0x2, %eax
jl 0x63c9
movzwl -0x1a(%rbp), %eax
cmpl $0x4, %eax
jg 0x63c9
cmpl $0x60, -0x10(%rbp)
jne 0x63cb
jmp 0x63ea
leaq 0x8713(%rip), %rdi      # 0xeae5
leaq 0x86b0(%rip), %rsi      # 0xea89
movl $0x16, %edx
leaq 0x86b1(%rip), %rcx      # 0xea96
callq 0x2100
movzwl -0x1a(%rbp), %eax
cmpl $0x4, %eax
jg 0x643b
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x6450
movw %ax, -0x1c(%rbp)
movzwl -0x1c(%rbp), %eax
cmpl $0x2, %eax
jne 0x6416
movl $0x2, -0xc(%rbp)
jmp 0x6439
movzwl -0x1c(%rbp), %eax
andl $0x300, %eax            # imm = 0x300
movl %eax, -0xc(%rbp)
movzwl -0x1c(%rbp), %eax
andl $0xc, %eax
cmpl $0x4, %eax
jne 0x6437
movl -0xc(%rbp), %eax
orl $0x4, %eax
movl %eax, -0xc(%rbp)
jmp 0x6439
jmp 0x643b
movq -0x18(%rbp), %rdi
callq 0x21b0
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_sfnt.c
// Function: emb_otf_get_pdf_cidwidths
EMB_PDF_FONTWIDTHS *emb_otf_get_pdf_cidwidths(OTF_FILE *otf,const BITSET glyphs) // {{{ // glyphs==NULL -> output all
{
  assert(otf);

  // ensure hmtx is there
  if (!otf->hmtx) {
    if (otf_load_more(otf)!=0) {
      assert(0);
      return NULL;
    }
  }
//  int dw=emb_otf_pdf_glyphwidth(otf,0); // e.g.
  int dw=-1; // let them estimate

  return emb_pdf_fw_cidwidths(glyphs,otf->numGlyphs,dw,emb_otf_pdf_glyphwidth,otf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7249
jmp 0x7268
leaq 0x6de8(%rip), %rdi      # 0xe038
leaq 0x7832(%rip), %rsi      # 0xea89
movl $0x129, %edx            # imm = 0x129
leaq 0x7b2e(%rip), %rcx      # 0xed91
callq 0x2100
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x72a2
movq -0x8(%rbp), %rdi
callq 0x4710
cmpl $0x0, %eax
je 0x72a0
leaq 0x7a78(%rip), %rdi      # 0xed00
leaq 0x77fa(%rip), %rsi      # 0xea89
movl $0x12e, %edx            # imm = 0x12E
leaq 0x7af6(%rip), %rcx      # 0xed91
callq 0x2100
jmp 0x72a2
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x4c(%rax), %esi
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %r8
leaq 0xd(%rip), %rcx         # 0x72d0
callq 0x8970
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_sfnt.c
// Function: get_glyphname
static const char *get_glyphname(const char *post,unsigned short *to_unicode,int charcode,unsigned short gid) // {{{ if charcode==0 -> force gid to be used
{
  if (gid==0) {
    return ".notdef";
  }
  const char *postName=emb_otf_get_post_name(post,gid);
  if (postName) {
    return postName;
  }
  static char ret[255];
  if (charcode) {
    if (to_unicode) { // i.e. encoding was there
      charcode=to_unicode[charcode];
      // TODO!? to_unicode should be able to represent more than one unicode character?
      // TODO for additional credit: for ligatures, etc  create /f_f /uni12341234  or the like
    }
    const char *aglname=aglfn13(charcode); // TODO? special case ZapfDingbats?
    if (aglname) {
      return aglname;
    }
    snprintf(ret,250,"uni%04X",charcode); // allows extraction
  } else {
    snprintf(ret,250,"c%d",gid);  // last resort: only by gid
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %cx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movw %ax, -0x1e(%rbp)
movzwl -0x1e(%rbp), %eax
cmpl $0x0, %eax
jne 0x7d73
leaq 0x72bf(%rip), %rax      # 0xf029
movq %rax, -0x8(%rbp)
jmp 0x7e1c
movq -0x10(%rbp), %rdi
movzwl -0x1e(%rbp), %esi
callq 0x8020
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7d98
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7e1c
cmpl $0x0, -0x1c(%rbp)
je 0x7df3
cmpq $0x0, -0x18(%rbp)
je 0x7db4
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movzwl %ax, %edi
callq 0xa2d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x7dd4
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7e1c
movl -0x1c(%rbp), %ecx
leaq 0xb492(%rip), %rdi      # 0x13270
movl $0xfa, %esi
leaq 0x7247(%rip), %rdx      # 0xf031
movb $0x0, %al
callq 0x2220
jmp 0x7e11
movzwl -0x1e(%rbp), %ecx
leaq 0xb472(%rip), %rdi      # 0x13270
movl $0xfa, %esi
leaq 0x722f(%rip), %rdx      # 0xf039
movb $0x0, %al
callq 0x2220
leaq 0xb458(%rip), %rax      # 0x13270
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_pdf.c
// Function: emb_pdf_fw_new
EMB_PDF_FONTWIDTHS *emb_pdf_fw_new(int datasize) // {{{
{
  assert(datasize>=0);
  EMB_PDF_FONTWIDTHS *ret=calloc(1,sizeof(EMB_PDF_FONTWIDTHS)+datasize*sizeof(int));
  if (!ret) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    assert(0);
    return NULL;
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x88d3
jmp 0x88f2
leaq 0x6881(%rip), %rdi      # 0xf15b
leaq 0x678f(%rip), %rsi      # 0xf070
movl $0xcf, %edx
leaq 0x687a(%rip), %rcx      # 0xf167
callq 0x2100
movslq -0x4(%rbp), %rsi
shlq $0x2, %rsi
addq $0x20, %rsi
movl $0x1, %edi
callq 0x2110
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8961
movq 0xa6c6(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x18(%rbp), %rdi
movq %rax, %rdx
leaq 0x5a21(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
leaq 0x63b7(%rip), %rdi      # 0xed00
leaq 0x6720(%rip), %rsi      # 0xf070
movl $0xd3, %edx
leaq 0x680b(%rip), %rcx      # 0xf167
callq 0x2100
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_pdf.c
// Function: emb_pdf_fontwidths
EMB_PDF_FONTWIDTHS *emb_pdf_fontwidths(EMB_PARAMS *emb) // {{{
{
  assert(emb);

  if ( (emb->intype==EMB_FMT_TTF)||(emb->intype==EMB_FMT_OTF) ) {
    assert(emb->font->sfnt);
    if (emb->plan&EMB_A_MULTIBYTE) {
      return emb_otf_get_pdf_cidwidths(emb->font->sfnt,emb->subset);
    } else {
      return emb_otf_get_pdf_widths(emb->font->sfnt,/*encoding*/NULL,emb->font->sfnt->numGlyphs,emb->subset); // TODO: encoding
    }
  } else {
    fprintf(stderr,"NOT IMPLEMENTED\n");
    assert(0);
    return NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8e45
jmp 0x8e64
leaq 0x5488(%rip), %rdi      # 0xe2d4
leaq 0x621d(%rip), %rsi      # 0xf070
movl $0x151, %edx            # imm = 0x151
leaq 0x63ad(%rip), %rcx      # 0xf20c
callq 0x2100
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x8e7a
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x8f07
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, (%rax)
je 0x8e8a
jmp 0x8ea9
leaq 0x5b78(%rip), %rdi      # 0xea09
leaq 0x61d8(%rip), %rsi      # 0xf070
movl $0x154, %edx            # imm = 0x154
leaq 0x6368(%rip), %rcx      # 0xf20c
callq 0x2100
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8ed6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x7230
movq %rax, -0x8(%rbp)
jmp 0x8f3e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movzwl 0x4c(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x6f00
movq %rax, -0x8(%rbp)
jmp 0x8f3e
movq 0xa0d2(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0x5b01(%rip), %rsi      # 0xea19
movb $0x0, %al
callq 0x21e0
leaq 0x5dda(%rip), %rdi      # 0xed00
leaq 0x6143(%rip), %rsi      # 0xf070
movl $0x15c, %edx            # imm = 0x15C
leaq 0x62d3(%rip), %rcx      # 0xf20c
callq 0x2100
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_pdf.c
// Function: emb_pdf_escape_name
static const char *emb_pdf_escape_name(const char *name,int len) // {{{ // - statically allocated buffer
{
  assert(name);
  if (len==-1) {
    len=strlen(name);
  }
  assert(len<=127); // pdf implementation limit

  static char buf[128*3];
  int iA,iB;
  const char hex[]="0123456789abcdef";

  for (iA=0,iB=0;iA<len;iA++,iB++) {
    if ( ((unsigned char)name[iA]<33)||((unsigned char)name[iA]>126)||
         (strchr("#()<>[]{}/%",name[iA])) ) {
      buf[iB]='#';
      buf[++iB]=hex[(name[iA]>>4)&0x0f];
      buf[++iB]=hex[name[iA]&0xf];
    } else {
      buf[iB]=name[iA];
    }
  }
  buf[iB]=0;
  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9468
jmp 0x9487
leaq 0x6166(%rip), %rdi      # 0xf5d5
leaq 0x5bfa(%rip), %rsi      # 0xf070
movl $0x29, %edx
leaq 0x627e(%rip), %rcx      # 0xf700
callq 0x2100
cmpl $-0x1, -0xc(%rbp)
jne 0x9499
movq -0x8(%rbp), %rdi
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jg 0x94a1
jmp 0x94c0
leaq 0x628b(%rip), %rdi      # 0xf733
leaq 0x5bc1(%rip), %rsi      # 0xf070
movl $0x2d, %edx
leaq 0x6245(%rip), %rcx      # 0xf700
callq 0x2100
movq 0x6289(%rip), %rax      # 0xf750
movq %rax, -0x30(%rbp)
movq 0x6286(%rip), %rax      # 0xf758
movq %rax, -0x28(%rbp)
movb 0x6284(%rip), %al       # 0xf760
movb %al, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x95d5
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x21, %eax
jl 0x9539
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7e, %eax
jg 0x9539
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %esi
leaq 0x620e(%rip), %rdi      # 0xf73c
callq 0x2080
cmpq $0x0, %rax
je 0x95a3
movslq -0x14(%rbp), %rcx
leaq 0x9f4c(%rip), %rax      # 0x13490
movb $0x23, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0xf, %eax
cltq
movb -0x30(%rbp,%rax), %dl
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movslq %eax, %rcx
leaq 0x9f1d(%rip), %rax      # 0x13490
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0xf, %eax
cltq
movb -0x30(%rbp,%rax), %dl
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movslq %eax, %rcx
leaq 0x9ef2(%rip), %rax      # 0x13490
movb %dl, (%rax,%rcx)
jmp 0x95bc
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb (%rax,%rcx), %dl
movslq -0x14(%rbp), %rcx
leaq 0x9ed7(%rip), %rax      # 0x13490
movb %dl, (%rax,%rcx)
jmp 0x95be
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x94ed
movslq -0x14(%rbp), %rcx
leaq 0x9eb0(%rip), %rax      # 0x13490
movb $0x0, (%rax,%rcx)
leaq 0x9ea5(%rip), %rax      # 0x13490
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/embed_pdf.c
// Function: emb_pdf_simple_stdfont
char *emb_pdf_simple_stdfont(EMB_PARAMS *emb) // {{{ - to be freed by user
{
  assert(emb);
  assert(emb->font->stdname);

  char *ret=NULL,*pos;
  int len,size;

  size=300;
  pos=ret=malloc(size);
  if (!ret) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    return NULL;
  }

  len=snprintf(pos,size,
               "<</Type/Font\n"
               "  /Subtype /Type1\n"
               "  /BaseFont /%s\n"
               ">>\n",
//               emb_pdf_get_font_subtype(emb),
               emb->font->stdname);
  NEXT;

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9c25
jmp 0x9c44
leaq 0x46a8(%rip), %rdi      # 0xe2d4
leaq 0x543d(%rip), %rsi      # 0xf070
movl $0x23b, %edx            # imm = 0x23B
leaq 0x595d(%rip), %rcx      # 0xf59c
callq 0x2100
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x9c55
jmp 0x9c74
leaq 0x596b(%rip), %rdi      # 0xf5c7
leaq 0x540d(%rip), %rsi      # 0xf070
movl $0x23c, %edx            # imm = 0x23C
leaq 0x592d(%rip), %rcx      # 0xf59c
callq 0x2100
movq $0x0, -0x18(%rbp)
movl $0x12c, -0x28(%rbp)     # imm = 0x12C
movslq -0x28(%rbp), %rdi
callq 0x21d0
movq %rax, -0x18(%rbp)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9cd4
movq 0x933e(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x4699(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
movq $0x0, -0x8(%rbp)
jmp 0x9d4a
movq -0x20(%rbp), %rdi
movslq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
leaq 0x58eb(%rip), %rdx      # 0xf5da
movb $0x0, %al
callq 0x2220
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x9d07
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x9d26
leaq 0x4ff2(%rip), %rdi      # 0xed00
leaq 0x535b(%rip), %rsi      # 0xf070
movl $0x24f, %edx            # imm = 0x24F
leaq 0x587b(%rip), %rcx      # 0xf59c
callq 0x2100
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/dynstring.c
// Function: dyn_init
int dyn_init(DYN_STRING *ds,int reserve_size) // {{{
{
  assert(ds);
  assert(reserve_size>0);

  ds->len=0;
  ds->alloc=reserve_size;
  ds->buf=malloc(ds->alloc+1);
  if (!ds->buf) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    assert(0);
    ds->len=-1;
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9d78
jmp 0x9d97
leaq 0x59e2(%rip), %rdi      # 0xf761
leaq 0x59de(%rip), %rsi      # 0xf764
movl $0xb, %edx
leaq 0x59de(%rip), %rcx      # 0xf770
callq 0x2100
cmpl $0x0, -0xc(%rbp)
jle 0x9d9f
jmp 0x9dbe
leaq 0x59ea(%rip), %rdi      # 0xf790
leaq 0x59b7(%rip), %rsi      # 0xf764
movl $0xc, %edx
leaq 0x59b7(%rip), %rcx      # 0xf770
callq 0x2100
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x21d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x9e48
movq 0x91df(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x18(%rbp), %rdi
movq %rax, %rdx
leaq 0x453a(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
leaq 0x4ed0(%rip), %rdi      # 0xed00
leaq 0x592d(%rip), %rsi      # 0xf764
movl $0x13, %edx
leaq 0x592d(%rip), %rcx      # 0xf770
callq 0x2100
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/dynstring.c
// Function: dyn_free
void dyn_free(DYN_STRING *ds) // {{{
{
  assert(ds);

  ds->len=-1;
  ds->alloc=0;
  free(ds->buf);
  ds->buf=NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9e65
jmp 0x9e84
leaq 0x58f5(%rip), %rdi      # 0xf761
leaq 0x58f1(%rip), %rsi      # 0xf764
movl $0x1d, %edx
leaq 0x5920(%rip), %rcx      # 0xf79f
callq 0x2100
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/dynstring.c
// Function: dyn_ensure
int dyn_ensure(DYN_STRING *ds,int free_space) // {{{
{
  assert(ds);
  assert(free_space);

  if (ds->len<0) {
    return -1;
  }
  if (ds->alloc - ds->len >= free_space) {
    return 0; // done
  }
  ds->alloc+=free_space;
  char *tmp=realloc(ds->buf,ds->alloc+1);
  if (!tmp) {
    ds->len=-1;
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    assert(0);
    return -1;
  }
  ds->buf=tmp;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9ed8
jmp 0x9ef7
leaq 0x5882(%rip), %rdi      # 0xf761
leaq 0x587e(%rip), %rsi      # 0xf764
movl $0x28, %edx
leaq 0x58c9(%rip), %rcx      # 0xf7bb
callq 0x2100
cmpl $0x0, -0x14(%rbp)
je 0x9eff
jmp 0x9f1e
leaq 0x58d7(%rip), %rdi      # 0xf7dd
leaq 0x5857(%rip), %rsi      # 0xf764
movl $0x29, %edx
leaq 0x58a2(%rip), %rcx      # 0xf7bb
callq 0x2100
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jge 0x9f33
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9fee
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
subl (%rcx), %eax
cmpl -0x14(%rbp), %eax
jl 0x9f51
movl $0x0, -0x4(%rbp)
jmp 0x9fee
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x2230
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9fdb
movq -0x10(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x904c(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x43a7(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
leaq 0x4d3d(%rip), %rdi      # 0xed00
leaq 0x579a(%rip), %rsi      # 0xf764
movl $0x36, %edx
leaq 0x57e5(%rip), %rcx      # 0xf7bb
callq 0x2100
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/dynstring.c
// Function: dyn_vprintf
int dyn_vprintf(DYN_STRING *ds,const char *fmt,va_list ap) // {{{
{
  assert(ds);

  int need,len=strlen(fmt)+100;
  va_list va;

  if (dyn_ensure(ds,len)==-1) {
    return -1;
  }

  while (1) {
    va_copy(va,ap);
    need=vsnprintf(ds->buf+ds->len,ds->alloc-ds->len+1,fmt,va);
    va_end(va);
    if (need==-1) {
      len+=100;
    } else if (need>=len) {
      len=need;
    } else {
      ds->len+=need;
      break;
    }
    if (dyn_ensure(ds,len)==-1) {
      return -1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa01d
jmp 0xa03c
leaq 0x573d(%rip), %rdi      # 0xf761
leaq 0x5739(%rip), %rsi      # 0xf764
movl $0x40, %edx
leaq 0x57b1(%rip), %rcx      # 0xf7e8
callq 0x2100
movq -0x18(%rbp), %rdi
callq 0x20a0
addq $0x64, %rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x9ec0
cmpl $-0x1, %eax
jne 0xa069
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa110
jmp 0xa06b
leaq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
subl (%rcx), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x20f0
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rax
cmpl $-0x1, -0x24(%rbp)
jne 0xa0cb
movl -0x28(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x28(%rbp)
jmp 0xa0ea
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0xa0db
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0xa0e8
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xa109
jmp 0xa0ea
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x9ec0
cmpl $-0x1, %eax
jne 0xa104
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa110
jmp 0xa06b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/fontfile.c
// Function: fontfile_open_sfnt
FONTFILE *fontfile_open_sfnt(OTF_FILE *otf) // {{{
{
  if (!otf) {
    assert(0);
    return NULL;
  }
  FONTFILE *ret=calloc(1,sizeof(FONTFILE));

  ret->sfnt=otf;

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xa1f2
leaq 0x4b26(%rip), %rdi      # 0xed00
leaq 0x564b(%rip), %rsi      # 0xf82c
movl $0x13, %edx
leaq 0x564a(%rip), %rcx      # 0xf837
callq 0x2100
movl $0x1, %edi
movl $0x18, %esi
callq 0x2110
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/fontfile.c
// Function: fontfile_open_std
FONTFILE *fontfile_open_std(const char *name) // {{{
{
  assert(name);
  FONTFILE *ret=calloc(1,sizeof(FONTFILE));

  ret->stdname=strdup(name);

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa235
jmp 0xa254
leaq 0x5399(%rip), %rdi      # 0xf5d5
leaq 0x55e9(%rip), %rsi      # 0xf82c
movl $0x20, %edx
leaq 0x5611(%rip), %rcx      # 0xf860
callq 0x2100
movl $0x1, %edi
movl $0x18, %esi
callq 0x2110
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/fontfile.c
// Function: fontfile_close
void fontfile_close(FONTFILE *ff) // {{{
{
  if (ff) {
    otf_close(ff->sfnt);
    // ??? cff_close(ff->cff);
    free(ff->stdname);
    free(ff);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa2c5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3470
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rdi
callq 0x21b0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/frequent.c
// Function: frequent_new
FREQUENT *frequent_new(int size) // {{{ - just free() it
{
  assert(size>0);
  FREQUENT *ret=malloc(sizeof(ret[0])+sizeof(ret->pair[0])*size);
  if (!ret) {
    return NULL;
  }
  ret->size=size;
  ret->czero=0;
  ret->sorted=1;
  int iA;
  for (iA=0;iA<size;iA++) {
    ret->pair[iA].key=INTPTR_MIN;
    ret->pair[iA].count=0;
    ret->pair[iA].zero=0;
  }

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xa2f3
jmp 0xa312
leaq 0x549e(%rip), %rdi      # 0xf798
leaq 0x5589(%rip), %rsi      # 0xf88a
movl $0x11, %edx
leaq 0x5588(%rip), %rcx      # 0xf895
callq 0x2100
movslq -0xc(%rbp), %rdi
shlq $0x4, %rdi
addq $0x10, %rdi
callq 0x21d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa33b
movq $0x0, -0x8(%rbp)
jmp 0xa3cd
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x8(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xa3c5
movq -0x18(%rbp), %rax
addq $0x10, %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa35e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa3f9
jmp 0xa418
leaq 0x54b1(%rip), %rdi      # 0xf8b1
leaq 0x5483(%rip), %rsi      # 0xf88a
movl $0x26, %edx
leaq 0x54a3(%rip), %rcx      # 0xf8b6
callq 0x2100
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xa4aa
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xa476
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x8(%rax)
jmp 0xa512
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0xa49b
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0xa49d
jmp 0xa49f
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa42b
cmpl $0x0, -0x18(%rbp)
jl 0xa505
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
addq $0x10, %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
jmp 0xa512
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa538
jmp 0xa557
leaq 0x5372(%rip), %rdi      # 0xf8b1
leaq 0x5344(%rip), %rsi      # 0xf88a
movl $0x47, %edx
leaq 0x538c(%rip), %rcx      # 0xf8de
callq 0x2100
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0xa589
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
movl $0x10, %edx
leaq 0x54(%rip), %rcx        # 0xa5d0
callq 0x2250
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
cmpl $0x0, -0x14(%rbp)
jl 0xa59a
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jl 0xa5aa
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x8(%rbp)
jmp 0xa5c4
movq -0x10(%rbp), %rax
addq $0x10, %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/./sfnt_int.h
// Function: set_ULONG
static inline void set_ULONG(char *buf,unsigned int val) // {{{
{
  buf[0]=val>>24;
  buf[1]=(val>>16)&0xff;
  buf[2]=(val>>8)&0xff;
  buf[3]=val&0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0xc(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xc(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb90d
jmp 0xb92c
leaq 0x2724(%rip), %rdi      # 0xe038
leaq 0x3fea(%rip), %rsi      # 0xf905
movl $0x166, %edx            # imm = 0x166
leaq 0x416f(%rip), %rcx      # 0xfa96
callq 0x2100
cmpq $0x0, -0x18(%rbp)
je 0xb935
jmp 0xb954
leaq 0x3117(%rip), %rdi      # 0xea53
leaq 0x3fc2(%rip), %rsi      # 0xf905
movl $0x167, %edx            # imm = 0x167
leaq 0x4147(%rip), %rcx      # 0xfa96
callq 0x2100
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0xb9a4
movq -0x10(%rbp), %rdi
movl $0x43464620, %esi       # imm = 0x43464620
leaq -0x24(%rbp), %rdx
callq 0x4000
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xb98b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xba02
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdx
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xba02
movq -0x10(%rbp), %rdi
movl $0x43464620, %esi       # imm = 0x43464620
callq 0x3f20
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
jne 0xb9c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xba02
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x34(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq -0x40(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xba10
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt_subset.c
// Function: copy_block
static int copy_block(FILE *f,long pos,int length,OUTPUT_FN output,void *context) // {{{
{
  assert(f);
  assert(output);

  char buf[4096];
  int iA,ret;

  ret=fseek(f,pos,SEEK_SET);
  if (ret==-1) {
    fprintf(stderr,"Seek failed: %s\n", strerror(errno));
    return -1;
  }
  ret=0;
  while (length>4096) {
    iA=fread(buf,1,4096,f);
    if (iA<4096) {
      return -1;
    }
    (*output)(buf,iA,context);
    ret+=iA;
    length-=iA;
  };
  iA=fread(buf,1,length,f);
  if (iA<length) {
    return -1;
  }
  (*output)(buf,iA,context);
  ret+=iA;

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xba37
jmp 0xba56
leaq 0x2627(%rip), %rdi      # 0xe065
leaq 0x3ec0(%rip), %rsi      # 0xf905
movl $0x144, %edx            # imm = 0x144
leaq 0x40c7(%rip), %rcx      # 0xfb18
callq 0x2100
cmpq $0x0, -0x28(%rbp)
je 0xba5f
jmp 0xba7e
leaq 0x2fed(%rip), %rdi      # 0xea53
leaq 0x3e98(%rip), %rsi      # 0xf905
movl $0x145, %edx            # imm = 0x145
leaq 0x409f(%rip), %rcx      # 0xfb18
callq 0x2100
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x2180
movl %eax, -0x1038(%rbp)
cmpl $-0x1, -0x1038(%rbp)
jne 0xbadd
movq 0x753d(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x1040(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x1040(%rbp), %rdi
movq %rax, %rdx
leaq 0x2c7b(%rip), %rsi      # 0xe745
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xbbc6
movl $0x0, -0x1038(%rbp)
cmpl $0x1000, -0x1c(%rbp)    # imm = 0x1000
jle 0xbb61
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x21f0
movl %eax, -0x1034(%rbp)
cmpl $0x1000, -0x1034(%rbp)  # imm = 0x1000
jge 0xbb28
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xbbc6
movq -0x28(%rbp), %rax
leaq -0x1030(%rbp), %rdi
movl -0x1034(%rbp), %esi
movq -0x30(%rbp), %rdx
callq *%rax
movl -0x1034(%rbp), %eax
addl -0x1038(%rbp), %eax
movl %eax, -0x1038(%rbp)
movl -0x1034(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0xbae7
leaq -0x1030(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x21f0
movl %eax, -0x1034(%rbp)
movl -0x1034(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xbb94
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xbbc6
movq -0x28(%rbp), %rax
leaq -0x1030(%rbp), %rdi
movl -0x1034(%rbp), %esi
movq -0x30(%rbp), %rdx
callq *%rax
movl -0x1034(%rbp), %eax
addl -0x1038(%rbp), %eax
movl %eax, -0x1038(%rbp)
movl -0x1038(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
nopw %cs:(%rax,%rax)