#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 */
typedef int uint8_t;

/* Variables and functions */
void get_pespts(uint8_t *spts, uint8_t *pts) {
  pts[0] = 0x21 | ((spts[0] & 0xC0) >> 5);
  pts[1] = ((spts[0] & 0x3F) << 2) | ((spts[1] & 0xC0) >> 6);
  pts[2] = 0x01 | ((spts[1] & 0x3F) << 2) | ((spts[2] & 0x80) >> 6);
  pts[3] = ((spts[2] & 0x7F) << 1) | ((spts[3] & 0x80) >> 7);
  pts[4] = 0x01 | ((spts[3] & 0x7F) << 1);
}


x86 assembly (clang, -O0):
<get_pespts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xc0,%ecx
sar    $0x5,%ecx
or     $0x21,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0x3f,%ecx
shl    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xc0,%eax
sar    $0x6,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0x3f,%ecx
shl    $0x2,%ecx
or     $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
and    $0x80,%eax
sar    $0x6,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
and    $0x7f,%ecx
shl    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0x80,%eax
sar    $0x7,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0x7f,%ecx
shl    $0x1,%ecx
or     $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pespts>:
mov    (%rdi),%eax
shr    $0x5,%eax
and    $0x6,%eax
or     $0x21,%eax
mov    %eax,(%rsi)
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
and    $0x3f,%eax
shr    $0x6,%ecx
and    $0x3,%ecx
lea    (%rcx,%rax,4),%eax
mov    %eax,0x4(%rsi)
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%ecx
and    $0x3f,%eax
shr    $0x6,%ecx
and    $0x2,%ecx
lea    (%rcx,%rax,4),%eax
add    $0x1,%eax
mov    %eax,0x8(%rsi)
mov    0x8(%rdi),%eax
mov    0xc(%rdi),%ecx
and    $0x7f,%eax
shr    $0x7,%ecx
and    $0x1,%ecx
lea    (%rcx,%rax,2),%eax
mov    %eax,0xc(%rsi)
mov    0xc(%rdi),%eax
add    %eax,%eax
add    $0x1,%eax
movzbl %al,%eax
mov    %eax,0x10(%rsi)
ret

LLVM IR (-O0):
define void @get_pespts(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 192
%9 = ashr i32 %8, 5
%10 = or i32 33, %9
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = and i32 %15, 63
%17 = shl i32 %16, 2
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
%21 = and i32 %20, 192
%22 = ashr i32 %21, 6
%23 = or i32 %17, %22
%24 = load i32*, i32** %4
%25 = getelementptr inbounds i32, i32* %24, i64 1
store i32 %23, i32* %25
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 1
%28 = load i32, i32* %27
%29 = and i32 %28, 63
%30 = shl i32 %29, 2
%31 = or i32 1, %30
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i64 2
%34 = load i32, i32* %33
%35 = and i32 %34, 128
%36 = ashr i32 %35, 6
%37 = or i32 %31, %36
%38 = load i32*, i32** %4
%39 = getelementptr inbounds i32, i32* %38, i64 2
store i32 %37, i32* %39
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 2
%42 = load i32, i32* %41
%43 = and i32 %42, 127
%44 = shl i32 %43, 1
%45 = load i32*, i32** %3
%46 = getelementptr inbounds i32, i32* %45, i64 3
%47 = load i32, i32* %46
%48 = and i32 %47, 128
%49 = ashr i32 %48, 7
%50 = or i32 %44, %49
%51 = load i32*, i32** %4
%52 = getelementptr inbounds i32, i32* %51, i64 3
store i32 %50, i32* %52
%53 = load i32*, i32** %3
%54 = getelementptr inbounds i32, i32* %53, i64 3
%55 = load i32, i32* %54
%56 = and i32 %55, 127
%57 = shl i32 %56, 1
%58 = or i32 1, %57
%59 = load i32*, i32** %4
%60 = getelementptr inbounds i32, i32* %59, i64 4
store i32 %58, i32* %60
ret void
}

LLVM IR (-O2):
define void @get_pespts(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 5
%5 = and i32 %4, 6
%6 = or i32 %5, 33
store i32 %6, i32* %1
%7 = load i32, i32* %0
%8 = shl i32 %7, 2
%9 = and i32 %8, 252
%10 = getelementptr inbounds i32, i32* %0, i64 1
%11 = load i32, i32* %10
%12 = lshr i32 %11, 6
%13 = and i32 %12, 3
%14 = or i32 %13, %9
%15 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %10
%17 = shl i32 %16, 2
%18 = and i32 %17, 252
%19 = getelementptr inbounds i32, i32* %0, i64 2
%20 = load i32, i32* %19
%21 = lshr i32 %20, 6
%22 = and i32 %21, 2
%23 = or i32 %18, %22
%24 = or i32 %23, 1
%25 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %24, i32* %25
%26 = load i32, i32* %19
%27 = shl i32 %26, 1
%28 = and i32 %27, 254
%29 = getelementptr inbounds i32, i32* %0, i64 3
%30 = load i32, i32* %29
%31 = lshr i32 %30, 7
%32 = and i32 %31, 1
%33 = or i32 %32, %28
%34 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %33, i32* %34
%35 = load i32, i32* %29
%36 = shl i32 %35, 1
%37 = and i32 %36, 254
%38 = or i32 %37, 1
%39 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %38, i32* %39
ret void
}