#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;
typedef int channel;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void GraphChannelAdd(unsigned short int screen_id,
                     unsigned short int control_id, unsigned char channel,
                     unsigned short int color) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x30) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar((channel)&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):
<GraphChannelAdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dl,%cl
mov    %si,%dx
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %dx,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %ax,-0x8(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x30,%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>
movzbl -0x5(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x8(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0x8(%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):
<GraphChannelAdd>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x30,%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
call   1030 <SendChar@plt>
mov    %r15d,%edi
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %r15b,%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
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <SendChar@plt>

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

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