#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() {
  outb(0x11, 0x20);
  outb(0x20, 0x21);
  outb(0x4, 0x21);
  outb(0x1, 0x21);
  outb(0x11, 0xa0);
  outb(0x28, 0xa1);
  outb(0x2, 0xa1);
  outb(0x1, 0xa1);
  outb(0x20, 0x20);
  outb(0x20, 0xa0);
  outb(0xff, 0x21);
  outb(0xff, 0xa1);
}


x86 assembly (clang, -O0):
<setup_pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x4,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1030 <outb@plt>
mov    $0x28,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x2,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0xa0,%esi
call   1030 <outb@plt>
mov    $0xff,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0xff,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_pic>:
push   %rax
mov    $0x11,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x4,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1030 <outb@plt>
mov    $0x28,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x2,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0xa1,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0xa0,%esi
call   1030 <outb@plt>
mov    $0xff,%edi
mov    $0x21,%esi
call   1030 <outb@plt>
mov    $0xff,%edi
mov    $0xa1,%esi
pop    %rax
jmp    1030 <outb@plt>

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

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