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

```asm
<pre_processing_func>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8d,-0x54(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L107
  cmpq   $0x1,-0x48(%rbp)
  jne    L237
  cmpl   $0x0,-0x54(%rbp)
  jne    L155
  movl   $0x0,-0x28(%rbp)
  jmp    L199
L87:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x20(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L247
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L247:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L17
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L17:
  addl   $0x1,-0x28(%rbp)
L199:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L87
  movl   $0x0,-0x28(%rbp)
  jmp    L52
L220:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L45
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L45
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L45:
  addl   $0x1,-0x28(%rbp)
L52:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L220
  movsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L209
  mov    -0x50(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x28(%rbp)
  jmp    L227
L47:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x38(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x28(%rbp)
L227:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L47
  jmp    L123
L209:
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0x50(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L148
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jne    L148
  mov    -0x24(%rbp),%eax
  jmp    L295
L148:
  movl   $0x0,-0x28(%rbp)
  jmp    L229
L168:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x50(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x38(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x28(%rbp)
L229:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L168
  jmp    L123
L155:
  mov    -0x50(%rbp),%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L216
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L216
  movl   $0x0,-0x28(%rbp)
  jmp    L24
L279:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x38(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x28(%rbp)
L24:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L279
  jmp    L123
L216:
  movl   $0x0,-0x28(%rbp)
  jmp    L72
L60:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    -0x50(%rbp),%rdx
  movsd  (%rdx),%xmm1
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  movq   %rax,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x28(%rbp)
L72:
  mov    -0x28(%rbp),%eax
  cltq
  cmp    %rax,-0x40(%rbp)
  jg     L60
  jmp    L123
L237:
  movl   $0xfffffffc,-0x24(%rbp)
  jmp    L123
L107:
  nop
L123:
  mov    -0x24(%rbp),%eax
L295:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int pre_processing_func(double *values, long length, long pre_processing, double *pre_processing_parameter, int mode) {
  int i;
  int ret = 0;
  double min = values[0];
  double next_min = values[0];
  switch (pre_processing) {
  case 0:
    break;
  case 1:
    if (mode == 0) {
      for (i = 0; i < length; i++) {
        if (values[i] < min)
          min = values[i];
        if (values[i] > next_min)
          next_min = values[i];
      }
      for (i = 0; i < length; i++) {
        if (values[i] > min && values[i] < next_min)
          next_min = values[i];
      }
      if (min > 0) {
        *pre_processing_parameter = 0;
        for (i = 0; i < length; i++)
          values[i] = log(values[i]);
      } else {
        *pre_processing_parameter = next_min - 2 * min;
        if (next_min == min)
          return ret;
        for (i = 0; i < length; i++)
          values[i] = log(values[i] + *pre_processing_parameter);
      }
    } else {
      if (*pre_processing_parameter == 0) {
        for (i = 0; i < length; i++)
          values[i] = exp(values[i]);
      } else {
        for (i = 0; i < length; i++)
          values[i] = exp(values[i]) - *pre_processing_parameter;
      }
    }
    break;
  default:
    ret = -4;
    break;
  }
  return ret;
}
```