user: 请从给定的汇编指令推导出C源代码：

```asm
<repeat>:
  endbr64
  push   %r15
  mov    %ecx,%eax
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  mov    0x60(%rsp),%r13d
  test   %ecx,%ecx
  jle    L572
  lea    -0x1(%rsi),%r12d
  test   %r8d,%r8d
  jle    L98
  lea    -0x1(%rdx),%ecx
  imul   %esi,%ecx
L191:
  lea    -0x1(%rax),%r15d
L335:
  test   %r8d,%r8d
  mov    $0xffffffff,%eax
  lea    -0x1(%r8),%edx
  mov    %ecx,0x10(%rsp)
  cmovs  %r8d,%eax
  add    $0x1,%eax
  test   %r8d,%r8d
  cmovg  %edx,%eax
  imul   %ebp,%eax
  mov    %eax,0x14(%rsp)
  mov    %ebp,%eax
  imul   %r14d,%eax
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  jle    L206
  movslq %eax,%r8
  xor    %esi,%esi
  mov    %r9,%rdi
  lea    0x0(,%r8,8),%rdx
  mov    %r8,(%rsp)
  call   <memset@plt>
  test   %r13d,%r13d
  mov    (%rsp),%r8
  mov    %rax,%r9
  jne    L334
  movslq 0x14(%rsp),%rdx
  movslq %ebp,%rax
  sub    %rax,%r8
  lea    0x0(,%rax,8),%rdi
  mov    %rdx,%rcx
  lea    (%r9,%rdx,8),%rsi
  mov    0xc(%rsp),%edx
  lea    (%r9,%r8,8),%rax
  mov    %rax,0x18(%rsp)
  mov    %edx,%eax
  mov    %rdi,(%rsp)
  mov    $0x1,%edi
  sub    %ebp,%eax
  mov    %eax,0x10(%rsp)
  cltq
  lea    (%r9,%rax,8),%r10
  lea    -0x1(%rdx),%eax
  cltq
  lea    (%r9,%rax,8),%r8
  lea    -0x1(%rbp),%eax
  cltq
  lea    (%r9,%rax,8),%r11
  nop
L233:
  movslq %r13d,%rax
  lea    -0x1(%rdi),%edx
  add    %ebp,%r13d
  cmp    %r13d,%edx
  jge    L485
  test   %ecx,%ecx
  js     L187
  cmp    %ecx,0xc(%rsp)
  jle    L610
  test   %r15d,%r15d
  jns    L409
  lea    (%r15,%rbp,1),%r14d
  xor    %eax,%eax
  movsd  (%rsi),%xmm0
  movslq %edi,%r12
  test   %r14d,%r14d
  mov    %r15d,%edx
  cmovg  %eax,%r14d
  nopl   0x0(%rax)
L330:
  addsd  -0x8(%rbx,%r12,8),%xmm0
  add    $0x1,%edx
  movslq %r12d,%rax
  add    $0x1,%r12
  movsd  %xmm0,(%rsi)
  cmp    %edx,%r14d
  jg     L330
  cmp    %eax,%r13d
  jle    L485
L540:
  mov    0x14(%rsp),%r14d
  lea    -0x1(%r14,%r13,1),%r12d
  movslq %r12d,%r12
  lea    (%r9,%r12,8),%r14
  nopl   0x0(%rax,%rax,1)
L436:
  cmp    %edx,%ebp
  jg     L2
  movsd  (%r14),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  add    $0x1,%edx
  movsd  %xmm0,(%r14)
  cmp    %eax,%r13d
  jg     L436
L485:
  add    %ebp,%ecx
  add    (%rsp),%rsi
  add    %ebp,%edi
  cmp    %r13d,0xc(%rsp)
  jg     L233
L206:
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  xor    %ecx,%ecx
  jmp    L191
  nopw   0x0(%rax,%rax,1)
L2:
  lea    (%rcx,%rdx,1),%r12d
  add    $0x1,%edx
  movslq %r12d,%r12
  lea    (%r9,%r12,8),%r12
  movsd  (%r12),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  movsd  %xmm0,(%r12)
  cmp    %eax,%r13d
  jg     L436
  add    %ebp,%ecx
  add    (%rsp),%rsi
  add    %ebp,%edi
  cmp    %r13d,0xc(%rsp)
  jg     L233
  jmp    L206
  nopl   (%rax)
L187:
  test   %r15d,%r15d
  jns    L313
  lea    (%r15,%rbp,1),%r14d
  xor    %eax,%eax
  movsd  (%r9),%xmm0
  movslq %edi,%r12
  test   %r14d,%r14d
  mov    %r15d,%edx
  cmovg  %eax,%r14d
  nopl   0x0(%rax)
L36:
  addsd  -0x8(%rbx,%r12,8),%xmm0
  add    $0x1,%edx
  movslq %r12d,%rax
  add    $0x1,%r12
  movsd  %xmm0,(%r9)
  cmp    %edx,%r14d
  jg     L36
  cmp    %eax,%r13d
  jle    L485
  nopl   0x0(%rax)
L227:
  cmp    %edx,%ebp
  jg     L73
L527:
  movsd  (%r11),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  add    $0x1,%edx
  movsd  %xmm0,(%r11)
  cmp    %eax,%r13d
  jle    L485
  cmp    %edx,%ebp
  jle    L527
L73:
  movslq %edx,%r12
  add    $0x1,%edx
  lea    (%r9,%r12,8),%r12
  movsd  (%r12),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  movsd  %xmm0,(%r12)
  cmp    %eax,%r13d
  jg     L227
  add    %ebp,%ecx
  add    (%rsp),%rsi
  add    %ebp,%edi
  cmp    %r13d,0xc(%rsp)
  jg     L233
  jmp    L206
  nopl   0x0(%rax,%rax,1)
L313:
  mov    %r15d,%edx
  jmp    L227
L409:
  mov    %r15d,%edx
  jmp    L540
L610:
  test   %r15d,%r15d
  jns    L193
  lea    (%r15,%rbp,1),%r14d
  xor    %eax,%eax
  movslq %edi,%r12
  mov    %r15d,%edx
  test   %r14d,%r14d
  cmovg  %eax,%r14d
  mov    0x18(%rsp),%rax
  movsd  (%rax),%xmm0
  nopw   0x0(%rax,%rax,1)
L371:
  addsd  -0x8(%rbx,%r12,8),%xmm0
  add    $0x1,%edx
  movslq %r12d,%rax
  add    $0x1,%r12
  movsd  %xmm0,(%r10)
  cmp    %r14d,%edx
  jl     L371
  cmp    %r13d,%eax
  jge    L485
  nopl   0x0(%rax)
L623:
  cmp    %edx,%ebp
  jle    L118
L200:
  mov    0x10(%rsp),%r14d
  lea    (%rdx,%r14,1),%r12d
  add    $0x1,%edx
  movslq %r12d,%r12
  lea    (%r9,%r12,8),%r12
  movsd  (%r12),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  movsd  %xmm0,(%r12)
  cmp    %eax,%r13d
  jle    L485
  cmp    %edx,%ebp
  jg     L200
L118:
  movsd  (%r8),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  add    $0x1,%edx
  movsd  %xmm0,(%r8)
  cmp    %eax,%r13d
  jg     L623
  add    %ebp,%ecx
  add    (%rsp),%rsi
  add    %ebp,%edi
  cmp    %r13d,0xc(%rsp)
  jg     L233
  jmp    L206
  nopl   0x0(%rax)
L193:
  mov    %r15d,%edx
  jmp    L623
L334:
  mov    %ebp,%eax
  mov    0x14(%rsp),%esi
  mov    0x10(%rsp),%ecx
  shr    $0x1f,%eax
  mov    0xc(%rsp),%edx
  add    %ebp,%eax
  mov    %ecx,%r13d
  sar    %eax
  mov    %eax,(%rsp)
  mov    %esi,%eax
  neg    %eax
  cmovs  %esi,%eax
  mov    %eax,0x14(%rsp)
  mov    %eax,%edi
  sub    %eax,%r13d
  mov    %ecx,%eax
  sub    %edx,%eax
  sub    %esi,%ecx
  mov    %eax,0x10(%rsp)
  mov    %r14d,%eax
  shr    $0x1f,%eax
  add    %r14d,%eax
  sar    %eax
  imul   %ebp,%eax
  cmp    %eax,%ecx
  je     L158
  cmp    %edi,%edx
  jle    L206
  mov    %r12d,%r14d
  mov    %r15d,%r10d
  mov    %r12d,%ecx
  sub    %r15d,%r14d
  neg    %r10d
  cmovs  %r15d,%r10d
  mov    %r12d,%r15d
  mov    %edi,%r12d
  sub    %ebp,%ecx
  lea    0x0(%r13,%r12,1),%edi
  sub    %r10d,%r15d
  cmp    (%rsp),%r14d
  je     L387
L282:
  mov    %edi,%eax
  mov    %r13d,%r8d
  mov    %r15d,%edx
  neg    %eax
  cmovns %eax,%edi
  neg    %r8d
  cmovs  %r13d,%r8d
  cmp    %ebp,%r10d
  jge    L421
  nopw   0x0(%rax,%rax,1)
L92:
  lea    (%rdx,%r10,1),%esi
  mov    %esi,%eax
  neg    %eax
  cmovs  %esi,%eax
  add    %edi,%eax
  cltq
  lea    (%r9,%rax,8),%rsi
  mov    %edx,%eax
  neg    %eax
  movsd  (%rsi),%xmm0
  cmovs  %edx,%eax
  sub    $0x1,%edx
  add    %r8d,%eax
  cltq
  addsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %ecx,%edx
  jg     L92
L421:
  sub    %ebp,%r13d
  cmp    0x10(%rsp),%r13d
  jle    L206
L562:
  lea    0x0(%r13,%r12,1),%edi
  cmp    (%rsp),%r14d
  jne    L282
L387:
  cmp    %ebp,%r10d
  jge    L421
  mov    %edi,%r11d
  mov    %r15d,%r8d
  neg    %r11d
  cmovs  %edi,%r11d
  mov    %r13d,%edi
  neg    %edi
  cmovs  %r13d,%edi
  nop
L394:
  lea    (%r8,%r10,1),%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  mov    %r8d,%edx
  add    %r11d,%eax
  cltq
  lea    (%r9,%rax,8),%rsi
  movsd  (%rsi),%xmm0
  nopl   0x0(%rax,%rax,1)
L493:
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  sub    $0x1,%edx
  add    %edi,%eax
  cltq
  addsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %ecx,%edx
  jg     L493
  sub    $0x1,%r8d
  cmp    %ecx,%r8d
  jg     L394
  sub    %ebp,%r13d
  cmp    0x10(%rsp),%r13d
  jg     L562
  jmp    L206
L572:
  xor    %ecx,%ecx
  test   %r8d,%r8d
  jle    L139
  lea    -0x1(%rdx),%ecx
  imul   %esi,%ecx
L139:
  test   %eax,%eax
  mov    $0xffffffff,%edx
  cmovns %edx,%eax
  xor    %r12d,%r12d
  lea    0x1(%rax),%r15d
  jmp    L335
L158:
  cmp    %edi,0xc(%rsp)
  jle    L206
  mov    %r15d,%r10d
  mov    %r12d,%r14d
  mov    %r13d,0xc(%rsp)
  mov    %r12d,%ecx
  sub    %r15d,%r14d
  neg    %r10d
  mov    0x10(%rsp),%r13d
  cmovs  %r15d,%r10d
  mov    %r12d,%r15d
  sub    %ebp,%ecx
  sub    %r10d,%r15d
L253:
  mov    0x14(%rsp),%eax
  mov    0xc(%rsp),%r12d
  add    %r12d,%eax
  mov    %eax,%r11d
  neg    %r11d
  cmovs  %eax,%r11d
  nopl   0x0(%rax,%rax,1)
L557:
  cmp    (%rsp),%r14d
  je     L77
  mov    %r12d,%edi
  mov    %r15d,%edx
  neg    %edi
  cmovs  %r12d,%edi
  cmp    %ebp,%r10d
  jge    L454
  nopw   0x0(%rax,%rax,1)
L490:
  lea    (%rdx,%r10,1),%esi
  mov    %esi,%eax
  neg    %eax
  cmovs  %esi,%eax
  add    %r11d,%eax
  cltq
  lea    (%r9,%rax,8),%rsi
  mov    %edx,%eax
  neg    %eax
  movsd  (%rsi),%xmm0
  cmovs  %edx,%eax
  sub    $0x1,%edx
  add    %edi,%eax
  cltq
  addsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %ecx,%edx
  jg     L490
L454:
  sub    %ebp,%r12d
  cmp    %r13d,%r12d
  jg     L557
  sub    %ebp,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %r13d,%eax
  jg     L253
  jmp    L206
  nopl   0x0(%rax)
L77:
  cmp    %ebp,%r10d
  jge    L454
  mov    %r12d,%edi
  mov    %r15d,%r8d
  neg    %edi
  cmovs  %r12d,%edi
  nopl   0x0(%rax)
L225:
  lea    (%r8,%r10,1),%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  mov    %r8d,%edx
  add    %r11d,%eax
  cltq
  lea    (%r9,%rax,8),%rsi
  movsd  (%rsi),%xmm0
  nopl   0x0(%rax,%rax,1)
L59:
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  sub    $0x1,%edx
  add    %edi,%eax
  cltq
  addsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %ecx,%edx
  jg     L59
  sub    $0x1,%r8d
  cmp    %ecx,%r8d
  jg     L225
  jmp    L454
```

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);
}
```