user: Translate the below assembly code into C programming language:

```asm
<mk_bms>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rsi),%ebp
  test   %ebp,%ebp
  je     L27
  mov    %rdi,%r12
  mov    %rsi,%r15
  mov    %rdi,%rax
  mov    $0x0,%ebx
  movsd  D62(%rip),%xmm1
  movsd  D78(%rip),%xmm2
  jmp    L105
L93:
  add    $0x1,%ebx
  add    $0x4,%rax
  cmp    %ebx,%ebp
  je     L27
L105:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rax),%xmm0
  comisd %xmm1,%xmm0
  jb     L93
  comisd %xmm0,%xmm2
  jb     L93
  cmp    %ebx,%ebp
  je     L27
  lea    0x7(%rbp),%r14d
  shr    $0x3,%r14d
  add    $0x6,%r14d
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L15
L9:
  mov    %r13,%rsi
  mov    %r14d,%edi
  call   <uint_char@plt>
  movb   $0x6,0x4(%r13)
  movb   $0x0,0x5(%r13)
  lea    0x6(%r13),%rcx
  mov    %ebx,%edi
  shr    $0x3,%edi
  je     L195
  lea    -0x1(%rdi),%eax
  lea    0x7(%r13,%rax,1),%rsi
  mov    %rcx,%rax
L173:
  mov    %rax,%rdx
  add    $0x1,%rax
  movb   $0xff,(%rdx)
  cmp    %rsi,%rax
  jne    L173
  mov    %edi,%edi
  add    %rdi,%rcx
L195:
  and    $0xfffffff8,%ebx
  cmp    %ebx,%ebp
  jbe    L199
  mov    %ebx,%eax
  lea    (%r12,%rax,4),%rdx
  sub    $0x1,%ebp
  sub    %ebx,%ebp
  add    %rbp,%rax
  lea    0x4(%r12,%rax,4),%r8
  mov    $0x80,%eax
  mov    $0x0,%esi
  movsd  D62(%rip),%xmm2
  movsd  D78(%rip),%xmm3
  jmp    L108
L27:
  mov    $0x6,%edi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L143
L128:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rsi
  mov    $0x6,%edi
  call   <uint_char@plt>
  movb   $0x6,0x4(%rbx)
  movb   $0xff,0x5(%rbx)
  jmp    L63
L143:
  lea    D6(%rip),%rsi
  lea    D59(%rip),%rdi
  call   <fatal_error@plt>
  jmp    L128
L15:
  lea    D6(%rip),%rsi
  lea    D59(%rip),%rdi
  call   <fatal_error@plt>
  jmp    L9
L114:
  add    %eax,%esi
  mov    %ebx,%edi
  movss  %xmm0,(%r12,%rdi,4)
  lea    0x1(%rbx),%ebx
L113:
  shr    %eax
  jne    L190
  mov    %sil,(%rcx)
  mov    %eax,%esi
  lea    0x1(%rcx),%rcx
  mov    $0x80,%eax
L190:
  add    $0x4,%rdx
  cmp    %r8,%rdx
  je     L136
L108:
  movss  (%rdx),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  comisd %xmm1,%xmm2
  ja     L114
  comisd %xmm3,%xmm1
  jbe    L113
  jmp    L114
L136:
  cmp    $0x80,%eax
  je     L199
  mov    %sil,(%rcx)
L199:
  mov    %ebx,(%r15)
L63:
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D62
datatype: f64
name: extract_symbolic_data
arguments: data_label: D78
datatype: f64
name: extract_symbolic_data
arguments: data_label: D6
datatype: string
name: extract_symbolic_data
arguments: data_label: D59
datatype: string

tool: D62: 9.9989e+20

tool: D78: 9.9991e+20

tool: 

tool: D59: mk_bms: memory allocation problem

assistant: ```c
unsigned char *mk_bms(float *data, unsigned int *ndata) {
  int bms_size;
  unsigned char *bms, *cbits;
  unsigned int nn, i, start, c, imask, i0;
  nn = *ndata;
  for (i = 0; i < nn; i++) {
    if (((data[i]) >= 9.9989e20 && (data[i]) <= 9.9991e20))
      break;
  }
  if (i == nn) {
    bms = (unsigned char *)malloc(6);
    if (bms == NULL)
      fatal_error("mk_bms: memory allocation problem", "");
    uint_char(6, bms);
    bms[4] = 6;
    bms[5] = 255;
    return bms;
  }
  bms_size = 6 + (nn + 7) / 8;
  bms = (unsigned char *)malloc(bms_size);
  if (bms == NULL)
    fatal_error("mk_bms: memory allocation problem", "");
  uint_char(bms_size, bms);
  bms[4] = 6;
  bms[5] = 0;
  cbits = bms + 6;
  i0 = i >> 3;
  for (i = 0; i < i0; i++) {
    *cbits++ = 255;
  }
  c = 0;
  imask = 128;
  i0 = i0 << 3;
  start = i0;
  for (i = i0; i < nn; i++) {
    if (((data[i]) < 9.9989e20 || (data[i]) > 9.9991e20)) {
      c += imask;
      data[start++] = data[i];
    }
    if ((imask >>= 1) == 0) {
      *cbits++ = c;
      c = 0;
      imask = 128;
    }
  }
  if (imask != 128)
    *cbits = c;
  *ndata = start;
  return bms;
}
```