void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = input[0UL] + (unsigned char)219;
    local1 = 0UL;
    while (local1 < (unsigned char)0) {
      state[0UL] |= (state[0UL] & (unsigned char)63) << 4UL;
      local1++;
    }
    local1 = 0UL;
    while (local1 < (unsigned char)0) {
      state[0UL] |= (state[local1] & (unsigned char)31) << 4UL;
      local1 += 2UL;
    }
    output[0UL] = state[0UL] << (unsigned char)7;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0xdb,%eax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x0,%eax
jge    114c <RandomFunc+0x4c>
movzbl -0x11(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x4,%ecx
movzbl -0x11(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x12(%rbp),%al
add    $0x1,%al
mov    %al,-0x12(%rbp)
jmp    111f <RandomFunc+0x1f>
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x0,%eax
jge    1185 <RandomFunc+0x85>
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp,%rax,1),%ecx
and    $0x1f,%ecx
shl    $0x4,%ecx
movzbl -0x11(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x12(%rbp),%eax
add    $0x2,%rax
mov    %al,-0x12(%rbp)
jmp    1150 <RandomFunc+0x50>
movzbl -0x11(%rbp),%eax
shl    $0x7,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%al
not    %al
shl    $0x7,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = add nsw i32 %10, 219
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %12, i8* %13
store i8 0, i8* %6
br label %14
14: ; preds = %18, %2
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = and i32 %21, 63
%23 = shl i32 %22, 4
%24 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = or i32 %26, %23
%28 = trunc i32 %27 to i8
store i8 %28, i8* %24
%29 = load i8, i8* %6
%30 = add i8 %29, 1
store i8 %30, i8* %6
br label %14
31: ; preds = %14
store i8 0, i8* %6
br label %32
32: ; preds = %36, %31
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = icmp slt i32 %34, 0
br i1 %35, label %36, label %53
36: ; preds = %32
%37 = load i8, i8* %6
%38 = zext i8 %37 to i64
%39 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = and i32 %41, 31
%43 = shl i32 %42, 4
%44 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = or i32 %46, %43
%48 = trunc i32 %47 to i8
store i8 %48, i8* %44
%49 = load i8, i8* %6
%50 = zext i8 %49 to i64
%51 = add i64 %50, 2
%52 = trunc i64 %51 to i8
store i8 %52, i8* %6
br label %32
53: ; preds = %32
%54 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = shl i32 %56, 7
%58 = trunc i32 %57 to i8
%59 = load i8*, i8** %4
%60 = getelementptr inbounds i8, i8* %59, i64 0
store i8 %58, i8* %60
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = xor i8 %3, -1
%5 = shl i8 %4, 7
store i8 %5, i8* %1
ret void
}