// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movzwl 0x38(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x1d(%rbp)
jge 0xa87e
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0xa88a
jmp 0xaa3c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0xa96e
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xa957
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
leaq 0x1709(%rip), %rcx      # 0xbff0
cmpq %rcx, 0x8(%rax)
jne 0xa902
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0xa94e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups 0x40(%rcx), %xmm4
movups %xmm4, 0x40(%rax)
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xaa37
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0xa9a5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xaa35
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xaa2c
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
leaq 0x161f(%rip), %rcx      # 0xbff0
cmpq %rcx, 0x8(%rax)
je 0xaa2c
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0xaa23
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups 0x40(%rcx), %xmm4
movups %xmm4, 0x40(%rax)
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xaa37
jmp 0xa851
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)