user: Converte this assembly snippet into its equivalent C code:

```asm
<line_match>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rax
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r14
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  xor    %edx,%edx
  cmpb   $0x20,(%rdi)
  jne    L79
L124:
  add    $0x1,%rax
L486:
  mov    %rax,0x8(%rsp)
  add    $0x1,%rax
  movzbl -0x1(%rax),%edx
  cmp    $0x20,%dl
  je     L486
L484:
  cmp    $0x29,%dl
  ja     L261
  movabs $0x20000002401,%rax
  bt     %rdx,%rax
  jb     L440
L261:
  mov    0x8(%rsp),%rax
  movzbl (%rax),%edx
  cmp    $0x29,%dl
  ja     L118
  movabs $0x20100002401,%rcx
  bt     %rdx,%rcx
  jb     L35
L118:
  add    $0x1,%rax
  movabs $0x20100002401,%rcx
  jmp    L277
L79:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  mov    0x8(%rsp),%rax
  movzbl (%rax),%edx
  cmp    $0x20,%dl
  je     L124
  jmp    L484
L440:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L261
L394:
  mov    (%r14),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  add    %rbx,%rax
  mov    %rax,(%r14)
  jmp    L250
L204:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L41
L165:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L209
L171:
  mov    (%r14),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  add    %rbx,%rax
  mov    %rax,(%r14)
  jmp    L250
L491:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movzbl 0x1(%rax),%eax
  cmp    $0x29,%al
  je     L271
  test   %al,%al
  je     L271
L401:
  cmp    $0x28,%al
  jne    L491
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L491
L271:
  cmp    $0x29,%al
  jne    L102
L310:
  mov    %r12,0x8(%rsp)
  mov    (%r14),%rbp
  mov    %rbp,0x10(%rsp)
  movzbl 0x0(%rbp),%eax
  cmp    $0xd,%al
  ja     L475
  mov    $0x1,%ebx
  mov    $0x2401,%edx
  bt     %rax,%rdx
  jae    L424
L29:
  mov    (%r14),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  add    %rbx,%rax
  mov    %rax,(%r14)
  jmp    L250
L112:
  lea    0x8(%rsp),%rdi
  mov    %r13,%rsi
  call   <lt_match@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L327
  mov    %r12,0x8(%rsp)
  mov    %rbp,0x10(%rsp)
  cmpb   $0x29,(%r12)
  je     L398
L216:
  mov    $0x0,%ebx
L398:
  mov    %r12,0x8(%rsp)
  lea    0x1(%rbp),%rax
  mov    %rax,0x10(%rsp)
  movzbl 0x1(%rbp),%edx
  cmp    $0xd,%dl
  ja     L276
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L419
  mov    %rax,%rbp
  jmp    L227
L248:
  lea    0x8(%rsp),%rdi
  mov    %r13,%rsi
  call   <sb_match@plt>
L272:
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%eax
  cmp    $0x29,%al
  je     L275
L469:
  cmp    $0x3c,%al
  je     L112
  cmp    $0x5b,%al
  je     L248
  mov    0x10(%rsp),%rcx
  cmp    %al,(%rcx)
  jne    L518
  add    $0x1,%rdx
  mov    %rdx,0x8(%rsp)
  add    $0x1,%rcx
  mov    %rcx,0x10(%rsp)
  jmp    L272
L327:
  mov    $0x0,%ebx
  jmp    L272
L518:
  mov    0x8(%rsp),%rax
  cmpb   $0x29,(%rax)
  jne    L216
  mov    $0x0,%ebx
  jmp    L275
L475:
  mov    $0x1,%ebx
L424:
  lea    0x10(%rsp),%r13
  jmp    L227
L276:
  mov    %rax,%rbp
L227:
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%eax
  cmp    $0x29,%al
  jne    L469
L275:
  mov    0x10(%rsp),%rax
  cmp    %rbp,%rax
  jbe    L398
  mov    %rbp,(%r14)
  jmp    L250
L419:
  mov    $0x0,%eax
  test   %ebx,%ebx
  jne    L29
L250:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L471
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L162:
  add    $0x1,%rax
L277:
  mov    %rax,0x8(%rsp)
  movzbl (%rax),%edx
  cmp    $0x29,%dl
  ja     L162
  add    $0x1,%rax
  bt     %rdx,%rcx
  jae    L277
L35:
  cmp    $0x29,%dl
  je     L394
  cmp    $0x20,%dl
  jne    L204
L41:
  mov    0x8(%rsp),%rax
  movzbl (%rax),%edx
  cmp    $0x20,%dl
  jne    L61
  add    $0x1,%rax
L481:
  mov    %rax,0x8(%rsp)
  add    $0x1,%rax
  movzbl -0x1(%rax),%edx
  cmp    $0x20,%dl
  je     L481
L61:
  cmp    $0xd,%dl
  ja     L209
  mov    $0x2401,%eax
  bt     %rdx,%rax
  jb     L165
L209:
  mov    0x8(%rsp),%r12
  movzbl (%r12),%eax
  cmp    $0x29,%al
  je     L171
  lea    D4(%rip),%rbx
  test   %al,%al
  jne    L401
L102:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L310
L471:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D51
type_infered: string
name: unpack_data
arguments: tag: D4
type_infered: string

tool: D51: Incorrect syntax in line_match!


tool: D4: Not allowed, no variables in an end-expression!


assistant: ```c
char *line_match(char *buf, char **tmpSpeech) {
  if (*buf != ' ') {
    printf("Incorrect syntax in line_match!\n");
    exit(1);
  }
  while (*buf == ' ') {
    ++buf;
  }
  if (*buf == ')' || *buf == '\n' || *buf == '\r' || *buf == '\0') {
    printf("Incorrect syntax in line_match!\n");
    exit(1);
  }
  while (*buf != ' ' && *buf != '\n' && *buf != '\r' && *buf != '\0' && *buf != ')') {
    ++buf;
  }
  if (*buf == ')') {
    *tmpSpeech = *tmpSpeech + strlen(*tmpSpeech);
    return *tmpSpeech;
  }
  if (*buf != ' ') {
    printf("Incorrect syntax in line_match!\n");
    exit(1);
  }
  while (*buf == ' ') {
    ++buf;
  }
  if (*buf == '\n' || *buf == '\0' || *buf == '\r') {
    printf("Incorrect syntax in line_match!\n");
    exit(1);
  }
  if (*buf == ')') {
    *tmpSpeech = *tmpSpeech + strlen(*tmpSpeech);
    return *tmpSpeech;
  }
  char *matchExpression;
  matchExpression = buf;
  while (*buf != ')' && *buf != '\0') {
    if (*buf == '(') {
      printf("Not allowed, no variables in an end-expression!\n");
      exit(1);
    }
    ++buf;
  }
  if (*buf != ')') {
    printf("Incorrect syntax in line_match!\n");
    exit(1);
  }
  buf = matchExpression;
  char *speechChecker = *tmpSpeech;
  char *speechWalker = *tmpSpeech;
  int only_sb = 1;
  while (*speechWalker != '\0' && *speechWalker != '\n' && *speechWalker != '\r') {
    while (*buf != ')') {
      if (*buf == '<') {
        only_sb = 0;
        if (!lt_match(&buf, &speechChecker)) {
          buf = matchExpression;
          speechChecker = speechWalker;
          break;
        }
        continue;
      } else if (*buf == '[') {
        sb_match(&buf, &speechChecker);
        continue;
      }
      if (*buf != *speechChecker) {
        only_sb = 0;
        break;
      }
      ++buf;
      ++speechChecker;
    }
    if (*buf != ')') {
      buf = matchExpression;
      speechChecker = speechWalker;
    } else {
      if (speechChecker > speechWalker) {
        *tmpSpeech = speechWalker;
        return speechChecker;
      } else {
        buf = matchExpression;
        speechChecker = speechWalker;
      }
    }
    ++speechWalker;
    ++speechChecker;
  }
  if (only_sb) {
    *tmpSpeech = *tmpSpeech + strlen(*tmpSpeech);
    return *tmpSpeech;
  }
  return NULL;
}
```