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

```asm
<main>:
  endbr64
  push   %r15
  lea    D46(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D50(%rip),%rbp
  push   %rbx
  mov    %rbp,%rsi
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x26(%rsp),%r15
  lea    0x27(%rsp),%r14
  call   <fopen@plt>
  mov    %rbp,%rsi
  lea    D38(%rip),%rdi
  xor    %ebp,%ebp
  mov    %rax,%r13
  call   <fopen@plt>
  movb   $0x0,0x26(%rsp)
  movb   $0x0,0x27(%rsp)
  mov    %rax,%r12
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x1c(%rsp)
  jmp    L35
  nopl   (%rax)
L129:
  cmp    $0x8,%ebp
  je     L63
  cmp    $0x7,%ebp
  jle    L69
  lea    -0x8(%rbp),%eax
  imul   $0x38e38e39,%eax,%eax
  ror    $0x2,%eax
  cmp    $0x71c71c7,%eax
  jbe    L60
L69:
  movzbl 0x26(%rsp),%edx
  movzbl 0x27(%rsp),%ecx
  lea    D33(%rip),%rax
  lea    D47(%rip),%r8
  mov    %ebp,%esi
  lea    D1(%rip),%rdi
  cmp    %cl,%dl
  cmovne %rax,%r8
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <printf@plt>
  test   %bl,%bl
  je     L71
  cmpb   $0x0,0x17(%rsp)
  je     L71
L35:
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <fread@plt>
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    %r14,%rdi
  test   %rax,%rax
  mov    $0x1,%esi
  mov    %rax,0x8(%rsp)
  setne  %bl
  call   <fread@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  setne  0x17(%rsp)
  or     %rax,%r8
  je     L71
  test   %ebp,%ebp
  jne    L129
  lea    D83(%rip),%rdi
  call   <puts@plt>
  jmp    L69
  nopl   (%rax)
L63:
  lea    D44(%rip),%rdi
  call   <puts@plt>
L60:
  mov    0x1c(%rsp),%eax
  mov    0x18(%rsp),%ecx
  lea    0x1(%rax),%edx
  test   %ecx,%ecx
  mov    %edx,0x8(%rsp)
  je     L13
  add    $0xffffff80,%eax
  lea    D9(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%edx
L120:
  cmp    $0x80,%edx
  mov    $0x1,%eax
  cmovne 0x18(%rsp),%eax
  mov    %edx,0x1c(%rsp)
  mov    %eax,0x18(%rsp)
  jmp    L69
  nopl   0x0(%rax,%rax,1)
L13:
  mov    0x1c(%rsp),%esi
  lea    D91(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%edx
  jmp    L120
  nopl   0x0(%rax,%rax,1)
L71:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D46
type_guessed: string
name: parse_data
arguments: data_tag: D50
type_guessed: string
name: parse_data
arguments: data_tag: D38
type_guessed: string
name: parse_data
arguments: data_tag: D33
type_guessed: string
name: parse_data
arguments: data_tag: D47
type_guessed: string
name: parse_data
arguments: data_tag: D1
type_guessed: string
name: parse_data
arguments: data_tag: D83
type_guessed: string
name: parse_data
arguments: data_tag: D44
type_guessed: string
name: parse_data
arguments: data_tag: D9
type_guessed: string
name: parse_data
arguments: data_tag: D91
type_guessed: string

tool: D46: dmx_doom2.op2

tool: D50: rb

tool: D38: dmx_doom2_modded.op2

tool: D33:  <- NOT SAME!!!

tool: 

tool: D1: %03X: {0x%02x == 0x%02x}%s


tool: D83: Header

tool: D44: Header END

tool: D9: DRUM!!! %d


tool: D91: INSTRUMENT!!! %d


assistant: ```c
int main() {
  FILE *f1 = fopen("dmx_doom2.op2", "rb");
  FILE *f2 = fopen("dmx_doom2_modded.op2", "rb");
  unsigned char byte1 = 0, byte2 = 0;
  int count = 0;
  int insCount = 0;
  int dataPos = 8;
  int valid1 = 1;
  int valid2 = 1;
  int drumMode = 0;
  while (valid1 && valid2) {
    valid1 = (fread(&byte1, 1, 1, f1) != 0);
    valid2 = (fread(&byte2, 1, 1, f2) != 0);
    if (!valid1 && !valid2)
      break;
    if (count == 0) {
      printf("Header\n");
    }
    if (count == 8) {
      printf("Header END\n");
    }
    if (count >= dataPos) {
      if ((count - dataPos) % 36 == 0) {
        if (drumMode)
          printf("DRUM!!! %d\n", (insCount++) - 128);
        else
          printf("INSTRUMENT!!! %d\n", insCount++);
        if (insCount == 128)
          drumMode = 1;
      }
    }
    printf("%03X: {0x%02x == 0x%02x}%s\n", count, byte1, byte2, (byte1 == byte2) ? "" : " <- NOT SAME!!!");
    count++;
  }
}
```