user: 下面的汇编指令对应的C源代码是什么:

```asm
<hpp_simulation>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,%ebx
  mov    %edi,0x30(%rsp)
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm1,0x28(%rsp)
  mov    %esi,%r15d
  mov    %esi,0x34(%rsp)
  test   %edi,%edi
  setg   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r15d,%edi
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  movslq %ebx,%r14
  imul   %ebx,%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x38(%rsp)
  mov    %rax,0x20(%rsp)
  test   %r12,%r12
  je     L69
  test   %rax,%rax
  je     L69
L47:
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    0x38(%rsp),%rdi
  call   <memset@plt>
  mov    0x30(%rsp),%ecx
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0x1c(%rsp)
  movsd  0x28(%rsp),%xmm7
  comisd 0x10(%rsp),%xmm7
  jbe    L99
  lea    0x48(%rsp),%r15
L52:
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  lea    0x40(%rsp),%r13
L19:
  mov    %r13,%rsi
  mov    %r15,%rdi
  movsd  0x8(%rsp),%xmm0
  call   <sincos@plt>
  mov    0x40(%rsp),%rbp
  mov    0x48(%rsp),%rbx
  movsd  0x8(%rsp),%xmm0
  call   <conv_angle_to_direc@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x1c(%rsp),%xmm1
  movq   %rbp,%xmm5
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm2,%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%esi
  movq   %rbx,%xmm6
  mulsd  %xmm2,%xmm6
  movapd %xmm6,%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edx
  movslq %edx,%rdx
  imul   %r14,%rdx
  add    %r12,%rdx
  movslq %esi,%rsi
  mov    $0x1,%edi
  mov    %eax,%ecx
  shl    %cl,%edi
  or     %dil,(%rdx,%rsi,1)
  movsd  D19(%rip),%xmm7
  divsd  %xmm2,%xmm7
  movapd %xmm7,%xmm3
  addsd  0x8(%rsp),%xmm3
  movsd  %xmm3,0x8(%rsp)
  movsd  D11(%rip),%xmm4
  comisd %xmm3,%xmm4
  ja     L19
  movsd  D19(%rip),%xmm5
  addsd  %xmm2,%xmm5
  movsd  %xmm5,0x10(%rsp)
  movsd  0x28(%rsp),%xmm7
  comisd %xmm5,%xmm7
  ja     L52
L99:
  cmpl   $0x0,0x34(%rsp)
  jle    L38
  mov    $0x0,%ebx
  jmp    L74
L69:
  lea    D0(%rip),%rdi
  call   <perror@plt>
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L47
L21:
  mov    %r12,%rax
  mov    0x20(%rsp),%r12
  mov    %rax,0x20(%rsp)
L74:
  mov    0x30(%rsp),%edx
  mov    0x20(%rsp),%rsi
  mov    %r12,%rdi
  call   <take_next_step@plt>
  add    $0x1,%ebx
  cmp    %ebx,0x34(%rsp)
  jne    L21
L43:
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L38:
  mov    %r12,0x20(%rsp)
  mov    0x38(%rsp),%r12
  jmp    L43
```

tool_calls: name: retrieve_data
arguments: data_tag: D19
type: f64
name: retrieve_data
arguments: data_tag: D11
type: byte[8]
name: retrieve_data
arguments: data_tag: D0
type: string

tool: D19: 0.5

tool: {"D11": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: D0: malloc (lattice)

assistant: ```c
char *hpp_simulation(int dim, double r0, double r1, int nsteps) {
  assert(dim > 0);
  assert(nsteps >= 0);
  char(*oldlat)[dim] = (char(*)[dim])malloc(dim * dim * sizeof(char));
  char(*newlat)[dim] = (char(*)[dim])malloc(dim * dim * sizeof(char));
  if (oldlat == NULL || newlat == NULL) {
    perror("malloc (lattice)");
    abort();
  }
  double radius, angle;
  memset(oldlat, 0, dim * dim * sizeof(char));
  memset(newlat, 0, dim * dim * sizeof(char));
  for (radius = r0; radius < r1; radius += 0.5) {
    for (angle = 0; angle < 2 * (atan(1.0) * 4.0); angle += 0.5 / radius) {
      int direc = conv_angle_to_direc(angle);
      int x = radius * cos(angle) + dim / 2;
      int y = radius * sin(angle) + dim / 2;
      ((oldlat[y][x]) |= (1 << (direc)));
    }
  }
  int i;
  char(*tmp)[dim];
  for (i = 0; i < nsteps; i++) {
    take_next_step((char *)oldlat, (char *)newlat, dim);
    tmp = oldlat;
    oldlat = newlat;
    newlat = tmp;
  }
  free(newlat);
  return (char *)oldlat;
}
```