#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);
void uDMAIntClear(unsigned long ulChanMask) {
  DEBUG_ASSERT(!((((*((volatile unsigned long *)(0x400FE000))) & 0x70000000) ==
                  0x00000000) ||
                 (((*((volatile unsigned long *)(0x400FE000))) &
                   (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00000000))));
  DEBUG_ASSERT(!(((*((volatile unsigned long *)(0x400FE000))) &
                  (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00010000)));
  DEBUG_ASSERT(!(((*((volatile unsigned long *)(0x400FE000))) &
                  (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00030000)));
  DEBUG_ASSERT(!(((*((volatile unsigned long *)(0x400FE000))) &
                  (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00040000)));
  (*((volatile unsigned long *)(0x400FF504))) = ulChanMask;
}


x86 assembly (clang, -O0):
<uDMAIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%rcx
and    $0x70000000,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1154 <uDMAIntClear+0x44>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10000000,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10010000,%rax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10030000,%rax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10040000,%rax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rcx
mov    $0x400ff504,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAIntClear>:
push   %rbx
mov    %rdi,%rbx
testq  $0x70000000,0x400fe000
je     113c <uDMAIntClear+0x2c>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
xor    %edi,%edi
cmp    $0x10000000,%eax
setne  %dil
jmp    113e <uDMAIntClear+0x2e>
xor    %edi,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
xor    %edi,%edi
cmp    $0x10010000,%eax
setne  %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
xor    %edi,%edi
cmp    $0x10030000,%eax
setne  %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
xor    %edi,%edi
cmp    $0x10040000,%eax
setne  %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,0x400ff504
40
pop    %rbx
ret

LLVM IR (-O0):
define void @uDMAIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%4 = and i64 %3, 1879048192
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%8 = and i64 %7, 1895759872
%9 = icmp eq i64 %8, 268435456
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%16 = and i64 %15, 1895759872
%17 = icmp eq i64 %16, 268500992
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = call i32 @DEBUG_ASSERT(i32 %19)
%21 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%22 = and i64 %21, 1895759872
%23 = icmp eq i64 %22, 268632064
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = call i32 @DEBUG_ASSERT(i32 %25)
%27 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%28 = and i64 %27, 1895759872
%29 = icmp eq i64 %28, 268697600
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
%32 = call i32 @DEBUG_ASSERT(i32 %31)
%33 = load i64, i64* %2
store volatile i64 %33, i64* inttoptr (i64 1074787588 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAIntClear(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%3 = and i64 %2, 1879048192
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%7 = and i64 %6, 1895759872
%8 = icmp ne i64 %7, 268435456
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
%12 = tail call i32 @DEBUG_ASSERT(i32 %11)
%13 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%14 = and i64 %13, 1895759872
%15 = icmp ne i64 %14, 268500992
%16 = zext i1 %15 to i32
%17 = tail call i32 @DEBUG_ASSERT(i32 %16)
%18 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%19 = and i64 %18, 1895759872
%20 = icmp ne i64 %19, 268632064
%21 = zext i1 %20 to i32
%22 = tail call i32 @DEBUG_ASSERT(i32 %21)
%23 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%24 = and i64 %23, 1895759872
%25 = icmp ne i64 %24, 268697600
%26 = zext i1 %25 to i32
%27 = tail call i32 @DEBUG_ASSERT(i32 %26)
store volatile i64 %0, i64* inttoptr (i64 1074787588 to i64*)
ret void
}