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

```asm
<iptables_list_chain>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x80000,%edi
  sub    $0x288,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x278(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  test   %r12,%r12
  mov    %rsp,%r12
  mov    %rax,%rbp
  je     L37
  sub    $0x8,%rsp
  mov    %rbx,%r9
  lea    D80(%rip),%rax
  mov    $0x64,%esi
  push   %rax
  lea    D11(%rip),%r8
  mov    %r12,%rdi
  lea    D48(%rip),%rcx
  lea    D40(%rip),%rdx
  call   <snprintf@plt>
  mov    %r12,%rsp
L84:
  mov    %r12,%rdi
  lea    D35(%rip),%rsi
  xor    %eax,%eax
  call   <popen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L57
  movb   $0x0,0x0(%rbp)
  lea    0x70(%rsp),%rbx
  mov    $0x7ffff,%r13d
  jmp    L4
  nop
L65:
  call   <strlen@plt>
  mov    %r13d,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  sub    %eax,%edx
  call   <strncat@plt>
L4:
  mov    %rbx,%rdi
  mov    %r12,%rdx
  mov    $0x200,%esi
  call   <fgets@plt>
  mov    %rbp,%rdi
  test   %rax,%rax
  jne    L65
  call   <strlen@plt>
  mov    $0x1,%r13d
  cltq
  lea    0x1(%rax),%rdx
  movb   $0x0,0x0(%rbp,%rax,1)
  cmp    %r14,%rdx
  jbe    L28
L77:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <pclose@plt>
L31:
  mov    0x278(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x288,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L37:
  sub    $0x8,%rsp
  mov    %rbx,%r9
  lea    D80(%rip),%rax
  mov    $0x64,%esi
  push   %rax
  lea    D34(%rip),%r8
  mov    %r12,%rdi
  lea    D48(%rip),%rcx
  lea    D40(%rip),%rdx
  call   <snprintf@plt>
  mov    %r12,%rsp
  jmp    L84
  nopl   0x0(%rax)
L28:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  xor    %r13d,%r13d
  call   <memcpy@plt>
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L57:
  mov    %rbp,%rdi
  mov    $0x1,%r13d
  call   <free@plt>
  jmp    L31
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D80
type_infered: string
name: disassemble_data
arguments: data_tag: D11
type_infered: string
name: disassemble_data
arguments: data_tag: D48
type_infered: string
name: disassemble_data
arguments: data_tag: D40
type_infered: string
name: disassemble_data
arguments: data_tag: D35
type_infered: string
name: disassemble_data
arguments: data_tag: D34
type_infered: string

tool: D80: -n

tool: D11: -w -L

tool: D48: iptables

tool: D40: %s %s %s %s

tool: D35: r

tool: D34: -L

assistant: ```c
size_t iptables_list_chain(const char *chain_name, char *dst, size_t sz_dst, size_t use_xlock) {
  char cmd[100];
  char *dest = (char *)malloc(524288);
  if (use_xlock)
    snprintf(cmd, 100, "%s %s %s %s", "iptables", "-w -L", chain_name, "-n");
  else
    snprintf(cmd, 100, "%s %s %s %s", "iptables", "-L", chain_name, "-n");
  FILE *in;
  extern FILE *popen();
  char buff[512];
  if (!(in = popen(cmd, "r"))) {
    free(dest);
    return 1;
  }
  *dest = 0;
  while (fgets(buff, sizeof(buff), in) != NULL) {
    strncat(dest, buff, 524288 - strlen(dest) - 1);
  }
  size_t rc = 0;
  size_t dest_len = strlen(dest);
  dest[dest_len] = '\0';
  if (dest_len + 1 > sz_dst) {
    rc = 1;
  } else {
    memcpy(dst, dest, dest_len + 1);
  }
  free(dest);
  pclose(in);
  return rc;
}
```