user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D40(%rip),%rdi
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  lea    -0x2c(%rbp),%r14
  push   %r12
  lea    D44(%rip),%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)
  call   <puts@plt>
  lea    -0x30(%rbp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D45(%rip),%rdi
  call   <puts@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%r13d
  cmp    %r13d,%edx
  jl     L42
L27:
  mov    %edx,%eax
  mov    %rsp,%rsi
  sub    %r13d,%eax
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L166
L68:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L68
L166:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L69
L40:
  mov    %rsp,%rbx
  cmp    %edx,%r13d
  jge    L152
  xor    %r12d,%r12d
  nopw   0x0(%rax,%rax,1)
L10:
  mov    %r13d,%edi
  call   <func_sum@plt>
  mov    %eax,%edi
  mov    %eax,%r14d
  call   <func_sum@plt>
  cmp    %r13d,%eax
  jne    L188
  cmp    %r13d,%r14d
  je     L188
  movslq %r12d,%rax
  mov    %r13d,(%rbx,%rax,4)
  lea    0x1(%r12),%eax
  add    $0x2,%r12d
  cltq
  mov    %r14d,(%rbx,%rax,4)
L188:
  add    $0x1,%r13d
  cmp    %r13d,-0x2c(%rbp)
  jg     L10
  xor    %r13d,%r13d
  test   %r12d,%r12d
  je     L152
  nopl   0x0(%rax,%rax,1)
L108:
  xor    %eax,%eax
  jmp    L85
  nopl   0x0(%rax)
L201:
  add    $0x1,%eax
L48:
  cmp    %eax,%r12d
  jle    L41
L85:
  cmp    %r13d,%eax
  je     L201
  movslq %eax,%rdx
  shl    $0x2,%rdx
  lea    (%rbx,%rdx,1),%rdi
  mov    (%rdi),%ecx
  cmp    %ecx,(%rbx,%r13,4)
  jne    L201
  lea    -0x1(%r12),%r14d
  cmp    %eax,%r14d
  jle    L110
  sub    $0x2,%r12d
  lea    0x4(%rbx,%rdx,1),%rsi
  sub    %eax,%r12d
  lea    0x4(,%r12,4),%r8
  mov    %r14d,%r12d
  mov    %r8,%rdx
  call   <memmove@plt>
  mov    $0x1,%eax
  cmp    %eax,%r12d
  jg     L85
  nop
L41:
  add    $0x1,%r13
  cmp    %r13d,%r12d
  jg     L108
  mov    %r12d,%esi
  xor    %eax,%eax
  lea    D47(%rip),%rdi
  shr    $0x1f,%esi
  add    %r12d,%esi
  sar    %esi
  call   <printf@plt>
  test   %r12d,%r12d
  jle    L223
  sub    $0x1,%r12d
  shr    %r12d
  mov    %r12d,%eax
  lea    D59(%rip),%r12
  lea    0x8(%rbx,%rax,8),%r13
  nopl   (%rax)
L172:
  mov    0x4(%rbx),%edx
  mov    (%rbx),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%r13
  jne    L172
L223:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L92
  lea    -0x20(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L110:
  mov    %r14d,%r12d
  mov    $0x1,%eax
  jmp    L48
L42:
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%r13d
  jmp    L27
L69:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L40
L152:
  xor    %esi,%esi
  lea    D47(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L223
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D40
type_infered: string
name: unpack_data
arguments: data_tag: D44
type_infered: string
name: unpack_data
arguments: data_tag: D45
type_infered: string
name: unpack_data
arguments: data_tag: D47
type_infered: string
name: unpack_data
arguments: data_tag: D59
type_infered: string
name: unpack_data
arguments: data_tag: D8
type_infered: string

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

tool: D44: %d

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

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


tool: D59:  %d and %d


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

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;
}
```