user: 请将以下的汇编代码转换成C语言代码：

```asm
<pack2bitNchan>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  movss  %xmm0,-0x5c(%rbp)
  movss  %xmm1,-0x60(%rbp)
  mov    %r8d,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x64(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  je     L100
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L52
L100:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x5c(%rbp),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd -0x60(%rbp),%xmm2
  movsd  D2(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x5c(%rbp),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd -0x60(%rbp),%xmm2
  movsd  D2(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L83
L85:
  movl   $0x0,-0x30(%rbp)
  jmp    L101
L21:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x28(%rbp),%xmm0
  jb     L11
  mov    -0x2c(%rbp),%eax
  cltq
  movl   $0x3,-0x20(%rbp,%rax,4)
  jmp    L33
L11:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x24(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jb     L28
  mov    -0x2c(%rbp),%eax
  cltq
  movl   $0x0,-0x20(%rbp,%rax,4)
  jmp    L33
L28:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x5c(%rbp),%xmm0
  jbe    L109
  mov    -0x2c(%rbp),%eax
  cltq
  movl   $0x2,-0x20(%rbp,%rax,4)
  jmp    L33
L109:
  mov    -0x2c(%rbp),%eax
  cltq
  movl   $0x1,-0x20(%rbp,%rax,4)
L33:
  addl   $0x1,-0x2c(%rbp)
  cmpl   $0x4,-0x2c(%rbp)
  jne    L41
  mov    -0x20(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shl    $0x2,%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x4,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%esi
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  or     %esi,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x34(%rbp)
  movl   $0x0,-0x2c(%rbp)
L41:
  addl   $0x1,-0x30(%rbp)
L101:
  mov    -0x30(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L21
  addl   $0x1,-0x38(%rbp)
L83:
  mov    -0x64(%rbp),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x38(%rbp)
  jl     L85
  mov    $0x0,%eax
L52:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D8
type_infered: string
name: read_data
arguments: data_label: D2
type_infered: f64

tool: D8: Can only pack multiple of 4 samples*channels!


tool: D2: 0.95

assistant: ```c
int pack2bitNchan(float **in, int nchan, int off, char *out, float mean, float stddev, int len) {
  int i, j, n, k, ch[4];
  float maxposThresh, maxnegThresh;
  if (len * nchan % 4 != 0) {
    printf("Can only pack multiple of 4 samples*channels!\n");
    return (1);
  }
  maxposThresh = mean + stddev * 0.95;
  maxnegThresh = mean - stddev * 0.95;
  j = 0;
  k = 0;
  for (i = off; i < len + off; i++) {
    for (n = 0; n < nchan; n++) {
      {
        if (in[n][i] >= maxposThresh)
          ch[k] = 3;
        else if (in[n][i] <= maxnegThresh)
          ch[k] = 0;
        else if (in[n][i] > mean)
          ch[k] = 2;
        else
          ch[k] = 1;
      };
      k++;
      if (k == 4) {
        out[j] = (ch[0]) | ((ch[1] << 2)) | ((ch[2] << 4)) | ((ch[3] << 6));
        j++;
        k = 0;
      }
    }
  }
  return 0;
}
```