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

```asm
<checkRecord>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  lea    (%rdi,%rdi,2),%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  movslq %ebx,%r10
  lea    0x0(,%r10,4),%r11
  mov    %rax,%r9
  lea    (%rax,%r11,1),%rdi
  mov    D10(%rip),%rax
  movl   $0x4,0x8(%r9)
  lea    (%rdi,%r11,1),%r8
  mov    %rax,(%r9)
  mov    D1(%rip),%rax
  movl   $0x1,(%rdi)
  mov    %rax,(%r8)
  cmp    $0x1,%ebx
  jle    L9
  mov    (%r9),%eax
  lea    0x4(%r9),%rsi
  add    $0x1,%eax
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x3c,%rdx
  sub    %ecx,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  add    (%rdi),%eax
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x3c,%rdx
  sub    %ecx,%edx
  mov    $0x2,%ecx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  mov    %eax,0x4(%rdi)
  cmp    $0x2,%ebx
  je     L9
  nopl   (%rax)
L3:
  mov    -0x4(%r8,%rcx,4),%eax
  add    (%rsi),%eax
  movslq %eax,%rdx
  mov    %eax,%ebp
  mov    -0x4(%rdi,%rcx,4),%ebx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebp
  sar    $0x3c,%rdx
  sub    %ebp,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  add    %ebx,%eax
  movslq %eax,%rdx
  mov    %eax,%ebp
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebp
  sar    $0x3c,%rdx
  sub    %ebp,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  mov    %eax,(%rdi,%rcx,4)
  mov    -0x8(%rdi,%rcx,4),%eax
  add    -0x4(%rsi),%eax
  add    (%rsi),%ebx
  movslq %eax,%rdx
  mov    %eax,%ebp
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebp
  sar    $0x3c,%rdx
  sub    %ebp,%edx
  mov    %ebx,%ebp
  imul   $0x3b9aca07,%edx,%edx
  sar    $0x1f,%ebp
  sub    %edx,%eax
  movslq %ebx,%rdx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x3c,%rdx
  sub    %ebp,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%ebx
  add    %ebx,%eax
  movslq %eax,%rdx
  mov    %eax,%ebx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebx
  sar    $0x3c,%rdx
  sub    %ebx,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  mov    %eax,(%r8,%rcx,4)
  cmp    $0x2,%rcx
  je     L31
  mov    -0x4(%rsi),%eax
  add    -0x8(%rsi),%eax
  movslq %eax,%rdx
  mov    %eax,%ebx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebx
  sar    $0x3c,%rdx
  sub    %ebx,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  add    (%rsi),%eax
  movslq %eax,%rdx
  mov    %eax,%ebx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ebx
  sar    $0x3c,%rdx
  sub    %ebx,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  mov    %eax,0x4(%rsi)
L31:
  add    $0x1,%rcx
  add    $0x4,%rsi
  cmp    %rcx,%r10
  jne    L3
L9:
  mov    -0x4(%r8,%r11,1),%eax
  add    -0x4(%r9,%r11,1),%eax
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x44b82f99,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x3c,%rdx
  sub    %ecx,%edx
  imul   $0x3b9aca07,%edx,%edx
  sub    %edx,%eax
  add    -0x4(%rdi,%r11,1),%eax
  mov    %r9,%rdi
  movslq %eax,%r12
  cltd
  imul   $0x44b82f99,%r12,%r12
  sar    $0x3c,%r12
  sub    %edx,%r12d
  imul   $0x3b9aca07,%r12d,%edx
  sub    %edx,%eax
  mov    %eax,%r12d
  call   <free@plt>
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D10
type_infered: byte[8]
name: retrieve_data
arguments: tag: D1
type_infered: byte[8]

tool: {"D10": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: {"D1": [0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

assistant: ```c
int checkRecord(int n) {
  int t = 1000000007, *a, *p, *l, i, ret;
  a = (int *)malloc(3 * n * sizeof(int));
  p = a + n;
  l = p + n;
  a[0] = 1;
  a[1] = 2;
  a[2] = 4;
  p[0] = 1;
  l[0] = 1;
  l[1] = 3;
  for (i = 1; i < n; ++i) {
    p[i] = ((a[i - 1] + l[i - 1]) % t + p[i - 1]) % t;
    if (i > 1) {
      l[i] = ((a[i - 2] + p[i - 2]) % t + (a[i - 1] + p[i - 1]) % t) % t;
      if (i > 2)
        a[i] = ((a[i - 3] + a[i - 2]) % t + a[i - 1]) % t;
    }
  }
  ret = ((a[n - 1] + l[n - 1]) % t + p[n - 1]) % t;
  free(a);
  return ret;
}
```