user: Converte this assembly snippet into its equivalent C code:

```asm
<get_binomial_cofficient>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %edi,%edi
  setle  %al
  cmp    %esi,%edi
  setl   %dl
  or     %dl,%al
  jne    L155
  mov    %edi,%ebp
  mov    %esi,%r13d
  test   %esi,%esi
  jns    L100
L155:
  mov    $0x0,%r13d
L70:
  mov    %r13d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L100:
  lea    0x1(%rdi),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L167
  lea    0x1(%r13),%r14d
  movslq %r14d,%r14
  shl    $0x2,%r14
  mov    $0x0,%ebx
L129:
  mov    %r14,%rdi
  call   <malloc@plt>
  mov    %rax,(%r12,%rbx,8)
  test   %rax,%rax
  je     L33
  add    $0x1,%rbx
  cmp    %ebx,%ebp
  jge    L129
  mov    $0x1,%eax
L126:
  mov    (%r12,%rax,8),%rdx
  movl   $0x1,(%rdx)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jge    L126
  test   %r13d,%r13d
  jle    L160
  lea    -0x1(%r13),%eax
  lea    0x8(,%rax,4),%rcx
  mov    $0x4,%eax
L207:
  mov    (%r12,%rax,2),%rdx
  movl   $0x1,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L207
L160:
  cmp    $0x1,%ebp
  jle    L13
  lea    0x8(%r12),%r8
  lea    0x1(%rbp),%ebx
  mov    $0x2,%r9d
  jmp    L212
L33:
  test   %ebx,%ebx
  jle    L94
  mov    %r12,%rbp
  lea    -0x1(%rbx),%eax
  lea    0x8(%r12,%rax,8),%rbx
L194:
  mov    0x0(%rbp),%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %rbp,%rbx
  jne    L194
L94:
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x0,%r13d
  jmp    L70
L104:
  mov    (%r8),%r11
  mov    0x8(%r8),%rdi
  mov    (%r11,%rcx,1),%eax
  movslq %eax,%rdx
  imul   $0xffffffffa490c717,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x1a,%edx
  mov    %eax,%r15d
  sar    $0x1f,%r15d
  sub    %r15d,%edx
  imul   $0x638f227,%edx,%edx
  sub    %edx,%eax
  mov    0x4(%r11,%rcx,1),%r11d
  movslq %r11d,%rdx
  imul   $0xffffffffa490c717,%rdx,%rdx
  shr    $0x20,%rdx
  add    %r11d,%edx
  sar    $0x1a,%edx
  mov    %r11d,%r15d
  sar    $0x1f,%r15d
  sub    %r15d,%edx
  imul   $0x638f227,%edx,%edx
  sub    %edx,%r11d
  add    %r11d,%eax
  movslq %eax,%rdx
  imul   $0xffffffffa490c717,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x1a,%edx
  mov    %eax,%r11d
  sar    $0x1f,%r11d
  sub    %r11d,%edx
  imul   $0x638f227,%edx,%edx
  sub    %edx,%eax
  mov    %eax,0x4(%rdi,%rcx,1)
L45:
  add    $0x1,%esi
  add    $0x4,%rcx
  cmp    %esi,%r10d
  je     L80
L55:
  cmp    %esi,%r9d
  jne    L104
  jmp    L45
L80:
  add    $0x1,%r9d
  add    $0x8,%r8
  cmp    %ebx,%r9d
  je     L13
L212:
  cmp    %r9d,%r13d
  mov    %r9d,%eax
  cmovle %r13d,%eax
  lea    0x1(%rax),%r10d
  mov    $0x0,%ecx
  mov    $0x1,%esi
  test   %eax,%eax
  jg     L55
  jmp    L80
L13:
  mov    0x8(%rsp),%rax
  mov    -0x8(%r12,%rax,1),%rax
  mov    -0x4(%rax,%r14,1),%r13d
  mov    $0x0,%ebx
L114:
  mov    (%r12,%rbx,8),%rdi
  call   <free@plt>
  add    $0x1,%rbx
  cmp    %ebx,%ebp
  jge    L114
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L70
L167:
  mov    $0x0,%r13d
  jmp    L70
```

assistant: ```c
int get_binomial_cofficient(int n, int r) {
  int **matrix;
  int i, j, binomial_coff;
  if ((n <= 0) || (r < 0) || (n < r)) {
    return (0);
  }
  matrix = (int **)malloc(sizeof(int *) * (n + 1));
  if (!matrix) {
    return (0);
  }
  for (i = 0; i <= n; ++i) {
    matrix[i] = (int *)malloc(sizeof(int) * (r + 1));
    if (!matrix[i]) {
      for (j = 0; j < i; ++j) {
        free(matrix[j]);
      }
      free(matrix);
      return (0);
    }
  }
  for (i = 1; i <= n; ++i) {
    matrix[i][0] = 1;
  }
  for (i = 1; i <= r; ++i) {
    matrix[i][i] = 1;
  }
  for (i = 2; i <= n; ++i) {
    for (j = 1; ((j <= r) && (j <= i)); ++j) {
      if (j == i) {
        continue;
      }
      matrix[i][j] = ((matrix[i - 1][j - 1] % 104395303) + (matrix[i - 1][j] % 104395303)) % 104395303;
    }
  }
  binomial_coff = matrix[n][r];
  for (i = 0; i <= n; ++i) {
    free(matrix[i]);
  }
  free(matrix);
  return (binomial_coff);
}
```