user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<p_env_find_pixel>:
  endbr64
  comiss %xmm0,%xmm1
  mov    %edi,%eax
  pxor   %xmm5,%xmm5
  cvtsi2ss %rax,%xmm5
  mulss  D1(%rip),%xmm5
  mov    %rax,%rdx
  jbe    L13
  movaps %xmm1,%xmm7
  mov    $0x1,%ecx
L40:
  comiss %xmm7,%xmm2
  jbe    L14
  movaps %xmm2,%xmm7
  mov    $0x2,%ecx
L14:
  movss  D10(%rip),%xmm4
  movaps %xmm0,%xmm3
  movaps %xmm1,%xmm6
  cvtss2sd %xmm5,%xmm5
  xorps  %xmm4,%xmm3
  xorps  %xmm4,%xmm6
  xorps  %xmm2,%xmm4
  comiss %xmm7,%xmm3
  jbe    L65
  comiss %xmm1,%xmm0
  jbe    L69
L57:
  comiss %xmm2,%xmm1
  ja     L16
  divss  %xmm1,%xmm4
  movsd  D59(%rip),%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  divss  %xmm1,%xmm3
  cvtss2sd %xmm4,%xmm4
  addsd  %xmm2,%xmm4
  mulsd  %xmm5,%xmm4
  subsd  %xmm4,%xmm0
  cvttsd2si %xmm0,%rax
  cvtss2sd %xmm3,%xmm3
  addsd  %xmm2,%xmm3
  lea    (%rax,%rdx,4),%eax
  imul   %edx,%eax
  mulsd  %xmm5,%xmm3
  cvttsd2si %xmm3,%rdx
  add    %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L13:
  movaps %xmm0,%xmm7
  xor    %ecx,%ecx
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L65:
  comiss %xmm7,%xmm6
  ja     L57
  comiss %xmm7,%xmm4
  ja     L16
  cmp    $0x2,%ecx
  je     L97
  cmp    $0x1,%ecx
  je     L104
  divss  %xmm0,%xmm1
  movsd  D59(%rip),%xmm4
  pxor   %xmm3,%xmm3
  cvtsi2sd %rax,%xmm3
  movapd %xmm3,%xmm6
  divss  %xmm0,%xmm2
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm4,%xmm1
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm6
  cvttsd2si %xmm6,%rax
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm4,%xmm2
  imul   %edx,%eax
  mulsd  %xmm5,%xmm2
  subsd  %xmm2,%xmm3
  cvttsd2si %xmm3,%rdx
  add    %edx,%eax
  ret
  nopl   0x0(%rax)
L69:
  comiss %xmm2,%xmm0
  jbe    L20
L16:
  divss  %xmm2,%xmm6
  movsd  D59(%rip),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  lea    (%rdx,%rdx,4),%eax
  movapd %xmm0,%xmm4
  divss  %xmm2,%xmm3
  cvtss2sd %xmm6,%xmm6
  addsd  %xmm1,%xmm6
  mulsd  %xmm5,%xmm6
  subsd  %xmm6,%xmm4
  cvttsd2si %xmm4,%rcx
  cvtss2sd %xmm3,%xmm3
  addsd  %xmm1,%xmm3
  add    %ecx,%eax
  imul   %edx,%eax
  mulsd  %xmm5,%xmm3
  subsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%rdx
  add    %edx,%eax
  ret
  nop
L20:
  divss  %xmm0,%xmm6
  movsd  D59(%rip),%xmm2
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  lea    (%rdx,%rdx,2),%eax
  divss  %xmm0,%xmm4
  cvtss2sd %xmm6,%xmm6
  addsd  %xmm2,%xmm6
  mulsd  %xmm5,%xmm6
  subsd  %xmm6,%xmm1
  cvttsd2si %xmm1,%rcx
  cvtss2sd %xmm4,%xmm4
  addsd  %xmm2,%xmm4
  add    %ecx,%eax
  imul   %edx,%eax
  mulsd  %xmm5,%xmm4
  cvttsd2si %xmm4,%rdx
  add    %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L104:
  divss  %xmm1,%xmm0
  movsd  D59(%rip),%xmm3
  divss  %xmm1,%xmm2
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm0
  cvttsd2si %xmm0,%rax
  add    %edx,%eax
  imul   %edx,%eax
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm3,%xmm2
  mulsd  %xmm5,%xmm2
  cvttsd2si %xmm2,%rdx
  add    %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L97:
  divss  %xmm2,%xmm1
  movsd  D59(%rip),%xmm4
  pxor   %xmm3,%xmm3
  cvtsi2sd %rax,%xmm3
  divss  %xmm2,%xmm0
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm4,%xmm1
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm3
  cvttsd2si %xmm3,%rax
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm4,%xmm0
  lea    (%rax,%rdx,2),%eax
  imul   %edx,%eax
  mulsd  %xmm5,%xmm0
  cvttsd2si %xmm0,%rdx
  add    %edx,%eax
  ret
```

tool_calls: name: parse_data
arguments: tag: D1
type_infered: f32
name: parse_data
arguments: tag: D10
type_infered: byte[4]
name: parse_data
arguments: tag: D59
type_infered: f64

tool: D1: 0.5

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

tool: D59: 1

assistant: ```c
unsigned int p_env_find_pixel(float x, float y, float z, unsigned int size) {
  unsigned int i, j, found;
  float r, half_size;
  half_size = 0.5 * (float)size;
  r = x;
  found = 0;
  if (y > r) {
    r = y;
    found = 1;
  }
  if (z > r) {
    r = z;
    found = 2;
  }
  if (-x > r) {
    r = -x;
    found = 3;
  }
  if (-y > r) {
    r = -y;
    found = 4;
  }
  if (-z > r) {
    r = -z;
    found = 5;
  }
  switch (found) {
  case 0:
    i = size - ((y / x) + 1.0) * half_size;
    j = size - ((z / x) + 1.0) * half_size;
    return i * size + j;
    break;
  case 1:
    i = ((x / y) + 1.0) * half_size;
    j = ((z / y) + 1.0) * half_size;
    return i * size + j + size * size;
    break;
  case 2:
    i = size - ((y / z) + 1.0) * half_size;
    j = ((x / z) + 1.0) * half_size;
    return i * size + j + size * size * 2;
    break;
  case 3:
    i = size - ((y / -x) + 1.0) * half_size;
    j = ((z / -x) + 1.0) * half_size;
    return i * size + j + size * size * 3;
    break;
  case 4:
    i = size - ((z / -y) + 1.0) * half_size;
    j = ((x / -y) + 1.0) * half_size;
    return i * size + j + size * size * 4;
    break;
  case 5:
    i = size - ((y / -z) + 1.0) * half_size;
    j = size - ((x / -z) + 1.0) * half_size;
    return i * size + j + size * size * 5;
    break;
  }
  return 0;
}
```