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

```asm
<softmax>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x18(%rsp)
  mov    %edx,0x24(%rsp)
  mov    %ecx,0x28(%rsp)
  test   %ecx,%ecx
  jle    L107
  mov    %ecx,%eax
  mov    %rdi,%r14
  mov    %rsi,%r12
  mov    %rdi,%rbx
  movq   $0x0,0x10(%rsp)
  sub    $0x1,%eax
  mov    %rsi,%r13
  mov    %eax,0x2c(%rsp)
  lea    0x8(%rdi,%rax,8),%rbp
  nopw   0x0(%rax,%rax,1)
L18:
  mov    %r14,%r15
  pxor   %xmm1,%xmm1
  nopw   0x0(%rax,%rax,1)
L22:
  movsd  (%r15),%xmm0
  subsd  (%rbx),%xmm0
  movsd  %xmm1,0x8(%rsp)
  add    $0x8,%r15
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm1
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rbp,%r15
  jne    L22
  movsd  D66(%rip),%xmm0
  movsd  0x10(%rsp),%xmm5
  add    $0x8,%rbx
  add    $0x8,%r13
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r13)
  mulsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm5
  movsd  %xmm5,0x10(%rsp)
  cmp    %r15,%rbx
  jne    L18
  movslq 0x24(%rsp),%rax
  mov    0x18(%rsp),%rcx
  movapd %xmm5,%xmm8
  cmpl   $0x2,0x2c(%rsp)
  addsd  (%rcx,%rax,8),%xmm8
  jbe    L100
  mov    0x28(%rsp),%eax
  movd   0x24(%rsp),%xmm6
  movapd %xmm8,%xmm4
  pxor   %xmm5,%xmm5
  movdqa D42(%rip),%xmm2
  movapd D66(%rip),%xmm3
  unpcklpd %xmm4,%xmm4
  shr    $0x2,%eax
  pshufd $0x0,%xmm6,%xmm7
  movdqa D32(%rip),%xmm6
  sub    $0x1,%eax
  shl    $0x5,%rax
  lea    0x20(%rcx,%rax,1),%rax
  cs nopw 0x0(%rax,%rax,1)
L149:
  movdqa %xmm2,%xmm0
  movdqa %xmm5,%xmm9
  paddd  %xmm6,%xmm2
  add    $0x20,%r12
  pcmpeqd %xmm7,%xmm0
  movupd -0x20(%r12),%xmm10
  pcmpgtd %xmm0,%xmm9
  movdqa %xmm0,%xmm1
  punpckldq %xmm9,%xmm1
  punpckhdq %xmm9,%xmm0
  andpd  %xmm3,%xmm1
  andpd  %xmm3,%xmm0
  subpd  %xmm10,%xmm1
  subpd  %xmm4,%xmm1
  mulpd  %xmm10,%xmm1
  movups %xmm1,-0x20(%r12)
  movupd -0x10(%r12),%xmm1
  subpd  %xmm1,%xmm0
  subpd  %xmm4,%xmm0
  mulpd  %xmm1,%xmm0
  movups %xmm0,-0x10(%r12)
  cmp    %r12,%rax
  jne    L149
  mov    0x28(%rsp),%edi
  mov    %edi,%eax
  and    $0xfffffffc,%eax
  and    $0x3,%edi
  je     L107
L8:
  mov    0x18(%rsp),%rsi
  movslq %eax,%rdx
  pxor   %xmm0,%xmm0
  shl    $0x3,%rdx
  lea    (%rsi,%rdx,1),%rcx
  movsd  (%rcx),%xmm1
  cmp    %eax,0x24(%rsp)
  je     L125
L36:
  subsd  %xmm1,%xmm0
  subsd  %xmm8,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  lea    0x1(%rax),%ecx
  cmp    %ecx,0x28(%rsp)
  jle    L107
  mov    0x18(%rsp),%rsi
  pxor   %xmm0,%xmm0
  lea    0x8(%rsi,%rdx,1),%rsi
  movsd  (%rsi),%xmm1
  cmp    %ecx,0x24(%rsp)
  je     L114
L146:
  subsd  %xmm1,%xmm0
  add    $0x2,%eax
  subsd  %xmm8,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %eax,0x28(%rsp)
  jle    L107
  mov    0x18(%rsp),%rcx
  pxor   %xmm0,%xmm0
  lea    0x10(%rcx,%rdx,1),%rdx
  movsd  (%rdx),%xmm1
  cmp    %eax,0x24(%rsp)
  je     L110
L90:
  subsd  %xmm1,%xmm0
  subsd  %xmm8,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
L107:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  mov    D66(%rip),%rdi
  movq   %rdi,%xmm0
  jmp    L146
L110:
  mov    D66(%rip),%rax
  movq   %rax,%xmm0
  jmp    L90
L125:
  mov    D66(%rip),%rsi
  movq   %rsi,%xmm0
  jmp    L36
L100:
  xor    %eax,%eax
  jmp    L8
```

tool_calls: name: parse_data
arguments: data_label: D66
data_type: f64[2]
name: parse_data
arguments: data_label: D42
data_type: f32[4]
name: parse_data
arguments: data_label: D32
data_type: byte[16]

tool: {"D66": [1.0,1.0]}

tool: {"D42": [0.0,1.401298464324817e-45,2.802596928649634e-45,4.203895392974451e-45]}

tool: {"D32": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

assistant: ```c
void softmax(double input[10], double loss[10], int label, int count) {
  double inner = 0;
  for (int i = 0; i < count; ++i) {
    double res = 0;
    for (int j = 0; j < count; ++j) {
      res += exp(input[j] - input[i]);
    }
    loss[i] = 1. / res;
    inner -= loss[i] * loss[i];
  }
  inner += loss[label];
  for (int i = 0; i < count; ++i) {
    loss[i] *= (i == label) - loss[i] - inner;
  }
}
```