user: 这段汇编代码用C语言表示是什么样的？

```asm
<RGBE_to_RGBdivA>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %edx,%r12d
  test   %esi,%esi
  setle  %al
  test   %edx,%edx
  setle  %dl
  or     %dl,%al
  jne    L18
  mov    %rdi,%rbx
  mov    %esi,%ebp
  test   %rdi,%rdi
  je     L18
  movss  D46(%rip),%xmm6
  movss  %xmm6,0xc(%rsp)
  test   %ecx,%ecx
  jne    L20
L30:
  imul   %r12d,%ebp
  lea    (%rbx,%rbp,4),%rbp
  jmp    L62
L20:
  mov    %r12d,%edx
  call   <find_max_RGBE@plt>
  movss  D16(%rip),%xmm1
  divss  %xmm0,%xmm1
  movss  %xmm1,0xc(%rsp)
  jmp    L30
L49:
  mov    %al,0x3(%rbx)
  movzbl %al,%eax
  pxor   %xmm3,%xmm3
  cvtsi2ss %eax,%xmm3
  mulss  %xmm3,%xmm2
  movss  D21(%rip),%xmm0
  addss  %xmm0,%xmm2
  cvttss2si %xmm2,%eax
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %al,(%rbx)
  mulss  %xmm3,%xmm1
  addss  %xmm0,%xmm1
  cvttss2si %xmm1,%eax
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %al,0x1(%rbx)
  mulss  %xmm4,%xmm3
  addss  %xmm0,%xmm3
  cvttss2si %xmm3,%eax
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %al,0x2(%rbx)
  add    $0x4,%rbx
  cmp    %rbp,%rbx
  je     L80
L62:
  movzbl 0x3(%rbx),%edi
  add    $0xffffff80,%edi
  movss  D10(%rip),%xmm0
  call   <ldexp@plt>
  mulss  0xc(%rsp),%xmm0
  movzbl (%rbx),%eax
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  mulss  %xmm0,%xmm2
  movzbl 0x1(%rbx),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  mulss  %xmm0,%xmm1
  movzbl 0x2(%rbx),%eax
  pxor   %xmm4,%xmm4
  cvtsi2ss %eax,%xmm4
  mulss  %xmm0,%xmm4
  movaps %xmm2,%xmm0
  maxss  %xmm1,%xmm0
  movaps %xmm4,%xmm5
  maxss  %xmm0,%xmm5
  movaps %xmm5,%xmm0
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm5
  jp     L92
  mov    $0x1,%eax
  je     L49
L92:
  movss  D16(%rip),%xmm3
  divss  %xmm0,%xmm3
  cvttss2si %xmm3,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  cvttss2si %xmm0,%edx
  mov    $0xffffffff,%eax
  cmp    $0xff,%edx
  jg     L49
  test   %edx,%edx
  mov    $0x1,%eax
  cmovg  %edx,%eax
  jmp    L49
L80:
  mov    $0x1,%eax
  jmp    L65
L18:
  mov    $0x0,%eax
L65:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: unpack_data
arguments: label: D46
data_type: byte[4]
name: unpack_data
arguments: label: D16
data_type: byte[4]
name: unpack_data
arguments: label: D21
data_type: byte[4]
name: unpack_data
arguments: label: D10
data_type: byte[4]

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

tool: {"D16": [0x00,0x00,0x7f,0x43]}

tool: {"D21": [0x00,0x00,0x00,0x3f]}

tool: {"D10": [0x81,0x80,0x80,0x3b]}

assistant: ```c
int RGBE_to_RGBdivA(unsigned char *image, int width, int height, int rescale_to_max) {
  int i, iv;
  unsigned char *img = image;
  float scale = 1.0f;
  if ((!image) || (width < 1) || (height < 1)) {
    return 0;
  }
  if (rescale_to_max) {
    scale = 255.0f / find_max_RGBE(image, width, height);
  }
  for (i = width * height; i > 0; --i) {
    float r, g, b, e, m;
    e = scale * ldexp(1.0f / 255.0f, (int)(img[3]) - 128);
    r = e * img[0];
    g = e * img[1];
    b = e * img[2];
    m = (r > g) ? r : g;
    m = (b > m) ? b : m;
    iv = (int)((m != 0.0f) ? (int)(255.0f / m) : 1.0f);
    iv = (iv < 1) ? 1 : iv;
    img[3] = (unsigned char)((iv > 255) ? 255 : iv);
    iv = (int)(img[3] * r + 0.5f);
    img[0] = (unsigned char)((iv > 255) ? 255 : iv);
    iv = (int)(img[3] * g + 0.5f);
    img[1] = (unsigned char)((iv > 255) ? 255 : iv);
    iv = (int)(img[3] * b + 0.5f);
    img[2] = (unsigned char)((iv > 255) ? 255 : iv);
    img += 4;
  }
  return 1;
}
```