user: What is the c source code of the assembly code below?

```asm
<decrypt>:
  endbr64
  push   %r15
  lea    D50(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x208,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1f8(%rsp)
  xor    %eax,%eax
  lea    0x50(%rsp),%r12
  call   <fopen@plt>
  mov    $0x23,%ecx
  pxor   %xmm0,%xmm0
  lea    0xd0(%rsp),%rdi
  mov    %rax,(%rsp)
  xor    %eax,%eax
  rep stos %rax,%es:(%rdi)
  lea    0xc0(%rsp),%rax
  movaps %xmm0,0xc0(%rsp)
  mov    %rax,0x8(%rsp)
  movl   $0x0,(%rdi)
  xchg   %ax,%ax
L67:
  mov    (%rsp),%rdx
  mov    $0x64,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L129
  lea    D70(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L116
  lea    D16(%rip),%rsi
  mov    %r12,%rdi
  lea    D17(%rip),%r15
  call   <strstr@plt>
  lea    D57(%rip),%rsi
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <strtok@plt>
  mov    %r15,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  xor    %edi,%edi
  mov    %r15,%rsi
  movslq %eax,%rbx
  call   <strtok@plt>
  xor    %edi,%edi
  mov    %r15,%rsi
  call   <strtok@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  test   %rbp,%rbp
  je     L77
  lea    0x10(%rsp),%r14
  lea    0x16(%rsp),%rbp
  mov    %r14,%r13
  lea    (%rax,%r14,1),%r15d
  nopl   0x0(%rax,%rax,1)
L136:
  mov    %r13d,%edi
  mov    $0x6,%esi
  add    $0x1,%r13
  sub    %r15d,%edi
  call   <posmod@plt>
  imul   $0x32,%eax,%eax
  add    %ebx,%eax
  cltq
  movzbl 0xc0(%rsp,%rax,1),%eax
  mov    %al,-0x1(%r13)
  cmp    %rbp,%r13
  jne    L136
  mov    0x8(%rsp),%rax
  add    %rbx,%rax
  nopl   0x0(%rax)
L2:
  movzbl (%r14),%edx
  add    $0x1,%r14
  add    $0x32,%rax
  mov    %dl,-0x32(%rax)
  cmp    %rbp,%r14
  jne    L2
  jmp    L67
  nopl   0x0(%rax)
L116:
  mov    $0x20,%esi
  mov    %r12,%rdi
  lea    D30(%rip),%rbp
  call   <strchr@plt>
  mov    %rbp,%rsi
  lea    0x1(%rax),%rdi
  call   <strtok@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    %rbp,%rsi
  xor    %edi,%edi
  mov    %eax,%ebx
  call   <strtok@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    %eax,%esi
  test   %ebx,%ebx
  jle    L67
  lea    -0x1(%rax),%eax
  mov    $0xffffffffffffffce,%rdi
  xor    %ecx,%ecx
  lea    (%rax,%rax,4),%rax
  lea    (%rax,%rax,4),%rax
  add    %rax,%rax
  lea    0xf2(%rsp,%rax,1),%rdx
  sub    %rax,%rdi
  cs nopw 0x0(%rax,%rax,1)
L83:
  lea    (%rdi,%rdx,1),%rax
  test   %esi,%esi
  jle    L58
  nopl   0x0(%rax,%rax,1)
L111:
  movb   $0x1,(%rax)
  add    $0x32,%rax
  cmp    %rax,%rdx
  jne    L111
L58:
  add    $0x1,%ecx
  add    $0x1,%rdx
  cmp    %ecx,%ebx
  jne    L83
  jmp    L67
L77:
  imul   $0x32,%ebx,%ebx
  lea    0x10(%rsp),%r13
  lea    0x42(%rsp),%r15
  lea    (%rax,%r13,1),%ebp
  nopl   (%rax)
L108:
  mov    %r13d,%edi
  mov    $0x32,%esi
  add    $0x1,%r13
  sub    %ebp,%edi
  call   <posmod@plt>
  add    %ebx,%eax
  cltq
  movzbl 0xc0(%rsp,%rax,1),%eax
  mov    %al,-0x1(%r13)
  cmp    %r15,%r13
  jne    L108
  movdqa 0x10(%rsp),%xmm1
  movslq %ebx,%rbx
  movups %xmm1,0xc0(%rsp,%rbx,1)
  movdqa 0x20(%rsp),%xmm2
  movups %xmm2,0xd0(%rsp,%rbx,1)
  movdqa 0x30(%rsp),%xmm3
  movups %xmm3,0xe0(%rsp,%rbx,1)
  movzwl 0x40(%rsp),%eax
  mov    %ax,0xf0(%rsp,%rbx,1)
  jmp    L67
L129:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <sum_pixels@plt>
  lea    D1(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D0(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <print_display@plt>
  mov    0x1f8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x208,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D50
data_type: string
name: retrieve_data
arguments: tag: D70
data_type: string
name: retrieve_data
arguments: tag: D16
data_type: string
name: retrieve_data
arguments: tag: D17
data_type: string
name: retrieve_data
arguments: tag: D57
data_type: string
name: retrieve_data
arguments: tag: D30
data_type: string
name: retrieve_data
arguments: tag: D1
data_type: string
name: retrieve_data
arguments: tag: D0
data_type: string

tool: D50: r

tool: D70: rect

tool: D16: column

tool: D17:  

tool: D57: =

tool: D30: x

tool: D1: Part 1: %d


tool: D0: Part 2:

assistant: ```c
void decrypt(char *fname) {
  FILE *fp = fopen(fname, "r");
  char instr[100];
  char display[50 * 6] = {0};
  while (fgets(instr, 100, fp) != NULL) {
    if (strstr(instr, "rect")) {
      char *num_seg = strstr(instr, " ") + 1;
      int x = atoi(strtok(num_seg, "x"));
      int y = atoi(strtok(NULL, "x"));
      for (int i = 0; i < x; i++) {
        for (int j = 0; j < y; j++) {
          display[i + 50 * j] = 1;
        }
      }
    } else {
      char rc = strstr(instr, "column") == NULL;
      strtok(instr, "=");
      int loc = atoi(strtok(NULL, " "));
      strtok(NULL, " ");
      int amt = atoi(strtok(NULL, " "));
      if (rc) {
        char temp[50];
        for (int i = 0; i < 50; i++)
          temp[i] = display[loc * 50 + posmod(i - amt, 50)];
        for (int i = 0; i < 50; i++)
          display[loc * 50 + i] = temp[i];
      } else {
        char temp[6];
        for (int i = 0; i < 6; i++)
          temp[i] = display[loc + 50 * posmod(i - amt, 6)];
        for (int i = 0; i < 6; i++)
          display[loc + 50 * i] = temp[i];
      }
    }
  }
  printf("Part 1: %d\n", sum_pixels(display));
  printf("Part 2:\n");
  print_display(display);
}
```