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

```asm
<get_tx_rx_data>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x360,%rsp
  mov    %rdi,-0x348(%rbp)
  mov    %rsi,-0x350(%rbp)
  mov    %rdx,-0x358(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x656e2f636f72702f,%rax
  mov    %rax,-0x20e(%rbp)
  movl   $0x65642f74,-0x206(%rbp)
  movw   $0x76,-0x202(%rbp)
  movl   $0x0,-0x32c(%rbp)
  mov    -0x358(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x358(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x350(%rbp),%rax
  mov    %edx,(%rax)
  lea    -0x334(%rbp),%rdx
  lea    -0x20e(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  test   %rax,%rax
  js     L38
  lea    D3(%rip),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <popen@plt>
  mov    %rax,-0x320(%rbp)
  cmpq   $0x0,-0x320(%rbp)
  jne    L48
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L28
L48:
  movl   $0x0,-0x330(%rbp)
  jmp    L50
L156:
  addl   $0x1,-0x330(%rbp)
  cmpl   $0x1,-0x330(%rbp)
  jg     L66
  jmp    L50
L66:
  mov    -0x348(%rbp),%rdx
  lea    -0x200(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L50
  movl   $0x1,-0x32c(%rbp)
  jmp    L73
L50:
  mov    -0x320(%rbp),%rdx
  lea    -0x200(%rbp),%rax
  mov    $0x1f3,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L156
L73:
  mov    -0x320(%rbp),%rax
  mov    %rax,%rdi
  call   <pclose@plt>
  cmpl   $0x0,-0x32c(%rbp)
  je     L108
  lea    -0x200(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x318(%rbp)
  cmpq   $0x0,-0x318(%rbp)
  je     L63
  mov    -0x318(%rbp),%rax
  movb   $0x20,(%rax)
L63:
  lea    -0x200(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,-0x328(%rbp)
  lea    -0x310(%rbp),%rsi
  lea    -0x200(%rbp),%rax
  lea    D19(%rip),%r8
  lea    D57(%rip),%rdx
  mov    %rdx,%rcx
  lea    D19(%rip),%rdx
  mov    %rax,%rdi
  call   <tokenize@plt>
  mov    %eax,-0x324(%rbp)
  cmpl   $0xc,-0x324(%rbp)
  jle    L11
  mov    -0x300(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x358(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x2c0(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x350(%rbp),%rdx
  mov    %eax,(%rdx)
  jmp    L28
L38:
  nop
  jmp    L28
L108:
  nop
  jmp    L28
L11:
  nop
L28:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L65
  call   <__stack_chk_fail@plt>
L65:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D3
type: string
name: disassemble_data
arguments: tag: D8
type: string
name: disassemble_data
arguments: tag: D17
type: string
name: disassemble_data
arguments: tag: D19
type: string
name: disassemble_data
arguments: tag: D57
type: string

tool: D3: r

tool: D8: cat /proc/net/dev

tool: D17: Failed to open /proc/net/dev


tool: D19:  

tool: D57:  	


assistant: ```c
void get_tx_rx_data(char *if_name, unsigned int *tx_data, unsigned int *rx_data) {
  char net_dev[] = "/proc/net/dev";
  struct stat file_stat;
  int toknum;
  char *token[32];
  FILE *pipe_fd;
  char line[500];
  int i, len, found = 0;
  char *ptr;
  *tx_data = *rx_data = 0;
  if (stat(net_dev, &file_stat) < 0)
    return;
  pipe_fd = popen("cat /proc/net/dev", "r");
  if (pipe_fd == NULL) {
    printf("Failed to open /proc/net/dev\n");
    return;
  }
  i = 0;
  while (fgets(line, sizeof(line) - 1, pipe_fd)) {
    if (++i < 2)
      continue;
    if (strstr(line, if_name) != NULL) {
      found = 1;
      break;
    }
  }
  pclose(pipe_fd);
  if (!found) {
    return;
  }
  if ((ptr = strchr(line, ':')) != NULL) {
    *ptr = ' ';
  }
  len = strlen(line) + 1;
  toknum = tokenize(line, token, " ", " \t\n", " ");
  if (toknum < 13)
    return;
  *rx_data = atoi(token[2]);
  *tx_data = atoi(token[10]);
  return;
}
```