user: Converte this assembly snippet into its equivalent C code:

```asm
<gen_luts_addr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    %ecx,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%ecx
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  lea    0x0(,%rax,4),%edx
  add    %edx,%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  shl    $0x2,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%ecx
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  sar    %eax
  shl    $0x2,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  lea    0x0(,%rax,4),%edx
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x10,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  shl    $0x2,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  sar    %eax
  shl    $0x2,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  sar    %eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1c,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void gen_luts_addr(int luts_addr[8], int y, int u, int v) {
  luts_addr[0] = ((v + 1) >> 1) + 5 * ((u + 1) >> 1) + 25 * ((y + 1) >> 1);
  luts_addr[1] = ((v) >> 1) + 4 * ((u + 1) >> 1) + 20 * ((y + 1) >> 1);
  luts_addr[2] = ((v + 1) >> 1) + 5 * ((u) >> 1) + 20 * ((y + 1) >> 1);
  luts_addr[3] = ((v) >> 1) + 4 * ((u) >> 1) + 16 * ((y + 1) >> 1);
  luts_addr[4] = ((v + 1) >> 1) + 5 * ((u + 1) >> 1) + 25 * ((y) >> 1);
  luts_addr[5] = ((v) >> 1) + 4 * ((u + 1) >> 1) + 20 * ((y) >> 1);
  luts_addr[6] = ((v + 1) >> 1) + 5 * ((u) >> 1) + 20 * ((y) >> 1);
  luts_addr[7] = ((v) >> 1) + 4 * ((u) >> 1) + 16 * ((y) >> 1);
}
```