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

```asm
<get_next_size_tupples>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %edx,0x24(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%r9)
  test   %edx,%edx
  jle    L104
  movslq %ecx,%rax
  movl   $0x0,0x20(%rsp)
  mov    %ecx,%ebx
  mov    %r9,%r14
  mov    %rax,0x38(%rsp)
  shl    $0x2,%rax
  mov    %rsi,%r15
  lea    0x40(%rdi),%r12
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  lea    0x44(%rsp),%rbp
  movq   $0x0,0x10(%rsp)
  cmovns %ecx,%eax
  mov    %eax,0x30(%rsp)
  lea    0x1(%rcx),%eax
  mov    %eax,0x34(%rsp)
  nopl   0x0(%rax)
L84:
  mov    0x18(%rsp),%r13
  mov    %r15,%rax
  mov    %r13,%r15
  mov    %rax,%r13
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L21:
  add    $0x4,%r15
  cmp    %r12,%r15
  je     L54
L1:
  mov    (%r15),%eax
  mov    $0x1,%ecx
  mov    %rbp,%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    %eax,0x44(%rsp)
  call   <intersects@plt>
  test   %eax,%eax
  jne    L21
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <sum_tupple@plt>
  add    (%r15),%eax
  cmp    0xc(%rsp),%eax
  jne    L21
  mov    (%r14),%eax
  mov    0x10(%rsp),%rdi
  add    %ebx,%eax
  lea    0x4(,%rax,4),%esi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  mov    %rax,%rsi
  test   %ebx,%ebx
  jle    L75
  mov    0x38(%rsp),%rdi
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L17:
  mov    (%r14),%edx
  mov    0x0(%r13,%rax,4),%ecx
  add    %eax,%edx
  add    $0x1,%rax
  movslq %edx,%rdx
  mov    %ecx,(%rsi,%rdx,4)
  cmp    %rax,%rdi
  jne    L17
L75:
  mov    (%r15),%edx
  mov    0x30(%rsp),%eax
  add    $0x4,%r15
  add    (%r14),%eax
  mov    0x10(%rsp),%rdi
  cltq
  mov    %edx,(%rdi,%rax,4)
  mov    0x34(%rsp),%eax
  add    %eax,(%r14)
  cmp    %r12,%r15
  jne    L1
  nopl   0x0(%rax)
L54:
  add    %ebx,0x20(%rsp)
  mov    %r13,%r15
  mov    0x20(%rsp),%eax
  add    0x28(%rsp),%r15
  cmp    %eax,0x24(%rsp)
  jg     L84
L4:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  mov    0x10(%rsp),%rax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L104:
  movq   $0x0,0x10(%rsp)
  jmp    L4
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int *get_next_size_tupples(int seq[16], int tupples[], int num_ele, int cardinality, int sum, int *next_tupple_nele) {
  int tupple_i = 0;
  int seq_i = 0;
  int *next_tupples = NULL;
  int *next_tupples2 = NULL;
  *next_tupple_nele = 0;
  for (; tupple_i < num_ele; tupple_i += cardinality) {
    for (seq_i = 0; seq_i < 16; seq_i++) {
      int tmp[] = {seq[seq_i]};
      if (!intersects(tupples + tupple_i, cardinality, tmp, 1) && (sum_tupple(tupples + tupple_i, cardinality) + seq[seq_i]) == sum) {
        int i = 0;
        next_tupples2 = (int *)realloc(next_tupples, (*next_tupple_nele + cardinality + 1) * sizeof(int));
        for (i = 0; i < cardinality; i++) {
          next_tupples2[*next_tupple_nele + i] = tupples[tupple_i + i];
        }
        next_tupples2[*next_tupple_nele + i] = seq[seq_i];
        *next_tupple_nele += (cardinality + 1);
        next_tupples = next_tupples2;
      }
    }
  }
  return next_tupples;
}
```