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

```asm
<add_signature>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x840,%rsp
  mov    %rdi,-0x828(%rbp)
  mov    %rsi,-0x830(%rbp)
  mov    %rdx,-0x838(%rbp)
  mov    %ecx,-0x83c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x828(%rbp),%rax
  mov    $0x2,%edx
  mov    $0x25,%esi
  mov    %rax,%rdi
  call   <ccnl_ccnb_mkHeader@plt>
  mov    %eax,-0x814(%rbp)
  mov    -0x814(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x828(%rbp),%rax
  add    %rdx,%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rcx
  mov    $0x2,%edx
  mov    $0xe,%esi
  mov    %rax,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    %eax,%edx
  mov    -0x814(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x814(%rbp)
  mov    -0x814(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x828(%rbp),%rax
  add    %rdx,%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rcx
  mov    $0x2,%edx
  mov    $0x35,%esi
  mov    %rax,%rdi
  call   <ccnl_ccnb_mkStrBlob@plt>
  mov    %eax,%edx
  mov    -0x814(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x814(%rbp)
  lea    -0x818(%rbp),%rdi
  lea    -0x810(%rbp),%rcx
  mov    -0x83c(%rbp),%edx
  mov    -0x838(%rbp),%rsi
  mov    -0x830(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <sign@plt>
  test   %eax,%eax
  jne    L9
  mov    $0x0,%eax
  jmp    L27
L9:
  mov    -0x818(%rbp),%eax
  mov    %eax,%eax
  movb   $0x0,-0x810(%rbp,%rax,1)
  mov    -0x814(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x828(%rbp),%rax
  add    %rdx,%rax
  mov    $0x2,%edx
  mov    $0x36,%esi
  mov    %rax,%rdi
  call   <ccnl_ccnb_mkHeader@plt>
  add    %eax,-0x814(%rbp)
  mov    -0x818(%rbp),%edx
  mov    -0x814(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x828(%rbp),%rax
  add    %rax,%rcx
  lea    -0x810(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <ccnl_ccnb_addBlob@plt>
  mov    %eax,%edx
  mov    -0x814(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x814(%rbp)
  mov    -0x814(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x814(%rbp)
  movslq %eax,%rdx
  mov    -0x828(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x814(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x814(%rbp)
  movslq %eax,%rdx
  mov    -0x828(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x814(%rbp),%eax
L27:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L17
  call   <__stack_chk_fail@plt>
L17:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D11
type_guessed: string
name: disassemble_data
arguments: tag: D19
type_guessed: string

tool: D11: SHA256

tool: 

assistant: ```c
int add_signature(unsigned char *out, char *private_key_path, unsigned char *file, unsigned int fsize) {
  int len;
  unsigned char sig[2048];
  unsigned int sig_len;
  len = ccnl_ccnb_mkHeader(out, 37, 2);
  len += ccnl_ccnb_mkStrBlob(out + len, 14, 2, "SHA256");
  len += ccnl_ccnb_mkStrBlob(out + len, 53, 2, "");
  if (!sign(private_key_path, (unsigned char *)file, fsize, (unsigned char *)sig, &sig_len))
    return 0;
  sig[sig_len] = 0;
  len += ccnl_ccnb_mkHeader(out + len, 54, 2);
  len += ccnl_ccnb_addBlob(out + len, (char *)sig, sig_len);
  out[len++] = 0;
  out[len++] = 0;
  return len;
}
```