#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*/ vortex86mx_writepnpaddr(int);
int /*<<< orphan*/ vortex86mx_writepnpdata(int);
int /*<<< orphan*/ vortex86mx_writesiobyte(int, int);
int /*<<< orphan*/ vortex86mx_writesioword(int, int);
int /*<<< orphan*/ vt8235_writepnpaddr(int);
int /*<<< orphan*/ vt8235_writepnpdata(int);
void enable_vortex86mx_serial(void) {
  vortex86mx_writepnpaddr(0x87);
  vortex86mx_writepnpaddr(0x87);
  vortex86mx_writepnpaddr(0x7);
  vortex86mx_writepnpdata(0x2);
  vortex86mx_writepnpaddr(0x30);
  vortex86mx_writepnpdata(0x1);
  vt8235_writepnpaddr(0x60);
  vt8235_writepnpdata(0xfe);
  vt8235_writepnpaddr(0x70);
  vt8235_writepnpdata(0x4);
  vt8235_writepnpaddr(0xf0);
  vt8235_writepnpdata(0x2);
  vortex86mx_writepnpaddr(0xaa);
  vortex86mx_writesiobyte(0x3fb, 0x80);
  vortex86mx_writesioword(0x3f8, 1);
  vortex86mx_writesiobyte(0x3fb, 3);
  vortex86mx_writesiobyte(0x3fc, 3);
  vortex86mx_writesiobyte(0x3f9, 0xf);
  vortex86mx_writesiobyte(0x3f8, 48);
}


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

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

LLVM IR (-O0):
define void @enable_vortex86mx_serial() {
%1 = call i32 @vortex86mx_writepnpaddr(i32 135)
%2 = call i32 @vortex86mx_writepnpaddr(i32 135)
%3 = call i32 @vortex86mx_writepnpaddr(i32 7)
%4 = call i32 @vortex86mx_writepnpdata(i32 2)
%5 = call i32 @vortex86mx_writepnpaddr(i32 48)
%6 = call i32 @vortex86mx_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 @vortex86mx_writepnpaddr(i32 170)
%14 = call i32 @vortex86mx_writesiobyte(i32 1019, i32 128)
%15 = call i32 @vortex86mx_writesioword(i32 1016, i32 1)
%16 = call i32 @vortex86mx_writesiobyte(i32 1019, i32 3)
%17 = call i32 @vortex86mx_writesiobyte(i32 1020, i32 3)
%18 = call i32 @vortex86mx_writesiobyte(i32 1017, i32 15)
%19 = call i32 @vortex86mx_writesiobyte(i32 1016, i32 48)
ret void
}

LLVM IR (-O2):
define void @enable_vortex86mx_serial() {
%1 = tail call i32 @vortex86mx_writepnpaddr(i32 135)
%2 = tail call i32 @vortex86mx_writepnpaddr(i32 135)
%3 = tail call i32 @vortex86mx_writepnpaddr(i32 7)
%4 = tail call i32 @vortex86mx_writepnpdata(i32 2)
%5 = tail call i32 @vortex86mx_writepnpaddr(i32 48)
%6 = tail call i32 @vortex86mx_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 @vortex86mx_writepnpaddr(i32 170)
%14 = tail call i32 @vortex86mx_writesiobyte(i32 1019, i32 128)
%15 = tail call i32 @vortex86mx_writesioword(i32 1016, i32 1)
%16 = tail call i32 @vortex86mx_writesiobyte(i32 1019, i32 3)
%17 = tail call i32 @vortex86mx_writesiobyte(i32 1020, i32 3)
%18 = tail call i32 @vortex86mx_writesiobyte(i32 1017, i32 15)
%19 = tail call i32 @vortex86mx_writesiobyte(i32 1016, i32 48)
ret void
}