void init_pic(void) {
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x20), "a"(0x11));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x21), "a"(0x20));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x21), "a"(0x04));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x21), "a"(0x01));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x21), "a"(0xFF));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0xA0), "a"(0x11));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0xA1), "a"(0x70));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0xA1), "a"(0x02));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0xA1), "a"(0x01));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0xA1), "a"(0xFF));
  ;
  __asm __volatile__("outb %%al,%%dx; jmp 1f; 1:" ::"d"(0x21), "a"(0xFD));
  ;
}


x86 assembly (clang, -O0):
<init_pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edx
mov    $0x11,%eax
out    %al,(%dx)
jmp    1114 <init_pic+0x14>
mov    $0x21,%edx
mov    $0x20,%eax
out    %al,(%dx)
jmp    1124 <init_pic+0x24>
mov    $0x21,%edx
mov    $0x4,%eax
out    %al,(%dx)
jmp    1134 <init_pic+0x34>
mov    $0x21,%edx
mov    $0x1,%eax
out    %al,(%dx)
jmp    1144 <init_pic+0x44>
mov    $0x21,%edx
mov    $0xff,%eax
out    %al,(%dx)
jmp    1154 <init_pic+0x54>
mov    $0xa0,%edx
mov    $0x11,%eax
out    %al,(%dx)
jmp    1164 <init_pic+0x64>
mov    $0xa1,%edx
mov    $0x70,%eax
out    %al,(%dx)
jmp    1174 <init_pic+0x74>
mov    $0xa1,%edx
mov    $0x2,%eax
out    %al,(%dx)
jmp    1184 <init_pic+0x84>
mov    $0xa1,%edx
mov    $0x1,%eax
out    %al,(%dx)
jmp    1194 <init_pic+0x94>
mov    $0xa1,%edx
mov    $0xff,%eax
out    %al,(%dx)
jmp    11a4 <init_pic+0xa4>
mov    $0x21,%edx
mov    $0xfd,%eax
out    %al,(%dx)
jmp    11b4 <init_pic+0xb4>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_pic>:
mov    $0x20,%edx
mov    $0x11,%eax
out    %al,(%dx)
jmp    110d <init_pic+0xd>
mov    $0x21,%edx
mov    $0x20,%eax
out    %al,(%dx)
jmp    111a <init_pic+0x1a>
mov    $0x21,%edx
mov    $0x4,%eax
out    %al,(%dx)
jmp    1127 <init_pic+0x27>
mov    $0x21,%edx
mov    $0x1,%eax
out    %al,(%dx)
jmp    1134 <init_pic+0x34>
mov    $0x21,%edx
mov    $0xff,%eax
out    %al,(%dx)
jmp    1141 <init_pic+0x41>
mov    $0xa0,%edx
mov    $0x11,%eax
out    %al,(%dx)
jmp    114e <init_pic+0x4e>
mov    $0xa1,%edx
mov    $0x70,%eax
out    %al,(%dx)
jmp    115b <init_pic+0x5b>
mov    $0xa1,%edx
mov    $0x2,%eax
out    %al,(%dx)
jmp    1168 <init_pic+0x68>
mov    $0xa1,%edx
mov    $0x1,%eax
out    %al,(%dx)
jmp    1175 <init_pic+0x75>
mov    $0xa1,%edx
mov    $0xff,%eax
out    %al,(%dx)
jmp    1182 <init_pic+0x82>
mov    $0x21,%edx
mov    $0xfd,%eax
out    %al,(%dx)
jmp    118f <init_pic+0x8f>
ret

LLVM IR (-O0):
define void @init_pic() {
ret void
}

LLVM IR (-O2):
define void @init_pic() {
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 32, i32 17)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33, i32 32)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33, i32 4)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33, i32 1)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33, i32 255)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 160, i32 17)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 161, i32 112)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 161, i32 2)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 161, i32 1)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 161, i32 255)
tail call void asm sideeffect "outb %al,%dx; jmp 1f; 1:", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33, i32 253)
ret void
}