user: 请从给定的汇编指令推导出C源代码：

```asm
<DecodeGameGenieCode>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rcx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  lea    -0x6(%rax),%rbp
  and    $0xfffffffffffffffd,%rbp
  jne    L48
  mov    %rax,%rbx
  xor    %r15d,%r15d
  jmp    L4
  nopl   0x0(%rax,%rax,1)
L74:
  movsbl (%r12,%r15,1),%edi
  add    $0x1,%r15
  call   <ggtable@plt>
  mov    %eax,0x10(%rsp,%r15,4)
  cmp    $0xffffffff,%eax
  je     L48
L4:
  cmp    %rbx,%r15
  jne    L74
  mov    0x10(%rsp,%rbx,4),%edx
  and    $0x8,%edx
  mov    %edx,0x10(%rsp)
  test   %rbx,%rbx
  je     L77
  lea    -0x1(%rbx),%rax
  cmp    $0x2,%rax
  jbe    L90
  movdqa 0x10(%rsp),%xmm0
  movdqu 0x14(%rsp),%xmm1
  mov    %rbx,%rax
  movdqa D22(%rip),%xmm2
  movdqa D23(%rip),%xmm3
  shr    $0x2,%rax
  pand   %xmm2,%xmm0
  pand   %xmm3,%xmm1
  por    %xmm1,%xmm0
  movaps %xmm0,0x10(%rsp)
  cmp    $0x2,%rax
  je     L61
  cmp    $0x4,%rbx
  je     L43
  mov    $0x4,%ebp
L90:
  mov    %rbx,%rax
  sub    %rbp,%rax
  cmp    $0x1,%rax
  je     L81
  lea    0x0(,%rbp,4),%rcx
  movq   D23(%rip),%xmm1
  movq   D22(%rip),%xmm2
  movq   0x14(%rsp,%rcx,1),%xmm0
  lea    0x10(%rsp,%rcx,1),%rdx
  pand   %xmm1,%xmm0
  movq   (%rdx),%xmm1
  pand   %xmm2,%xmm1
  por    %xmm1,%xmm0
  movq   %xmm0,(%rdx)
  mov    %rax,%rdx
  and    $0xfffffffffffffffe,%rdx
  add    %rdx,%rbp
  cmp    %rdx,%rax
  je     L43
L81:
  mov    0x10(%rsp,%rbp,4),%edx
  mov    0x14(%rsp,%rbp,4),%eax
  and    $0x8,%edx
  and    $0x7,%eax
  or     %edx,%eax
  mov    %eax,0x10(%rsp,%rbp,4)
L43:
  mov    0x10(%rsp),%edx
L77:
  mov    0x1c(%rsp),%eax
  mov    0x18(%rsp),%ecx
  shl    $0xc,%eax
  shl    $0x4,%ecx
  or     %ecx,%eax
  mov    0x24(%rsp),%ecx
  or     0x20(%rsp),%eax
  shl    $0x8,%ecx
  or     %ecx,%eax
  or     $0x80,%ah
  mov    %eax,(%r14)
  mov    0x14(%rsp),%eax
  shl    $0x4,%eax
  or     %edx,%eax
  mov    %eax,0x0(%r13)
  mov    $0x1,%eax
  cmp    $0x8,%rbx
  jne    L122
  mov    0x2c(%rsp),%eax
  mov    0x8(%rsp),%rsi
  shl    $0x4,%eax
  or     0x28(%rsp),%eax
  mov    %eax,(%rsi)
  mov    $0x2,%eax
  jmp    L122
  cs nopw 0x0(%rax,%rax,1)
L48:
  xor    %eax,%eax
L122:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L109
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L61:
  movdqu 0x24(%rsp),%xmm0
  pand   0x20(%rsp),%xmm2
  pand   %xmm3,%xmm0
  por    %xmm2,%xmm0
  movaps %xmm0,0x20(%rsp)
  jmp    L43
L109:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D22
data_type: byte[16]
name: disassemble_data
arguments: tag: D23
data_type: byte[16]

tool: {"D22": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D23": [0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00]}

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;
  }
}
```