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

```asm
<game_parse_sgf>:
  endbr64
  push   %r15
  xor    %eax,%eax
  movabs $0xf7fffffeffffd9ff,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  mov    %ax,(%rsi)
  mov    D4(%rip),%r12
  movb   $0x0,0x2(%rsi)
  movb   $0x0,(%rdx)
  jmp    L22
  nopl   0x0(%rax)
L170:
  cmp    $0x5b,%eax
  je     L55
  lea    -0x41(%rax),%edx
  cmp    $0x19,%edx
  ja     L45
  movslq %ebx,%rdx
  add    $0x1,%ebx
  mov    %al,0x0(%r13,%rdx,1)
L134:
  cmp    $0x3,%ebx
  je     L104
L22:
  mov    %rbp,%rdi
  call   <fgetc@plt>
  cmp    %eax,(%r12)
  je     L182
  cmp    $0x3b,%eax
  ja     L170
  bt     %rax,%r15
  jae    L134
L45:
  test   %ebx,%ebx
  jne    L182
  lea    -0x28(%rax),%edx
  cmp    $0x1,%edx
  jbe    L30
  nopw   0x0(%rax,%rax,1)
L182:
  xor    %eax,%eax
L35:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L104:
  cmp    $0x5b,%eax
  jne    L182
  mov    $0x3,%ebx
L142:
  movb   $0x0,0x0(%r13,%rbx,1)
  xor    %r13d,%r13d
  jmp    L63
  nopl   (%rax)
L16:
  mov    %al,(%r14,%r13,1)
  add    $0x1,%r13
  cmp    $0x3e8,%r13
  je     L236
L63:
  mov    %rbp,%rdi
  movslq %r13d,%rbx
  call   <fgetc@plt>
  cmp    %eax,(%r12)
  je     L182
  cmp    $0x5d,%eax
  je     L180
  cmp    $0x5c,%eax
  jne    L16
  mov    %rbp,%rdi
  call   <fgetc@plt>
  cmp    %eax,(%r12)
  jne    L16
  jmp    L182
L148:
  mov    %rbp,%rdi
  call   <fgetc@plt>
  cmp    %eax,(%r12)
  je     L182
  nopw   0x0(%rax,%rax,1)
L207:
  cmp    $0x5d,%eax
  je     L157
L236:
  mov    %rbp,%rdi
  call   <fgetc@plt>
  cmp    %eax,(%r12)
  je     L182
  cmp    $0x5c,%eax
  jne    L207
  jmp    L148
L55:
  movslq %ebx,%rbx
  jmp    L142
L30:
  mov    %al,0x0(%r13)
  mov    $0x1,%eax
  movb   $0x0,0x1(%r13)
  jmp    L35
L180:
  movb   $0x0,(%r14,%rbx,1)
  mov    $0x1,%eax
  jmp    L35
L157:
  mov    $0x1,%eax
  jmp    L35
```

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