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
  push   %rbx
  sub    $0x368,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x358(%rsp)
  xor    %eax,%eax
  movl   $0x1f,(%rsp)
  movl   $0x1d,0x4(%rsp)
  movl   $0x1f,0x8(%rsp)
  movl   $0x1e,0xc(%rsp)
  movl   $0x1f,0x10(%rsp)
  movl   $0x1e,0x14(%rsp)
  movl   $0x1f,0x18(%rsp)
  movl   $0x1f,0x1c(%rsp)
  movl   $0x1e,0x20(%rsp)
  movl   $0x1f,0x24(%rsp)
  movl   $0x1e,0x28(%rsp)
  movl   $0x1f,0x2c(%rsp)
  lea    0x30(%rsp),%r13
  mov    $0x0,%ebx
  lea    D49(%rip),%r15
L78:
  mov    %ebx,%r14d
  lea    0x1c0(%rsp,%rbx,4),%rdx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    0x0(%r13),%ebp
  add    $0x1,%rbx
  add    $0x4,%r13
  test   %ebp,%ebp
  jne    L78
  test   %r14d,%r14d
  jle    L130
  mov    %r14d,%r12d
  mov    $0x0,%ebx
  lea    D44(%rip),%r13
  lea    D3(%rip),%r15
  lea    D46(%rip),%r14
  jmp    L93
  lea    D48(%rip),%rdi
  call   <printf@plt>
L87:
  add    $0x1,%rbx
  cmp    %rbx,%r12
  je     L130
L93:
  mov    0x30(%rsp,%rbx,4),%edx
  cmp    $0x1,%edx
  jle    L142
  mov    %rsp,%rax
  lea    -0x2(%rdx),%edx
  lea    0x4(%rsp,%rdx,4),%rcx
  mov    %ebp,%edx
L100:
  add    (%rax),%edx
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L100
L10:
  add    0x1c0(%rsp,%rbx,4),%edx
  movslq %edx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    0x0(,%rax,8),%ecx
  sub    %eax,%ecx
  sub    %ecx,%edx
  cmp    $0x6,%edx
  ja     L87
  mov    %edx,%edx
  movslq 0x0(%r13,%rdx,4),%rax
  add    %r13,%rax
  notrack jmp *%rax
  lea    D27(%rip),%rdi
  call   <printf@plt>
  jmp    L87
  lea    D12(%rip),%rdi
  call   <printf@plt>
  jmp    L87
  lea    D33(%rip),%rdi
  call   <printf@plt>
  jmp    L87
  lea    D60(%rip),%rdi
  call   <printf@plt>
  jmp    L87
  mov    %r14,%rdi
  call   <printf@plt>
  jmp    L87
  mov    %r15,%rdi
  call   <printf@plt>
  jmp    L87
L142:
  mov    %ebp,%edx
  jmp    L10
L130:
  mov    0x358(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L112
  mov    $0x0,%eax
  add    $0x368,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L112:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D49
type: string
name: parse_data
arguments: data_label: D3
type: string
name: parse_data
arguments: data_label: D46
type: string
name: parse_data
arguments: data_label: D48
type: string
name: parse_data
arguments: data_label: D27
type: string
name: parse_data
arguments: data_label: D12
type: string
name: parse_data
arguments: data_label: D33
type: string
name: parse_data
arguments: data_label: D60
type: string

tool: D49: %d %d

tool: D3: Wednesday


tool: D46: Tuesday


tool: D48: Thursday


tool: D27: Friday


tool: D12: Saturday


tool: D33: Sunday


tool: D60: Monday


assistant: ```c
int main(void) {
  int i = 0, j, k, sum, n, month[100], date[100], md[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  while (1) {
    scanf("%d %d", &month[i], &date[i]);
    if (month[i] == 0)
      break;
    i++;
  }
  for (j = 0; j < i; j++) {
    sum = 0;
    for (k = 0; k < month[j] - 1; k++)
      sum += md[k];
    sum += date[j];
    n = sum % 7;
    switch (n) {
    case 1:
      printf("Thursday\n");
      break;
    case 2:
      printf("Friday\n");
      break;
    case 3:
      printf("Saturday\n");
      break;
    case 4:
      printf("Sunday\n");
      break;
    case 5:
      printf("Monday\n");
      break;
    case 6:
      printf("Tuesday\n");
      break;
    case 0:
      printf("Wednesday\n");
      break;
    }
  }
  return 0;
}
```