user: 请将以下的汇编代码转换成C语言代码:

```asm
<composite_line_yuv_sse2_simple>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9d,-0x28(%rbp)
  sarl   $0x8,-0x28(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L41
  mov    $0x4,%edx
  jmp    L97
L41:
  mov    $0x0,%edx
L97:
  cmpq   $0x0,-0x30(%rbp)
  je     L25
  mov    $0x2,%eax
  jmp    L117
L25:
  mov    $0x0,%eax
L117:
  add    %eax,%edx
  cmpl   $0x100,-0x28(%rbp)
  setne  %al
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x7,-0x4(%rbp)
  ja     L27
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D16(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D16(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x24(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L27
  mov    -0x28(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <blend_case1@plt>
  jmp    L27
  mov    -0x30(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <blend_case2@plt>
  jmp    L27
  mov    -0x28(%rbp),%edi
  mov    -0x30(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <blend_case3@plt>
  jmp    L27
  mov    -0x24(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    $0xff,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  jmp    L27
  mov    -0x28(%rbp),%edi
  mov    -0x38(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <blend_case5@plt>
  jmp    L27
  mov    -0x38(%rbp),%rdi
  mov    -0x30(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <blend_case6@plt>
  jmp    L27
  mov    -0x28(%rbp),%r8d
  mov    -0x38(%rbp),%rdi
  mov    -0x30(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <blend_case7@plt>
  nop
L27:
  nop
  leave
  ret
```

assistant: ```c
void composite_line_yuv_sse2_simple(uint8_t *dest, uint8_t *src, int width, uint8_t *src_a, uint8_t *dest_a, int weight) {
  weight >>= 8;
  int cond = ((dest_a != NULL) ? 4 : 0) + ((src_a != NULL) ? 2 : 0) + ((weight != 256) ? 1 : 0);
  switch (cond) {
  case 0:
    memcpy(dest, src, 2 * width);
    break;
  case 1:
    blend_case1(dest, src, width, weight);
    break;
  case 2:
    blend_case2(dest, src, width, src_a);
    break;
  case 3:
    blend_case3(dest, src, width, src_a, weight);
    break;
  case 4:
    memcpy(dest, src, 2 * width);
    memset(dest_a, 0xFF, width);
    break;
  case 5:
    blend_case5(dest, src, width, dest_a, weight);
    break;
  case 6:
    blend_case6(dest, src, width, src_a, dest_a);
    break;
  case 7:
    blend_case7(dest, src, width, src_a, dest_a, weight);
    break;
  };
}
```