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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x4e8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4d8(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  mov    $0x32,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x1b0(%rsp),%rdi
  mov    $0x32,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x340(%rsp),%rdi
  mov    $0x32,%ecx
  rep stos %rax,%es:(%rdi)
  lea    D18(%rip),%r13
L16:
  lea    0x1c(%rsp),%rsi
  lea    D52(%rip),%rdi
  call   <scanf@plt>
  test   %rax,%rax
  jle    L59
  movl   $0x1,0xc(%rsp)
  lea    D34(%rip),%r14
  cmpl   $0x0,0x1c(%rsp)
  jg     L48
  jmp    L16
L174:
  cmp    $0x3,%eax
  jne    L98
  mov    %r14,%rdi
  call   <printf@plt>
  jmp    L98
L129:
  mov    %r15,%rdi
  call   <printf@plt>
L98:
  add    $0x4,%rbx
  cmp    %rbp,%rbx
  je     L151
L69:
  mov    (%rbx),%eax
  cmp    $0x2,%eax
  je     L180
  jg     L174
  test   %eax,%eax
  je     L129
  cmp    $0x1,%eax
  jne    L98
  mov    %r12,%rdi
  call   <printf@plt>
  jmp    L98
L180:
  mov    %r13,%rdi
  call   <printf@plt>
  jmp    L98
L151:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x340(%rsp),%rsi
  lea    0x1b0(%rsp),%rdi
  mov    $0x190,%edx
  call   <memcpy@plt>
  lea    0x1b4(%rsp),%rdx
  lea    0x348(%rsp),%rcx
  lea    0x250(%rsp),%rsi
L141:
  mov    (%rdx),%eax
  add    0x4(%rdx),%eax
  add    0x8(%rdx),%eax
  cltq
  mov    0x20(%rsp,%rax,4),%eax
  mov    %eax,(%rcx)
  add    $0x4,%rdx
  add    $0x4,%rcx
  cmp    %rsi,%rdx
  jne    L141
  mov    0x1b8(%rsp),%eax
  add    0x1b4(%rsp),%eax
  cltq
  mov    0x20(%rsp,%rax,4),%eax
  mov    %eax,0x344(%rsp)
  subl   $0x1,0x8(%rsp)
  je     L136
L178:
  lea    0x344(%rsp),%rbx
  lea    0x3e4(%rsp),%rbp
  lea    D31(%rip),%r12
  jmp    L69
L136:
  mov    0xc(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  jg     L91
L102:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  jl     L16
L48:
  lea    0x20(%rsp),%rbx
  lea    0x48(%rsp),%rbp
L199:
  mov    %rbx,%rsi
  lea    D52(%rip),%rdi
  call   <scanf@plt>
  add    $0x4,%rbx
  cmp    %rbp,%rbx
  jne    L199
  lea    0x340(%rsp),%rdi
  mov    $0x190,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  movl   $0x1,0x390(%rsp)
  movl   $0x32,0x8(%rsp)
  lea    D54(%rip),%r15
  jmp    L178
L91:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L102
L59:
  mov    0x4d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L45
  mov    $0x0,%eax
  add    $0x4e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L45:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D18
datatype: string
name: disassemble_data
arguments: tag: D52
datatype: string
name: disassemble_data
arguments: tag: D34
datatype: string
name: disassemble_data
arguments: tag: D31
datatype: string
name: disassemble_data
arguments: tag: D54
datatype: string

tool: D18: x

tool: D52: %d

tool: D34: W

tool: D31: .

tool: D54:  

assistant: ```c
main() {
  int n, d[100] = {0}, y[100] = {0}, t[100] = {0}, i, j, k, l, m;
  while (scanf("%d", &n) > 0) {
    for (m = 1; m <= n; m++) {
      for (i = 0; i < 10; i++)
        scanf("%d", &d[i]);
      memset(t, 0, sizeof(t));
      t[20] = 1;
      for (l = 0; l < 50; l++) {
        for (j = 1; j <= 40; j++)
          switch (t[j]) {
          case 0:
            printf(" ");
            break;
          case 1:
            printf(".");
            break;
          case 2:
            printf("x");
            break;
          case 3:
            printf("W");
            break;
          default:
            break;
          }
        putchar('\n');
        memcpy(y, t, sizeof(y));
        for (j = 2; j <= 40; j++)
          t[j] = d[y[j] + y[j - 1] + y[j + 1]];
        t[1] = d[y[1] + y[2]];
      }
      if (m < n)
        putchar('\n');
    }
  }
  return 0;
}
```