user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<_drawline>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  lea    0x48(%rsp),%rdi
  lea    0x40(%rsp),%rsi
  mov    %r8d,0x34(%rsp)
  movzbl 0xb0(%rsp),%edx
  mov    %r9d,0x30(%rsp)
  mov    0x98(%rsp),%ebx
  mov    %dl,0x2f(%rsp)
  mov    0xa0(%rsp),%ebp
  mov    %rsi,0x20(%rsp)
  mov    0xa8(%rsp),%r15d
  mov    %rdi,0x18(%rsp)
  movsd  %xmm1,0x38(%rsp)
  call   <sincos@plt>
  movsd  0x38(%rsp),%xmm2
  movsd  0x40(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm1
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  movapd %xmm2,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sincos@plt>
  movsd  0x8(%rsp),%xmm1
  movzbl 0x2f(%rsp),%edx
  movsd  0x40(%rsp),%xmm4
  movq   D30(%rip),%xmm7
  movsd  0x10(%rsp),%xmm3
  mov    0x30(%rsp),%r9d
  mulsd  %xmm1,%xmm4
  mov    0x34(%rsp),%r8d
  mulsd  0x48(%rsp),%xmm1
  movapd %xmm4,%xmm0
  movapd %xmm1,%xmm2
  andpd  %xmm7,%xmm0
  andpd  %xmm7,%xmm2
  comisd %xmm2,%xmm0
  jb     L158
  movapd %xmm3,%xmm5
  andpd  %xmm7,%xmm5
  comisd %xmm5,%xmm0
  jb     L158
  movapd %xmm1,%xmm8
  movapd %xmm3,%xmm0
  movsd  D28(%rip),%xmm9
  divsd  %xmm4,%xmm0
  divsd  %xmm4,%xmm8
  andpd  %xmm7,%xmm8
  andpd  %xmm0,%xmm7
  pxor   %xmm0,%xmm0
  comisd %xmm0,%xmm4
  jbe    L165
  nopl   0x0(%rax,%rax,1)
L155:
  comisd %xmm0,%xmm1
  ja     L82
  xorpd  D46(%rip),%xmm8
L82:
  comisd %xmm0,%xmm3
  ja     L50
  xorpd  D46(%rip),%xmm7
L50:
  pxor   %xmm2,%xmm2
  pxor   %xmm1,%xmm1
  pxor   %xmm3,%xmm3
  cvtsi2sd %r8d,%xmm2
  cvtsi2sd %r9d,%xmm1
  cvtsi2sdl 0x90(%rsp),%xmm3
  test   %r8d,%r8d
  js     L184
  pxor   %xmm10,%xmm10
  movapd %xmm3,%xmm6
  movapd %xmm1,%xmm4
  cvtsi2sd %ebx,%xmm10
  movapd %xmm2,%xmm5
  jmp    L199
  nopl   (%rax)
L48:
  comisd %xmm0,%xmm4
  jb     L56
  pxor   %xmm11,%xmm11
  cvtsi2sd %ebp,%xmm11
  comisd %xmm4,%xmm11
  jbe    L56
  comisd %xmm0,%xmm6
  jb     L56
  pxor   %xmm11,%xmm11
  cvtsi2sd %r15d,%xmm11
  comisd %xmm6,%xmm11
  jbe    L56
  cvttsd2si %xmm4,%eax
  cvttsd2si %xmm5,%ecx
  imul   %ebx,%eax
  add    %ecx,%eax
  cvttsd2si %xmm6,%ecx
  imul   %ebx,%ecx
  imul   %ebp,%ecx
  add    %ecx,%eax
  cltq
  cmp    %r13d,(%r12,%rax,4)
  jne    L56
  addsd  %xmm9,%xmm5
  mov    %dl,(%r14,%rax,1)
  addsd  %xmm8,%xmm4
  addsd  %xmm7,%xmm6
  comisd %xmm0,%xmm5
  jb     L56
L199:
  comisd %xmm5,%xmm10
  ja     L48
  comisd %xmm2,%xmm10
  jbe    L184
  nopl   (%rax)
L122:
  comisd %xmm0,%xmm1
  jb     L184
  pxor   %xmm4,%xmm4
  cvtsi2sd %ebp,%xmm4
  comisd %xmm1,%xmm4
  jbe    L184
  comisd %xmm0,%xmm3
  jb     L184
  pxor   %xmm4,%xmm4
  cvtsi2sd %r15d,%xmm4
  comisd %xmm3,%xmm4
  jbe    L184
  cvttsd2si %xmm1,%eax
  cvttsd2si %xmm2,%ecx
  imul   %ebx,%eax
  add    %ecx,%eax
  cvttsd2si %xmm3,%ecx
  imul   %ebx,%ecx
  imul   %ebp,%ecx
  add    %ecx,%eax
  cltq
  cmp    %r13d,(%r12,%rax,4)
  jne    L184
  subsd  %xmm9,%xmm2
  mov    %dl,(%r14,%rax,1)
  subsd  %xmm8,%xmm1
  subsd  %xmm7,%xmm3
  comisd %xmm0,%xmm2
  jb     L184
L56:
  comisd %xmm2,%xmm10
  ja     L122
L184:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L158:
  comisd %xmm0,%xmm2
  movapd %xmm4,%xmm9
  jae    L51
L250:
  divsd  %xmm3,%xmm9
  movapd %xmm1,%xmm8
  divsd  %xmm3,%xmm8
  andpd  %xmm7,%xmm9
  andpd  %xmm7,%xmm8
  movsd  D28(%rip),%xmm7
L234:
  pxor   %xmm0,%xmm0
  comisd %xmm0,%xmm4
  ja     L155
L165:
  xorpd  D46(%rip),%xmm9
  jmp    L155
  nopl   0x0(%rax,%rax,1)
L51:
  movapd %xmm3,%xmm0
  andpd  %xmm7,%xmm0
  comisd %xmm0,%xmm2
  jb     L250
  divsd  %xmm1,%xmm9
  movapd %xmm3,%xmm0
  movsd  D28(%rip),%xmm8
  divsd  %xmm1,%xmm0
  andpd  %xmm7,%xmm9
  andpd  %xmm0,%xmm7
  jmp    L234
```

tool_calls: name: retrieve_data
arguments: label: D30
data_type: qword
name: retrieve_data
arguments: label: D28
data_type: f64
name: retrieve_data
arguments: label: D46
data_type: byte[16]

tool: D30: 9223372036854775807

tool: D28: 1

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

assistant: ```c
void _drawline(unsigned char *in_im, unsigned int *lbl_im, unsigned int curr_lbl, unsigned char *out_im, const double theta, const double phi, const int cen_i, const int cen_j, const int cen_k, const int dimx, const int dimy, const int dimz, unsigned char lbl) {
  double x, y, z;
  double prec_x, prec_y, prec_z;
  double end_x1, end_y1, end_z1;
  double end_x2, end_y2, end_z2;
  unsigned char prec_status, curr_status;
  double r_0, r_1, r_2;
  double normr_0, normr_1, normr_2;
  r_0 = cos(phi) * sin(theta);
  r_1 = sin(phi) * sin(theta);
  r_2 = cos(theta);
  if ((fabs(r_0) >= fabs(r_1)) && (fabs(r_0) >= fabs(r_2))) {
    normr_0 = 1.0;
    normr_1 = r_1 / r_0;
    normr_2 = r_2 / r_0;
  } else if ((fabs(r_1) >= fabs(r_0)) && (fabs(r_1) >= fabs(r_2))) {
    normr_1 = 1.0;
    normr_0 = r_0 / r_1;
    normr_2 = r_2 / r_1;
  } else {
    normr_2 = 1.0;
    normr_0 = r_0 / r_2;
    normr_1 = r_1 / r_2;
  }
  normr_0 = (r_0 > 0) ? fabs(normr_0) : (-fabs(normr_0));
  normr_1 = (r_1 > 0) ? fabs(normr_1) : (-fabs(normr_1));
  normr_2 = (r_2 > 0) ? fabs(normr_2) : (-fabs(normr_2));
  x = cen_i;
  y = cen_j;
  z = cen_k;
  prec_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
  curr_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
  prec_x = x;
  prec_y = y;
  prec_z = z;
  while ((x >= 0) && (x < dimx) && (y >= 0) && (y < dimy) && (z >= 0) && (z < dimz) && (lbl_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))] == curr_lbl)) {
    out_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))] = lbl;
    curr_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
    if (curr_status != prec_status) {
      prec_status = curr_status;
    }
    prec_x = x;
    prec_y = y;
    prec_z = z;
    x = x + normr_0;
    y = y + normr_1;
    z = z + normr_2;
  }
  end_x1 = prec_x;
  end_y1 = prec_y;
  end_z1 = prec_z;
  x = cen_i;
  y = cen_j;
  z = cen_k;
  prec_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
  curr_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
  prec_x = x;
  prec_y = y;
  prec_z = z;
  while ((x >= 0) && (x < dimx) && (y >= 0) && (y < dimy) && (z >= 0) && (z < dimz) && (lbl_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))] == curr_lbl)) {
    out_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))] = lbl;
    curr_status = in_im[(((int)y) * (dimx) + ((int)x) + ((int)z) * (dimx) * (dimy))];
    if (curr_status != prec_status) {
      prec_status = curr_status;
    }
    prec_x = x;
    prec_y = y;
    prec_z = z;
    x = x - normr_0;
    y = y - normr_1;
    z = z - normr_2;
  }
  end_x2 = prec_x;
  end_y2 = prec_y;
  end_z2 = prec_z;
}
```