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

```asm
<geometry>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  movapd %xmm1,%xmm6
  movapd %xmm2,%xmm5
  mov    %ecx,%eax
  movapd %xmm3,%xmm2
  movapd %xmm4,%xmm1
  mov    %r8d,-0x84(%rbp)
  mov    %r9,-0x90(%rbp)
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm6,%xmm0
  movss  %xmm0,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm5,%xmm0
  movss  %xmm0,-0x78(%rbp)
  mov    %dx,-0x74(%rbp)
  mov    %ax,-0x6c(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm2,%xmm0
  movss  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  movss  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x68(%rbp),%xmm0
  movsd  D19(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x70(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L85
  movss  D21(%rip),%xmm0
  movss  %xmm0,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x48(%rbp)
  jmp    L109
L85:
  movss  -0x70(%rbp),%xmm0
  movss  %xmm0,-0x50(%rbp)
  movss  D21(%rip),%xmm0
  movss  %xmm0,-0x48(%rbp)
L109:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x78(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L6
  movss  D21(%rip),%xmm0
  movss  %xmm0,-0x4c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  jmp    L56
L6:
  movss  -0x78(%rbp),%xmm0
  movss  %xmm0,-0x4c(%rbp)
  movss  D21(%rip),%xmm0
  movss  %xmm0,-0x44(%rbp)
L56:
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L128
L121:
  mov    -0x40(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L161
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L161:
  movl   $0x0,-0x3c(%rbp)
  jmp    L163
L21:
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x40(%rbp),%xmm0
  movss  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x3c(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x3c(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x40(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movswl -0x74(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm0,%xmm1
  movss  -0x48(%rbp),%xmm0
  mulss  -0x34(%rbp),%xmm0
  divss  -0x50(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x40(%rbp),%xmm0
  movaps %xmm0,%xmm2
  mulss  -0x80(%rbp),%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x3c(%rbp),%xmm0
  mulss  %xmm2,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x40(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x3c(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x8(%rbp),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movswl -0x6c(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm0,%xmm1
  movss  -0x44(%rbp),%xmm0
  mulss  -0x38(%rbp),%xmm0
  divss  -0x4c(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x40(%rbp),%xmm0
  movaps %xmm0,%xmm2
  mulss  -0x88(%rbp),%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x3c(%rbp),%xmm0
  mulss  %xmm2,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0x70(%rbp),%xmm0
  jp     L38
  pxor   %xmm0,%xmm0
  ucomiss -0x70(%rbp),%xmm0
  je     L173
L38:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x34(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x38(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L173:
  pxor   %xmm0,%xmm0
  ucomiss -0x78(%rbp),%xmm0
  jp     L20
  pxor   %xmm0,%xmm0
  ucomiss -0x78(%rbp),%xmm0
  je     L143
L20:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x38(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x8(%rbp),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L143:
  movsd  -0x28(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x30(%rbp)
  movsd  -0x20(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x84(%rbp)
  jne    L34
  cmpl   $0x0,-0x30(%rbp)
  js     L108
  mov    -0x30(%rbp),%eax
  cltq
  cmp    %rax,0x10(%rbp)
  jle    L108
  cmpl   $0x0,-0x2c(%rbp)
  js     L108
  mov    -0x2c(%rbp),%eax
  cltq
  cmp    %rax,-0x90(%rbp)
  jg     L119
L108:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  movw   $0x96,(%rax)
  jmp    L198
L119:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  add    %rdx,%rdx
  add    %rcx,%rdx
  movzwl (%rax),%eax
  mov    %ax,(%rdx)
  jmp    L198
L34:
  mov    -0x90(%rbp),%rsi
  movsd  -0x20(%rbp),%xmm0
  mov    -0x28(%rbp),%rcx
  mov    -0x58(%rbp),%rax
  mov    0x10(%rbp),%rdx
  movapd %xmm0,%xmm1
  movq   %rcx,%xmm0
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <bilinear_interpolate@plt>
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  add    %rdx,%rdx
  add    %rcx,%rdx
  mov    %ax,(%rdx)
L198:
  addl   $0x1,-0x3c(%rbp)
L163:
  mov    -0x3c(%rbp),%eax
  cltq
  cmp    %rax,0x10(%rbp)
  jg     L21
  addl   $0x1,-0x40(%rbp)
L128:
  mov    -0x40(%rbp),%eax
  cltq
  cmp    %rax,-0x90(%rbp)
  jg     L121
  mov    $0x1,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D19
type_infered: f64
name: disassemble_data
arguments: label: D73
type_infered: f64
name: disassemble_data
arguments: label: D21
type_infered: f32
name: disassemble_data
arguments: label: D14
type_infered: string

tool: D19: 57.29577951

tool: D73: 1e-05

tool: D21: 1

tool: D14: %d 

assistant: ```c
int geometry(the_image, out_image, x_angle, x_stretch, y_stretch, x_displace, y_displace, x_cross, y_cross, bilinear, rows, cols)
float x_angle, x_stretch, y_stretch, x_cross, y_cross;
int bilinear;
long cols, rows;
short **the_image, **out_image, x_displace, y_displace;
{
  double cosa, sina, radian_angle, tmpx, tmpy;
  float fi, fj, x_div, y_div, x_num, y_num;
  int i, j, new_i, new_j;
  radian_angle = x_angle / 57.29577951;
  cosa = cos(radian_angle);
  sina = sin(radian_angle);
  if (x_stretch < 0.00001) {
    x_div = 1.0;
    x_num = 0.0;
  } else {
    x_div = x_stretch;
    x_num = 1.0;
  }
  if (y_stretch < 0.00001) {
    y_div = 1.0;
    y_num = 0.0;
  } else {
    y_div = y_stretch;
    y_num = 1.0;
  }
  printf("\n");
  for (i = 0; i < rows; i++) {
    if ((i % 10) == 0)
      printf("%d ", i);
    for (j = 0; j < cols; j++) {
      fi = i;
      fj = j;
      tmpx = (double)(j)*cosa + (double)(i)*sina + (double)(x_displace) + (double)(x_num * fj / x_div) + (double)(x_cross * i * j);
      tmpy = (double)(i)*cosa - (double)(j)*sina + (double)(y_displace) + (double)(y_num * fi / y_div) + (double)(y_cross * i * j);
      if (x_stretch != 0.0)
        tmpx = tmpx - (double)(fj * cosa + fi * sina);
      if (y_stretch != 0.0)
        tmpy = tmpy - (double)(fi * cosa - fj * sina);
      new_j = tmpx;
      new_i = tmpy;
      if (bilinear == 0) {
        if (new_j < 0 || new_j >= cols || new_i < 0 || new_i >= rows)
          out_image[i][j] = 150;
        else
          out_image[i][j] = the_image[new_i][new_j];
      } else {
        out_image[i][j] = bilinear_interpolate(the_image, tmpx, tmpy, rows, cols);
      }
    }
  }
  return (1);
}
```