user: What is the c source code of the assembly code below?

```asm
<bitfmt2int>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  test   %rdi,%rdi
  jne    L41
  pop    %rbx
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L41:
  call   <strlen@plt>
  lea    D15(%rip),%rcx
  mov    $0x41f,%edx
  lea    D18(%rip),%rsi
  lea    0x1(%rax),%r14d
  mov    %eax,%ebp
  lea    0x4(,%r14,8),%edi
  lea    (%r14,%r14,1),%ebx
  call   <slurm_xmalloc@plt>
  mov    %rax,%r13
  test   %r14d,%r14d
  jle    L1
  xor    %edx,%edx
  mov    %ebp,%eax
  mov    $0xffffffff,%r9d
  xor    %edi,%edi
  movzbl (%r12,%rdx,1),%esi
  xor    %r8d,%r8d
  lea    -0x30(%rsi),%ecx
  cmp    $0x9,%cl
  ja     L7
L116:
  lea    (%rdi,%rdi,4),%esi
  movsbl %cl,%ecx
  lea    (%rcx,%rsi,2),%edi
L59:
  lea    0x1(%rdx),%rcx
  cmp    %rax,%rdx
  je     L95
  mov    %rcx,%rdx
  movzbl (%r12,%rdx,1),%esi
  lea    -0x30(%rsi),%ecx
  cmp    $0x9,%cl
  jbe    L116
L7:
  cmp    $0x2d,%sil
  je     L69
  cmp    $0x2c,%sil
  je     L104
  test   %sil,%sil
  jne    L59
L104:
  test   %rdx,%rdx
  jne    L75
L95:
  movslq %r8d,%rax
  lea    0x0(%r13,%rax,4),%rbp
L90:
  xor    %edi,%edi
  cmp    %r8d,%ebx
  mov    %r13,%r12
  setge  %dil
  call   <assert@plt>
  movl   $0xffffffff,0x0(%rbp)
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L69:
  mov    %edi,%r9d
  xor    %edi,%edi
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L1:
  mov    %rax,%rbp
  xor    %r8d,%r8d
  jmp    L90
L75:
  cmp    $0xffffffff,%r9d
  movd   %edi,%xmm1
  movslq %r8d,%rcx
  cmove  %edi,%r9d
  add    $0x2,%r8d
  xor    %edi,%edi
  movd   %r9d,%xmm0
  or     $0xffffffff,%r9d
  punpckldq %xmm1,%xmm0
  movq   %xmm0,0x0(%r13,%rcx,4)
  jmp    L59
```

tool_calls: name: unpack_data
arguments: label: D15
data_type: string
name: unpack_data
arguments: label: D18
data_type: string

tool: 

tool: D18: /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;
}
```