user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x100000(%rsp),%r11
L144:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L144
  sub    $0x48,%rsp
  mov    %edi,0x18(%rsp)
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x100038(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x2c(%rsp)
  cmp    $0x5,%edi
  jle    L333
  mov    0x10(%rsi),%rdi
  mov    $0xffffffffffffffff,%rsi
  call   <get_int@plt>
  mov    %eax,0x1c(%rsp)
  cmp    $0xffff,%eax
  ja     L341
  mov    0x18(%r12),%rax
  cmpb   $0x31,(%rax)
  je     L280
  xor    %edx,%edx
  xor    %esi,%esi
  lea    D152(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movl   $0x0,0xc(%rsp)
  xor    %r13d,%r13d
L136:
  movslq 0x18(%rsp),%rax
  mov    $0x5,%ebx
  lea    D160(%rip),%r15
  mov    %rax,0x10(%rsp)
  jmp    L346
  nopl   0x0(%rax,%rax,1)
L281:
  mov    0x1c(%rsp),%esi
  lea    D61(%rip),%rdi
  call   <conn_socket@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L262
  lea    D77(%rip),%rdi
  call   <puts@plt>
  mov    (%r12,%rbx,8),%rsi
  mov    0x8(%r12),%rdi
  call   <make_request@plt>
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    %eax,0x2c(%rsp)
L53:
  lea    0x2c(%rsp),%rsi
  mov    $0x100000,%edx
  mov    %r14,%rdi
  call   <add_close_header@plt>
  movslq 0x2c(%rsp),%rax
  movb   $0x0,(%r14,%rax,1)
L340:
  mov    %r14,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x2c(%rsp),%edx
  xor    %ecx,%ecx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <send@plt>
  cmp    0x2c(%rsp),%eax
  jne    L153
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L187
L214:
  test   %r13d,%r13d
  je     L217
  add    $0x1,%rbx
  cmp    %rbx,0x10(%rsp)
  je     L135
L346:
  test   %r13d,%r13d
  je     L281
  mov    (%r12,%rbx,8),%rsi
  mov    0x8(%r12),%rdi
  call   <make_request@plt>
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    %eax,0x2c(%rsp)
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    %ebx,%eax
  jne    L340
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L217:
  mov    %ebp,%edi
  add    $0x1,%rbx
  call   <close@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  cmp    %rbx,0x10(%rsp)
  jne    L346
L135:
  cmpl   $0x0,0xc(%rsp)
  je     L42
  lea    0x30(%rsp),%rbx
  lea    D101(%rip),%r12
L238:
  xor    %ecx,%ecx
  mov    $0x100000,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <recv@plt>
  test   %eax,%eax
  js     L104
  jne    L191
  lea    D8(%rip),%rdi
  call   <puts@plt>
L42:
  test   %r13d,%r13d
  jne    L239
L25:
  mov    0x100038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x100048,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L187:
  lea    0x30(%rsp),%r14
  xor    %ecx,%ecx
  mov    $0x100000,%edx
  mov    %ebp,%edi
  mov    %r14,%rsi
  call   <recv@plt>
  test   %eax,%eax
  js     L249
  jne    L204
  lea    D8(%rip),%rdi
  call   <puts@plt>
  jmp    L214
  nopl   (%rax)
L204:
  cltq
  mov    %r14,%rsi
  lea    D101(%rip),%rdi
  movb   $0x0,0x30(%rsp,%rax,1)
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L214
  nopl   (%rax)
L249:
  lea    D175(%rip),%rdi
  call   <puts@plt>
  jmp    L214
  nopl   0x0(%rax)
L191:
  cltq
  mov    %rbx,%rsi
  mov    %r12,%rdi
  movb   $0x0,0x30(%rsp,%rax,1)
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L238
L104:
  lea    D175(%rip),%rdi
  call   <puts@plt>
  jmp    L42
L153:
  lea    D28(%rip),%rdi
  mov    $0xfffffffc,%r13d
  call   <puts@plt>
  jmp    L25
L280:
  mov    0x20(%r12),%rax
  cmpb   $0x31,(%rax)
  je     L266
  xor    %edx,%edx
  mov    $0x1,%esi
  lea    D152(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movl   $0x0,0xc(%rsp)
L32:
  mov    0x1c(%rsp),%esi
  lea    D61(%rip),%rdi
  call   <conn_socket@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L262
  lea    D77(%rip),%rdi
  mov    $0x1,%r13d
  call   <puts@plt>
  jmp    L136
L262:
  lea    D41(%rip),%rdi
  mov    $0xfffffffd,%r13d
  call   <puts@plt>
  jmp    L25
L239:
  mov    %ebp,%edi
  xor    %r13d,%r13d
  call   <close@plt>
  jmp    L25
L266:
  mov    $0x1,%edx
  mov    $0x1,%esi
  lea    D152(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movl   $0x1,0xc(%rsp)
  jmp    L32
L333:
  mov    (%rsi),%rsi
  lea    D137(%rip),%rdi
  or     $0xffffffff,%r13d
  call   <printf@plt>
  jmp    L25
L341:
  mov    $0xffff,%edx
  xor    %esi,%esi
  lea    D187(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%r13d
  jmp    L25
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D152
type_guessed: string
name: disassemble_data
arguments: label: D160
type_guessed: string
name: disassemble_data
arguments: label: D61
type_guessed: string
name: disassemble_data
arguments: label: D77
type_guessed: string
name: disassemble_data
arguments: label: D89
type_guessed: string
name: disassemble_data
arguments: label: D101
type_guessed: string
name: disassemble_data
arguments: label: D8
type_guessed: string
name: disassemble_data
arguments: label: D175
type_guessed: string
name: disassemble_data
arguments: label: D28
type_guessed: string
name: disassemble_data
arguments: label: D41
type_guessed: string
name: disassemble_data
arguments: label: D137
type_guessed: string
name: disassemble_data
arguments: label: D187
type_guessed: string

tool: D152: pers=%d, pipe=%d


tool: D160: 
--- REQUEST ---

%s

tool: D61: 127.0.0.1

tool: D77: Connected to proxy server successfully.

tool: D89: Closed proxy connection.

tool: D101: 
--- RESPONSE ---

%s

tool: D8: Connection closed by server.

tool: D175: Error receiving data from server.

tool: D28: Error sending data to server.

tool: D41: Error connecting to proxy server.

tool: D137: Not enough arguments. Usage : %s server port persistance pipelining uri1 [uri2 [...]]


tool: D187: Invalid port number. Port must range from %d to %d.


assistant: ```c
int main(int argc, char *argv[]) {
  char *request, buffer[1024 * 1024 + 1];
  int server, port, request_size = 0, buffer_size = 0, persistance = 0, pipelining = 0, i = 0;
  if (argc < 6) {
    printf("Not enough arguments. Usage : %s server port persistance pipelining uri1 [uri2 [...]]\n", argv[0]);
    return -1;
  } else {
    port = get_int(argv[2], 0 - 1);
    if (port < 0 || port > 65535) {
      printf("Invalid port number. Port must range from %d to %d.\n", 0, 65535);
      return -2;
    }
    if (argv[3][0] == '1') {
      persistance = 1;
    }
    if (persistance && argv[4][0] == '1') {
      pipelining = 1;
    }
  }
  printf("pers=%d, pipe=%d\n", persistance, pipelining);
  if (persistance) {
    server = conn_socket("127.0.0.1", port);
    if (server < 0) {
      printf("Error connecting to proxy server.\n");
      return -3;
    } else {
      printf("Connected to proxy server successfully.\n");
    }
  }
  for (i = 5; i < argc; ++i) {
    if (!persistance) {
      server = conn_socket("127.0.0.1", port);
      if (server < 0) {
        printf("Error connecting to proxy server.\n");
        return -3;
      } else {
        printf("Connected to proxy server successfully.\n");
      }
    }
    request = make_request(argv[1], argv[i]);
    request_size = strlen(request);
    if (!persistance || i == argc - 1) {
      add_close_header(request, &request_size, 1024 * 1024);
      request[request_size] = '\0';
    }
    printf("\n--- REQUEST ---\n\n%s", request);
    if (send(server, request, request_size, 0) != request_size) {
      printf("Error sending data to server.\n");
      return -4;
    }
    if (!pipelining) {
      buffer_size = recv(server, buffer, 1024 * 1024, 0);
      if (buffer_size < 0) {
        printf("Error receiving data from server.\n");
      } else if (buffer_size == 0) {
        printf("Connection closed by server.\n");
      } else {
        buffer[buffer_size] = '\0';
        printf("\n--- RESPONSE ---\n\n%s", buffer);
      }
    }
    if (!persistance) {
      close(server);
      printf("Closed proxy connection.\n");
    }
  }
  if (pipelining) {
    do {
      buffer_size = recv(server, buffer, 1024 * 1024, 0);
      if (buffer_size < 0) {
        printf("Error receiving data from server.\n");
      } else if (buffer_size == 0) {
        printf("Connection closed by server.\n");
      } else {
        buffer[buffer_size] = '\0';
        printf("\n--- RESPONSE ---\n\n%s", buffer);
      }
    } while (buffer_size > 0);
  }
  if (persistance) {
    close(server);
  }
  return 0;
}
```