#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*/ outb(int, int);
void setup_pic(void) {
  outb(0x20, 0x11);
  outb(0xa0, 0x11);
  outb(0x21, 8);
  outb(0xa1, 0x70);
  outb(0x21, 0x04);
  outb(0xa1, 0x02);
  outb(0x21, 0x01);
  outb(0xa1, 0x01);
  outb(0x21, ~(1 << 2));
  outb(0xa1, ~0);
  outb(0x4d0, 0);
  outb(0x4d1, 0x0c);
}


x86 assembly (clang, -O0):
<setup_pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x8,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x70,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0xfffffffb,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xffffffff,%esi
call   1030 <outb@plt>
mov    $0x4d0,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x4d1,%edi
mov    $0xc,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_pic>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x8,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x70,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0xfffffffb,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xffffffff,%esi
call   1030 <outb@plt>
mov    $0x4d0,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x4d1,%edi
mov    $0xc,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @setup_pic() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 160, i32 17)
%3 = call i32 @outb(i32 33, i32 8)
%4 = call i32 @outb(i32 161, i32 112)
%5 = call i32 @outb(i32 33, i32 4)
%6 = call i32 @outb(i32 161, i32 2)
%7 = call i32 @outb(i32 33, i32 1)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 33, i32 -5)
%10 = call i32 @outb(i32 161, i32 -1)
%11 = call i32 @outb(i32 1232, i32 0)
%12 = call i32 @outb(i32 1233, i32 12)
ret void
}

LLVM IR (-O2):
define void @setup_pic() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 160, i32 17)
%3 = tail call i32 @outb(i32 33, i32 8)
%4 = tail call i32 @outb(i32 161, i32 112)
%5 = tail call i32 @outb(i32 33, i32 4)
%6 = tail call i32 @outb(i32 161, i32 2)
%7 = tail call i32 @outb(i32 33, i32 1)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 33, i32 -5)
%10 = tail call i32 @outb(i32 161, i32 -1)
%11 = tail call i32 @outb(i32 1232, i32 0)
%12 = tail call i32 @outb(i32 1233, i32 12)
ret void
}