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

```asm
<get_edge>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %edi,0x44(%rsp)
  mov    %esi,0x38(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %rcx,0x50(%rsp)
  mov    %r8,0x58(%rsp)
  mov    %r9,0x60(%rsp)
  mov    0xf0(%rsp),%r13
  mov    0xf8(%rsp),%rax
  mov    %rax,0x70(%rsp)
  mov    0x100(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  mov    0x108(%rsp),%r10
  mov    %r10,0x10(%rsp)
  mov    0x110(%rsp),%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    0x1(%rdi),%eax
  mov    %eax,0x3c(%rsp)
  lea    0x1(%rsi),%r15d
  test   %eax,%eax
  jle    L274
  mov    %edi,%eax
  lea    0x8(,%rax,8),%rdx
  mov    $0x0,%eax
  movsd  D7(%rip),%xmm0
  mov    %r10,%rsi
L4:
  movsd  %xmm0,(%rcx,%rax,1)
  movsd  %xmm0,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L4
L274:
  test   %r15d,%r15d
  jle    L108
  mov    0x38(%rsp),%eax
  lea    0x8(,%rax,8),%rdx
  mov    $0x0,%eax
  movsd  D7(%rip),%xmm0
  mov    0x70(%rsp),%rcx
L225:
  movsd  %xmm0,0x0(%r13,%rax,1)
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L225
L108:
  mov    0x44(%rsp),%r14d
  lea    0x2(%r14),%ebp
  mov    %ebp,0x6c(%rsp)
  mov    %ebp,%edi
  shl    $0x4,%edi
  call   <malloc@plt>
  mov    %rax,0x28(%rsp)
  mov    0x38(%rsp),%r12d
  lea    0x4(%r12,%r12,1),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    %rax,0x30(%rsp)
  test   %ebx,%ebx
  setne  0x7a(%rsp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,0x40(%rsp)
  cmpl   $0x0,0x118(%rsp)
  mov    0x3c(%rsp),%ecx
  cmovne %r14d,%ecx
  mov    %ecx,0x4(%rsp)
  cmpl   $0x0,0x120(%rsp)
  setne  0x7b(%rsp)
  setne  %cl
  movzbl %cl,%ecx
  mov    %ecx,0x68(%rsp)
  cmpl   $0x0,0x128(%rsp)
  cmovne %r12d,%r15d
  test   %ebx,%ebx
  je     L147
  cmp    %ecx,%r15d
  jl     L181
  lea    (%rcx,%rcx,1),%eax
  cltq
  lea    (%rdx,%rax,8),%r14
  movslq %ebp,%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  imul   %ecx,%ebp
  mov    %ebp,%eax
  cltq
  lea    0x8(,%rax,8),%rbx
  mov    0x48(%rsp),%rax
  lea    (%rax,%rbx,1),%rbp
  add    0x50(%rsp),%rbx
  mov    %ecx,%r12d
  lea    0x90(%rsp),%rax
  mov    %r13,0x20(%rsp)
  mov    %rax,%r13
L141:
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  -0x8(%rbx),%xmm0
  movsd  %xmm0,0x88(%rsp)
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,0x90(%rsp)
  movsd  (%rbx),%xmm0
  movsd  %xmm0,0x98(%rsp)
  lea    0x80(%rsp),%rdi
  mov    %r14,%rdx
  mov    %r13,%rsi
  call   <mid_pt_sphere@plt>
  add    $0x1,%r12d
  add    $0x10,%r14
  mov    0x18(%rsp),%rax
  add    %rax,%rbp
  add    %rax,%rbx
  cmp    %r12d,%r15d
  jge    L141
  mov    0x20(%rsp),%r13
L181:
  mov    0x68(%rsp),%ecx
  cmp    %ecx,%r15d
  jle    L147
  mov    0x3c(%rsp),%edx
  movslq %edx,%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  mov    %ecx,%eax
  imul   %ecx,%edx
  movslq %edx,%r12
  shl    $0x3,%r12
  mov    0x58(%rsp),%rcx
  lea    (%rcx,%r12,1),%r14
  add    0x60(%rsp),%r12
  add    %eax,%eax
  cltq
  mov    0x30(%rsp),%rsi
  lea    (%rsi,%rax,8),%rbp
  movzbl 0x7b(%rsp),%eax
  movzbl %al,%edx
  lea    0x0(%r13,%rdx,8),%r13
  movzbl %al,%ecx
  mov    %r15d,%eax
  sub    %ecx,%eax
  lea    -0x1(%rax),%eax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rsi,%rax,1),%rax
  mov    %rax,0x20(%rsp)
  lea    0x80(%rsp),%rbx
  mov    %r15d,0x7c(%rsp)
L95:
  movsd  (%r14),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%r12),%xmm0
  movsd  %xmm0,0x88(%rsp)
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <great_circle_distance@plt>
  movq   %xmm0,%r15
  add    $0x10,%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <great_circle_distance@plt>
  movq   %r15,%xmm1
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13)
  mov    0x18(%rsp),%rax
  add    %rax,%r14
  add    %rax,%r12
  add    $0x8,%r13
  cmp    0x20(%rsp),%rbp
  jne    L95
  mov    0x7c(%rsp),%r15d
  cmpl   $0x0,0x118(%rsp)
  jne    L130
  jmp    L223
L147:
  cmpl   $0x0,0x118(%rsp)
  je     L223
  cmp    0x68(%rsp),%r15d
  jl     L40
L130:
  mov    0x6c(%rsp),%edx
  movslq %edx,%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  mov    0x68(%rsp),%ecx
  imul   %ecx,%edx
  movslq %edx,%rbx
  movslq 0x44(%rsp),%rax
  add    %rax,%rbx
  shl    $0x3,%rbx
  mov    0x48(%rsp),%rax
  lea    (%rax,%rbx,1),%rbp
  add    0x50(%rsp),%rbx
  lea    (%rcx,%rcx,1),%eax
  cltq
  mov    0x30(%rsp),%rdx
  lea    (%rdx,%rax,8),%r13
  mov    %ecx,%r12d
  lea    0x90(%rsp),%r14
L41:
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%rbx),%xmm0
  movsd  %xmm0,0x88(%rsp)
  movsd  0x8(%rbp),%xmm0
  movsd  %xmm0,0x90(%rsp)
  movsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x98(%rsp)
  lea    0x80(%rsp),%rdi
  mov    %r13,%rdx
  mov    %r14,%rsi
  call   <mid_pt_sphere@plt>
  add    $0x1,%r12d
  mov    0x18(%rsp),%rax
  add    %rax,%rbp
  add    %rax,%rbx
  add    $0x10,%r13
  cmp    %r12d,%r15d
  jge    L41
L40:
  mov    0x68(%rsp),%ecx
  cmp    %ecx,%r15d
  jle    L223
  mov    0x3c(%rsp),%edx
  movslq %edx,%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  imul   %ecx,%edx
  movslq %edx,%r12
  movslq 0x44(%rsp),%rax
  add    %rax,%r12
  shl    $0x3,%r12
  mov    0x58(%rsp),%rax
  lea    (%rax,%r12,1),%r14
  add    0x60(%rsp),%r12
  lea    (%rcx,%rcx,1),%eax
  cltq
  mov    0x30(%rsp),%rsi
  lea    (%rsi,%rax,8),%rbp
  movzbl 0x7b(%rsp),%eax
  movzbl %al,%edx
  mov    0x70(%rsp),%rcx
  lea    (%rcx,%rdx,8),%r13
  movzbl %al,%ecx
  mov    %r15d,%eax
  sub    %ecx,%eax
  lea    -0x1(%rax),%eax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rsi,%rax,1),%rax
  mov    %rax,0x20(%rsp)
  lea    0x80(%rsp),%r15
L139:
  movsd  (%r14),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%r12),%xmm0
  movsd  %xmm0,0x88(%rsp)
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <great_circle_distance@plt>
  movq   %xmm0,%rbx
  add    $0x10,%rbp
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <great_circle_distance@plt>
  movq   %rbx,%xmm1
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13)
  mov    0x18(%rsp),%rax
  add    %rax,%r14
  add    %rax,%r12
  add    $0x8,%r13
  cmp    0x20(%rsp),%rbp
  jne    L139
L223:
  cmpl   $0x0,0x120(%rsp)
  je     L167
  mov    0x40(%rsp),%eax
  cmp    %eax,0x4(%rsp)
  jl     L101
  movzbl 0x7a(%rsp),%ebx
  add    %eax,%eax
  cltq
  mov    0x28(%rsp),%rcx
  lea    (%rcx,%rax,8),%r12
  movslq 0x6c(%rsp),%rbp
  add    %rbx,%rbp
  shl    $0x3,%rbp
  lea    0x90(%rsp),%r13
  mov    0x48(%rsp),%r14
  mov    0x50(%rsp),%r15
L14:
  movsd  (%r14,%rbx,8),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%r15,%rbx,8),%xmm0
  movsd  %xmm0,0x88(%rsp)
  movsd  (%r14,%rbp,1),%xmm0
  movsd  %xmm0,0x90(%rsp)
  movsd  (%r15,%rbp,1),%xmm0
  movsd  %xmm0,0x98(%rsp)
  lea    0x80(%rsp),%rdi
  mov    %r12,%rdx
  mov    %r13,%rsi
  call   <mid_pt_sphere@plt>
  add    $0x1,%rbx
  add    $0x10,%r12
  add    $0x8,%rbp
  cmp    %ebx,0x4(%rsp)
  jge    L14
L101:
  mov    0x40(%rsp),%eax
  cmp    %eax,0x4(%rsp)
  jle    L167
  movzbl 0x7a(%rsp),%ebx
  add    %eax,%eax
  cltq
  mov    0x28(%rsp),%rcx
  lea    (%rcx,%rax,8),%r12
  lea    0x80(%rsp),%r13
  mov    0x60(%rsp),%r14
  mov    %r13,%r15
  mov    0x58(%rsp),%r13
L213:
  movsd  0x0(%r13,%rbx,8),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%r14,%rbx,8),%xmm0
  movsd  %xmm0,0x88(%rsp)
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <great_circle_distance@plt>
  movq   %xmm0,%rbp
  add    $0x10,%r12
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <great_circle_distance@plt>
  movq   %rbp,%xmm1
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm0,(%rax,%rbx,8)
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L213
  cmpl   $0x0,0x128(%rsp)
  jne    L165
  jmp    L259
L167:
  cmpl   $0x0,0x128(%rsp)
  je     L259
  mov    0x40(%rsp),%ecx
  cmp    %ecx,0x4(%rsp)
  jl     L111
L165:
  mov    0x6c(%rsp),%ecx
  mov    %ecx,%eax
  imul   0x38(%rsp),%eax
  movzbl 0x7a(%rsp),%ebx
  mov    0x40(%rsp),%edx
  add    %edx,%edx
  movslq %edx,%rdx
  mov    0x28(%rsp),%rsi
  lea    (%rsi,%rdx,8),%rbp
  movslq %eax,%r13
  shl    $0x3,%r13
  mov    0x48(%rsp),%rdx
  lea    (%rdx,%r13,1),%r15
  mov    0x50(%rsp),%rsi
  add    %rsi,%r13
  add    %eax,%ecx
  movslq %ecx,%r12
  shl    $0x3,%r12
  lea    (%rdx,%r12,1),%r14
  add    %rsi,%r12
  lea    0x90(%rsp),%rax
  mov    %rax,0x8(%rsp)
L240:
  movsd  (%r15,%rbx,8),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  0x0(%r13,%rbx,8),%xmm0
  movsd  %xmm0,0x88(%rsp)
  movsd  (%r14,%rbx,8),%xmm0
  movsd  %xmm0,0x90(%rsp)
  movsd  (%r12,%rbx,8),%xmm0
  movsd  %xmm0,0x98(%rsp)
  lea    0x80(%rsp),%rdi
  mov    %rbp,%rdx
  mov    0x8(%rsp),%rsi
  call   <mid_pt_sphere@plt>
  add    $0x1,%rbx
  add    $0x10,%rbp
  cmp    %ebx,0x4(%rsp)
  jge    L240
L111:
  mov    0x40(%rsp),%eax
  cmp    %eax,0x4(%rsp)
  jle    L259
  movzbl 0x7a(%rsp),%ebx
  add    %eax,%eax
  cltq
  mov    0x28(%rsp),%rcx
  lea    (%rcx,%rax,8),%r12
  mov    0x3c(%rsp),%r14d
  imul   0x38(%rsp),%r14d
  movslq %r14d,%r14
  shl    $0x3,%r14
  mov    0x58(%rsp),%r15
  add    %r14,%r15
  add    0x60(%rsp),%r14
  lea    0x80(%rsp),%r13
L262:
  movsd  (%r15,%rbx,8),%xmm0
  movsd  %xmm0,0x80(%rsp)
  movsd  (%r14,%rbx,8),%xmm0
  movsd  %xmm0,0x88(%rsp)
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <great_circle_distance@plt>
  movq   %xmm0,%rbp
  add    $0x10,%r12
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <great_circle_distance@plt>
  movq   %rbp,%xmm1
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  mov    0x10(%rsp),%rax
  movsd  %xmm0,(%rax,%rbx,8)
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L262
L259:
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L266
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L266:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D7
type_guessed: f64

tool: D7: 0.5

assistant: ```c
void get_edge(int nx, int ny, const double *lont, const double *latt, const double *lonc, const double *latc, double *edge_w, double *edge_e, double *edge_s, double *edge_n, int on_west_edge, int on_east_edge, int on_south_edge, int on_north_edge) {
  int i, j, nxp, nyp;
  int istart, iend, jstart, jend;
  double p1[2], p2[2];
  double *py, *px;
  double d1, d2;
  nxp = nx + 1;
  nyp = ny + 1;
  for (i = 0; i < nxp; i++) {
    edge_s[i] = 0.5;
    edge_n[i] = 0.5;
  }
  for (j = 0; j < nyp; j++) {
    edge_w[j] = 0.5;
    edge_e[j] = 0.5;
  }
  px = (double *)malloc(2 * (nx + 2) * sizeof(double));
  py = (double *)malloc(2 * (ny + 2) * sizeof(double));
  if (on_west_edge)
    istart = 1;
  else
    istart = 0;
  if (on_east_edge)
    iend = nx;
  else
    iend = nxp;
  if (on_south_edge)
    jstart = 1;
  else
    jstart = 0;
  if (on_north_edge)
    jend = ny;
  else
    jend = nyp;
  if (on_west_edge) {
    i = 0;
    for (j = jstart; j <= jend; j++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[j * (nx + 2) + i + 1];
      p2[1] = latt[j * (nx + 2) + i + 1];
      mid_pt_sphere(p1, p2, &(py[2 * j]));
    }
    for (j = jstart; j < jend; j++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(py + 2 * j, p1);
      d2 = great_circle_distance(py + 2 * (j + 1), p1);
      edge_w[j] = d2 / (d1 + d2);
    }
  }
  if (on_east_edge) {
    i = nx;
    for (j = jstart; j <= jend; j++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[j * (nx + 2) + i + 1];
      p2[1] = latt[j * (nx + 2) + i + 1];
      mid_pt_sphere(p1, p2, &(py[2 * j]));
    }
    for (j = jstart; j < jend; j++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(py[2 * j]), p1);
      d2 = great_circle_distance(&(py[2 * (j + 1)]), p1);
      edge_e[j] = d2 / (d1 + d2);
    }
  }
  if (on_south_edge) {
    j = 0;
    for (i = istart; i <= iend; i++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[(j + 1) * (nx + 2) + i];
      p2[1] = latt[(j + 1) * (nx + 2) + i];
      mid_pt_sphere(p1, p2, &(px[2 * i]));
    }
    for (i = istart; i < iend; i++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(px[2 * i]), p1);
      d2 = great_circle_distance(&(px[2 * (i + 1)]), p1);
      edge_s[i] = d2 / (d1 + d2);
    }
  }
  if (on_north_edge) {
    j = ny;
    for (i = istart; i <= iend; i++) {
      p1[0] = lont[j * (nx + 2) + i];
      p1[1] = latt[j * (nx + 2) + i];
      p2[0] = lont[(j + 1) * (nx + 2) + i];
      p2[1] = latt[(j + 1) * (nx + 2) + i];
      mid_pt_sphere(p1, p2, &(px[2 * i]));
    }
    for (i = istart; i < iend; i++) {
      p1[0] = lonc[j * nxp + i];
      p1[1] = latc[j * nxp + i];
      d1 = great_circle_distance(&(px[2 * i]), p1);
      d2 = great_circle_distance(&(px[2 * (i + 1)]), p1);
      edge_n[i] = d2 / (d1 + d2);
    }
  }
  free(px);
  free(py);
}
```