#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 mkNewEthDevRequest(unsigned char *out, char *devname, char *ethtype,
                       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 (devname)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99008, 2, devname);
  if (ethtype)
    len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 77, 2, ethtype);
  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):
<mkNewEthDevRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f80,%rsp
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    0xe1c(%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    0xdf6(%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    0xdbf(%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    0xd75(%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     12db <mkNewEthDevRequest+0x18b>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rcx
mov    $0x182c0,%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     1314 <mkNewEthDevRequest+0x1c4>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%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,-0x20(%rbp)
je     134d <mkNewEthDevRequest+0x1fd>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%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,-0x28(%rbp)
je     1386 <mkNewEthDevRequest+0x236>
lea    -0x2f80(%rbp),%rdi
movslq -0x40(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%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,-0x30(%rbp)
je     1469 <mkNewEthDevRequest+0x319>
mov    -0x8(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
mov    -0x30(%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):
<mkNewEthDevRequest>:
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,0x10(%rsp)
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x1a,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,0x4(%rsp)
movslq %eax,%rdi
add    %r15,%rdi
mov    $0xe,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,%r12d
lea    0xe53(%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    0xe2f(%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    0xdff(%rip),%rbp
mov    $0xf,%esi
mov    $0x2,%edx
mov    %rbp,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,0x8(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x182bf,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%r13
lea    (%rsp,%r13,1),%rdi
add    $0x30,%rdi
mov    $0x49,%esi
mov    $0x2,%edx
mov    %rbp,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r13d
test   %r14,%r14
je     1276 <mkNewEthDevRequest+0x126>
movslq %r13d,%r13
lea    (%rsp,%r13,1),%rdi
add    $0x30,%rdi
mov    $0x182c0,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r13d
mov    0x10(%rsp),%rcx
test   %rcx,%rcx
je     129d <mkNewEthDevRequest+0x14d>
movslq %r13d,%r13
lea    (%rsp,%r13,1),%rdi
add    $0x30,%rdi
mov    $0x4d,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r13d
mov    0x18(%rsp),%rcx
test   %rcx,%rcx
je     12c4 <mkNewEthDevRequest+0x174>
movslq %r13d,%r13
lea    (%rsp,%r13,1),%rdi
add    $0x30,%rdi
mov    $0x182bd,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r13d
add    0x8(%rsp),%rbx
mov    0x20(%rsp),%rcx
test   %rcx,%rcx
je     12f0 <mkNewEthDevRequest+0x1a0>
movslq %r13d,%r13
lea    (%rsp,%r13,1),%rdi
add    $0x30,%rdi
mov    $0x182c1,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%r13d
add    0x4(%rsp),%r12d
movslq %r13d,%rax
add    $0x1,%r13d
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    %r13d,%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
mov    0x28(%rsp),%rsi
test   %rsi,%rsi
je     1399 <mkNewEthDevRequest+0x249>
movslq %r12d,%r12
lea    (%r15,%r12,1),%rdi
lea    0xfd0(%rsp),%rdx
mov    %ebx,%ecx
call   1030 <add_signature@plt>
add    %eax,%r12d
movslq %r12d,%rbp
lea    (%r15,%rbp,1),%rdi
lea    0xfd0(%rsp),%rsi
mov    %ebx,%edx
call   1060 <memcpy@plt>
lea    (%rbx,%rbp,1),%eax
cltq
movw   $0x0,(%r15,%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 @mkNewEthDevRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [8096 x i8]
%18 = alloca [2000 x i8]
%19 = alloca [2000 x i8]
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
%20 = load i8*, i8** %7
%21 = call i32 @ccnl_ccnb_mkHeader(i8* %20, i32 26, i32 2)
store i32 %21, i32* %13
%22 = load i8*, i8** %7
%23 = load i32, i32* %13
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = call i32 @ccnl_ccnb_mkHeader(i8* %25, i32 14, i32 2)
%27 = load i32, i32* %13
%28 = add nsw i32 %27, %26
store i32 %28, i32* %13
%29 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%30 = load i32, i32* %14
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = call i64 @ccnl_ccnb_mkStrBlob(i8* %32, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%34 = load i32, i32* %14
%35 = sext i32 %34 to i64
%36 = add nsw i64 %35, %33
%37 = trunc i64 %36 to i32
store i32 %37, i32* %14
%38 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%39 = load i32, i32* %14
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %38, i64 %40
%42 = call i64 @ccnl_ccnb_mkStrBlob(i8* %41, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%43 = load i32, i32* %14
%44 = sext i32 %43 to i64
%45 = add nsw i64 %44, %42
%46 = trunc i64 %45 to i32
store i32 %46, i32* %14
%47 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%48 = load i32, i32* %14
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %47, i64 %49
%51 = call i64 @ccnl_ccnb_mkStrBlob(i8* %50, i32 15, i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%52 = load i32, i32* %14
%53 = sext i32 %52 to i64
%54 = add nsw i64 %53, %51
%55 = trunc i64 %54 to i32
store i32 %55, i32* %14
%56 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%57 = call i32 @ccnl_ccnb_mkHeader(i8* %56, i32 99007, i32 2)
store i32 %57, i32* %16
%58 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%59 = load i32, i32* %16
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %58, i64 %60
%62 = call i64 @ccnl_ccnb_mkStrBlob(i8* %61, i32 73, i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%63 = load i32, i32* %16
%64 = sext i32 %63 to i64
%65 = add nsw i64 %64, %62
%66 = trunc i64 %65 to i32
store i32 %66, i32* %16
%67 = load i8*, i8** %8
%68 = icmp ne i8* %67, null
br i1 %68, label %69, label %80
69: ; preds = %6
%70 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%71 = load i32, i32* %16
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %70, i64 %72
%74 = load i8*, i8** %8
%75 = call i64 @ccnl_ccnb_mkStrBlob(i8* %73, i32 99008, i32 2, i8* %74)
%76 = load i32, i32* %16
%77 = sext i32 %76 to i64
%78 = add nsw i64 %77, %75
%79 = trunc i64 %78 to i32
store i32 %79, i32* %16
br label %80
80: ; preds = %69, %6
%81 = load i8*, i8** %9
%82 = icmp ne i8* %81, null
br i1 %82, label %83, label %94
83: ; preds = %80
%84 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%85 = load i32, i32* %16
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %84, i64 %86
%88 = load i8*, i8** %9
%89 = call i64 @ccnl_ccnb_mkStrBlob(i8* %87, i32 77, i32 2, i8* %88)
%90 = load i32, i32* %16
%91 = sext i32 %90 to i64
%92 = add nsw i64 %91, %89
%93 = trunc i64 %92 to i32
store i32 %93, i32* %16
br label %94
94: ; preds = %83, %80
%95 = load i8*, i8** %10
%96 = icmp ne i8* %95, null
br i1 %96, label %97, label %108
97: ; preds = %94
%98 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%99 = load i32, i32* %16
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %98, i64 %100
%102 = load i8*, i8** %10
%103 = call i64 @ccnl_ccnb_mkStrBlob(i8* %101, i32 99005, i32 2, i8* %102)
%104 = load i32, i32* %16
%105 = sext i32 %104 to i64
%106 = add nsw i64 %105, %103
%107 = trunc i64 %106 to i32
store i32 %107, i32* %16
br label %108
108: ; preds = %97, %94
%109 = load i8*, i8** %11
%110 = icmp ne i8* %109, null
br i1 %110, label %111, label %122
111: ; preds = %108
%112 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%113 = load i32, i32* %16
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8, i8* %112, i64 %114
%116 = load i8*, i8** %11
%117 = call i64 @ccnl_ccnb_mkStrBlob(i8* %115, i32 99009, i32 2, i8* %116)
%118 = load i32, i32* %16
%119 = sext i32 %118 to i64
%120 = add nsw i64 %119, %117
%121 = trunc i64 %120 to i32
store i32 %121, i32* %16
br label %122
122: ; preds = %111, %108
%123 = load i32, i32* %16
%124 = add nsw i32 %123, 1
store i32 %124, i32* %16
%125 = sext i32 %123 to i64
%126 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 %125
store i8 0, i8* %126
%127 = getelementptr inbounds [2000 x i8], [2000 x i8]* %18, i64 0, i64 0
%128 = call i32 @ccnl_ccnb_mkHeader(i8* %127, i32 64, i32 2)
store i32 %128, i32* %15
%129 = getelementptr inbounds [2000 x i8], [2000 x i8]* %18, i64 0, i64 0
%130 = load i32, i32* %15
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i8, i8* %129, i64 %131
%133 = getelementptr inbounds [2000 x i8], [2000 x i8]* %19, i64 0, i64 0
%134 = load i32, i32* %16
%135 = call i64 @ccnl_ccnb_mkBlob(i8* %132, i32 19, i32 2, i8* %133, i32 %134)
%136 = load i32, i32* %15
%137 = sext i32 %136 to i64
%138 = add nsw i64 %137, %135
%139 = trunc i64 %138 to i32
store i32 %139, i32* %15
%140 = load i32, i32* %15
%141 = add nsw i32 %140, 1
store i32 %141, i32* %15
%142 = sext i32 %140 to i64
%143 = getelementptr inbounds [2000 x i8], [2000 x i8]* %18, i64 0, i64 %142
store i8 0, i8* %143
%144 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%145 = load i32, i32* %14
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8, i8* %144, i64 %146
%148 = getelementptr inbounds [2000 x i8], [2000 x i8]* %18, i64 0, i64 0
%149 = load i32, i32* %15
%150 = call i64 @ccnl_ccnb_mkBlob(i8* %147, i32 15, i32 2, i8* %148, i32 %149)
%151 = load i32, i32* %14
%152 = sext i32 %151 to i64
%153 = add nsw i64 %152, %150
%154 = trunc i64 %153 to i32
store i32 %154, i32* %14
%155 = load i8*, i8** %12
%156 = icmp ne i8* %155, null
br i1 %156, label %157, label %170
157: ; preds = %122
%158 = load i8*, i8** %7
%159 = load i32, i32* %13
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
%162 = load i8*, i8** %12
%163 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%164 = load i32, i32* %14
%165 = call i64 @add_signature(i8* %161, i8* %162, i8* %163, i32 %164)
%166 = load i32, i32* %13
%167 = sext i32 %166 to i64
%168 = add nsw i64 %167, %165
%169 = trunc i64 %168 to i32
store i32 %169, i32* %13
br label %170
170: ; preds = %157, %122
%171 = load i8*, i8** %7
%172 = load i32, i32* %13
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i8, i8* %171, i64 %173
%175 = getelementptr inbounds [8096 x i8], [8096 x i8]* %17, i64 0, i64 0
%176 = load i32, i32* %14
%177 = call i32 @memcpy(i8* %174, i8* %175, i32 %176)
%178 = load i32, i32* %14
%179 = load i32, i32* %13
%180 = add nsw i32 %179, %178
store i32 %180, i32* %13
%181 = load i8*, i8** %7
%182 = load i32, i32* %13
%183 = add nsw i32 %182, 1
store i32 %183, i32* %13
%184 = sext i32 %182 to i64
%185 = getelementptr inbounds i8, i8* %181, i64 %184
store i8 0, i8* %185
%186 = load i8*, i8** %7
%187 = load i32, i32* %13
%188 = add nsw i32 %187, 1
store i32 %188, i32* %13
%189 = sext i32 %187 to i64
%190 = getelementptr inbounds i8, i8* %186, i64 %189
store i8 0, i8* %190
%191 = load i32, i32* %13
ret i32 %191
}

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