user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D43(%rip),%rax
  mov    %rax,%rsi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x100(%rbp)
  lea    D5(%rip),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xf8(%rbp)
  lea    -0xc0(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x14,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    %rdi,%rdx
  mov    %eax,(%rdx)
  add    $0x4,%rdx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movq   $0x0,-0x17(%rbp)
  movl   $0x0,-0xf(%rbp)
  movw   $0x0,-0xb(%rbp)
  movb   $0x0,-0x9(%rbp)
  movq   $0x0,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  movq   $0x0,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  movq   $0x0,-0xd0(%rbp)
  movl   $0x0,-0xc8(%rbp)
  lea    -0x11c(%rbp),%rdx
  mov    -0x100(%rbp),%rax
  lea    D71(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movl   $0x0,-0x110(%rbp)
  jmp    L81
L39:
  lea    -0xc0(%rbp),%rcx
  mov    -0x110(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    (%rcx,%rax,1),%rdx
  mov    -0x100(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  addl   $0x1,-0x110(%rbp)
L81:
  mov    -0x11c(%rbp),%eax
  cmp    %eax,-0x110(%rbp)
  jl     L39
  movl   $0x0,-0x110(%rbp)
  jmp    L27
L139:
  movl   $0x0,-0x10c(%rbp)
  lea    -0x17(%rbp),%rdx
  mov    -0x100(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  jmp    L60
L63:
  addl   $0x1,-0x10c(%rbp)
L60:
  lea    -0xc0(%rbp),%rcx
  mov    -0x10c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    (%rcx,%rax,1),%rdx
  lea    -0x17(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L63
  lea    -0x114(%rbp),%rcx
  lea    -0x118(%rbp),%rdx
  mov    -0x100(%rbp),%rax
  lea    D35(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    -0x114(%rbp),%eax
  test   %eax,%eax
  jne    L15
  movl   $0x0,-0x104(%rbp)
  jmp    L12
L15:
  mov    -0x118(%rbp),%eax
  mov    -0x114(%rbp),%edi
  cltd
  idiv   %edi
  mov    %eax,-0x104(%rbp)
L12:
  mov    -0x10c(%rbp),%eax
  cltq
  mov    -0xf0(%rbp,%rax,4),%edx
  mov    -0x114(%rbp),%eax
  imul   -0x104(%rbp),%eax
  sub    %eax,%edx
  mov    -0x10c(%rbp),%eax
  cltq
  mov    %edx,-0xf0(%rbp,%rax,4)
  movl   $0x0,-0x108(%rbp)
  jmp    L6
L42:
  movl   $0x0,-0x10c(%rbp)
  lea    -0x17(%rbp),%rdx
  mov    -0x100(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  jmp    L146
L16:
  addl   $0x1,-0x10c(%rbp)
L146:
  lea    -0xc0(%rbp),%rcx
  mov    -0x10c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    (%rcx,%rax,1),%rdx
  lea    -0x17(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L16
  mov    -0x10c(%rbp),%eax
  cltq
  mov    -0xf0(%rbp,%rax,4),%edx
  mov    -0x104(%rbp),%eax
  add    %eax,%edx
  mov    -0x10c(%rbp),%eax
  cltq
  mov    %edx,-0xf0(%rbp,%rax,4)
  addl   $0x1,-0x108(%rbp)
L6:
  mov    -0x114(%rbp),%eax
  cmp    %eax,-0x108(%rbp)
  jl     L42
  addl   $0x1,-0x110(%rbp)
L27:
  mov    -0x11c(%rbp),%eax
  cmp    %eax,-0x110(%rbp)
  jl     L139
  movl   $0x0,-0x110(%rbp)
  jmp    L123
L104:
  mov    -0x110(%rbp),%eax
  cltq
  mov    -0xf0(%rbp,%rax,4),%edx
  lea    -0xc0(%rbp),%rsi
  mov    -0x110(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x4,%rax
  sub    %rcx,%rax
  add    %rax,%rsi
  mov    -0xf8(%rbp),%rax
  mov    %edx,%ecx
  mov    %rsi,%rdx
  lea    D54(%rip),%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  addl   $0x1,-0x110(%rbp)
L123:
  mov    -0x11c(%rbp),%eax
  cmp    %eax,-0x110(%rbp)
  jl     L104
  mov    -0x100(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0xf8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L76
  call   <__stack_chk_fail@plt>
L76:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D43
type: string
name: extract_symbolic_data
arguments: label: D66
type: string
name: extract_symbolic_data
arguments: label: D5
type: string
name: extract_symbolic_data
arguments: label: D65
type: string
name: extract_symbolic_data
arguments: label: D71
type: string
name: extract_symbolic_data
arguments: label: D42
type: string
name: extract_symbolic_data
arguments: label: D35
type: string
name: extract_symbolic_data
arguments: label: D54
type: string

tool: D43: r

tool: D66: gift1.in

tool: D5: w

tool: D65: gift1.out

tool: D71: %d

tool: D42: %s

tool: D35: %d %d

tool: D54: %s %d


assistant: ```c
int main(void) {
  FILE *fin = fopen("gift1.in", "r");
  FILE *fout = fopen("gift1.out", "w");
  char person_name[11][15] = {0};
  char temp_name[15] = {0};
  int i;
  int j;
  int k;
  int NP;
  int average_money;
  int money_give;
  int number_give;
  int total_money[11] = {0};
  fscanf(fin, "%d", &NP);
  for (i = 0; i < NP; ++i) {
    fscanf(fin, "%s", person_name[i]);
  }
  for (i = 0; i < NP; ++i) {
    j = 0;
    fscanf(fin, "%s", temp_name);
    while (strcmp(person_name[j], temp_name)) {
      ++j;
    }
    fscanf(fin, "%d %d", &money_give, &number_give);
    if (0 == number_give) {
      average_money = 0;
    } else {
      average_money = money_give / number_give;
    }
    total_money[j] -= average_money * number_give;
    for (k = 0; k < number_give; ++k) {
      j = 0;
      fscanf(fin, "%s", temp_name);
      while (strcmp(person_name[j], temp_name)) {
        ++j;
      }
      total_money[j] += average_money;
    }
  }
  for (i = 0; i < NP; ++i) {
    fprintf(fout, "%s %d\n", person_name[i], total_money[i]);
  }
  fclose(fin);
  fclose(fout);
  return 0;
}
```