#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);
unsigned long TimerIntNumberGet(unsigned long);
void TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer) {
  ;

  ;
  ulBase = TimerIntNumberGet(ulBase);
  if (ulTimer & 0x000000ff) {
    IntDisable(ulBase);
    IntUnregister(ulBase);
  }
  if (ulTimer & 0x0000ff00) {
    IntDisable(ulBase + 1);
    IntUnregister(ulBase + 1);
  }
}


x86 assembly (clang, -O0):
<TimerIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <TimerIntNumberGet@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
cmp    $0x0,%rax
je     1173 <TimerIntUnregister+0x43>
mov    -0x8(%rbp),%rdi
call   1040 <IntDisable@plt>
mov    -0x8(%rbp),%rdi
call   1050 <IntUnregister@plt>
mov    -0x10(%rbp),%rax
and    $0xff00,%rax
cmp    $0x0,%rax
je     11a1 <TimerIntUnregister+0x71>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1040 <IntDisable@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntUnregister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <TimerIntNumberGet@plt>
mov    %rax,%rbx
test   %r14b,%r14b
je     1154 <TimerIntUnregister+0x24>
mov    %rbx,%rdi
call   1040 <IntDisable@plt>
mov    %rbx,%rdi
call   1050 <IntUnregister@plt>
test   $0xff00,%r14d
je     1178 <TimerIntUnregister+0x48>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1040 <IntDisable@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <IntUnregister@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TimerIntUnregister(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i64 @TimerIntNumberGet(i64 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %4
%8 = and i64 %7, 255
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i64, i64* %3
%12 = call i32 @IntDisable(i64 %11)
%13 = load i64, i64* %3
%14 = call i32 @IntUnregister(i64 %13)
br label %15
15: ; preds = %10, %2
%16 = load i64, i64* %4
%17 = and i64 %16, 65280
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = load i64, i64* %3
%21 = add i64 %20, 1
%22 = call i32 @IntDisable(i64 %21)
%23 = load i64, i64* %3
%24 = add i64 %23, 1
%25 = call i32 @IntUnregister(i64 %24)
br label %26
26: ; preds = %19, %15
ret void
}

LLVM IR (-O2):
define void @TimerIntUnregister(i64 %0, i64 %1) {
%3 = tail call i64 @TimerIntNumberGet(i64 %0)
%4 = and i64 %1, 255
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @IntDisable(i64 %3)
%8 = tail call i32 @IntUnregister(i64 %3)
br label %9
9: ; preds = %6, %2
%10 = and i64 %1, 65280
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = add i64 %3, 1
%14 = tail call i32 @IntDisable(i64 %13)
%15 = tail call i32 @IntUnregister(i64 %13)
br label %16
16: ; preds = %12, %9
ret void
}