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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  mov    $0x1,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D21(%rip),%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rax
  lea    0x1c(%rsp),%r13
  mov    %rax,0x8(%rsp)
  lea    0x24(%rsp),%rax
  mov    %rax,(%rsp)
  nopw   0x0(%rax,%rax,1)
L57:
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%rsi
  xor    %eax,%eax
  lea    D13(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x2,%eax
  jne    L124
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  je     L124
  cmp    0x20(%rsp),%eax
  jg     L138
  xor    %r12d,%r12d
  lea    0x18(%rsp),%rbp
  test   %eax,%eax
  jle    L67
  xchg   %ax,%ax
L102:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r12d
  call   <scanf@plt>
  cmp    %r12d,0x24(%rsp)
  jg     L102
L67:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L68
  xor    %ebp,%ebp
  nopw   0x0(%rax,%rax,1)
L76:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <scanf@plt>
  cmp    %ebp,0x20(%rsp)
  jg     L76
L68:
  mov    %r14d,%esi
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L36:
  add    $0x1,%r14d
  jmp    L57
  nopl   0x0(%rax,%rax,1)
L138:
  mov    $0x64,%r12d
  test   %eax,%eax
  jle    L38
  xor    %r15d,%r15d
  lea    0x18(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L48:
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  cmp    %eax,%r12d
  cmovg  %eax,%r12d
  add    $0x1,%r15d
  cmp    %r15d,0x24(%rsp)
  jg     L48
L38:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L8
  xor    %ebp,%ebp
  nopl   (%rax)
L30:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <scanf@plt>
  mov    0x20(%rsp),%eax
  cmp    %ebp,%eax
  jg     L30
L8:
  mov    0x24(%rsp),%edx
  mov    %r12d,%ecx
  mov    %r14d,%esi
  lea    D33(%rip),%rdi
  sub    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L36
  nop
L124:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L52
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D21
datatype: string
name: extract_symbolic_data
arguments: data_label: D13
datatype: string
name: extract_symbolic_data
arguments: data_label: D38
datatype: string
name: extract_symbolic_data
arguments: data_label: D33
datatype: string

tool: D21: %d

tool: D13: %d %d

tool: D38: Case %d: 0


tool: D33: Case %d: %d %d


assistant: ```c
int main() {
  int i, j, m, f, s, b, t = 1, n;
  while (scanf("%d %d", &b, &s) == 2) {
    if (b == 0)
      break;
    if (b > s) {
      n = 100;
      for (i = 0; i < b; i++) {
        scanf("%d", &m);
        if (m < n)
          n = m;
      }
      for (i = 0; i < s; i++)
        scanf("%d", &f);
      printf("Case %d: %d %d\n", t, b - s, n);
    } else {
      for (i = 0; i < b; i++)
        scanf("%d", &m);
      for (i = 0; i < s; i++)
        scanf("%d", &f);
      printf("Case %d: 0\n", t);
    }
    t++;
  }
  return 0;
}
```