user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D6(%rip),%rbp
  push   %rbx
  mov    %rbp,%rdi
  sub    $0x538,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x528(%rsp)
  xor    %eax,%eax
  lea    0x2c(%rsp),%rsi
  call   <scanf@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jle    L81
  lea    0xc6(%rsp),%rax
  mov    $0x1,%r14d
  lea    0x4c2(%rsp),%r13
  mov    %rax,0x8(%rsp)
  lea    0x34(%rsp),%rax
  lea    D28(%rip),%r12
  mov    %rax,0x10(%rsp)
  lea    0x12c(%rsp),%rax
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax)
L169:
  mov    0x8(%rsp),%r15
  mov    0x10(%rsp),%rbx
  nopw   0x0(%rax,%rax,1)
L107:
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x66,%r15
  call   <scanf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  add    $0x4,%rbx
  cmp    %r13,%r15
  jne    L107
  mov    0x38(%rsp),%eax
  mov    0x34(%rsp),%ebx
  mov    %r14d,%esi
  lea    D1(%rip),%rdi
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x3c(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x40(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x44(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x48(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x4c(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x50(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x54(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    0x58(%rsp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  xor    %eax,%eax
  call   <printf@plt>
  cmp    %ebx,0x34(%rsp)
  je     L23
L229:
  cmp    %ebx,0x38(%rsp)
  je     L234
L218:
  cmp    %ebx,0x3c(%rsp)
  je     L98
L49:
  cmp    %ebx,0x40(%rsp)
  je     L44
L39:
  cmp    %ebx,0x44(%rsp)
  je     L178
L186:
  cmp    %ebx,0x48(%rsp)
  je     L90
L216:
  cmp    %ebx,0x4c(%rsp)
  je     L149
L220:
  cmp    %ebx,0x50(%rsp)
  je     L126
L141:
  cmp    %ebx,0x54(%rsp)
  je     L114
L117:
  cmp    %ebx,0x58(%rsp)
  je     L75
  add    $0x1,%r14d
  cmp    %r14d,0x2c(%rsp)
  jge    L169
L81:
  mov    0x528(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x538,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L75:
  lea    0x45c(%rsp),%rdi
  add    $0x1,%r14d
  call   <puts@plt>
  cmp    %r14d,0x2c(%rsp)
  jge    L169
  jmp    L81
  xchg   %ax,%ax
L114:
  lea    0x3f6(%rsp),%rdi
  call   <puts@plt>
  jmp    L117
  nop
L126:
  lea    0x390(%rsp),%rdi
  call   <puts@plt>
  jmp    L141
  nopw   0x0(%rax,%rax,1)
L149:
  lea    0x32a(%rsp),%rdi
  call   <puts@plt>
  jmp    L220
  nopw   0x0(%rax,%rax,1)
L90:
  lea    0x2c4(%rsp),%rdi
  call   <puts@plt>
  jmp    L216
  nopw   0x0(%rax,%rax,1)
L178:
  lea    0x25e(%rsp),%rdi
  call   <puts@plt>
  jmp    L186
  nopw   0x0(%rax,%rax,1)
L44:
  lea    0x1f8(%rsp),%rdi
  call   <puts@plt>
  jmp    L39
  nopw   0x0(%rax,%rax,1)
L98:
  lea    0x192(%rsp),%rdi
  call   <puts@plt>
  jmp    L49
  nopw   0x0(%rax,%rax,1)
L234:
  mov    0x18(%rsp),%rdi
  call   <puts@plt>
  jmp    L218
  nop
L23:
  mov    0x8(%rsp),%rdi
  call   <puts@plt>
  jmp    L229
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D6
data_type: string
name: retrieve_data
arguments: label: D28
data_type: string
name: retrieve_data
arguments: label: D1
data_type: string

tool: D6: %d

tool: D28: %s

tool: D1: Case #%d:


assistant: ```c
int main() {
  char s[12][102];
  int t, i, ara[12], j, max;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    for (j = 1; j <= 10; j++) {
      scanf("%s", s[j]);
      scanf("%d", &ara[j]);
    }
    max = ara[1];
    for (j = 1; j <= 10; j++) {
      if (ara[j] > max)
        max = ara[j];
    }
    printf("Case #%d:\n", i);
    for (j = 1; j <= 10; j++) {
      if (ara[j] == max) {
        printf("%s\n", s[j]);
      }
    }
  }
  return 0;
}
```