#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 */
typedef scalar_t__ ulBase;

/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int PWMGenValid(unsigned long);
void PWMGenIntClear(unsigned long ulBase, unsigned long ulGen,
                    unsigned long ulInts) {
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  DEBUG_ASSERT(PWMGenValid(ulGen));
  DEBUG_ASSERT((ulInts & ~(0x00000001 | 0x00000002 | 0x00000004 | 0x00000008 |
                           0x00000010 | 0x00000020)) == 0);
  (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x0000000C))) = ulInts;
}


x86 assembly (clang, -O0):
<PWMGenIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x19(%rbp)
je     1155 <PWMGenIntClear+0x35>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1040 <PWMGenValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x18(%rbp),%rax
and    $0xffffffffffffffc0,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,0xc(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenIntClear>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r15,%rdi
call   1040 <PWMGenValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x40,%r14
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0xc(%rbx,%r15,1)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @PWMGenIntClear(i64 %0, i64 %1, i64 %2) {
%4 = and i64 %0, -4097
%5 = icmp eq i64 %4, 1073905664
%6 = zext i1 %5 to i32
%7 = tail call i32 @DEBUG_ASSERT(i32 %6)
%8 = tail call i32 @PWMGenValid(i64 %1)
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = icmp ult i64 %2, 64
%11 = zext i1 %10 to i32
%12 = tail call i32 @DEBUG_ASSERT(i32 %11)
%13 = add i64 %0, 12
%14 = add i64 %13, %1
%15 = inttoptr i64 %14 to i64*
store volatile i64 %2, i64* %15
ret void
}