#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 /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetLUT(char x, char a, char b, char c) {
  unsigned char d[] = {0x91, x & 0x3F, a & 0x3F, b & 0x3f, c & 0x3f};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetLUT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movb   $0x91,-0x9(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x7(%rbp)
movsbl -0x3(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x6(%rbp)
movsbl -0x4(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x5,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetLUT>:
push   %rax
movb   $0x91,0x3(%rsp)
and    $0x3f,%dil
mov    %dil,0x4(%rsp)
and    $0x3f,%sil
mov    %sil,0x5(%rsp)
and    $0x3f,%dl
mov    %dl,0x6(%rsp)
and    $0x3f,%cl
mov    %cl,0x7(%rsp)
lea    0x3(%rsp),%rdi
mov    $0x5,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetLUT(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [5 x i8]
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
store i8 -111, i8* %10
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %5
%13 = sext i8 %12 to i32
%14 = and i32 %13, 63
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = and i32 %18, 63
%20 = trunc i32 %19 to i8
store i8 %20, i8* %16
%21 = getelementptr inbounds i8, i8* %16, i64 1
%22 = load i8, i8* %7
%23 = sext i8 %22 to i32
%24 = and i32 %23, 63
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
%26 = getelementptr inbounds i8, i8* %21, i64 1
%27 = load i8, i8* %8
%28 = sext i8 %27 to i32
%29 = and i32 %28, 63
%30 = trunc i32 %29 to i8
store i8 %30, i8* %26
%31 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%32 = call i32 @oled_SendCommand(i8* %31, i32 5)
ret void
}

LLVM IR (-O2):
define void @SetLUT(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
store i8 -111, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 1
%8 = and i8 %0, 63
store i8 %8, i8* %7
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 2
%10 = and i8 %1, 63
store i8 %10, i8* %9
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 3
%12 = and i8 %2, 63
store i8 %12, i8* %11
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
%14 = and i8 %3, 63
store i8 %14, i8* %13
%15 = call i32 @oled_SendCommand(i8* %6, i32 5)
ret void
}