#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 */
struct ccnl_prefix_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ccnl_hmac256_sign(unsigned char *, int, unsigned char *, int,
                                     unsigned char *, int *);
scalar_t__ ccnl_ndntlv_prependBlob(int, unsigned char *, int, int *,
                                   unsigned char *);
scalar_t__ ccnl_ndntlv_prependIncludedNonNegInt(int, unsigned int, int, int *,
                                                unsigned char *);
scalar_t__ ccnl_ndntlv_prependName(struct ccnl_prefix_s *, int *,
                                   unsigned char *);
scalar_t__ ccnl_ndntlv_prependTL(int, int, int *, unsigned char *);
int ccnl_ndntlv_prependSignedContent(struct ccnl_prefix_s *name,
                                     unsigned char *payload, int paylen,
                                     unsigned int *final_block_id,
                                     int *contentpos, unsigned char *keyval,
                                     unsigned char *keydigest, int *offset,
                                     unsigned char *buf) {
  int oldoffset = *offset, oldoffset2, mdoffset, endofsign, mdlength = 32;
  unsigned char signatureType[1] = {0x04};
  if (contentpos)
    *contentpos = *offset - paylen;
  *offset -= mdlength;
  mdoffset = *offset;
  if (ccnl_ndntlv_prependTL(0x17, mdlength, offset, buf) < 0)
    return -1;
  endofsign = *offset;
  if (ccnl_ndntlv_prependBlob(0x1b, signatureType, 1, offset, buf) < 0)
    return 1;
  if (ccnl_ndntlv_prependTL(0x16, endofsign - *offset, offset, buf) < 0)
    return -1;
  if (ccnl_ndntlv_prependBlob(0x15, payload, paylen, offset, buf) < 0)
    return -1;
  oldoffset2 = *offset;
  if (final_block_id) {
    if (ccnl_ndntlv_prependIncludedNonNegInt(0x08, *final_block_id, 0x00,
                                             offset, buf) < 0)
      return -1;
    if (ccnl_ndntlv_prependTL(0x1a, oldoffset2 - *offset, offset, buf) < 0)
      return -1;
  }
  if (ccnl_ndntlv_prependTL(0x14, oldoffset2 - *offset, offset, buf) < 0)
    return -1;
  if (ccnl_ndntlv_prependName(name, offset, buf))
    return -1;
  if (ccnl_ndntlv_prependTL(0x06, oldoffset - *offset, offset, buf) < 0)
    return -1;
  if (contentpos)
    *contentpos -= *offset;
  ccnl_hmac256_sign(keyval, 64, buf + *offset, endofsign - *offset,
                    buf + mdoffset, &mdlength);
  return oldoffset - *offset;
}


x86 assembly (clang, -O0):
<ccnl_ndntlv_prependSignedContent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x20,-0x4c(%rbp)
mov    0xe6f(%rip),%al
mov    %al,-0x4d(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     11ae <ccnl_ndntlv_prependSignedContent+0x5e>
mov    0x18(%rbp),%rax
mov    (%rax),%ecx
sub    -0x1c(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%edx
mov    0x18(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x4c(%rbp),%esi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    $0x17,%edi
call   1050 <ccnl_ndntlv_prependTL@plt>
cmp    $0x0,%rax
jge    11ef <ccnl_ndntlv_prependSignedContent+0x9f>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
lea    -0x4d(%rbp),%rsi
mov    0x18(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    $0x1b,%edi
mov    $0x1,%edx
call   1040 <ccnl_ndntlv_prependBlob@plt>
cmp    $0x0,%rax
jge    1229 <ccnl_ndntlv_prependSignedContent+0xd9>
movl   $0x1,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    -0x48(%rbp),%esi
mov    0x18(%rbp),%rax
sub    (%rax),%esi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    $0x16,%edi
call   1050 <ccnl_ndntlv_prependTL@plt>
cmp    $0x0,%rax
jge    125a <ccnl_ndntlv_prependSignedContent+0x10a>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    0x18(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    $0x15,%edi
call   1040 <ccnl_ndntlv_prependBlob@plt>
cmp    $0x0,%rax
jge    1289 <ccnl_ndntlv_prependSignedContent+0x139>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1303 <ccnl_ndntlv_prependSignedContent+0x1b3>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
mov    0x18(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    $0x8,%edi
xor    %edx,%edx
call   1030 <ccnl_ndntlv_prependIncludedNonNegInt@plt>
cmp    $0x0,%rax
jge    12cd <ccnl_ndntlv_prependSignedContent+0x17d>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    -0x40(%rbp),%esi
mov    0x18(%rbp),%rax
sub    (%rax),%esi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    $0x1a,%edi
call   1050 <ccnl_ndntlv_prependTL@plt>
cmp    $0x0,%rax
jge    12fe <ccnl_ndntlv_prependSignedContent+0x1ae>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
jmp    1303 <ccnl_ndntlv_prependSignedContent+0x1b3>
mov    -0x40(%rbp),%esi
mov    0x18(%rbp),%rax
sub    (%rax),%esi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    $0x14,%edi
call   1050 <ccnl_ndntlv_prependTL@plt>
cmp    $0x0,%rax
jge    1334 <ccnl_ndntlv_prependSignedContent+0x1e4>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    -0x10(%rbp),%rdi
mov    0x18(%rbp),%rsi
mov    0x20(%rbp),%rdx
call   1060 <ccnl_ndntlv_prependName@plt>
cmp    $0x0,%rax
je     135b <ccnl_ndntlv_prependSignedContent+0x20b>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
mov    -0x3c(%rbp),%esi
mov    0x18(%rbp),%rax
sub    (%rax),%esi
mov    0x18(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    $0x6,%edi
call   1050 <ccnl_ndntlv_prependTL@plt>
cmp    $0x0,%rax
jge    138c <ccnl_ndntlv_prependSignedContent+0x23c>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <ccnl_ndntlv_prependSignedContent+0x297>
cmpq   $0x0,-0x30(%rbp)
je     13a7 <ccnl_ndntlv_prependSignedContent+0x257>
mov    0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x38(%rbp),%rdi
mov    0x20(%rbp),%rdx
mov    0x18(%rbp),%rax
movslq (%rax),%rax
add    %rax,%rdx
mov    -0x48(%rbp),%ecx
mov    0x18(%rbp),%rax
sub    (%rax),%ecx
mov    0x20(%rbp),%r8
movslq -0x44(%rbp),%rax
add    %rax,%r8
mov    $0x40,%esi
lea    -0x4c(%rbp),%r9
call   1070 <ccnl_hmac256_sign@plt>
mov    -0x3c(%rbp),%eax
mov    0x18(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_ndntlv_prependSignedContent>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%rbx
mov    %rcx,0x28(%rsp)
mov    %edx,%r13d
mov    %rsi,0x30(%rsp)
mov    %rdi,0x20(%rsp)
mov    0x80(%rsp),%r15
mov    0x78(%rsp),%r12
mov    (%r12),%ebp
movl   $0x20,0xc(%rsp)
movb   $0x4,0x7(%rsp)
mov    %ebp,%r14d
test   %r8,%r8
je     11a5 <ccnl_ndntlv_prependSignedContent+0x55>
mov    %ebp,%eax
sub    %r13d,%eax
mov    %eax,(%r8)
mov    (%r12),%r14d
mov    %r8,0x18(%rsp)
add    $0xffffffe0,%r14d
mov    %r14d,(%r12)
mov    $0x17,%edi
mov    $0x20,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1050 <ccnl_ndntlv_prependTL@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    %rbx,0x10(%rsp)
mov    %ebp,0x8(%rsp)
mov    (%r12),%ebp
lea    0x7(%rsp),%rsi
mov    %r15,%rbx
mov    $0x1,%r15d
mov    $0x1b,%edi
mov    $0x1,%edx
mov    %r12,%rcx
mov    %rbx,%r8
call   1040 <ccnl_ndntlv_prependBlob@plt>
test   %rax,%rax
js     12dd <ccnl_ndntlv_prependSignedContent+0x18d>
mov    %ebp,%esi
sub    (%r12),%esi
mov    $0x16,%edi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1050 <ccnl_ndntlv_prependTL@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    $0x15,%edi
mov    0x30(%rsp),%rsi
mov    %r13d,%edx
mov    %r12,%rcx
mov    %rbx,%r8
call   1040 <ccnl_ndntlv_prependBlob@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    %ebp,%r13d
mov    (%r12),%ebp
mov    %ebp,%eax
mov    0x28(%rsp),%rcx
test   %rcx,%rcx
mov    0x8(%rsp),%r15d
je     12a1 <ccnl_ndntlv_prependSignedContent+0x151>
mov    (%rcx),%esi
mov    $0x8,%edi
xor    %edx,%edx
mov    %r12,%rcx
mov    0x80(%rsp),%rbx
mov    %rbx,%r8
call   1030 <ccnl_ndntlv_prependIncludedNonNegInt@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    %ebp,%esi
sub    (%r12),%esi
mov    $0x1a,%edi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1050 <ccnl_ndntlv_prependTL@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    (%r12),%eax
sub    %eax,%ebp
mov    $0x14,%edi
mov    %ebp,%esi
mov    %r12,%rdx
mov    0x80(%rsp),%rbx
mov    %rbx,%rcx
call   1050 <ccnl_ndntlv_prependTL@plt>
test   %rax,%rax
js     12d7 <ccnl_ndntlv_prependSignedContent+0x187>
mov    0x20(%rsp),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1060 <ccnl_ndntlv_prependName@plt>
test   %rax,%rax
je     12ef <ccnl_ndntlv_prependSignedContent+0x19f>
mov    $0xffffffff,%r15d
mov    %r15d,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15d,%esi
sub    (%r12),%esi
mov    $0x6,%edi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1050 <ccnl_ndntlv_prependTL@plt>
mov    $0xffffffff,%r15d
test   %rax,%rax
js     12dd <ccnl_ndntlv_prependSignedContent+0x18d>
mov    %r13d,%ecx
mov    0x18(%rsp),%rdx
test   %rdx,%rdx
je     1324 <ccnl_ndntlv_prependSignedContent+0x1d4>
mov    (%r12),%eax
sub    %eax,(%rdx)
movslq (%r12),%rdx
sub    %edx,%ecx
mov    0x80(%rsp),%r13
add    %r13,%rdx
movslq %r14d,%r8
add    %r13,%r8
lea    0xc(%rsp),%r9
mov    0x10(%rsp),%rdi
mov    $0x40,%esi
call   1070 <ccnl_hmac256_sign@plt>
mov    0x8(%rsp),%r15d
sub    (%r12),%r15d
jmp    12dd <ccnl_ndntlv_prependSignedContent+0x18d>

LLVM IR (-O0):
%struct.ccnl_prefix_s = type { i32 }
@__const.ccnl_ndntlv_prependSignedContent.signatureType = [1 x i8] c"\04"
define i32 @ccnl_ndntlv_prependSignedContent(%struct.ccnl_prefix_s* %0, i8* %1, i32 %2, i32* %3, i32* %4, i8* %5, i8* %6, i32* %7, i8* %8) {
%10 = alloca i32
%11 = alloca %struct.ccnl_prefix_s*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32*
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca [1 x i8]
store %struct.ccnl_prefix_s* %0, %struct.ccnl_prefix_s** %11
store i8* %1, i8** %12
store i32 %2, i32* %13
store i32* %3, i32** %14
store i32* %4, i32** %15
store i8* %5, i8** %16
store i8* %6, i8** %17
store i32* %7, i32** %18
store i8* %8, i8** %19
%26 = load i32*, i32** %18
%27 = load i32, i32* %26
store i32 %27, i32* %20
store i32 32, i32* %24
%28 = bitcast [1 x i8]* %25 to i8*
%29 = load i32*, i32** %15
%30 = icmp ne i32* %29, null
br i1 %30, label %31, label %37
31: ; preds = %9
%32 = load i32*, i32** %18
%33 = load i32, i32* %32
%34 = load i32, i32* %13
%35 = sub nsw i32 %33, %34
%36 = load i32*, i32** %15
store i32 %35, i32* %36
br label %37
37: ; preds = %31, %9
%38 = load i32, i32* %24
%39 = load i32*, i32** %18
%40 = load i32, i32* %39
%41 = sub nsw i32 %40, %38
store i32 %41, i32* %39
%42 = load i32*, i32** %18
%43 = load i32, i32* %42
store i32 %43, i32* %22
%44 = load i32, i32* %24
%45 = load i32*, i32** %18
%46 = load i8*, i8** %19
%47 = call i64 @ccnl_ndntlv_prependTL(i32 23, i32 %44, i32* %45, i8* %46)
%48 = icmp slt i64 %47, 0
br i1 %48, label %49, label %50
49: ; preds = %37
store i32 -1, i32* %10
br label %157
50: ; preds = %37
%51 = load i32*, i32** %18
%52 = load i32, i32* %51
store i32 %52, i32* %23
%53 = getelementptr inbounds [1 x i8], [1 x i8]* %25, i64 0, i64 0
%54 = load i32*, i32** %18
%55 = load i8*, i8** %19
%56 = call i64 @ccnl_ndntlv_prependBlob(i32 27, i8* %53, i32 1, i32* %54, i8* %55)
%57 = icmp slt i64 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %50
store i32 1, i32* %10
br label %157
59: ; preds = %50
%60 = load i32, i32* %23
%61 = load i32*, i32** %18
%62 = load i32, i32* %61
%63 = sub nsw i32 %60, %62
%64 = load i32*, i32** %18
%65 = load i8*, i8** %19
%66 = call i64 @ccnl_ndntlv_prependTL(i32 22, i32 %63, i32* %64, i8* %65)
%67 = icmp slt i64 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %59
store i32 -1, i32* %10
br label %157
69: ; preds = %59
%70 = load i8*, i8** %12
%71 = load i32, i32* %13
%72 = load i32*, i32** %18
%73 = load i8*, i8** %19
%74 = call i64 @ccnl_ndntlv_prependBlob(i32 21, i8* %70, i32 %71, i32* %72, i8* %73)
%75 = icmp slt i64 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %69
store i32 -1, i32* %10
br label %157
77: ; preds = %69
%78 = load i32*, i32** %18
%79 = load i32, i32* %78
store i32 %79, i32* %21
%80 = load i32*, i32** %14
%81 = icmp ne i32* %80, null
br i1 %81, label %82, label %101
82: ; preds = %77
%83 = load i32*, i32** %14
%84 = load i32, i32* %83
%85 = load i32*, i32** %18
%86 = load i8*, i8** %19
%87 = call i64 @ccnl_ndntlv_prependIncludedNonNegInt(i32 8, i32 %84, i32 0, i32* %85, i8* %86)
%88 = icmp slt i64 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %82
store i32 -1, i32* %10
br label %157
90: ; preds = %82
%91 = load i32, i32* %21
%92 = load i32*, i32** %18
%93 = load i32, i32* %92
%94 = sub nsw i32 %91, %93
%95 = load i32*, i32** %18
%96 = load i8*, i8** %19
%97 = call i64 @ccnl_ndntlv_prependTL(i32 26, i32 %94, i32* %95, i8* %96)
%98 = icmp slt i64 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %90
store i32 -1, i32* %10
br label %157
100: ; preds = %90
br label %101
101: ; preds = %100, %77
%102 = load i32, i32* %21
%103 = load i32*, i32** %18
%104 = load i32, i32* %103
%105 = sub nsw i32 %102, %104
%106 = load i32*, i32** %18
%107 = load i8*, i8** %19
%108 = call i64 @ccnl_ndntlv_prependTL(i32 20, i32 %105, i32* %106, i8* %107)
%109 = icmp slt i64 %108, 0
br i1 %109, label %110, label %111
110: ; preds = %101
store i32 -1, i32* %10
br label %157
111: ; preds = %101
%112 = load %struct.ccnl_prefix_s*, %struct.ccnl_prefix_s** %11
%113 = load i32*, i32** %18
%114 = load i8*, i8** %19
%115 = call i64 @ccnl_ndntlv_prependName(%struct.ccnl_prefix_s* %112, i32* %113, i8* %114)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %118
117: ; preds = %111
store i32 -1, i32* %10
br label %157
118: ; preds = %111
%119 = load i32, i32* %20
%120 = load i32*, i32** %18
%121 = load i32, i32* %120
%122 = sub nsw i32 %119, %121
%123 = load i32*, i32** %18
%124 = load i8*, i8** %19
%125 = call i64 @ccnl_ndntlv_prependTL(i32 6, i32 %122, i32* %123, i8* %124)
%126 = icmp slt i64 %125, 0
br i1 %126, label %127, label %128
127: ; preds = %118
store i32 -1, i32* %10
br label %157
128: ; preds = %118
%129 = load i32*, i32** %15
%130 = icmp ne i32* %129, null
br i1 %130, label %131, label %137
131: ; preds = %128
%132 = load i32*, i32** %18
%133 = load i32, i32* %132
%134 = load i32*, i32** %15
%135 = load i32, i32* %134
%136 = sub nsw i32 %135, %133
store i32 %136, i32* %134
br label %137
137: ; preds = %131, %128
%138 = load i8*, i8** %16
%139 = load i8*, i8** %19
%140 = load i32*, i32** %18
%141 = load i32, i32* %140
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i8, i8* %139, i64 %142
%144 = load i32, i32* %23
%145 = load i32*, i32** %18
%146 = load i32, i32* %145
%147 = sub nsw i32 %144, %146
%148 = load i8*, i8** %19
%149 = load i32, i32* %22
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8, i8* %148, i64 %150
%152 = call i32 @ccnl_hmac256_sign(i8* %138, i32 64, i8* %143, i32 %147, i8* %151, i32* %24)
%153 = load i32, i32* %20
%154 = load i32*, i32** %18
%155 = load i32, i32* %154
%156 = sub nsw i32 %153, %155
store i32 %156, i32* %10
br label %157
157: ; preds = %137, %127, %117, %110, %99, %89, %76, %68, %58, %49
%158 = load i32, i32* %10
ret i32 %158
}

LLVM IR (-O2):
%struct.ccnl_prefix_s = type { i32 }
define i32 @ccnl_ndntlv_prependSignedContent(%struct.ccnl_prefix_s* %0, i8* %1, i32 %2, i32* %3, i32* %4, i8* %5, i8* nocapture readnone %6, i32* %7, i8* %8) {
%10 = alloca i32
%11 = alloca [1 x i8]
%12 = load i32, i32* %7
%13 = bitcast i32* %10 to i8*
store i32 32, i32* %10
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %11, i64 0, i64 0
store i8 4, i8* %14
%15 = icmp eq i32* %4, null
br i1 %15, label %19, label %16
16: ; preds = %9
%17 = sub nsw i32 %12, %2
store i32 %17, i32* %4
%18 = load i32, i32* %7
br label %19
19: ; preds = %16, %9
%20 = phi i32 [ %18, %16 ], [ %12, %9 ]
%21 = add nsw i32 %20, -32
store i32 %21, i32* %7
%22 = tail call i64 @ccnl_ndntlv_prependTL(i32 23, i32 32, i32* %7, i8* %8)
%23 = icmp slt i64 %22, 0
br i1 %23, label %78, label %24
24: ; preds = %19
%25 = load i32, i32* %7
%26 = call i64 @ccnl_ndntlv_prependBlob(i32 27, i8* %14, i32 1, i32* %7, i8* %8)
%27 = icmp slt i64 %26, 0
br i1 %27, label %78, label %28
28: ; preds = %24
%29 = load i32, i32* %7
%30 = sub nsw i32 %25, %29
%31 = call i64 @ccnl_ndntlv_prependTL(i32 22, i32 %30, i32* %7, i8* %8)
%32 = icmp slt i64 %31, 0
br i1 %32, label %78, label %33
33: ; preds = %28
%34 = call i64 @ccnl_ndntlv_prependBlob(i32 21, i8* %1, i32 %2, i32* %7, i8* %8)
%35 = icmp slt i64 %34, 0
br i1 %35, label %78, label %36
36: ; preds = %33
%37 = load i32, i32* %7
%38 = icmp eq i32* %3, null
br i1 %38, label %50, label %39
39: ; preds = %36
%40 = load i32, i32* %3
%41 = call i64 @ccnl_ndntlv_prependIncludedNonNegInt(i32 8, i32 %40, i32 0, i32* %7, i8* %8)
%42 = icmp slt i64 %41, 0
br i1 %42, label %78, label %43
43: ; preds = %39
%44 = load i32, i32* %7
%45 = sub nsw i32 %37, %44
%46 = call i64 @ccnl_ndntlv_prependTL(i32 26, i32 %45, i32* %7, i8* %8)
%47 = icmp slt i64 %46, 0
br i1 %47, label %78, label %48
48: ; preds = %43
%49 = load i32, i32* %7
br label %50
50: ; preds = %48, %36
%51 = phi i32 [ %49, %48 ], [ %37, %36 ]
%52 = sub nsw i32 %37, %51
%53 = call i64 @ccnl_ndntlv_prependTL(i32 20, i32 %52, i32* %7, i8* %8)
%54 = icmp slt i64 %53, 0
br i1 %54, label %78, label %55
55: ; preds = %50
%56 = call i64 @ccnl_ndntlv_prependName(%struct.ccnl_prefix_s* %0, i32* %7, i8* %8)
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %78
58: ; preds = %55
%59 = load i32, i32* %7
%60 = sub nsw i32 %12, %59
%61 = call i64 @ccnl_ndntlv_prependTL(i32 6, i32 %60, i32* %7, i8* %8)
%62 = icmp slt i64 %61, 0
br i1 %62, label %78, label %63
63: ; preds = %58
br i1 %15, label %68, label %64
64: ; preds = %63
%65 = load i32, i32* %7
%66 = load i32, i32* %4
%67 = sub nsw i32 %66, %65
store i32 %67, i32* %4
br label %68
68: ; preds = %64, %63
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %8, i64 %70
%72 = sub nsw i32 %25, %69
%73 = sext i32 %21 to i64
%74 = getelementptr inbounds i8, i8* %8, i64 %73
%75 = call i32 @ccnl_hmac256_sign(i8* %5, i32 64, i8* %71, i32 %72, i8* %74, i32* %10)
%76 = load i32, i32* %7
%77 = sub nsw i32 %12, %76
br label %78
78: ; preds = %58, %55, %50, %43, %39, %33, %28, %24, %19, %68
%79 = phi i32 [ %77, %68 ], [ -1, %19 ], [ 1, %24 ], [ -1, %28 ], [ -1, %33 ], [ -1, %39 ], [ -1, %43 ], [ -1, %50 ], [ -1, %55 ], [ -1, %58 ]
ret i32 %79
}