#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 mkSetfragRequest(unsigned char *out, char *faceid, char *frag, char *mtu,
                     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, "setfrag");
  len3 = ccnl_ccnb_mkHeader(faceinst, 80, 2);
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 73, 2, "setfrag");
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 74, 2, faceid);
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99005, 2, frag);
  len3 += ccnl_ccnb_mkStrBlob(faceinst + len3, 99010, 2, mtu);
  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):
<mkSetfragRequest>:
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)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1a,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
add    %rax,%rdi
mov    $0xe,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x30(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xe20(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x30(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x30(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xdfb(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x30(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30(%rbp)
lea    -0x1fe0(%rbp),%rdi
movslq -0x30(%rbp),%rax
add    %rax,%rdi
mov    $0xf,%esi
mov    $0x2,%edx
lea    0xdc3(%rip),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x30(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30(%rbp)
lea    -0x2f80(%rbp),%rdi
mov    $0x50,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
mov    %eax,-0x38(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    $0x49,%esi
mov    $0x2,%edx
lea    0xd79(%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
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4a,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rcx
mov    $0x182bd,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
lea    -0x2f80(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rcx
mov    $0x182c2,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rcx
movslq -0x38(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x38(%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,-0x34(%rbp)
lea    -0x27b0(%rbp),%rdi
movslq -0x34(%rbp),%rax
add    %rax,%rdi
lea    -0x2f80(%rbp),%rcx
mov    -0x38(%rbp),%r8d
mov    $0x13,%esi
mov    $0x2,%edx
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    %rax,%rcx
movslq -0x34(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movb   $0x0,-0x27b0(%rbp,%rax,1)
lea    -0x1fe0(%rbp),%rdi
movslq -0x30(%rbp),%rax
add    %rax,%rdi
lea    -0x27b0(%rbp),%rcx
mov    -0x34(%rbp),%r8d
mov    $0xf,%esi
mov    $0x2,%edx
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    %rax,%rcx
movslq -0x30(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     140b <mkSetfragRequest+0x2bb>
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rsi
lea    -0x1fe0(%rbp),%rdx
mov    -0x30(%rbp),%ecx
call   1030 <add_signature@plt>
mov    %rax,%rcx
movslq -0x2c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
add    %rax,%rdi
lea    -0x1fe0(%rbp),%rsi
mov    -0x30(%rbp),%edx
call   1060 <memcpy@plt>
mov    -0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x2c(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x2c(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x2f80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkSetfragRequest>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2f68,%rsp
mov    %r8,0x18(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1a,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%r12
mov    %rbx,(%rsp)
lea    (%rbx,%r12,1),%rdi
mov    $0xe,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
add    %eax,%r12d
lea    0xe57(%rip),%rcx
lea    0xfc0(%rsp),%rdi
mov    $0xf,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rbx
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rdi
add    $0xfc0,%rdi
lea    0xe34(%rip),%rcx
mov    $0xf,%esi
mov    $0x2,%edx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%rbp
add    %rbx,%rbp
movslq %ebp,%rax
lea    (%rsp,%rax,1),%rdi
add    $0xfc0,%rdi
lea    0xe03(%rip),%r15
mov    $0xf,%esi
mov    $0x2,%edx
mov    %r15,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %rax,%r13
add    %rbp,%r13
lea    0x20(%rsp),%rdi
mov    $0x50,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x20,%rdi
mov    $0x49,%esi
mov    $0x2,%edx
mov    %r15,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x20,%rdi
mov    $0x4a,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x20,%rdi
mov    $0x182bd,%esi
mov    $0x2,%edx
mov    0x8(%rsp),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
add    %eax,%ebp
movslq %ebp,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x20,%rdi
mov    $0x182c2,%esi
mov    $0x2,%edx
mov    0x10(%rsp),%rcx
call   1040 <ccnl_ccnb_mkStrBlob@plt>
mov    %ebp,%ecx
add    %eax,%ecx
add    %eax,%ebp
add    $0x1,%ebp
movslq %ecx,%rax
movb   $0x0,0x20(%rsp,%rax,1)
lea    0x7f0(%rsp),%r14
mov    %r14,%rdi
mov    $0x40,%esi
mov    $0x2,%edx
call   1070 <ccnl_ccnb_mkHeader@plt>
movslq %eax,%rbx
lea    (%rsp,%rbx,1),%rdi
add    $0x7f0,%rdi
mov    $0x13,%esi
mov    $0x2,%edx
lea    0x20(%rsp),%rcx
mov    %ebp,%r8d
call   1050 <ccnl_ccnb_mkBlob@plt>
lea    (%rbx,%rax,1),%ecx
lea    (%rbx,%rax,1),%r8d
add    $0x1,%r8d
movslq %ecx,%rax
movb   $0x0,0x7f0(%rsp,%rax,1)
movslq %r13d,%rbx
lea    0xfc0(%rsp,%rbx,1),%rdi
mov    $0xf,%esi
mov    $0x2,%edx
mov    %r14,%rcx
call   1050 <ccnl_ccnb_mkBlob@plt>
mov    0x18(%rsp),%rsi
add    %eax,%ebx
test   %rsi,%rsi
je     135a <mkSetfragRequest+0x20a>
movslq %r12d,%r12
mov    (%rsp),%r14
lea    (%r14,%r12,1),%rdi
lea    0xfc0(%rsp),%rdx
mov    %ebx,%ecx
call   1030 <add_signature@plt>
add    %eax,%r12d
jmp    135e <mkSetfragRequest+0x20e>
mov    (%rsp),%r14
movslq %r12d,%rbp
lea    (%r14,%rbp,1),%rdi
lea    0xfc0(%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    $0x2f68,%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"setfrag\00"
define i32 @mkSetfragRequest(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 i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [8096 x i8]
%16 = alloca [2000 x i8]
%17 = alloca [2000 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
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%18 = load i8*, i8** %6
%19 = call i32 @ccnl_ccnb_mkHeader(i8* %18, i32 26, i32 2)
store i32 %19, i32* %11
%20 = load i8*, i8** %6
%21 = load i32, i32* %11
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = call i32 @ccnl_ccnb_mkHeader(i8* %23, i32 14, i32 2)
%25 = load i32, i32* %11
%26 = add nsw i32 %25, %24
store i32 %26, i32* %11
%27 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%28 = load i32, i32* %12
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = call i64 @ccnl_ccnb_mkStrBlob(i8* %30, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%32 = load i32, i32* %12
%33 = sext i32 %32 to i64
%34 = add nsw i64 %33, %31
%35 = trunc i64 %34 to i32
store i32 %35, i32* %12
%36 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%37 = load i32, i32* %12
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = call i64 @ccnl_ccnb_mkStrBlob(i8* %39, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%41 = load i32, i32* %12
%42 = sext i32 %41 to i64
%43 = add nsw i64 %42, %40
%44 = trunc i64 %43 to i32
store i32 %44, i32* %12
%45 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%46 = load i32, i32* %12
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %45, i64 %47
%49 = call i64 @ccnl_ccnb_mkStrBlob(i8* %48, i32 15, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%50 = load i32, i32* %12
%51 = sext i32 %50 to i64
%52 = add nsw i64 %51, %49
%53 = trunc i64 %52 to i32
store i32 %53, i32* %12
%54 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%55 = call i32 @ccnl_ccnb_mkHeader(i8* %54, i32 80, i32 2)
store i32 %55, i32* %14
%56 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%57 = load i32, i32* %14
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %56, i64 %58
%60 = call i64 @ccnl_ccnb_mkStrBlob(i8* %59, i32 73, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%61 = load i32, i32* %14
%62 = sext i32 %61 to i64
%63 = add nsw i64 %62, %60
%64 = trunc i64 %63 to i32
store i32 %64, i32* %14
%65 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%66 = load i32, i32* %14
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %65, i64 %67
%69 = load i8*, i8** %7
%70 = call i64 @ccnl_ccnb_mkStrBlob(i8* %68, i32 74, i32 2, i8* %69)
%71 = load i32, i32* %14
%72 = sext i32 %71 to i64
%73 = add nsw i64 %72, %70
%74 = trunc i64 %73 to i32
store i32 %74, i32* %14
%75 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%76 = load i32, i32* %14
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %75, i64 %77
%79 = load i8*, i8** %8
%80 = call i64 @ccnl_ccnb_mkStrBlob(i8* %78, i32 99005, i32 2, i8* %79)
%81 = load i32, i32* %14
%82 = sext i32 %81 to i64
%83 = add nsw i64 %82, %80
%84 = trunc i64 %83 to i32
store i32 %84, i32* %14
%85 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%86 = load i32, i32* %14
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %85, i64 %87
%89 = load i8*, i8** %9
%90 = call i64 @ccnl_ccnb_mkStrBlob(i8* %88, i32 99010, i32 2, i8* %89)
%91 = load i32, i32* %14
%92 = sext i32 %91 to i64
%93 = add nsw i64 %92, %90
%94 = trunc i64 %93 to i32
store i32 %94, i32* %14
%95 = load i32, i32* %14
%96 = add nsw i32 %95, 1
store i32 %96, i32* %14
%97 = sext i32 %95 to i64
%98 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 %97
store i8 0, i8* %98
%99 = getelementptr inbounds [2000 x i8], [2000 x i8]* %16, i64 0, i64 0
%100 = call i32 @ccnl_ccnb_mkHeader(i8* %99, i32 64, i32 2)
store i32 %100, i32* %13
%101 = getelementptr inbounds [2000 x i8], [2000 x i8]* %16, i64 0, i64 0
%102 = load i32, i32* %13
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* %101, i64 %103
%105 = getelementptr inbounds [2000 x i8], [2000 x i8]* %17, i64 0, i64 0
%106 = load i32, i32* %14
%107 = call i64 @ccnl_ccnb_mkBlob(i8* %104, i32 19, i32 2, i8* %105, i32 %106)
%108 = load i32, i32* %13
%109 = sext i32 %108 to i64
%110 = add nsw i64 %109, %107
%111 = trunc i64 %110 to i32
store i32 %111, i32* %13
%112 = load i32, i32* %13
%113 = add nsw i32 %112, 1
store i32 %113, i32* %13
%114 = sext i32 %112 to i64
%115 = getelementptr inbounds [2000 x i8], [2000 x i8]* %16, i64 0, i64 %114
store i8 0, i8* %115
%116 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%117 = load i32, i32* %12
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
%120 = getelementptr inbounds [2000 x i8], [2000 x i8]* %16, i64 0, i64 0
%121 = load i32, i32* %13
%122 = call i64 @ccnl_ccnb_mkBlob(i8* %119, i32 15, i32 2, i8* %120, i32 %121)
%123 = load i32, i32* %12
%124 = sext i32 %123 to i64
%125 = add nsw i64 %124, %122
%126 = trunc i64 %125 to i32
store i32 %126, i32* %12
%127 = load i8*, i8** %10
%128 = icmp ne i8* %127, null
br i1 %128, label %129, label %142
129: ; preds = %5
%130 = load i8*, i8** %6
%131 = load i32, i32* %11
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %130, i64 %132
%134 = load i8*, i8** %10
%135 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%136 = load i32, i32* %12
%137 = call i64 @add_signature(i8* %133, i8* %134, i8* %135, i32 %136)
%138 = load i32, i32* %11
%139 = sext i32 %138 to i64
%140 = add nsw i64 %139, %137
%141 = trunc i64 %140 to i32
store i32 %141, i32* %11
br label %142
142: ; preds = %129, %5
%143 = load i8*, i8** %6
%144 = load i32, i32* %11
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i8, i8* %143, i64 %145
%147 = getelementptr inbounds [8096 x i8], [8096 x i8]* %15, i64 0, i64 0
%148 = load i32, i32* %12
%149 = call i32 @memcpy(i8* %146, i8* %147, i32 %148)
%150 = load i32, i32* %12
%151 = load i32, i32* %11
%152 = add nsw i32 %151, %150
store i32 %152, i32* %11
%153 = load i8*, i8** %6
%154 = load i32, i32* %11
%155 = add nsw i32 %154, 1
store i32 %155, i32* %11
%156 = sext i32 %154 to i64
%157 = getelementptr inbounds i8, i8* %153, i64 %156
store i8 0, i8* %157
%158 = load i8*, i8** %6
%159 = load i32, i32* %11
%160 = add nsw i32 %159, 1
store i32 %160, i32* %11
%161 = sext i32 %159 to i64
%162 = getelementptr inbounds i8, i8* %158, i64 %161
store i8 0, i8* %162
%163 = load i32, i32* %11
ret i32 %163
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccnx\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [8 x i8] c"setfrag\00"
define i32 @mkSetfragRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [8096 x i8]
%7 = alloca [2000 x i8]
%8 = alloca [2000 x i8]
%9 = getelementptr inbounds [8096 x i8], [8096 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [2000 x i8], [2000 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 0
%12 = tail call i32 @ccnl_ccnb_mkHeader(i8* %0, i32 26, i32 2)
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = tail call i32 @ccnl_ccnb_mkHeader(i8* %14, i32 14, i32 2)
%16 = add nsw i32 %15, %12
%17 = call i64 @ccnl_ccnb_mkStrBlob(i8* %9, i32 15, i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%18 = shl i64 %17, 32
%19 = ashr exact i64 %18, 32
%20 = getelementptr inbounds [8096 x i8], [8096 x i8]* %6, i64 0, i64 %19
%21 = call i64 @ccnl_ccnb_mkStrBlob(i8* %20, i32 15, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%22 = add i64 %21, %17
%23 = shl i64 %22, 32
%24 = ashr exact i64 %23, 32
%25 = getelementptr inbounds [8096 x i8], [8096 x i8]* %6, i64 0, i64 %24
%26 = call i64 @ccnl_ccnb_mkStrBlob(i8* %25, i32 15, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%27 = add i64 %22, %26
%28 = call i32 @ccnl_ccnb_mkHeader(i8* %11, i32 80, i32 2)
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 %29
%31 = call i64 @ccnl_ccnb_mkStrBlob(i8* %30, i32 73, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%32 = trunc i64 %31 to i32
%33 = add i32 %28, %32
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 %34
%36 = call i64 @ccnl_ccnb_mkStrBlob(i8* %35, i32 74, i32 2, i8* %1)
%37 = trunc i64 %36 to i32
%38 = add i32 %33, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 %39
%41 = call i64 @ccnl_ccnb_mkStrBlob(i8* %40, i32 99005, i32 2, i8* %2)
%42 = trunc i64 %41 to i32
%43 = add i32 %38, %42
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 %44
%46 = call i64 @ccnl_ccnb_mkStrBlob(i8* %45, i32 99010, i32 2, i8* %3)
%47 = trunc i64 %46 to i32
%48 = add i32 %43, %47
%49 = add nsw i32 %48, 1
%50 = sext i32 %48 to i64
%51 = getelementptr inbounds [2000 x i8], [2000 x i8]* %8, i64 0, i64 %50
store i8 0, i8* %51
%52 = call i32 @ccnl_ccnb_mkHeader(i8* %10, i32 64, i32 2)
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [2000 x i8], [2000 x i8]* %7, i64 0, i64 %53
%55 = call i64 @ccnl_ccnb_mkBlob(i8* %54, i32 19, i32 2, i8* %11, i32 %49)
%56 = trunc i64 %55 to i32
%57 = add i32 %52, %56
%58 = add nsw i32 %57, 1
%59 = sext i32 %57 to i64
%60 = getelementptr inbounds [2000 x i8], [2000 x i8]* %7, i64 0, i64 %59
store i8 0, i8* %60
%61 = shl i64 %27, 32
%62 = ashr exact i64 %61, 32
%63 = getelementptr inbounds [8096 x i8], [8096 x i8]* %6, i64 0, i64 %62
%64 = call i64 @ccnl_ccnb_mkBlob(i8* %63, i32 15, i32 2, i8* %10, i32 %58)
%65 = add i64 %64, %27
%66 = trunc i64 %65 to i32
%67 = icmp eq i8* %4, null
br i1 %67, label %74, label %68
68: ; preds = %5
%69 = sext i32 %16 to i64
%70 = getelementptr inbounds i8, i8* %0, i64 %69
%71 = call i64 @add_signature(i8* %70, i8* %4, i8* %9, i32 %66)
%72 = trunc i64 %71 to i32
%73 = add i32 %16, %72
br label %74
74: ; preds = %68, %5
%75 = phi i32 [ %73, %68 ], [ %16, %5 ]
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %0, i64 %76
%78 = call i32 @memcpy(i8* %77, i8* %9, i32 %66)
%79 = add nsw i32 %75, %66
%80 = add nsw i32 %79, 1
%81 = sext i32 %79 to i64
%82 = getelementptr inbounds i8, i8* %0, i64 %81
store i8 0, i8* %82
%83 = add nsw i32 %79, 2
%84 = sext i32 %80 to i64
%85 = getelementptr inbounds i8, i8* %0, i64 %84
store i8 0, i8* %85
ret i32 %83
}