// File: /workspace/github_c_makefile_star2_O2/smilingthax[P]libfontembed/test_analyze.c
// Function: show_name
void show_name(OTF_FILE *otf) // {{{
{
  assert(otf);
  int iA,len=0;
  char *buf;

  buf=otf_get_table(otf,OTF_TAG('n','a','m','e'),&len);
  if (!buf) {
    assert(len==-1);
    printf("No name table\n");
    return;
  }
  printf("NAME:\n");
  int name_count=get_USHORT(buf+2);
  const char *nstore=buf+get_USHORT(buf+4);
  for (iA=0;iA<name_count;iA++) {
    const char *nrec=buf+6+12*iA;
    printf("  { platformID/encodingID/languageID/nameID: %d/%d/%d/%d\n"
           "    length: %d, offset: %d, data                       :",
           get_USHORT(nrec),
           get_USHORT(nrec+2),
           get_USHORT(nrec+4),
           get_USHORT(nrec+6),
           get_USHORT(nrec+8),
           get_USHORT(nrec+10));
    if (  (get_USHORT(nrec)==0)||
          ( (get_USHORT(nrec)==3) )  ) { // WCHAR
      int nlen=get_USHORT(nrec+8);
      int npos=get_USHORT(nrec+10);
      for (;nlen>0;nlen-=2,npos+=2) {
        if (nstore[npos]!=0x00) {
          printf("?");
        } else {
          printf("%c",nstore[npos+1]);
        }
      }
      printf(" }\n");
    } else {
      printf("%.*s }\n",
             get_USHORT(nrec+8),nstore+get_USHORT(nrec+10));
    }
  }
  free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x2698
leaq 0x14(%rsp), %rdx
andl $0x0, (%rdx)
movl $0x6e616d65, %esi       # imm = 0x6E616D65
callq 0x39d0
testq %rax, %rax
je 0x2676
movq %rax, %rbx
leaq 0x6f69(%rip), %rdi      # 0x9493
callq 0x2200
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl 0x4(%rbx), %ecx
movzwl %ax, %r13d
rolw $0x8, %cx
movzwl %cx, %eax
leaq (%rbx,%rax), %rcx
movq %rcx, 0x18(%rsp)
addq %rbx, %rax
incq %rax
movq %rax, 0x20(%rsp)
pushq $0x3f
popq %rbp
xorl %r15d, %r15d
cmpq %r13, %r15
je 0x266c
imulq $0xc, %r15, %r14
movzwl 0x6(%rbx,%r14), %eax
movzwl 0x8(%rbx,%r14), %ecx
rolw $0x8, %ax
movzwl %ax, %esi
rolw $0x8, %cx
movzwl %cx, %edx
movzwl 0xa(%rbx,%r14), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movzwl 0xc(%rbx,%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
movzwl 0xe(%rbx,%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r9d
movzwl 0x10(%rbx,%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rsp)
leaq 0x6b2c(%rip), %rdi      # 0x90f3
xorl %eax, %eax
callq 0x2040
movzwl 0x6(%rbx,%r14), %eax
rolw $0x8, %ax
cmpw $0x3, %ax
je 0x25e5
movzwl %ax, %eax
testl %eax, %eax
jne 0x2637
movzwl 0xe(%rbx,%r14), %eax
movzwl 0x10(%rbx,%r14), %ecx
rolw $0x8, %ax
movzwl %ax, %r14d
rolw $0x8, %cx
movzwl %cx, %r12d
addq 0x20(%rsp), %r12
testl %r14d, %r14d
jle 0x2629
cmpb $0x0, -0x1(%r12)
movl %ebp, %edi
jne 0x261a
movsbl (%r12), %edi
callq 0x21d0
addl $-0x2, %r14d
addq $0x2, %r12
jmp 0x2606
leaq 0x6e69(%rip), %rdi      # 0x9499
callq 0x2200
jmp 0x2664
movzwl 0xe(%rbx,%r14), %eax
movzwl 0x10(%rbx,%r14), %ecx
rolw $0x8, %ax
movzwl %ax, %esi
rolw $0x8, %cx
movzwl %cx, %edx
addq 0x18(%rsp), %rdx
leaq 0x6b08(%rip), %rdi      # 0x9165
xorl %eax, %eax
callq 0x2040
incq %r15
jmp 0x2560
movq %rbx, %rdi
callq 0x21a0
jmp 0x2689
cmpl $-0x1, 0x14(%rsp)
jne 0x26b1
leaq 0x6e01(%rip), %rdi      # 0x9485
callq 0x2200
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6965(%rip), %rdi      # 0x9004
leaq 0x6962(%rip), %rsi      # 0x9008
leaq 0x6a2b(%rip), %rcx      # 0x90d8
pushq $0x39
jmp 0x26c8
leaq 0x697a(%rip), %rdi      # 0x9032
leaq 0x6949(%rip), %rsi      # 0x9008
leaq 0x6a12(%rip), %rcx      # 0x90d8
pushq $0x3f
popq %rdx
callq 0x20f0