// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__matches
static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *name, stbtt_int32 flags)
{
   stbtt_int32 nlen = (stbtt_int32) STBTT_strlen((char *) name);
   stbtt_uint32 nm,hd;
   if (!stbtt__isfont(fc+offset)) return 0;

   // check italics/bold/underline flags in macStyle...
   if (flags) {
      hd = stbtt__find_table(fc, offset, "head");
      if ((ttUSHORT(fc+hd+44) & 7) != (flags & 7)) return 0;
   }

   nm = stbtt__find_table(fc, offset, "name");
   if (!nm) return 0;

   if (flags) {
      // if we checked the macStyle flags, then just check the family and ignore the subfamily
      if (stbtt__matchpair(fc, nm, name, nlen, 16, -1))  return 1;
      if (stbtt__matchpair(fc, nm, name, nlen,  1, -1))  return 1;
      if (stbtt__matchpair(fc, nm, name, nlen,  3, -1))  return 1;
   } else {
      if (stbtt__matchpair(fc, nm, name, nlen, 16, 17))  return 1;
      if (stbtt__matchpair(fc, nm, name, nlen,  1,  2))  return 1;
      if (stbtt__matchpair(fc, nm, name, nlen,  3, -1))  return 1;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1070
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
addq %rax, %rdi
callq 0x13a90
cmpl $0x0, %eax
jne 0x13cb2
movl $0x0, -0x4(%rbp)
jmp 0x13e56
cmpl $0x0, -0x24(%rbp)
je 0x13cff
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq 0x379b(%rip), %rdx      # 0x17461
callq 0x6a90
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %eax
addq %rax, %rdi
addq $0x2c, %rdi
callq 0x4990
movzwl %ax, %eax
andl $0x7, %eax
movl -0x24(%rbp), %ecx
andl $0x7, %ecx
cmpl %ecx, %eax
je 0x13cfd
movl $0x0, -0x4(%rbp)
jmp 0x13e56
jmp 0x13cff
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq 0x2c26(%rip), %rdx      # 0x16933
callq 0x6a90
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x13d27
movl $0x0, -0x4(%rbp)
jmp 0x13e56
cmpl $0x0, -0x24(%rbp)
je 0x13dc6
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x10, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x13e60
cmpl $0x0, %eax
je 0x13d61
movl $0x1, -0x4(%rbp)
jmp 0x13e56
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x1, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x13e60
cmpl $0x0, %eax
je 0x13d91
movl $0x1, -0x4(%rbp)
jmp 0x13e56
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x3, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x13e60
cmpl $0x0, %eax
je 0x13dc1
movl $0x1, -0x4(%rbp)
jmp 0x13e56
jmp 0x13e4f
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x10, %r8d
movl $0x11, %r9d
callq 0x13e60
cmpl $0x0, %eax
je 0x13df3
movl $0x1, -0x4(%rbp)
jmp 0x13e56
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x1, %r8d
movl $0x2, %r9d
callq 0x13e60
cmpl $0x0, %eax
je 0x13e20
movl $0x1, -0x4(%rbp)
jmp 0x13e56
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl $0x3, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x13e60
cmpl $0x0, %eax
je 0x13e4d
movl $0x1, -0x4(%rbp)
jmp 0x13e56
jmp 0x13e4f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop