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

```asm
<bitfmt2int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L57
  mov    $0x0,%eax
  jmp    L5
L57:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  lea    D7(%rip),%rax
  mov    %rax,%rcx
  mov    $0x41f,%edx
  lea    D19(%rip),%rax
  mov    %rax,%rsi
  call   <slurm_xmalloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  movl   $0xffffffff,-0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L135
L37:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L75
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L75
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L29
L75:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L100
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L29
L100:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L115
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L29
L115:
  cmpl   $0x0,-0x1c(%rbp)
  je     L104
  cmpl   $0xffffffff,-0x10(%rbp)
  jne    L60
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L60:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0xffffffff,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
L29:
  addl   $0x1,-0x1c(%rbp)
L135:
  mov    -0x1c(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L37
  jmp    L63
L104:
  nop
L63:
  mov    -0xc(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x18(%rbp)
  setle  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x8(%rbp),%rax
L5:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D7
type_guessed: string
name: parse_data
arguments: data_label: D19
type_guessed: string

tool: 

tool: D19: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Q-Leap-Networks/debian-slurm/refs/heads/master/src/common/bitstring.c

assistant: ```c
int32_t *bitfmt2int(char *bit_str_ptr) {
  int32_t *bit_int_ptr, i, bit_inx, size, sum, start_val;
  if (bit_str_ptr == NULL)
    return NULL;
  size = strlen(bit_str_ptr) + 1;
  bit_int_ptr = slurm_xmalloc(sizeof(int32_t) * (size * 2 + 1), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Q-Leap-Networks/debian-slurm/refs/heads/master/src/common/bitstring.c", 1055, "");
  bit_inx = sum = 0;
  start_val = -1;
  for (i = 0; i < size; i++) {
    if (bit_str_ptr[i] >= '0' && bit_str_ptr[i] <= '9') {
      sum = (sum * 10) + (bit_str_ptr[i] - '0');
    } else if (bit_str_ptr[i] == '-') {
      start_val = sum;
      sum = 0;
    } else if (bit_str_ptr[i] == ',' || bit_str_ptr[i] == '\0') {
      if (i == 0)
        break;
      if (start_val == -1)
        start_val = sum;
      bit_int_ptr[bit_inx++] = start_val;
      bit_int_ptr[bit_inx++] = sum;
      start_val = -1;
      sum = 0;
    }
  }
  assert(bit_inx < (size * 2 + 1));
  bit_int_ptr[bit_inx] = -1;
  return bit_int_ptr;
}
```