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
  mov    %edi,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x148,%rsp
  mov    0x8(%rsi),%rdi
  lea    D35(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%r12
  lea    -0x3(%rbp),%eax
  cmp    $0x1,%eax
  jbe    L97
L137:
  mov    %rsp,%rbx
  lea    D3(%rip),%r14
  lea    D11(%rip),%r13
  nopl   (%rax)
L191:
  mov    %r12,%rdx
  mov    $0x64,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L92
  cmp    $0x3,%ebp
  je     L198
  cmp    $0x4,%ebp
  je     L84
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L48
L194:
  sub    $0x1,%eax
  mov    %rbx,%rdx
  lea    0x1(%rsp,%rax,1),%rdi
  xor    %eax,%eax
  jmp    L144
  nopw   0x0(%rax,%rax,1)
L14:
  cmp    $0xa,%cl
  je     L79
  movslq %eax,%rsi
  mov    %cl,0x70(%rsp,%rsi,1)
  mov    %eax,%esi
L91:
  add    $0x1,%rdx
  lea    0x1(%rsi),%eax
  cmp    %rdi,%rdx
  je     L113
L144:
  movzbl (%rdx),%ecx
  lea    0x1(%rax),%esi
  cmp    $0xd,%cl
  jne    L14
  cltq
  add    $0x1,%rdx
  movb   $0x5c,0x70(%rsp,%rax,1)
  movslq %esi,%rax
  movb   $0x72,0x70(%rsp,%rax,1)
  lea    0x1(%rsi),%eax
  cmp    %rdi,%rdx
  jne    L144
L113:
  cltq
  lea    0x70(%rsp),%rsi
  mov    %r13,%rdi
  movb   $0x0,0x70(%rsp,%rax,1)
  call   <printf@plt>
  jmp    L191
  nopl   0x0(%rax)
L79:
  cltq
  movb   $0x5c,0x70(%rsp,%rax,1)
  movslq %esi,%rax
  movb   $0x6e,0x70(%rsp,%rax,1)
  jmp    L91
  nopl   0x0(%rax)
L198:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L117
L201:
  mov    %r15,%rdi
  mov    %rbx,%rdx
  lea    D32(%rip),%rsi
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jg     L194
L48:
  xor    %eax,%eax
  jmp    L113
  nopw   0x0(%rax,%rax,1)
L84:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L201
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x2(%rax),%edx
  sub    $0x1,%eax
  movslq %edx,%rdx
  cltq
  movb   $0xa,(%rsp,%rdx,1)
  movb   $0x0,(%rsp,%rax,1)
  jmp    L201
  nopl   (%rax)
L92:
  mov    %r12,%rdi
  call   <fclose@plt>
  cmp    $0x3,%ebp
  je     L54
L141:
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L157
  add    $0x148,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L117:
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x1(%rax),%edx
  movslq %edx,%rdx
  movb   $0xd,(%rsp,%rdx,1)
  movslq %eax,%rdx
  add    $0x1,%eax
  cltq
  movb   $0xa,(%rsp,%rdx,1)
  movb   $0x0,(%rsp,%rax,1)
  jmp    L201
L97:
  mov    0x10(%rbx),%rdi
  lea    D46(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r15
  jmp    L137
L54:
  mov    %r15,%rdi
  call   <fclose@plt>
  jmp    L141
L157:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D35
datatype: string
name: parse_data
arguments: data_label: D3
datatype: string
name: parse_data
arguments: data_label: D11
datatype: string
name: parse_data
arguments: data_label: D32
datatype: string
name: parse_data
arguments: data_label: D46
datatype: string

tool: D35: r

tool: D3: 


tool: D11: %s


tool: D32: %s

tool: D46: w

assistant: ```c
int main(int argc, char *argv[]) {
  FILE *file = fopen(argv[1], "r");
  FILE *outFile;
  char tmpBuf[100];
  if (argc == 3 || argc == 4) {
    outFile = fopen(argv[2], "w");
  }
  while (fgets(tmpBuf, sizeof tmpBuf, file)) {
    if (argc == 3) {
      if (strstr(tmpBuf, "\r\n") == NULL) {
        int endChar = strlen(tmpBuf);
        tmpBuf[endChar - 1] = '\r';
        tmpBuf[endChar] = '\n';
        tmpBuf[endChar + 1] = '\0';
      }
      fprintf(outFile, "%s", tmpBuf);
    } else if (argc == 4) {
      if (strstr(tmpBuf, "\r\n") != NULL) {
        int endChar = strlen(tmpBuf);
        tmpBuf[endChar - 2] = '\n';
        tmpBuf[endChar - 1] = '\0';
      }
      fprintf(outFile, "%s", tmpBuf);
    }
    char outputBuf[200];
    int len = strlen(tmpBuf);
    int cnt = 0;
    for (int i = 0; i < len; i++) {
      if (tmpBuf[i] == '\r') {
        outputBuf[cnt] = '\\';
        cnt += 1;
        outputBuf[cnt] = 'r';
      } else if (tmpBuf[i] == '\n') {
        outputBuf[cnt] = '\\';
        cnt += 1;
        outputBuf[cnt] = 'n';
      } else {
        outputBuf[cnt] = tmpBuf[i];
      }
      cnt += 1;
    }
    outputBuf[cnt] = '\0';
    printf("%s\n", outputBuf);
  }
  fclose(file);
  if (argc == 3) {
    fclose(outFile);
  }
  return 0;
}
```