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

```asm
<getCustomSplitStatisticCompetingRisk>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,%r13d
  mov    %rsi,0x8(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    %r8d,%ebx
  mov    %r9d,%r15d
  mov    %r9d,%edi
  call   <alloc_uivector@plt>
  mov    %rax,0x40(%rsp)
  mov    %r15d,%edi
  call   <alloc_uivector@plt>
  mov    %rax,0x38(%rsp)
  mov    %r15d,%edi
  call   <alloc_uivector@plt>
  mov    %rax,0x28(%rsp)
  mov    %r15d,%edi
  call   <alloc_uivector@plt>
  mov    %rax,0x20(%rsp)
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <alloc_uimatrix@plt>
  mov    %rax,%r12
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <alloc_uimatrix@plt>
  mov    %rax,%rbp
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <alloc_uimatrix@plt>
  mov    %rax,%r14
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <alloc_uimatrix@plt>
  mov    %rax,0x10(%rsp)
  test   %r15d,%r15d
  je     L153
  mov    $0x1,%edi
  mov    %rax,%r8
L10:
  mov    %edi,%eax
  lea    0x0(,%rax,4),%rcx
  mov    0x38(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  mov    0x20(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  mov    0x40(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  mov    0x28(%rsp),%rsi
  movl   $0x0,(%rsi,%rax,4)
  test   %ebx,%ebx
  je     L320
  mov    $0x1,%edx
L326:
  mov    %edx,%eax
  mov    (%r12,%rax,8),%rsi
  movl   $0x0,(%rsi,%rcx,1)
  mov    0x0(%rbp,%rax,8),%rsi
  movl   $0x0,(%rsi,%rcx,1)
  mov    (%r14,%rax,8),%rsi
  movl   $0x0,(%rsi,%rcx,1)
  mov    (%r8,%rax,8),%rax
  movl   $0x0,(%rax,%rcx,1)
  add    $0x1,%edx
  cmp    %edx,%ebx
  jae    L326
L320:
  add    $0x1,%edi
  cmp    %edi,%r15d
  jae    L10
  test   %r13d,%r13d
  je     L316
  mov    %r15d,%esi
  mov    0x38(%rsp),%rdi
  mov    0x28(%rsp),%r8
  mov    0x20(%rsp),%r9
  jmp    L363
L277:
  addl   $0x1,(%r8,%rax,1)
  jmp    L341
L315:
  sub    $0x1,%r13d
L54:
  test   %r13d,%r13d
  je     L316
  test   %esi,%esi
  je     L316
L363:
  mov    %esi,%eax
  mov    0x90(%rsp),%rcx
  lea    (%rcx,%rax,8),%r11
  mov    %r13d,%ecx
  lea    0x0(,%rcx,8),%rdx
  mov    0x18(%rsp),%r10
  add    %rdx,%r10
  movsd  (%r10),%xmm0
  comisd (%r11),%xmm0
  jb     L158
  shl    $0x2,%rax
  addl   $0x1,(%r9,%rax,1)
  add    0x8(%rsp),%rcx
  cmpb   $0x1,(%rcx)
  je     L277
L341:
  movsd  (%r11),%xmm0
  ucomisd (%r10),%xmm0
  jp     L315
  jne    L315
  add    0x30(%rsp),%rdx
  movsd  (%rdx),%xmm0
  comisd D38(%rip),%xmm0
  jbe    L315
  cvttsd2si %xmm0,%r10
  mov    %r10d,%r10d
  mov    %rax,%r11
  add    (%r12,%r10,8),%r11
  addl   $0x1,(%r11)
  addl   $0x1,(%rdi,%rax,1)
  cmpb   $0x1,(%rcx)
  jne    L315
  cvttsd2si (%rdx),%rdx
  mov    %edx,%edx
  add    0x0(%rbp,%rdx,8),%rax
  addl   $0x1,(%rax)
  jmp    L315
L158:
  sub    $0x1,%esi
  jmp    L54
L316:
  cmp    $0x1,%r15d
  jbe    L319
  lea    -0x1(%r15),%ecx
  lea    0x0(,%rcx,4),%rax
  lea    -0x2(%r15),%edx
  mov    %rcx,%rsi
  sub    %rdx,%rsi
  shl    $0x2,%rsi
  mov    %r15d,%edx
  sub    %rcx,%rdx
  shl    $0x2,%rdx
  mov    0x20(%rsp),%r8
  lea    (%r8,%rdx,1),%rcx
  mov    0x28(%rsp),%rdi
  add    %rdi,%rdx
L404:
  mov    (%rcx,%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,%rsi
  jne    L404
  movb   $0x1,0x30(%rsp)
L330:
  movl   $0x1,0x8(%rsp)
  cmpb   $0x0,0x30(%rsp)
  je     L210
  mov    %r14,0x18(%rsp)
  mov    %r15d,0x4c(%rsp)
  jmp    L115
L153:
  movb   $0x0,0x30(%rsp)
  jmp    L330
L319:
  movb   $0x1,0x30(%rsp)
  jmp    L330
L477:
  mov    %rdi,%rdx
  add    (%r11),%rdx
  mov    %eax,%ecx
  mov    (%r12,%rcx,8),%r8
  mov    (%r8,%rsi,1),%r8d
  add    %r8d,(%rdx)
  mov    %rdi,%rdx
  add    (%r10),%rdx
  mov    0x0(%rbp,%rcx,8),%rcx
  mov    (%rcx,%rsi,1),%ecx
  add    %ecx,(%rdx)
L71:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jb     L137
L411:
  cmp    %eax,%r9d
  jne    L477
  jmp    L71
L137:
  add    $0x4,%rsi
  cmp    %r13,%rsi
  je     L381
L215:
  mov    $0x1,%eax
  jmp    L411
L381:
  add    $0x1,%r9d
  cmp    %r9d,%ebx
  jb     L297
L131:
  mov    %r9d,%r10d
  shl    $0x3,%r10
  mov    0x18(%rsp),%rax
  lea    (%rax,%r10,1),%r11
  mov    (%r15),%edx
  mov    (%r11),%rax
  mov    %edx,(%rax,%rdi,1)
  add    0x10(%rsp),%r10
  mov    (%r14),%edx
  mov    (%r10),%rax
  mov    %edx,(%rax,%rdi,1)
  mov    $0x4,%esi
  cmpl   $0x1,0x8(%rsp)
  ja     L215
  jmp    L381
L297:
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cmp    %eax,0x4c(%rsp)
  jb     L329
L115:
  test   %ebx,%ebx
  je     L297
  mov    0x8(%rsp),%eax
  mov    %eax,%edi
  shl    $0x2,%rdi
  mov    0x20(%rsp),%rsi
  lea    (%rsi,%rdi,1),%r15
  mov    0x28(%rsp),%rsi
  lea    (%rsi,%rdi,1),%r14
  lea    -0x2(%rax),%eax
  lea    0x8(,%rax,4),%r13
  mov    $0x1,%r9d
  jmp    L131
L329:
  mov    0x18(%rsp),%r14
  mov    0x4c(%rsp),%r15d
L210:
  test   %ebx,%ebx
  je     L123
  mov    $0x1,%r10d
  mov    D38(%rip),%r13
  mov    %r13,0x8(%rsp)
  movq   %r13,%xmm4
  movsd  D1(%rip),%xmm3
  movq   %r13,%xmm7
  mov    0x20(%rsp),%r9
  movq   %r13,%xmm8
  jmp    L156
L449:
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,%r15d
  jb     L143
L246:
  cmpl   $0x1,(%r9,%rax,1)
  jbe    L449
  mov    (%rsi,%rax,1),%ecx
  mov    (%r8,%rax,1),%r11d
  mov    (%rdi,%rax,1),%r13d
  pxor   %xmm2,%xmm2
  cvtsi2sd %r13,%xmm2
  mov    %r11d,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13,%xmm0
  divsd  %xmm0,%xmm2
  mov    %r11d,%r13d
  sub    %ecx,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13,%xmm0
  lea    -0x1(%r11),%r11d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r11,%xmm1
  divsd  %xmm1,%xmm0
  mov    %ecx,%ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rcx,%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm3,%xmm6
  subsd  %xmm2,%xmm6
  mulsd  %xmm6,%xmm1
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm5
  jmp    L449
L452:
  movsd  %xmm7,0x8(%rsp)
  movq   %xmm8,%r13
  mov    %r15d,%esi
  mov    0x40(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x38(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x28(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x20(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    0x10(%rsp),%rdi
  call   <dealloc_uimatrix@plt>
  movsd  0x8(%rsp),%xmm4
  andpd  D22(%rip),%xmm4
  movq   %xmm4,%r14
  pxor   %xmm0,%xmm0
  movq   %r13,%xmm4
  ucomisd %xmm4,%xmm0
  ja     L472
L94:
  movq   %r13,%xmm0
  sqrtsd %xmm0,%xmm0
L53:
  movsd  D39(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L27
  pxor   %xmm1,%xmm1
  movsd  D39(%rip),%xmm2
  movq   %r14,%xmm4
  comisd %xmm4,%xmm2
  jae    L133
  movq   %r14,%xmm1
  divsd  %xmm0,%xmm1
  jmp    L133
L472:
  movq   %r13,%xmm0
  call   <sqrt@plt>
  jmp    L53
L27:
  movq   %r14,%xmm1
  divsd  %xmm0,%xmm1
L133:
  movapd %xmm1,%xmm0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L123:
  mov    %r15d,%esi
  mov    0x40(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x38(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x28(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%esi
  mov    0x20(%rsp),%rdi
  call   <dealloc_uivector@plt>
  mov    %r15d,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <dealloc_uimatrix@plt>
  mov    %r15d,%edx
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <dealloc_uimatrix@plt>
  mov    D38(%rip),%r13
  mov    %r13,%r14
  jmp    L94
L372:
  addsd  %xmm4,%xmm7
  movapd %xmm4,%xmm5
L143:
  addsd  %xmm5,%xmm8
  add    $0x1,%r10d
  cmp    %r10d,%ebx
  jb     L452
L156:
  cmpb   $0x0,0x30(%rsp)
  je     L372
  mov    %r10d,%eax
  mov    0x0(%rbp,%rax,8),%rcx
  mov    (%r12,%rax,8),%rsi
  mov    0x10(%rsp),%rdi
  mov    (%rdi,%rax,8),%rdi
  mov    (%r14,%rax,8),%r8
  mov    $0x1,%edx
  pxor   %xmm2,%xmm2
L292:
  mov    %edx,%eax
  mov    (%rcx,%rax,4),%r11d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r11,%xmm1
  mov    (%rdi,%rax,4),%r11d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r11,%xmm0
  mov    (%r8,%rax,4),%r11d
  pxor   %xmm5,%xmm5
  cvtsi2sd %r11,%xmm5
  divsd  %xmm5,%xmm0
  mov    (%rsi,%rax,4),%eax
  pxor   %xmm5,%xmm5
  cvtsi2sd %rax,%xmm5
  mulsd  %xmm5,%xmm0
  subsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm2
  add    $0x1,%edx
  cmp    %edx,%r15d
  jae    L292
  addsd  %xmm2,%xmm7
  mov    $0x4,%eax
  mov    $0x1,%edx
  pxor   %xmm5,%xmm5
  jmp    L246
```

tool_calls: name: unpack_data
arguments: data_tag: D38
data_type: f64
name: unpack_data
arguments: data_tag: D1
data_type: f64
name: unpack_data
arguments: data_tag: D22
data_type: qword[2]
name: unpack_data
arguments: data_tag: D39
data_type: byte[8]

tool: D38: 0

tool: D1: 1

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

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