user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<GrabGETVar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x4c0,%rsp
  mov    %rdi,-0x4a8(%rbp)
  mov    %rsi,-0x4b0(%rbp)
  mov    %rdx,-0x4b8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x494(%rbp)
  movl   $0x0,-0x498(%rbp)
  movl   $0x0,-0x4a0(%rbp)
  jmp    L184
L81:
  mov    -0x4a0(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4a8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  jne    L29
  addl   $0x1,-0x494(%rbp)
  movl   $0x1,-0x49c(%rbp)
L29:
  cmpl   $0x1,-0x49c(%rbp)
  jne    L199
  mov    -0x4a0(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4a8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x498(%rbp),%eax
  cltq
  mov    %dl,-0x410(%rbp,%rax,1)
  mov    -0x4a0(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4a8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  jne    L146
  addl   $0x1,-0x494(%rbp)
  mov    -0x498(%rbp),%eax
  cltq
  movb   $0x3f,-0x410(%rbp,%rax,1)
L146:
  mov    -0x498(%rbp),%eax
  add    $0x1,%eax
  cltq
  movb   $0x0,-0x410(%rbp,%rax,1)
  addl   $0x1,-0x498(%rbp)
L199:
  addl   $0x1,-0x4a0(%rbp)
L184:
  mov    -0x4a8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x4a0(%rbp)
  jl     L81
  movl   $0x0,-0x498(%rbp)
  movl   $0x0,-0x49c(%rbp)
  movl   $0x0,-0x4a0(%rbp)
  jmp    L72
L128:
  cmpl   $0x0,-0x49c(%rbp)
  jne    L5
  mov    -0x4a0(%rbp),%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%eax
  cmp    $0x3f,%al
  jne    L5
  movl   $0x0,-0x498(%rbp)
  movl   $0x1,-0x49c(%rbp)
  addl   $0x1,-0x4a0(%rbp)
L5:
  cmpl   $0x1,-0x49c(%rbp)
  jne    L14
  mov    -0x4a0(%rbp),%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%eax
  cmp    $0x3d,%al
  jne    L192
  movl   $0x0,-0x498(%rbp)
  movl   $0x2,-0x49c(%rbp)
  addl   $0x1,-0x4a0(%rbp)
  jmp    L14
L192:
  mov    -0x4a0(%rbp),%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%edx
  mov    -0x498(%rbp),%eax
  cltq
  mov    %dl,-0x490(%rbp,%rax,1)
  mov    -0x498(%rbp),%eax
  add    $0x1,%eax
  cltq
  movb   $0x0,-0x490(%rbp,%rax,1)
  addl   $0x1,-0x498(%rbp)
L14:
  cmpl   $0x2,-0x49c(%rbp)
  jne    L2
  mov    -0x4a0(%rbp),%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%eax
  cmp    $0x3f,%al
  jne    L143
  mov    -0x4b0(%rbp),%rdx
  lea    -0x490(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <IsEqual@plt>
  test   %rax,%rax
  je     L50
  mov    -0x4b8(%rbp),%rcx
  lea    -0x450(%rbp),%rax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <CopyString@plt>
  mov    $0x1,%eax
  jmp    L74
L50:
  movl   $0x0,-0x498(%rbp)
  movl   $0x1,-0x49c(%rbp)
  jmp    L2
L143:
  mov    -0x4a0(%rbp),%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%edx
  mov    -0x498(%rbp),%eax
  cltq
  mov    %dl,-0x450(%rbp,%rax,1)
  mov    -0x498(%rbp),%eax
  add    $0x1,%eax
  cltq
  movb   $0x0,-0x450(%rbp,%rax,1)
  addl   $0x1,-0x498(%rbp)
L2:
  addl   $0x1,-0x4a0(%rbp)
L72:
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x4a0(%rbp)
  jl     L128
  mov    -0x4b0(%rbp),%rdx
  lea    -0x490(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <IsEqual@plt>
  test   %rax,%rax
  je     L45
  mov    -0x4b8(%rbp),%rcx
  lea    -0x450(%rbp),%rax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <CopyString@plt>
  mov    $0x1,%eax
  jmp    L74
L45:
  mov    $0xffffffff,%eax
L74:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L129
  call   <__stack_chk_fail@plt>
L129:
  leave
  ret
```

assistant: ```c
int GrabGETVar(char *getData, char *var, char *ret) {
  int i, v, n, c, nr;
  char AllVars[1024];
  char gVar[50];
  char gVal[50];
  c = 0;
  n = 0;
  for (i = 0; i < strlen(getData); i++) {
    if (getData[i] == '?') {
      c++;
      v = 1;
    }
    if (v == 1) {
      AllVars[n] = getData[i];
      if (getData[i] == '&') {
        c++;
        AllVars[n] = '?';
      }
      AllVars[n + 1] = 0x00;
      n++;
    }
  }
  n = 0;
  v = 0;
  for (i = 0; i < strlen(AllVars); i++) {
    if (v == 0) {
      if (AllVars[i] == '?') {
        n = 0;
        v = 1;
        i++;
      }
    }
    if (v == 1) {
      if (AllVars[i] == '=') {
        n = 0;
        v = 2;
        i++;
      } else {
        gVar[n] = AllVars[i];
        gVar[n + 1] = 0x00;
        n++;
      }
    }
    if (v == 2) {
      if (AllVars[i] == '?') {
        if (IsEqual(gVar, var)) {
          CopyString(gVal, ret, 0);
          return 1;
        }
        n = 0;
        v = 1;
      } else {
        gVal[n] = AllVars[i];
        gVal[n + 1] = 0x00;
        n++;
      }
    }
  }
  if (IsEqual(gVar, var)) {
    CopyString(gVal, ret, 0);
    return 1;
  }
  return -1;
}
```