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

```asm
<getLineCoordinates>:
  endbr64
  push   %r14
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,%r8
  mov    %rsi,%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movzwl (%rsi),%ecx
  movzwl (%rdx),%eax
  cmp    %ax,%cx
  je     L179
L149:
  cwtl
  movswl %cx,%esi
  sub    %esi,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  ja     L118
  movss  %xmm0,0x18(%rsp)
  mov    $0x1,%eax
L30:
  mov    %ax,0x10(%rsp)
  movl   $0x0,0x20(%rsp)
  movw   $0x0,0xc(%rsp)
  mov    %cx,0x14(%rsp)
  movzwl 0x2(%r9),%ecx
  movswl 0x2(%rdx),%eax
  movswl %cx,%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  ja     L6
  movss  %xmm0,0x1c(%rsp)
  mov    $0x1,%eax
L89:
  mov    %ax,0x12(%rsp)
  movl   $0x0,0x24(%rsp)
  movw   $0x0,0xe(%rsp)
  mov    %cx,0x16(%rsp)
  movss  0x18(%rsp),%xmm1
  movss  0x1c(%rsp),%xmm0
  comiss %xmm0,%xmm1
  jbe    L39
  cvttss2si %xmm1,%eax
L16:
  cwtl
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  divss  %xmm2,%xmm1
  movss  %xmm1,0x18(%rsp)
  divss  %xmm2,%xmm0
  movss  %xmm0,0x1c(%rsp)
  mov    $0x0,%r10d
  movss  D5(%rip),%xmm2
  movaps %xmm2,%xmm3
  mov    D1(%rip),%ebp
  movaps %xmm2,%xmm4
  jmp    L93
L179:
  mov    $0x0,%r10d
  movzwl 0x2(%rdx),%edi
  cmp    %di,0x2(%rsi)
  jne    L149
  jmp    L54
L118:
  xorps  D33(%rip),%xmm0
  movss  %xmm0,0x18(%rsp)
  mov    $0xffffffff,%eax
  jmp    L30
L6:
  xorps  D33(%rip),%xmm0
  movss  %xmm0,0x1c(%rsp)
  mov    $0xffffffff,%eax
  jmp    L89
L39:
  cvttss2si %xmm0,%eax
  jmp    L16
L167:
  movzwl 0x10(%rsp,%rax,1),%edx
  imul   (%r11),%dx
  add    (%r9,%rax,1),%dx
  mov    %dx,0x14(%rsp,%rax,1)
  mov    %dx,(%rdi,%rax,1)
  add    $0x2,%rcx
  add    $0x4,%rsi
  add    $0x2,%rax
  cmp    $0x4,%rax
  je     L44
L98:
  mov    %rcx,%r11
  movss  0x18(%rsp,%rax,2),%xmm0
  movswl (%rcx),%edx
  pxor   %xmm1,%xmm1
  cvtsi2ss %edx,%xmm1
  addss  %xmm0,%xmm1
  cvttss2si %xmm1,%edx
  mov    %dx,(%rcx)
  mov    %rsi,%rbx
  movss  (%rsi),%xmm1
  ucomiss %xmm2,%xmm0
  jp     L126
  ucomiss %xmm3,%xmm0
  movd   %xmm0,%r14d
  cmove  %ebp,%r14d
  movd   %r14d,%xmm0
L126:
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rbx)
  comiss D23(%rip),%xmm0
  jb     L167
  add    $0x1,%edx
  mov    %dx,(%r11)
  subss  %xmm4,%xmm0
  movss  %xmm0,(%rbx)
  jmp    L167
L44:
  lea    0x1(%r10),%eax
  cmpw   $0x4e,0x14(%rsp)
  ja     L113
  cmpw   $0x1c,0x16(%rsp)
  ja     L113
  mov    %eax,%r10d
L93:
  movswq %r10w,%rax
  lea    (%r8,%rax,4),%rdi
  lea    0xc(%rsp),%rcx
  lea    0x20(%rsp),%rsi
  mov    $0x0,%eax
  jmp    L98
L113:
  movw   $0xffff,0x2(%rdi)
  movw   $0xffff,(%rdi)
L54:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L159
  mov    %r10d,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
L159:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D5
datatype: byte[4]
name: unpack_data
arguments: data_tag: D1
datatype: byte[4]
name: unpack_data
arguments: data_tag: D33
datatype: byte[16]
name: unpack_data
arguments: data_tag: D23
datatype: f32

tool: {"D5": [0x00,0x00,0x80,0x3f]}

tool: {"D1": [0x00,0x00,0x00,0x00]}

tool: {"D33": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D23: 0.5

assistant: ```c
short getLineCoordinates(short listOfCoordinates[][2], short originLoc[2], short targetLoc[2]) {
  float targetVector[2], error[2];
  short largerTargetComponent, currentVector[2], previousVector[2], quadrantTransform[2], i;
  short currentLoc[2], previousLoc[2];
  short cellNumber = 0;
  if (originLoc[0] == targetLoc[0] && originLoc[1] == targetLoc[1]) {
    return 0;
  }
  for (i = 0; i <= 1; i++) {
    targetVector[i] = targetLoc[i] - originLoc[i];
    if (targetVector[i] < 0) {
      targetVector[i] *= -1;
      quadrantTransform[i] = -1;
    } else {
      quadrantTransform[i] = 1;
    }
    currentVector[i] = previousVector[i] = error[i] = 0;
    currentLoc[i] = originLoc[i];
  }
  largerTargetComponent = (((targetVector[0]) > (targetVector[1])) ? (targetVector[0]) : (targetVector[1]));
  targetVector[0] /= largerTargetComponent;
  targetVector[1] /= largerTargetComponent;
  do {
    for (i = 0; i <= 1; i++) {
      previousLoc[i] = currentLoc[i];
      currentVector[i] += targetVector[i];
      error[i] += (targetVector[i] == 1 ? 0 : targetVector[i]);
      if (error[i] >= 0.5) {
        currentVector[i]++;
        error[i] -= 1;
      }
      currentLoc[i] = quadrantTransform[i] * currentVector[i] + originLoc[i];
      listOfCoordinates[cellNumber][i] = currentLoc[i];
    }
    cellNumber++;
  } while (((currentLoc[0]) >= 0 && (currentLoc[0]) < (100 - 20 - 1) && (currentLoc[1]) >= 0 && (currentLoc[1]) < ((31 + 3) - 3 - 2)));
  cellNumber--;
  listOfCoordinates[cellNumber][0] = listOfCoordinates[cellNumber][1] = -1;
  return cellNumber;
}
```