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

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void SetTextInt32(unsigned short int screen_id, unsigned short int control_id,
                  unsigned long value, unsigned char sign,
                  unsigned char fill_zero) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x07) & 0xFF);
  SendChar(((screen_id) >> 8) & 0xFF);
  SendChar((screen_id)&0xFF);
  SendChar(((control_id) >> 8) & 0xFF);
  SendChar((control_id)&0xFF);
  SendChar((sign ? 0X01 : 0X00) & 0xFF);
  SendChar(((fill_zero & 0x0f) | 0x80) & 0xFF);
  SendChar((((value) >> 16) >> 8) & 0xFF);
  SendChar(((value) >> 16) & 0xFF);
  SendChar((((value)&0xFFFF) >> 8) & 0xFF);
  SendChar(((value)&0xFFFF) & 0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<SetTextInt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8b,%al
mov    %di,-0x2(%rbp)
mov    %si,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x7,%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 -0x11(%rbp),%ecx
xor    %edi,%edi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
movzbl -0x12(%rbp),%edi
and    $0xf,%edi
or     $0x80,%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %eax,%edi
call   1030 <SendChar@plt>
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %eax,%edi
call   1030 <SendChar@plt>
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %eax,%edi
call   1030 <SendChar@plt>
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
and    $0xff,%rax
mov    %eax,%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):
<SetTextInt32>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%ebp
mov    %ecx,%r14d
mov    %rdx,%r12
mov    %esi,%r15d
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x7,%edi
call   1030 <SendChar@plt>
mov    %ebx,%edi
shr    $0x8,%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>
xor    %edi,%edi
test   %r14d,%r14d
setne  %dil
call   1030 <SendChar@plt>
and    $0xf,%bpl
or     $0x80,%bpl
movzbl %bpl,%edi
call   1030 <SendChar@plt>
mov    %r12,%rbx
mov    %ebx,%eax
shr    $0x18,%eax
mov    %eax,%edi
call   1030 <SendChar@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <SendChar@plt>
movzbl %bh,%edi
call   1030 <SendChar@plt>
movzbl %bl,%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    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @SetTextInt32(i16 zeroext %0, i16 zeroext %1, i64 %2, i8 zeroext %3, i8 zeroext %4) {
%6 = alloca i16
%7 = alloca i16
%8 = alloca i64
%9 = alloca i8
%10 = alloca i8
store i16 %0, i16* %6
store i16 %1, i16* %7
store i64 %2, i64* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
%11 = call i32 @SendChar(i32 238)
%12 = call i32 @SendChar(i32 177)
%13 = call i32 @SendChar(i32 7)
%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* %9
%33 = zext i8 %32 to i32
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i32 1, i32 0
%37 = and i32 %36, 255
%38 = call i32 @SendChar(i32 %37)
%39 = load i8, i8* %10
%40 = zext i8 %39 to i32
%41 = and i32 %40, 15
%42 = or i32 %41, 128
%43 = and i32 %42, 255
%44 = call i32 @SendChar(i32 %43)
%45 = load i64, i64* %8
%46 = lshr i64 %45, 16
%47 = lshr i64 %46, 8
%48 = and i64 %47, 255
%49 = trunc i64 %48 to i32
%50 = call i32 @SendChar(i32 %49)
%51 = load i64, i64* %8
%52 = lshr i64 %51, 16
%53 = and i64 %52, 255
%54 = trunc i64 %53 to i32
%55 = call i32 @SendChar(i32 %54)
%56 = load i64, i64* %8
%57 = and i64 %56, 65535
%58 = lshr i64 %57, 8
%59 = and i64 %58, 255
%60 = trunc i64 %59 to i32
%61 = call i32 @SendChar(i32 %60)
%62 = load i64, i64* %8
%63 = and i64 %62, 65535
%64 = and i64 %63, 255
%65 = trunc i64 %64 to i32
%66 = call i32 @SendChar(i32 %65)
%67 = call i32 @SendChar(i32 255)
%68 = call i32 @SendChar(i32 252)
%69 = call i32 @SendChar(i32 255)
%70 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @SetTextInt32(i16 zeroext %0, i16 zeroext %1, i64 %2, i8 zeroext %3, i8 zeroext %4) {
%6 = tail call i32 @SendChar(i32 238)
%7 = tail call i32 @SendChar(i32 177)
%8 = tail call i32 @SendChar(i32 7)
%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 = icmp ne i8 %3, 0
%20 = zext i1 %19 to i32
%21 = tail call i32 @SendChar(i32 %20)
%22 = and i8 %4, 15
%23 = or i8 %22, -128
%24 = zext i8 %23 to i32
%25 = tail call i32 @SendChar(i32 %24)
%26 = trunc i64 %2 to i32
%27 = lshr i32 %26, 24
%28 = tail call i32 @SendChar(i32 %27)
%29 = lshr i32 %26, 16
%30 = and i32 %29, 255
%31 = tail call i32 @SendChar(i32 %30)
%32 = lshr i32 %26, 8
%33 = and i32 %32, 255
%34 = tail call i32 @SendChar(i32 %33)
%35 = and i32 %26, 255
%36 = tail call i32 @SendChar(i32 %35)
%37 = tail call i32 @SendChar(i32 255)
%38 = tail call i32 @SendChar(i32 252)
%39 = tail call i32 @SendChar(i32 255)
%40 = tail call i32 @SendChar(i32 255)
ret void
}