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

```asm
<uni>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L57
L71:
  movl   $0x0,-0x10(%rbp)
  jmp    L79
L115:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L68
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0xc(%rbp)
L68:
  addl   $0x1,-0x10(%rbp)
L79:
  mov    -0x10(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L115
  addl   $0x1,-0x14(%rbp)
L57:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L71
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  sub    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L116
L44:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L116:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L44
  movl   $0x0,-0x10(%rbp)
  jmp    L64
L87:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L20
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L20:
  addl   $0x1,-0x10(%rbp)
L64:
  mov    -0x10(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L87
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <sort@plt>
  movl   $0x0,-0x14(%rbp)
  jmp    L45
L51:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L45:
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  sub    -0xc(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L51
  nop
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D2
data_type: string

tool: D2: %d 

assistant: ```c
void uni(int *p1, int n1, int *p2, int n2) {
  int i, j, count = 0, *arr;
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n2; j++) {
      if (*(p1 + i) == *(p2 + j)) {
        *(p2 + j) = 0;
        count++;
      }
    }
  }
  arr = (int *)malloc((n1 + n2 - count) * sizeof(int));
  for (i = 0; i < n1; i++)
    arr[i] = *(p1 + i);
  for (j = 0; j < n2; j++)
    if (*(p2 + j) != 0) {
      arr[i] = (*(p2 + j));
      i++;
    }
  sort(arr, n1 + n2 - count);
  for (i = 0; i < (n1 + n2 - count); i++)
    printf("%d ", arr[i]);
}
```