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

```asm
<get_response_type>:
  endbr64
  push   %r15
  push   %r14
  lea    -0x7(%rsi),%r14d
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,0x8(%rsp)
  test   %r14d,%r14d
  jle    L200
  mov    %rdi,%r13
  xor    %ebx,%ebx
  lea    D6(%rip),%r15
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L139:
  add    $0x1,%ebx
  add    $0x1,%r13
  cmp    %ebx,%r14d
  je     L97
L58:
  mov    $0x7,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L139
  add    $0x7,%ebx
L133:
  cmp    %ebx,%r14d
  je     L97
  movslq %ebx,%rbx
  xor    %eax,%eax
  cmpb   $0x6c,0x0(%rbp,%rbx,1)
  jne    L25
  mov    0x8(%rsp),%rax
  lea    -0x10(%r12),%r14d
  movl   $0x0,(%rax)
  test   %r14d,%r14d
  jle    L37
  mov    %rbp,%r13
  xor    %ebx,%ebx
  lea    D22(%rip),%r15
  jmp    L131
  nopl   0x0(%rax,%rax,1)
L115:
  add    $0x1,%ebx
  add    $0x1,%r13
  cmp    %r14d,%ebx
  je     L174
L131:
  mov    $0x10,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L115
  add    $0x10,%ebx
  cmp    %r14d,%ebx
  je     L174
L127:
  movslq %ebx,%rbx
  xor    %r14d,%r14d
  add    %rbp,%rbx
  jmp    L171
  nopl   0x0(%rax)
L176:
  movsbl (%rbx),%eax
  lea    (%r14,%r14,4),%edx
  add    $0x1,%rbx
  lea    -0x30(%rax,%rdx,2),%r14d
L171:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L176
  sub    $0x4,%r12d
  xor    %ebx,%ebx
  test   %r12d,%r12d
  jle    L9
  lea    D8(%rip),%r15
  jmp    L148
  nopl   0x0(%rax)
L226:
  add    $0x1,%ebx
  add    $0x1,%rbp
  cmp    %ebx,%r12d
  je     L174
L148:
  mov    $0x4,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L226
  add    $0x4,%ebx
L9:
  cmp    %r12d,%ebx
  je     L174
  mov    0x8(%rsp),%rax
  add    %r14d,%ebx
  mov    %ebx,(%rax)
  mov    $0x1,%eax
  test   %ebx,%ebx
  je     L97
L25:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L174:
  mov    0x8(%rsp),%rax
  mov    (%rax),%ebx
  mov    $0x1,%eax
  test   %ebx,%ebx
  jne    L25
L97:
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L200:
  xor    %ebx,%ebx
  jmp    L133
L37:
  mov    $0x0,%ebx
  jne    L127
  jmp    L97
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
data_type: string
name: extract_symbolic_data
arguments: label: D22
data_type: string
name: extract_symbolic_data
arguments: label: D8
data_type: string

tool: D6: 5:peers

tool: D22: Content-Length: 

tool: D8: 



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