int encode_snmp_integer(unsigned char *buffer, int integer_value) {
  int length;
  if (integer_value < -8388608 || integer_value > 8388607) {
    length = 4;
  } else if (integer_value < -32768 || integer_value > 32767) {
    length = 3;
  } else if (integer_value < -128 || integer_value > 127) {
    length = 2;
  } else {
    length = 1;
  }
  *buffer++ = 0x02;
  *buffer++ = length;
  while (length--) {
    *buffer++ = ((unsigned int)integer_value >> (8 * length)) & 0xFF;
  }
  return 0;
}


x86 assembly (clang, -O0):
<encode_snmp_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xff800000,-0xc(%rbp)
jl     1125 <encode_snmp_integer+0x25>
cmpl   $0x7fffff,-0xc(%rbp)
jle    1131 <encode_snmp_integer+0x31>
movl   $0x4,-0x10(%rbp)
jmp    1188 <encode_snmp_integer+0x88>
cmpl   $0xffff8000,-0xc(%rbp)
jl     114b <encode_snmp_integer+0x4b>
cmpl   $0x7fff,-0xc(%rbp)
jle    1157 <encode_snmp_integer+0x57>
movl   $0x3,-0x10(%rbp)
jmp    1183 <encode_snmp_integer+0x83>
cmpl   $0xffffff80,-0xc(%rbp)
jl     116b <encode_snmp_integer+0x6b>
cmpl   $0x7f,-0xc(%rbp)
jle    1177 <encode_snmp_integer+0x77>
movl   $0x2,-0x10(%rbp)
jmp    117e <encode_snmp_integer+0x7e>
movl   $0x1,-0x10(%rbp)
jmp    1183 <encode_snmp_integer+0x83>
jmp    1188 <encode_snmp_integer+0x88>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2,(%rax)
mov    -0x10(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     11ec <encode_snmp_integer+0xec>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shr    %cl,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    11b0 <encode_snmp_integer+0xb0>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_snmp_integer>:
lea    -0x800000(%rsi),%eax
mov    $0x4,%r11d
cmp    $0xff000000,%eax
jb     1131 <encode_snmp_integer+0x31>
movswl %si,%eax
mov    $0x3,%r11d
cmp    %esi,%eax
jne    1131 <encode_snmp_integer+0x31>
movsbl %sil,%eax
xor    %r11d,%r11d
cmp    %esi,%eax
setne  %r11b
add    $0x1,%r11d
push   %rbx
movb   $0x2,(%rdi)
lea    0x2(%rdi),%rbx
mov    %r11b,0x1(%rdi)
lea    -0x1(%r11),%r9d
cmp    $0xf,%r9d
jb     16d1 <encode_snmp_integer+0x5d1>
add    $0x1,%r9
mov    %r9,%r8
and    $0xfffffffffffffff0,%r8
movd   %r11d,%xmm0
pshufd $0x0,%xmm0,%xmm8
movdqa 0xe96(%rip),%xmm15
paddd  %xmm8,%xmm15
movdqa 0xe98(%rip),%xmm9
paddd  %xmm8,%xmm9
movdqa 0xe9a(%rip),%xmm10
paddd  %xmm8,%xmm10
paddd  0xe9c(%rip),%xmm8
movd   %esi,%xmm0
pshufd $0x0,%xmm0,%xmm12
lea    -0x10(%r8),%rcx
mov    %rcx,%r10
shr    $0x4,%r10
add    $0x1,%r10
test   %rcx,%rcx
je     16f6 <encode_snmp_integer+0x5f6>
mov    %r10,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %ecx,%ecx
nop
movdqa %xmm10,-0x20(%rsp)
movdqa %xmm8,-0x10(%rsp)
movdqa %xmm15,%xmm4
pslld  $0x3,%xmm4
movdqa %xmm9,%xmm14
pslld  $0x3,%xmm14
movdqa -0x20(%rsp),%xmm13
pslld  $0x3,%xmm13
movdqa -0x10(%rsp),%xmm8
pslld  $0x3,%xmm8
movdqa %xmm8,%xmm5
movdqa 0xe36(%rip),%xmm6
paddd  %xmm6,%xmm5
movdqa %xmm13,%xmm7
paddd  %xmm6,%xmm7
movdqa %xmm14,%xmm2
movdqa %xmm4,%xmm0
paddd  %xmm6,%xmm0
pshuflw $0xfe,%xmm0,%xmm1
movdqa %xmm12,%xmm3
psrld  %xmm1,%xmm3
paddd  %xmm6,%xmm2
pshuflw $0x54,%xmm0,%xmm11
movdqa %xmm12,%xmm1
psrld  %xmm11,%xmm1
pshufd $0xee,%xmm0,%xmm0
pshuflw $0xfe,%xmm0,%xmm11
movdqa %xmm12,%xmm10
psrld  %xmm11,%xmm10
punpcklqdq %xmm3,%xmm1
pshuflw $0x54,%xmm0,%xmm0
movdqa %xmm12,%xmm3
psrld  %xmm0,%xmm3
punpckhqdq %xmm10,%xmm3
pshuflw $0xfe,%xmm2,%xmm0
movdqa %xmm12,%xmm10
psrld  %xmm0,%xmm10
shufps $0xcc,%xmm3,%xmm1
pshuflw $0x54,%xmm2,%xmm3
movdqa %xmm12,%xmm0
psrld  %xmm3,%xmm0
pshufd $0xee,%xmm2,%xmm2
pshuflw $0xfe,%xmm2,%xmm11
movdqa %xmm12,%xmm3
psrld  %xmm11,%xmm3
punpcklqdq %xmm10,%xmm0
pshuflw $0x54,%xmm2,%xmm10
movdqa %xmm12,%xmm2
psrld  %xmm10,%xmm2
punpckhqdq %xmm3,%xmm2
pshuflw $0xfe,%xmm7,%xmm10
movdqa %xmm12,%xmm3
psrld  %xmm10,%xmm3
shufps $0xcc,%xmm2,%xmm0
pshuflw $0x54,%xmm7,%xmm10
movdqa %xmm12,%xmm2
psrld  %xmm10,%xmm2
pshufd $0xee,%xmm7,%xmm11
pshuflw $0xfe,%xmm11,%xmm10
movdqa %xmm12,%xmm7
psrld  %xmm10,%xmm7
punpcklqdq %xmm3,%xmm2
pshuflw $0x54,%xmm11,%xmm10
movdqa %xmm12,%xmm3
psrld  %xmm10,%xmm3
punpckhqdq %xmm7,%xmm3
pshuflw $0xfe,%xmm5,%xmm10
movdqa %xmm12,%xmm7
psrld  %xmm10,%xmm7
shufps $0xcc,%xmm3,%xmm2
pshuflw $0x54,%xmm5,%xmm10
movdqa %xmm12,%xmm3
psrld  %xmm10,%xmm3
pshufd $0xee,%xmm5,%xmm11
pshuflw $0xfe,%xmm11,%xmm10
movdqa %xmm12,%xmm5
psrld  %xmm10,%xmm5
punpcklqdq %xmm7,%xmm3
pshuflw $0x54,%xmm11,%xmm7
movdqa %xmm12,%xmm6
psrld  %xmm7,%xmm6
punpckhqdq %xmm5,%xmm6
shufps $0xcc,%xmm6,%xmm3
movaps 0xce0(%rip),%xmm11
andps  %xmm11,%xmm3
andps  %xmm11,%xmm2
packuswb %xmm2,%xmm3
andps  %xmm11,%xmm0
andps  %xmm11,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm3
movdqu %xmm3,0x2(%rdi,%rcx,1)
movdqa 0xcc6(%rip),%xmm1
paddd  %xmm1,%xmm8
paddd  %xmm1,%xmm13
paddd  %xmm1,%xmm4
pshuflw $0xfe,%xmm4,%xmm0
movdqa %xmm12,%xmm2
psrld  %xmm0,%xmm2
paddd  %xmm1,%xmm14
pshuflw $0x54,%xmm4,%xmm0
movdqa %xmm12,%xmm1
psrld  %xmm0,%xmm1
pshufd $0xee,%xmm4,%xmm0
pshuflw $0xfe,%xmm0,%xmm3
movdqa %xmm12,%xmm4
psrld  %xmm3,%xmm4
punpcklqdq %xmm2,%xmm1
pshuflw $0x54,%xmm0,%xmm0
movdqa %xmm12,%xmm2
psrld  %xmm0,%xmm2
punpckhqdq %xmm4,%xmm2
pshuflw $0xfe,%xmm14,%xmm0
movdqa %xmm12,%xmm3
psrld  %xmm0,%xmm3
shufps $0xcc,%xmm2,%xmm1
pshuflw $0x54,%xmm14,%xmm2
movdqa %xmm12,%xmm0
psrld  %xmm2,%xmm0
pshufd $0xee,%xmm14,%xmm2
pshuflw $0xfe,%xmm2,%xmm4
movdqa %xmm12,%xmm5
psrld  %xmm4,%xmm5
punpcklqdq %xmm3,%xmm0
pshuflw $0x54,%xmm2,%xmm2
movdqa %xmm12,%xmm3
psrld  %xmm2,%xmm3
punpckhqdq %xmm5,%xmm3
pshuflw $0xfe,%xmm13,%xmm2
movdqa %xmm12,%xmm4
psrld  %xmm2,%xmm4
shufps $0xcc,%xmm3,%xmm0
pshuflw $0x54,%xmm13,%xmm3
movdqa %xmm12,%xmm2
psrld  %xmm3,%xmm2
pshufd $0xee,%xmm13,%xmm3
movdqa -0x20(%rsp),%xmm10
pshuflw $0xfe,%xmm3,%xmm5
movdqa %xmm12,%xmm6
psrld  %xmm5,%xmm6
punpcklqdq %xmm4,%xmm2
pshuflw $0x54,%xmm3,%xmm3
movdqa %xmm12,%xmm4
psrld  %xmm3,%xmm4
punpckhqdq %xmm6,%xmm4
pshuflw $0xfe,%xmm8,%xmm3
movdqa %xmm12,%xmm5
psrld  %xmm3,%xmm5
shufps $0xcc,%xmm4,%xmm2
pshuflw $0x54,%xmm8,%xmm3
movdqa %xmm12,%xmm4
psrld  %xmm3,%xmm4
pshufd $0xee,%xmm8,%xmm3
movdqa -0x10(%rsp),%xmm8
pshuflw $0xfe,%xmm3,%xmm6
movdqa %xmm12,%xmm7
psrld  %xmm6,%xmm7
punpcklqdq %xmm5,%xmm4
pshuflw $0x54,%xmm3,%xmm3
movdqa %xmm12,%xmm5
psrld  %xmm3,%xmm5
punpckhqdq %xmm7,%xmm5
shufps $0xcc,%xmm5,%xmm4
andps  %xmm11,%xmm4
andps  %xmm11,%xmm2
packuswb %xmm2,%xmm4
andps  %xmm11,%xmm0
andps  %xmm11,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm4
movdqu %xmm4,0x12(%rdi,%rcx,1)
add    $0x20,%rcx
movdqa 0xb5a(%rip),%xmm0
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm10
paddd  %xmm0,%xmm9
paddd  %xmm0,%xmm15
add    $0xfffffffffffffffe,%rdx
jne    11c0 <encode_snmp_integer+0xc0>
test   $0x1,%r10b
je     16c6 <encode_snmp_integer+0x5c6>
pslld  $0x3,%xmm15
pslld  $0x3,%xmm9
pslld  $0x3,%xmm10
pslld  $0x3,%xmm8
movdqa 0xae2(%rip),%xmm0
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm15
pshuflw $0xfe,%xmm15,%xmm1
movdqa %xmm12,%xmm2
psrld  %xmm1,%xmm2
paddd  %xmm0,%xmm10
pshuflw $0x54,%xmm15,%xmm3
movdqa %xmm12,%xmm1
psrld  %xmm3,%xmm1
pshufd $0xee,%xmm15,%xmm3
pshuflw $0xfe,%xmm3,%xmm4
movdqa %xmm12,%xmm5
psrld  %xmm4,%xmm5
paddd  %xmm0,%xmm9
pshuflw $0x54,%xmm3,%xmm0
movdqa %xmm12,%xmm3
psrld  %xmm0,%xmm3
punpcklqdq %xmm2,%xmm1
pshuflw $0xfe,%xmm9,%xmm0
movdqa %xmm12,%xmm2
psrld  %xmm0,%xmm2
punpckhqdq %xmm5,%xmm3
pshuflw $0x54,%xmm9,%xmm4
movdqa %xmm12,%xmm0
psrld  %xmm4,%xmm0
pshufd $0xee,%xmm9,%xmm4
pshuflw $0xfe,%xmm4,%xmm5
movdqa %xmm12,%xmm6
psrld  %xmm5,%xmm6
shufps $0xcc,%xmm3,%xmm1
pshuflw $0x54,%xmm4,%xmm3
movdqa %xmm12,%xmm4
psrld  %xmm3,%xmm4
punpcklqdq %xmm2,%xmm0
pshuflw $0xfe,%xmm10,%xmm2
movdqa %xmm12,%xmm3
psrld  %xmm2,%xmm3
punpckhqdq %xmm6,%xmm4
pshuflw $0x54,%xmm10,%xmm5
movdqa %xmm12,%xmm2
psrld  %xmm5,%xmm2
pshufd $0xee,%xmm10,%xmm5
pshuflw $0xfe,%xmm5,%xmm6
movdqa %xmm12,%xmm7
psrld  %xmm6,%xmm7
shufps $0xcc,%xmm4,%xmm0
pshuflw $0x54,%xmm5,%xmm4
movdqa %xmm12,%xmm5
psrld  %xmm4,%xmm5
punpcklqdq %xmm3,%xmm2
pshuflw $0xfe,%xmm8,%xmm3
movdqa %xmm12,%xmm4
psrld  %xmm3,%xmm4
punpckhqdq %xmm7,%xmm5
pshuflw $0x54,%xmm8,%xmm3
movdqa %xmm12,%xmm6
psrld  %xmm3,%xmm6
pshufd $0xee,%xmm8,%xmm3
pshuflw $0xfe,%xmm3,%xmm8
movdqa %xmm12,%xmm7
psrld  %xmm8,%xmm7
shufps $0xcc,%xmm5,%xmm2
pshuflw $0x54,%xmm3,%xmm3
psrld  %xmm3,%xmm12
punpcklqdq %xmm4,%xmm6
punpckhqdq %xmm7,%xmm12
shufps $0xcc,%xmm12,%xmm6
movaps 0x9a7(%rip),%xmm3
andps  %xmm3,%xmm6
andps  %xmm3,%xmm2
packuswb %xmm2,%xmm6
andps  %xmm3,%xmm0
andps  %xmm3,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm6
movdqu %xmm6,(%rbx,%rcx,1)
cmp    %r8,%r9
je     16f2 <encode_snmp_integer+0x5f2>
sub    %r8d,%r11d
add    %r8,%rbx
lea    -0x8(,%r11,8),%ecx
ff
mov    %r11d,%edx
xor    %edi,%edi
xchg   %ax,%ax
mov    %esi,%eax
shr    %cl,%eax
mov    %al,(%rbx,%rdi,1)
add    $0xfffffff8,%ecx
add    $0x1,%rdi
cmp    %edi,%edx
jne    16e0 <encode_snmp_integer+0x5e0>
xor    %eax,%eax
pop    %rbx
ret
xor    %ecx,%ecx
test   $0x1,%r10b
jne    153e <encode_snmp_integer+0x43e>
jmp    16c6 <encode_snmp_integer+0x5c6>

LLVM IR (-O0):
define i32 @encode_snmp_integer(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, -8388608
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 8388607
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 4, i32* %5
br label %29
12: ; preds = %8
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, -32768
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 32767
br i1 %17, label %18, label %19
18: ; preds = %15, %12
store i32 3, i32* %5
br label %28
19: ; preds = %15
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, -128
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 127
br i1 %24, label %25, label %26
25: ; preds = %22, %19
store i32 2, i32* %5
br label %27
26: ; preds = %22
store i32 1, i32* %5
br label %27
27: ; preds = %26, %25
br label %28
28: ; preds = %27, %18
br label %29
29: ; preds = %28, %11
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %3
store i8 2, i8* %30
%32 = load i32, i32* %5
%33 = trunc i32 %32 to i8
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %3
store i8 %33, i8* %34
br label %36
36: ; preds = %40, %29
%37 = load i32, i32* %5
%38 = add nsw i32 %37, -1
store i32 %38, i32* %5
%39 = icmp ne i32 %37, 0
br i1 %39, label %40, label %49
40: ; preds = %36
%41 = load i32, i32* %4
%42 = load i32, i32* %5
%43 = mul nsw i32 8, %42
%44 = lshr i32 %41, %43
%45 = and i32 %44, 255
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %3
%48 = getelementptr inbounds i8, i8* %47, i32 1
store i8* %48, i8** %3
store i8 %46, i8* %47
br label %36
49: ; preds = %36
ret i32 0
}

LLVM IR (-O2):
define i32 @encode_snmp_integer(i8* nocapture writeonly %0, i32 %1) {
%3 = add i32 %1, -8388608
%4 = icmp ult i32 %3, -16777216
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = add nsw i32 %1, -32768
%7 = icmp ult i32 %6, -65536
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = add nsw i32 %1, -128
%10 = icmp ult i32 %9, -256
%11 = select i1 %10, i32 2, i32 1
br label %12
12: ; preds = %8, %5, %2
%13 = phi i32 [ 4, %2 ], [ 3, %5 ], [ %11, %8 ]
%14 = getelementptr inbounds i8, i8* %0, i64 1
store i8 2, i8* %0
%15 = trunc i32 %13 to i8
%16 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %15, i8* %14
%17 = add nsw i32 %13, -1
%18 = zext i32 %17 to i64
%19 = add nuw nsw i64 %18, 1
%20 = icmp ult i32 %17, 15
br i1 %20, label %72, label %21
21: ; preds = %12
%22 = and i64 %19, 8589934576
%23 = trunc i64 %22 to i32
%24 = sub i32 %13, %23
%25 = getelementptr i8, i8* %16, i64 %22
%26 = insertelement <16 x i32> poison, i32 %13, i64 0
%27 = shufflevector <16 x i32> %26, <16 x i32> poison, <16 x i32> zeroinitializer
%28 = add nsw <16 x i32> %27, <i32 0, i32 -1, i32 -2, i32 -3, i32 -4, i32 -5, i32 -6, i32 -7, i32 -8, i32 -9, i32 -10, i32 -11, i32 -12, i32 -13, i32 -14, i32 -15>
%29 = insertelement <16 x i32> poison, i32 %1, i64 0
%30 = shufflevector <16 x i32> %29, <16 x i32> poison, <16 x i32> zeroinitializer
%31 = add nsw i64 %22, -16
%32 = lshr exact i64 %31, 4
%33 = add nuw nsw i64 %32, 1
%34 = and i64 %33, 1
%35 = icmp eq i64 %31, 0
br i1 %35, label %59, label %36
36: ; preds = %21
%37 = and i64 %33, 2305843009213693950
br label %38
38: ; preds = %38, %36
%39 = phi i64 [ 0, %36 ], [ %55, %38 ]
%40 = phi <16 x i32> [ %28, %36 ], [ %56, %38 ]
%41 = phi i64 [ 0, %36 ], [ %57, %38 ]
%42 = getelementptr i8, i8* %16, i64 %39
%43 = shl <16 x i32> %40, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
%44 = add <16 x i32> %43, <i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8>
%45 = lshr <16 x i32> %30, %44
%46 = trunc <16 x i32> %45 to <16 x i8>
%47 = bitcast i8* %42 to <16 x i8>*
store <16 x i8> %46, <16 x i8>* %47
%48 = or i64 %39, 16
%49 = getelementptr i8, i8* %16, i64 %48
%50 = shl <16 x i32> %40, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
%51 = add <16 x i32> %50, <i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136, i32 -136>
%52 = lshr <16 x i32> %30, %51
%53 = trunc <16 x i32> %52 to <16 x i8>
%54 = bitcast i8* %49 to <16 x i8>*
store <16 x i8> %53, <16 x i8>* %54
%55 = add nuw i64 %39, 32
%56 = add <16 x i32> %40, <i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32, i32 -32>
%57 = add i64 %41, 2
%58 = icmp eq i64 %57, %37
br i1 %58, label %59, label %38
59: ; preds = %38, %21
%60 = phi i64 [ 0, %21 ], [ %55, %38 ]
%61 = phi <16 x i32> [ %28, %21 ], [ %56, %38 ]
%62 = icmp eq i64 %34, 0
br i1 %62, label %70, label %63
63: ; preds = %59
%64 = getelementptr i8, i8* %16, i64 %60
%65 = shl <16 x i32> %61, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
%66 = add <16 x i32> %65, <i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8, i32 -8>
%67 = lshr <16 x i32> %30, %66
%68 = trunc <16 x i32> %67 to <16 x i8>
%69 = bitcast i8* %64 to <16 x i8>*
store <16 x i8> %68, <16 x i8>* %69
br label %70
70: ; preds = %59, %63
%71 = icmp eq i64 %19, %22
br i1 %71, label %84, label %72
72: ; preds = %12, %70
%73 = phi i32 [ %13, %12 ], [ %24, %70 ]
%74 = phi i8* [ %16, %12 ], [ %25, %70 ]
br label %75
75: ; preds = %72, %75
%76 = phi i32 [ %78, %75 ], [ %73, %72 ]
%77 = phi i8* [ %82, %75 ], [ %74, %72 ]
%78 = add nsw i32 %76, -1
%79 = shl nsw i32 %78, 3
%80 = lshr i32 %1, %79
%81 = trunc i32 %80 to i8
%82 = getelementptr inbounds i8, i8* %77, i64 1
store i8 %81, i8* %77
%83 = icmp eq i32 %78, 0
br i1 %83, label %84, label %75
84: ; preds = %75, %70
ret i32 0
}