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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x44(%rbp),%rdx
  lea    -0x48(%rbp),%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  mov    -0x48(%rbp),%edx
  movslq %edx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L34:
  cmp    %rcx,%rsp
  je     L262
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L34
L262:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L86
  orq    $0x0,-0x8(%rsp,%rax,1)
L86:
  mov    %rsp,%r14
  mov    -0x44(%rbp),%ecx
  movslq %ecx,%rax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rdi
  and    $0xfffffffffffffff0,%rdi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rsi
  sub    %rax,%rsi
L5:
  cmp    %rsi,%rsp
  je     L75
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L5
L75:
  mov    %rdi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L146
  orq    $0x0,-0x8(%rsp,%rax,1)
L146:
  mov    %rsp,%r13
  test   %edx,%edx
  jle    L247
  mov    %r14,%rax
  mov    %edx,%edx
  lea    (%r14,%rdx,4),%rdx
L145:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L145
L247:
  test   %ecx,%ecx
  jle    L119
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  lea    -0x1(%rax),%r12d
  movslq %r12d,%rax
  mov    -0x3c(%rbp),%edx
  add    %edx,(%r14,%rax,4)
  mov    $0x1,%ebx
  lea    D20(%rip),%r15
  jmp    L206
L175:
  cmp    %r12d,%edx
  jne    L244
  mov    -0x48(%rbp),%esi
  test   %esi,%esi
  jle    L244
  mov    %esi,%esi
  mov    $0x0,%eax
  jmp    L144
L257:
  mov    %eax,%r12d
L24:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L244
L144:
  mov    (%r14,%rax,4),%ecx
  movslq %r12d,%rdx
  mov    (%r14,%rdx,4),%edx
  cmp    %edx,%ecx
  jg     L257
  cmp    %eax,%r12d
  jle    L24
  cmp    %edx,%ecx
  cmove  %eax,%r12d
  jmp    L24
L32:
  mov    %edx,%r12d
L244:
  add    $0x1,%rbx
L206:
  lea    0x1(%r12),%eax
  mov    %eax,-0x8(%r13,%rbx,8)
  movslq %r12d,%rax
  mov    (%r14,%rax,4),%eax
  mov    %eax,-0x4(%r13,%rbx,8)
  mov    -0x44(%rbp),%eax
  cmp    %ebx,%eax
  jle    L218
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    -0x40(%rbp),%edi
  lea    -0x1(%rdi),%edx
  mov    -0x3c(%rbp),%ecx
  movslq %edx,%rax
  mov    %ecx,%esi
  add    (%r14,%rax,4),%esi
  mov    %esi,(%r14,%rax,4)
  test   %ebx,%ebx
  je     L32
  test   %ecx,%ecx
  jle    L175
  movslq %r12d,%rax
  mov    (%r14,%rax,4),%eax
  cmp    %eax,%esi
  jg     L134
  cmp    %r12d,%edi
  jg     L244
  cmp    %eax,%esi
  cmove  %edx,%r12d
  jmp    L244
L134:
  mov    %edx,%r12d
  jmp    L244
L218:
  test   %eax,%eax
  jle    L119
  mov    $0x0,%ebx
  lea    D11(%rip),%r12
L126:
  mov    0x4(%r13,%rbx,8),%edx
  mov    0x0(%r13,%rbx,8),%esi
  mov    %r12,%rdi
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,-0x44(%rbp)
  jg     L126
L119:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L266
  mov    $0x0,%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L266:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D20
type_infered: string
name: read_data
arguments: label: D11
type_infered: string

tool: D20: %d %d

tool: D11: %d %d


assistant: ```c
int main(void) {
  int n, q, a, v, i, j, max;
  scanf("%d %d", &n, &q);
  int fish[n], ans[q][2];
  for (i = 0; i < n; i++)
    fish[i] = 0;
  for (i = 0; i < q; i++) {
    scanf("%d %d", &a, &v);
    fish[a - 1] += v;
    if (i == 0) {
      max = a - 1;
    } else if (v > 0) {
      if (fish[a - 1] > fish[max] || (fish[a - 1] == fish[max] && a - 1 < max)) {
        max = a - 1;
      }
    } else if (a - 1 == max) {
      for (j = 0; j < n; j++) {
        if (fish[j] > fish[max] || (fish[j] == fish[max] && j < max)) {
          max = j;
        }
      }
    }
    ans[i][0] = max + 1;
    ans[i][1] = fish[max];
  }
  for (i = 0; i < q; i++)
    printf("%d %d\n", ans[i][0], ans[i][1]);
  return 0;
}
```