#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
void UARTIntUnregister(unsigned long ulBase) {
  unsigned long ulInt;
  ;
  ulInt = ((ulBase == 0x4000C000)   ? 21
           : (ulBase == 0x4000D000) ? 22
           : (ulBase == 0x4000E000) ? 49
           : (ulBase == 0x4000F000) ? 75
                                    : 76);
  IntDisable(ulInt);
  IntUnregister(ulInt);
}


x86 assembly (clang, -O0):
<UARTIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x4000c000,-0x8(%rbp)
40
jne    1147 <UARTIntUnregister+0x27>
mov    $0x15,%eax
mov    %eax,-0x14(%rbp)
jmp    11a4 <UARTIntUnregister+0x84>
cmpq   $0x4000d000,-0x8(%rbp)
40
jne    1162 <UARTIntUnregister+0x42>
mov    $0x16,%eax
mov    %eax,-0x18(%rbp)
jmp    119e <UARTIntUnregister+0x7e>
cmpq   $0x4000e000,-0x8(%rbp)
40
jne    117d <UARTIntUnregister+0x5d>
mov    $0x31,%eax
mov    %eax,-0x1c(%rbp)
jmp    1198 <UARTIntUnregister+0x78>
mov    -0x8(%rbp),%rdx
mov    $0x4c,%eax
mov    $0x4b,%ecx
cmp    $0x4000f000,%rdx
cmove  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <IntDisable@plt>
mov    -0x10(%rbp),%rdi
call   1040 <IntUnregister@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntUnregister>:
push   %rbx
cmp    $0x4000c000,%rdi
je     1143 <UARTIntUnregister+0x23>
cmp    $0x4000d000,%rdi
je     114a <UARTIntUnregister+0x2a>
cmp    $0x4000e000,%rdi
jne    1151 <UARTIntUnregister+0x31>
mov    $0x31,%ebx
jmp    1165 <UARTIntUnregister+0x45>
mov    $0x15,%ebx
jmp    1165 <UARTIntUnregister+0x45>
mov    $0x16,%ebx
jmp    1165 <UARTIntUnregister+0x45>
xor    %eax,%eax
cmp    $0x4000f000,%rdi
sete   %al
mov    $0x4c,%ebx
sub    %rax,%rbx
mov    %rbx,%rdi
call   1030 <IntDisable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @UARTIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 1073790976
br i1 %5, label %6, label %7
6: ; preds = %1
br label %24
7: ; preds = %1
%8 = load i64, i64* %2
%9 = icmp eq i64 %8, 1073795072
br i1 %9, label %10, label %11
10: ; preds = %7
br label %22
11: ; preds = %7
%12 = load i64, i64* %2
%13 = icmp eq i64 %12, 1073799168
br i1 %13, label %14, label %15
14: ; preds = %11
br label %20
15: ; preds = %11
%16 = load i64, i64* %2
%17 = icmp eq i64 %16, 1073803264
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 75, i32 76
br label %20
20: ; preds = %15, %14
%21 = phi i32 [ 49, %14 ], [ %19, %15 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ 22, %10 ], [ %21, %20 ]
br label %24
24: ; preds = %22, %6
%25 = phi i32 [ 21, %6 ], [ %23, %22 ]
%26 = sext i32 %25 to i64
store i64 %26, i64* %3
%27 = load i64, i64* %3
%28 = call i32 @IntDisable(i64 %27)
%29 = load i64, i64* %3
%30 = call i32 @IntUnregister(i64 %29)
ret void
}

LLVM IR (-O2):
define void @UARTIntUnregister(i64 %0) {
switch i64 %0, label %2 [
i64 1073790976, label %7
i64 1073795072, label %5
i64 1073799168, label %6
]
2: ; preds = %1
%3 = icmp eq i64 %0, 1073803264
%4 = select i1 %3, i64 75, i64 76
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %2
%8 = phi i64 [ 21, %1 ], [ %4, %2 ], [ 22, %5 ], [ 49, %6 ]
%9 = tail call i32 @IntDisable(i64 %8)
%10 = tail call i32 @IntUnregister(i64 %8)
ret void
}