user: 请将以下的汇编代码转换成C语言代码：

```asm
<_drawline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,%rbp
  mov    %edx,%r12d
  mov    %rcx,%r13
  movsd  %xmm1,0x10(%rsp)
  mov    %r8d,0x18(%rsp)
  mov    %r9d,0x1c(%rsp)
  mov    0x88(%rsp),%ebx
  mov    0x90(%rsp),%r15d
  movzbl 0xa0(%rsp),%r14d
  lea    0x38(%rsp),%rax
  lea    0x30(%rsp),%rdi
  mov    %rdi,0x28(%rsp)
  mov    %rdi,%rsi
  mov    %rax,0x20(%rsp)
  mov    %rax,%rdi
  call   <sincos@plt>
  movsd  0x30(%rsp),%xmm7
  movsd  %xmm7,(%rsp)
  movsd  0x38(%rsp),%xmm6
  movsd  %xmm6,0x8(%rsp)
  mov    0x28(%rsp),%rsi
  mov    0x20(%rsp),%rdi
  movsd  0x10(%rsp),%xmm0
  call   <sincos@plt>
  movsd  0x8(%rsp),%xmm6
  movapd %xmm6,%xmm2
  mulsd  0x30(%rsp),%xmm2
  mulsd  0x38(%rsp),%xmm6
  movapd %xmm6,%xmm0
  movq   D51(%rip),%xmm1
  movapd %xmm2,%xmm3
  andpd  %xmm1,%xmm3
  andpd  %xmm0,%xmm1
  comisd %xmm1,%xmm3
  jb     L11
  movsd  (%rsp),%xmm7
  movapd %xmm7,%xmm4
  andpd  D51(%rip),%xmm4
  comisd %xmm4,%xmm3
  jb     L11
  movapd %xmm6,%xmm3
  divsd  %xmm2,%xmm3
  divsd  %xmm2,%xmm7
  movapd %xmm7,%xmm1
  movsd  D145(%rip),%xmm4
  jmp    L177
L11:
  comisd %xmm3,%xmm1
  jb     L139
  movsd  (%rsp),%xmm7
  movapd %xmm7,%xmm3
  andpd  D51(%rip),%xmm3
  comisd %xmm3,%xmm1
  jb     L139
  movapd %xmm2,%xmm4
  divsd  %xmm0,%xmm4
  divsd  %xmm0,%xmm7
  movapd %xmm7,%xmm1
  movsd  D145(%rip),%xmm3
  jmp    L177
L139:
  movapd %xmm2,%xmm4
  movsd  (%rsp),%xmm7
  divsd  %xmm7,%xmm4
  movapd %xmm0,%xmm3
  divsd  %xmm7,%xmm3
  movsd  D145(%rip),%xmm1
L177:
  movapd %xmm4,%xmm6
  andpd  D51(%rip),%xmm6
  comisd D49(%rip),%xmm2
  jbe    L171
L167:
  movapd %xmm3,%xmm7
  andpd  D51(%rip),%xmm7
  comisd D49(%rip),%xmm0
  jbe    L248
L233:
  movapd %xmm1,%xmm8
  andpd  D51(%rip),%xmm8
  movsd  (%rsp),%xmm2
  comisd D49(%rip),%xmm2
  jbe    L123
L95:
  mov    0x18(%rsp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x1c(%rsp),%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x80(%rsp),%xmm2
  test   %eax,%eax
  js     L201
  movapd %xmm2,%xmm5
  movapd %xmm0,%xmm3
  movapd %xmm1,%xmm4
  pxor   %xmm10,%xmm10
  cvtsi2sd %ebx,%xmm10
  pxor   %xmm11,%xmm11
  movapd %xmm11,%xmm12
  movapd %xmm11,%xmm13
L220:
  comisd %xmm4,%xmm10
  jbe    L146
  comisd %xmm11,%xmm3
  jb     L146
  pxor   %xmm9,%xmm9
  cvtsi2sd %r15d,%xmm9
  comisd %xmm3,%xmm9
  jbe    L146
  comisd %xmm12,%xmm5
  jb     L146
  pxor   %xmm9,%xmm9
  cvtsi2sdl 0x98(%rsp),%xmm9
  comisd %xmm5,%xmm9
  jbe    L146
  cvttsd2si %xmm3,%eax
  imul   %ebx,%eax
  cvttsd2si %xmm4,%edx
  add    %edx,%eax
  cvttsd2si %xmm5,%edx
  imul   %ebx,%edx
  imul   %r15d,%edx
  add    %edx,%eax
  cltq
  cmp    %r12d,0x0(%rbp,%rax,4)
  jne    L146
  mov    %r14b,0x0(%r13,%rax,1)
  addsd  %xmm6,%xmm4
  addsd  %xmm7,%xmm3
  addsd  %xmm8,%xmm5
  comisd %xmm13,%xmm4
  jae    L220
L146:
  pxor   %xmm4,%xmm4
  cvtsi2sd %ebx,%xmm4
  pxor   %xmm5,%xmm5
  movapd %xmm5,%xmm9
  movapd %xmm5,%xmm10
L269:
  comisd %xmm1,%xmm4
  jbe    L201
  comisd %xmm5,%xmm0
  jb     L201
  pxor   %xmm3,%xmm3
  cvtsi2sd %r15d,%xmm3
  comisd %xmm0,%xmm3
  jbe    L201
  comisd %xmm9,%xmm2
  jb     L201
  pxor   %xmm3,%xmm3
  cvtsi2sdl 0x98(%rsp),%xmm3
  comisd %xmm2,%xmm3
  jbe    L201
  cvttsd2si %xmm0,%eax
  imul   %ebx,%eax
  cvttsd2si %xmm1,%edx
  add    %edx,%eax
  cvttsd2si %xmm2,%edx
  imul   %ebx,%edx
  imul   %r15d,%edx
  add    %edx,%eax
  cltq
  cmp    %r12d,0x0(%rbp,%rax,4)
  jne    L201
  mov    %r14b,0x0(%r13,%rax,1)
  subsd  %xmm6,%xmm1
  subsd  %xmm7,%xmm0
  subsd  %xmm8,%xmm2
  comisd %xmm10,%xmm1
  jae    L269
L201:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L171:
  movapd %xmm4,%xmm6
  orpd   D99(%rip),%xmm6
  jmp    L167
L248:
  movapd %xmm3,%xmm7
  orpd   D99(%rip),%xmm7
  jmp    L233
L123:
  orpd   D99(%rip),%xmm1
  movapd %xmm1,%xmm8
  jmp    L95
```

tool_calls: name: retrieve_data
arguments: tag: D51
type_infered: qword[2]
name: retrieve_data
arguments: tag: D145
type_infered: f64
name: retrieve_data
arguments: tag: D49
type_infered: byte[16]
name: retrieve_data
arguments: tag: D99
type_infered: byte[16]

tool: {"D51": [0x7fffffffffffffff,0x0000000000000000]}

tool: D145: 1

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

tool: {"D99": [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;
}
```