#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
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;
}


x86 assembly (clang, -O0):
<generateVoipInvitePacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x400,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    0xe75(%rip),%rax
mov    %rax,-0x3c(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x80(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x80(%rbp),%rdi
lea    0xe41(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x80(%rbp),%rdi
lea    0xe22(%rip),%rsi
call   1070 <strcat@plt>
mov    0xec0(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x110(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x110(%rbp),%rdi
lea    0xdd3(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x110(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x110(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x190(%rbp),%rdi
lea    0xdbc(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
lea    0xda1(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
lea    0xd30(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x190(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x210(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x210(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x210(%rbp),%rdi
lea    0xcc4(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x210(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x210(%rbp),%rdi
lea    0xd11(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x250(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x250(%rbp),%rdi
lea    0xcef(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x250(%rbp),%rdi
lea    0xc68(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x250(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x250(%rbp),%rdi
lea    0xca8(%rip),%rsi
call   1070 <strcat@plt>
mov    0xd01(%rip),%rax
mov    %rax,-0x270(%rbp)
mov    0xcfb(%rip),%rax
mov    %rax,-0x268(%rbp)
mov    0xcf5(%rip),%rax
mov    %rax,-0x260(%rbp)
mov    0xcef(%rip),%rax
mov    %rax,-0x258(%rbp)
lea    -0x2b0(%rbp),%rdi
lea    0xd42(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
mov    0xca1(%rip),%rax
mov    %rax,-0x2c0(%rbp)
mov    0xc9b(%rip),%rax
mov    %rax,-0x2b8(%rbp)
mov    0xcb5(%rip),%rax
mov    %rax,-0x2e0(%rbp)
mov    0xcaf(%rip),%rax
mov    %rax,-0x2d8(%rbp)
mov    0xca9(%rip),%rax
mov    %rax,-0x2d0(%rbp)
mov    0xca3(%rip),%rax
mov    %rax,-0x2c8(%rbp)
mov    0xd9d(%rip),%rax
mov    %rax,-0x300(%rbp)
mov    0xd97(%rip),%rax
mov    %rax,-0x2f8(%rbp)
mov    0xd91(%rip),%rax
mov    %rax,-0x2f0(%rbp)
mov    0xd8b(%rip),%rax
mov    %rax,-0x2e8(%rbp)
mov    0xc65(%rip),%rax
mov    %rax,-0x320(%rbp)
mov    0xc5f(%rip),%rax
mov    %rax,-0x318(%rbp)
mov    0xc59(%rip),%rax
mov    %rax,-0x310(%rbp)
mov    0xc53(%rip),%rax
mov    %rax,-0x308(%rbp)
lea    -0x360(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x360(%rbp),%rdi
lea    0xb9b(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x360(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x360(%rbp),%rdi
lea    0xae8(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x360(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <strcat@plt>
lea    -0x360(%rbp),%rdi
lea    0xb35(%rip),%rsi
call   1070 <strcat@plt>
mov    0xbe1(%rip),%rax
mov    %rax,-0x380(%rbp)
mov    0xbdb(%rip),%rax
mov    %rax,-0x378(%rbp)
mov    0xbd5(%rip),%rax
mov    %rax,-0x370(%rbp)
mov    0xbcf(%rip),%rax
mov    %rax,-0x368(%rbp)
lea    -0x400(%rbp),%rdi
lea    0xc02(%rip),%rsi
mov    $0x80,%edx
call   1050 <memcpy@plt>
mov    -0x30(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
mov    $0x7,%edx
call   1050 <memcpy@plt>
mov    -0x34(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x4e0(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0x4d8(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x4e0(%rbp),%rdi
mov    -0x4d8(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
lea    -0x90(%rbp),%rsi
mov    $0x9,%edx
call   1050 <memcpy@plt>
mov    -0x34(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x4d0(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x4c8(%rbp)
lea    -0x110(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x4d0(%rbp),%rdi
mov    -0x4c8(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x110(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x4c0(%rbp)
lea    -0x190(%rbp),%rax
mov    %rax,-0x4b8(%rbp)
lea    -0x190(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x4c0(%rbp),%rdi
mov    -0x4b8(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x190(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x4b0(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x4a8(%rbp)
lea    -0x210(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x4b0(%rbp),%rdi
mov    -0x4a8(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x210(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x4a0(%rbp)
lea    -0x250(%rbp),%rax
mov    %rax,-0x498(%rbp)
lea    -0x250(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x4a0(%rbp),%rdi
mov    -0x498(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x250(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x490(%rbp)
lea    -0x270(%rbp),%rax
mov    %rax,-0x488(%rbp)
lea    -0x270(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x490(%rbp),%rdi
mov    -0x488(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x270(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x480(%rbp)
lea    -0x2b0(%rbp),%rax
mov    %rax,-0x478(%rbp)
lea    -0x2b0(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x480(%rbp),%rdi
mov    -0x478(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x2b0(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x470(%rbp)
lea    -0x2c0(%rbp),%rax
mov    %rax,-0x468(%rbp)
lea    -0x2c0(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x470(%rbp),%rdi
mov    -0x468(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x2c0(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x460(%rbp)
lea    -0x2e0(%rbp),%rax
mov    %rax,-0x458(%rbp)
lea    -0x2e0(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x460(%rbp),%rdi
mov    -0x458(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x2e0(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x450(%rbp)
lea    -0x300(%rbp),%rax
mov    %rax,-0x448(%rbp)
lea    -0x300(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x450(%rbp),%rdi
mov    -0x448(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x300(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x440(%rbp)
lea    -0x320(%rbp),%rax
mov    %rax,-0x438(%rbp)
lea    -0x320(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x440(%rbp),%rdi
mov    -0x438(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x320(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x430(%rbp)
lea    -0x360(%rbp),%rax
mov    %rax,-0x428(%rbp)
lea    -0x360(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x430(%rbp),%rdi
mov    -0x428(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x360(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x420(%rbp)
lea    -0x380(%rbp),%rax
mov    %rax,-0x418(%rbp)
lea    -0x380(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x420(%rbp),%rdi
mov    -0x418(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x380(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x410(%rbp)
lea    -0x400(%rbp),%rax
mov    %rax,-0x408(%rbp)
lea    -0x400(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x410(%rbp),%rdi
mov    -0x408(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    -0x400(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
add    $0x4e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateVoipInvitePacket>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
mov    %r8,%r13
mov    %rcx,%r12
mov    %rdx,%rbp
mov    %rdx,0x20(%rsp)
mov    %rsi,%r14
mov    %rsi,0x18(%rsp)
mov    %rdi,0x10(%rsp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%r15
movabs $0x20455449564e49,%rax
mov    %rax,0x28(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
lea    0xe9f(%rip),%rsi
lea    0x170(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <strcat@plt>
lea    0xe2c(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <strcat@plt>
lea    0xe24(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x1f0(%rsp)
lea    0xdb6(%rip),%rsi
lea    0x1f0(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,0x8(%rsp)
mov    %r13,%rsi
call   1060 <strcat@plt>
lea    0xda1(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1060 <strcat@plt>
lea    0xdb0(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x3e0(%rsp)
movaps %xmm0,0x3d0(%rsp)
movaps %xmm0,0x3c0(%rsp)
movaps %xmm0,0x3b0(%rsp)
movaps %xmm0,0x3a0(%rsp)
movaps %xmm0,0x390(%rsp)
movaps %xmm0,0x380(%rsp)
movaps %xmm0,0x370(%rsp)
lea    0xd67(%rip),%rsi
lea    0x370(%rsp),%r13
mov    %r13,%rdi
call   1060 <strcat@plt>
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
call   1060 <strcat@plt>
lea    0xd4b(%rip),%rsi
mov    %r13,%rdi
call   1060 <strcat@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %r13,%rdi
lea    0xce0(%rip),%rbp
mov    %rbp,%rsi
call   1060 <strcat@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <strcat@plt>
lea    0xd1c(%rip),%rsi
mov    %r13,%rdi
call   1060 <strcat@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x360(%rsp)
movaps %xmm0,0x350(%rsp)
movaps %xmm0,0x340(%rsp)
movaps %xmm0,0x330(%rsp)
movaps %xmm0,0x320(%rsp)
movaps %xmm0,0x310(%rsp)
movaps %xmm0,0x300(%rsp)
movaps %xmm0,0x2f0(%rsp)
lea    0xcda(%rip),%rsi
lea    0x2f0(%rsp),%r14
mov    %r14,%rdi
call   1060 <strcat@plt>
mov    %r14,%rdi
mov    0x20(%rsp),%rsi
call   1060 <strcat@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1060 <strcat@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1060 <strcat@plt>
lea    0xcaa(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   1060 <strcat@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
lea    0xc79(%rip),%rsi
lea    0x130(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
call   1060 <strcat@plt>
lea    0xc36(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
movaps 0xc94(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xc75(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xd16(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movaps 0xcf7(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xcd8(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xcb9(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
movaps 0xc1a(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xc4e(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xc2f(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xd50(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xd31(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xc32(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xc13(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
lea    0xb74(%rip),%rsi
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    0x18(%rsp),%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
lea    0xac0(%rip),%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <strcat@plt>
movaps 0xbce(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xbb2(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xc76(%rip),%xmm0
movaps %xmm0,0x2e0(%rsp)
movaps 0xc57(%rip),%xmm0
movaps %xmm0,0x2d0(%rsp)
movaps 0xc38(%rip),%xmm0
movaps %xmm0,0x2c0(%rsp)
movaps 0xc19(%rip),%xmm0
movaps %xmm0,0x2b0(%rsp)
movaps 0xbfa(%rip),%xmm0
movaps %xmm0,0x2a0(%rsp)
movaps 0xbdb(%rip),%xmm0
movaps %xmm0,0x290(%rsp)
movaps 0xbbc(%rip),%xmm0
movaps %xmm0,0x280(%rsp)
movaps 0xb9d(%rip),%xmm0
movaps %xmm0,0x270(%rsp)
lea    0x28(%rsp),%rsi
mov    %r15,%rdi
mov    $0x7,%edx
call   1040 <memcpy@plt>
lea    0x7(%r15),%rbp
lea    0x170(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rbx
lea    (%rbx,%r15,1),%rdi
add    $0x7,%rdi
lea    0x40(%rsp),%rsi
mov    $0x9,%edx
call   1040 <memcpy@plt>
lea    (%rbx,%r15,1),%rbp
add    $0x10,%rbp
lea    0x1f0(%rsp),%r12
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %ebx,%r12d
add    %eax,%r12d
add    %ebx,%eax
add    $0x10,%eax
movslq %eax,%rbp
add    %r15,%rbp
mov    %r13,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r13,%rdi
call   1030 <strlen@plt>
add    %r12d,%eax
add    $0x10,%eax
movslq %eax,%rbx
lea    (%r15,%rbx,1),%rbp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebx
movslq %ebx,%rbx
lea    (%r15,%rbx,1),%rbp
lea    0x130(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebx
movslq %ebx,%rbx
lea    (%r15,%rbx,1),%rbp
lea    0x110(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebx
movslq %ebx,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0x1b0(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0x30(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0xf0(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0xd0(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0xb0(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0x70(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0x50(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%r15,%rbp,1),%rbx
lea    0x270(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %eax,%ebp
movslq %ebp,%rax
movb   $0x0,(%r15,%rax,1)
mov    %r15,%rax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.generateVoipInvitePacket.method = [8 x i8] c"INVITE \00"
@.str = [5 x i8] c"sip:\00"
@.str.1 = [2 x i8] c"@\00"
@.str.2 = [2 x i8] c" \00"
@__const.generateVoipInvitePacket.version = [16 x i8] c"SIP/2.0\0D\0A\00\00\00\00\00\00\00"
@.str.3 = [18 x i8] c"Via: SIP/2.0/UDP \00"
@.str.4 = [41 x i8] c":5060;branch=z9hG4bKnp104984053-44ce4a41\00"
@.str.5 = [9 x i8] c";rport\0D\0A\00"
@.str.6 = [8 x i8] c"From: \22\00"
@.str.7 = [8 x i8] c"\22 <sip:\00"
@.str.8 = [16 x i8] c">;tag=6433ef9\0D\0A\00"
@.str.9 = [10 x i8] c"To: <sip:\00"
@.str.10 = [4 x i8] c">\0D\0A\00"
@.str.11 = [28 x i8] c"Call-ID: 105090259-446faf7a\00"
@.str.12 = [3 x i8] c"\0D\0A\00"
@__const.generateVoipInvitePacket.cseq = [32 x i8] c"CSeq: 1 INVITE\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.userAgent = [64 x i8] c"User-Agent: Nero SIPPS IP Phone Version 2.0.51.16\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.expire = [16 x i8] c"Expires: 120\0D\0A\00\00"
@__const.generateVoipInvitePacket.accept = [32 x i8] c"Accept: application/sdp\0D\0A\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.contentType = [32 x i8] c"Content-Type: application/sdp\0D\0A\00"
@__const.generateVoipInvitePacket.contentLength = [32 x i8] c"Content-Length: 272\0D\0A\00\00\00\00\00\00\00\00\00\00\00"
@.str.13 = [15 x i8] c"Contact: <sip:\00"
@__const.generateVoipInvitePacket.maxForward = [32 x i8] c"Max-Forwards: 70\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.allow = [128 x i8] c"Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, INFO\0D\0A\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i8* @generateVoipInvitePacket(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [8 x i8]
%14 = alloca [64 x i8]
%15 = alloca [16 x i8]
%16 = alloca [128 x i8]
%17 = alloca [128 x i8]
%18 = alloca [128 x i8]
%19 = alloca [64 x i8]
%20 = alloca [32 x i8]
%21 = alloca [64 x i8]
%22 = alloca [16 x i8]
%23 = alloca [32 x i8]
%24 = alloca [32 x i8]
%25 = alloca [32 x i8]
%26 = alloca [64 x i8]
%27 = alloca [32 x i8]
%28 = alloca [128 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%29 = call i64 @malloc(i32 1024)
%30 = inttoptr i64 %29 to i8*
store i8* %30, i8** %11
store i32 0, i32* %12
%31 = bitcast [8 x i8]* %13 to i8*
%32 = bitcast [64 x i8]* %14 to i8*
%33 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%34 = call i32 @strcat(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%36 = load i8*, i8** %8
%37 = call i32 @strcat(i8* %35, i8* %36)
%38 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%39 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%41 = load i8*, i8** %9
%42 = call i32 @strcat(i8* %40, i8* %41)
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%44 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%45 = bitcast [16 x i8]* %15 to i8*
%46 = bitcast [128 x i8]* %16 to i8*
%47 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%48 = call i32 @strcat(i8* %47, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%49 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%50 = load i8*, i8** %10
%51 = call i32 @strcat(i8* %49, i8* %50)
%52 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%53 = call i32 @strcat(i8* %52, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%54 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%55 = load i8*, i8** %10
%56 = call i32 @strcat(i8* %54, i8* %55)
%57 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%58 = call i32 @strcat(i8* %57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%59 = bitcast [128 x i8]* %17 to i8*
%60 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%61 = call i32 @strcat(i8* %60, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%62 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%63 = load i8*, i8** %6
%64 = call i32 @strcat(i8* %62, i8* %63)
%65 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%66 = call i32 @strcat(i8* %65, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%67 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%68 = load i8*, i8** %7
%69 = call i32 @strcat(i8* %67, i8* %68)
%70 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%71 = call i32 @strcat(i8* %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%72 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%73 = load i8*, i8** %9
%74 = call i32 @strcat(i8* %72, i8* %73)
%75 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%76 = call i32 @strcat(i8* %75, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%77 = bitcast [128 x i8]* %18 to i8*
%78 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%79 = call i32 @strcat(i8* %78, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%80 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%81 = load i8*, i8** %8
%82 = call i32 @strcat(i8* %80, i8* %81)
%83 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%84 = call i32 @strcat(i8* %83, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%85 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%86 = load i8*, i8** %9
%87 = call i32 @strcat(i8* %85, i8* %86)
%88 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%89 = call i32 @strcat(i8* %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%90 = bitcast [64 x i8]* %19 to i8*
%91 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%92 = call i32 @strcat(i8* %91, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%93 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%94 = call i32 @strcat(i8* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%95 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%96 = load i8*, i8** %10
%97 = call i32 @strcat(i8* %95, i8* %96)
%98 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%99 = call i32 @strcat(i8* %98, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%100 = bitcast [32 x i8]* %20 to i8*
%101 = bitcast [64 x i8]* %21 to i8*
%102 = bitcast [16 x i8]* %22 to i8*
%103 = bitcast [32 x i8]* %23 to i8*
%104 = bitcast [32 x i8]* %24 to i8*
%105 = bitcast [32 x i8]* %25 to i8*
%106 = bitcast [64 x i8]* %26 to i8*
%107 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%108 = call i32 @strcat(i8* %107, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%109 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%110 = load i8*, i8** %7
%111 = call i32 @strcat(i8* %109, i8* %110)
%112 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%113 = call i32 @strcat(i8* %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%114 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%115 = load i8*, i8** %10
%116 = call i32 @strcat(i8* %114, i8* %115)
%117 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%118 = call i32 @strcat(i8* %117, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%119 = bitcast [32 x i8]* %27 to i8*
%120 = bitcast [128 x i8]* %28 to i8*
%121 = load i8*, i8** %11
%122 = getelementptr inbounds [8 x i8], [8 x i8]* %13, i64 0, i64 0
%123 = call i32 @memcpy(i8* %121, i8* %122, i32 7)
%124 = load i32, i32* %12
%125 = add nsw i32 %124, 7
store i32 %125, i32* %12
%126 = load i8*, i8** %11
%127 = load i32, i32* %12
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %126, i64 %128
%130 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%131 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%132 = call i32 @strlen(i8* %131)
%133 = call i32 @memcpy(i8* %129, i8* %130, i32 %132)
%134 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%135 = call i32 @strlen(i8* %134)
%136 = load i32, i32* %12
%137 = add nsw i32 %136, %135
store i32 %137, i32* %12
%138 = load i8*, i8** %11
%139 = load i32, i32* %12
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %138, i64 %140
%142 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%143 = call i32 @memcpy(i8* %141, i8* %142, i32 9)
%144 = load i32, i32* %12
%145 = add nsw i32 %144, 9
store i32 %145, i32* %12
%146 = load i8*, i8** %11
%147 = load i32, i32* %12
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8, i8* %146, i64 %148
%150 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%151 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%152 = call i32 @strlen(i8* %151)
%153 = call i32 @memcpy(i8* %149, i8* %150, i32 %152)
%154 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%155 = call i32 @strlen(i8* %154)
%156 = load i32, i32* %12
%157 = add nsw i32 %156, %155
store i32 %157, i32* %12
%158 = load i8*, i8** %11
%159 = load i32, i32* %12
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
%162 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%163 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%164 = call i32 @strlen(i8* %163)
%165 = call i32 @memcpy(i8* %161, i8* %162, i32 %164)
%166 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%167 = call i32 @strlen(i8* %166)
%168 = load i32, i32* %12
%169 = add nsw i32 %168, %167
store i32 %169, i32* %12
%170 = load i8*, i8** %11
%171 = load i32, i32* %12
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i8, i8* %170, i64 %172
%174 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%175 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%176 = call i32 @strlen(i8* %175)
%177 = call i32 @memcpy(i8* %173, i8* %174, i32 %176)
%178 = getelementptr inbounds [128 x i8], [128 x i8]* %18, i64 0, i64 0
%179 = call i32 @strlen(i8* %178)
%180 = load i32, i32* %12
%181 = add nsw i32 %180, %179
store i32 %181, i32* %12
%182 = load i8*, i8** %11
%183 = load i32, i32* %12
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
%186 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%187 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%188 = call i32 @strlen(i8* %187)
%189 = call i32 @memcpy(i8* %185, i8* %186, i32 %188)
%190 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%191 = call i32 @strlen(i8* %190)
%192 = load i32, i32* %12
%193 = add nsw i32 %192, %191
store i32 %193, i32* %12
%194 = load i8*, i8** %11
%195 = load i32, i32* %12
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i8, i8* %194, i64 %196
%198 = getelementptr inbounds [32 x i8], [32 x i8]* %20, i64 0, i64 0
%199 = getelementptr inbounds [32 x i8], [32 x i8]* %20, i64 0, i64 0
%200 = call i32 @strlen(i8* %199)
%201 = call i32 @memcpy(i8* %197, i8* %198, i32 %200)
%202 = getelementptr inbounds [32 x i8], [32 x i8]* %20, i64 0, i64 0
%203 = call i32 @strlen(i8* %202)
%204 = load i32, i32* %12
%205 = add nsw i32 %204, %203
store i32 %205, i32* %12
%206 = load i8*, i8** %11
%207 = load i32, i32* %12
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i8, i8* %206, i64 %208
%210 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%211 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%212 = call i32 @strlen(i8* %211)
%213 = call i32 @memcpy(i8* %209, i8* %210, i32 %212)
%214 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%215 = call i32 @strlen(i8* %214)
%216 = load i32, i32* %12
%217 = add nsw i32 %216, %215
store i32 %217, i32* %12
%218 = load i8*, i8** %11
%219 = load i32, i32* %12
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8, i8* %218, i64 %220
%222 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%223 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%224 = call i32 @strlen(i8* %223)
%225 = call i32 @memcpy(i8* %221, i8* %222, i32 %224)
%226 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%227 = call i32 @strlen(i8* %226)
%228 = load i32, i32* %12
%229 = add nsw i32 %228, %227
store i32 %229, i32* %12
%230 = load i8*, i8** %11
%231 = load i32, i32* %12
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds i8, i8* %230, i64 %232
%234 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%235 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%236 = call i32 @strlen(i8* %235)
%237 = call i32 @memcpy(i8* %233, i8* %234, i32 %236)
%238 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%239 = call i32 @strlen(i8* %238)
%240 = load i32, i32* %12
%241 = add nsw i32 %240, %239
store i32 %241, i32* %12
%242 = load i8*, i8** %11
%243 = load i32, i32* %12
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i8, i8* %242, i64 %244
%246 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 0
%247 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 0
%248 = call i32 @strlen(i8* %247)
%249 = call i32 @memcpy(i8* %245, i8* %246, i32 %248)
%250 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 0
%251 = call i32 @strlen(i8* %250)
%252 = load i32, i32* %12
%253 = add nsw i32 %252, %251
store i32 %253, i32* %12
%254 = load i8*, i8** %11
%255 = load i32, i32* %12
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i8, i8* %254, i64 %256
%258 = getelementptr inbounds [32 x i8], [32 x i8]* %25, i64 0, i64 0
%259 = getelementptr inbounds [32 x i8], [32 x i8]* %25, i64 0, i64 0
%260 = call i32 @strlen(i8* %259)
%261 = call i32 @memcpy(i8* %257, i8* %258, i32 %260)
%262 = getelementptr inbounds [32 x i8], [32 x i8]* %25, i64 0, i64 0
%263 = call i32 @strlen(i8* %262)
%264 = load i32, i32* %12
%265 = add nsw i32 %264, %263
store i32 %265, i32* %12
%266 = load i8*, i8** %11
%267 = load i32, i32* %12
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds i8, i8* %266, i64 %268
%270 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%271 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%272 = call i32 @strlen(i8* %271)
%273 = call i32 @memcpy(i8* %269, i8* %270, i32 %272)
%274 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%275 = call i32 @strlen(i8* %274)
%276 = load i32, i32* %12
%277 = add nsw i32 %276, %275
store i32 %277, i32* %12
%278 = load i8*, i8** %11
%279 = load i32, i32* %12
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds i8, i8* %278, i64 %280
%282 = getelementptr inbounds [32 x i8], [32 x i8]* %27, i64 0, i64 0
%283 = getelementptr inbounds [32 x i8], [32 x i8]* %27, i64 0, i64 0
%284 = call i32 @strlen(i8* %283)
%285 = call i32 @memcpy(i8* %281, i8* %282, i32 %284)
%286 = getelementptr inbounds [32 x i8], [32 x i8]* %27, i64 0, i64 0
%287 = call i32 @strlen(i8* %286)
%288 = load i32, i32* %12
%289 = add nsw i32 %288, %287
store i32 %289, i32* %12
%290 = load i8*, i8** %11
%291 = load i32, i32* %12
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds i8, i8* %290, i64 %292
%294 = getelementptr inbounds [128 x i8], [128 x i8]* %28, i64 0, i64 0
%295 = getelementptr inbounds [128 x i8], [128 x i8]* %28, i64 0, i64 0
%296 = call i32 @strlen(i8* %295)
%297 = call i32 @memcpy(i8* %293, i8* %294, i32 %296)
%298 = getelementptr inbounds [128 x i8], [128 x i8]* %28, i64 0, i64 0
%299 = call i32 @strlen(i8* %298)
%300 = load i32, i32* %12
%301 = add nsw i32 %300, %299
store i32 %301, i32* %12
%302 = load i8*, i8** %11
%303 = load i32, i32* %12
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds i8, i8* %302, i64 %304
store i8 0, i8* %305
%306 = load i8*, i8** %11
ret i8* %306
}

LLVM IR (-O2):
@.str = [5 x i8] c"sip:\00"
@.str.1 = [2 x i8] c"@\00"
@.str.2 = [2 x i8] c" \00"
@__const.generateVoipInvitePacket.version = [16 x i8] c"SIP/2.0\0D\0A\00\00\00\00\00\00\00"
@.str.3 = [18 x i8] c"Via: SIP/2.0/UDP \00"
@.str.4 = [41 x i8] c":5060;branch=z9hG4bKnp104984053-44ce4a41\00"
@.str.5 = [9 x i8] c";rport\0D\0A\00"
@.str.6 = [8 x i8] c"From: \22\00"
@.str.7 = [8 x i8] c"\22 <sip:\00"
@.str.8 = [16 x i8] c">;tag=6433ef9\0D\0A\00"
@.str.9 = [10 x i8] c"To: <sip:\00"
@.str.10 = [4 x i8] c">\0D\0A\00"
@.str.11 = [28 x i8] c"Call-ID: 105090259-446faf7a\00"
@.str.12 = [3 x i8] c"\0D\0A\00"
@__const.generateVoipInvitePacket.cseq = [32 x i8] c"CSeq: 1 INVITE\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.userAgent = [64 x i8] c"User-Agent: Nero SIPPS IP Phone Version 2.0.51.16\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.expire = [16 x i8] c"Expires: 120\0D\0A\00\00"
@__const.generateVoipInvitePacket.accept = [32 x i8] c"Accept: application/sdp\0D\0A\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.contentType = [32 x i8] c"Content-Type: application/sdp\0D\0A\00"
@__const.generateVoipInvitePacket.contentLength = [32 x i8] c"Content-Length: 272\0D\0A\00\00\00\00\00\00\00\00\00\00\00"
@.str.13 = [15 x i8] c"Contact: <sip:\00"
@__const.generateVoipInvitePacket.maxForward = [32 x i8] c"Max-Forwards: 70\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.generateVoipInvitePacket.allow = [128 x i8] c"Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, INFO\0D\0A\0D\0A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i8* @generateVoipInvitePacket(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i64
%7 = alloca [64 x i8]
%8 = alloca [16 x i8]
%9 = alloca [128 x i8]
%10 = alloca [128 x i8]
%11 = alloca [128 x i8]
%12 = alloca [64 x i8]
%13 = alloca [32 x i8]
%14 = alloca [64 x i8]
%15 = alloca [16 x i8]
%16 = alloca [32 x i8]
%17 = alloca [32 x i8]
%18 = alloca [32 x i8]
%19 = alloca [64 x i8]
%20 = alloca [32 x i8]
%21 = alloca [128 x i8]
%22 = tail call i64 @malloc(i32 1024)
%23 = inttoptr i64 %22 to i8*
%24 = bitcast i64* %6 to i8*
store i64 9083427564703305, i64* %6
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%26 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%27 = call i32 @strcat(i8* %25, i8* %2)
%28 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 @strcat(i8* %25, i8* %3)
%30 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%31 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%33 = call i32 @strcat(i8* %32, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @strcat(i8* %32, i8* %4)
%35 = call i32 @strcat(i8* %32, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%36 = call i32 @strcat(i8* %32, i8* %4)
%37 = call i32 @strcat(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%38 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%39 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%40 = call i32 @strcat(i8* %38, i8* %0)
%41 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%42 = call i32 @strcat(i8* %38, i8* %1)
%43 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%44 = call i32 @strcat(i8* %38, i8* %3)
%45 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%46 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%47 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%48 = call i32 @strcat(i8* %46, i8* %2)
%49 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%50 = call i32 @strcat(i8* %46, i8* %3)
%51 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%52 = getelementptr inbounds [64 x i8], [64 x i8]* %12, i64 0, i64 0
%53 = call i32 @strcat(i8* %52, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%54 = call i32 @strcat(i8* %52, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%55 = call i32 @strcat(i8* %52, i8* %4)
%56 = call i32 @strcat(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%57 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%58 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%59 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%60 = getelementptr inbounds [32 x i8], [32 x i8]* %16, i64 0, i64 0
%61 = getelementptr inbounds [32 x i8], [32 x i8]* %17, i64 0, i64 0
%62 = getelementptr inbounds [32 x i8], [32 x i8]* %18, i64 0, i64 0
%63 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 0, i64 0
%64 = call i32 @strcat(i8* %63, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%65 = call i32 @strcat(i8* %63, i8* %1)
%66 = call i32 @strcat(i8* %63, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%67 = call i32 @strcat(i8* %63, i8* %4)
%68 = call i32 @strcat(i8* %63, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%69 = getelementptr inbounds [32 x i8], [32 x i8]* %20, i64 0, i64 0
%70 = getelementptr inbounds [128 x i8], [128 x i8]* %21, i64 0, i64 0
%71 = call i32 @memcpy(i8* %23, i8* %24, i32 7)
%72 = getelementptr inbounds i8, i8* %23, i64 7
%73 = call i32 @strlen(i8* %25)
%74 = call i32 @memcpy(i8* %72, i8* %25, i32 %73)
%75 = call i32 @strlen(i8* %25)
%76 = add nsw i32 %75, 7
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %23, i64 %77
%79 = call i32 @memcpy(i8* %78, i8* %31, i32 9)
%80 = add nsw i32 %75, 16
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %23, i64 %81
%83 = call i32 @strlen(i8* %32)
%84 = call i32 @memcpy(i8* %82, i8* %32, i32 %83)
%85 = call i32 @strlen(i8* %32)
%86 = add nsw i32 %85, %80
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %23, i64 %87
%89 = call i32 @strlen(i8* %38)
%90 = call i32 @memcpy(i8* %88, i8* %38, i32 %89)
%91 = call i32 @strlen(i8* %38)
%92 = add nsw i32 %91, %86
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8, i8* %23, i64 %93
%95 = call i32 @strlen(i8* %46)
%96 = call i32 @memcpy(i8* %94, i8* %46, i32 %95)
%97 = call i32 @strlen(i8* %46)
%98 = add nsw i32 %97, %92
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8, i8* %23, i64 %99
%101 = call i32 @strlen(i8* %52)
%102 = call i32 @memcpy(i8* %100, i8* %52, i32 %101)
%103 = call i32 @strlen(i8* %52)
%104 = add nsw i32 %103, %98
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %23, i64 %105
%107 = call i32 @strlen(i8* %57)
%108 = call i32 @memcpy(i8* %106, i8* %57, i32 %107)
%109 = call i32 @strlen(i8* %57)
%110 = add nsw i32 %109, %104
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i8, i8* %23, i64 %111
%113 = call i32 @strlen(i8* %58)
%114 = call i32 @memcpy(i8* %112, i8* %58, i32 %113)
%115 = call i32 @strlen(i8* %58)
%116 = add nsw i32 %115, %110
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i8, i8* %23, i64 %117
%119 = call i32 @strlen(i8* %59)
%120 = call i32 @memcpy(i8* %118, i8* %59, i32 %119)
%121 = call i32 @strlen(i8* %59)
%122 = add nsw i32 %121, %116
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %23, i64 %123
%125 = call i32 @strlen(i8* %60)
%126 = call i32 @memcpy(i8* %124, i8* %60, i32 %125)
%127 = call i32 @strlen(i8* %60)
%128 = add nsw i32 %127, %122
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i8, i8* %23, i64 %129
%131 = call i32 @strlen(i8* %61)
%132 = call i32 @memcpy(i8* %130, i8* %61, i32 %131)
%133 = call i32 @strlen(i8* %61)
%134 = add nsw i32 %133, %128
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8, i8* %23, i64 %135
%137 = call i32 @strlen(i8* %62)
%138 = call i32 @memcpy(i8* %136, i8* %62, i32 %137)
%139 = call i32 @strlen(i8* %62)
%140 = add nsw i32 %139, %134
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8, i8* %23, i64 %141
%143 = call i32 @strlen(i8* %63)
%144 = call i32 @memcpy(i8* %142, i8* %63, i32 %143)
%145 = call i32 @strlen(i8* %63)
%146 = add nsw i32 %145, %140
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %23, i64 %147
%149 = call i32 @strlen(i8* %69)
%150 = call i32 @memcpy(i8* %148, i8* %69, i32 %149)
%151 = call i32 @strlen(i8* %69)
%152 = add nsw i32 %151, %146
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i8, i8* %23, i64 %153
%155 = call i32 @strlen(i8* %70)
%156 = call i32 @memcpy(i8* %154, i8* %70, i32 %155)
%157 = call i32 @strlen(i8* %70)
%158 = add nsw i32 %157, %152
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i8, i8* %23, i64 %159
store i8 0, i8* %160
ret i8* %23
}