#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 */
int /*<<< orphan*/ enc216(unsigned char *, unsigned char *, int,
                          int /*<<< orphan*/, int /*<<< orphan*/);
void enc216_(unsigned char data[], int *nbits, unsigned char symbols[],
             int *nsymbols, int *kk, int *nn) {
  int nbytes;
  nbytes = (*nbits + 7) / 8;
  enc216(symbols, data, nbytes, 0, 0);
  *nsymbols = (*nbits + 16 - 1) * 2;
  *kk = 16;
  *nn = 2;
}


x86 assembly (clang, -O0):
<enc216_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <enc216@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x10,%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
movl   $0x10,(%rax)
mov    -0x30(%rbp),%rax
movl   $0x2,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enc216_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%rax
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rbx),%edx
lea    0x7(%rdx),%ecx
add    $0xe,%edx
test   %ecx,%ecx
cmovns %ecx,%edx
sar    $0x3,%edx
mov    %rax,%rdi
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <enc216@plt>
mov    (%rbx),%eax
add    %eax,%eax
add    $0x1e,%eax
mov    %eax,(%r12)
movl   $0x10,(%r15)
movl   $0x2,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @enc216_(i8* %0, i32* %1, i8* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
store i8* %0, i8** %7
store i32* %1, i32** %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%14 = load i32*, i32** %8
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 7
%17 = sdiv i32 %16, 8
store i32 %17, i32* %13
%18 = load i8*, i8** %9
%19 = load i8*, i8** %7
%20 = load i32, i32* %13
%21 = call i32 @enc216(i8* %18, i8* %19, i32 %20, i32 0, i32 0)
%22 = load i32*, i32** %8
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 16
%25 = sub nsw i32 %24, 1
%26 = mul nsw i32 %25, 2
%27 = load i32*, i32** %10
store i32 %26, i32* %27
%28 = load i32*, i32** %11
store i32 16, i32* %28
%29 = load i32*, i32** %12
store i32 2, i32* %29
ret void
}

LLVM IR (-O2):
define void @enc216_(i8* %0, i32* nocapture %1, i8* %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5) {
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 7
%9 = sdiv i32 %8, 8
%10 = tail call i32 @enc216(i8* %2, i8* %0, i32 %9, i32 0, i32 0)
%11 = load i32, i32* %1
%12 = shl i32 %11, 1
%13 = add i32 %12, 30
store i32 %13, i32* %3
store i32 16, i32* %4
store i32 2, i32* %5
ret void
}