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    %esi,0xc(%rsp)
  mov    %edx,0x54(%rsp)
  mov    %ecx,0x50(%rsp)
  mov    %r8,0x58(%rsp)
  mov    %r9d,0x3c(%rsp)
  test   %edx,%edx
  jle    L72
  mov    %edx,%esi
  lea    -0x1(%r9),%eax
  mov    0xa8(%rsp),%rdx
  movl   $0x0,0x44(%rsp)
  imul   %ecx,%esi
  movl   $0x0,0x40(%rsp)
  movaps %xmm0,%xmm2
  lea    0x4(%rdx,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  movslq %esi,%rsi
  lea    0x0(,%rsi,4),%r15
L109:
  mov    0x50(%rsp),%esi
  test   %esi,%esi
  jle    L80
  movslq 0x44(%rsp),%rax
  sub    $0x1,%esi
  mov    0x48(%rsp),%rcx
  movq   $0x0,0x20(%rsp)
  mov    %rsi,0x30(%rsp)
  pxor   %xmm1,%xmm1
  shl    $0x2,%rax
  add    %rax,%rcx
  add    0x58(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0x3c(%rsp),%eax
  mov    %rcx,0x18(%rsp)
  test   %eax,%eax
  jle    L91
  nopl   0x0(%rax,%rax,1)
L133:
  mov    0xc(%rsp),%eax
  xor    %ebp,%ebp
  movss  %xmm1,(%rsp)
  mov    %r15,%r14
  mov    0xa8(%rsp),%rbx
  sub    $0x1,%eax
  mov    %eax,0x38(%rsp)
  nopl   (%rax)
L110:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jle    L58
  mov    0x38(%rsp),%edx
  mov    0xa0(%rsp),%rax
  movslq %ebp,%rcx
  mov    0x18(%rsp),%r15
  add    %rcx,%rdx
  lea    (%rax,%rcx,4),%r12
  lea    0x4(%rax,%rdx,4),%r13
  jmp    L76
  xchg   %ax,%ax
L25:
  add    $0x4,%r12
  add    %r14,%r15
  cmp    %r13,%r12
  je     L58
L76:
  movss  (%r15),%xmm0
  subss  (%r12),%xmm0
  comiss %xmm0,%xmm1
  jbe    L114
  xorps  D9(%rip),%xmm0
L114:
  addss  %xmm0,%xmm0
  comiss %xmm0,%xmm2
  jbe    L25
  xorps  D9(%rip),%xmm0
  movss  (%rbx),%xmm3
  add    $0x4,%r12
  add    %r14,%r15
  movss  %xmm2,0x8(%rsp)
  cvttss2si %xmm0,%edi
  movss  %xmm3,0x4(%rsp)
  call   <exp@plt>
  mulss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm2
  pxor   %xmm1,%xmm1
  addss  (%rsp),%xmm0
  movss  %xmm0,(%rsp)
  cmp    %r13,%r12
  jne    L76
L58:
  add    $0x4,%rbx
  add    0xc(%rsp),%ebp
  cmp    0x10(%rsp),%rbx
  jne    L110
  mov    %r14,%r15
L52:
  mov    0x28(%rsp),%rax
  mov    0x20(%rsp),%rsi
  movss  (%rsp),%xmm5
  addq   $0x4,0x18(%rsp)
  movss  %xmm5,(%rax,%rsi,4)
  lea    0x1(%rsi),%rax
  cmp    0x30(%rsp),%rsi
  je     L80
  mov    %rax,0x20(%rsp)
  mov    0x3c(%rsp),%eax
  test   %eax,%eax
  jg     L133
L91:
  movss  %xmm1,(%rsp)
  jmp    L52
L80:
  addl   $0x1,0x40(%rsp)
  mov    0x50(%rsp),%ecx
  mov    0x40(%rsp),%eax
  add    %ecx,0x44(%rsp)
  cmp    %eax,0x54(%rsp)
  jne    L109
L72:
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D9
datatype: byte[16]

tool: {"D9": [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;
}
```