user: What would the C source look like for the assembly code provided here?

```asm
<temperature_to_colour>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x58(%rbp)
  mov    %rdi,-0x60(%rbp)
  mov    %rsi,-0x68(%rbp)
  mov    %rdx,-0x70(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D21(%rip),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  D20(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D3(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x64,-0x50(%rbp)
  movl   $0xe6,-0x4c(%rbp)
  movl   $0xfc,-0x2c(%rbp)
  movl   $0x9d,-0x28(%rbp)
  movl   $0x99,-0x24(%rbp)
  movl   $0x94,-0x20(%rbp)
  movl   $0x18,-0x1c(%rbp)
  movl   $0x18,-0x18(%rbp)
  movl   $0xc8,-0x14(%rbp)
  movl   $0xc8,-0x10(%rbp)
  movl   $0xc8,-0xc(%rbp)
  movsd  -0x38(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L33
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
L33:
  movsd  -0x58(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L30
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
L30:
  movsd  -0x58(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jbe    L18
  mov    -0x20(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x40(%rbp),%xmm1
  mov    -0x2c(%rbp),%eax
  mov    -0x20(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  subsd  -0x40(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x40(%rbp),%xmm1
  mov    -0x28(%rbp),%eax
  mov    -0x1c(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  subsd  -0x40(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x40(%rbp),%xmm1
  mov    -0x24(%rbp),%eax
  mov    -0x18(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  subsd  -0x40(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L48
L18:
  mov    -0x14(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x20(%rbp),%eax
  mov    -0x14(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  subsd  -0x38(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x1c(%rbp),%eax
  mov    -0x10(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  subsd  -0x38(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x18(%rbp),%eax
  mov    -0xc(%rbp),%edx
  sub    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  subsd  -0x38(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  mov    %dl,(%rax)
L48:
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x4c(%rbp),%xmm2
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x50(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  subsd  -0x38(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%rax
  mov    %dl,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L32
  call   <__stack_chk_fail@plt>
L32:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D21
data_type: byte[8]
name: unpack_data
arguments: data_label: D20
data_type: byte[8]
name: unpack_data
arguments: data_label: D3
data_type: byte[8]

tool: {"D21": [0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x40]}

tool: {"D20": [0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x40]}

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x40,0x7f,0x40]}

assistant: ```c
void temperature_to_colour(double temperature, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *transparency) {
  const double max_temperature = 1600;
  const double medium_temperature = 800;
  const double min_temperature = 500;
  const int transparency_hot = 100;
  const int transparency_cold = 230;
  int colour_hot[] = {252, 157, 153};
  int colour_medium[] = {148, 24, 24};
  int colour_cold[] = {200, 200, 200};
  if (temperature < min_temperature) {
    temperature = min_temperature;
  }
  if (temperature > max_temperature) {
    temperature = max_temperature;
  }
  if (temperature > medium_temperature) {
    *r = (unsigned char)(colour_medium[0] + ((temperature - medium_temperature) * (colour_hot[0] - colour_medium[0]) / (max_temperature - medium_temperature)));
    *g = (unsigned char)(colour_medium[1] + ((temperature - medium_temperature) * (colour_hot[1] - colour_medium[1]) / (max_temperature - medium_temperature)));
    *b = (unsigned char)(colour_medium[2] + ((temperature - medium_temperature) * (colour_hot[2] - colour_medium[2]) / (max_temperature - medium_temperature)));
  } else {
    *r = (unsigned char)(colour_cold[0] + ((temperature - min_temperature) * (colour_medium[0] - colour_cold[0]) / (medium_temperature - min_temperature)));
    *g = (unsigned char)(colour_cold[1] + ((temperature - min_temperature) * (colour_medium[1] - colour_cold[1]) / (medium_temperature - min_temperature)));
    *b = (unsigned char)(colour_cold[2] + ((temperature - min_temperature) * (colour_medium[2] - colour_cold[2]) / (medium_temperature - min_temperature)));
  }
  *transparency = (unsigned char)(transparency_cold + ((temperature - min_temperature) * (transparency_hot - transparency_cold) / (max_temperature - min_temperature)));
}
```