#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);
bool DESDataWriteNonBlocking(uint32_t ui32Base, uint32_t *pui32Src) {
  ASSERT(ui32Base == 0x44038000);
  if (!(0x00000002 & ((*((volatile uint32_t *)(ui32Base + 0x00000020)))))) {
    return (false);
  }
  (*((volatile uint32_t *)(0x44038000 + 0x00000028))) = pui32Src[0];
  (*((volatile uint32_t *)(0x44038000 + 0x0000002C))) = pui32Src[1];
  return (true);
}


x86 assembly (clang, -O0):
<DESDataWriteNonBlocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x44038000,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1155 <DESDataWriteNonBlocking+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1177 <DESDataWriteNonBlocking+0x67>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    $0x44038028,%eax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    $0x4403802c,%eax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESDataWriteNonBlocking>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x44038000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rcx
xor    %eax,%eax
testl  $0x2,0x20(%rcx)
je     114f <DESDataWriteNonBlocking+0x3f>
mov    (%rbx),%eax
mov    %eax,0x44038028
mov    0x4(%rbx),%eax
mov    %eax,0x4403802c
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @DESDataWriteNonBlocking(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1141080064
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 32
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 2, %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %2
store i32 0, i32* %3
br label %25
18: ; preds = %2
%19 = load i32*, i32** %5
%20 = getelementptr inbounds i32, i32* %19, i64 0
%21 = load i32, i32* %20
store volatile i32 %21, i32* inttoptr (i64 1141080104 to i32*)
%22 = load i32*, i32** %5
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
store volatile i32 %24, i32* inttoptr (i64 1141080108 to i32*)
store i32 1, i32* %3
br label %25
25: ; preds = %18, %17
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @DESDataWriteNonBlocking(i32 %0, i32* nocapture %1) {
%3 = icmp eq i32 %0, 1141080064
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 32
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, 2
%11 = icmp eq i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = load i32, i32* %1
store volatile i32 %13, i32* inttoptr (i64 1141080104 to i32*)
%14 = getelementptr inbounds i32, i32* %1, i64 1
%15 = load i32, i32* %14
store volatile i32 %15, i32* inttoptr (i64 1141080108 to i32*)
br label %16
16: ; preds = %2, %12
%17 = phi i32 [ 1, %12 ], [ 0, %2 ]
ret i32 %17
}