#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 screen_id;
typedef int control_id;
typedef int color;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void SetControlBackColor(unsigned short int screen_id,
                         unsigned short int control_id,
                         unsigned short int color) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x18) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar(((color) >> 8) & 0xFF);
  SendChar((color)&0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<SetControlBackColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x18,%edi
call   1030 <SendChar@plt>
movzwl -0x2(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x2(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x6(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x6(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetControlBackColor>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x18,%edi
call   1030 <SendChar@plt>
mov    %ebx,%edi
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %bl,%edi
call   1030 <SendChar@plt>
mov    %ebp,%edi
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %bpl,%edi
call   1030 <SendChar@plt>
mov    %r14d,%edi
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %r14b,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @SetControlBackColor(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = call i32 @SendChar(i32 238)
%8 = call i32 @SendChar(i32 177)
%9 = call i32 @SendChar(i32 24)
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = call i32 @SendChar(i32 %13)
%15 = load i16, i16* %4
%16 = zext i16 %15 to i32
%17 = and i32 %16, 255
%18 = call i32 @SendChar(i32 %17)
%19 = load i16, i16* %5
%20 = zext i16 %19 to i32
%21 = ashr i32 %20, 8
%22 = and i32 %21, 255
%23 = call i32 @SendChar(i32 %22)
%24 = load i16, i16* %5
%25 = zext i16 %24 to i32
%26 = and i32 %25, 255
%27 = call i32 @SendChar(i32 %26)
%28 = load i16, i16* %6
%29 = zext i16 %28 to i32
%30 = ashr i32 %29, 8
%31 = and i32 %30, 255
%32 = call i32 @SendChar(i32 %31)
%33 = load i16, i16* %6
%34 = zext i16 %33 to i32
%35 = and i32 %34, 255
%36 = call i32 @SendChar(i32 %35)
%37 = call i32 @SendChar(i32 255)
%38 = call i32 @SendChar(i32 252)
%39 = call i32 @SendChar(i32 255)
%40 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @SetControlBackColor(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = tail call i32 @SendChar(i32 238)
%5 = tail call i32 @SendChar(i32 177)
%6 = tail call i32 @SendChar(i32 24)
%7 = zext i16 %0 to i32
%8 = lshr i32 %7, 8
%9 = tail call i32 @SendChar(i32 %8)
%10 = and i32 %7, 255
%11 = tail call i32 @SendChar(i32 %10)
%12 = zext i16 %1 to i32
%13 = lshr i32 %12, 8
%14 = tail call i32 @SendChar(i32 %13)
%15 = and i32 %12, 255
%16 = tail call i32 @SendChar(i32 %15)
%17 = zext i16 %2 to i32
%18 = lshr i32 %17, 8
%19 = tail call i32 @SendChar(i32 %18)
%20 = and i32 %17, 255
%21 = tail call i32 @SendChar(i32 %20)
%22 = tail call i32 @SendChar(i32 255)
%23 = tail call i32 @SendChar(i32 252)
%24 = tail call i32 @SendChar(i32 255)
%25 = tail call i32 @SendChar(i32 255)
ret void
}