user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<SMR>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,0x48(%rsp)
  mov    %edx,0x54(%rsp)
  mov    %ecx,0x50(%rsp)
  mov    %r8,0x58(%rsp)
  mov    %r9d,0x3c(%rsp)
  movss  %xmm0,0x8(%rsp)
  test   %edx,%edx
  jle    L45
  mov    %esi,%r12d
  mov    %edx,%esi
  lea    -0x1(%r9),%eax
  mov    0xa8(%rsp),%rdx
  lea    0x4(%rdx,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  mov    %esi,%eax
  imul   %ecx,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,(%rsp)
  movl   $0x0,0x44(%rsp)
  movl   $0x0,0x40(%rsp)
  jmp    L50
L21:
  addss  %xmm0,%xmm0
  movss  0x8(%rsp),%xmm2
  comiss %xmm0,%xmm2
  ja     L120
L53:
  add    (%rsp),%rbp
  add    $0x4,%rbx
  cmp    %r15,%rbx
  je     L29
L148:
  movss  0x0(%rbp),%xmm0
  subss  (%rbx),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  jbe    L21
  xorps  D1(%rip),%xmm0
  jmp    L21
L120:
  movss  (%r14),%xmm3
  movss  %xmm3,0x38(%rsp)
  xorps  D1(%rip),%xmm0
  cvttss2si %xmm0,%edi
  call   <exp@plt>
  mulss  0x38(%rsp),%xmm0
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0xc(%rsp)
  jmp    L53
L29:
  add    $0x4,%r14
  add    %r12d,%r13d
  cmp    0x10(%rsp),%r14
  je     L108
L31:
  test   %r12d,%r12d
  jle    L29
  movslq %r13d,%rdx
  mov    0xa0(%rsp),%rax
  lea    (%rax,%rdx,4),%rbx
  lea    -0x1(%r12),%eax
  add    %rdx,%rax
  mov    0xa0(%rsp),%rcx
  lea    0x4(%rcx,%rax,4),%r15
  mov    0x18(%rsp),%rbp
  jmp    L148
L96:
  pxor   %xmm7,%xmm7
  movss  %xmm7,0xc(%rsp)
L108:
  mov    0x28(%rsp),%rsi
  mov    0x20(%rsp),%rax
  movss  0xc(%rsp),%xmm5
  movss  %xmm5,(%rsi,%rax,4)
  add    $0x1,%rax
  mov    %rax,0x20(%rsp)
  addq   $0x4,0x18(%rsp)
  cmp    0x30(%rsp),%rax
  je     L85
L70:
  cmpl   $0x0,0x3c(%rsp)
  jle    L96
  mov    0xa8(%rsp),%r14
  mov    $0x0,%r15d
  pxor   %xmm6,%xmm6
  movss  %xmm6,0xc(%rsp)
  mov    %r15d,%r13d
  jmp    L31
L85:
  addl   $0x1,0x40(%rsp)
  mov    0x40(%rsp),%eax
  mov    0x50(%rsp),%ecx
  add    %ecx,0x44(%rsp)
  cmp    %eax,0x54(%rsp)
  je     L45
L50:
  mov    0x50(%rsp),%esi
  test   %esi,%esi
  jle    L85
  movslq 0x44(%rsp),%rax
  shl    $0x2,%rax
  mov    0x48(%rsp),%rcx
  add    %rax,%rcx
  mov    %rcx,0x18(%rsp)
  mov    %esi,%esi
  mov    %rsi,0x30(%rsp)
  add    0x58(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movq   $0x0,0x20(%rsp)
  jmp    L70
L45:
  mov    $0x0,%eax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: label: D1
datatype: byte[16]

tool: {"D1": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int SMR(float *input, int ichannels, int iheight, int iwidth, float *output, int numProto, float *code, float *weight, float th) {
  int i, k, x, y;
  float dist, yi_hat;
  for (y = 0; y < iheight; y++) {
    for (x = 0; x < iwidth; x++) {
      yi_hat = 0;
      for (i = 0; i < numProto; i++) {
        for (k = 0; k < ichannels; k++) {
          dist = (input[(y + k * iheight) * iwidth + x] - code[k + i * ichannels]) < 0 ? -(input[(y + k * iheight) * iwidth + x] - code[k + i * ichannels]) : (input[(y + k * iheight) * iwidth + x] - code[k + i * ichannels]);
          if (2 * dist < th)
            yi_hat += weight[i] * exp(-2 * dist);
        }
      }
      output[y * iwidth + x] = yi_hat;
    }
  }
  return 0;
}
```