#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 inb(int);
int /*<<< orphan*/ outb(int, int);
void pic() {
  outb(0xC0000020u, 0x11);
  outb(0xC00000A0u, 0x11);
  outb(0xC0000021u, 0x20);
  outb(0xC00000A1u, 0x28);
  outb(0xC0000021u, 0x4);
  outb(0xC00000A1u, 0x2);
  outb(0xC0000021u, 1);
  outb(0xC00000A1u, 1);
  outb(0xC0000021u, 0);
  outb(0xC00000A1u, 0);
  outb(0xC0000021u, inb(0xC0000021u) & 0xFD);
  outb(0xC00000A1u, inb(0xC00000A1u) & 0xFF);
}


x86 assembly (clang, -O0):
<pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc0000020,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xc00000a0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
call   1040 <inb@plt>
mov    %eax,%esi
and    $0xfd,%esi
mov    $0xc0000021,%edi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
call   1040 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
mov    $0xc00000a1,%edi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic>:
push   %rax
mov    $0xc0000020,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xc00000a0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xc0000021,%edi
call   1040 <inb@plt>
and    $0xfd,%eax
mov    $0xc0000021,%edi
mov    %eax,%esi
call   1030 <outb@plt>
mov    $0xc00000a1,%edi
call   1040 <inb@plt>
movzbl %al,%esi
mov    $0xc00000a1,%edi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pic() {
%1 = call i32 @outb(i32 -1073741792, i32 17)
%2 = call i32 @outb(i32 -1073741664, i32 17)
%3 = call i32 @outb(i32 -1073741791, i32 32)
%4 = call i32 @outb(i32 -1073741663, i32 40)
%5 = call i32 @outb(i32 -1073741791, i32 4)
%6 = call i32 @outb(i32 -1073741663, i32 2)
%7 = call i32 @outb(i32 -1073741791, i32 1)
%8 = call i32 @outb(i32 -1073741663, i32 1)
%9 = call i32 @outb(i32 -1073741791, i32 0)
%10 = call i32 @outb(i32 -1073741663, i32 0)
%11 = call i32 @inb(i32 -1073741791)
%12 = and i32 %11, 253
%13 = call i32 @outb(i32 -1073741791, i32 %12)
%14 = call i32 @inb(i32 -1073741663)
%15 = and i32 %14, 255
%16 = call i32 @outb(i32 -1073741663, i32 %15)
ret void
}

LLVM IR (-O2):
define void @pic() {
%1 = tail call i32 @outb(i32 -1073741792, i32 17)
%2 = tail call i32 @outb(i32 -1073741664, i32 17)
%3 = tail call i32 @outb(i32 -1073741791, i32 32)
%4 = tail call i32 @outb(i32 -1073741663, i32 40)
%5 = tail call i32 @outb(i32 -1073741791, i32 4)
%6 = tail call i32 @outb(i32 -1073741663, i32 2)
%7 = tail call i32 @outb(i32 -1073741791, i32 1)
%8 = tail call i32 @outb(i32 -1073741663, i32 1)
%9 = tail call i32 @outb(i32 -1073741791, i32 0)
%10 = tail call i32 @outb(i32 -1073741663, i32 0)
%11 = tail call i32 @inb(i32 -1073741791)
%12 = and i32 %11, 253
%13 = tail call i32 @outb(i32 -1073741791, i32 %12)
%14 = tail call i32 @inb(i32 -1073741663)
%15 = and i32 %14, 255
%16 = tail call i32 @outb(i32 -1073741663, i32 %15)
ret void
}