void xIntDisable(unsigned long ulInterrupt) {
  ;
  if (ulInterrupt == 4) {
    (*((volatile unsigned long *)(0xE000ED24))) &= ~(0x00010000);
  } else if (ulInterrupt == 5) {
    (*((volatile unsigned long *)(0xE000ED24))) &= ~(0x00020000);
  } else if (ulInterrupt == 6) {
    (*((volatile unsigned long *)(0xE000ED24))) &= ~(0x00040000);
  } else if (ulInterrupt == 15) {
    (*((volatile unsigned long *)(0xE000E010))) &= ~(0x00000002);
  } else if (((ulInterrupt & 0xFF) >= 16) && ((ulInterrupt & 0xFF) < 84)) {
    (*((volatile unsigned long *)(0xE000E180 +
                                  ((ulInterrupt & 0xFF) / 32) * 4))) =
        1 << ((ulInterrupt & 0xFF) % 32);
  } else if ((((ulInterrupt >> 8) & 0xFF) >= 16) &&
             (((ulInterrupt >> 8) & 0xFF) <= 84)) {
    (*((volatile unsigned long *)(0xE000E180 +
                                  (((ulInterrupt >> 8) & 0xFF) / 32) * 4))) =
        1 << (((ulInterrupt >> 8) & 0xFF) % 32);
  } else if (ulInterrupt == 0x08290000) {
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (40 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (41 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (42 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (43 - 16);
  } else if (ulInterrupt == 0x11030000) {
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (22 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (23 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (24 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (25 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (26 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (39 - 16);
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (56 - 48);
  } else if (ulInterrupt == 0x09110000) {
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (27 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (28 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (29 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (30 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (31 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (32 - 16);
    (*((volatile unsigned long *)(0xE000E180))) = 1 << (33 - 16);
  } else if (ulInterrupt == 0x10210000) {
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (72 - 48);
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (73 - 48);
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (74 - 48);
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (75 - 48);
    (*((volatile unsigned long *)(0xE000E184))) = 1 << (76 - 48);
  }
}


x86 assembly (clang, -O0):
<xIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x4,-0x8(%rbp)
jne    112f <xIntDisable+0x2f>
mov    $0xe000ed24,%eax
mov    (%rax),%rcx
and    $0xfffffffffffeffff,%rcx
mov    $0xe000ed24,%eax
mov    %rcx,(%rax)
jmp    140b <xIntDisable+0x30b>
cmpq   $0x5,-0x8(%rbp)
jne    1156 <xIntDisable+0x56>
mov    $0xe000ed24,%eax
mov    (%rax),%rcx
and    $0xfffffffffffdffff,%rcx
mov    $0xe000ed24,%eax
mov    %rcx,(%rax)
jmp    1406 <xIntDisable+0x306>
cmpq   $0x6,-0x8(%rbp)
jne    117d <xIntDisable+0x7d>
mov    $0xe000ed24,%eax
mov    (%rax),%rcx
and    $0xfffffffffffbffff,%rcx
mov    $0xe000ed24,%eax
mov    %rcx,(%rax)
jmp    1401 <xIntDisable+0x301>
cmpq   $0xf,-0x8(%rbp)
jne    11a1 <xIntDisable+0xa1>
mov    $0xe000e010,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    $0xe000e010,%eax
mov    %rcx,(%rax)
jmp    13fc <xIntDisable+0x2fc>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
cmp    $0x10,%rax
jb     120a <xIntDisable+0x10a>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
cmp    $0x54,%rax
jae    120a <xIntDisable+0x10a>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
and    $0xff,%rax
shr    $0x5,%rax
shl    $0x2,%rax
movabs $0xe000e180,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
jmp    13f7 <xIntDisable+0x2f7>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
cmp    $0x10,%rax
jb     1283 <xIntDisable+0x183>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
cmp    $0x54,%rax
ja     1283 <xIntDisable+0x183>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
shr    $0x5,%rax
shl    $0x2,%rax
movabs $0xe000e180,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
jmp    13f2 <xIntDisable+0x2f2>
cmpq   $0x8290000,-0x8(%rbp)
08
jne    12c6 <xIntDisable+0x1c6>
mov    $0xe000e180,%eax
movq   $0x1000000,(%rax)
mov    $0xe000e180,%eax
movq   $0x2000000,(%rax)
mov    $0xe000e180,%eax
movq   $0x4000000,(%rax)
mov    $0xe000e180,%eax
movq   $0x8000000,(%rax)
jmp    13ed <xIntDisable+0x2ed>
cmpq   $0x11030000,-0x8(%rbp)
11
jne    132d <xIntDisable+0x22d>
mov    $0xe000e180,%eax
movq   $0x40,(%rax)
mov    $0xe000e180,%eax
movq   $0x80,(%rax)
mov    $0xe000e180,%eax
movq   $0x100,(%rax)
mov    $0xe000e180,%eax
movq   $0x200,(%rax)
mov    $0xe000e180,%eax
movq   $0x400,(%rax)
mov    $0xe000e180,%eax
movq   $0x800000,(%rax)
mov    $0xe000e184,%eax
movq   $0x100,(%rax)
jmp    13e8 <xIntDisable+0x2e8>
cmpq   $0x9110000,-0x8(%rbp)
09
jne    1394 <xIntDisable+0x294>
mov    $0xe000e180,%eax
movq   $0x800,(%rax)
mov    $0xe000e180,%eax
movq   $0x1000,(%rax)
mov    $0xe000e180,%eax
movq   $0x2000,(%rax)
mov    $0xe000e180,%eax
movq   $0x4000,(%rax)
mov    $0xe000e180,%eax
movq   $0x8000,(%rax)
mov    $0xe000e180,%eax
movq   $0x10000,(%rax)
mov    $0xe000e180,%eax
movq   $0x20000,(%rax)
jmp    13e3 <xIntDisable+0x2e3>
cmpq   $0x10210000,-0x8(%rbp)
10
jne    13de <xIntDisable+0x2de>
mov    $0xe000e184,%eax
movq   $0x1000000,(%rax)
mov    $0xe000e184,%eax
movq   $0x2000000,(%rax)
mov    $0xe000e184,%eax
movq   $0x4000000,(%rax)
mov    $0xe000e184,%eax
movq   $0x8000000,(%rax)
mov    $0xe000e184,%eax
movq   $0x10000000,(%rax)
jmp    13e3 <xIntDisable+0x2e3>
jmp    13e8 <xIntDisable+0x2e8>
jmp    13ed <xIntDisable+0x2ed>
jmp    13f2 <xIntDisable+0x2f2>
jmp    13f7 <xIntDisable+0x2f7>
jmp    13fc <xIntDisable+0x2fc>
jmp    1401 <xIntDisable+0x301>
jmp    1406 <xIntDisable+0x306>
jmp    140b <xIntDisable+0x30b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xIntDisable>:
lea    -0x4(%rdi),%rax
cmp    $0xb,%rax
ja     114d <xIntDisable+0x4d>
lea    0xeef(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xe000e180,%eax
andq   $0xfffffffffffeffff,0xba4(%rax)
ff ff fe ff
ret
mov    $0xe000e180,%eax
andq   $0xfffffffffffdffff,0xba4(%rax)
ff ff fd ff
ret
mov    $0xe000e180,%eax
andq   $0xfffffffffffbffff,0xba4(%rax)
ff ff fb ff
ret
movzbl %dil,%eax
add    $0xfffffffffffffff0,%rax
cmp    $0x43,%rax
ja     117a <xIntDisable+0x7a>
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
shr    $0x3,%rdi
jmp    119b <xIntDisable+0x9b>
mov    $0xe000e180,%eax
andq   $0xfffffffffffffffd,-0x170(%rax)
fd
ret
mov    %rdi,%rcx
shr    $0x8,%rcx
movzbl %cl,%eax
add    $0xfffffffffffffff0,%rax
cmp    $0x44,%rax
ja     11a8 <xIntDisable+0xa8>
mov    $0x1,%eax
shl    %cl,%eax
cltq
shr    $0xb,%rdi
and    $0x1c,%edi
mov    $0xe000e180,%ecx
mov    %rax,(%rdi,%rcx,1)
ret
cmp    $0x1020ffff,%rdi
jg     1202 <xIntDisable+0x102>
cmp    $0x8290000,%rdi
je     1250 <xIntDisable+0x150>
cmp    $0x9110000,%rdi
jne    129f <xIntDisable+0x19f>
mov    $0xe000e180,%eax
movq   $0x800,(%rax)
movq   $0x1000,(%rax)
movq   $0x2000,(%rax)
movq   $0x4000,(%rax)
movq   $0x8000,(%rax)
movq   $0x10000,(%rax)
movq   $0x20000,(%rax)
ret
cmp    $0x10210000,%rdi
je     1272 <xIntDisable+0x172>
cmp    $0x11030000,%rdi
jne    129f <xIntDisable+0x19f>
mov    $0xe000e180,%eax
movq   $0x40,(%rax)
movq   $0x80,(%rax)
movq   $0x100,(%rax)
movq   $0x200,(%rax)
movq   $0x400,(%rax)
movq   $0x800000,(%rax)
movq   $0x100,0x4(%rax)
ret
mov    $0xe000e180,%eax
movq   $0x1000000,(%rax)
movq   $0x2000000,(%rax)
movq   $0x4000000,(%rax)
movq   $0x8000000,(%rax)
ret
mov    $0xe000e180,%eax
movq   $0x1000000,0x4(%rax)
01
movq   $0x2000000,0x4(%rax)
02
movq   $0x4000000,0x4(%rax)
04
movq   $0x8000000,0x4(%rax)
08
movq   $0x10000000,0x4(%rax)
10
ret

LLVM IR (-O0):
define void @xIntDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 4
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%7 = and i64 %6, -65537
store volatile i64 %7, i64* inttoptr (i64 3758157092 to i64*)
br label %97
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 5
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%13 = and i64 %12, -131073
store volatile i64 %13, i64* inttoptr (i64 3758157092 to i64*)
br label %96
14: ; preds = %8
%15 = load i64, i64* %2
%16 = icmp eq i64 %15, 6
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%19 = and i64 %18, -262145
store volatile i64 %19, i64* inttoptr (i64 3758157092 to i64*)
br label %95
20: ; preds = %14
%21 = load i64, i64* %2
%22 = icmp eq i64 %21, 15
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%25 = and i64 %24, -3
store volatile i64 %25, i64* inttoptr (i64 3758153744 to i64*)
br label %94
26: ; preds = %20
%27 = load i64, i64* %2
%28 = and i64 %27, 255
%29 = icmp uge i64 %28, 16
br i1 %29, label %30, label %47
30: ; preds = %26
%31 = load i64, i64* %2
%32 = and i64 %31, 255
%33 = icmp ult i64 %32, 84
br i1 %33, label %34, label %47
34: ; preds = %30
%35 = load i64, i64* %2
%36 = and i64 %35, 255
%37 = urem i64 %36, 32
%38 = trunc i64 %37 to i32
%39 = shl i32 1, %38
%40 = sext i32 %39 to i64
%41 = load i64, i64* %2
%42 = and i64 %41, 255
%43 = udiv i64 %42, 32
%44 = mul i64 %43, 4
%45 = add i64 3758154112, %44
%46 = inttoptr i64 %45 to i64*
store volatile i64 %40, i64* %46
br label %93
47: ; preds = %30, %26
%48 = load i64, i64* %2
%49 = lshr i64 %48, 8
%50 = and i64 %49, 255
%51 = icmp uge i64 %50, 16
br i1 %51, label %52, label %72
52: ; preds = %47
%53 = load i64, i64* %2
%54 = lshr i64 %53, 8
%55 = and i64 %54, 255
%56 = icmp ule i64 %55, 84
br i1 %56, label %57, label %72
57: ; preds = %52
%58 = load i64, i64* %2
%59 = lshr i64 %58, 8
%60 = and i64 %59, 255
%61 = urem i64 %60, 32
%62 = trunc i64 %61 to i32
%63 = shl i32 1, %62
%64 = sext i32 %63 to i64
%65 = load i64, i64* %2
%66 = lshr i64 %65, 8
%67 = and i64 %66, 255
%68 = udiv i64 %67, 32
%69 = mul i64 %68, 4
%70 = add i64 3758154112, %69
%71 = inttoptr i64 %70 to i64*
store volatile i64 %64, i64* %71
br label %92
72: ; preds = %52, %47
%73 = load i64, i64* %2
%74 = icmp eq i64 %73, 136904704
br i1 %74, label %75, label %76
75: ; preds = %72
store volatile i64 16777216, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 33554432, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 67108864, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 134217728, i64* inttoptr (i64 3758154112 to i64*)
br label %91
76: ; preds = %72
%77 = load i64, i64* %2
%78 = icmp eq i64 %77, 285409280
br i1 %78, label %79, label %80
79: ; preds = %76
store volatile i64 64, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 128, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 256, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 512, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 1024, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 8388608, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 256, i64* inttoptr (i64 3758154116 to i64*)
br label %90
80: ; preds = %76
%81 = load i64, i64* %2
%82 = icmp eq i64 %81, 152109056
br i1 %82, label %83, label %84
83: ; preds = %80
store volatile i64 2048, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 4096, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 8192, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 16384, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 32768, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 65536, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 131072, i64* inttoptr (i64 3758154112 to i64*)
br label %89
84: ; preds = %80
%85 = load i64, i64* %2
%86 = icmp eq i64 %85, 270598144
br i1 %86, label %87, label %88
87: ; preds = %84
store volatile i64 16777216, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 33554432, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 67108864, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 134217728, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 268435456, i64* inttoptr (i64 3758154116 to i64*)
br label %88
88: ; preds = %87, %84
br label %89
89: ; preds = %88, %83
br label %90
90: ; preds = %89, %79
br label %91
91: ; preds = %90, %75
br label %92
92: ; preds = %91, %57
br label %93
93: ; preds = %92, %34
br label %94
94: ; preds = %93, %23
br label %95
95: ; preds = %94, %17
br label %96
96: ; preds = %95, %11
br label %97
97: ; preds = %96, %5
ret void
}

LLVM IR (-O2):
define void @xIntDisable(i64 %0) {
switch i64 %0, label %14 [
i64 4, label %2
i64 5, label %5
i64 6, label %8
i64 15, label %11
]
2: ; preds = %1
%3 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%4 = and i64 %3, -65537
store volatile i64 %4, i64* inttoptr (i64 3758157092 to i64*)
br label %46
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%7 = and i64 %6, -131073
store volatile i64 %7, i64* inttoptr (i64 3758157092 to i64*)
br label %46
8: ; preds = %1
%9 = load volatile i64, i64* inttoptr (i64 3758157092 to i64*)
%10 = and i64 %9, -262145
store volatile i64 %10, i64* inttoptr (i64 3758157092 to i64*)
br label %46
11: ; preds = %1
%12 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%13 = and i64 %12, -3
store volatile i64 %13, i64* inttoptr (i64 3758153744 to i64*)
br label %46
14: ; preds = %1
%15 = and i64 %0, 255
%16 = add nsw i64 %15, -16
%17 = icmp ult i64 %16, 68
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = trunc i64 %0 to i32
%20 = and i32 %19, 31
%21 = shl nuw i32 1, %20
%22 = sext i32 %21 to i64
%23 = lshr i64 %0, 3
%24 = and i64 %23, 28
%25 = or i64 %24, 3758154112
%26 = inttoptr i64 %25 to i64*
store volatile i64 %22, i64* %26
br label %46
27: ; preds = %14
%28 = lshr i64 %0, 8
%29 = and i64 %28, 255
%30 = add nsw i64 %29, -16
%31 = icmp ult i64 %30, 69
br i1 %31, label %32, label %41
32: ; preds = %27
%33 = trunc i64 %28 to i32
%34 = and i32 %33, 31
%35 = shl nuw i32 1, %34
%36 = sext i32 %35 to i64
%37 = lshr i64 %0, 11
%38 = and i64 %37, 28
%39 = or i64 %38, 3758154112
%40 = inttoptr i64 %39 to i64*
store volatile i64 %36, i64* %40
br label %46
41: ; preds = %27
switch i64 %0, label %46 [
i64 136904704, label %42
i64 285409280, label %43
i64 152109056, label %44
i64 270598144, label %45
]
42: ; preds = %41
store volatile i64 16777216, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 33554432, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 67108864, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 134217728, i64* inttoptr (i64 3758154112 to i64*)
br label %46
43: ; preds = %41
store volatile i64 64, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 128, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 256, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 512, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 1024, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 8388608, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 256, i64* inttoptr (i64 3758154116 to i64*)
br label %46
44: ; preds = %41
store volatile i64 2048, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 4096, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 8192, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 16384, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 32768, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 65536, i64* inttoptr (i64 3758154112 to i64*)
store volatile i64 131072, i64* inttoptr (i64 3758154112 to i64*)
br label %46
45: ; preds = %41
store volatile i64 16777216, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 33554432, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 67108864, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 134217728, i64* inttoptr (i64 3758154116 to i64*)
store volatile i64 268435456, i64* inttoptr (i64 3758154116 to i64*)
br label %46
46: ; preds = %41, %5, %11, %32, %43, %45, %44, %42, %18, %8, %2
ret void
}