#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 mkNewUDPDevRequest(unsigned char *out, char *ip4src, char *ip6src,
                       char *port, char *frag, 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, "newdev");
  len3 = ccnl_ccnb_mkHeader(faceinst, 99007, 2);
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 73, 2, "newdev");
  if (ip4src)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99002, 2, ip4src);
  if (ip6src)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99003, 2, ip6src);
  if (port)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 77, 2, port);
  if (frag)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99005, 2, frag);
  if (flags)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99009, 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):
<mkNewUDPDevRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f80,%rsp
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    0xe18(%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    0xdbb(%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    $0x182bf,%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    0xd71(%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     12df <mkNewUDPDevRequest+0x18f>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%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)
cmpq   $0x0,-0x18(%rbp)
je     1318 <mkNewUDPDevRequest+0x1c8>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%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)
cmpq   $0x0,-0x20(%rbp)
je     1351 <mkNewUDPDevRequest+0x201>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%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,-0x28(%rbp)
je     138a <mkNewUDPDevRequest+0x23a>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rcx
mov    $0x182bd,%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     13c3 <mkNewUDPDevRequest+0x273>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rcx
mov    $0x182c1,%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,0x10(%rbp)
je     14a6 <mkNewUDPDevRequest+0x356>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    0x10(%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):
<mkNewUDPDevRequest>:
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,0x18(%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    0xe2c(%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,0x10(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x182bf,%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 <mkNewUDPDevRequest+0x129>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182ba,%esi
mov    $0x2,%edx
mov    %r13,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
test   %r14,%r14
je     129e <mkNewUDPDevRequest+0x14e>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182bb,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x18(%rsp),%rcx
test   %rcx,%rcx
je     12c5 <mkNewUDPDevRequest+0x175>
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    0x20(%rsp),%rcx
test   %rcx,%rcx
je     12ec <mkNewUDPDevRequest+0x19c>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182bd,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r12d
mov    0x2fb0(%rsp),%r13
add    0x10(%rsp),%rbx
mov    0x28(%rsp),%rcx
test   %rcx,%rcx
je     1320 <mkNewUDPDevRequest+0x1d0>
movslq %r12d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x182c1,%esi
mov    $0x2,%edx
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     13ce <mkNewUDPDevRequest+0x27e>
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    13d3 <mkNewUDPDevRequest+0x283>
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 = [7 x i8] c"newdev\00"
define i32 @mkNewUDPDevRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca [8096 x i8]
%20 = alloca [2000 x i8]
%21 = alloca [2000 x i8]
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
%22 = load i8*, i8** %8
%23 = call i32 @ccnl_ccnb_mkHeader(i8* %22, i32 26, i32 2)
store i32 %23, i32* %15
%24 = load i8*, i8** %8
%25 = load i32, i32* %15
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = call i32 @ccnl_ccnb_mkHeader(i8* %27, i32 14, i32 2)
%29 = load i32, i32* %15
%30 = add nsw i32 %29, %28
store i32 %30, i32* %15
%31 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%32 = load i32, i32* %16
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %31, i64 %33
%35 = call i64 @ccnl_ccnb_mkStrBlob(i8* %34, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%36 = load i32, i32* %16
%37 = sext i32 %36 to i64
%38 = add nsw i64 %37, %35
%39 = trunc i64 %38 to i32
store i32 %39, i32* %16
%40 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%41 = load i32, i32* %16
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %40, i64 %42
%44 = call i64 @ccnl_ccnb_mkStrBlob(i8* %43, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%45 = load i32, i32* %16
%46 = sext i32 %45 to i64
%47 = add nsw i64 %46, %44
%48 = trunc i64 %47 to i32
store i32 %48, i32* %16
%49 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%50 = load i32, i32* %16
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = call i64 @ccnl_ccnb_mkStrBlob(i8* %52, i32 15, i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%54 = load i32, i32* %16
%55 = sext i32 %54 to i64
%56 = add nsw i64 %55, %53
%57 = trunc i64 %56 to i32
store i32 %57, i32* %16
%58 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%59 = call i32 @ccnl_ccnb_mkHeader(i8* %58, i32 99007, i32 2)
store i32 %59, i32* %18
%60 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%61 = load i32, i32* %18
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = call i64 @ccnl_ccnb_mkStrBlob(i8* %63, i32 73, i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%65 = load i32, i32* %18
%66 = sext i32 %65 to i64
%67 = add nsw i64 %66, %64
%68 = trunc i64 %67 to i32
store i32 %68, i32* %18
%69 = load i8*, i8** %9
%70 = icmp ne i8* %69, null
br i1 %70, label %71, label %82
71: ; preds = %7
%72 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%73 = load i32, i32* %18
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = load i8*, i8** %9
%77 = call i64 @ccnl_ccnb_mkStrBlob(i8* %75, i32 99002, i32 2, i8* %76)
%78 = load i32, i32* %18
%79 = sext i32 %78 to i64
%80 = add nsw i64 %79, %77
%81 = trunc i64 %80 to i32
store i32 %81, i32* %18
br label %82
82: ; preds = %71, %7
%83 = load i8*, i8** %10
%84 = icmp ne i8* %83, null
br i1 %84, label %85, label %96
85: ; preds = %82
%86 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%87 = load i32, i32* %18
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
%90 = load i8*, i8** %10
%91 = call i64 @ccnl_ccnb_mkStrBlob(i8* %89, i32 99003, i32 2, i8* %90)
%92 = load i32, i32* %18
%93 = sext i32 %92 to i64
%94 = add nsw i64 %93, %91
%95 = trunc i64 %94 to i32
store i32 %95, i32* %18
br label %96
96: ; preds = %85, %82
%97 = load i8*, i8** %11
%98 = icmp ne i8* %97, null
br i1 %98, label %99, label %110
99: ; preds = %96
%100 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%101 = load i32, i32* %18
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8, i8* %100, i64 %102
%104 = load i8*, i8** %11
%105 = call i64 @ccnl_ccnb_mkStrBlob(i8* %103, i32 77, i32 2, i8* %104)
%106 = load i32, i32* %18
%107 = sext i32 %106 to i64
%108 = add nsw i64 %107, %105
%109 = trunc i64 %108 to i32
store i32 %109, i32* %18
br label %110
110: ; preds = %99, %96
%111 = load i8*, i8** %12
%112 = icmp ne i8* %111, null
br i1 %112, label %113, label %124
113: ; preds = %110
%114 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%115 = load i32, i32* %18
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %114, i64 %116
%118 = load i8*, i8** %12
%119 = call i64 @ccnl_ccnb_mkStrBlob(i8* %117, i32 99005, i32 2, i8* %118)
%120 = load i32, i32* %18
%121 = sext i32 %120 to i64
%122 = add nsw i64 %121, %119
%123 = trunc i64 %122 to i32
store i32 %123, i32* %18
br label %124
124: ; preds = %113, %110
%125 = load i8*, i8** %13
%126 = icmp ne i8* %125, null
br i1 %126, label %127, label %138
127: ; preds = %124
%128 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%129 = load i32, i32* %18
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %128, i64 %130
%132 = load i8*, i8** %13
%133 = call i64 @ccnl_ccnb_mkStrBlob(i8* %131, i32 99009, i32 2, i8* %132)
%134 = load i32, i32* %18
%135 = sext i32 %134 to i64
%136 = add nsw i64 %135, %133
%137 = trunc i64 %136 to i32
store i32 %137, i32* %18
br label %138
138: ; preds = %127, %124
%139 = load i32, i32* %18
%140 = add nsw i32 %139, 1
store i32 %140, i32* %18
%141 = sext i32 %139 to i64
%142 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 %141
store i8 0, i8* %142
%143 = getelementptr inbounds [2000 x i8], [2000 x i8]* %20, i64 0, i64 0
%144 = call i32 @ccnl_ccnb_mkHeader(i8* %143, i32 64, i32 2)
store i32 %144, i32* %17
%145 = getelementptr inbounds [2000 x i8], [2000 x i8]* %20, i64 0, i64 0
%146 = load i32, i32* %17
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %145, i64 %147
%149 = getelementptr inbounds [2000 x i8], [2000 x i8]* %21, i64 0, i64 0
%150 = load i32, i32* %18
%151 = call i64 @ccnl_ccnb_mkBlob(i8* %148, i32 19, i32 2, i8* %149, i32 %150)
%152 = load i32, i32* %17
%153 = sext i32 %152 to i64
%154 = add nsw i64 %153, %151
%155 = trunc i64 %154 to i32
store i32 %155, i32* %17
%156 = load i32, i32* %17
%157 = add nsw i32 %156, 1
store i32 %157, i32* %17
%158 = sext i32 %156 to i64
%159 = getelementptr inbounds [2000 x i8], [2000 x i8]* %20, i64 0, i64 %158
store i8 0, i8* %159
%160 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%161 = load i32, i32* %16
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %160, i64 %162
%164 = getelementptr inbounds [2000 x i8], [2000 x i8]* %20, i64 0, i64 0
%165 = load i32, i32* %17
%166 = call i64 @ccnl_ccnb_mkBlob(i8* %163, i32 15, i32 2, i8* %164, i32 %165)
%167 = load i32, i32* %16
%168 = sext i32 %167 to i64
%169 = add nsw i64 %168, %166
%170 = trunc i64 %169 to i32
store i32 %170, i32* %16
%171 = load i8*, i8** %14
%172 = icmp ne i8* %171, null
br i1 %172, label %173, label %186
173: ; preds = %138
%174 = load i8*, i8** %8
%175 = load i32, i32* %15
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
%178 = load i8*, i8** %14
%179 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%180 = load i32, i32* %16
%181 = call i64 @add_signature(i8* %177, i8* %178, i8* %179, i32 %180)
%182 = load i32, i32* %15
%183 = sext i32 %182 to i64
%184 = add nsw i64 %183, %181
%185 = trunc i64 %184 to i32
store i32 %185, i32* %15
br label %186
186: ; preds = %173, %138
%187 = load i8*, i8** %8
%188 = load i32, i32* %15
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i8, i8* %187, i64 %189
%191 = getelementptr inbounds [8096 x i8], [8096 x i8]* %19, i64 0, i64 0
%192 = load i32, i32* %16
%193 = call i32 @memcpy(i8* %190, i8* %191, i32 %192)
%194 = load i32, i32* %16
%195 = load i32, i32* %15
%196 = add nsw i32 %195, %194
store i32 %196, i32* %15
%197 = load i8*, i8** %8
%198 = load i32, i32* %15
%199 = add nsw i32 %198, 1
store i32 %199, i32* %15
%200 = sext i32 %198 to i64
%201 = getelementptr inbounds i8, i8* %197, i64 %200
store i8 0, i8* %201
%202 = load i8*, i8** %8
%203 = load i32, i32* %15
%204 = add nsw i32 %203, 1
store i32 %204, i32* %15
%205 = sext i32 %203 to i64
%206 = getelementptr inbounds i8, i8* %202, i64 %205
store i8 0, i8* %206
%207 = load i32, i32* %15
ret i32 %207
}

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