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

```asm
<putsprite_blend_>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9d,-0x54(%rbp)
  jmp    L38
L143:
  mov    -0x3c(%rbp),%ebx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  addq   $0x4,-0x48(%rbp)
  jmp    L52
L109:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%r12d
  cmp    $0xff,%r12d
  je     L51
  add    %r12d,%ebx
  cmp    -0x54(%rbp),%ebx
  jge    L64
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%r12d
  test   %r12d,%r12d
  jne    L0
  jmp    L52
L0:
  lea    (%rbx,%r12,1),%eax
  test   %eax,%eax
  jg     L99
  add    %r12d,%ebx
  movslq %r12d,%rax
  add    %rax,-0x28(%rbp)
  jmp    L52
L99:
  test   %ebx,%ebx
  jns    L68
  add    %ebx,%r12d
  movslq %ebx,%rax
  neg    %rax
  add    %rax,-0x28(%rbp)
  mov    $0x0,%ebx
L68:
  lea    (%rbx,%r12,1),%eax
  cmp    %eax,-0x54(%rbp)
  jge    L108
  mov    -0x54(%rbp),%eax
  sub    %ebx,%eax
  mov    %eax,%r12d
  jmp    L108
L86:
  movslq %ebx,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%edx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  lea    (%rax,%rax,1),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  movslq %ebx,%rcx
  lea    (%rcx,%rcx,1),%rsi
  mov    -0x38(%rbp),%rcx
  lea    (%rsi,%rcx,1),%r13
  mov    0x10(%rbp),%rcx
  mov    %edx,%esi
  mov    %eax,%edi
  call   *%rcx
  mov    %ax,0x0(%r13)
  sub    $0x1,%r12d
  add    $0x1,%ebx
L108:
  test   %r12d,%r12d
  jg     L86
L52:
  cmp    -0x54(%rbp),%ebx
  jl     L109
  jmp    L128
L51:
  nop
  jmp    L128
L64:
  nop
L128:
  subl   $0x1,-0x40(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rax,-0x38(%rbp)
L38:
  cmpl   $0x0,-0x40(%rbp)
  jg     L143
  nop
  nop
  add    $0x48,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void putsprite_blend_(unsigned short *dest, int x, int *linetab, unsigned short *palette, int h, int screenwidth, unsigned short (*blendfp)(unsigned short, unsigned short)) {
  for (; h > 0; h--, dest += screenwidth) {
    register int lx = x;
    unsigned char *data = ((unsigned char *)linetab) + (*linetab);
    linetab++;
    while (lx < screenwidth) {
      register int count = *data++;
      if (count == 0xFF)
        break;
      lx += count;
      if (lx >= screenwidth)
        break;
      count = *data++;
      if (!count)
        continue;
      if ((lx + count) <= 0) {
        lx += count;
        data += count;
        continue;
      }
      if (lx < 0) {
        count += lx;
        data -= lx;
        lx = 0;
      }
      if ((lx + count) > screenwidth) {
        count = screenwidth - lx;
      }
      for (; count > 0; count--, lx++) {
        dest[lx] = blendfp(palette[*data++], dest[lx]);
      }
    }
  }
}
```