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

```asm
<Thrd_motion_vectors>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdx,%r13
  mov    %r9d,%edx
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  movslq %r8d,%rbx
  lea    0x0(,%rbx,8),%r15
  lea    (%rsi,%r15,1),%r11
  sub    $0x28,%rsp
  mov    0x60(%rsp),%eax
  mov    0x68(%rsp),%ecx
  mov    0x70(%rsp),%r8d
  mov    0x78(%rsp),%r9d
  mov    0x80(%rsp),%r10d
  cmp    $0x1,%edx
  jne    L29
  or     %r9d,%eax
  je     L24
L5:
  push   $0x0
  mov    %r13,%rdx
  mov    %r12d,%edi
  mov    %r11,%rsi
  push   %r10
  xor    %eax,%eax
  call   <Thrd_motion_vector@plt>
  mov    0x0(%rbp,%rbx,8),%eax
  mov    %eax,0x10(%rbp,%rbx,8)
  mov    0x4(%rbp,%rbx,8),%eax
  mov    %eax,0x14(%rbp,%rbx,8)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L29:
  mov    $0x1,%esi
  xor    %eax,%eax
  mov    %r11,0x18(%rsp)
  mov    %r10d,0x14(%rsp)
  mov    %r9d,0x10(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %ecx,(%rsp)
  call   <Thrd_Get_Bits@plt>
  push   $0x0
  mov    0x1c(%rsp),%r10d
  mov    %r13,%rdx
  mov    %eax,(%r14,%rbx,4)
  mov    %r12d,%edi
  xor    %eax,%eax
  push   %r10
  mov    0x20(%rsp),%r9d
  mov    0x1c(%rsp),%r8d
  mov    0x10(%rsp),%ecx
  mov    0x28(%rsp),%rsi
  mov    %r10d,0x24(%rsp)
  call   <Thrd_motion_vector@plt>
  mov    %r12d,%edi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <Thrd_Get_Bits@plt>
  mov    0x24(%rsp),%r10d
  mov    0x10(%rsp),%ecx
  mov    %r13,%rdx
  mov    %eax,0x8(%r14,%rbx,4)
  mov    0x20(%rsp),%r9d
  mov    %r12d,%edi
  xor    %eax,%eax
  mov    %r10d,0x70(%rsp)
  mov    0x1c(%rsp),%r8d
  lea    0x10(%rbp,%r15,1),%rsi
  movl   $0x0,0x78(%rsp)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <Thrd_motion_vector@plt>
  nopl   0x0(%rax)
L24:
  mov    $0x1,%esi
  xor    %eax,%eax
  mov    %r10d,0x18(%rsp)
  mov    %r9d,0x14(%rsp)
  mov    %r8d,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  mov    %r11,(%rsp)
  call   <Thrd_Get_Bits@plt>
  mov    0x18(%rsp),%r10d
  mov    0x14(%rsp),%r9d
  mov    0x10(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  mov    %eax,(%r14,%rbx,4)
  mov    %eax,0x8(%r14,%rbx,4)
  mov    (%rsp),%r11
  jmp    L5
```

assistant: ```c
void Thrd_motion_vectors(signed int t, signed int (*PMV)[2l][2l], signed int *dmvector, signed int (*motion_vertical_field_select)[2l], signed int s, signed int motion_vector_count, signed int mv_format, signed int h_r_size, signed int v_r_size, signed int dmv, signed int mvscale) {
  if (motion_vector_count == 1) {
    if (mv_format == 0) {
      if (dmv == 0) {
        unsigned int return_value_Thrd_Get_Bits$1;
        return_value_Thrd_Get_Bits$1 = Thrd_Get_Bits(t, 1);
        motion_vertical_field_select[(signed long int)0][(signed long int)s] = (signed int)return_value_Thrd_Get_Bits$1;
        motion_vertical_field_select[(signed long int)1][(signed long int)s] = motion_vertical_field_select[(signed long int)0][(signed long int)s];
      }
    }
    Thrd_motion_vector(t, PMV[(signed long int)0][(signed long int)s], dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
    PMV[(signed long int)1][(signed long int)s][(signed long int)0] = PMV[(signed long int)0][(signed long int)s][(signed long int)0];
    PMV[(signed long int)1][(signed long int)s][(signed long int)1] = PMV[(signed long int)0][(signed long int)s][(signed long int)1];
  } else {
    unsigned int return_value_Thrd_Get_Bits$2;
    return_value_Thrd_Get_Bits$2 = Thrd_Get_Bits(t, 1);
    motion_vertical_field_select[(signed long int)0][(signed long int)s] = (signed int)return_value_Thrd_Get_Bits$2;
    Thrd_motion_vector(t, PMV[(signed long int)0][(signed long int)s], dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
    unsigned int return_value_Thrd_Get_Bits$3;
    return_value_Thrd_Get_Bits$3 = Thrd_Get_Bits(t, 1);
    motion_vertical_field_select[(signed long int)1][(signed long int)s] = (signed int)return_value_Thrd_Get_Bits$3;
    Thrd_motion_vector(t, PMV[(signed long int)1][(signed long int)s], dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
  }
}
```