// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa631
jmp 0xa650
leaq 0x3a00(%rip), %rdi      # 0xe038
leaq 0x52c6(%rip), %rsi      # 0xf905
movl $0xc, %edx
leaq 0x52c8(%rip), %rcx      # 0xf913
callq 0x2100
cmpq $0x0, -0x20(%rbp)
je 0xa659
jmp 0xa678
leaq 0x43f3(%rip), %rdi      # 0xea53
leaq 0x529e(%rip), %rsi      # 0xf905
movl $0xd, %edx
leaq 0x52a0(%rip), %rcx      # 0xf913
callq 0x2100
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20e0
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movw 0x38(%rax), %ax
movw %ax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x38(%rax), %eax
imulq $0x50, %rax, %rdi
callq 0x21d0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa6f5
movq 0x891f(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0x3c7a(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7c5
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0xa788
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
leaq 0x18a6(%rip), %rcx      # 0xbff0
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa6fc
movq -0x10(%rbp), %rdi
callq 0xbe40
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x48(%rbp), %rdi
callq 0xc320
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x21b0
movq -0x40(%rbp), %rdi
callq 0x21b0
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop