user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_response_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L217
L11:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x7,%edx
  lea    D25(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L111
  addl   $0x7,-0x8(%rbp)
  jmp    L0
L111:
  addl   $0x1,-0x8(%rbp)
L217:
  mov    -0x1c(%rbp),%eax
  sub    $0x7,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L11
L0:
  mov    -0x1c(%rbp),%eax
  sub    $0x7,%eax
  cmp    %eax,-0x8(%rbp)
  jne    L84
  mov    $0xffffffff,%eax
  jmp    L29
L84:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x6c,%al
  je     L92
  mov    $0x0,%eax
  jmp    L29
L92:
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L157
L210:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x10,%edx
  lea    D15(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L188
  addl   $0x10,-0x8(%rbp)
  jmp    L43
L188:
  addl   $0x1,-0x8(%rbp)
L157:
  mov    -0x1c(%rbp),%eax
  sub    $0x10,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L210
L43:
  mov    -0x1c(%rbp),%eax
  sub    $0x10,%eax
  cmp    %eax,-0x8(%rbp)
  je     L63
  jmp    L7
L189:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  addl   $0x1,-0x8(%rbp)
L7:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L189
  movl   $0x0,-0x8(%rbp)
  jmp    L120
L212:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  lea    D16(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L85
  addl   $0x4,-0x8(%rbp)
  jmp    L214
L85:
  addl   $0x1,-0x8(%rbp)
L120:
  mov    -0x1c(%rbp),%eax
  sub    $0x4,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L212
L214:
  mov    -0x1c(%rbp),%eax
  sub    $0x4,%eax
  cmp    %eax,-0x8(%rbp)
  je     L63
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
L63:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L102
  mov    $0xffffffff,%eax
  jmp    L29
L102:
  mov    $0x1,%eax
L29:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D25
type_infered: string
name: disassemble_data
arguments: label: D15
type_infered: string
name: disassemble_data
arguments: label: D16
type_infered: string

tool: D25: 5:peers

tool: D15: Content-Length: 

tool: D16: 



assistant: ```c
int get_response_type(char *buffer, int len, int *total_length) {
  int i, content_length = 0;
  for (i = 0; i < len - 7; i++) {
    if (memcmp(&buffer[i], "5:peers", 7) == 0) {
      i = i + 7;
      break;
    }
  }
  if (i == len - 7)
    return -1;
  if (buffer[i] != 'l')
    return 0;
  *total_length = 0;
  for (i = 0; i < len - 16; i++) {
    if (memcmp(&buffer[i], "Content-Length: ", 16) == 0) {
      i = i + 16;
      break;
    }
  }
  if (i != len - 16) {
    while (isdigit(buffer[i])) {
      content_length = content_length * 10 + (buffer[i] - '0');
      i++;
    }
    for (i = 0; i < len - 4; i++) {
      if (memcmp(&buffer[i], "\r\n\r\n", 4) == 0) {
        i = i + 4;
        break;
      }
    }
    if (i != len - 4)
      *total_length = content_length + i;
  }
  if (*total_length == 0)
    return -1;
  else
    return 1;
}
```