user: Translate the below assembly code into C programming language:

```asm
<game_parse_sgf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x2(%rax),%rdx
  movb   $0x0,(%rdx)
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  movzbl (%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L285
L117:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L279
  mov    $0x0,%eax
  jmp    L324
L279:
  cmpl   $0x20,-0x4(%rbp)
  je     L316
  cmpl   $0xa,-0x4(%rbp)
  je     L316
  cmpl   $0xd,-0x4(%rbp)
  je     L316
  cmpl   $0x9,-0x4(%rbp)
  je     L316
  cmpl   $0x3b,-0x4(%rbp)
  jne    L314
L316:
  subl   $0x1,-0x8(%rbp)
  jmp    L199
L314:
  cmpl   $0x5b,-0x4(%rbp)
  je     L58
  cmpl   $0x40,-0x4(%rbp)
  jle    L389
  cmpl   $0x5a,-0x4(%rbp)
  jg     L389
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L199
L389:
  cmpl   $0x0,-0x8(%rbp)
  jne    L217
  cmpl   $0x28,-0x4(%rbp)
  je     L156
  cmpl   $0x29,-0x4(%rbp)
  jne    L217
L156:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movb   $0x0,(%rax)
  mov    $0x1,%eax
  jmp    L324
L217:
  mov    $0x0,%eax
  jmp    L324
L199:
  addl   $0x1,-0x8(%rbp)
L285:
  cmpl   $0x2,-0x8(%rbp)
  jle    L117
  jmp    L0
L58:
  nop
L0:
  cmpl   $0x5b,-0x4(%rbp)
  je     L26
  mov    $0x0,%eax
  jmp    L324
L26:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L94
L206:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L83
  mov    $0x0,%eax
  jmp    L324
L83:
  cmpl   $0x5d,-0x4(%rbp)
  je     L102
  cmpl   $0x5c,-0x4(%rbp)
  jne    L175
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L175
  mov    $0x0,%eax
  jmp    L324
L175:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x8(%rbp)
L94:
  cmpl   $0x3e7,-0x8(%rbp)
  jle    L206
  jmp    L226
L102:
  nop
L226:
  cmpl   $0x3e7,-0x8(%rbp)
  jg     L278
  cmpl   $0x5d,-0x4(%rbp)
  je     L69
  mov    $0x0,%eax
  jmp    L324
L69:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L260
L278:
  movl   $0x0,-0x8(%rbp)
L301:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L340
  mov    $0x0,%eax
  jmp    L324
L340:
  cmpl   $0x5c,-0x4(%rbp)
  jne    L376
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L376
  mov    $0x0,%eax
  jmp    L324
L376:
  cmpl   $0x5d,-0x4(%rbp)
  je     L317
  addl   $0x1,-0x8(%rbp)
  jmp    L301
L317:
  nop
L260:
  mov    $0x1,%eax
L324:
  leave
  ret
```

assistant: ```c
int game_parse_sgf(FILE *f, char *tag, char *value) {
  int i, c = '\0';
  tag[0] = tag[1] = tag[2] = '\0';
  value[0] = '\0';
  for (i = 0; i < 3; i++) {
    c = fgetc(f);
    if (c == EOF)
      return 0;
    else if (c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == ';') {
      i--;
      continue;
    } else if (c == '[')
      break;
    else if ('A' <= c && c <= 'Z')
      tag[i] = (char)c;
    else if (i == 0 && (c == '(' || c == ')')) {
      tag[0] = (char)c;
      tag[1] = '\0';
      return 1;
    } else
      return 0;
  }
  if (c != '[')
    return 0;
  tag[i] = '\0';
  for (i = 0; i < 1000; i++) {
    c = fgetc(f);
    if (c == EOF)
      return 0;
    if (c == ']')
      break;
    if (c == '\\') {
      c = fgetc(f);
      if (c == EOF)
        return 0;
    }
    value[i] = (char)c;
  }
  if (i < 1000) {
    if (c != ']')
      return 0;
    value[i] = '\0';
  } else {
    for (i = 0;; i++) {
      c = fgetc(f);
      if (c == EOF)
        return 0;
      if (c == '\\') {
        c = fgetc(f);
        if (c == EOF)
          return 0;
      }
      if (c == ']')
        break;
    }
  }
  return 1;
}
```