user: What is the c source code of the assembly code below:

```asm
<rbsp_to_nal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  movl   $0x1,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L104
L42:
  mov    -0x8(%rbp),%eax
  lea    0x3(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L64
  mov    -0x4(%rbp),%eax
  lea    0x2(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L64
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L64
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L64
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L51
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x2,%eax
  je     L51
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  jne    L64
L51:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x3,(%rax)
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  add    $0x3,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x4,-0x8(%rbp)
  addl   $0x3,-0x4(%rbp)
  jmp    L104
L64:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x4(%rbp)
  jne    L48
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L48
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x3,(%rax)
  addl   $0x1,-0x8(%rbp)
  jmp    L104
L48:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L104:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jge    L23
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L42
L23:
  mov    -0x30(%rbp),%rax
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void rbsp_to_nal(uint8_t *rbsp_buf, int *rbsp_size, uint8_t *nal_buf, int *nal_size) {
  int i, j;
  i = 1;
  j = 0;
  while (i < *nal_size && j < *rbsp_size) {
    if (i + 3 < *nal_size && j + 2 < *rbsp_size && rbsp_buf[j] == 0x00 && rbsp_buf[j + 1] == 0x00 && (rbsp_buf[j + 2] == 0x01 || rbsp_buf[j + 2] == 0x02 || rbsp_buf[j + 2] == 0x03)) {
      nal_buf[i] = rbsp_buf[j];
      nal_buf[i + 1] = rbsp_buf[j + 1];
      nal_buf[i + 2] = 0x03;
      nal_buf[i + 3] = rbsp_buf[j + 2];
      i += 4;
      j += 3;
    } else if (j == *rbsp_size - 1 && rbsp_buf[j] == 0x00) {
      nal_buf[i] = 0x03;
      i += 1;
    } else {
      nal_buf[i] = rbsp_buf[j];
      i += 1;
      j += 1;
    }
  }
  *nal_size = i;
}
```