user: Demonstrate the C code that generates the assembly output below:

```asm
<unicode_to_glyphs>:
  endbr64
  push   %rbp
  mov    %rcx,%r10
  mov    %rsp,%rbp
  push   %r15
  movslq %r8d,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %r15,%rbx
  sub    $0x48,%rsp
  mov    %rsi,-0x48(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %rsp,%rcx
  mov    %rdi,-0x50(%rbp)
  mov    %r9d,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0xf(,%r15,4),%rax
  mov    %rax,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L279
L29:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L29
L279:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L46
L19:
  mov    %rax,%rsi
  mov    %rsp,%rcx
  mov    %rax,%rdx
  mov    %rsp,%r12
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L277
L171:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L171
L277:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L146
L123:
  mov    %rax,%rdx
  mov    %rsp,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%r13
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L45
L3:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L3
L45:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L148
  orq    $0x0,-0x8(%rsp,%rdx,1)
L148:
  mov    %r10,%rdi
  mov    %ebx,%esi
  mov    %r10,-0x68(%rbp)
  mov    %rsp,%r14
  call   <unicode_classify@plt>
  mov    -0x68(%rbp),%r10
  mov    %eax,-0x5c(%rbp)
  or     -0x58(%rbp),%eax
  je     L136
  xor    %eax,%eax
  test   %ebx,%ebx
  jle    L99
  nopl   0x0(%rax,%rax,1)
L256:
  mov    %eax,(%r12,%rax,4)
  add    $0x1,%rax
  cmp    %r15,%rax
  jne    L256
L99:
  lea    0x0(,%rbx,4),%r15d
  mov    %r10,%rsi
  mov    %r14,%rdi
  mov    %r15d,%edx
  call   <memcpy@plt>
  mov    %ebx,%r10d
  testb  $0x1,-0x5c(%rbp)
  jne    L160
  testb  $0x2,-0x5c(%rbp)
  jne    L92
L131:
  mov    %r10d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <unicode_ligature@plt>
  mov    %r13,%rdx
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    %eax,-0x5c(%rbp)
  call   <compose_char_to_glyph@plt>
  mov    -0x58(%rbp),%eax
  mov    -0x5c(%rbp),%ecx
  test   %eax,%eax
  jne    L186
L261:
  mov    -0x54(%rbp),%eax
  mov    -0x50(%rbp),%rdi
  mov    %r14,%rsi
  cmp    %eax,%ecx
  mov    %eax,%r13d
  cmovle %ecx,%r13d
  lea    0x0(,%r13,4),%edx
  call   <memcpy@plt>
  cmpq   $0x0,-0x48(%rbp)
  je     L121
  mov    -0x48(%rbp),%rdi
  mov    %r15d,%edx
  mov    %r12,%rsi
  call   <memcpy@plt>
L121:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L70
  lea    -0x28(%rbp),%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L46:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L19
L146:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L123
  cs nopw 0x0(%rax,%rax,1)
L186:
  mov    %ecx,%esi
  mov    %r14,%rdi
  mov    %ecx,-0x58(%rbp)
  call   <bidi_reverse_buf@plt>
  test   %ebx,%ebx
  mov    -0x58(%rbp),%ecx
  jle    L261
  mov    %ebx,%ebx
  lea    -0x1(%rcx),%edi
  mov    %r12,%rax
  lea    (%r12,%rbx,4),%rsi
  nopl   0x0(%rax)
L107:
  mov    %edi,%edx
  sub    (%rax),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L107
  jmp    L261
  nopl   (%rax)
L160:
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <arab_join@plt>
  mov    %eax,%r10d
  testb  $0x2,-0x5c(%rbp)
  je     L131
L92:
  mov    %r10d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <devanagari_log2vis@plt>
  mov    %r13,%rdx
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    %eax,-0x5c(%rbp)
  call   <compose_char_to_glyph@plt>
  mov    -0x5c(%rbp),%r10d
  jmp    L131
L136:
  mov    -0x54(%rbp),%eax
  mov    -0x50(%rbp),%rdi
  mov    %r10,%rsi
  cmp    %eax,%ebx
  mov    %eax,%r13d
  cmovle %ebx,%r13d
  lea    0x0(,%r13,4),%edx
  movslq %r13d,%rbx
  call   <memcpy@plt>
  cmpq   $0x0,-0x48(%rbp)
  je     L121
  test   %r13d,%r13d
  jle    L121
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L56:
  mov    -0x48(%rbp),%rdi
  mov    %eax,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L56
  jmp    L121
L70:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int unicode_to_glyphs(unsigned int *dst, unsigned int *char_to_glyph_pos, int dst_size, unsigned int *src, int src_size, int reverse) {
  int len, i;
  unsigned int ctog[src_size];
  unsigned int ctog1[src_size];
  unsigned int buf[src_size];
  int unicode_class;
  unicode_class = unicode_classify(src, src_size);
  if (unicode_class == 0 && !reverse) {
    len = src_size;
    if (len > dst_size)
      len = dst_size;
    memcpy(dst, src, len * sizeof(unsigned int));
    if (char_to_glyph_pos) {
      for (i = 0; i < len; i++)
        char_to_glyph_pos[i] = i;
    }
    return len;
  } else {
    len = src_size;
    for (i = 0; i < len; i++)
      ctog[i] = i;
    memcpy(buf, src, len * sizeof(int));
    if (unicode_class & 0x00000001) {
      len = arab_join(buf, ctog1, len);
    }
    if (unicode_class & 0x00000002) {
      len = devanagari_log2vis(buf, ctog1, len);
      compose_char_to_glyph(ctog, src_size, ctog1);
    }
    len = unicode_ligature(buf, ctog1, len);
    compose_char_to_glyph(ctog, src_size, ctog1);
    if (reverse) {
      bidi_reverse_buf(buf, len);
      for (i = 0; i < src_size; i++) {
        ctog[i] = len - 1 - ctog[i];
      }
    }
    if (len > dst_size)
      len = dst_size;
    memcpy(dst, buf, len * sizeof(unsigned int));
    if (char_to_glyph_pos) {
      memcpy(char_to_glyph_pos, ctog, src_size * sizeof(unsigned int));
    }
  }
  return len;
}
```