void IntPendClear(unsigned long ulInterrupt) {
  ;
  if (ulInterrupt == 14) {
    (*((volatile unsigned long *)(0xE000ED04))) |= 0x08000000;
  } else if (ulInterrupt == 15) {
    (*((volatile unsigned long *)(0xE000ED04))) |= 0x02000000;
  } else if ((ulInterrupt >= 16) && (ulInterrupt <= 47)) {
    (*((volatile unsigned long *)(0xE000E280))) = 1 << (ulInterrupt - 16);
  } else if (ulInterrupt >= 48) {
    (*((volatile unsigned long *)(0xE000E284))) = 1 << (ulInterrupt - 48);
  }
}


x86 assembly (clang, -O0):
<IntPendClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0xe,-0x8(%rbp)
jne    112f <IntPendClear+0x2f>
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
or     $0x8000000,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
jmp    11c3 <IntPendClear+0xc3>
cmpq   $0xf,-0x8(%rbp)
jne    1156 <IntPendClear+0x56>
mov    $0xe000ed04,%eax
mov    (%rax),%rcx
or     $0x2000000,%rcx
mov    $0xe000ed04,%eax
mov    %rcx,(%rax)
jmp    11be <IntPendClear+0xbe>
cmpq   $0x10,-0x8(%rbp)
jb     118d <IntPendClear+0x8d>
cmpq   $0x2f,-0x8(%rbp)
ja     118d <IntPendClear+0x8d>
mov    -0x8(%rbp),%rax
sub    $0x10,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe000e280,%eax
mov    %rcx,(%rax)
jmp    11b9 <IntPendClear+0xb9>
cmpq   $0x30,-0x8(%rbp)
jb     11b4 <IntPendClear+0xb4>
mov    -0x8(%rbp),%rax
sub    $0x30,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe000e284,%eax
mov    %rcx,(%rax)
jmp    11b9 <IntPendClear+0xb9>
jmp    11be <IntPendClear+0xbe>
jmp    11c3 <IntPendClear+0xc3>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntPendClear>:
cmp    $0xf,%rdi
je     1119 <IntPendClear+0x19>
cmp    $0xe,%rdi
jne    1126 <IntPendClear+0x26>
mov    $0xe000ed04,%eax
orq    $0x8000000,(%rax)
ret
mov    $0xe000ed04,%eax
orq    $0x2000000,(%rax)
ret
lea    -0x10(%rdi),%rax
cmp    $0x1f,%rax
ja     114c <IntPendClear+0x4c>
add    $0xf0,%dil
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
mov    $0xe000ed04,%ecx
mov    %rax,-0xa84(%rcx)
ret
cmp    $0x30,%rdi
jb     116d <IntPendClear+0x6d>
add    $0xd0,%dil
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
cltq
mov    $0xe000ed04,%ecx
mov    %rax,-0xa80(%rcx)
ret

LLVM IR (-O0):
define void @IntPendClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 14
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%7 = or i64 %6, 134217728
store volatile i64 %7, i64* inttoptr (i64 3758157060 to i64*)
br label %38
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 15
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%13 = or i64 %12, 33554432
store volatile i64 %13, i64* inttoptr (i64 3758157060 to i64*)
br label %37
14: ; preds = %8
%15 = load i64, i64* %2
%16 = icmp uge i64 %15, 16
br i1 %16, label %17, label %26
17: ; preds = %14
%18 = load i64, i64* %2
%19 = icmp ule i64 %18, 47
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load i64, i64* %2
%22 = sub i64 %21, 16
%23 = trunc i64 %22 to i32
%24 = shl i32 1, %23
%25 = sext i32 %24 to i64
store volatile i64 %25, i64* inttoptr (i64 3758154368 to i64*)
br label %36
26: ; preds = %17, %14
%27 = load i64, i64* %2
%28 = icmp uge i64 %27, 48
br i1 %28, label %29, label %35
29: ; preds = %26
%30 = load i64, i64* %2
%31 = sub i64 %30, 48
%32 = trunc i64 %31 to i32
%33 = shl i32 1, %32
%34 = sext i32 %33 to i64
store volatile i64 %34, i64* inttoptr (i64 3758154372 to i64*)
br label %35
35: ; preds = %29, %26
br label %36
36: ; preds = %35, %20
br label %37
37: ; preds = %36, %11
br label %38
38: ; preds = %37, %5
ret void
}

LLVM IR (-O2):
define void @IntPendClear(i64 %0) {
switch i64 %0, label %8 [
i64 14, label %2
i64 15, label %5
]
2: ; preds = %1
%3 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%4 = or i64 %3, 134217728
store volatile i64 %4, i64* inttoptr (i64 3758157060 to i64*)
br label %23
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758157060 to i64*)
%7 = or i64 %6, 33554432
store volatile i64 %7, i64* inttoptr (i64 3758157060 to i64*)
br label %23
8: ; preds = %1
%9 = add i64 %0, -16
%10 = icmp ult i64 %9, 32
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = trunc i64 %0 to i32
%13 = add nsw i32 %12, -16
%14 = shl nuw i32 1, %13
%15 = sext i32 %14 to i64
store volatile i64 %15, i64* inttoptr (i64 3758154368 to i64*)
br label %23
16: ; preds = %8
%17 = icmp ugt i64 %0, 47
br i1 %17, label %18, label %23
18: ; preds = %16
%19 = trunc i64 %0 to i32
%20 = add i32 %19, -48
%21 = shl nuw i32 1, %20
%22 = sext i32 %21 to i64
store volatile i64 %22, i64* inttoptr (i64 3758154372 to i64*)
br label %23
23: ; preds = %5, %16, %18, %11, %2
ret void
}