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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    D100(%rip),%rsi
  lea    D142(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  lea    D104(%rip),%rdi
  call   <printf@plt>
  lea    0x14(%rsp),%rcx
  lea    0x40(%rsp),%rdx
  lea    0x2c(%rsp),%rsi
  lea    D125(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl 0x2c(%rsp),%eax
  test   %al,%al
  je     L181
  lea    0x2d(%rsp),%rdx
  mov    $0x0,%ecx
L37:
  movsbl %al,%eax
  add    %eax,%ecx
  add    $0x1,%rdx
  movzbl -0x1(%rdx),%eax
  test   %al,%al
  jne    L37
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  cmp    $0xffffffff,%eax
  je     L152
L160:
  mov    $0x0,%r14d
  lea    D26(%rip),%r13
  jmp    L32
L181:
  mov    $0x0,%eax
  jmp    L160
L154:
  cmpl   $0x1,0x18(%rsp)
  je     L121
L36:
  add    $0x1,%ebp
  cmp    %ebp,0x20(%rsp)
  jle    L94
L43:
  mov    %r12,%rdi
  call   <ftell@plt>
  mov    %eax,%ebx
  lea    0x36(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  lea    0x1c(%rsp),%r9
  lea    0x60(%rsp),%r8
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  cmpl   $0x0,0x18(%rsp)
  jne    L154
  lea    0x2c(%rsp),%rsi
  lea    0x36(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L154
  mov    %r15,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  lea    0x18(%rsp),%rsi
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L154
L121:
  lea    D100(%rip),%rsi
  lea    D142(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  lea    0x2(%rbx),%esi
  movslq %esi,%rsi
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <fseek@plt>
  jmp    L36
L94:
  mov    0x24(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L104
L32:
  cltq
  lea    (%rax,%rax,8),%rdx
  lea    (%rax,%rdx,4),%rsi
  shl    $0x2,%rsi
  mov    %rsi,0x8(%rsp)
  mov    $0x0,%edx
  mov    %r12,%rdi
  call   <fseek@plt>
  lea    0x24(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  lea    D187(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  cmpl   $0x0,0x20(%rsp)
  jle    L94
  mov    $0x0,%ebp
  lea    D135(%rip),%r15
  jmp    L43
L104:
  test   %r14,%r14
  je     L152
  pxor   %xmm0,%xmm0
  cvtss2sd 0x14(%rsp),%xmm0
  lea    0x2c(%rsp),%rcx
  lea    0x40(%rsp),%r8
  mov    $0x0,%edx
  lea    D114(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
L14:
  mov    %r12,%rdi
  call   <fclose@plt>
  lea    D206(%rip),%rdi
  call   <printf@plt>
  lea    0x18(%rsp),%rsi
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L109
  mov    $0x0,%eax
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L152:
  cmpl   $0x2,0x20(%rsp)
  jg     L110
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    %r12,%rdi
  call   <fseek@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x14(%rsp),%xmm0
  lea    0x2c(%rsp),%rcx
  lea    0x40(%rsp),%r8
  mov    $0x0,%edx
  lea    D114(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    $0x0,%edx
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <fseek@plt>
  mov    0x20(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x20(%rsp)
  lea    D154(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  jmp    L14
L110:
  lea    D100(%rip),%rsi
  lea    D195(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  lea    0x28(%rsp),%rdx
  lea    D14(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    $0x0,%edx
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <fseek@plt>
  mov    0x28(%rsp),%eax
  lea    0xa(%rax),%ecx
  mov    0x20(%rsp),%edx
  lea    D124(%rip),%rbp
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    $0x2,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <fseek@plt>
  mov    $0xffffffff,%ecx
  mov    $0x1,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x14(%rsp),%xmm0
  lea    0x2c(%rsp),%rcx
  lea    0x40(%rsp),%r8
  mov    $0x0,%edx
  lea    D114(%rip),%rbp
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  pxor   %xmm0,%xmm0
  lea    D172(%rip),%r8
  mov    %r8,%r13
  mov    %r8,%rcx
  mov    $0xffffffff,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  pxor   %xmm0,%xmm0
  mov    %r13,%r8
  mov    %r13,%rcx
  mov    $0xffffffff,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <fseek@plt>
  mov    0x28(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x28(%rsp)
  lea    D116(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  jmp    L14
L109:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D100
type_guessed: string
name: parse_data
arguments: label: D142
type_guessed: string
name: parse_data
arguments: label: D104
type_guessed: string
name: parse_data
arguments: label: D125
type_guessed: string
name: parse_data
arguments: label: D26
type_guessed: string
name: parse_data
arguments: label: D14
type_guessed: string
name: parse_data
arguments: label: D187
type_guessed: string
name: parse_data
arguments: label: D135
type_guessed: string
name: parse_data
arguments: label: D114
type_guessed: string
name: parse_data
arguments: label: D206
type_guessed: string
name: parse_data
arguments: label: D154
type_guessed: string
name: parse_data
arguments: label: D195
type_guessed: string
name: parse_data
arguments: label: D124
type_guessed: string
name: parse_data
arguments: label: D172
type_guessed: string
name: parse_data
arguments: label: D116
type_guessed: string

tool: D100: r+

tool: D142: ../create/emp

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


tool: D125: %s%s%f

tool: D26: %d%s%s%f

tool: D14: %d

tool: D187: %d%d

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

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


tool: D206: Insert complete.


tool: D154: %4d

tool: D195: ../create/over

tool: D124: %4d%4d


tool: D172: x

tool: D116: %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);
}
```