user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Lab2XYZ>:
  endbr64
  push   %r12
  movapd %xmm1,%xmm4
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x20,%rsp
  movsd  D95(%rip),%xmm3
  movsd  D25(%rip),%xmm5
  addsd  %xmm0,%xmm3
  divsd  D6(%rip),%xmm3
  comisd %xmm5,%xmm3
  ja     L51
  movapd %xmm3,%xmm0
  subsd  D147(%rip),%xmm0
  divsd  D63(%rip),%xmm0
L41:
  movsd  %xmm0,0x0(%rbp)
  divsd  D128(%rip),%xmm4
  movapd %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  comisd %xmm5,%xmm0
  ja     L18
  subsd  D147(%rip),%xmm0
  divsd  D63(%rip),%xmm0
L38:
  divsd  D160(%rip),%xmm2
  subsd  %xmm2,%xmm3
  movsd  %xmm0,(%rbx)
  comisd %xmm5,%xmm3
  ja     L44
  subsd  D147(%rip),%xmm3
  divsd  D63(%rip),%xmm3
L29:
  movsd  %xmm3,(%r12)
  movsd  D110(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  D22(%rip),%xmm0
  mulsd  0x0(%rbp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  D93(%rip),%xmm0
  mulsd  (%r12),%xmm0
  movsd  %xmm0,(%r12)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L51:
  movsd  %xmm1,0x10(%rsp)
  movsd  D168(%rip),%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <pow@plt>
  mov    D25(%rip),%rax
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm2
  movq   %rax,%xmm5
  jmp    L41
  xchg   %ax,%ax
L44:
  movsd  D168(%rip),%xmm1
  movapd %xmm3,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm3
  jmp    L29
  nopw   0x0(%rax,%rax,1)
L18:
  movsd  D168(%rip),%xmm1
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <pow@plt>
  mov    D25(%rip),%rax
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  movq   %rax,%xmm5
  jmp    L38
```

tool_calls: name: read_data
arguments: data_tag: D95
type: f64
name: read_data
arguments: data_tag: D25
type: f64
name: read_data
arguments: data_tag: D6
type: f64
name: read_data
arguments: data_tag: D147
type: byte[8]
name: read_data
arguments: data_tag: D63
type: f64
name: read_data
arguments: data_tag: D128
type: f64
name: read_data
arguments: data_tag: D160
type: f64
name: read_data
arguments: data_tag: D110
type: byte[8]
name: read_data
arguments: data_tag: D22
type: f64
name: read_data
arguments: data_tag: D93
type: byte[8]
name: read_data
arguments: data_tag: D168
type: f64

tool: D95: 16

tool: D25: 0.206893

tool: D6: 116

tool: {"D147": [0x96,0x7b,0x1a,0x61,0xb9,0xa7,0xc1,0x3f]}

tool: D63: 7.787

tool: D128: 500

tool: D160: 200

tool: {"D110": [0xb9,0xa5,0xd5,0x90,0xb8,0x4b,0x6e,0x40]}

tool: D22: 255

tool: {"D93": [0xdf,0xc3,0x25,0xc7,0x1d,0x5a,0x71,0x40]}

tool: D168: 3

assistant: ```c
void Lab2XYZ(double L, double a, double b, double *X, double *Y, double *Z) {
  double fX, fY, fZ;
  fY = (L + 16.0) / 116.0;
  if (fY > 0.206893)
    *Y = pow(fY, 3.0);
  else
    *Y = (fY - 16.0 / 116.0) / 7.787;
  fX = a / 500.0 + fY;
  if (fX > 0.206893)
    *X = pow(fX, 3.0);
  else
    *X = (fX - 16.0 / 116.0) / 7.787;
  fZ = fY - b / 200.0;
  if (fZ > 0.206893)
    *Z = pow(fZ, 3.0);
  else
    *Z = (fZ - 16.0 / 116.0) / 7.787;
  (*X) *= (0.950456 * 255.0);
  (*Y) *= 255.0;
  (*Z) *= (1.088754 * 255.0);
}
```