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

```asm
<hat_transform>:
  endbr64
  push   %r15
  mov    %edx,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %r8d,%r8d
  jle    L169
  cmp    $0x1,%edx
  jne    L284
  lea    0x4(%rsi),%r13
  mov    %rdi,%rax
  movslq %r8d,%r11
  mov    %r8d,%ebp
  sub    %r13,%rax
  lea    0x4(,%r11,4),%r9
  lea    0x0(,%r11,4),%r12
  cmp    $0x8,%rax
  lea    (%rsi,%r9,1),%rbx
  lea    -0x4(%r9),%rdx
  seta   %al
  cmp    $0x1,%r8d
  setne  %r13b
  and    %r13d,%eax
  mov    %rdi,%r13
  sub    %rbx,%r13
  cmp    $0x8,%r13
  seta   %r13b
  test   %r13b,%al
  je     L99
  mov    %r9,%rax
  lea    (%rdi,%r12,1),%r13
  sub    %r12,%rax
  add    %rsi,%rax
  cmp    %rax,%r13
  setbe  %al
  cmp    %rbx,%rdi
  setae  %bl
  or     %bl,%al
  je     L99
  lea    -0x1(%r8),%ebx
  cmp    $0x2,%ebx
  jbe    L90
  mov    %r8d,%ebx
  lea    -0x10(%rsi,%r9,1),%rbp
  add    %rsi,%rdx
  xor    %eax,%eax
  shr    $0x2,%ebx
  shl    $0x4,%rbx
  cs nopw 0x0(%rax,%rax,1)
L0:
  movups (%rsi,%rax,1),%xmm0
  mov    %rax,%r9
  movups (%rdx,%rax,1),%xmm4
  neg    %r9
  addps  %xmm0,%xmm0
  movups 0x0(%rbp,%r9,1),%xmm1
  shufps $0x1b,%xmm1,%xmm1
  addps  %xmm1,%xmm0
  addps  %xmm4,%xmm0
  movups %xmm0,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rbx
  jne    L0
  mov    %r8d,%r9d
  and    $0xfffffffc,%r9d
  mov    %r9d,%eax
  cmp    %r9d,%r8d
  je     L131
  mov    %r8d,%ebp
  sub    %r9d,%ebp
  cmp    $0x1,%ebp
  je     L208
L233:
  movq   (%rsi,%r9,4),%xmm0
  mov    %r9,%rbx
  add    %r9,%r11
  not    %rbx
  movq   (%rdx,%rbx,4),%xmm1
  addps  %xmm0,%xmm0
  mov    %ebp,%edx
  and    $0xfffffffe,%edx
  shufps $0xe1,%xmm1,%xmm1
  add    %edx,%eax
  addps  %xmm1,%xmm0
  movq   (%rsi,%r11,4),%xmm1
  addps  %xmm1,%xmm0
  movlps %xmm0,(%rdi,%r9,4)
  cmp    %ebp,%edx
  je     L131
L208:
  movslq %eax,%r9
  mov    %r8d,%edx
  movss  (%rsi,%r9,4),%xmm0
  sub    %eax,%edx
  add    %r8d,%eax
  movslq %edx,%rdx
  cltq
  addss  %xmm0,%xmm0
  addss  (%rsi,%rdx,4),%xmm0
  addss  (%rsi,%rax,4),%xmm0
  movss  %xmm0,(%rdi,%r9,4)
L131:
  lea    (%r8,%r8,1),%r9d
  mov    %r8d,%eax
L1:
  cmp    %r9d,%ecx
  jle    L251
  cmp    $0x1,%r10d
  jne    L32
  add    $0x1,%eax
  lea    -0x1(%r8),%ebx
  movslq %eax,%rdx
  movslq %r8d,%rax
  neg    %rax
  lea    (%rsi,%rax,4),%rbp
  nopl   0x0(%rax,%rax,1)
L92:
  movss  -0x4(%rsi,%rdx,4),%xmm0
  movslq %r9d,%r9
  mov    %edx,%eax
  addss  %xmm0,%xmm0
  addss  -0x4(%rbp,%rdx,4),%xmm0
  addss  (%rsi,%r9,4),%xmm0
  lea    (%r8,%rdx,1),%r9d
  movss  %xmm0,-0x4(%rdi,%rdx,4)
  add    $0x1,%rdx
  lea    (%rbx,%rdx,1),%r11d
  cmp    %r11d,%ecx
  jg     L92
L251:
  cmp    %eax,%ecx
  jle    L5
  lea    -0x1(%rcx),%ebx
  lea    (%rbx,%rbx,1),%edx
  cmp    $0x1,%r10d
  jne    L217
  mov    %ecx,%r11d
  movslq %ecx,%r10
  movslq %r8d,%r12
  movslq %eax,%r9
  sub    %eax,%r11d
  add    %r10,%r10
  lea    0x0(,%r9,4),%rbx
  mov    %r9,%r15
  sub    %r12,%r10
  mov    %r11d,%r13d
  lea    (%rdi,%rbx,1),%rbp
  sub    %r12,%r15
  sub    %r9,%r10
  mov    %r13,%r14
  add    %r9,%r13
  mov    %r15,-0x18(%rsp)
  shl    $0x2,%r10
  not    %r14
  lea    (%rdi,%r13,4),%r13
  lea    (%r10,%r14,4),%r14
  lea    0x4(,%r15,4),%r15
  add    %rsi,%r14
  cmp    %r13,%r14
  lea    -0x4(%rsi,%r10,1),%r13
  setae  %r14b
  cmp    %r13,%rbp
  setae  %r13b
  or     %r14b,%r13b
  je     L82
  lea    0x4(%rsi,%rbx,1),%r14
  mov    %rbp,%r13
  sub    %r14,%r13
  cmp    $0x8,%r13
  seta   %r13b
  cmp    $0x1,%r11d
  setne  %r14b
  and    %r14d,%r13d
  lea    (%rsi,%r15,1),%r14
  mov    %r13b,-0x9(%rsp)
  mov    %rbp,%r13
  sub    %r14,%r13
  cmp    $0x8,%r13
  seta   %r14b
  test   %r14b,-0x9(%rsp)
  je     L82
  lea    -0x1(%r11),%ecx
  cmp    $0x2,%ecx
  jbe    L30
  mov    %r11d,%r13d
  add    %rsi,%rbx
  lea    -0x4(%rsi,%r15,1),%r15
  xor    %ecx,%ecx
  shr    $0x2,%r13d
  lea    -0x14(%rsi,%r10,1),%r14
  shl    $0x4,%r13
  nopw   0x0(%rax,%rax,1)
L289:
  movups (%rbx,%rcx,1),%xmm0
  movups (%r15,%rcx,1),%xmm6
  mov    %rcx,%r12
  neg    %r12
  addps  %xmm0,%xmm0
  movups (%r14,%r12,1),%xmm1
  shufps $0x1b,%xmm1,%xmm1
  addps  %xmm6,%xmm0
  addps  %xmm1,%xmm0
  movups %xmm0,0x0(%rbp,%rcx,1)
  add    $0x10,%rcx
  cmp    %r13,%rcx
  jne    L289
  mov    %r11d,%ecx
  and    $0xfffffffc,%ecx
  add    %ecx,%eax
  cmp    %ecx,%r11d
  je     L5
  sub    %ecx,%r11d
  cmp    $0x1,%r11d
  je     L68
L79:
  add    %rcx,%r9
  mov    %rcx,%rbx
  add    -0x18(%rsp),%rcx
  add    %rsi,%r10
  movq   (%rsi,%r9,4),%xmm1
  movq   (%rsi,%rcx,4),%xmm0
  neg    %rbx
  mov    %r11d,%ecx
  movq   -0xc(%r10,%rbx,4),%xmm2
  and    $0xfffffffe,%ecx
  addps  %xmm1,%xmm1
  add    %ecx,%eax
  shufps $0xe1,%xmm2,%xmm2
  addps  %xmm1,%xmm0
  addps  %xmm2,%xmm0
  movlps %xmm0,(%rdi,%r9,4)
  cmp    %ecx,%r11d
  je     L5
L68:
  mov    %eax,%ecx
  movslq %eax,%r9
  sub    %r8d,%ecx
  add    %eax,%r8d
  movss  (%rsi,%r9,4),%xmm0
  sub    %r8d,%edx
  movslq %ecx,%rcx
  movslq %edx,%rdx
  addss  %xmm0,%xmm0
  addss  (%rsi,%rcx,4),%xmm0
  addss  (%rsi,%rdx,4),%xmm0
  movss  %xmm0,(%rdi,%r9,4)
L5:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  mov    %r10d,%r13d
  lea    0x1(%rax),%ebx
  movslq %r10d,%r12
  imul   %eax,%r13d
  sub    %r8d,%eax
  movslq %ebx,%r11
  shl    $0x2,%r12
  imul   %r10d,%eax
  add    %r8d,%ebx
  movslq %r13d,%r13
  movslq %eax,%rbp
  lea    (%rsi,%r13,4),%rdx
  sub    %r13,%rbp
  nopl   0x0(%rax,%rax,1)
L253:
  imul   %r10d,%r9d
  movss  (%rdx),%xmm0
  mov    %r11d,%eax
  addss  %xmm0,%xmm0
  addss  (%rdx,%rbp,4),%xmm0
  add    %r12,%rdx
  movslq %r9d,%r9
  addss  (%rsi,%r9,4),%xmm0
  mov    %ebx,%r9d
  add    $0x1,%ebx
  movss  %xmm0,-0x4(%rdi,%r11,4)
  add    $0x1,%r11
  cmp    %ecx,%r9d
  jl     L253
  jmp    L251
  nopl   0x0(%rax,%rax,1)
L284:
  mov    %r8d,%ebx
  movslq %edx,%r11
  lea    -0x1(%r8),%ebp
  mov    %rsi,%rdx
  imul   %r10d,%ebx
  shl    $0x2,%r11
  lea    0x4(%rdi,%rbp,4),%rbp
  mov    %rdi,%rax
  movslq %ebx,%rbx
  lea    (%rsi,%rbx,4),%r9
  nopl   0x0(%rax)
L81:
  movss  (%rdx),%xmm0
  add    $0x4,%rax
  addss  %xmm0,%xmm0
  addss  (%r9),%xmm0
  sub    %r11,%r9
  addss  (%rdx,%rbx,4),%xmm0
  add    %r11,%rdx
  movss  %xmm0,-0x4(%rax)
  cmp    %rbp,%rax
  jne    L81
  jmp    L131
  nopl   0x0(%rax,%rax,1)
L217:
  lea    (%r8,%rax,1),%ebp
  mov    %r10d,%r11d
  sub    %eax,%ebx
  movslq %r10d,%r9
  imul   %eax,%r11d
  sub    %ebp,%edx
  movslq %eax,%rbp
  sub    %r8d,%eax
  imul   %r10d,%edx
  add    %rbp,%rbx
  shl    $0x2,%r9
  imul   %r10d,%eax
  movslq %r11d,%r11
  movslq %edx,%rdx
  lea    (%rsi,%r11,4),%rcx
  cltq
  lea    (%rsi,%rdx,4),%rsi
  lea    (%rdi,%rbp,4),%rdx
  sub    %r11,%rax
  lea    0x4(%rdi,%rbx,4),%rdi
  nopl   0x0(%rax,%rax,1)
L135:
  movss  (%rcx),%xmm0
  add    $0x4,%rdx
  addss  %xmm0,%xmm0
  addss  (%rcx,%rax,4),%xmm0
  add    %r9,%rcx
  addss  (%rsi),%xmm0
  sub    %r9,%rsi
  movss  %xmm0,-0x4(%rdx)
  cmp    %rdi,%rdx
  jne    L135
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L99:
  shl    $0x2,%r11
  add    %rsi,%rdx
  xor    %eax,%eax
  nopl   0x0(%rax)
L147:
  movss  (%rsi,%rax,1),%xmm0
  mov    %rax,%r9
  neg    %r9
  addss  %xmm0,%xmm0
  addss  (%rdx,%r9,1),%xmm0
  addss  (%rdx,%rax,1),%xmm0
  movss  %xmm0,(%rdi,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%r11
  jne    L147
  jmp    L131
  nopl   (%rax)
L82:
  movslq %edx,%rdx
  sub    %r12,%rdx
  neg    %r12
  sub    %r9,%rdx
  lea    (%rsi,%rdx,4),%rax
  lea    (%rsi,%r12,4),%rdx
  nopl   0x0(%rax)
L192:
  movss  (%rsi,%r9,4),%xmm0
  sub    $0x4,%rax
  addss  %xmm0,%xmm0
  addss  (%rdx,%r9,4),%xmm0
  addss  0x4(%rax),%xmm0
  movss  %xmm0,(%rdi,%r9,4)
  add    $0x1,%r9
  cmp    %r9d,%ecx
  jg     L192
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L169:
  mov    %r8d,%r9d
  xor    %eax,%eax
  jmp    L1
L30:
  xor    %ecx,%ecx
  jmp    L79
L90:
  xor    %r9d,%r9d
  xor    %eax,%eax
  add    %rsi,%rdx
  jmp    L233
```

assistant: ```c
void hat_transform(float *temp, float *base, int st, int size, int sc) {
  int i;
  for (i = 0; i < sc; i++)
    temp[i] = 2 * base[st * i] + base[st * (sc - i)] + base[st * (i + sc)];
  for (; i + sc < size; i++)
    temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (i + sc)];
  for (; i < size; i++)
    temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (2 * size - 2 - (i + sc))];
}
```