user: Converte this assembly snippet into its equivalent C code:

```asm
<mkNewFaceRequest>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf98,%rsp
  mov    0x2fd0(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0x2fd8(%rsp),%rax
  mov    %rdx,%r15
  mov    $0x2,%edx
  mov    %r8,0x18(%rsp)
  mov    %rdi,%r12
  lea    0xfe0(%rsp),%r14
  lea    0x810(%rsp),%r13
  mov    %r9,0x20(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    $0x1a,%esi
  mov    %rax,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x2f88(%rsp)
  xor    %eax,%eax
  call   <ccnl_ccnb_mkHeader@plt>
  mov    $0x2,%edx
  mov    $0xe,%esi
  movslq %eax,%rdi
  mov    %rdi,%rbx
  add    %r12,%rdi
  call   <ccnl_ccnb_mkHeader@plt>
  lea    D39(%rip),%rcx
  mov    $0x2,%edx
  mov    %r14,%rdi
  add    %ebx,%eax
  mov    $0xf,%esi
  mov    %eax,0x8(%rsp)
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    $0x2,%edx
  mov    $0xf,%esi
  lea    D12(%rip),%rcx
  movslq %eax,%rdi
  mov    %rax,%rbp
  add    %r14,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    $0x2,%edx
  mov    $0xf,%esi
  lea    D28(%rip),%rcx
  add    %eax,%ebp
  movslq %ebp,%rdi
  add    %r14,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    $0x2,%edx
  mov    $0x50,%esi
  mov    %r13,%rdi
  add    %ebp,%eax
  mov    %eax,0xc(%rsp)
  call   <ccnl_ccnb_mkHeader@plt>
  mov    $0x2,%edx
  mov    $0x49,%esi
  lea    D28(%rip),%rcx
  movslq %eax,%rdi
  mov    %rdi,%rbx
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    0x38(%rsp),%r10
  add    %eax,%ebx
  test   %r10,%r10
  je     L20
  movslq %ebx,%rdi
  mov    %r10,%rcx
  mov    $0x2,%edx
  mov    $0x182b9,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L20:
  test   %r15,%r15
  je     L53
  movslq %ebx,%rdi
  mov    %r15,%rcx
  mov    $0x2,%edx
  mov    $0x182ba,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    $0x2,%edx
  mov    $0x4b,%esi
  lea    D26(%rip),%rcx
  add    %eax,%ebx
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L53:
  mov    0x10(%rsp),%rcx
  test   %rcx,%rcx
  je     L62
  movslq %ebx,%rdi
  mov    $0x2,%edx
  mov    $0x182bb,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    $0x2,%edx
  mov    $0x4b,%esi
  lea    D26(%rip),%rcx
  add    %eax,%ebx
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L62:
  mov    0x18(%rsp),%rcx
  test   %rcx,%rcx
  je     L4
  movslq %ebx,%rdi
  mov    $0x2,%edx
  mov    $0x4c,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L4:
  mov    0x20(%rsp),%rcx
  test   %rcx,%rcx
  je     L14
  movslq %ebx,%rdi
  mov    $0x2,%edx
  mov    $0x4d,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L14:
  mov    0x28(%rsp),%rcx
  test   %rcx,%rcx
  je     L29
  movslq %ebx,%rdi
  mov    $0x2,%edx
  mov    $0x182be,%esi
  add    %r13,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  add    %eax,%ebx
L29:
  lea    0x40(%rsp),%rbp
  movslq %ebx,%rax
  mov    $0x2,%edx
  mov    $0x40,%esi
  mov    %rbp,%rdi
  movb   $0x0,0x810(%rsp,%rax,1)
  call   <ccnl_ccnb_mkHeader@plt>
  lea    0x1(%rbx),%r8d
  mov    %r13,%rcx
  mov    $0x2,%edx
  movslq %eax,%rdi
  mov    $0x13,%esi
  mov    %rdi,%r15
  add    %rbp,%rdi
  call   <ccnl_ccnb_mkBlob@plt>
  movslq 0xc(%rsp),%rdi
  mov    %rbp,%rcx
  mov    $0xf,%esi
  add    %eax,%r15d
  mov    $0x2,%edx
  movslq %r15d,%rax
  mov    %rdi,%rbx
  lea    0x1(%r15),%r8d
  add    %r14,%rdi
  movb   $0x0,0x40(%rsp,%rax,1)
  call   <ccnl_ccnb_mkBlob@plt>
  mov    0x30(%rsp),%rsi
  lea    (%rbx,%rax,1),%ebp
  test   %rsi,%rsi
  je     L8
  movslq 0x8(%rsp),%rdi
  mov    %ebp,%ecx
  mov    %r14,%rdx
  mov    %rdi,%rbx
  add    %r12,%rdi
  call   <add_signature@plt>
  add    %eax,%ebx
  mov    %ebx,0x8(%rsp)
L8:
  movslq 0x8(%rsp),%rdi
  mov    %ebp,%edx
  mov    %r14,%rsi
  mov    %rdi,%rbx
  add    %r12,%rdi
  call   <memcpy@plt>
  add    %ebp,%ebx
  movslq %ebx,%rax
  movb   $0x0,(%r12,%rax,1)
  lea    0x1(%rbx),%eax
  cltq
  movb   $0x0,(%r12,%rax,1)
  lea    0x2(%rbx),%eax
  mov    0x2f88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L56
  add    $0x2f98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D39
type: string
name: disassemble_data
arguments: data_tag: D12
type: string
name: disassemble_data
arguments: data_tag: D28
type: string
name: disassemble_data
arguments: data_tag: D26
type: string

tool: D39: ccnx

tool: 

tool: D28: newface

tool: D26: 17

assistant: ```c
int mkNewFaceRequest(unsigned char *out, char *macsrc, char *ip4src, char *ip6src, char *host, char *port, char *flags, char *private_key_path) {
  int len = 0, len1 = 0, len2 = 0, len3 = 0;
  unsigned char out1[8096];
  unsigned char contentobj[2000];
  unsigned char faceinst[2000];
  len = ccnl_ccnb_mkHeader(out, 26, 2);
  len += ccnl_ccnb_mkHeader(out + len, 14, 2);
  len1 += ccnl_ccnb_mkStrBlob(out1 + len1, 15, 2, "ccnx");
  len1 += ccnl_ccnb_mkStrBlob(out1 + len1, 15, 2, "");
  len1 += ccnl_ccnb_mkStrBlob(out1 + len1, 15, 2, "newface");
  len3 = ccnl_ccnb_mkHeader(faceinst, 80, 2);
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 73, 2, "newface");
  if (macsrc)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99001, 2, macsrc);
  if (ip4src) {
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99002, 2, ip4src);
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 75, 2, "17");
  }
  if (ip6src) {
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99003, 2, ip6src);
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 75, 2, "17");
  }
  if (host)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 76, 2, host);
  if (port)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 77, 2, port);
  if (flags)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99006, 2, flags);
  faceinst[len3++] = 0;
  len2 = ccnl_ccnb_mkHeader(contentobj, 64, 2);
  len2 += ccnl_ccnb_mkBlob(contentobj + len2, 19, 2, (char *)faceinst, len3);
  contentobj[len2++] = 0;
  len1 += ccnl_ccnb_mkBlob(out1 + len1, 15, 2, (char *)contentobj, len2);
  if (private_key_path)
    len += add_signature(out + len, private_key_path, out1, len1);
  memcpy(out + len, out1, len1);
  len += len1;
  out[len++] = 0;
  out[len++] = 0;
  return len;
}
```