#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 int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void OneWireDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) {
  ASSERT(ui32Base == 0x400B6000);
  ASSERT(ui32DMAFlags > 0);
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) =
      ((*((volatile uint32_t *)(ui32Base + 0x00000000))) &
       ~((0x00000006 | 0x00000018 | 0x00070000)));
  (*((volatile uint32_t *)(ui32Base + 0x00000120))) &= ~(ui32DMAFlags & 0xff);
}


x86 assembly (clang, -O0):
<OneWireDMADisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400b6000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
and    $0xfff8ffe1,%ecx
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0xff,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x120,%eax
cltq
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireDMADisable>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %esi,%ebx
not    %ebx
xor    %edi,%edi
cmp    $0x400b6000,%r14d
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   %ebp,%ebp
setg   %dil
call   1030 <ASSERT@plt>
movslq %r14d,%rax
andl   $0xfff8ffe1,(%rax)
or     $0xffffff00,%ebx
and    %ebx,0x120(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @OneWireDMADisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1074487296
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 0
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = and i32 %17, -458783
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 0
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store volatile i32 %18, i32* %22
%23 = load i32, i32* %4
%24 = and i32 %23, 255
%25 = xor i32 %24, -1
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 288
%28 = sext i32 %27 to i64
%29 = inttoptr i64 %28 to i32*
%30 = load volatile i32, i32* %29
%31 = and i32 %30, %25
store volatile i32 %31, i32* %29
ret void
}

LLVM IR (-O2):
define void @OneWireDMADisable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074487296
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp sgt i32 %1, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = sext i32 %0 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -458783
store volatile i32 %12, i32* %10
%13 = and i32 %1, 255
%14 = xor i32 %13, -1
%15 = add nsw i32 %0, 288
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = and i32 %18, %14
store volatile i32 %19, i32* %17
ret void
}