void irq_initialize() {
  outb(0x20, 0x10 + 0x01);
  outb(0xA0, 0x10 + 0x01);
  outb((0x20 + 1), 0x20);
  outb((0xA0 + 1), 0x20 + 8);
  outb((0x20 + 1), 4);
  outb((0xA0 + 1), 2);
  outb((0x20 + 1), 0x01);
  outb((0xA0 + 1), 0x01);
  outb((0x20 + 1), 0x00);
  outb((0xA0 + 1), 0x00);
  asm("sti");
}


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

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

LLVM IR (-O0):
define void @irq_initialize() {
%1 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 32, i32 17)
%2 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 160, i32 17)
%3 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 32)
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 40)
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 4)
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 2)
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 1)
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 1)
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 0)
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_initialize() {
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 32, i32 17)
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 160, i32 17)
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 32)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 40)
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 4)
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 2)
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 1)
%8 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 1)
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 33, i32 0)
%10 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 161, i32 0)
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}