user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  lea    D31(%rip),%rsi
  lea    D36(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x198,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x188(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    0x18(%rsp),%rdx
  lea    D13(%rip),%rsi
  movl   $0x0,0x18(%rsp)
  mov    %rax,%rdi
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x18(%rsp),%ecx
  test   %ecx,%ecx
  jle    L117
  lea    0x1c(%rsp),%rax
  mov    $0x1,%r12d
  lea    0x40(%rsp),%r13
  mov    %rax,0x8(%rsp)
  lea    0x20(%rsp),%rbx
L104:
  xor    %eax,%eax
  mov    $0x27,%ecx
  mov    %r13,%rdi
  xor    %edx,%edx
  rep stos %rax,%es:(%rdi)
  mov    %r13,%r8
  mov    %rbx,%rcx
  lea    D5(%rip),%rsi
  movl   $0x13b,0x1c(%rsp)
  xor    %r14d,%r14d
  mov    %dx,(%rdi)
  mov    0x8(%rsp),%rdx
  movb   $0x0,0x2(%rdi)
  mov    %rbp,%rdi
  call   <fscanf@plt>
  xor    %r11d,%r11d
L49:
  movzbl 0x40(%rsp,%r14,1),%r8d
  test   %r8b,%r8b
  je     L13
L71:
  lea    0x1(%r11),%r15d
  cmp    $0x13a,%r11d
  je     L13
  movslq %r15d,%r9
  nopl   0x0(%rax,%rax,1)
L86:
  movzbl 0x0(%r13,%r9,1),%edi
  movslq %r9d,%r10
  test   %dil,%dil
  je     L75
  xor    %eax,%eax
  xor    %esi,%esi
  xor    %ecx,%ecx
  nopl   0x0(%rax)
L8:
  movzbl (%rbx,%rax,1),%edx
  cmp    %r8b,%dl
  cmove  %eax,%ecx
  cmp    %dil,%dl
  cmove  %eax,%esi
  add    $0x1,%rax
  cmp    $0x1a,%rax
  jne    L8
  cmp    %ecx,%esi
  jl     L119
  add    $0x1,%r9
  cmp    $0x13b,%r9d
  jne    L86
L75:
  movslq %r15d,%r14
  movzbl 0x40(%rsp,%r14,1),%r8d
  mov    %r14,%r11
  test   %r8b,%r8b
  jne    L71
L13:
  movslq 0x1c(%rsp),%rax
  mov    %r12d,%esi
  mov    %r13,%rdx
  lea    D49(%rip),%rdi
  add    $0x1,%r12d
  movb   $0x0,0x40(%rsp,%rax,1)
  call   <printf@plt>
  cmp    %r12d,0x18(%rsp)
  jge    L104
L117:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x188(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  add    $0x198,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  mov    %dil,0x40(%rsp,%r14,1)
  mov    %r8b,0x40(%rsp,%r10,1)
  cmp    $0x13b,%r11d
  jne    L49
  jmp    L13
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D31
type_infered: string
name: unpack_data
arguments: tag: D36
type_infered: string
name: unpack_data
arguments: tag: D13
type_infered: string
name: unpack_data
arguments: tag: D5
type_infered: string
name: unpack_data
arguments: tag: D49
type_infered: string

tool: D31: r

tool: D36: zzzyyx.in

tool: D13: %d

tool: D5: %d %s %s


tool: D49: Week #%d: His name is %s!


assistant: ```c
main() {
  FILE *fp = fopen("zzzyyx.in", "r");
  int cases = 0;
  fscanf(fp, "%d", &cases);
  int i = 0;
  for (i = 1; i <= cases; i++) {
    char alpha[28];
    char spill[315];
    int k = 0;
    for (k = 0; k < 315; k++)
      spill[k] = '\0';
    fscanf(fp, "%d %s %s\n", &k, alpha, spill);
    int a = 0, b = 0, c = 0;
    for (a = 0; a < 315; a++) {
      if (spill[a] == '\0')
        break;
      for (b = a + 1; b < 315; b++) {
        if (spill[b] == '\0')
          break;
        int va = 0;
        int vb = 0;
        for (c = 0; c < 26; c++) {
          if (alpha[c] == spill[a])
            va = c;
          if (alpha[c] == spill[b])
            vb = c;
        }
        if (va > vb) {
          char temp = spill[a];
          spill[a] = spill[b];
          spill[b] = temp;
          a--;
          break;
        }
      }
    }
    spill[k] = '\0';
    printf("Week #%d: His name is %s!\n", i, spill);
  }
  fclose(fp);
  return 0;
}
```