void IntPendSet(unsigned long ulInterrupt) {
  ;
  if (ulInterrupt == 2) {
    (*((volatile unsigned long *)(0xE000ED04))) |= 0x80000000;
  } else if (ulInterrupt == 14) {
    (*((volatile unsigned long *)(0xE000ED04))) |= 0x10000000;
  } else if (ulInterrupt == 15) {
    (*((volatile unsigned long *)(0xE000ED04))) |= 0x04000000;
  } else if ((ulInterrupt >= 16) && (ulInterrupt <= 47)) {
    (*((volatile unsigned long *)(0xE000E200))) = 1 << (ulInterrupt - 16);
  } else if ((ulInterrupt >= 48) && (ulInterrupt <= 79)) {
    (*((volatile unsigned long *)(0xE000E204))) = 1 << (ulInterrupt - 48);
  } else if (ulInterrupt >= 80) {
    (*((volatile unsigned long *)(0xE000E208))) = 1 << (ulInterrupt - 80);
  }
}


x86 assembly (clang, -O0):
<IntPendSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x2,-0x8(%rbp)
jne    1135 <IntPendSet+0x35>
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
movabs $0x80000000,%rax
or     %rax,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
jmp    1231 <IntPendSet+0x131>
cmpq   $0xe,-0x8(%rbp)
jne    115c <IntPendSet+0x5c>
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
or     $0x10000000,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
jmp    122c <IntPendSet+0x12c>
cmpq   $0xf,-0x8(%rbp)
jne    1183 <IntPendSet+0x83>
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
or     $0x4000000,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
jmp    1227 <IntPendSet+0x127>
cmpq   $0x10,-0x8(%rbp)
jb     11ba <IntPendSet+0xba>
cmpq   $0x2f,-0x8(%rbp)
ja     11ba <IntPendSet+0xba>
mov    -0x8(%rbp),%rax
sub    $0x10,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe000e200,%eax
mov    %rcx,(%rax)
jmp    1222 <IntPendSet+0x122>
cmpq   $0x30,-0x8(%rbp)
jb     11f1 <IntPendSet+0xf1>
cmpq   $0x4f,-0x8(%rbp)
ja     11f1 <IntPendSet+0xf1>
mov    -0x8(%rbp),%rax
sub    $0x30,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe000e204,%eax
mov    %rcx,(%rax)
jmp    121d <IntPendSet+0x11d>
cmpq   $0x50,-0x8(%rbp)
jb     1218 <IntPendSet+0x118>
mov    -0x8(%rbp),%rax
sub    $0x50,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe000e208,%eax
mov    %rcx,(%rax)
jmp    121d <IntPendSet+0x11d>
jmp    1222 <IntPendSet+0x122>
jmp    1227 <IntPendSet+0x127>
jmp    122c <IntPendSet+0x12c>
jmp    1231 <IntPendSet+0x131>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntPendSet>:
cmp    $0xf,%rdi
je     1122 <IntPendSet+0x22>
cmp    $0xe,%rdi
je     112f <IntPendSet+0x2f>
cmp    $0x2,%rdi
jne    113c <IntPendSet+0x3c>
mov    $0xe000ed04,%eax
lea    -0x6000ed04(%rax),%rcx
or     %rcx,(%rax)
ret
mov    $0xe000ed04,%eax
orq    $0x4000000,(%rax)
ret
mov    $0xe000ed04,%eax
orq    $0x10000000,(%rax)
ret
lea    -0x10(%rdi),%rax
cmp    $0x1f,%rax
ja     1162 <IntPendSet+0x62>
add    $0xf0,%dil
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
mov    $0xe000ed04,%ecx
mov    %rax,-0xb04(%rcx)
ret
lea    -0x30(%rdi),%rax
cmp    $0x1f,%rax
ja     1188 <IntPendSet+0x88>
add    $0xd0,%dil
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
mov    $0xe000ed04,%ecx
mov    %rax,-0xb00(%rcx)
ret
cmp    $0x50,%rdi
jb     11a9 <IntPendSet+0xa9>
add    $0xb0,%dil
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
mov    $0xe000ed04,%ecx
mov    %rax,-0xafc(%rcx)
ret

LLVM IR (-O0):
define void @IntPendSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%7 = or i64 %6, 2147483648
store volatile i64 %7, i64* inttoptr (i64 3758157060 to i64*)
br label %58
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 14
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%13 = or i64 %12, 268435456
store volatile i64 %13, i64* inttoptr (i64 3758157060 to i64*)
br label %57
14: ; preds = %8
%15 = load i64, i64* %2
%16 = icmp eq i64 %15, 15
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%19 = or i64 %18, 67108864
store volatile i64 %19, i64* inttoptr (i64 3758157060 to i64*)
br label %56
20: ; preds = %14
%21 = load i64, i64* %2
%22 = icmp uge i64 %21, 16
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i64, i64* %2
%25 = icmp ule i64 %24, 47
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i64, i64* %2
%28 = sub i64 %27, 16
%29 = trunc i64 %28 to i32
%30 = shl i32 1, %29
%31 = sext i32 %30 to i64
store volatile i64 %31, i64* inttoptr (i64 3758154240 to i64*)
br label %55
32: ; preds = %23, %20
%33 = load i64, i64* %2
%34 = icmp uge i64 %33, 48
br i1 %34, label %35, label %44
35: ; preds = %32
%36 = load i64, i64* %2
%37 = icmp ule i64 %36, 79
br i1 %37, label %38, label %44
38: ; preds = %35
%39 = load i64, i64* %2
%40 = sub i64 %39, 48
%41 = trunc i64 %40 to i32
%42 = shl i32 1, %41
%43 = sext i32 %42 to i64
store volatile i64 %43, i64* inttoptr (i64 3758154244 to i64*)
br label %54
44: ; preds = %35, %32
%45 = load i64, i64* %2
%46 = icmp uge i64 %45, 80
br i1 %46, label %47, label %53
47: ; preds = %44
%48 = load i64, i64* %2
%49 = sub i64 %48, 80
%50 = trunc i64 %49 to i32
%51 = shl i32 1, %50
%52 = sext i32 %51 to i64
store volatile i64 %52, i64* inttoptr (i64 3758154248 to i64*)
br label %53
53: ; preds = %47, %44
br label %54
54: ; preds = %53, %38
br label %55
55: ; preds = %54, %26
br label %56
56: ; preds = %55, %17
br label %57
57: ; preds = %56, %11
br label %58
58: ; preds = %57, %5
ret void
}

LLVM IR (-O2):
define void @IntPendSet(i64 %0) {
switch i64 %0, label %11 [
i64 2, label %2
i64 14, label %5
i64 15, label %8
]
2: ; preds = %1
%3 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%4 = or i64 %3, 2147483648
store volatile i64 %4, i64* inttoptr (i64 3758157060 to i64*)
br label %34
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%7 = or i64 %6, 268435456
store volatile i64 %7, i64* inttoptr (i64 3758157060 to i64*)
br label %34
8: ; preds = %1
%9 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%10 = or i64 %9, 67108864
store volatile i64 %10, i64* inttoptr (i64 3758157060 to i64*)
br label %34
11: ; preds = %1
%12 = add i64 %0, -16
%13 = icmp ult i64 %12, 32
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = trunc i64 %0 to i32
%16 = add nsw i32 %15, -16
%17 = shl nuw i32 1, %16
%18 = sext i32 %17 to i64
store volatile i64 %18, i64* inttoptr (i64 3758154240 to i64*)
br label %34
19: ; preds = %11
%20 = add i64 %0, -48
%21 = icmp ult i64 %20, 32
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = trunc i64 %0 to i32
%24 = add nsw i32 %23, -48
%25 = shl nuw i32 1, %24
%26 = sext i32 %25 to i64
store volatile i64 %26, i64* inttoptr (i64 3758154244 to i64*)
br label %34
27: ; preds = %19
%28 = icmp ugt i64 %0, 79
br i1 %28, label %29, label %34
29: ; preds = %27
%30 = trunc i64 %0 to i32
%31 = add i32 %30, -80
%32 = shl nuw i32 1, %31
%33 = sext i32 %32 to i64
store volatile i64 %33, i64* inttoptr (i64 3758154248 to i64*)
br label %34
34: ; preds = %5, %14, %27, %29, %22, %8, %2
ret void
}