#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 */

/* Variables and functions */
int /*<<< orphan*/ vt8235_writepnpaddr(int);
int /*<<< orphan*/ vt8235_writepnpdata(int);
int /*<<< orphan*/ vt8235_writesiobyte(int, int);
int /*<<< orphan*/ vt8235_writesioword(int, int);
void enable_vt8235_serial(void) {
  vt8235_writepnpaddr(0x87);
  vt8235_writepnpaddr(0x87);
  vt8235_writepnpaddr(0x7);
  vt8235_writepnpdata(0x2);
  vt8235_writepnpaddr(0x30);
  vt8235_writepnpdata(0x1);
  vt8235_writepnpaddr(0x60);
  vt8235_writepnpdata(0xfe);
  vt8235_writepnpaddr(0x70);
  vt8235_writepnpdata(0x4);
  vt8235_writepnpaddr(0xf0);
  vt8235_writepnpdata(0x2);
  vt8235_writepnpaddr(0xaa);
  vt8235_writesiobyte(0x3fb, 0x80);
  vt8235_writesioword(0x3f8, 1);
  vt8235_writesiobyte(0x3fb, 3);
  vt8235_writesiobyte(0x3fc, 3);
  vt8235_writesiobyte(0x3f9, 0xf);
  vt8235_writesiobyte(0x3f8, 48);
}


x86 assembly (clang, -O0):
<enable_vt8235_serial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x87,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x87,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x7,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x2,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x30,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x1,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x60,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0xfe,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x70,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x4,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0xf0,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x2,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0xaa,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f8,%edi
mov    $0x1,%esi
call   1060 <vt8235_writesioword@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3fc,%edi
mov    $0x3,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f9,%edi
mov    $0xf,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f8,%edi
mov    $0x30,%esi
call   1040 <vt8235_writesiobyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_vt8235_serial>:
push   %rax
mov    $0x87,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x87,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x7,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x2,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x30,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x1,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x60,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0xfe,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0x70,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x4,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0xf0,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x2,%edi
call   1050 <vt8235_writepnpdata@plt>
mov    $0xaa,%edi
call   1030 <vt8235_writepnpaddr@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f8,%edi
mov    $0x1,%esi
call   1060 <vt8235_writesioword@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3fc,%edi
mov    $0x3,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f9,%edi
mov    $0xf,%esi
call   1040 <vt8235_writesiobyte@plt>
mov    $0x3f8,%edi
mov    $0x30,%esi
pop    %rax
jmp    1040 <vt8235_writesiobyte@plt>

LLVM IR (-O0):
define void @enable_vt8235_serial() {
%1 = call i32 @vt8235_writepnpaddr(i32 135)
%2 = call i32 @vt8235_writepnpaddr(i32 135)
%3 = call i32 @vt8235_writepnpaddr(i32 7)
%4 = call i32 @vt8235_writepnpdata(i32 2)
%5 = call i32 @vt8235_writepnpaddr(i32 48)
%6 = call i32 @vt8235_writepnpdata(i32 1)
%7 = call i32 @vt8235_writepnpaddr(i32 96)
%8 = call i32 @vt8235_writepnpdata(i32 254)
%9 = call i32 @vt8235_writepnpaddr(i32 112)
%10 = call i32 @vt8235_writepnpdata(i32 4)
%11 = call i32 @vt8235_writepnpaddr(i32 240)
%12 = call i32 @vt8235_writepnpdata(i32 2)
%13 = call i32 @vt8235_writepnpaddr(i32 170)
%14 = call i32 @vt8235_writesiobyte(i32 1019, i32 128)
%15 = call i32 @vt8235_writesioword(i32 1016, i32 1)
%16 = call i32 @vt8235_writesiobyte(i32 1019, i32 3)
%17 = call i32 @vt8235_writesiobyte(i32 1020, i32 3)
%18 = call i32 @vt8235_writesiobyte(i32 1017, i32 15)
%19 = call i32 @vt8235_writesiobyte(i32 1016, i32 48)
ret void
}

LLVM IR (-O2):
define void @enable_vt8235_serial() {
%1 = tail call i32 @vt8235_writepnpaddr(i32 135)
%2 = tail call i32 @vt8235_writepnpaddr(i32 135)
%3 = tail call i32 @vt8235_writepnpaddr(i32 7)
%4 = tail call i32 @vt8235_writepnpdata(i32 2)
%5 = tail call i32 @vt8235_writepnpaddr(i32 48)
%6 = tail call i32 @vt8235_writepnpdata(i32 1)
%7 = tail call i32 @vt8235_writepnpaddr(i32 96)
%8 = tail call i32 @vt8235_writepnpdata(i32 254)
%9 = tail call i32 @vt8235_writepnpaddr(i32 112)
%10 = tail call i32 @vt8235_writepnpdata(i32 4)
%11 = tail call i32 @vt8235_writepnpaddr(i32 240)
%12 = tail call i32 @vt8235_writepnpdata(i32 2)
%13 = tail call i32 @vt8235_writepnpaddr(i32 170)
%14 = tail call i32 @vt8235_writesiobyte(i32 1019, i32 128)
%15 = tail call i32 @vt8235_writesioword(i32 1016, i32 1)
%16 = tail call i32 @vt8235_writesiobyte(i32 1019, i32 3)
%17 = tail call i32 @vt8235_writesiobyte(i32 1020, i32 3)
%18 = tail call i32 @vt8235_writesiobyte(i32 1017, i32 15)
%19 = tail call i32 @vt8235_writesiobyte(i32 1016, i32 48)
ret void
}