#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;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
int /*<<< orphan*/ SendStrings(unsigned char *);
void SetTextValue(unsigned short int screen_id, unsigned short int control_id,
                  unsigned char *str) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x10) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendStrings(str);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<SetTextValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x10,%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>
mov    -0x10(%rbp),%rdi
call   1040 <SendStrings@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):
<SetTextValue>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x10,%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    %r14,%rdi
call   1040 <SendStrings@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 @SetTextValue(i16 zeroext %0, i16 zeroext %1, i8* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i8*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = call i32 @SendChar(i32 238)
%8 = call i32 @SendChar(i32 177)
%9 = call i32 @SendChar(i32 16)
%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 i8*, i8** %6
%29 = call i32 @SendStrings(i8* %28)
%30 = call i32 @SendChar(i32 255)
%31 = call i32 @SendChar(i32 252)
%32 = call i32 @SendChar(i32 255)
%33 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @SetTextValue(i16 zeroext %0, i16 zeroext %1, i8* %2) {
%4 = tail call i32 @SendChar(i32 238)
%5 = tail call i32 @SendChar(i32 177)
%6 = tail call i32 @SendChar(i32 16)
%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 = tail call i32 @SendStrings(i8* %2)
%18 = tail call i32 @SendChar(i32 255)
%19 = tail call i32 @SendChar(i32 252)
%20 = tail call i32 @SendChar(i32 255)
%21 = tail call i32 @SendChar(i32 255)
ret void
}