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

```asm
<CompressGotoTable>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L106
L99:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L30
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  addl   $0x1,-0x14(%rbp)
  movl   $0x1,-0x10(%rbp)
  jmp    L114
L37:
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  addl   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L15
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L15
  addl   $0x1,-0x10(%rbp)
L114:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jb     L37
L15:
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x1,-0x1c(%rbp)
  jmp    L106
L30:
  cmpl   $0x1,-0x1c(%rbp)
  jne    L106
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x1,-0x10(%rbp)
  addl   $0x1,-0x18(%rbp)
  jmp    L3
L20:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0x18(%rbp)
L3:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jae    L17
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  je     L20
L17:
  mov    -0x14(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
L106:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jb     L99
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void CompressGotoTable(int *source_data, int *dest_data, unsigned int *compressed_size, unsigned int total_size) {
  unsigned int mode = 0;
  unsigned int index = 0;
  unsigned int write_index = 0;
  int lengthRep = 0;
  int copy_value = 0;
  while (index < total_size) {
    if (mode == 0) {
      unsigned int counter_loc = write_index;
      write_index++;
      lengthRep = 1;
      while (index < total_size) {
        dest_data[write_index] = source_data[index];
        write_index++;
        index++;
        if (index == total_size || source_data[index] == source_data[index - 1]) {
          break;
        }
        lengthRep++;
      }
      dest_data[counter_loc] = lengthRep;
      mode = 1;
    } else if (mode == 1) {
      unsigned int repeat_value;
      repeat_value = source_data[index];
      lengthRep = 1;
      index++;
      while (index < total_size && source_data[index] == repeat_value) {
        lengthRep++;
        index++;
      }
      dest_data[write_index] = lengthRep;
      write_index++;
      dest_data[write_index] = repeat_value;
      write_index++;
      mode = 0;
    }
  }
}
```