void irq_init(void) {
  (*((volatile unsigned long *)0x7F008830)) &= ~(0xfff);
  (*((volatile unsigned long *)0x7F008830)) |= 0xaaa;
  (*((volatile unsigned long *)0x7F008900)) &= ~(0xfff);
  (*((volatile unsigned long *)0x7F008900)) |= 0x777;
  (*((volatile unsigned long *)0x7F008920)) &= ~(0x3f);
  (*((volatile unsigned long *)0x71200010)) |= (0x3);
}


x86 assembly (clang, -O0):
<irq_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008830,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff000,%rcx
mov    $0x7f008830,%eax
mov    %rcx,(%rax)
mov    $0x7f008830,%eax
mov    (%rax),%rcx
or     $0xaaa,%rcx
mov    $0x7f008830,%eax
mov    %rcx,(%rax)
mov    $0x7f008900,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff000,%rcx
mov    $0x7f008900,%eax
mov    %rcx,(%rax)
mov    $0x7f008900,%eax
mov    (%rax),%rcx
or     $0x777,%rcx
mov    $0x7f008900,%eax
mov    %rcx,(%rax)
mov    $0x7f008920,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffc0,%rcx
mov    $0x7f008920,%eax
mov    %rcx,(%rax)
mov    $0x71200010,%eax
mov    (%rax),%rcx
or     $0x3,%rcx
mov    $0x71200010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_init>:
andq   $0xfffffffffffff000,0x7f008830
orq    $0xaaa,0x7f008830
andq   $0xfffffffffffff000,0x7f008900
orq    $0x777,0x7f008900
andq   $0xffffffffffffffc0,0x7f008920
7f c0
orq    $0x3,0x71200010
71 03
ret

LLVM IR (-O0):
define void @irq_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%2 = and i64 %1, -4096
store volatile i64 %2, i64* inttoptr (i64 2130741296 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%4 = or i64 %3, 2730
store volatile i64 %4, i64* inttoptr (i64 2130741296 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130741504 to i64*)
%6 = and i64 %5, -4096
store volatile i64 %6, i64* inttoptr (i64 2130741504 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130741504 to i64*)
%8 = or i64 %7, 1911
store volatile i64 %8, i64* inttoptr (i64 2130741504 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 2130741536 to i64*)
%10 = and i64 %9, -64
store volatile i64 %10, i64* inttoptr (i64 2130741536 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1897922576 to i64*)
%12 = or i64 %11, 3
store volatile i64 %12, i64* inttoptr (i64 1897922576 to i64*)
ret void
}

LLVM IR (-O2):
define void @irq_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%2 = and i64 %1, -4096
store volatile i64 %2, i64* inttoptr (i64 2130741296 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%4 = or i64 %3, 2730
store volatile i64 %4, i64* inttoptr (i64 2130741296 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130741504 to i64*)
%6 = and i64 %5, -4096
store volatile i64 %6, i64* inttoptr (i64 2130741504 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130741504 to i64*)
%8 = or i64 %7, 1911
store volatile i64 %8, i64* inttoptr (i64 2130741504 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 2130741536 to i64*)
%10 = and i64 %9, -64
store volatile i64 %10, i64* inttoptr (i64 2130741536 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1897922576 to i64*)
%12 = or i64 %11, 3
store volatile i64 %12, i64* inttoptr (i64 1897922576 to i64*)
ret void
}