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

```asm
<generateVoipInvitePacket>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  mov    $0x400,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x408,%rsp
  mov    %rdx,0x8(%rsp)
  lea    0xf0(%rsp),%r14
  lea    0x1f0(%rsp),%r13
  mov    %rsi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x3f8(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  pxor   %xmm0,%xmm0
  mov    %r14,%rdi
  lea    D74(%rip),%rsi
  mov    %rax,%r12
  movaps %xmm0,0xf0(%rsp)
  movabs $0x20455449564e49,%rax
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  mov    %rax,0x28(%rsp)
  call   <strcat@plt>
  mov    0x8(%rsp),%r10
  mov    %r14,%rdi
  mov    %r10,%rsi
  mov    %r10,0x10(%rsp)
  call   <strcat@plt>
  lea    D255(%rip),%r8
  mov    %r14,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <strcat@plt>
  mov    %r14,%rdi
  lea    D55(%rip),%rsi
  call   <strcat@plt>
  movdqa D171(%rip),%xmm1
  pxor   %xmm0,%xmm0
  mov    %r13,%rdi
  lea    D279(%rip),%rsi
  movaps %xmm0,0x1f0(%rsp)
  movaps %xmm1,0x30(%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)
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r13,%rdi
  lea    D64(%rip),%rsi
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    %rbp,0x8(%rsp)
  call   <strcat@plt>
  lea    0x270(%rsp),%rbp
  mov    %r13,%rdi
  lea    D8(%rip),%rsi
  call   <strcat@plt>
  pxor   %xmm0,%xmm0
  mov    %rbp,%rdi
  lea    D315(%rip),%rsi
  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)
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  lea    0x2f0(%rsp),%r15
  call   <strcat@plt>
  mov    %rbp,%rdi
  lea    D164(%rip),%rsi
  call   <strcat@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D255(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  lea    D125(%rip),%rsi
  call   <strcat@plt>
  pxor   %xmm0,%xmm0
  lea    D239(%rip),%rsi
  mov    %r15,%rdi
  movaps %xmm0,0x2f0(%rsp)
  movaps %xmm0,0x300(%rsp)
  movaps %xmm0,0x310(%rsp)
  movaps %xmm0,0x320(%rsp)
  movaps %xmm0,0x330(%rsp)
  movaps %xmm0,0x340(%rsp)
  movaps %xmm0,0x350(%rsp)
  movaps %xmm0,0x360(%rsp)
  call   <strcat@plt>
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  lea    D255(%rip),%r8
  mov    %r15,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  lea    0x1b0(%rsp),%rbx
  call   <strcat@plt>
  lea    D309(%rip),%r10
  mov    %r15,%rdi
  mov    %r10,%rsi
  call   <strcat@plt>
  pxor   %xmm0,%xmm0
  lea    0x130(%rsp),%r11
  lea    D194(%rip),%rsi
  mov    %r11,%rdi
  mov    %r11,0x10(%rsp)
  movaps %xmm0,0x130(%rsp)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0x150(%rsp)
  movaps %xmm0,0x160(%rsp)
  call   <strcat@plt>
  lea    D255(%rip),%r8
  mov    0x10(%rsp),%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    0x8(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <strcat@plt>
  mov    0x10(%rsp),%rdi
  lea    D28(%rip),%rsi
  call   <strcat@plt>
  pxor   %xmm0,%xmm0
  xor    %edx,%edx
  mov    %rbx,%rdi
  movdqa D292(%rip),%xmm1
  lea    D157(%rip),%rsi
  movabs $0xa0d323732,%rax
  mov    %rdx,0xc8(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm1,0x50(%rsp)
  movdqa D244(%rip),%xmm1
  movaps %xmm0,0x1b0(%rsp)
  movaps %xmm1,0x170(%rsp)
  movdqa D324(%rip),%xmm1
  movaps %xmm0,0x1c0(%rsp)
  movaps %xmm1,0x180(%rsp)
  movdqa D84(%rip),%xmm1
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm1,0x190(%rsp)
  movdqa D132(%rip),%xmm1
  movaps %xmm0,0x1e0(%rsp)
  movaps %xmm1,0x40(%rsp)
  movdqa D306(%rip),%xmm1
  movq   $0xa0d36,0x1a0(%rsp)
  movaps %xmm1,0x70(%rsp)
  movdqa D5(%rip),%xmm1
  movq   $0x0,0x1a8(%rsp)
  movaps %xmm1,0x80(%rsp)
  movdqa D327(%rip),%xmm1
  mov    %rax,0xc0(%rsp)
  movaps %xmm1,0x90(%rsp)
  movdqa D12(%rip),%xmm1
  movaps %xmm1,0xa0(%rsp)
  movdqa D249(%rip),%xmm1
  movaps %xmm1,0xb0(%rsp)
  call   <strcat@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D255(%rip),%r8
  mov    %rbx,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D309(%rip),%r10
  mov    %rbx,%rdi
  mov    %r10,%rsi
  call   <strcat@plt>
  movdqa D227(%rip),%xmm1
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  lea    0x28(%rsp),%rsi
  mov    $0x7,%edx
  movaps %xmm0,0x3c0(%rsp)
  movaps %xmm1,0xd0(%rsp)
  movdqa D260(%rip),%xmm1
  movaps %xmm0,0x3d0(%rsp)
  movaps %xmm1,0x370(%rsp)
  movdqa D303(%rip),%xmm1
  movaps %xmm0,0x3e0(%rsp)
  movaps %xmm1,0x380(%rsp)
  movdqa D261(%rip),%xmm1
  movq   $0xa0d,0xe0(%rsp)
  movaps %xmm1,0x390(%rsp)
  movdqa D280(%rip),%xmm1
  movq   $0x0,0xe8(%rsp)
  movaps %xmm1,0x3a0(%rsp)
  movq   $0xa,0x3b0(%rsp)
  movq   $0x0,0x3b8(%rsp)
  call   <memcpy@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %r14,%rsi
  lea    0x7(%r12),%rdi
  mov    %eax,%edx
  call   <memcpy@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  lea    0x30(%rsp),%rsi
  mov    $0x9,%edx
  lea    0x7(%rax),%edi
  mov    %eax,%r14d
  movslq %edi,%rdi
  add    $0x10,%r14d
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  movslq %r14d,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0x50(%rsp),%r13
  call   <strlen@plt>
  mov    %rbp,%rdi
  add    %eax,%r14d
  call   <strlen@plt>
  movslq %r14d,%rdi
  mov    %rbp,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r15,%rdi
  lea    (%r14,%rax,1),%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r15,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%r11
  add    %eax,%ebp
  mov    %r11,%rdi
  mov    %r11,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%rsi
  movslq %ebp,%rdi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    0x8(%rsp),%rdi
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0x170(%rsp),%r13
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0x40(%rsp),%r13
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0x70(%rsp),%r13
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0x90(%rsp),%r13
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  lea    0xb0(%rsp),%r13
  call   <strlen@plt>
  mov    %r13,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %rbx,%rdi
  add    %eax,%ebp
  call   <strlen@plt>
  movslq %ebp,%rdi
  mov    %rbx,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x0(%rbp,%rax,1),%ebx
  lea    0xd0(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  movslq %ebx,%rdi
  mov    %rbp,%rsi
  add    %r12,%rdi
  mov    %eax,%edx
  call   <memcpy@plt>
  mov    %rbp,%rdi
  lea    0x370(%rsp),%rbp
  call   <strlen@plt>
  mov    %rbp,%rdi
  add    %eax,%ebx
  call   <strlen@plt>
  movslq %ebx,%rdi
  mov    %rbp,%rsi
  mov    %eax,%edx
  add    %r12,%rdi
  call   <memcpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    %eax,%ebx
  movslq %ebx,%rbx
  movb   $0x0,(%r12,%rbx,1)
  mov    0x3f8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x408,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D74
datatype: string
name: unpack_data
arguments: label: D255
datatype: string
name: unpack_data
arguments: label: D55
datatype: string
name: unpack_data
arguments: label: D171
datatype: byte[16]
name: unpack_data
arguments: label: D279
datatype: string
name: unpack_data
arguments: label: D64
datatype: string
name: unpack_data
arguments: label: D8
datatype: string
name: unpack_data
arguments: label: D315
datatype: string
name: unpack_data
arguments: label: D164
datatype: string
name: unpack_data
arguments: label: D125
datatype: string
name: unpack_data
arguments: label: D239
datatype: string
name: unpack_data
arguments: label: D309
datatype: string
name: unpack_data
arguments: label: D194
datatype: string
name: unpack_data
arguments: label: D28
datatype: string
name: unpack_data
arguments: label: D292
datatype: byte[16]
name: unpack_data
arguments: label: D157
datatype: string
name: unpack_data
arguments: label: D244
datatype: byte[16]
name: unpack_data
arguments: label: D324
datatype: byte[16]
name: unpack_data
arguments: label: D84
datatype: byte[16]
name: unpack_data
arguments: label: D132
datatype: byte[16]
name: unpack_data
arguments: label: D306
datatype: byte[16]
name: unpack_data
arguments: label: D5
datatype: byte[16]
name: unpack_data
arguments: label: D327
datatype: byte[16]
name: unpack_data
arguments: label: D12
datatype: byte[16]
name: unpack_data
arguments: label: D249
datatype: byte[16]
name: unpack_data
arguments: label: D227
datatype: byte[16]
name: unpack_data
arguments: label: D260
datatype: byte[16]
name: unpack_data
arguments: label: D303
datatype: byte[16]
name: unpack_data
arguments: label: D261
datatype: byte[16]
name: unpack_data
arguments: label: D280
datatype: byte[16]

tool: D74: sip:

tool: D255: @

tool: D55:  

tool: {"D171": [0x53,0x49,0x50,0x2f,0x32,0x2e,0x30,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D279: Via: SIP/2.0/UDP 

tool: D64: :5060;branch=z9hG4bKnp104984053-44ce4a41

tool: D8: ;rport


tool: D315: From: "

tool: D164: " <sip:

tool: D125: >;tag=6433ef9


tool: D239: To: <sip:

tool: D309: >


tool: D194: Call-ID: 105090259-446faf7a

tool: D28: 


tool: {"D292": [0x43,0x53,0x65,0x71,0x3a,0x20,0x31,0x20,0x49,0x4e,0x56,0x49,0x54,0x45,0x0d,0x0a]}

tool: D157: Contact: <sip:

tool: {"D244": [0x55,0x73,0x65,0x72,0x2d,0x41,0x67,0x65,0x6e,0x74,0x3a,0x20,0x4e,0x65,0x72,0x6f]}

tool: {"D324": [0x20,0x53,0x49,0x50,0x50,0x53,0x20,0x49,0x50,0x20,0x50,0x68,0x6f,0x6e,0x65,0x20]}

tool: {"D84": [0x56,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x32,0x2e,0x30,0x2e,0x35,0x31,0x2e,0x31]}

tool: {"D132": [0x45,0x78,0x70,0x69,0x72,0x65,0x73,0x3a,0x20,0x31,0x32,0x30,0x0d,0x0a,0x00,0x00]}

tool: {"D306": [0x41,0x63,0x63,0x65,0x70,0x74,0x3a,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74]}

tool: {"D5": [0x69,0x6f,0x6e,0x2f,0x73,0x64,0x70,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D327": [0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x54,0x79,0x70,0x65,0x3a,0x20,0x61,0x70]}

tool: {"D12": [0x70,0x6c,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2f,0x73,0x64,0x70,0x0d,0x0a,0x00]}

tool: {"D249": [0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x4c,0x65,0x6e,0x67,0x74,0x68,0x3a,0x20]}

tool: {"D227": [0x4d,0x61,0x78,0x2d,0x46,0x6f,0x72,0x77,0x61,0x72,0x64,0x73,0x3a,0x20,0x37,0x30]}

tool: {"D260": [0x41,0x6c,0x6c,0x6f,0x77,0x3a,0x20,0x49,0x4e,0x56,0x49,0x54,0x45,0x2c,0x20,0x41]}

tool: {"D303": [0x43,0x4b,0x2c,0x20,0x43,0x41,0x4e,0x43,0x45,0x4c,0x2c,0x20,0x42,0x59,0x45,0x2c]}

tool: {"D261": [0x20,0x52,0x45,0x46,0x45,0x52,0x2c,0x20,0x4f,0x50,0x54,0x49,0x4f,0x4e,0x53,0x2c]}

tool: {"D280": [0x20,0x4e,0x4f,0x54,0x49,0x46,0x59,0x2c,0x20,0x49,0x4e,0x46,0x4f,0x0d,0x0a,0x0d]}

assistant: ```c
uint8_t *generateVoipInvitePacket(char *userName, char *fromPhoneNumber, char *toPhoneNumber, char *host, char *srcIp) {
  uint8_t *data = (uint8_t *)malloc(1024);
  int ic = 0;
  char method[8] = "INVITE ";
  char requestUri[64] = "";
  strcat(requestUri, "sip:");
  strcat(requestUri, toPhoneNumber);
  strcat(requestUri, "@");
  strcat(requestUri, host);
  strcat(requestUri, " ");
  char version[16] = "SIP/2.0\r\n";
  char via[128] = "";
  strcat(via, "Via: SIP/2.0/UDP ");
  strcat(via, srcIp);
  strcat(via, ":5060;branch=z9hG4bKnp104984053-44ce4a41");
  strcat(via, srcIp);
  strcat(via, ";rport\r\n");
  char from[128] = "";
  strcat(from, "From: \"");
  strcat(from, userName);
  strcat(from, "\" <sip:");
  strcat(from, fromPhoneNumber);
  strcat(from, "@");
  strcat(from, host);
  strcat(from, ">;tag=6433ef9\r\n");
  char to[128] = "";
  strcat(to, "To: <sip:");
  strcat(to, toPhoneNumber);
  strcat(to, "@");
  strcat(to, host);
  strcat(to, ">\r\n");
  char callId[64] = "";
  strcat(callId, "Call-ID: 105090259-446faf7a");
  strcat(callId, "@");
  strcat(callId, srcIp);
  strcat(callId, "\r\n");
  char cseq[32] = "CSeq: 1 INVITE\r\n";
  char userAgent[64] = "User-Agent: Nero SIPPS IP Phone Version 2.0.51.16\r\n";
  char expire[16] = "Expires: 120\r\n";
  char accept[32] = "Accept: application/sdp\r\n";
  char contentType[32] = "Content-Type: application/sdp\r\n";
  char contentLength[32] = "Content-Length: 272\r\n";
  char contact[64] = "";
  strcat(contact, "Contact: <sip:");
  strcat(contact, fromPhoneNumber);
  strcat(contact, "@");
  strcat(contact, srcIp);
  strcat(contact, ">\r\n");
  char maxForward[32] = "Max-Forwards: 70\r\n";
  char allow[128] = "Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, INFO\r\n\r\n";
  memcpy(data, method, 7);
  ic += 7;
  memcpy(data + ic, requestUri, strlen(requestUri));
  ic += strlen(requestUri);
  memcpy(data + ic, version, 9);
  ic += 9;
  memcpy(data + ic, via, strlen(via));
  ic += strlen(via);
  memcpy(data + ic, from, strlen(from));
  ic += strlen(from);
  memcpy(data + ic, to, strlen(to));
  ic += strlen(to);
  memcpy(data + ic, callId, strlen(callId));
  ic += strlen(callId);
  memcpy(data + ic, cseq, strlen(cseq));
  ic += strlen(cseq);
  memcpy(data + ic, userAgent, strlen(userAgent));
  ic += strlen(userAgent);
  memcpy(data + ic, expire, strlen(expire));
  ic += strlen(expire);
  memcpy(data + ic, accept, strlen(accept));
  ic += strlen(accept);
  memcpy(data + ic, contentType, strlen(contentType));
  ic += strlen(contentType);
  memcpy(data + ic, contentLength, strlen(contentLength));
  ic += strlen(contentLength);
  memcpy(data + ic, contact, strlen(contact));
  ic += strlen(contact);
  memcpy(data + ic, maxForward, strlen(maxForward));
  ic += strlen(maxForward);
  memcpy(data + ic, allow, strlen(allow));
  ic += strlen(allow);
  data[ic] = '\0';
  return data;
}
```