user: Converte this assembly snippet into its equivalent C code:

```asm
<boxBlurH_4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %ecx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D4(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L17
L39:
  mov    -0x34(%rbp),%eax
  imul   -0x54(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x10(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L94
L22:
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x30(%rbp)
L94:
  mov    -0x30(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jl     L22
  movl   $0x0,-0x30(%rbp)
  jmp    L93
L83:
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  subsd  -0x10(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <round@plt>
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x2c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L93:
  mov    -0x30(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jle    L83
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L36
L84:
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <round@plt>
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x2c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L36:
  mov    -0x54(%rbp),%eax
  sub    -0x5c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L84
  mov    -0x54(%rbp),%eax
  sub    -0x5c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L81
L3:
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <round@plt>
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x2c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L81:
  mov    -0x30(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L3
  addl   $0x1,-0x34(%rbp)
L17:
  mov    -0x34(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L39
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D4
type: f64

tool: D4: 1

assistant: ```c
void boxBlurH_4(int *source, int *dest, int w, int h, int r) {
  int i, j;
  double iar = (double)1 / (r + r + 1);
  for (i = 0; i < h; i++) {
    int ti = i * w;
    int li = ti;
    int ri = ti + r;
    double fv = source[ti];
    double lv = source[ti + w - 1];
    double val = (r + 1) * fv;
    for (j = 0; j < r; j++)
      val += source[ti + j];
    for (j = 0; j <= r; j++) {
      val += source[ri++] - fv;
      dest[ti++] = (int)round(val * iar);
    }
    for (j = r + 1; j < w - r; j++) {
      val += source[ri++] - dest[li++];
      dest[ti++] = (int)round(val * iar);
    }
    for (j = w - r; j < w; j++) {
      val += lv - source[li++];
      dest[ti++] = (int)round(val * iar);
    }
  }
}
```