user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Thrd_motion_vectors>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdx,%r13
  mov    %r9d,%edx
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  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    L1
  or     %r9d,%eax
  je     L0
L22:
  push   $0x0
  mov    %r13,%rdx
  mov    %ebp,%edi
  mov    %r11,%rsi
  push   %r10
  xor    %eax,%eax
  call   <Thrd_motion_vector@plt>
  mov    (%r12,%rbx,8),%rax
  mov    %rax,0x10(%r12,%rbx,8)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L1:
  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    %ebp,%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    %ebp,%edi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <Thrd_Get_Bits@plt>
  mov    0x24(%rsp),%r10d
  mov    0x10(%rsp),%ecx
  mov    %ebp,%edi
  mov    %eax,0x8(%r14,%rbx,4)
  mov    0x20(%rsp),%r9d
  mov    %r13,%rdx
  xor    %eax,%eax
  mov    %r10d,0x70(%rsp)
  mov    0x1c(%rsp),%r8d
  lea    0x10(%r12,%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>
  xchg   %ax,%ax
L0:
  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    L22
```

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);
  }
}
```