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

```asm
<getCustomSplitStatisticCompetingRisk>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edi,%ebx
  mov    %r9d,%edi
  sub    $0x48,%rsp
  mov    %rdx,0x30(%rsp)
  mov    %rcx,(%rsp)
  mov    %rsi,0x38(%rsp)
  call   <alloc_uivector@plt>
  mov    %r14d,%edi
  mov    %rax,0x28(%rsp)
  call   <alloc_uivector@plt>
  mov    %r14d,%edi
  mov    %rax,0x20(%rsp)
  call   <alloc_uivector@plt>
  mov    %r14d,%edi
  mov    %rax,0x18(%rsp)
  call   <alloc_uivector@plt>
  mov    %r14d,%esi
  mov    %ebp,%edi
  mov    %rax,0x10(%rsp)
  call   <alloc_uimatrix@plt>
  mov    %r14d,%esi
  mov    %ebp,%edi
  mov    %rax,%r13
  call   <alloc_uimatrix@plt>
  mov    %r14d,%esi
  mov    %ebp,%edi
  mov    %rax,%r12
  call   <alloc_uimatrix@plt>
  mov    %r14d,%esi
  mov    %ebp,%edi
  mov    %rax,%r15
  call   <alloc_uimatrix@plt>
  mov    %rax,0x8(%rsp)
  test   %r14d,%r14d
  je     L161
  mov    0x38(%rsp),%r11
  mov    0x30(%rsp),%r10
  mov    $0x1,%edi
  mov    %rax,%r8
L326:
  mov    0x20(%rsp),%rsi
  mov    %edi,%eax
  mov    $0x1,%edx
  lea    0x0(,%rax,4),%rcx
  movl   $0x0,(%rsi,%rax,4)
  mov    0x10(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  mov    0x28(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  mov    0x18(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  test   %ebp,%ebp
  je     L295
L58:
  mov    %edx,%eax
  add    $0x1,%edx
  mov    0x0(%r13,%rax,8),%rsi
  movl   $0x0,(%rsi,%rcx,1)
  mov    (%r12,%rax,8),%rsi
  movl   $0x0,(%rsi,%rcx,1)
  mov    (%r15,%rax,8),%rsi
  mov    (%r8,%rax,8),%rax
  movl   $0x0,(%rsi,%rcx,1)
  movl   $0x0,(%rax,%rcx,1)
  cmp    %edx,%ebp
  jae    L58
L295:
  add    $0x1,%edi
  cmp    %edi,%r14d
  jae    L326
  test   %ebx,%ebx
  je     L5
  mov    0x18(%rsp),%r8
  mov    0x10(%rsp),%r9
  mov    %r14d,%edi
  pxor   %xmm3,%xmm3
L248:
  mov    0x80(%rsp),%rsi
  mov    %edi,%eax
  mov    %ebx,%edx
  movsd  (%r10,%rdx,8),%xmm0
  movsd  (%rsi,%rax,8),%xmm1
  comisd %xmm1,%xmm0
  jb     L97
  shl    $0x2,%rax
  lea    (%r11,%rdx,1),%rcx
  addl   $0x1,(%r9,%rax,1)
  cmpb   $0x1,(%rcx)
  jne    L292
  addl   $0x1,(%r8,%rax,1)
L292:
  ucomisd %xmm0,%xmm1
  jp     L131
  jne    L131
  mov    (%rsp),%rsi
  movsd  (%rsi,%rdx,8),%xmm0
  comisd %xmm3,%xmm0
  jbe    L131
  cvttsd2si %xmm0,%rdx
  mov    %edx,%edx
  mov    0x0(%r13,%rdx,8),%rsi
  add    %rax,%rsi
  addl   $0x1,(%rsi)
  mov    0x20(%rsp),%rsi
  addl   $0x1,(%rsi,%rax,1)
  cmpb   $0x1,(%rcx)
  jne    L131
  add    (%r12,%rdx,8),%rax
  addl   $0x1,(%rax)
L131:
  sub    $0x1,%ebx
L71:
  test   %ebx,%ebx
  je     L370
  test   %edi,%edi
  jne    L248
L370:
  cmp    $0x1,%r14d
  jbe    L244
  lea    -0x1(%r14),%edx
  lea    -0x2(%r14),%ecx
  mov    0x10(%rsp),%r8
  mov    0x18(%rsp),%rdi
  lea    0x0(,%rdx,4),%rax
  sub    %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    %r14d,%edx
  shl    $0x2,%rdx
  sub    %rax,%rdx
  lea    (%r8,%rdx,1),%rsi
  add    %rdi,%rdx
L173:
  mov    (%rsi,%rax,1),%r9d
  add    %r9d,(%r8,%rax,1)
  mov    (%rdx,%rax,1),%r9d
  add    %r9d,(%rdi,%rax,1)
  mov    %rax,%r9
  sub    $0x4,%rax
  cmp    %r9,%rcx
  jne    L173
L244:
  movl   $0x1,(%rsp)
  mov    %r14d,0x30(%rsp)
L147:
  test   %ebp,%ebp
  je     L366
  mov    (%rsp),%r11d
  mov    0x10(%rsp),%rbx
  mov    $0x1,%r9d
  mov    %r11,%rax
  shl    $0x2,%r11
  lea    (%rbx,%r11,1),%r14
  mov    0x18(%rsp),%rbx
  sub    $0x2,%eax
  lea    0x8(,%rax,4),%r10
  add    %r11,%rbx
  nopl   0x0(%rax)
L279:
  mov    %r9d,%eax
  mov    0x8(%rsp),%rcx
  mov    (%r14),%edx
  mov    (%r15,%rax,8),%rdi
  mov    (%rcx,%rax,8),%rsi
  mov    $0x4,%ecx
  add    %r11,%rdi
  mov    %edx,(%rdi)
  mov    (%rbx),%eax
  add    %r11,%rsi
  cmpl   $0x1,(%rsp)
  mov    %eax,(%rsi)
  je     L323
  nopw   0x0(%rax,%rax,1)
L95:
  mov    $0x1,%eax
  nopl   (%rax)
L83:
  cmp    %eax,%r9d
  je     L3
  mov    %eax,%edx
  mov    0x0(%r13,%rdx,8),%r8
  mov    (%r12,%rdx,8),%rdx
  mov    (%r8,%rcx,1),%r8d
  add    %r8d,(%rdi)
  mov    (%rdx,%rcx,1),%edx
  add    %edx,(%rsi)
L3:
  add    $0x1,%eax
  cmp    %eax,%ebp
  jae    L83
  add    $0x4,%rcx
  cmp    %rcx,%r10
  jne    L95
L323:
  add    $0x1,%r9d
  cmp    %r9d,%ebp
  jae    L279
L366:
  addl   $0x1,(%rsp)
  mov    (%rsp),%eax
  cmp    %eax,0x30(%rsp)
  jae    L147
  mov    0x30(%rsp),%r14d
  mov    $0x1,%r11d
L139:
  movsd  D24(%rip),%xmm6
  mov    0x10(%rsp),%r8
  movapd %xmm3,%xmm4
  movapd %xmm3,%xmm5
  mov    $0x1,%r10d
  test   %ebp,%ebp
  je     L164
L160:
  test   %r11b,%r11b
  je     L302
  mov    0x8(%rsp),%rdi
  mov    %r10d,%eax
  mov    $0x1,%edx
  movapd %xmm3,%xmm2
  mov    (%r12,%rax,8),%rbx
  mov    0x0(%r13,%rax,8),%rcx
  mov    (%rdi,%rax,8),%rsi
  mov    (%r15,%rax,8),%rdi
  nopw   0x0(%rax,%rax,1)
L301:
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  pxor   %xmm7,%xmm7
  mov    %edx,%eax
  mov    (%rbx,%rax,4),%r9d
  add    $0x1,%edx
  cvtsi2sd %r9,%xmm1
  mov    (%rsi,%rax,4),%r9d
  cvtsi2sd %r9,%xmm0
  mov    (%rdi,%rax,4),%r9d
  mov    (%rcx,%rax,4),%eax
  cvtsi2sd %r9,%xmm7
  divsd  %xmm7,%xmm0
  pxor   %xmm7,%xmm7
  cvtsi2sd %rax,%xmm7
  mulsd  %xmm7,%xmm0
  subsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm2
  cmp    %edx,%r14d
  jae    L301
  addsd  %xmm2,%xmm5
  xor    %eax,%eax
  movapd %xmm3,%xmm7
  nopw   0x0(%rax,%rax,1)
L153:
  cmpl   $0x1,0x4(%r8,%rax,4)
  jbe    L148
  mov    0x4(%rsi,%rax,4),%ebx
  pxor   %xmm2,%xmm2
  pxor   %xmm0,%xmm0
  mov    0x4(%rcx,%rax,4),%edx
  mov    0x4(%rdi,%rax,4),%r9d
  pxor   %xmm1,%xmm1
  movapd %xmm6,%xmm8
  cvtsi2sd %rbx,%xmm2
  mov    %r9d,%ebx
  cvtsi2sd %rbx,%xmm0
  mov    %r9d,%ebx
  sub    $0x1,%r9d
  sub    %edx,%ebx
  cvtsi2sd %r9,%xmm1
  divsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  divsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm2,%xmm8
  mulsd  %xmm8,%xmm1
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm7
L148:
  add    $0x1,%rax
  lea    0x1(%rax),%edx
  cmp    %edx,%r14d
  jae    L153
  add    $0x1,%r10d
  addsd  %xmm7,%xmm4
  cmp    %r10d,%ebp
  jae    L160
L40:
  mov    0x28(%rsp),%rdi
  mov    %r14d,%esi
  movsd  %xmm5,(%rsp)
  movsd  %xmm3,0x38(%rsp)
  movsd  %xmm4,0x30(%rsp)
  call   <dealloc_uivector@plt>
  mov    0x20(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    0x18(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    0x10(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <dealloc_uimatrix@plt>
  mov    0x8(%rsp),%rdi
  mov    %r14d,%edx
  mov    %ebp,%esi
  call   <dealloc_uimatrix@plt>
  movsd  0x30(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm3
  movsd  (%rsp),%xmm5
  andpd  D7(%rip),%xmm5
  ucomisd %xmm4,%xmm3
  ja     L374
L362:
  sqrtsd %xmm4,%xmm4
L206:
  movsd  D19(%rip),%xmm0
  comisd %xmm4,%xmm0
  jb     L246
  comisd %xmm5,%xmm0
  jae    L306
L246:
  divsd  %xmm4,%xmm5
  movapd %xmm5,%xmm3
L306:
  add    $0x48,%rsp
  movapd %xmm3,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L97:
  sub    $0x1,%edi
  jmp    L71
L302:
  movapd %xmm3,%xmm7
  add    $0x1,%r10d
  addsd  %xmm3,%xmm5
  addsd  %xmm7,%xmm4
  cmp    %r10d,%ebp
  jae    L160
  jmp    L40
L164:
  mov    0x28(%rsp),%rdi
  mov    %r14d,%esi
  movsd  %xmm3,0x30(%rsp)
  movsd  %xmm3,(%rsp)
  call   <dealloc_uivector@plt>
  mov    0x20(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    0x18(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    0x10(%rsp),%rdi
  mov    %r14d,%esi
  call   <dealloc_uivector@plt>
  mov    %r14d,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r14d,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r14d,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <dealloc_uimatrix@plt>
  mov    0x8(%rsp),%rdi
  mov    %r14d,%edx
  xor    %esi,%esi
  call   <dealloc_uimatrix@plt>
  movsd  0x30(%rsp),%xmm3
  movsd  (%rsp),%xmm4
  movapd %xmm3,%xmm5
  jmp    L362
L161:
  xor    %r11d,%r11d
  pxor   %xmm3,%xmm3
  jmp    L139
L5:
  pxor   %xmm3,%xmm3
  jmp    L370
L374:
  movapd %xmm4,%xmm0
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm5,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm5
  movapd %xmm0,%xmm4
  jmp    L206
```

tool_calls: name: unpack_data
arguments: data_label: D24
data_type: f64
name: unpack_data
arguments: data_label: D7
data_type: qword[2]
name: unpack_data
arguments: data_label: D19
data_type: byte[8]

tool: D24: 1

tool: {"D7": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D19": [0x95,0xd6,0x26,0xe8,0x0b,0x2e,0x11,0x3e]}

assistant: ```c
double getCustomSplitStatisticCompetingRisk(unsigned int n, char *membership, double *time, double *event, unsigned int eventTypeSize, unsigned int eventTimeSize, double *eventTime, double *response, double mean, double variance, unsigned int maxLevel, double **feature, unsigned int featureCount) {
  unsigned int *nodeLeftEvent, *nodeParentEvent;
  unsigned int *nodeLeftAtRisk, *nodeParentAtRisk;
  unsigned int **nodeLeftEventCR, **nodeParentEventCR;
  unsigned int **nodeLeftInclusiveAtRisk, **nodeParentInclusiveAtRisk;
  double delta, deltaNum, deltaSubNum, deltaDen, deltaSubDen;
  unsigned int i, j, k, r, s;
  deltaNum = deltaDen = 0.0;
  nodeLeftEvent = alloc_uivector(eventTimeSize);
  nodeParentEvent = alloc_uivector(eventTimeSize);
  nodeLeftAtRisk = alloc_uivector(eventTimeSize);
  nodeParentAtRisk = alloc_uivector(eventTimeSize);
  nodeParentEventCR = alloc_uimatrix(eventTypeSize, eventTimeSize);
  nodeLeftEventCR = alloc_uimatrix(eventTypeSize, eventTimeSize);
  nodeParentInclusiveAtRisk = alloc_uimatrix(eventTypeSize, eventTimeSize);
  nodeLeftInclusiveAtRisk = alloc_uimatrix(eventTypeSize, eventTimeSize);
  for (k = 1; k <= eventTimeSize; k++) {
    nodeParentEvent[k] = 0;
    nodeParentAtRisk[k] = 0;
    nodeLeftEvent[k] = 0;
    nodeLeftAtRisk[k] = 0;
    for (j = 1; j <= eventTypeSize; j++) {
      nodeParentEventCR[j][k] = 0;
      nodeLeftEventCR[j][k] = 0;
      nodeParentInclusiveAtRisk[j][k] = 0;
      nodeLeftInclusiveAtRisk[j][k] = 0;
    }
  }
  k = eventTimeSize;
  i = n;
  while ((i > 0) && (k > 0)) {
    if (eventTime[k] <= time[i]) {
      nodeParentAtRisk[k]++;
      if (membership[i] == 0x01) {
        nodeLeftAtRisk[k]++;
      }
      if (eventTime[k] == time[i]) {
        if (event[i] > 0) {
          nodeParentEventCR[(unsigned int)event[i]][k]++;
          nodeParentEvent[k]++;
          if (membership[i] == 0x01) {
            nodeLeftEventCR[(unsigned int)event[i]][k]++;
          }
        }
      }
      i--;
    } else {
      k--;
    }
  }
  for (k = eventTimeSize; k > 1; k--) {
    nodeParentAtRisk[k - 1] = nodeParentAtRisk[k] + nodeParentAtRisk[k - 1];
    nodeLeftAtRisk[k - 1] = nodeLeftAtRisk[k] + nodeLeftAtRisk[k - 1];
  }
  for (k = 1; k <= eventTimeSize; k++) {
    for (j = 1; j <= eventTypeSize; j++) {
      nodeParentInclusiveAtRisk[j][k] = nodeParentAtRisk[k];
      nodeLeftInclusiveAtRisk[j][k] = nodeLeftAtRisk[k];
      for (s = 1; s < k; s++) {
        for (r = 1; r <= eventTypeSize; r++) {
          if (j != r) {
            nodeParentInclusiveAtRisk[j][k] += nodeParentEventCR[r][s];
            nodeLeftInclusiveAtRisk[j][k] += nodeLeftEventCR[r][s];
          }
        }
      }
    }
  }
  for (j = 1; j <= eventTypeSize; j++) {
    deltaSubNum = 0;
    for (k = 1; k <= eventTimeSize; k++) {
      deltaSubNum = deltaSubNum + (nodeLeftEventCR[j][k] - (nodeParentEventCR[j][k] * ((double)nodeLeftInclusiveAtRisk[j][k] / nodeParentInclusiveAtRisk[j][k])));
    }
    deltaNum = deltaNum + deltaSubNum;
    deltaSubDen = 0;
    for (k = 1; k <= eventTimeSize; k++) {
      if (nodeParentAtRisk[k] >= 2) {
        deltaSubDen = deltaSubDen + ((nodeParentEventCR[j][k] * ((double)nodeLeftInclusiveAtRisk[j][k] / nodeParentInclusiveAtRisk[j][k])) * (1.0 - ((double)nodeLeftInclusiveAtRisk[j][k] / nodeParentInclusiveAtRisk[j][k])) * ((double)(nodeParentInclusiveAtRisk[j][k] - nodeParentEventCR[j][k]) / (nodeParentInclusiveAtRisk[j][k] - 1)));
      }
    }
    deltaDen = deltaDen + deltaSubDen;
  }
  dealloc_uivector(nodeLeftEvent, eventTimeSize);
  dealloc_uivector(nodeParentEvent, eventTimeSize);
  dealloc_uivector(nodeLeftAtRisk, eventTimeSize);
  dealloc_uivector(nodeParentAtRisk, eventTimeSize);
  dealloc_uimatrix(nodeParentEventCR, eventTypeSize, eventTimeSize);
  dealloc_uimatrix(nodeLeftEventCR, eventTypeSize, eventTimeSize);
  dealloc_uimatrix(nodeParentInclusiveAtRisk, eventTypeSize, eventTimeSize);
  dealloc_uimatrix(nodeLeftInclusiveAtRisk, eventTypeSize, eventTimeSize);
  deltaNum = fabs(deltaNum);
  deltaDen = sqrt(deltaDen);
  if (deltaDen <= 1.0e-9) {
    if (deltaNum <= 1.0e-9) {
      delta = 0.0;
    } else {
      delta = deltaNum / deltaDen;
    }
  } else {
    delta = deltaNum / deltaDen;
  }
  return delta;
}
```