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

```asm
<getResponse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x440,%rsp
  mov    %edi,-0x434(%rbp)
  mov    %rsi,-0x440(%rbp)
  mov    %edx,-0x438(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x41c(%rbp)
  movl   $0x0,-0x424(%rbp)
  movl   $0x0,-0x420(%rbp)
  lea    -0x210(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x210(%rbp),%rcx
  mov    -0x434(%rbp),%eax
  mov    $0x200,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <http_recv_line@plt>
  test   %rax,%rax
  jns    L64
  movl   $0xffffffff,-0x41c(%rbp)
  jmp    L90
L64:
  lea    -0x424(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  lea    D20(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    -0x424(%rbp),%eax
  cmp    $0xc8,%eax
  je     L26
  movl   $0xffffffff,-0x41c(%rbp)
  jmp    L90
L194:
  lea    -0x210(%rbp),%rax
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x410(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x310(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x210(%rbp),%rcx
  mov    -0x434(%rbp),%eax
  mov    $0x200,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <http_recv_line@plt>
  test   %rax,%rax
  jns    L51
  movl   $0xffffffff,-0x41c(%rbp)
  jmp    L90
L51:
  lea    -0x310(%rbp),%rcx
  lea    -0x410(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  lea    D9(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  lea    -0x410(%rbp),%rax
  mov    $0xff,%edx
  lea    D35(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L26
  lea    -0x420(%rbp),%rdx
  lea    -0x310(%rbp),%rax
  lea    D0(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
L26:
  lea    -0x210(%rbp),%rax
  lea    D33(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L194
  mov    -0x420(%rbp),%eax
  test   %eax,%eax
  jle    L199
  mov    -0x420(%rbp),%eax
  cmp    %eax,-0x438(%rbp)
  jle    L199
  movl   $0x0,-0x418(%rbp)
  jmp    L123
L7:
  mov    -0x420(%rbp),%eax
  sub    -0x418(%rbp),%eax
  mov    %eax,%edx
  mov    -0x418(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x440(%rbp),%rax
  lea    (%rcx,%rax,1),%rsi
  mov    -0x434(%rbp),%eax
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <recv@plt>
  mov    %eax,-0x414(%rbp)
  cmpl   $0x0,-0x414(%rbp)
  jg     L127
  movl   $0xffffffff,-0x41c(%rbp)
  jmp    L80
L127:
  mov    -0x414(%rbp),%eax
  add    %eax,-0x418(%rbp)
L123:
  mov    -0x420(%rbp),%eax
  cmp    %eax,-0x418(%rbp)
  jl     L7
L80:
  mov    -0x420(%rbp),%eax
  cmp    %eax,-0x418(%rbp)
  jne    L140
  mov    -0x420(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x440(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L140
L199:
  mov    -0x420(%rbp),%eax
  test   %eax,%eax
  je     L139
  movl   $0xffffffff,-0x41c(%rbp)
  jmp    L90
L140:
  nop
  jmp    L90
L139:
  nop
L90:
  mov    -0x41c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L35
  call   <__stack_chk_fail@plt>
L35:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D20
datatype: string
name: retrieve_data
arguments: data_label: D9
datatype: string
name: retrieve_data
arguments: data_label: D35
datatype: string
name: retrieve_data
arguments: data_label: D0
datatype: string
name: retrieve_data
arguments: data_label: D33
datatype: string

tool: D20: %*s%d

tool: D9: %255s%255s

tool: D35: Content-Length:

tool: D0: %d

tool: D33: 


assistant: ```c
int getResponse(int fd, char *jsonBuf, int jBufLen) {
  int iret = 0;
  char buff[512];
  int status = 0;
  int jLen = 0, jRLen;
  char header_n[256];
  char header_p[256];
  memset(buff, 0, 512);
  if (http_recv_line(fd, buff, 512) < 0) {
    iret = -1;
    goto end;
  }
  sscanf(buff, "%*s%d", &status);
  if (status != 200) {
    iret = -1;
    goto end;
  }
  while (strcmp(buff, "\r\n") != 0) {
    memset(buff, 0, 512);
    memset(header_n, 0, 256);
    memset(header_p, 0, 256);
    if (http_recv_line(fd, buff, 512) < 0) {
      iret = -1;
      goto end;
    }
    sscanf(buff, "%255s%255s", header_n, header_p);
    if (strncmp(header_n, "Content-Length:", 255) == 0) {
      sscanf(header_p, "%d", &jLen);
    }
  }
  if (jLen > 0 && jBufLen >= (jLen + 1)) {
    int offset = 0;
    while (offset < jLen) {
      jRLen = recv(fd, jsonBuf + offset, jLen - offset, 0);
      if (jRLen <= 0) {
        iret = -1;
        break;
      }
      offset += jRLen;
    }
    if (offset == jLen) {
      jsonBuf[jLen] = 0;
    }
  } else if (jLen)
    iret = -1;
end:
  return iret;
}
```