user: 请将以下的汇编代码转换成C语言代码:

```asm
<reflect1>:
  endbr64
  push   %r15
  mov    %esi,%eax
  push   %r14
  imul   %edx,%eax
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  mov    %ecx,0x20(%rsp)
  mov    %r8d,0x1c(%rsp)
  mov    %eax,0x18(%rsp)
  test   %ecx,%ecx
  jle    L145
  sub    %esi,%eax
  mov    %ecx,%edi
  lea    -0x1(%rsi),%r12d
  mov    %eax,%edx
  xor    %eax,%eax
  test   %r8d,%r8d
  cmovg  %edx,%eax
  sub    %esi,%edi
  mov    %edi,%ecx
  mov    %eax,0x14(%rsp)
L115:
  mov    0x1c(%rsp),%esi
  mov    $0xffffffff,%eax
  mov    %ebp,%r11d
  mov    %r13d,%r14d
  mov    %esi,%edx
  sub    %r13d,%edx
  test   %esi,%esi
  cmovs  %esi,%eax
  add    $0x1,%eax
  test   %esi,%esi
  cmovg  %edx,%eax
  shr    $0x1f,%r11d
  add    %ebp,%r11d
  shr    $0x1f,%r14d
  imul   %ebp,%eax
  sar    %r11d
  add    %r13d,%r14d
  sar    %r14d
  mov    %r11d,%r15d
  mov    %eax,0x24(%rsp)
  lea    0x1(%r11),%eax
  mov    %eax,0x28(%rsp)
  lea    0x1(%r14),%eax
  mov    %eax,0x2c(%rsp)
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jle    L212
  movslq %eax,%rdx
  xor    %esi,%esi
  mov    %r9,%rdi
  mov    %ecx,0xc(%rsp)
  shl    $0x2,%rdx
  call   <memset@plt>
  cmpl   $0x1,0x70(%rsp)
  mov    0xc(%rsp),%ecx
  mov    %rax,%r9
  je     L181
  mov    0x18(%rsp),%eax
  mov    %ebp,0xc(%rsp)
  xor    %r8d,%r8d
  xor    %r11d,%r11d
  mov    %eax,0x10(%rsp)
L201:
  movslq %r8d,%rax
  movslq %r11d,%r10
  mov    %ecx,%edi
  mov    0x24(%rsp),%r13d
  add    %rax,%r10
  lea    (%r8,%r11,1),%eax
  movslq %ebp,%r14
  sub    %eax,%edi
  mov    0xc(%rsp),%eax
  sub    %r8d,%r13d
  lea    (%r8,%rax,1),%esi
  cs nopw 0x0(%rax,%rax,1)
L57:
  lea    0x0(%r13,%r8,1),%eax
  cmp    0xc(%rsp),%r11d
  jge    L46
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    0x14(%rsp),%edx
  sub    %eax,%edx
  mov    %edx,%ecx
  neg    %ecx
  cmovs  %edx,%ecx
  mov    %r10,%rdx
  nopl   0x0(%rax,%rax,1)
L43:
  lea    (%rdi,%rdx,1),%r15d
  mov    %r15d,%eax
  neg    %eax
  cmovs  %r15d,%eax
  mov    %r12d,%r15d
  sub    %eax,%r15d
  mov    %r15d,%eax
  neg    %eax
  cmovs  %r15d,%eax
  add    %ecx,%eax
  cltq
  lea    (%r9,%rax,4),%rax
  movss  (%rax),%xmm0
  addss  (%rbx,%rdx,4),%xmm0
  add    $0x1,%rdx
  movss  %xmm0,(%rax)
  cmp    %edx,%esi
  jg     L43
L46:
  add    %ebp,%r8d
  add    %r14,%r10
  sub    %ebp,%edi
  add    %ebp,%esi
  cmp    0x10(%rsp),%r8d
  jl     L57
  cmpl   $0x1,0x70(%rsp)
  je     L125
L239:
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L145:
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%edx
  xor    %eax,%eax
  mov    0x20(%rsp),%edi
  sub    %esi,%edx
  test   %ecx,%ecx
  cmovg  %edx,%eax
  test   %edi,%edi
  mov    %eax,0x14(%rsp)
  mov    $0xffffffff,%eax
  cmovs  %edi,%eax
  xor    %r12d,%r12d
  lea    0x1(%rax),%ecx
  jmp    L115
L212:
  cmpl   $0x1,0x70(%rsp)
  jne    L239
L181:
  mov    0x28(%rsp),%edi
  cmp    %edi,0x20(%rsp)
  je     L112
  mov    %r15d,%edx
  xor    %eax,%eax
  mov    %ebp,0xc(%rsp)
  not    %edx
  cmp    0x20(%rsp),%edx
  cmove  %eax,%ecx
  cmove  %r15d,%eax
  mov    %eax,%r11d
L173:
  mov    0x2c(%rsp),%esi
  cmp    %esi,0x1c(%rsp)
  je     L24
  mov    0x18(%rsp),%eax
  xor    %r8d,%r8d
  mov    %eax,0x10(%rsp)
  mov    %r14d,%eax
  not    %eax
  cmp    0x1c(%rsp),%eax
  je     L215
L101:
  cmp    %r8d,0x10(%rsp)
  jg     L201
L125:
  mov    0x20(%rsp),%ebx
  mov    %ebx,%eax
  neg    %eax
  cmovs  %ebx,%eax
  cmp    0x28(%rsp),%eax
  je     L190
  test   %ebx,%ebx
  jne    L133
L190:
  mov    0x1c(%rsp),%ebx
  mov    %ebx,%eax
  neg    %eax
  cmovs  %ebx,%eax
  cmp    0x2c(%rsp),%eax
  je     L239
  test   %ebx,%ebx
  je     L239
  mov    0x14(%rsp),%ebx
  lea    0x0(%rbp,%rbx,1),%eax
  cmp    %ebx,%eax
  jle    L239
  movslq %ebx,%rcx
  lea    -0x1(%rbp),%edx
  add    %rcx,%rdx
  lea    (%r9,%rcx,4),%rax
  lea    0x4(%r9,%rdx,4),%rdx
  nopl   0x0(%rax)
L150:
  movss  (%rax),%xmm0
  add    $0x4,%rax
  addss  %xmm0,%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rdx,%rax
  jne    L150
  jmp    L239
L133:
  mov    0x18(%rsp),%edx
  cmp    %r12d,%edx
  jle    L190
  movslq %ebp,%rax
  movslq %r12d,%r12
  nopw   0x0(%rax,%rax,1)
L82:
  movss  (%r9,%r12,4),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,(%r9,%r12,4)
  add    %rax,%r12
  cmp    %r12d,%edx
  jg     L82
  jmp    L190
L215:
  imul   %ebp,%r14d
  movl   $0x0,0x24(%rsp)
  mov    %r14d,%r8d
  jmp    L101
L24:
  add    $0x1,%r13d
  xor    %r8d,%r8d
  mov    %r13d,%eax
  shr    $0x1f,%eax
  add    %r13d,%eax
  sar    %eax
  imul   %ebp,%eax
  mov    %eax,0x10(%rsp)
  cmp    %r8d,0x10(%rsp)
  jg     L201
  jmp    L125
L112:
  lea    0x1(%rbp),%edx
  xor    %r11d,%r11d
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0xc(%rsp)
  jmp    L173
```

assistant: ```c
reflect1(filt, x_dim, y_dim, x_pos, y_pos, result, f_or_e) register float *filt, *result;
register int x_dim;
int y_dim, x_pos, y_pos, f_or_e;
{
  int filt_sz = x_dim * y_dim;
  register int x_start = 0, y_start = 0, x_stop = x_dim, y_stop = filt_sz;
  register int y_filt, x_filt, y_edge, x_edge;
  register int x_base = (x_pos > 0) ? (x_dim - 1) : 0;
  register int y_base = (y_pos > 0) ? (x_dim * (y_dim - 1)) : 0;
  int x_edge_dist = (x_pos > 0) ? (x_pos - x_dim) : ((x_pos < -1) ? (x_pos + 1) : 0);
  int y_edge_dist = x_dim * ((y_pos > 0) ? (y_pos - y_dim) : ((y_pos < -1) ? (y_pos + 1) : 0));
  int i;
  int mx_pos = (x_dim / 2) + 1;
  int my_pos = (y_dim / 2) + 1;
  for (i = 0; i < filt_sz; i++)
    result[i] = 0.0;
  if (f_or_e == 1) {
    if (x_pos == mx_pos)
      x_stop = (x_dim + 1) / 2;
    else if (x_pos == -mx_pos) {
      x_start = x_dim / 2;
      x_edge_dist = 0;
    }
    if (y_pos == my_pos)
      y_stop = x_dim * ((y_dim + 1) / 2);
    else if (y_pos == -my_pos) {
      y_start = x_dim * (y_dim / 2);
      y_edge_dist = 0;
    }
  }
  for (y_filt = y_start, y_edge = y_edge_dist; y_filt < y_stop; y_filt += x_dim, y_edge += x_dim)
    for (x_filt = y_filt + x_start, x_edge = x_edge_dist; x_filt < y_filt + x_stop; x_filt++, x_edge++)
      result[(y_base - (y_edge >= 0 ? y_edge : -(y_edge)) >= 0 ? y_base - (y_edge >= 0 ? y_edge : -(y_edge)) : -(y_base - (y_edge >= 0 ? y_edge : -(y_edge)))) + (x_base - (x_edge >= 0 ? x_edge : -(x_edge)) >= 0 ? x_base - (x_edge >= 0 ? x_edge : -(x_edge)) : -(x_base - (x_edge >= 0 ? x_edge : -(x_edge))))] += filt[x_filt];
  if (f_or_e == 1) {
    if (((x_pos >= 0 ? x_pos : -(x_pos)) != mx_pos) && (x_pos != 0))
      for (y_filt = x_base; y_filt < filt_sz; y_filt += x_dim)
        result[y_filt] += result[y_filt];
    if (((y_pos >= 0 ? y_pos : -(y_pos)) != my_pos) && (y_pos != 0))
      for (x_filt = y_base; x_filt < y_base + x_dim; x_filt++)
        result[x_filt] += result[x_filt];
  }
}
```