#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*/ DEBUG_ASSERT(int);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
unsigned long PWMGenIntGet(unsigned long, unsigned long);
int PWMGenValid(unsigned long);
void PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen) {
  unsigned long ulInt;
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  DEBUG_ASSERT(PWMGenValid(ulGen));
  ulInt = PWMGenIntGet(ulBase, ulGen);
  IntDisable(ulInt);
  IntUnregister(ulInt);
}


x86 assembly (clang, -O0):
<PWMGenIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x19(%rbp)
je     1181 <PWMGenIntUnregister+0x31>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1060 <PWMGenValid@plt>
mov    %eax,%edi
call   1050 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <PWMGenIntGet@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <IntDisable@plt>
mov    -0x18(%rbp),%rdi
call   1070 <IntUnregister@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenIntUnregister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1050 <DEBUG_ASSERT@plt>
mov    %r14,%rdi
call   1060 <PWMGenValid@plt>
mov    %eax,%edi
call   1050 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <PWMGenIntGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <IntDisable@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1070 <IntUnregister@plt>

LLVM IR (-O0):
define void @PWMGenIntUnregister(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 1073905664
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i64, i64* %3
%10 = icmp eq i64 %9, 1073909760
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %4
%16 = call i32 @PWMGenValid(i64 %15)
%17 = call i32 @DEBUG_ASSERT(i32 %16)
%18 = load i64, i64* %3
%19 = load i64, i64* %4
%20 = call i64 @PWMGenIntGet(i64 %18, i64 %19)
store i64 %20, i64* %5
%21 = load i64, i64* %5
%22 = call i32 @IntDisable(i64 %21)
%23 = load i64, i64* %5
%24 = call i32 @IntUnregister(i64 %23)
ret void
}

LLVM IR (-O2):
define void @PWMGenIntUnregister(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = tail call i32 @PWMGenValid(i64 %1)
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = tail call i64 @PWMGenIntGet(i64 %0, i64 %1)
%10 = tail call i32 @IntDisable(i64 %9)
%11 = tail call i32 @IntUnregister(i64 %9)
ret void
}