user: Translate the below assembly code into C programming language:

```asm
<motion_vector>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %rsi,(%rsp)
  mov    0x50(%rsp),%r15d
  call   <Get_motion_code@plt>
  mov    %eax,%edx
  test   %eax,%eax
  je     L51
  test   %r14d,%r14d
  jne    L85
L51:
  xor    %ecx,%ecx
L97:
  xor    %eax,%eax
  mov    %r15d,%r8d
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <decode_motion_vector@plt>
  test   %r12d,%r12d
  jne    L70
L35:
  xor    %eax,%eax
  call   <Get_motion_code@plt>
  mov    %eax,%edx
  test   %ebp,%ebp
  je     L45
  test   %eax,%eax
  jne    L79
L45:
  xor    %ecx,%ecx
L88:
  lea    0x4(%rbx),%rdi
  test   %r13d,%r13d
  je     L91
  sarl   0x4(%rbx)
  mov    %r15d,%r8d
  mov    %ebp,%esi
  xor    %eax,%eax
  call   <decode_motion_vector@plt>
  shll   0x4(%rbx)
  test   %r12d,%r12d
  jne    L104
L49:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L91:
  xor    %eax,%eax
  mov    %r15d,%r8d
  mov    %ebp,%esi
  call   <decode_motion_vector@plt>
  test   %r12d,%r12d
  je     L49
L104:
  xor    %eax,%eax
  call   <Get_dmvector@plt>
  mov    (%rsp),%rbx
  mov    %eax,0x4(%rbx)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L79:
  mov    %eax,0xc(%rsp)
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <Get_Bits@plt>
  mov    0xc(%rsp),%edx
  mov    %eax,%ecx
  jmp    L88
  nopl   (%rax)
L85:
  mov    %eax,0xc(%rsp)
  mov    %r14d,%edi
  xor    %eax,%eax
  call   <Get_Bits@plt>
  mov    0xc(%rsp),%edx
  mov    %eax,%ecx
  jmp    L97
  nopl   0x0(%rax)
L70:
  xor    %eax,%eax
  call   <Get_dmvector@plt>
  mov    (%rsp),%rsi
  mov    %eax,(%rsi)
  jmp    L35
```

assistant: ```c
void motion_vector(signed int *PMV, signed int *dmvector, signed int h_r_size, signed int v_r_size, signed int dmv, signed int mvscale, signed int full_pel_vector) {
  signed int motion_code;
  signed int motion_residual;
  motion_code = Get_motion_code();
  unsigned int tmp_if_expr$2;
  unsigned int return_value_Get_Bits$1;
  if (!(h_r_size == 0)) {
    if (motion_code == 0)
      goto __CPROVER_DUMP_L1;
    return_value_Get_Bits$1 = Get_Bits(h_r_size);
    tmp_if_expr$2 = return_value_Get_Bits$1;
  } else {
  __CPROVER_DUMP_L1:;
    tmp_if_expr$2 = (unsigned int)0;
  }
  motion_residual = (signed int)tmp_if_expr$2;
  decode_motion_vector(&PMV[(signed long int)0], h_r_size, motion_code, motion_residual, full_pel_vector);
  if (!(dmv == 0))
    dmvector[(signed long int)0] = Get_dmvector();
  motion_code = Get_motion_code();
  unsigned int tmp_if_expr$4;
  unsigned int return_value_Get_Bits$3;
  if (!(v_r_size == 0)) {
    if (motion_code == 0)
      goto __CPROVER_DUMP_L4;
    return_value_Get_Bits$3 = Get_Bits(v_r_size);
    tmp_if_expr$4 = return_value_Get_Bits$3;
  } else {
  __CPROVER_DUMP_L4:;
    tmp_if_expr$4 = (unsigned int)0;
  }
  motion_residual = (signed int)tmp_if_expr$4;
  if (!(mvscale == 0))
    PMV[(signed long int)1] = PMV[(signed long int)1] >> 1;
  decode_motion_vector(&PMV[(signed long int)1], v_r_size, motion_code, motion_residual, full_pel_vector);
  if (!(mvscale == 0))
    PMV[(signed long int)1] = PMV[(signed long int)1] << 1;
  if (!(dmv == 0))
    dmvector[(signed long int)1] = Get_dmvector();
}
```