#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 SetAreaColorPowerMode(char c, char p) {
  unsigned char d[] = {0xD8, 00};
  if (c)
    d[1] |= 0x30;
  if (p)
    d[1] |= 0x05;
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetAreaColorPowerMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x4(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1143 <SetAreaColorPowerMode+0x33>
movzbl -0x3(%rbp),%eax
or     $0x30,%eax
mov    %al,-0x3(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     1157 <SetAreaColorPowerMode+0x47>
movzbl -0x3(%rbp),%eax
or     $0x5,%eax
mov    %al,-0x3(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetAreaColorPowerMode>:
push   %rax
movw   $0xd8,0x6(%rsp)
test   %dil,%dil
je     113e <SetAreaColorPowerMode+0x2e>
movb   $0x30,0x7(%rsp)
mov    $0x35,%al
test   %sil,%sil
je     112d <SetAreaColorPowerMode+0x1d>
mov    %al,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret
mov    $0x5,%al
test   %sil,%sil
jne    1129 <SetAreaColorPowerMode+0x19>
jmp    112d <SetAreaColorPowerMode+0x1d>

LLVM IR (-O0):
@__const.SetAreaColorPowerMode.d = [2 x i8] c"\D8\00"
define void @SetAreaColorPowerMode(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [2 x i8]
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = bitcast [2 x i8]* %5 to i8*
%7 = load i8, i8* %3
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = or i32 %12, 48
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
br label %15
15: ; preds = %9, %2
%16 = load i8, i8* %4
%17 = icmp ne i8 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = or i32 %21, 5
%23 = trunc i32 %22 to i8
store i8 %23, i8* %19
br label %24
24: ; preds = %18, %15
%25 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%26 = call i32 @oled_SendCommand(i8* %25, i32 2)
ret void
}

LLVM IR (-O2):
define void @SetAreaColorPowerMode(i8 signext %0, i8 signext %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to [2 x i8]*
%5 = bitcast i16* %3 to i8*
store i16 216, i16* %3
%6 = icmp eq i8 %0, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 48, i8* %8
br label %9
9: ; preds = %7, %2
%10 = phi i8 [ 53, %7 ], [ 5, %2 ]
%11 = icmp eq i8 %1, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 %10, i8* %13
br label %14
14: ; preds = %12, %9
%15 = call i32 @oled_SendCommand(i8* %5, i32 2)
ret void
}