#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 y_offset;
typedef int y_mul;
typedef int x_offset;
typedef int x_mul;
typedef int screen_id;
typedef int control_id;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void GraphSetViewport(unsigned short int screen_id,
                      unsigned short int control_id, short int x_offset,
                      unsigned short int x_mul, short int y_offset,
                      unsigned short int y_mul) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x34) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar(((x_offset) >> 8) & 0xFF);
  SendChar((x_offset)&0xFF);
  SendChar(((x_mul) >> 8) & 0xFF);
  SendChar((x_mul)&0xFF);
  SendChar(((y_offset) >> 8) & 0xFF);
  SendChar((y_offset)&0xFF);
  SendChar(((y_mul) >> 8) & 0xFF);
  SendChar((y_mul)&0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<GraphSetViewport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8d,-0x1c(%rbp)
mov    %ecx,%eax
mov    -0x1c(%rbp),%ecx
mov    %eax,-0x18(%rbp)
mov    %edx,%eax
mov    -0x18(%rbp),%edx
mov    %eax,-0x14(%rbp)
mov    %esi,%eax
mov    -0x14(%rbp),%esi
mov    %eax,-0x10(%rbp)
mov    %edi,%r8d
mov    -0x10(%rbp),%edi
mov    %r9w,%ax
mov    %r8w,-0x2(%rbp)
mov    %di,-0x4(%rbp)
mov    %si,-0x6(%rbp)
mov    %dx,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x34,%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>
movswl -0x6(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movswl -0x6(%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>
movswl -0xa(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movswl -0xa(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0xc(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzwl -0xc(%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    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GraphSetViewport>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r12d
mov    %ecx,%r15d
mov    %edx,%r13d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x34,%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    %r13d,%ebx
movzbl %bh,%edi
call   1030 <SendChar@plt>
movzbl %bl,%edi
call   1030 <SendChar@plt>
mov    %r15d,%edi
shr    $0x8,%edi
call   1030 <SendChar@plt>
movzbl %r15b,%edi
call   1030 <SendChar@plt>
mov    %r12d,%ebx
movzbl %bh,%edi
call   1030 <SendChar@plt>
movzbl %bl,%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
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @GraphSetViewport(i16 zeroext %0, i16 zeroext %1, i16 signext %2, i16 zeroext %3, i16 signext %4, i16 zeroext %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i16
%10 = alloca i16
%11 = alloca i16
%12 = alloca i16
store i16 %0, i16* %7
store i16 %1, i16* %8
store i16 %2, i16* %9
store i16 %3, i16* %10
store i16 %4, i16* %11
store i16 %5, i16* %12
%13 = call i32 @SendChar(i32 238)
%14 = call i32 @SendChar(i32 177)
%15 = call i32 @SendChar(i32 52)
%16 = load i16, i16* %7
%17 = zext i16 %16 to i32
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = call i32 @SendChar(i32 %19)
%21 = load i16, i16* %7
%22 = zext i16 %21 to i32
%23 = and i32 %22, 255
%24 = call i32 @SendChar(i32 %23)
%25 = load i16, i16* %8
%26 = zext i16 %25 to i32
%27 = ashr i32 %26, 8
%28 = and i32 %27, 255
%29 = call i32 @SendChar(i32 %28)
%30 = load i16, i16* %8
%31 = zext i16 %30 to i32
%32 = and i32 %31, 255
%33 = call i32 @SendChar(i32 %32)
%34 = load i16, i16* %9
%35 = sext i16 %34 to i32
%36 = ashr i32 %35, 8
%37 = and i32 %36, 255
%38 = call i32 @SendChar(i32 %37)
%39 = load i16, i16* %9
%40 = sext i16 %39 to i32
%41 = and i32 %40, 255
%42 = call i32 @SendChar(i32 %41)
%43 = load i16, i16* %10
%44 = zext i16 %43 to i32
%45 = ashr i32 %44, 8
%46 = and i32 %45, 255
%47 = call i32 @SendChar(i32 %46)
%48 = load i16, i16* %10
%49 = zext i16 %48 to i32
%50 = and i32 %49, 255
%51 = call i32 @SendChar(i32 %50)
%52 = load i16, i16* %11
%53 = sext i16 %52 to i32
%54 = ashr i32 %53, 8
%55 = and i32 %54, 255
%56 = call i32 @SendChar(i32 %55)
%57 = load i16, i16* %11
%58 = sext i16 %57 to i32
%59 = and i32 %58, 255
%60 = call i32 @SendChar(i32 %59)
%61 = load i16, i16* %12
%62 = zext i16 %61 to i32
%63 = ashr i32 %62, 8
%64 = and i32 %63, 255
%65 = call i32 @SendChar(i32 %64)
%66 = load i16, i16* %12
%67 = zext i16 %66 to i32
%68 = and i32 %67, 255
%69 = call i32 @SendChar(i32 %68)
%70 = call i32 @SendChar(i32 255)
%71 = call i32 @SendChar(i32 252)
%72 = call i32 @SendChar(i32 255)
%73 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @GraphSetViewport(i16 zeroext %0, i16 zeroext %1, i16 signext %2, i16 zeroext %3, i16 signext %4, i16 zeroext %5) {
%7 = tail call i32 @SendChar(i32 238)
%8 = tail call i32 @SendChar(i32 177)
%9 = tail call i32 @SendChar(i32 52)
%10 = zext i16 %0 to i32
%11 = lshr i32 %10, 8
%12 = tail call i32 @SendChar(i32 %11)
%13 = and i32 %10, 255
%14 = tail call i32 @SendChar(i32 %13)
%15 = zext i16 %1 to i32
%16 = lshr i32 %15, 8
%17 = tail call i32 @SendChar(i32 %16)
%18 = and i32 %15, 255
%19 = tail call i32 @SendChar(i32 %18)
%20 = zext i16 %2 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 = zext i16 %3 to i32
%26 = lshr i32 %25, 8
%27 = tail call i32 @SendChar(i32 %26)
%28 = and i32 %25, 255
%29 = tail call i32 @SendChar(i32 %28)
%30 = zext i16 %4 to i32
%31 = lshr i32 %30, 8
%32 = tail call i32 @SendChar(i32 %31)
%33 = and i32 %30, 255
%34 = tail call i32 @SendChar(i32 %33)
%35 = zext i16 %5 to i32
%36 = lshr i32 %35, 8
%37 = tail call i32 @SendChar(i32 %36)
%38 = and i32 %35, 255
%39 = tail call i32 @SendChar(i32 %38)
%40 = tail call i32 @SendChar(i32 255)
%41 = tail call i32 @SendChar(i32 252)
%42 = tail call i32 @SendChar(i32 255)
%43 = tail call i32 @SendChar(i32 255)
ret void
}