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

```asm
<DecodeGameGenieCode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x48(%rbp)
  cmpq   $0x6,-0x48(%rbp)
  je     L78
  cmpq   $0x8,-0x48(%rbp)
  je     L78
  mov    $0x0,%eax
  jmp    L116
L78:
  movq   $0x0,-0x58(%rbp)
  jmp    L59
L67:
  mov    -0x68(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x58(%rbp),%rdx
  lea    0x1(%rdx),%rbx
  mov    %eax,%edi
  call   <ggtable@plt>
  mov    %eax,-0x40(%rbp,%rbx,4)
  mov    -0x58(%rbp),%rax
  add    $0x1,%rax
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    $0xffffffff,%eax
  jne    L80
  mov    $0x0,%eax
  jmp    L116
L80:
  addq   $0x1,-0x58(%rbp)
L59:
  mov    -0x58(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jb     L67
  mov    -0x48(%rbp),%rax
  mov    -0x40(%rbp,%rax,4),%eax
  and    $0x8,%eax
  mov    %eax,-0x40(%rbp)
  movq   $0x0,-0x50(%rbp)
  jmp    L103
L56:
  mov    -0x50(%rbp),%rax
  mov    -0x40(%rbp,%rax,4),%eax
  and    $0x8,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  mov    -0x40(%rbp,%rax,4),%eax
  and    $0x7,%eax
  or     %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,-0x40(%rbp,%rax,4)
  addq   $0x1,-0x50(%rbp)
L103:
  mov    -0x50(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jb     L56
  mov    -0x34(%rbp),%eax
  shl    $0xc,%eax
  or     $0x80,%ah
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x38(%rbp),%eax
  shl    $0x4,%eax
  or     %eax,%edx
  mov    -0x30(%rbp),%eax
  or     %eax,%edx
  mov    -0x70(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x3c(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  or     %eax,%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,(%rax)
  cmpq   $0x8,-0x48(%rbp)
  jne    L66
  mov    -0x24(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  or     %eax,%edx
  mov    -0x80(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x2,%eax
  jmp    L116
L66:
  mov    $0x1,%eax
L116:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int DecodeGameGenieCode(const char *ggcode, int *address, int *data, int *compare) {
  size_t codelen;
  int decode[9];
  codelen = strlen(ggcode);
  if (codelen != 6 && codelen != 8) {
    return 0;
  }
  for (size_t i = 0; i < codelen; ++i) {
    decode[i + 1] = ggtable(ggcode[i]);
    if (decode[i + 1] == -1) {
      return 0;
    }
  }
  decode[0] = decode[codelen] & 8;
  for (size_t i = 0; i < codelen; ++i) {
    decode[i] = (decode[i] & 8) | (decode[i + 1] & 7);
  }
  *address = 0x8000 | decode[3] << 12 | decode[5] << 8 | decode[2] << 4 | decode[4];
  *data = decode[1] << 4 | decode[0];
  if (codelen == 8) {
    *compare = decode[7] << 4 | decode[6];
    return 2;
  } else {
    return 1;
  }
}
```