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

```asm
<repeat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %esi,%eax
  mov    %edx,-0x4c(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    %r8d,-0x54(%rbp)
  mov    %r9,%rdx
  cmpl   $0x0,-0x50(%rbp)
  jle    L473
  lea    -0x1(%rax),%ecx
  jmp    L453
L473:
  mov    $0x0,%ecx
L453:
  mov    %ecx,%r15d
  cmpl   $0x0,-0x54(%rbp)
  jle    L49
  mov    -0x4c(%rbp),%ecx
  sub    $0x1,%ecx
  jmp    L150
L49:
  mov    $0x0,%ecx
L150:
  imul   %eax,%ecx
  mov    %ecx,-0x58(%rbp)
  cmpl   $0x0,-0x50(%rbp)
  jle    L311
  mov    -0x50(%rbp),%ecx
  sub    $0x1,%ecx
  jmp    L544
L311:
  mov    -0x50(%rbp),%ecx
  mov    $0xffffffff,%esi
  test   %ecx,%ecx
  cmovns %esi,%ecx
  add    $0x1,%ecx
L544:
  mov    %ecx,-0x3c(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  jle    L253
  mov    -0x54(%rbp),%ecx
  sub    $0x1,%ecx
  jmp    L160
L253:
  mov    -0x54(%rbp),%ecx
  mov    $0xffffffff,%esi
  test   %ecx,%ecx
  cmovns %esi,%ecx
  add    $0x1,%ecx
L160:
  imul   %eax,%ecx
  mov    %ecx,-0x38(%rbp)
  mov    %eax,%ecx
  imul   -0x4c(%rbp),%ecx
  mov    %ecx,-0x34(%rbp)
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %eax,%ecx
  sar    %ecx
  mov    %ecx,-0x30(%rbp)
  mov    -0x4c(%rbp),%ecx
  mov    %ecx,%esi
  shr    $0x1f,%esi
  add    %esi,%ecx
  sar    %ecx
  imul   %eax,%ecx
  mov    %ecx,-0x2c(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L260
L418:
  mov    -0x40(%rbp),%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rcx)
  addl   $0x1,-0x40(%rbp)
L260:
  mov    -0x40(%rbp),%ecx
  cmp    -0x34(%rbp),%ecx
  jl     L418
  cmpl   $0x0,0x10(%rbp)
  jne    L368
  mov    $0x0,%r14d
  mov    -0x38(%rbp),%r12d
  jmp    L12
L92:
  mov    %r14d,%r13d
  mov    -0x3c(%rbp),%ebx
  jmp    L362
L85:
  test   %r12d,%r12d
  js     L105
  cmp    -0x34(%rbp),%r12d
  jl     L540
  mov    -0x34(%rbp),%ecx
  mov    %ecx,%esi
  sub    %eax,%esi
  jmp    L392
L540:
  mov    %r12d,%esi
  jmp    L392
L105:
  mov    $0x0,%esi
L392:
  test   %ebx,%ebx
  js     L39
  cmp    %eax,%ebx
  jl     L419
  lea    -0x1(%rax),%ecx
  jmp    L128
L419:
  mov    %ebx,%ecx
  jmp    L128
L39:
  mov    $0x0,%ecx
L128:
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  movsd  (%rcx),%xmm1
  movslq %r13d,%rcx
  shl    $0x3,%rcx
  add    %rdi,%rcx
  movsd  (%rcx),%xmm0
  test   %r12d,%r12d
  js     L164
  cmp    -0x34(%rbp),%r12d
  jl     L184
  mov    -0x34(%rbp),%ecx
  mov    %ecx,%esi
  sub    %eax,%esi
  jmp    L279
L184:
  mov    %r12d,%esi
  jmp    L279
L164:
  mov    $0x0,%esi
L279:
  test   %ebx,%ebx
  js     L144
  cmp    %eax,%ebx
  jl     L369
  lea    -0x1(%rax),%ecx
  jmp    L102
L369:
  mov    %ebx,%ecx
  jmp    L102
L144:
  mov    $0x0,%ecx
L102:
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  add    $0x1,%r13d
  add    $0x1,%ebx
L362:
  lea    (%r14,%rax,1),%ecx
  cmp    %ecx,%r13d
  jl     L85
  add    %eax,%r14d
  add    %eax,%r12d
L12:
  cmp    -0x34(%rbp),%r14d
  jl     L92
  jmp    L76
L368:
  mov    -0x58(%rbp),%ebx
  mov    %ebx,%ecx
  sub    -0x38(%rbp),%ecx
  cmp    %ecx,-0x2c(%rbp)
  je     L284
  mov    %ebx,%r12d
  mov    -0x38(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  sub    %ecx,%ebx
  mov    %ebx,%r14d
  jmp    L471
L246:
  mov    %r15d,%ecx
  sub    -0x3c(%rbp),%ecx
  cmp    %ecx,-0x30(%rbp)
  je     L476
  mov    %r15d,%ebx
  mov    -0x3c(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  mov    %r15d,%r13d
  sub    %ecx,%r13d
  jmp    L8
L487:
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  movsd  (%rcx),%xmm1
  mov    %r14d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r14d,%esi
  mov    %r13d,%ecx
  neg    %ecx
  cmovs  %r13d,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdi,%rcx
  movsd  (%rcx),%xmm0
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  sub    $0x1,%ebx
  sub    $0x1,%r13d
L8:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  cmp    %ecx,%r13d
  jg     L487
  jmp    L200
L476:
  mov    %r15d,%ebx
  mov    -0x3c(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  mov    %r15d,%r13d
  sub    %ecx,%r13d
  jmp    L134
L214:
  mov    %r13d,%r8d
  jmp    L305
L59:
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  movsd  (%rcx),%xmm1
  mov    %r14d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r14d,%esi
  mov    %r8d,%r10d
  mov    %r10d,%ecx
  neg    %ecx
  cmovs  %r10d,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdi,%rcx
  movsd  (%rcx),%xmm0
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  sub    $0x1,%r10d
  mov    %r10d,%r8d
L305:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  mov    %r8d,%esi
  cmp    %ecx,%esi
  jg     L59
  sub    $0x1,%r13d
  sub    $0x1,%ebx
L134:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  cmp    %ecx,%r13d
  jg     L214
L200:
  sub    %eax,%r14d
  sub    %eax,%r12d
L471:
  mov    -0x58(%rbp),%ecx
  sub    -0x34(%rbp),%ecx
  cmp    %ecx,%r14d
  jg     L246
  jmp    L76
L284:
  mov    -0x58(%rbp),%ebx
  mov    %ebx,%r12d
  mov    -0x38(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  sub    %ecx,%ebx
  mov    %ebx,%r14d
  jmp    L259
L287:
  mov    %r14d,%r9d
  jmp    L506
L303:
  mov    %r15d,%ecx
  sub    -0x3c(%rbp),%ecx
  cmp    %ecx,-0x30(%rbp)
  je     L441
  mov    %r15d,%ebx
  mov    -0x3c(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  mov    %r15d,%r13d
  sub    %ecx,%r13d
  jmp    L521
L494:
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  movsd  (%rcx),%xmm1
  mov    %r9d,%r8d
  mov    %r8d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r8d,%esi
  mov    %r13d,%ecx
  neg    %ecx
  cmovs  %r13d,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdi,%rcx
  movsd  (%rcx),%xmm0
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  sub    $0x1,%r13d
  sub    $0x1,%ebx
L521:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  cmp    %ecx,%r13d
  jg     L494
  jmp    L527
L441:
  mov    %r15d,%ebx
  mov    -0x3c(%rbp),%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovns %esi,%ecx
  mov    %r15d,%r13d
  sub    %ecx,%r13d
  jmp    L554
L356:
  mov    %r13d,%r8d
  jmp    L349
L5:
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  movsd  (%rcx),%xmm1
  mov    %r9d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r9d,%esi
  mov    %r8d,%r11d
  mov    %r11d,%ecx
  neg    %ecx
  cmovs  %r11d,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdi,%rcx
  movsd  (%rcx),%xmm0
  mov    %r12d,%ecx
  neg    %ecx
  mov    %ecx,%esi
  cmovs  %r12d,%esi
  mov    %ebx,%ecx
  neg    %ecx
  cmovs  %ebx,%ecx
  add    %esi,%ecx
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  add    %rdx,%rcx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  sub    $0x1,%r11d
  mov    %r11d,%r8d
L349:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  mov    %r8d,%esi
  cmp    %ecx,%esi
  jg     L5
  sub    $0x1,%r13d
  sub    $0x1,%ebx
L554:
  mov    %r15d,%ecx
  sub    %eax,%ecx
  cmp    %ecx,%r13d
  jg     L356
L527:
  mov    %r9d,%ebx
  sub    %eax,%ebx
  mov    %ebx,%r9d
L506:
  mov    -0x58(%rbp),%ecx
  sub    -0x34(%rbp),%ecx
  mov    %r9d,%ebx
  cmp    %ecx,%ebx
  jg     L303
  sub    %eax,%r14d
  sub    %eax,%r12d
L259:
  mov    -0x58(%rbp),%ecx
  sub    -0x34(%rbp),%ecx
  cmp    %ecx,%r14d
  jg     L287
L76:
  mov    $0x0,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int repeat(filt, x_dim, y_dim, x_pos, y_pos, result, r_or_e)
register double *filt, *result;
register int x_dim;
int y_dim, x_pos, y_pos, r_or_e;
{
  register int y_filt, x_filt, y_res, x_res, y_tmp, x_tmp;
  register int x_base = (x_pos > 0) ? (x_dim - 1) : 0;
  register int y_base = x_dim * ((y_pos > 0) ? (y_dim - 1) : 0);
  int x_overhang = ((x_pos > 0) ? (x_pos - 1) : ((x_pos < 0) ? (x_pos + 1) : 0));
  int y_overhang = x_dim * ((y_pos > 0) ? (y_pos - 1) : ((y_pos < 0) ? (y_pos + 1) : 0));
  int filt_sz = x_dim * y_dim;
  int mx_pos = (x_dim / 2);
  int my_pos = x_dim * (y_dim / 2);
  int i;
  for (i = 0; i < filt_sz; i++)
    result[i] = 0.0;
  if (r_or_e == 0)
    for (y_filt = 0, y_res = y_overhang; y_filt < filt_sz; y_filt += x_dim, y_res += x_dim)
      for (x_filt = y_filt, x_res = x_overhang; x_filt < y_filt + x_dim; x_filt++, x_res++)
        result[((y_res >= 0) ? ((y_res < filt_sz) ? y_res : (filt_sz - x_dim)) : 0) + ((x_res >= 0) ? ((x_res < x_dim) ? x_res : (x_dim - 1)) : 0)] += filt[x_filt];
  else {
    if ((y_base - y_overhang) != my_pos)
      for (y_res = y_base, y_filt = y_base - (((y_overhang) >= 0) ? (y_overhang) : (-(y_overhang))); y_filt > y_base - filt_sz; y_filt -= x_dim, y_res -= x_dim)
        if ((x_base - x_overhang) != mx_pos)
          for (x_res = x_base, x_filt = x_base - (((x_overhang) >= 0) ? (x_overhang) : (-(x_overhang))); x_filt > x_base - x_dim; x_res--, x_filt--)
            result[(((y_res) >= 0) ? (y_res) : (-(y_res))) + (((x_res) >= 0) ? (x_res) : (-(x_res)))] += filt[(((y_filt) >= 0) ? (y_filt) : (-(y_filt))) + (((x_filt) >= 0) ? (x_filt) : (-(x_filt)))];
        else
          for (x_res = x_base, x_filt = x_base - (((x_overhang) >= 0) ? (x_overhang) : (-(x_overhang))); x_filt > x_base - x_dim; x_filt--, x_res--)
            for (x_tmp = x_filt; x_tmp > x_base - x_dim; x_tmp--)
              result[(((y_res) >= 0) ? (y_res) : (-(y_res))) + (((x_res) >= 0) ? (x_res) : (-(x_res)))] += filt[(((y_filt) >= 0) ? (y_filt) : (-(y_filt))) + (((x_tmp) >= 0) ? (x_tmp) : (-(x_tmp)))];
    else
      for (y_res = y_base, y_filt = y_base - (((y_overhang) >= 0) ? (y_overhang) : (-(y_overhang))); y_filt > y_base - filt_sz; y_filt -= x_dim, y_res -= x_dim)
        for (y_tmp = y_filt; y_tmp > y_base - filt_sz; y_tmp -= x_dim)
          if ((x_base - x_overhang) != mx_pos)
            for (x_res = x_base, x_filt = x_base - (((x_overhang) >= 0) ? (x_overhang) : (-(x_overhang))); x_filt > x_base - x_dim; x_filt--, x_res--)
              result[(((y_res) >= 0) ? (y_res) : (-(y_res))) + (((x_res) >= 0) ? (x_res) : (-(x_res)))] += filt[(((y_tmp) >= 0) ? (y_tmp) : (-(y_tmp))) + (((x_filt) >= 0) ? (x_filt) : (-(x_filt)))];
          else
            for (x_res = x_base, x_filt = x_base - (((x_overhang) >= 0) ? (x_overhang) : (-(x_overhang))); x_filt > x_base - x_dim; x_filt--, x_res--)
              for (x_tmp = x_filt; x_tmp > x_base - x_dim; x_tmp--)
                result[(((y_res) >= 0) ? (y_res) : (-(y_res))) + (((x_res) >= 0) ? (x_res) : (-(x_res)))] += filt[(((y_tmp) >= 0) ? (y_tmp) : (-(y_tmp))) + (((x_tmp) >= 0) ? (x_tmp) : (-(x_tmp)))];
  }
  return (0);
}
```