user: What is the c source code of the assembly code below?

```asm
<http>:
  endbr64
  push   %r15
  xor    %edx,%edx
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  lea    D61(%rip),%rsi
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <net_connect_tcp@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  js     L28
L71:
  mov    %rbx,%r8
  mov    %rsp,%rdi
  mov    %r12,%rcx
  mov    $0x2,%edx
  lea    D53(%rip),%rsi
  call   <prepare@plt>
  mov    (%rsp),%rsi
  xor    %ecx,%ecx
  mov    %r13d,%edi
  mov    %eax,%edx
  call   <send@plt>
  mov    (%rsp),%rdi
  mov    %eax,%ebx
  call   <free@plt>
  test   %ebx,%ebx
  js     L17
L43:
  lea    D11(%rip),%r12
  lea    D9(%rip),%rbx
  lea    D49(%rip),%r14
  nopl   0x0(%rax,%rax,1)
L57:
  mov    %r13d,%edi
  call   <net_receive@plt>
  mov    %rax,(%rsp)
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L82
  jmp    L26
  xchg   %ax,%ax
L74:
  lea    0x4(%rax),%rbp
  mov    %rbp,(%rsp)
L82:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %rax,%r15
  call   <strstr@plt>
  test   %r15,%r15
  jne    L74
  mov    %rax,(%rsp)
  test   %rax,%rax
  je     L57
  add    $0x4,%rax
  mov    %r13d,%edi
  mov    %rax,(%rsp)
  call   <close@plt>
  mov    (%rsp),%rax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L26:
  mov    %r13d,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <die@plt>
  mov    (%rsp),%rbp
  jmp    L82
L28:
  xor    %esi,%esi
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <die@plt>
  jmp    L71
L17:
  mov    %r13d,%edx
  mov    $0x1,%esi
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <die@plt>
  jmp    L43
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D61
data_type: string
name: read_data
arguments: data_tag: D53
data_type: string
name: read_data
arguments: data_tag: D11
data_type: string
name: read_data
arguments: data_tag: D9
data_type: string
name: read_data
arguments: data_tag: D49
data_type: string
name: read_data
arguments: data_tag: D56
data_type: string
name: read_data
arguments: data_tag: D7
data_type: string

tool: D61: http

tool: D53: GET %s HTTP/1.1
Host: %s
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Connection: close



tool: D11: HTTP/1.1 100 Continue


tool: D9: 



tool: D49: Receive

tool: D56: Connect

tool: D7: Send

assistant: ```c
char *http(char *host, char *loc) {
  char *packet;
  int s = net_connect_tcp(host, "http", 0);
  if (s < 0)
    die("Connect", 0);
  char *cmd = "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0\r\nConnection: close\r\n\r\n";
  int len = prepare(&packet, cmd, 2, loc, host);
  int r = send(s, packet, len, 0);
  free(packet);
  if (r < 0)
    die("Send", 1, s);
  do {
    if ((packet = net_receive(s)) == NULL)
      die("Receive", 1, s);
    while (strstr(packet, "HTTP/1.1 100 Continue\r\n") != NULL)
      packet = strstr(packet, "\r\n\r\n") + 4;
    packet = strstr(packet, "\r\n\r\n");
  } while (packet == NULL);
  packet += 4;
  close(s);
  return packet;
}
```