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

```asm
<get_tx_rx_data>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x328,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rdx,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x318(%rsp)
  xor    %eax,%eax
  movabs $0x656e2f636f72702f,%rax
  mov    %rax,0x112(%rsp)
  movl   $0x65642f74,0x11a(%rsp)
  movw   $0x76,0x11e(%rsp)
  movl   $0x0,(%rdx)
  movl   $0x0,(%rsi)
  lea    0xc(%rsp),%rsi
  lea    0x112(%rsp),%rdi
  call   <stat@plt>
  test   %rax,%rax
  js     L51
  lea    D14(%rip),%rsi
  lea    D11(%rip),%rdi
  call   <popen@plt>
  mov    %rax,%r12
  mov    $0x0,%ebx
  lea    0x120(%rsp),%rbp
  test   %rax,%rax
  je     L72
L44:
  mov    %r12,%rdx
  mov    $0x1f3,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L67
  add    $0x1,%ebx
  cmp    $0x1,%ebx
  jle    L44
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L44
  mov    %r12,%rdi
  call   <pclose@plt>
  lea    0x120(%rsp),%rdi
  mov    $0x3a,%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L65
  movb   $0x20,(%rax)
L65:
  lea    0x120(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x10(%rsp),%rsi
  lea    D41(%rip),%r8
  lea    D6(%rip),%rcx
  mov    %r8,%rdx
  mov    %rbx,%rdi
  call   <tokenize@plt>
  cmp    $0xc,%eax
  jle    L51
  mov    0x20(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,(%r15)
  mov    0x60(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,(%r14)
  jmp    L51
L72:
  lea    D39(%rip),%rdi
  call   <printf@plt>
  jmp    L51
L67:
  mov    %r12,%rdi
  call   <pclose@plt>
L51:
  mov    0x318(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  add    $0x328,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D14
type_infered: string
name: unpack_data
arguments: label: D11
type_infered: string
name: unpack_data
arguments: label: D41
type_infered: string
name: unpack_data
arguments: label: D6
type_infered: string
name: unpack_data
arguments: label: D39
type_infered: string

tool: D14: r

tool: D11: cat /proc/net/dev

tool: D41:  

tool: D6:  	


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


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