#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 */

/* Variables and functions */
scalar_t__ add_signature(unsigned char *, char *, unsigned char *, int);
scalar_t__ ccnl_ccnb_mkBlob(unsigned char *, int, int, char *, int);
int ccnl_ccnb_mkHeader(unsigned char *, int, int);
scalar_t__ ccnl_ccnb_mkStrBlob(unsigned char *, int, int, char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
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;
}


x86 assembly (clang, -O0):
<mkNewFaceRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f80,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1a,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    $0xe,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xe14(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xdf2(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xdb7(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
lea    -0x2f80(%rbp),%rdi
mov    $0x50,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,-0x40(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    $0x49,%esi
mov    $0x2,%edx
lea    0xd6d(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     12e3 <mkNewFaceRequest+0x193>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rcx
mov    $0x182b9,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     134d <mkNewFaceRequest+0x1fd>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rcx
mov    $0x182ba,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    $0x4b,%esi
mov    $0x2,%edx
lea    0xcd2(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     13b7 <mkNewFaceRequest+0x267>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rcx
mov    $0x182bb,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    $0x4b,%esi
mov    $0x2,%edx
lea    0xc68(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     13f0 <mkNewFaceRequest+0x2a0>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rcx
mov    $0x4c,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1429 <mkNewFaceRequest+0x2d9>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rcx
mov    $0x4d,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,0x10(%rbp)
je     1462 <mkNewFaceRequest+0x312>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    0x10(%rbp),%rcx
mov    $0x182be,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x40(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x40(%rbp)
cltq
movb   $0x0,-0x2f80(%rbp,%rax,1)
lea    -0x27b0(%rbp),%rdi
mov    $0x40,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,-0x3c(%rbp)
lea    -0x27b0(%rbp),%rdi
movslq -0x3c(%rbp),%rax
add    %rax,%rdi
lea    -0x2f80(%rbp),%rcx
mov    -0x40(%rbp),%r8d
mov    $0x13,%esi
mov    $0x2,%edx
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    %rax,%rcx
movslq -0x3c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x3c(%rbp)
cltq
movb   $0x0,-0x27b0(%rbp,%rax,1)
lea    -0x1fe0(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    -0x27b0(%rbp),%rcx
mov    -0x3c(%rbp),%r8d
mov    $0xf,%esi
mov    $0x2,%edx
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
cmpq   $0x0,0x18(%rbp)
je     1545 <mkNewFaceRequest+0x3f5>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    0x18(%rbp),%rsi
lea    -0x1fe0(%rbp),%rdx
mov    -0x38(%rbp),%ecx
call   1030 <add_signature@plt>
mov    %rax,%rcx
movslq -0x34(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
lea    -0x1fe0(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1060 <memcpy@plt>
mov    -0x38(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x34(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x34(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x2f80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkNewFaceRequest>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2f78,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x20(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x1a,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,0x4(%rsp)
movslq %eax,%rdi
mov    %rbx,0x8(%rsp)
add    %rbx,%rdi
mov    $0xe,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,%r15d
lea    0xe50(%rip),%rcx
lea    0xfd0(%rsp),%rdi
mov    $0xf,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rbp
movslq %ebp,%rax
lea    (%rsp,%rax,1),%rdi
add    $0xfd0,%rdi
lea    0xe30(%rip),%rcx
mov    $0xf,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rbx
add    %rbp,%rbx
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rdi
add    $0xfd0,%rdi
lea    0xdfc(%rip),%rbp
mov    $0xf,%esi
mov    $0x2,%edx
mov    %rbp,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,0x18(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x50,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x49,%esi
mov    $0x2,%edx
mov    %rbp,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
test   %r13,%r13
je     1279 <mkNewFaceRequest+0x129>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182b9,%esi
mov    $0x2,%edx
mov    %r13,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
test   %r14,%r14
je     12c1 <mkNewFaceRequest+0x171>
movslq %r12d,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x30,%rdi
mov    $0x182ba,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%ebp
movslq %ebp,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
lea    0xd5e(%rip),%rcx
mov    $0x4b,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x10(%rsp),%rcx
test   %rcx,%rcx
je     130b <mkNewFaceRequest+0x1bb>
movslq %r12d,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x30,%rdi
mov    $0x182bb,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%ebp
movslq %ebp,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
lea    0xd14(%rip),%rcx
mov    $0x4b,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x20(%rsp),%rcx
test   %rcx,%rcx
je     1332 <mkNewFaceRequest+0x1e2>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x4c,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x2fb0(%rsp),%rbp
mov    0x28(%rsp),%rcx
test   %rcx,%rcx
je     1361 <mkNewFaceRequest+0x211>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x4d,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x2fb8(%rsp),%r13
add    0x18(%rsp),%rbx
test   %rbp,%rbp
je     1393 <mkNewFaceRequest+0x243>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182be,%esi
mov    $0x2,%edx
mov    %rbp,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
add    0x4(%rsp),%r15d
movslq %r12d,%rax
add    $0x1,%r12d
movb   $0x0,0x30(%rsp,%rax,1)
lea    0x800(%rsp),%r14
mov    %r14,%rdi
mov    $0x40,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x800,%rdi
lea    0x30(%rsp),%rcx
mov    $0x13,%esi
mov    $0x2,%edx
mov    %r12d,%r8d
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    %ebp,%ecx
add    %eax,%ecx
lea    (%rax,%rbp,1),%r8d
add    $0x1,%r8d
movslq %ecx,%rax
movb   $0x0,0x800(%rsp,%rax,1)
movslq %ebx,%rbx
lea    0xfd0(%rsp,%rbx,1),%rdi
mov    $0xf,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1050 <ccnl_ccnb_mkBlob@plt>
add    %eax,%ebx
test   %r13,%r13
je     1441 <mkNewFaceRequest+0x2f1>
movslq %r15d,%r15
mov    0x8(%rsp),%r14
lea    (%r14,%r15,1),%rdi
lea    0xfd0(%rsp),%rdx
mov    %r13,%rsi
mov    %ebx,%ecx
call   1030 <add_signature@plt>
add    %eax,%r15d
jmp    1446 <mkNewFaceRequest+0x2f6>
mov    0x8(%rsp),%r14
movslq %r15d,%rbp
lea    (%r14,%rbp,1),%rdi
lea    0xfd0(%rsp),%rsi
mov    %ebx,%edx
call   1060 <memcpy@plt>
lea    (%rbx,%rbp,1),%eax
cltq
movw   $0x0,(%r14,%rax,1)
lea    (%rbx,%rbp,1),%eax
add    $0x2,%eax
add    $0x2f78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ccnx\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [8 x i8] c"newface\00"
@.str.3 = [3 x i8] c"17\00"
define i32 @mkNewFaceRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca [8096 x i8]
%22 = alloca [2000 x i8]
%23 = alloca [2000 x i8]
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
%24 = load i8*, i8** %9
%25 = call i32 @ccnl_ccnb_mkHeader(i8* %24, i32 26, i32 2)
store i32 %25, i32* %17
%26 = load i8*, i8** %9
%27 = load i32, i32* %17
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = call i32 @ccnl_ccnb_mkHeader(i8* %29, i32 14, i32 2)
%31 = load i32, i32* %17
%32 = add nsw i32 %31, %30
store i32 %32, i32* %17
%33 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%34 = load i32, i32* %18
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = call i64 @ccnl_ccnb_mkStrBlob(i8* %36, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%38 = load i32, i32* %18
%39 = sext i32 %38 to i64
%40 = add nsw i64 %39, %37
%41 = trunc i64 %40 to i32
store i32 %41, i32* %18
%42 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = call i64 @ccnl_ccnb_mkStrBlob(i8* %45, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%47 = load i32, i32* %18
%48 = sext i32 %47 to i64
%49 = add nsw i64 %48, %46
%50 = trunc i64 %49 to i32
store i32 %50, i32* %18
%51 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%52 = load i32, i32* %18
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = call i64 @ccnl_ccnb_mkStrBlob(i8* %54, i32 15, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%56 = load i32, i32* %18
%57 = sext i32 %56 to i64
%58 = add nsw i64 %57, %55
%59 = trunc i64 %58 to i32
store i32 %59, i32* %18
%60 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%61 = call i32 @ccnl_ccnb_mkHeader(i8* %60, i32 80, i32 2)
store i32 %61, i32* %20
%62 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%63 = load i32, i32* %20
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %62, i64 %64
%66 = call i64 @ccnl_ccnb_mkStrBlob(i8* %65, i32 73, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%67 = load i32, i32* %20
%68 = sext i32 %67 to i64
%69 = add nsw i64 %68, %66
%70 = trunc i64 %69 to i32
store i32 %70, i32* %20
%71 = load i8*, i8** %10
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %84
73: ; preds = %8
%74 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%75 = load i32, i32* %20
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %74, i64 %76
%78 = load i8*, i8** %10
%79 = call i64 @ccnl_ccnb_mkStrBlob(i8* %77, i32 99001, i32 2, i8* %78)
%80 = load i32, i32* %20
%81 = sext i32 %80 to i64
%82 = add nsw i64 %81, %79
%83 = trunc i64 %82 to i32
store i32 %83, i32* %20
br label %84
84: ; preds = %73, %8
%85 = load i8*, i8** %11
%86 = icmp ne i8* %85, null
br i1 %86, label %87, label %107
87: ; preds = %84
%88 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%89 = load i32, i32* %20
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8*, i8** %11
%93 = call i64 @ccnl_ccnb_mkStrBlob(i8* %91, i32 99002, i32 2, i8* %92)
%94 = load i32, i32* %20
%95 = sext i32 %94 to i64
%96 = add nsw i64 %95, %93
%97 = trunc i64 %96 to i32
store i32 %97, i32* %20
%98 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%99 = load i32, i32* %20
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %98, i64 %100
%102 = call i64 @ccnl_ccnb_mkStrBlob(i8* %101, i32 75, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%103 = load i32, i32* %20
%104 = sext i32 %103 to i64
%105 = add nsw i64 %104, %102
%106 = trunc i64 %105 to i32
store i32 %106, i32* %20
br label %107
107: ; preds = %87, %84
%108 = load i8*, i8** %12
%109 = icmp ne i8* %108, null
br i1 %109, label %110, label %130
110: ; preds = %107
%111 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%112 = load i32, i32* %20
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %111, i64 %113
%115 = load i8*, i8** %12
%116 = call i64 @ccnl_ccnb_mkStrBlob(i8* %114, i32 99003, i32 2, i8* %115)
%117 = load i32, i32* %20
%118 = sext i32 %117 to i64
%119 = add nsw i64 %118, %116
%120 = trunc i64 %119 to i32
store i32 %120, i32* %20
%121 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%122 = load i32, i32* %20
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %121, i64 %123
%125 = call i64 @ccnl_ccnb_mkStrBlob(i8* %124, i32 75, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%126 = load i32, i32* %20
%127 = sext i32 %126 to i64
%128 = add nsw i64 %127, %125
%129 = trunc i64 %128 to i32
store i32 %129, i32* %20
br label %130
130: ; preds = %110, %107
%131 = load i8*, i8** %13
%132 = icmp ne i8* %131, null
br i1 %132, label %133, label %144
133: ; preds = %130
%134 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%135 = load i32, i32* %20
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %134, i64 %136
%138 = load i8*, i8** %13
%139 = call i64 @ccnl_ccnb_mkStrBlob(i8* %137, i32 76, i32 2, i8* %138)
%140 = load i32, i32* %20
%141 = sext i32 %140 to i64
%142 = add nsw i64 %141, %139
%143 = trunc i64 %142 to i32
store i32 %143, i32* %20
br label %144
144: ; preds = %133, %130
%145 = load i8*, i8** %14
%146 = icmp ne i8* %145, null
br i1 %146, label %147, label %158
147: ; preds = %144
%148 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%149 = load i32, i32* %20
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8, i8* %148, i64 %150
%152 = load i8*, i8** %14
%153 = call i64 @ccnl_ccnb_mkStrBlob(i8* %151, i32 77, i32 2, i8* %152)
%154 = load i32, i32* %20
%155 = sext i32 %154 to i64
%156 = add nsw i64 %155, %153
%157 = trunc i64 %156 to i32
store i32 %157, i32* %20
br label %158
158: ; preds = %147, %144
%159 = load i8*, i8** %15
%160 = icmp ne i8* %159, null
br i1 %160, label %161, label %172
161: ; preds = %158
%162 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%163 = load i32, i32* %20
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i8, i8* %162, i64 %164
%166 = load i8*, i8** %15
%167 = call i64 @ccnl_ccnb_mkStrBlob(i8* %165, i32 99006, i32 2, i8* %166)
%168 = load i32, i32* %20
%169 = sext i32 %168 to i64
%170 = add nsw i64 %169, %167
%171 = trunc i64 %170 to i32
store i32 %171, i32* %20
br label %172
172: ; preds = %161, %158
%173 = load i32, i32* %20
%174 = add nsw i32 %173, 1
store i32 %174, i32* %20
%175 = sext i32 %173 to i64
%176 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 %175
store i8 0, i8* %176
%177 = getelementptr inbounds [2000 x i8], [2000 x i8]* %22, i64 0, i64 0
%178 = call i32 @ccnl_ccnb_mkHeader(i8* %177, i32 64, i32 2)
store i32 %178, i32* %19
%179 = getelementptr inbounds [2000 x i8], [2000 x i8]* %22, i64 0, i64 0
%180 = load i32, i32* %19
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i8, i8* %179, i64 %181
%183 = getelementptr inbounds [2000 x i8], [2000 x i8]* %23, i64 0, i64 0
%184 = load i32, i32* %20
%185 = call i64 @ccnl_ccnb_mkBlob(i8* %182, i32 19, i32 2, i8* %183, i32 %184)
%186 = load i32, i32* %19
%187 = sext i32 %186 to i64
%188 = add nsw i64 %187, %185
%189 = trunc i64 %188 to i32
store i32 %189, i32* %19
%190 = load i32, i32* %19
%191 = add nsw i32 %190, 1
store i32 %191, i32* %19
%192 = sext i32 %190 to i64
%193 = getelementptr inbounds [2000 x i8], [2000 x i8]* %22, i64 0, i64 %192
store i8 0, i8* %193
%194 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%195 = load i32, i32* %18
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i8, i8* %194, i64 %196
%198 = getelementptr inbounds [2000 x i8], [2000 x i8]* %22, i64 0, i64 0
%199 = load i32, i32* %19
%200 = call i64 @ccnl_ccnb_mkBlob(i8* %197, i32 15, i32 2, i8* %198, i32 %199)
%201 = load i32, i32* %18
%202 = sext i32 %201 to i64
%203 = add nsw i64 %202, %200
%204 = trunc i64 %203 to i32
store i32 %204, i32* %18
%205 = load i8*, i8** %16
%206 = icmp ne i8* %205, null
br i1 %206, label %207, label %220
207: ; preds = %172
%208 = load i8*, i8** %9
%209 = load i32, i32* %17
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i8, i8* %208, i64 %210
%212 = load i8*, i8** %16
%213 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%214 = load i32, i32* %18
%215 = call i64 @add_signature(i8* %211, i8* %212, i8* %213, i32 %214)
%216 = load i32, i32* %17
%217 = sext i32 %216 to i64
%218 = add nsw i64 %217, %215
%219 = trunc i64 %218 to i32
store i32 %219, i32* %17
br label %220
220: ; preds = %207, %172
%221 = load i8*, i8** %9
%222 = load i32, i32* %17
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds i8, i8* %221, i64 %223
%225 = getelementptr inbounds [8096 x i8], [8096 x i8]* %21, i64 0, i64 0
%226 = load i32, i32* %18
%227 = call i32 @memcpy(i8* %224, i8* %225, i32 %226)
%228 = load i32, i32* %18
%229 = load i32, i32* %17
%230 = add nsw i32 %229, %228
store i32 %230, i32* %17
%231 = load i8*, i8** %9
%232 = load i32, i32* %17
%233 = add nsw i32 %232, 1
store i32 %233, i32* %17
%234 = sext i32 %232 to i64
%235 = getelementptr inbounds i8, i8* %231, i64 %234
store i8 0, i8* %235
%236 = load i8*, i8** %9
%237 = load i32, i32* %17
%238 = add nsw i32 %237, 1
store i32 %238, i32* %17
%239 = sext i32 %237 to i64
%240 = getelementptr inbounds i8, i8* %236, i64 %239
store i8 0, i8* %240
%241 = load i32, i32* %17
ret i32 %241
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccnx\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [8 x i8] c"newface\00"
@.str.3 = [3 x i8] c"17\00"
define i32 @mkNewFaceRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca [8096 x i8]
%10 = alloca [2000 x i8]
%11 = alloca [2000 x i8]
%12 = getelementptr inbounds [8096 x i8], [8096 x i8]* %9, i64 0, i64 0
%13 = getelementptr inbounds [2000 x i8], [2000 x i8]* %10, i64 0, i64 0
%14 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 0
%15 = tail call i32 @ccnl_ccnb_mkHeader(i8* %0, i32 26, i32 2)
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %0, i64 %16
%18 = tail call i32 @ccnl_ccnb_mkHeader(i8* %17, i32 14, i32 2)
%19 = add nsw i32 %18, %15
%20 = call i64 @ccnl_ccnb_mkStrBlob(i8* %12, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%21 = shl i64 %20, 32
%22 = ashr exact i64 %21, 32
%23 = getelementptr inbounds [8096 x i8], [8096 x i8]* %9, i64 0, i64 %22
%24 = call i64 @ccnl_ccnb_mkStrBlob(i8* %23, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%25 = add i64 %24, %20
%26 = shl i64 %25, 32
%27 = ashr exact i64 %26, 32
%28 = getelementptr inbounds [8096 x i8], [8096 x i8]* %9, i64 0, i64 %27
%29 = call i64 @ccnl_ccnb_mkStrBlob(i8* %28, i32 15, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%30 = add i64 %25, %29
%31 = call i32 @ccnl_ccnb_mkHeader(i8* %14, i32 80, i32 2)
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %32
%34 = call i64 @ccnl_ccnb_mkStrBlob(i8* %33, i32 73, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%35 = trunc i64 %34 to i32
%36 = add i32 %31, %35
%37 = icmp eq i8* %1, null
br i1 %37, label %44, label %38
38: ; preds = %8
%39 = sext i32 %36 to i64
%40 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %39
%41 = call i64 @ccnl_ccnb_mkStrBlob(i8* %40, i32 99001, i32 2, i8* %1)
%42 = trunc i64 %41 to i32
%43 = add i32 %36, %42
br label %44
44: ; preds = %38, %8
%45 = phi i32 [ %43, %38 ], [ %36, %8 ]
%46 = icmp eq i8* %2, null
br i1 %46, label %58, label %47
47: ; preds = %44
%48 = sext i32 %45 to i64
%49 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %48
%50 = call i64 @ccnl_ccnb_mkStrBlob(i8* %49, i32 99002, i32 2, i8* %2)
%51 = trunc i64 %50 to i32
%52 = add i32 %45, %51
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %53
%55 = call i64 @ccnl_ccnb_mkStrBlob(i8* %54, i32 75, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%56 = trunc i64 %55 to i32
%57 = add i32 %52, %56
br label %58
58: ; preds = %47, %44
%59 = phi i32 [ %57, %47 ], [ %45, %44 ]
%60 = icmp eq i8* %3, null
br i1 %60, label %72, label %61
61: ; preds = %58
%62 = sext i32 %59 to i64
%63 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %62
%64 = call i64 @ccnl_ccnb_mkStrBlob(i8* %63, i32 99003, i32 2, i8* %3)
%65 = trunc i64 %64 to i32
%66 = add i32 %59, %65
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %67
%69 = call i64 @ccnl_ccnb_mkStrBlob(i8* %68, i32 75, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%70 = trunc i64 %69 to i32
%71 = add i32 %66, %70
br label %72
72: ; preds = %61, %58
%73 = phi i32 [ %71, %61 ], [ %59, %58 ]
%74 = icmp eq i8* %4, null
br i1 %74, label %81, label %75
75: ; preds = %72
%76 = sext i32 %73 to i64
%77 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %76
%78 = call i64 @ccnl_ccnb_mkStrBlob(i8* %77, i32 76, i32 2, i8* %4)
%79 = trunc i64 %78 to i32
%80 = add i32 %73, %79
br label %81
81: ; preds = %75, %72
%82 = phi i32 [ %80, %75 ], [ %73, %72 ]
%83 = icmp eq i8* %5, null
br i1 %83, label %90, label %84
84: ; preds = %81
%85 = sext i32 %82 to i64
%86 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %85
%87 = call i64 @ccnl_ccnb_mkStrBlob(i8* %86, i32 77, i32 2, i8* %5)
%88 = trunc i64 %87 to i32
%89 = add i32 %82, %88
br label %90
90: ; preds = %84, %81
%91 = phi i32 [ %89, %84 ], [ %82, %81 ]
%92 = icmp eq i8* %6, null
br i1 %92, label %99, label %93
93: ; preds = %90
%94 = sext i32 %91 to i64
%95 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %94
%96 = call i64 @ccnl_ccnb_mkStrBlob(i8* %95, i32 99006, i32 2, i8* %6)
%97 = trunc i64 %96 to i32
%98 = add i32 %91, %97
br label %99
99: ; preds = %93, %90
%100 = phi i32 [ %98, %93 ], [ %91, %90 ]
%101 = add nsw i32 %100, 1
%102 = sext i32 %100 to i64
%103 = getelementptr inbounds [2000 x i8], [2000 x i8]* %11, i64 0, i64 %102
store i8 0, i8* %103
%104 = call i32 @ccnl_ccnb_mkHeader(i8* %13, i32 64, i32 2)
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [2000 x i8], [2000 x i8]* %10, i64 0, i64 %105
%107 = call i64 @ccnl_ccnb_mkBlob(i8* %106, i32 19, i32 2, i8* %14, i32 %101)
%108 = trunc i64 %107 to i32
%109 = add i32 %104, %108
%110 = add nsw i32 %109, 1
%111 = sext i32 %109 to i64
%112 = getelementptr inbounds [2000 x i8], [2000 x i8]* %10, i64 0, i64 %111
store i8 0, i8* %112
%113 = shl i64 %30, 32
%114 = ashr exact i64 %113, 32
%115 = getelementptr inbounds [8096 x i8], [8096 x i8]* %9, i64 0, i64 %114
%116 = call i64 @ccnl_ccnb_mkBlob(i8* %115, i32 15, i32 2, i8* %13, i32 %110)
%117 = add i64 %116, %30
%118 = trunc i64 %117 to i32
%119 = icmp eq i8* %7, null
br i1 %119, label %126, label %120
120: ; preds = %99
%121 = sext i32 %19 to i64
%122 = getelementptr inbounds i8, i8* %0, i64 %121
%123 = call i64 @add_signature(i8* %122, i8* %7, i8* %12, i32 %118)
%124 = trunc i64 %123 to i32
%125 = add i32 %19, %124
br label %126
126: ; preds = %120, %99
%127 = phi i32 [ %125, %120 ], [ %19, %99 ]
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %0, i64 %128
%130 = call i32 @memcpy(i8* %129, i8* %12, i32 %118)
%131 = add nsw i32 %127, %118
%132 = add nsw i32 %131, 1
%133 = sext i32 %131 to i64
%134 = getelementptr inbounds i8, i8* %0, i64 %133
store i8 0, i8* %134
%135 = add nsw i32 %131, 2
%136 = sext i32 %132 to i64
%137 = getelementptr inbounds i8, i8* %0, i64 %136
store i8 0, i8* %137
ret i32 %135
}