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

```asm
<fixpos>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8d,-0x44(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  imul   -0x38(%rbp),%eax
  test   %eax,%eax
  js     L234
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,%ebx
  mov    -0x34(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L299
  mov    $0x72,%eax
  jmp    L63
L299:
  mov    $0x77,%eax
L63:
  mov    %al,-0x29(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    %edx,%r13d
  lea    -0x1(%rbx),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    %edx,%r12d
  cmp    %r12d,%r13d
  jne    L48
  cmp    $0x2,%r13d
  jne    L178
  mov    -0x40(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,-0x28(%rbp)
L178:
  cmp    $0x1,%r13d
  jne    L199
  cmpl   $0x35,-0x40(%rbp)
  jle    L280
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  jmp    L189
L280:
  mov    -0x40(%rbp),%eax
L189:
  mov    %eax,-0x28(%rbp)
L199:
  test   %r13d,%r13d
  jne    L283
  cmpl   $0x35,-0x40(%rbp)
  jg     L309
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  jmp    L28
L309:
  mov    -0x40(%rbp),%eax
L28:
  mov    %eax,-0x28(%rbp)
L283:
  cmp    %ebx,-0x24(%rbp)
  jle    L369
  mov    -0x24(%rbp),%eax
  sub    %ebx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    %r12d,%eax
  shl    $0x2,%eax
  add    %r12d,%eax
  neg    %eax
  add    %ebx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x3c(%rbp),%eax
  lea    (%rcx,%rax,1),%edi
  mov    -0x44(%rbp),%ecx
  mov    -0x28(%rbp),%eax
  mov    %ecx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L15
L369:
  movsbl -0x29(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  sub    %ebx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    %r13d,%eax
  shl    $0x2,%eax
  add    %r13d,%eax
  neg    %eax
  mov    -0x24(%rbp),%esi
  add    %esi,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%esi
  mov    -0x3c(%rbp),%eax
  lea    (%rsi,%rax,1),%edi
  mov    -0x44(%rbp),%esi
  mov    -0x28(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L15
L48:
  cmpl   $0x35,-0x40(%rbp)
  jg     L44
  lea    0x0(%r13,%r12,1),%eax
  cmp    $0x1,%eax
  jne    L71
  test   %r12d,%r12d
  je     L188
  movsbl -0x29(%rbp),%ecx
  lea    -0x5(%rbx),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x44(%rbp),%edi
  mov    -0x40(%rbp),%esi
  mov    -0x3c(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  cmpl   $0x5,-0x24(%rbp)
  je     L338
  movsbl -0x29(%rbp),%edx
  mov    -0x24(%rbp),%eax
  sub    $0x5,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  mov    -0x40(%rbp),%ecx
  lea    0x1(%rcx),%esi
  mov    -0x44(%rbp),%ecx
  mov    %ecx,%edi
  imul   -0x24(%rbp),%edi
  mov    -0x3c(%rbp),%ecx
  add    %ecx,%edi
  mov    -0x44(%rbp),%ecx
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L338
L188:
  mov    -0x24(%rbp),%eax
  sub    $0x5,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x44(%rbp),%ecx
  mov    -0x40(%rbp),%esi
  mov    -0x3c(%rbp),%eax
  mov    %ecx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  cmp    $0x5,%ebx
  je     L338
  lea    -0x5(%rbx),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    -0x40(%rbp),%edx
  lea    0x1(%rdx),%esi
  imul   -0x44(%rbp),%ebx
  mov    %ebx,%ecx
  mov    -0x3c(%rbp),%edx
  lea    (%rcx,%rdx,1),%edi
  mov    -0x44(%rbp),%edx
  mov    %edx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%edx
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L338
L71:
  cmp    $0x2,%r12d
  jne    L221
  cmpl   $0xa,-0x24(%rbp)
  je     L97
  movsbl -0x29(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  sub    $0xa,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x24(%rbp),%eax
  sub    $0x5,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%esi
  mov    -0x3c(%rbp),%eax
  lea    (%rsi,%rax,1),%edi
  mov    -0x44(%rbp),%esi
  mov    -0x40(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <fixcol@plt>
L97:
  movsbl -0x29(%rbp),%ecx
  lea    -0xa(%rbx),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x40(%rbp),%eax
  lea    0x2(%rax),%esi
  mov    -0x44(%rbp),%edi
  mov    -0x3c(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L15
L221:
  cmp    $0xa,%ebx
  je     L291
  lea    -0xa(%rbx),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  lea    -0x5(%rbx),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x3c(%rbp),%eax
  lea    (%rcx,%rax,1),%edi
  mov    -0x44(%rbp),%ecx
  mov    -0x40(%rbp),%eax
  mov    %ecx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <fixcol@plt>
L291:
  mov    -0x24(%rbp),%eax
  sub    $0xa,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x40(%rbp),%eax
  lea    0x2(%rax),%esi
  mov    -0x44(%rbp),%ecx
  mov    -0x3c(%rbp),%eax
  mov    %ecx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L15
L44:
  cmp    %r13d,%r12d
  jle    L327
  movsbl -0x29(%rbp),%edi
  mov    %r12d,%eax
  shl    $0x2,%eax
  add    %r12d,%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,%esi
  mov    -0x40(%rbp),%eax
  lea    0x0(%r13,%rax,1),%r9d
  mov    -0x24(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x2,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  mov    -0x44(%rbp),%edx
  mov    %edx,%r8d
  mov    %edi,%ecx
  mov    %esi,%edx
  mov    %r9d,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  mov    %r12d,%eax
  shl    $0x2,%eax
  add    %r12d,%eax
  cmp    %eax,%ebx
  je     L296
  movsbl -0x29(%rbp),%ecx
  mov    %r12d,%eax
  shl    $0x2,%eax
  add    %r12d,%eax
  sub    %ebx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x40(%rbp),%eax
  lea    (%r12,%rax,1),%esi
  mov    -0x44(%rbp),%edi
  mov    -0x3c(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L296
L327:
  mov    %r12d,%eax
  shl    $0x2,%eax
  add    %r12d,%eax
  sub    %ebx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,%esi
  mov    -0x40(%rbp),%eax
  lea    (%r12,%rax,1),%edi
  movslq %ebx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  mov    -0x44(%rbp),%edx
  mov    %edx,%r8d
  mov    $0x20,%ecx
  mov    %esi,%edx
  mov    %edi,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  mov    %r13d,%eax
  shl    $0x2,%eax
  add    %r13d,%eax
  cmp    %eax,-0x24(%rbp)
  je     L296
  mov    %r13d,%eax
  shl    $0x2,%eax
  add    %r13d,%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x40(%rbp),%eax
  lea    0x0(%r13,%rax,1),%esi
  mov    -0x44(%rbp),%ecx
  mov    -0x3c(%rbp),%eax
  mov    %ecx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L296
L234:
  mov    -0x38(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,%ebx
  cmpl   $0x0,-0x38(%rbp)
  jle    L209
  mov    $0x72,%ecx
  jmp    L216
L209:
  mov    $0x77,%ecx
L216:
  mov    -0x40(%rbp),%eax
  lea    0x1(%rax),%esi
  mov    -0x44(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%r8d
  mov    %ebx,%edx
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <fixcol@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  mov    -0x38(%rbp),%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  cmp    %eax,%edx
  jle    L175
  mov    -0x34(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    -0x40(%rbp),%edx
  lea    0x1(%rdx),%esi
  mov    -0x44(%rbp),%edx
  mov    %edx,%ecx
  imul   -0x38(%rbp),%ecx
  mov    -0x3c(%rbp),%edx
  lea    (%rcx,%rdx,1),%edi
  mov    -0x44(%rbp),%edx
  mov    %edx,%r8d
  mov    $0x20,%ecx
  mov    %eax,%edx
  mov    $0x0,%eax
  call   <fixcol@plt>
  jmp    L15
L338:
  nop
  jmp    L15
L296:
  nop
  jmp    L15
L175:
  nop
L15:
  add    $0x38,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void fixpos(old, new, r, c, inc) int old, new, r, c, inc;
{
  register int o, n, nv;
  int ov, nc = 0;
  char col;
  if (old * new >= 0) {
    ov = abs(old);
    nv = abs(new);
    col = (old + new > 0 ? 'r' : 'w');
    o = (ov - 1) / 5;
    n = (nv - 1) / 5;
    if (o == n) {
      if (o == 2)
        nc = c + 2;
      if (o == 1)
        nc = c < 54 ? c : c + 1;
      if (o == 0)
        nc = c < 54 ? c + 1 : c;
      if (ov > nv)
        fixcol(r + inc * (nv - n * 5), nc, abs(ov - nv), ' ', inc);
      else
        fixcol(r + inc * (ov - o * 5), nc, abs(ov - nv), col, inc);
      return;
    } else {
      if (c < 54) {
        if (o + n == 1) {
          if (n) {
            fixcol(r, c, abs(nv - 5), col, inc);
            if (ov != 5)
              fixcol(r + inc * ov, c + 1, abs(ov - 5), col, inc);
          } else {
            fixcol(r, c, abs(ov - 5), ' ', inc);
            if (nv != 5)
              fixcol(r + inc * nv, c + 1, abs(nv - 5), ' ', inc);
          }
          return;
        }
        if (n == 2) {
          if (ov != 10)
            fixcol(r + inc * (ov - 5), c, abs(ov - 10), col, inc);
          fixcol(r, c + 2, abs(nv - 10), col, inc);
        } else {
          if (nv != 10)
            fixcol(r + inc * (nv - 5), c, abs(nv - 10), ' ', inc);
          fixcol(r, c + 2, abs(ov - 10), ' ', inc);
        }
        return;
      }
      if (n > o) {
        fixcol(r + inc * (ov % 5), c + o, abs(5 * n - ov), col, inc);
        if (nv != 5 * n)
          fixcol(r, c + n, abs(5 * n - nv), col, inc);
      } else {
        fixcol(r + inc * (nv % 5), c + n, abs(5 * n - nv), ' ', inc);
        if (ov != 5 * o)
          fixcol(r, c + o, abs(5 * o - ov), ' ', inc);
      }
      return;
    }
  }
  nv = abs(new);
  fixcol(r, c + 1, nv, new > 0 ? 'r' : 'w', inc);
  if (abs(old) <= abs(new))
    return;
  fixcol(r + inc * new, c + 1, abs(old + new), ' ', inc);
}
```