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

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
int /*<<< orphan*/ SendNU8(unsigned char *, unsigned short);
void GraphChannelDataAdd(unsigned short int screen_id,
                         unsigned short int control_id, unsigned char channel,
                         unsigned char *pData, unsigned short int nDataLen) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x32) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar((channel)&0xFF);
  SendChar(((nDataLen) >> 8) & 0xFF);
  SendChar((nDataLen)&0xFF);
  SendNU8((unsigned char *)pData, nDataLen);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<GraphChannelDataAdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8w,%ax
mov    %di,-0x2(%rbp)
mov    %si,-0x4(%rbp)
mov    %dl,-0x5(%rbp)
mov    %rcx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    $0xee,%edi
call   1040 <SendChar@plt>
mov    $0xb1,%edi
call   1040 <SendChar@plt>
mov    $0x32,%edi
call   1040 <SendChar@plt>
movzwl -0x2(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzwl -0x2(%rbp),%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzwl -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzwl -0x4(%rbp),%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzbl -0x5(%rbp),%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzwl -0x12(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
movzwl -0x12(%rbp),%edi
and    $0xff,%edi
call   1040 <SendChar@plt>
mov    -0x10(%rbp),%rdi
movzwl -0x12(%rbp),%esi
call   1030 <SendNU8@plt>
mov    $0xff,%edi
call   1040 <SendChar@plt>
mov    $0xfc,%edi
call   1040 <SendChar@plt>
mov    $0xff,%edi
call   1040 <SendChar@plt>
mov    $0xff,%edi
call   1040 <SendChar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GraphChannelDataAdd>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r12d
mov    %rcx,%r14
mov    %edx,%r15d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xee,%edi
call   1040 <SendChar@plt>
mov    $0xb1,%edi
call   1040 <SendChar@plt>
mov    $0x32,%edi
call   1040 <SendChar@plt>
mov    %ebx,%edi
shr    $0x8,%edi
call   1040 <SendChar@plt>
movzbl %bl,%edi
call   1040 <SendChar@plt>
mov    %ebp,%edi
shr    $0x8,%edi
call   1040 <SendChar@plt>
movzbl %bpl,%edi
call   1040 <SendChar@plt>
mov    %r15d,%edi
call   1040 <SendChar@plt>
mov    %r12d,%edi
shr    $0x8,%edi
call   1040 <SendChar@plt>
movzbl %r12b,%edi
call   1040 <SendChar@plt>
mov    %r14,%rdi
mov    %r12d,%esi
call   1030 <SendNU8@plt>
mov    $0xff,%edi
call   1040 <SendChar@plt>
mov    $0xfc,%edi
call   1040 <SendChar@plt>
mov    $0xff,%edi
call   1040 <SendChar@plt>
mov    $0xff,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <SendChar@plt>

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

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