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

```asm
<poly_add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8,-0x30(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L87
L68:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L97
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x30(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rcx
  mov    0x4(%rdx),%eax
  mov    %eax,(%rcx)
  jmp    L87
L97:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L61
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rcx
  mov    0x4(%rdx),%eax
  mov    %eax,(%rcx)
  jmp    L87
L61:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rcx
  mov    0x4(%rdx),%eax
  mov    %eax,(%rcx)
L87:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L79
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L68
  jmp    L79
L10:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rcx
  mov    0x4(%rdx),%eax
  mov    %eax,(%rcx)
L79:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L10
  jmp    L14
L105:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rcx
  mov    0x4(%rdx),%eax
  mov    %eax,(%rcx)
L14:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L105
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int poly_add(int **a, int n1, int **b, int n2, int **c) {
  int i = 0, j = 0, k = 0;
  while (i < n1 && j < n2) {
    if (a[i][1] == b[j][1]) {
      c[k][0] = a[i][0] + b[j++][0];
      c[k++][1] = a[i++][1];
    } else if (a[i][1] > b[j][1]) {
      c[k][0] = a[i][0];
      c[k++][1] = a[i++][1];
    } else {
      c[k][0] = b[j][0];
      c[k++][1] = b[j++][1];
    }
  }
  while (i < n1) {
    c[k][0] = a[i][0];
    c[k++][1] = a[i++][1];
  }
  while (j < n2) {
    c[k][0] = b[j][0];
    c[k++][1] = b[j++][1];
  }
  return k;
}
```