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

```asm
<remove_pcp_port_forwarding_chain>:
  endbr64
  push   %r14
  pxor   %xmm0,%xmm0
  mov    %edi,%ecx
  lea    D2(%rip),%rdx
  push   %r13
  mov    $0x100,%esi
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  sub    $0x318,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x308(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  movaps %xmm0,(%rsp)
  mov    %rbp,%rdi
  movaps %xmm0,0x10(%rsp)
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0xf0(%rsp)
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  movaps %xmm0,0x130(%rsp)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0x150(%rsp)
  movaps %xmm0,0x160(%rsp)
  movaps %xmm0,0x170(%rsp)
  movaps %xmm0,0x180(%rsp)
  movaps %xmm0,0x190(%rsp)
  movaps %xmm0,0x1a0(%rsp)
  movaps %xmm0,0x1b0(%rsp)
  movaps %xmm0,0x1c0(%rsp)
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm0,0x1e0(%rsp)
  movaps %xmm0,0x1f0(%rsp)
  movaps %xmm0,0x200(%rsp)
  movaps %xmm0,0x210(%rsp)
  movaps %xmm0,0x220(%rsp)
  movaps %xmm0,0x230(%rsp)
  movaps %xmm0,0x240(%rsp)
  movaps %xmm0,0x250(%rsp)
  movaps %xmm0,0x260(%rsp)
  movaps %xmm0,0x270(%rsp)
  movaps %xmm0,0x280(%rsp)
  movaps %xmm0,0x290(%rsp)
  movaps %xmm0,0x2a0(%rsp)
  movaps %xmm0,0x2b0(%rsp)
  movaps %xmm0,0x2c0(%rsp)
  movaps %xmm0,0x2d0(%rsp)
  movaps %xmm0,0x2e0(%rsp)
  movaps %xmm0,0x2f0(%rsp)
  call   <snprintf@plt>
  test   %rax,%rax
  jle    L53
  lea    0x100(%rsp),%r13
  mov    %r12d,%ecx
  mov    $0x100,%esi
  lea    D25(%rip),%rdx
  mov    %r13,%rdi
  call   <snprintf@plt>
  test   %rax,%rax
  jle    L53
  lea    0x200(%rsp),%r14
  mov    %r12d,%ecx
  mov    $0x100,%esi
  lea    D10(%rip),%rdx
  mov    %r14,%rdi
  call   <snprintf@plt>
  test   %rax,%rax
  jle    L53
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <remove_jump_pcp_rule_chains@plt>
  test   %eax,%eax
  je     L53
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <flush_pcp_rule_chains@plt>
  test   %eax,%eax
  jne    L65
  nopl   (%rax)
L53:
  xor    %eax,%eax
L25:
  mov    0x308(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L49
  add    $0x318,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L65:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <delete_pcp_rule_chains@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L25
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D2
data_type: string
name: disassemble_data
arguments: label: D25
data_type: string
name: disassemble_data
arguments: label: D10
data_type: string

tool: D2: PCP_NAT_PREROUTE_RULE_%d

tool: D25: PCP_NAT_POSTROUTE_RULE_%d

tool: D10: PCP_MANGLE_RULE_%d

assistant: ```c
bool remove_pcp_port_forwarding_chain(int index) {
  char chain_preroute[256] = {'\0'};
  char chain_postroute[256] = {'\0'};
  char chain_mangle[256] = {'\0'};
  if (snprintf(chain_preroute, 256, "PCP_NAT_PREROUTE_RULE_%d", index) <= 0 || snprintf(chain_postroute, 256, "PCP_NAT_POSTROUTE_RULE_%d", index) <= 0 || snprintf(chain_mangle, 256, "PCP_MANGLE_RULE_%d", index) <= 0) {
    return false;
  }
  if (!remove_jump_pcp_rule_chains(chain_preroute, chain_postroute, chain_mangle)) {
    return false;
  }
  if (!flush_pcp_rule_chains(chain_preroute, chain_postroute, chain_mangle)) {
    return false;
  }
  if (!delete_pcp_rule_chains(chain_preroute, chain_postroute, chain_mangle)) {
    return false;
  }
  return true;
}
```