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

```asm
<getVankaVariablesOfCell>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbx
  mov    %rdx,%r13
  mov    %rcx,%rbp
  test   %r8,%r8
  je     L42
  cmp    $0x2,%r9
  jne    L51
  mov    (%rdi),%rax
  mov    0x8(%rdi),%rsi
  sub    $0x1,%rsi
  mov    (%rbx),%rdi
  lea    0x1(%rdi),%rdx
  imul   %rsi,%rdx
  lea    (%rax,%rdx,1),%rcx
  add    0x0(%r13),%rax
  sub    %rsi,%rdx
  add    %rdx,%rax
  mov    %rcx,0x0(%rbp)
  add    $0x1,%rcx
  mov    %rcx,0x8(%rbp)
  mov    %rax,0x10(%rbp)
  mov    %rax,%rdx
  add    (%rbx),%rdx
  mov    %rdx,0x18(%rbp)
  add    0x8(%r13),%rax
  mov    %rax,0x20(%rbp)
L17:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L51:
  mov    0x10(%rsi),%rcx
  mov    0x8(%rsi),%rdx
  mov    (%rsi),%rax
  lea    0x1(%rax),%rsi
  call   <loc2cs3D@plt>
  mov    %rax,0x0(%rbp)
  add    $0x1,%rax
  mov    %rax,0x8(%rbp)
  mov    0x0(%r13),%r14
  mov    0x10(%rbx),%rcx
  mov    0x8(%rbx),%rax
  lea    0x1(%rax),%rdx
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <loc2cs3D@plt>
  add    %r14,%rax
  mov    %rax,0x10(%rbp)
  add    (%rbx),%rax
  mov    %rax,0x18(%rbp)
  mov    0x8(%r13),%rax
  add    0x0(%r13),%rax
  mov    %rax,%r14
  mov    0x10(%rbx),%rax
  lea    0x1(%rax),%rcx
  mov    0x8(%rbx),%rdx
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <loc2cs3D@plt>
  add    %r14,%rax
  mov    %rax,0x20(%rbp)
  mov    (%rbx),%rdx
  imul   0x8(%rbx),%rdx
  add    %rax,%rdx
  mov    %rdx,0x28(%rbp)
  add    0x10(%r13),%rax
  mov    %rax,0x30(%rbp)
  jmp    L17
L42:
  cmp    $0x2,%r9
  jne    L2
  mov    (%rdi),%rax
  mov    0x8(%rdi),%rsi
  sub    $0x1,%rsi
  mov    (%rbx),%rdi
  lea    0x1(%rdi),%rdx
  imul   %rsi,%rdx
  lea    (%rax,%rdx,1),%rcx
  add    0x0(%r13),%rax
  sub    %rsi,%rdx
  add    %rdx,%rax
  mov    %rcx,0x0(%rbp)
  add    $0x1,%rcx
  mov    %rcx,0x8(%rbp)
  mov    %rax,0x10(%rbp)
  add    (%rbx),%rax
  mov    %rax,0x18(%rbp)
  jmp    L17
L2:
  mov    0x10(%rsi),%rcx
  mov    0x8(%rsi),%rdx
  mov    (%rsi),%rax
  lea    0x1(%rax),%rsi
  call   <loc2cs3D@plt>
  mov    %rax,0x0(%rbp)
  add    $0x1,%rax
  mov    %rax,0x8(%rbp)
  mov    0x0(%r13),%r14
  mov    0x10(%rbx),%rcx
  mov    0x8(%rbx),%rax
  lea    0x1(%rax),%rdx
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <loc2cs3D@plt>
  add    %r14,%rax
  mov    %rax,0x10(%rbp)
  add    (%rbx),%rax
  mov    %rax,0x18(%rbp)
  mov    0x8(%r13),%rax
  add    0x0(%r13),%rax
  mov    %rax,%r13
  mov    0x10(%rbx),%rax
  lea    0x1(%rax),%rcx
  mov    0x8(%rbx),%rdx
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <loc2cs3D@plt>
  add    %r13,%rax
  mov    %rax,0x20(%rbp)
  mov    (%rbx),%rdx
  imul   0x8(%rbx),%rdx
  add    %rdx,%rax
  mov    %rax,0x28(%rbp)
  jmp    L17
```

assistant: ```c
void getVankaVariablesOfCell(long long *i, long long *n, long long *nf, long long *Idxs, long long includePressure, long long dim) {
  long long t1, t2, t3;
  if (includePressure) {
    if (dim == 2) {
      t1 = i[0] + (i[1] - 1) * (n[0] + 1);
      t2 = nf[0] + i[0] + (i[1] - 1) * n[0];
      Idxs[0] = t1;
      Idxs[1] = t1 + 1;
      Idxs[2] = t2;
      Idxs[3] = t2 + n[0];
      Idxs[4] = nf[1] + t2;
    } else {
      t1 = loc2cs3D(i, n[0] + 1, n[1], n[2]);
      Idxs[0] = t1;
      Idxs[1] = t1 + 1;
      t2 = nf[0] + loc2cs3D(i, n[0], n[1] + 1, n[2]);
      Idxs[2] = t2;
      Idxs[3] = t2 + n[0];
      t3 = nf[0] + nf[1] + loc2cs3D(i, n[0], n[1], n[2] + 1);
      Idxs[4] = t3;
      Idxs[5] = t3 + n[0] * n[1];
      Idxs[6] = nf[2] + t3;
    }
  } else {
    if (dim == 2) {
      t1 = i[0] + (i[1] - 1) * (n[0] + 1);
      t2 = nf[0] + i[0] + (i[1] - 1) * n[0];
      Idxs[0] = t1;
      Idxs[1] = t1 + 1;
      Idxs[2] = t2;
      Idxs[3] = t2 + n[0];
    } else {
      t1 = loc2cs3D(i, n[0] + 1, n[1], n[2]);
      Idxs[0] = t1;
      Idxs[1] = t1 + 1;
      t2 = nf[0] + loc2cs3D(i, n[0], n[1] + 1, n[2]);
      Idxs[2] = t2;
      Idxs[3] = t2 + n[0];
      t3 = nf[0] + nf[1] + loc2cs3D(i, n[0], n[1], n[2] + 1);
      Idxs[4] = t3;
      Idxs[5] = t3 + n[0] * n[1];
    }
  }
  return;
}
```