void init_irq() {
  (*(volatile unsigned long *)0x56000050) &= ~((3 << (0 * 2)) | (3 << (2 * 2)));
  (*(volatile unsigned long *)0x56000050) |=
      (0x2 << (0 * 2)) | (0x2 << (2 * 2));
  (*(volatile unsigned long *)0x56000060) &= ~(3 << (3 * 2));
  (*(volatile unsigned long *)0x56000060) |= (0x2 << (3 * 2));
  (*(volatile unsigned long *)0x560000a4) &= ~(1 << 11);
  (*(volatile unsigned long *)0x4A00000c) =
      ((*(volatile unsigned long *)0x4A00000c) & ((~0x01) | (0x3 << 7))) |
      (0x0 << 7);
  (*(volatile unsigned long *)0x4A000008) &=
      (~(1 << 0)) & (~(1 << 2)) & (~(1 << 5));
}


x86 assembly (clang, -O0):
<init_irq>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000050,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffcc,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000050,%eax
mov    (%rax),%rcx
or     $0x22,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000060,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff3f,%rcx
mov    $0x56000060,%eax
mov    %rcx,(%rax)
mov    $0x56000060,%eax
mov    (%rax),%rcx
or     $0x80,%rcx
mov    $0x56000060,%eax
mov    %rcx,(%rax)
mov    $0x560000a4,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff7ff,%rcx
mov    $0x560000a4,%eax
mov    %rcx,(%rax)
mov    $0x4a00000c,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
or     $0x0,%rcx
mov    $0x4a00000c,%eax
mov    %rcx,(%rax)
mov    $0x4a000008,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffda,%rcx
mov    $0x4a000008,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_irq>:
andq   $0xffffffffffffffcc,0x56000050
56 cc
orq    $0x22,0x56000050
56 22
andq   $0xffffffffffffff3f,0x56000060
56 3f ff ff ff
orq    $0x80,0x56000060
andq   $0xfffffffffffff7ff,0x560000a4
56 ff f7 ff ff
andq   $0xfffffffffffffffe,0x4a00000c
4a fe
andq   $0xffffffffffffffda,0x4a000008
4a da
ret

LLVM IR (-O0):
define void @init_irq() {
%1 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%2 = and i64 %1, -52
store volatile i64 %2, i64* inttoptr (i64 1442840656 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%4 = or i64 %3, 34
store volatile i64 %4, i64* inttoptr (i64 1442840656 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%6 = and i64 %5, -193
store volatile i64 %6, i64* inttoptr (i64 1442840672 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%8 = or i64 %7, 128
store volatile i64 %8, i64* inttoptr (i64 1442840672 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1442840740 to i64*)
%10 = and i64 %9, -2049
store volatile i64 %10, i64* inttoptr (i64 1442840740 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1241513996 to i64*)
%12 = and i64 %11, -2
%13 = or i64 %12, 0
store volatile i64 %13, i64* inttoptr (i64 1241513996 to i64*)
%14 = load volatile i64, i64* inttoptr (i64 1241513992 to i64*)
%15 = and i64 %14, -38
store volatile i64 %15, i64* inttoptr (i64 1241513992 to i64*)
ret void
}

LLVM IR (-O2):
define void @init_irq() {
%1 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%2 = and i64 %1, -52
store volatile i64 %2, i64* inttoptr (i64 1442840656 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%4 = or i64 %3, 34
store volatile i64 %4, i64* inttoptr (i64 1442840656 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%6 = and i64 %5, -193
store volatile i64 %6, i64* inttoptr (i64 1442840672 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%8 = or i64 %7, 128
store volatile i64 %8, i64* inttoptr (i64 1442840672 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1442840740 to i64*)
%10 = and i64 %9, -2049
store volatile i64 %10, i64* inttoptr (i64 1442840740 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1241513996 to i64*)
%12 = and i64 %11, -2
store volatile i64 %12, i64* inttoptr (i64 1241513996 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 1241513992 to i64*)
%14 = and i64 %13, -38
store volatile i64 %14, i64* inttoptr (i64 1241513992 to i64*)
ret void
}