user: Please show me the C implementation that matches the assembly code listed below:

```asm
<read_mixed_cell>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x58(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  mov    %rax,-0x70(%rbp)
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L82
L142:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L142
L82:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L153
L131:
  movslq %r13d,%rax
  mov    %rsp,%rcx
  mov    %rsp,-0x60(%rbp)
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L35
L135:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L135
L35:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L120
L8:
  xor    %eax,%eax
  mov    %r13d,%esi
  lea    D56(%rip),%rdi
  mov    %rsp,-0x78(%rbp)
  call   <printf@plt>
  test   %r13d,%r13d
  jle    L14
  mov    -0x78(%rbp),%rdx
  mov    %r13d,%eax
  lea    D76(%rip),%rbx
  mov    %rdx,%r15
  lea    (%rdx,%rax,8),%r12
  nopl   (%rax)
L22:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x8,%r15
  call   <scanf@plt>
  cmp    %r12,%r15
  jne    L22
L14:
  lea    D61(%rip),%rdi
  call   <puts@plt>
  mov    -0x58(%rbp),%eax
  mov    %r13d,-0x40(%rbp)
  mov    %eax,-0x44(%rbp)
  lea    0x1(%rax),%r12d
  test   %eax,%eax
  jle    L72
  mov    -0x60(%rbp),%r14
  xor    %r15d,%r15d
  xor    %edx,%edx
  lea    D9(%rip),%r13
  mov    %r14,%rbx
  nopl   0x0(%rax,%rax,1)
L97:
  add    $0x1,%edx
  lea    D5(%rip),%rdi
  xor    %eax,%eax
  mov    %edx,%esi
  mov    %edx,-0x54(%rbp)
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  add    $0x4,%r14
  add    -0x4(%r14),%r15d
  mov    -0x54(%rbp),%edx
  cmp    -0x58(%rbp),%edx
  jne    L97
  lea    (%r12,%r15,1),%edi
  mov    $0x4,%esi
  mov    %edi,-0x3c(%rbp)
  call   <calloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    %r15d,(%rax)
  xor    %eax,%eax
  nopl   (%rax)
L83:
  mov    -0x60(%rbp),%rcx
  mov    (%rcx,%rax,4),%edx
  mov    -0x68(%rbp),%rcx
  mov    %edx,0x4(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    -0x70(%rbp),%rax
  jne    L83
  lea    D60(%rip),%rdi
  call   <puts@plt>
  movl   $0x0,-0x60(%rbp)
  nopl   0x0(%rax)
L77:
  addl   $0x1,-0x60(%rbp)
  mov    (%rbx),%esi
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  mov    -0x60(%rbp),%edx
  call   <printf@plt>
  mov    (%rbx),%eax
  test   %eax,%eax
  jle    L167
  mov    -0x68(%rbp),%rcx
  movslq %r12d,%rax
  xor    %r15d,%r15d
  lea    (%rcx,%rax,4),%r14
  lea    0x1(%r12),%eax
  mov    %eax,-0x54(%rbp)
  nopl   0x0(%rax,%rax,1)
L139:
  mov    -0x54(%rbp),%eax
  mov    %r14,%rsi
  mov    %r13,%rdi
  add    $0x4,%r14
  lea    (%rax,%r15,1),%r12d
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  cmp    %r15d,(%rbx)
  jg     L139
L167:
  mov    -0x58(%rbp),%ecx
  add    $0x4,%rbx
  cmp    %ecx,-0x60(%rbp)
  jne    L77
L60:
  mov    -0x68(%rbp),%rdx
  mov    -0x78(%rbp),%rcx
  lea    -0x44(%rbp),%rsi
  mov    $0xd,%edi
  call   <_ada_use_celcon@plt>
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L67
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L153:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L131
L72:
  mov    %r12d,%edi
  mov    $0x4,%esi
  mov    %r12d,-0x3c(%rbp)
  call   <calloc@plt>
  lea    D60(%rip),%rdi
  movl   $0x0,(%rax)
  mov    %rax,-0x68(%rbp)
  call   <puts@plt>
  jmp    L60
L120:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L8
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D56
data_type: string
name: parse_data
arguments: data_label: D76
data_type: string
name: parse_data
arguments: data_label: D61
data_type: string
name: parse_data
arguments: data_label: D9
data_type: string
name: parse_data
arguments: data_label: D5
data_type: string
name: parse_data
arguments: data_label: D60
data_type: string
name: parse_data
arguments: data_label: D21
data_type: string

tool: D56: Give the inner normal (%d-vector) : 

tool: D76: %lf

tool: D61: Reading the number of points in each support...

tool: D9: %d

tool: D5:   #points in support %d : 

tool: D60: Reading the labels for each support...

tool: D21:   give %d labels for support %d : 

assistant: ```c
int read_mixed_cell(int r, int n) {
  int a[3], *b, cnt[r], i, j, k, fail, sum;
  double c[n];
  printf("Give the inner normal (%d-vector) : ", n);
  for (i = 0; i < n; i++)
    scanf("%lf", &c[i]);
  printf("Reading the number of points in each support...\n");
  a[0] = r;
  a[1] = n;
  sum = 0;
  for (i = 0; i < r; i++) {
    printf("  #points in support %d : ", i + 1);
    scanf("%d", &cnt[i]);
    sum += cnt[i];
  }
  a[2] = 1 + r + sum;
  b = calloc(a[2], sizeof(int));
  b[0] = sum;
  for (i = 0; i < r; i++)
    b[i + 1] = cnt[i];
  printf("Reading the labels for each support...\n");
  k = r + 1;
  for (i = 0; i < r; i++) {
    printf("  give %d labels for support %d : ", cnt[i], i + 1);
    for (j = 0; j < cnt[i]; j++)
      scanf("%d", &b[k++]);
  }
  fail = _ada_use_celcon(13, a, b, c);
  return fail;
}
```