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

```asm
<plot_label>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  test   %rdi,%rdi
  je     L148
  mov    %rdi,%r12
  mov    %rsi,%rbx
  mov    %rdx,%rbp
  movss  %xmm3,0x20(%rsp)
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  movss  %xmm0,0x4(%rsp)
  call   <strlen@plt>
  test   %eax,%eax
  je     L148
  pxor   %xmm7,%xmm7
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  cvtsi2ss %eax,%xmm7
  movss  0xc(%rsp),%xmm4
  movss  0x20(%rsp),%xmm3
  jle    L175
  movslq %eax,%rcx
  xor    %edx,%edx
  jmp    L101
  cs nopw 0x0(%rax,%rax,1)
L143:
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  je     L175
L101:
  cmpb   $0x2e,(%r12,%rdx,1)
  mov    %edx,%r15d
  jne    L143
  subss  D104(%rip),%xmm7
L74:
  cmpb   $0x2d,(%r12)
  jne    L55
  subss  D104(%rip),%xmm7
L55:
  comiss %xmm4,%xmm0
  jbe    L79
  movaps %xmm0,%xmm2
  movaps %xmm4,%xmm0
  movaps %xmm2,%xmm4
L79:
  comiss %xmm3,%xmm1
  jbe    L68
  movaps %xmm1,%xmm2
  movaps %xmm3,%xmm1
  movaps %xmm2,%xmm3
L68:
  movaps %xmm3,%xmm5
  pxor   %xmm2,%xmm2
  movaps %xmm4,%xmm6
  cvtss2sd %xmm4,%xmm4
  subss  %xmm1,%xmm5
  cvtss2sd %xmm7,%xmm2
  pxor   %xmm1,%xmm1
  subss  %xmm0,%xmm6
  movsd  D30(%rip),%xmm8
  pxor   %xmm0,%xmm0
  pxor   %xmm10,%xmm10
  xor    %r13d,%r13d
  addsd  %xmm8,%xmm2
  cvtss2sd %xmm5,%xmm1
  cvtss2sd %xmm6,%xmm0
  divsd  D34(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  divsd  %xmm2,%xmm1
  cvtsd2ss %xmm1,%xmm1
  minss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  mulsd  D67(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm7
  subss  %xmm0,%xmm6
  movaps %xmm0,%xmm2
  cvtss2sd %xmm0,%xmm1
  mulsd  %xmm1,%xmm8
  movsd  %xmm1,0x10(%rsp)
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm3,%xmm1
  movss  %xmm0,0xc(%rsp)
  pxor   %xmm0,%xmm0
  divss  D18(%rip),%xmm2
  cvtss2sd %xmm6,%xmm6
  mulsd  D6(%rip),%xmm6
  subss  %xmm7,%xmm5
  cvtsd2ss %xmm8,%xmm10
  cvtss2sd %xmm10,%xmm0
  movsd  %xmm8,0x18(%rsp)
  movss  %xmm10,0x24(%rsp)
  cvtss2sd %xmm5,%xmm5
  mulsd  D6(%rip),%xmm5
  subsd  %xmm6,%xmm4
  cvtsd2ss %xmm4,%xmm4
  subsd  %xmm5,%xmm1
  subsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  cmp    $0xffffffff,%r15d
  je     L42
  lea    -0x1(%rax),%r13d
  cmp    %r13d,%r15d
  jge    L140
  movslq %eax,%rdx
  sub    $0x2,%eax
  movslq %r13d,%r13
  mov    %r12,0x28(%rsp)
  lea    -0x2(%r12,%rdx,1),%r14
  sub    %r15d,%eax
  add    %r12,%r13
  movss  %xmm4,0x20(%rsp)
  sub    %rax,%r14
  mov    %r14,%rax
  xor    %r14d,%r14d
  mov    %r14d,%r12d
  mov    %r13,%r14
  mov    %rax,%r13
  xchg   %ax,%ax
L48:
  movslq %r12d,%rsi
  movsbl (%r14),%edi
  sub    $0x1,%r14
  movss  0x20(%rsp),%xmm0
  shl    $0x2,%rsi
  movss  %xmm2,0x8(%rsp)
  lea    0x0(%rbp,%rsi,1),%rdx
  add    %rbx,%rsi
  movss  %xmm1,0x4(%rsp)
  call   <plot_digit@plt>
  movss  0x4(%rsp),%xmm1
  movss  0x8(%rsp),%xmm2
  add    %eax,%r12d
  cmp    %r14,%r13
  subss  0xc(%rsp),%xmm1
  jne    L48
  movslq %r12d,%rdx
  movss  0x20(%rsp),%xmm4
  mov    0x28(%rsp),%r12
  mov    %r15d,%eax
  mov    %rdx,%r14
  shl    $0x2,%rdx
  lea    (%rbx,%rdx,1),%r9
  lea    0x0(%rbp,%rdx,1),%r8
  lea    0x4(%rdx),%rdi
  lea    0x8(%rdx),%rsi
  add    $0xc,%rdx
  lea    0x4(%r14),%r13d
L34:
  movsd  0x10(%rsp),%xmm9
  movsd  D93(%rip),%xmm3
  pxor   %xmm0,%xmm0
  movsd  D118(%rip),%xmm7
  movss  0x24(%rsp),%xmm11
  cvtss2sd %xmm4,%xmm0
  movapd %xmm0,%xmm5
  mulsd  %xmm9,%xmm3
  movsd  0x18(%rsp),%xmm12
  mulsd  %xmm9,%xmm7
  addss  %xmm11,%xmm1
  subsd  %xmm12,%xmm0
  subsd  %xmm3,%xmm5
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm3
  movapd %xmm3,%xmm6
  subsd  %xmm7,%xmm3
  subss  %xmm11,%xmm1
  subsd  %xmm12,%xmm6
  cvtsd2ss %xmm5,%xmm5
  movss  %xmm5,(%r9)
  cvtsd2ss %xmm3,%xmm3
  cvtss2sd %xmm1,%xmm1
  cvtsd2ss %xmm6,%xmm6
  movss  %xmm6,(%r8)
  movss  %xmm0,(%rbx,%rdi,1)
  movss  %xmm3,0x0(%rbp,%rdi,1)
  movss  %xmm0,(%rbx,%rsi,1)
  movsd  D6(%rip),%xmm0
  movss  %xmm6,0x0(%rbp,%rsi,1)
  mulsd  %xmm9,%xmm0
  movss  %xmm5,(%rbx,%rdx,1)
  movss  %xmm3,0x0(%rbp,%rdx,1)
  subsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
L42:
  mov    %eax,%edx
  sub    $0x1,%edx
  js     L54
  movslq %edx,%r14
  cltq
  mov    %edx,%edx
  add    %r12,%r14
  lea    -0x2(%r12,%rax,1),%r12
  sub    %rdx,%r12
  jmp    L177
  nop
L71:
  movaps %xmm4,%xmm0
  movss  %xmm2,0x20(%rsp)
  movss  %xmm1,0x8(%rsp)
  movss  %xmm4,0x4(%rsp)
  call   <plot_digit@plt>
  movss  0x8(%rsp),%xmm1
  subss  0xc(%rsp),%xmm1
  movss  0x4(%rsp),%xmm4
  movss  0x20(%rsp),%xmm2
  add    %eax,%r13d
L178:
  sub    $0x1,%r14
  cmp    %r14,%r12
  je     L54
L177:
  movslq %r13d,%rax
  movsbl (%r14),%edi
  shl    $0x2,%rax
  lea    (%rbx,%rax,1),%rsi
  lea    0x0(%rbp,%rax,1),%rdx
  cmp    $0x2d,%dil
  jne    L71
  movsd  0x10(%rsp),%xmm7
  movsd  D6(%rip),%xmm3
  pxor   %xmm0,%xmm0
  add    $0x2,%r13d
  movsd  D112(%rip),%xmm5
  cvtss2sd %xmm4,%xmm0
  mulsd  %xmm7,%xmm3
  mulsd  %xmm7,%xmm5
  subsd  %xmm3,%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm1,%xmm3
  subsd  %xmm5,%xmm3
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rsi)
  cvtsd2ss %xmm3,%xmm3
  movss  %xmm3,(%rdx)
  movss  %xmm0,0x4(%rbx,%rax,1)
  movss  %xmm1,0x4(%rbp,%rax,1)
  jmp    L178
L148:
  xor    %r13d,%r13d
L54:
  add    $0x38,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L175:
  mov    $0xffffffff,%r15d
  jmp    L74
L140:
  mov    %r13d,%eax
  mov    %rbp,%r8
  mov    %rbx,%r9
  mov    $0x4,%r13d
  mov    $0xc,%edx
  mov    $0x8,%esi
  mov    $0x4,%edi
  jmp    L34
```

tool_calls: name: retrieve_data
arguments: tag: D104
type: f32
name: retrieve_data
arguments: tag: D30
type: f64
name: retrieve_data
arguments: tag: D34
type: f64
name: retrieve_data
arguments: tag: D67
type: f64
name: retrieve_data
arguments: tag: D18
type: f32
name: retrieve_data
arguments: tag: D6
type: byte[8]
name: retrieve_data
arguments: tag: D93
type: f64
name: retrieve_data
arguments: tag: D118
type: f64
name: retrieve_data
arguments: tag: D112
type: f64

tool: D104: 0.5

tool: D30: 0.2

tool: D34: 1.2

tool: D67: 0.8

tool: D18: 10

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: D93: 0.1

tool: D118: 0.3

tool: D112: 0.4

assistant: ```c
int plot_label(char *lbl_str, float xk, float yk, float xm, float ym, float vx[], float vy[]) {
  float xmk, ymk, hgt, h, width, row, col, gap;
  int i, len, idot;
  int num = 0;
  if (lbl_str == 0)
    return 0;
  if ((len = strlen(lbl_str)) == 0)
    return 0;
  width = len;
  idot = -1;
  for (i = 0; i < len; i++) {
    if (lbl_str[i] == '.') {
      idot = i;
      width -= 0.5;
      break;
    }
  }
  if (lbl_str[0] == '-')
    width -= 0.5;
  if (xm < xk)
    col = xm, xm = xk, xk = col;
  if (ym < yk)
    row = ym, ym = yk, yk = row;
  xmk = xm - xk;
  ymk = ym - yk;
  hgt = xmk / 1.2;
  h = ymk / (width + 0.2);
  if (h < hgt)
    hgt = h;
  hgt *= 0.8;
  h = hgt / 10.0;
  gap = hgt * 0.2;
  row = xm - (0.5 * (xmk - hgt));
  col = ym - (0.5 * (ymk - (width * hgt))) - gap;
  i = len;
  if (idot >= 0) {
    while (--i > idot) {
      num += plot_digit(lbl_str[i], row, col, h, (vx + num), (vy + num));
      col -= hgt;
    }
    col += gap;
    vx[num] = row - 0.1 * hgt;
    vy[num] = col - 0.2 * hgt;
    num++;
    vx[num] = row - 0.2 * hgt;
    vy[num] = col - 0.3 * hgt;
    num++;
    vx[num] = row - 0.2 * hgt;
    vy[num] = col - 0.2 * hgt;
    num++;
    vx[num] = row - 0.1 * hgt;
    vy[num] = col - 0.3 * hgt;
    num++;
    col -= gap;
    col -= 0.5 * hgt;
  }
  while (--i >= 0) {
    if (lbl_str[i] != '-') {
      num += plot_digit(lbl_str[i], row, col, h, (vx + num), (vy + num));
      col -= hgt;
    } else {
      vx[num] = row - 0.5 * hgt;
      vy[num] = col - 0.4 * hgt;
      num++;
      vx[num] = row - 0.5 * hgt;
      vy[num] = col;
      num++;
    }
  }
  return num;
}
```