user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D108(%rip),%rsi
  lea    D99(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D64(%rip),%rdi
  mov    %rax,%r12
  call   <printf@plt>
  lea    0x6c(%rsp),%rax
  lea    0x80(%rsp),%rdx
  mov    %rax,0x18(%rsp)
  mov    %rax,%rsi
  xor    %eax,%eax
  lea    0x54(%rsp),%rcx
  lea    D168(%rip),%rdi
  mov    %rdx,0x48(%rsp)
  call   <scanf@plt>
  movsbl 0x6c(%rsp),%eax
  test   %al,%al
  je     L183
  lea    0x6d(%rsp),%rdx
  xor    %ecx,%ecx
  nopl   0x0(%rax,%rax,1)
L3:
  add    $0x1,%rdx
  add    %eax,%ecx
  movsbl -0x1(%rdx),%eax
  test   %al,%al
  jne    L3
  movslq %ecx,%rax
  mov    %ecx,%edx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %ecx,%eax
  add    %edx,%edx
  sub    %edx,%eax
  cmp    $0xffffffff,%eax
  je     L101
L65:
  lea    0x64(%rsp),%rbx
  lea    0x58(%rsp),%r14
  movq   $0x0,0x20(%rsp)
  mov    %rbx,0x38(%rsp)
  lea    0x60(%rsp),%rbx
  mov    %r14,%rbp
  mov    %rbx,0x30(%rsp)
  lea    D74(%rip),%rbx
  mov    %rbx,0x28(%rsp)
  lea    0x5c(%rsp),%rbx
  mov    %rbx,0x10(%rsp)
  lea    D187(%rip),%rbx
  nopw   0x0(%rax,%rax,1)
L9:
  cltq
  mov    %r12,%rdi
  lea    (%rax,%rax,8),%rdx
  lea    (%rax,%rdx,4),%rax
  xor    %edx,%edx
  shl    $0x2,%rax
  mov    %rax,%rsi
  mov    %rax,0x40(%rsp)
  call   <fseek@plt>
  mov    0x38(%rsp),%rcx
  mov    %r12,%rdi
  xor    %eax,%eax
  mov    0x30(%rsp),%rdx
  lea    D207(%rip),%rsi
  call   <fscanf@plt>
  mov    0x60(%rsp),%eax
  test   %eax,%eax
  jle    L53
  xor    %r13d,%r13d
  lea    0xa0(%rsp),%r15
  lea    0x76(%rsp),%r14
  jmp    L143
  nopl   0x0(%rax)
L146:
  cmp    $0x1,%eax
  je     L85
L177:
  add    $0x1,%r13d
  cmp    %r13d,0x60(%rsp)
  jle    L53
L143:
  mov    %r12,%rdi
  call   <ftell@plt>
  mov    0x10(%rsp),%r9
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %eax,0xc(%rsp)
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x58(%rsp),%eax
  test   %eax,%eax
  jne    L146
  mov    0x18(%rsp),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L119
L140:
  mov    0x58(%rsp),%eax
  cmp    $0x1,%eax
  jne    L177
L85:
  lea    D108(%rip),%rsi
  lea    D99(%rip),%rdi
  add    $0x1,%r13d
  call   <fopen@plt>
  mov    0xc(%rsp),%esi
  xor    %edx,%edx
  mov    %rax,%rdi
  mov    %rax,0x20(%rsp)
  add    $0x2,%esi
  movslq %esi,%rsi
  call   <fseek@plt>
  cmp    %r13d,0x60(%rsp)
  jg     L143
  nopl   (%rax)
L53:
  mov    0x64(%rsp),%eax
  cmp    $0xffffffff,%eax
  jne    L9
  mov    0x20(%rsp),%rbx
  mov    %rbp,%r14
  test   %rbx,%rbx
  je     L175
  mov    0x48(%rsp),%r8
  mov    0x18(%rsp),%rcx
  mov    %rbx,%rdi
  xor    %edx,%edx
  pxor   %xmm0,%xmm0
  lea    D61(%rip),%rsi
  mov    $0x1,%eax
  cvtss2sd 0x54(%rsp),%xmm0
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
L184:
  mov    %r12,%rdi
  call   <fclose@plt>
  lea    D12(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rdi
  xor    %eax,%eax
  mov    %r14,%rsi
  call   <scanf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  add    $0xc8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L119:
  lea    D62(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x28(%rsp),%rdi
  mov    %rbp,%rsi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L140
L101:
  lea    D74(%rip),%rax
  lea    0x58(%rsp),%r14
  mov    %rax,0x28(%rsp)
L175:
  cmpl   $0x2,0x60(%rsp)
  jg     L127
  mov    %r12,%rdi
  mov    $0x1,%edx
  mov    $0x2,%esi
  call   <fseek@plt>
  mov    0x48(%rsp),%r8
  xor    %edx,%edx
  mov    %r12,%rdi
  mov    0x18(%rsp),%rcx
  lea    D61(%rip),%rsi
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  cvtss2sd 0x54(%rsp),%xmm0
  call   <fprintf@plt>
  mov    0x40(%rsp),%rsi
  xor    %edx,%edx
  mov    %r12,%rdi
  call   <fseek@plt>
  mov    0x60(%rsp),%eax
  lea    D20(%rip),%rsi
  mov    %r12,%rdi
  lea    0x1(%rax),%edx
  xor    %eax,%eax
  mov    %edx,0x60(%rsp)
  call   <fprintf@plt>
  jmp    L184
L127:
  lea    D108(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <fopen@plt>
  mov    0x28(%rsp),%rsi
  lea    0x68(%rsp),%rdx
  lea    D133(%rip),%r13
  mov    %rax,%rbp
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x40(%rsp),%rsi
  xor    %edx,%edx
  mov    %r12,%rdi
  call   <fseek@plt>
  mov    0x68(%rsp),%eax
  mov    0x60(%rsp),%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    0xa(%rax),%ecx
  xor    %eax,%eax
  call   <fprintf@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    $0x2,%edx
  call   <fseek@plt>
  or     $0xffffffff,%ecx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x1,%edx
  xor    %eax,%eax
  lea    D61(%rip),%r13
  call   <fprintf@plt>
  mov    0x48(%rsp),%r8
  xor    %edx,%edx
  mov    %r13,%rsi
  mov    0x18(%rsp),%rcx
  mov    %r12,%rdi
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  cvtss2sd 0x54(%rsp),%xmm0
  call   <fprintf@plt>
  or     $0xffffffff,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D83(%rip),%r8
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  mov    %r8,%r15
  mov    %r8,%rcx
  call   <fprintf@plt>
  pxor   %xmm0,%xmm0
  mov    %r15,%r8
  mov    %r15,%rcx
  or     $0xffffffff,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <fseek@plt>
  mov    0x68(%rsp),%eax
  mov    %rbp,%rdi
  lea    D130(%rip),%rsi
  lea    0x1(%rax),%edx
  xor    %eax,%eax
  mov    %edx,0x68(%rsp)
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L184
L183:
  xor    %eax,%eax
  jmp    L65
L139:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D108
data_type: string
name: retrieve_data
arguments: label: D99
data_type: string
name: retrieve_data
arguments: label: D64
data_type: string
name: retrieve_data
arguments: label: D168
data_type: string
name: retrieve_data
arguments: label: D74
data_type: string
name: retrieve_data
arguments: label: D187
data_type: string
name: retrieve_data
arguments: label: D207
data_type: string
name: retrieve_data
arguments: label: D61
data_type: string
name: retrieve_data
arguments: label: D12
data_type: string
name: retrieve_data
arguments: label: D62
data_type: string
name: retrieve_data
arguments: label: D20
data_type: string
name: retrieve_data
arguments: label: D131
data_type: string
name: retrieve_data
arguments: label: D133
data_type: string
name: retrieve_data
arguments: label: D83
data_type: string
name: retrieve_data
arguments: label: D130
data_type: string

tool: D108: r+

tool: D99: ../create/emp

tool: D64: Please enter SSN, name and salary separated by blanks


tool: D168: %s%s%f

tool: D74: %d

tool: D187: %d%s%s%f

tool: D207: %d%d

tool: D61: %3d%10s%21s%10.2f


tool: D12: Insert complete.


tool: D62: Error!!!SSN all ready Exist, aborting the insert.

tool: D20: %4d

tool: D131: ../create/over

tool: D133: %4d%4d


tool: D83: x

tool: D130: %4d


assistant: ```c
main() {
  FILE *fp;
  FILE *fpd = 0;
  char issn[10], iname[21];
  float isal;
  int del;
  char ssn[10], name[21];
  float sal;
  int h;
  long off;
  int x;
  int i;
  int nrec;
  int j, z;
  int ovptr;
  int offr;
  int nov;
  fp = fopen("../create/emp", "r+");
  printf("Please enter SSN, name and salary separated by blanks\n");
  scanf("%s%s%f", issn, iname, &isal);
  for (x = i = 0; issn[i] != 0; i++) {
    x = x + issn[i];
  }
  h = x % 10;
  for (i = h; i != -1; i = ovptr) {
    off = i * (10L + 3 * (3 + 10 + 21 + 10 + 2));
    fseek(fp, off, 0);
    fscanf(fp, "%d%d", &nrec, &ovptr);
    for (j = 0; j < nrec; j++) {
      offr = ftell(fp) + 2;
      fscanf(fp, "%d%s%s%f", &del, ssn, name, &sal);
      if ((del == 0) && (strcmp(ssn, issn) == 0)) {
        printf("Error!!!SSN all ready Exist, aborting the insert.");
        fclose(fp);
        scanf("%d", &del);
        exit(1);
      }
      if (del == 1) {
        fpd = fopen("../create/emp", "r+");
        fseek(fpd, offr, 0);
      }
    }
  }
  if (fpd != 0) {
    fprintf(fpd, "%3d%10s%21s%10.2f\n", 0, issn, iname, isal);
    fclose(fpd);
  } else if (nrec < 3) {
    fseek(fp, 2L, 1);
    fprintf(fp, "%3d%10s%21s%10.2f\n", 0, issn, iname, isal);
    fseek(fp, off, 0);
    fprintf(fp, "%4d", ++nrec);
  } else {
    fpd = fopen("../create/over", "r+");
    fscanf(fpd, "%d", &nov);
    fseek(fp, off, 0);
    fprintf(fp, "%4d%4d\n", nrec, 10 + nov);
    fseek(fp, 0L, 2);
    fprintf(fp, "%4d%4d\n", 1, -1);
    fprintf(fp, "%3d%10s%21s%10.2f\n", 0, issn, iname, isal);
    for (z = 0; z < 2; z++) {
      fprintf(fp, "%3d%10s%21s%10.2f\n", -1, "x", "x", 0.0);
    }
    fseek(fpd, 0L, 0);
    fprintf(fpd, "%4d\n", ++nov);
    fclose(fpd);
  }
  fclose(fp);
  printf("Insert complete.\n");
  scanf("%d", &del);
  exit(0);
}
```