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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  lea    D52(%rip),%rdi
  call   <puts@plt>
  lea    -0x30(%rbp),%rsi
  lea    D13(%rip),%rbx
  mov    %rbx,%rdi
  call   <scanf@plt>
  lea    D51(%rip),%rdi
  call   <puts@plt>
  lea    -0x2c(%rbp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    -0x30(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L130
L115:
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%r13d
  mov    %edx,%eax
  sub    %r13d,%eax
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L218:
  cmp    %rcx,%rsp
  je     L209
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L218
L130:
  lea    D32(%rip),%rdi
  call   <puts@plt>
  lea    -0x2c(%rbp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  jmp    L115
L209:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L2
  orq    $0x0,-0x8(%rsp,%rax,1)
L2:
  mov    %rsp,%r12
  cmp    %r13d,%edx
  jle    L91
  mov    $0x0,%ebx
  jmp    L167
L256:
  add    $0x1,%r13d
  cmp    %r13d,-0x2c(%rbp)
  jle    L183
L167:
  mov    %r13d,%edi
  call   <func_sum@plt>
  mov    %eax,%r14d
  mov    %eax,%edi
  call   <func_sum@plt>
  cmp    %r13d,%r14d
  je     L256
  cmp    %r13d,%eax
  jne    L256
  movslq %ebx,%rax
  mov    %r13d,(%r12,%rax,4)
  lea    0x1(%rbx),%eax
  cltq
  mov    %r14d,(%r12,%rax,4)
  add    $0x2,%ebx
  jmp    L256
L183:
  test   %ebx,%ebx
  jle    L203
  mov    %r12,%r13
  mov    %r12,%rdi
  mov    $0x0,%esi
  lea    0x4(%r12),%r9
  jmp    L85
L184:
  mov    %r8d,%ebx
  mov    $0x0,%ecx
L62:
  add    $0x1,%ecx
  cmp    %ecx,%ebx
  jle    L76
L80:
  cmp    %ecx,%esi
  je     L62
  movslq %ecx,%rax
  lea    (%r12,%rax,4),%rdx
  mov    (%rdx),%r10d
  cmp    %r10d,(%rdi)
  jne    L62
  lea    -0x1(%rbx),%r8d
  cmp    %ecx,%r8d
  jle    L184
  sub    $0x2,%ebx
  sub    %ecx,%ebx
  add    %rax,%rbx
  lea    (%r9,%rbx,4),%rcx
L117:
  mov    0x4(%rdx),%eax
  mov    %eax,(%rdx)
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L117
  mov    %r8d,%ebx
  mov    $0x0,%ecx
  jmp    L62
L76:
  add    $0x1,%esi
  add    $0x4,%rdi
  cmp    %ebx,%esi
  jge    L178
L85:
  mov    $0x0,%ecx
  test   %ebx,%ebx
  jg     L80
  jmp    L76
L178:
  mov    %ebx,%esi
  shr    $0x1f,%esi
  add    %ebx,%esi
  sar    %esi
  lea    D50(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L97
  sub    $0x1,%ebx
  shr    %ebx
  mov    %ebx,%eax
  lea    0x8(%r12,%rax,8),%r12
  lea    D4(%rip),%rbx
L185:
  mov    0x4(%r13),%edx
  mov    0x0(%r13),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x8,%r13
  cmp    %r13,%r12
  jne    L185
L97:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L70
  mov    $0x0,%eax
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
L91:
  mov    $0x0,%ebx
L203:
  mov    $0x2,%ecx
  mov    %ebx,%eax
  cltd
  idiv   %ecx
  mov    %eax,%esi
  lea    D50(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L97
L70:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D52
type_guessed: string
name: unpack_data
arguments: data_tag: D13
type_guessed: string
name: unpack_data
arguments: data_tag: D51
type_guessed: string
name: unpack_data
arguments: data_tag: D32
type_guessed: string
name: unpack_data
arguments: data_tag: D50
type_guessed: string
name: unpack_data
arguments: data_tag: D4
type_guessed: string

tool: D52: Give the lower  field's number, except number 0 , and press enter :

tool: D13: %d

tool: D51: Give the upper  field's number and press enter  :

tool: D32: Msg:Give the upper field's number to  be  greater than the  lower and press enter :

tool: D50: 
The couples of friend numbers are %d,the: 


tool: D4:  %d and %d


assistant: ```c
int main() {
  int *p;
  int i, j, k, size, n = 0;
  int low = 0, high = 0, num = 0, sum = 0;
  printf("Give the lower  field's number, except number 0 , and press enter :\n");
  scanf("%d", &low);
  printf("Give the upper  field's number and press enter  :\n");
  scanf("%d", &high);
  if (high < low) {
    printf("Msg:Give the upper field's number to  be  greater than the  lower and press enter :\n");
    scanf("%d", &high);
  }
  int arr[high - low];
  for (num = low; num < high; num++) {
    sum = func_sum(num);
    if (func_sum(sum) == num && sum != num) {
      arr[n] = num;
      arr[n + 1] = sum;
      n = n + 2;
    }
  }
  size = n;
  p = arr;
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      if (i == j) {
        continue;
      } else if (*(p + i) == *(p + j)) {
        k = j;
        size--;
        while (k < size) {
          *(p + k) = *(p + k + 1);
          k++;
        }
        j = 0;
      }
    }
  }
  printf("\nThe couples of friend numbers are %d,the: \n", size / 2);
  for (i = 0; i < size; i = i + 2) {
    printf(" %d and %d\n", arr[i], arr[i + 1]);
  }
  return 0;
}
```