#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 */
bool AESDataWriteNonBlocking(uint32_t ui32Base, uint32_t *pui32Src) {
  ;
  if (!(0x00000002 & ((*((volatile uint32_t *)(ui32Base + 0x00000050)))))) {
    return (false);
  }
  (*((volatile uint32_t *)(ui32Base + 0x0000006C))) = pui32Src[0];
  (*((volatile uint32_t *)(ui32Base + 0x00000068))) = pui32Src[1];
  (*((volatile uint32_t *)(ui32Base + 0x00000064))) = pui32Src[2];
  (*((volatile uint32_t *)(ui32Base + 0x00000060))) = pui32Src[3];
  return (true);
}


x86 assembly (clang, -O0):
<AESDataWriteNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x50,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    112d <AESDataWriteNonBlocking+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1177 <AESDataWriteNonBlocking+0x77>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%eax
add    $0x6c,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%eax
add    $0x68,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%eax
add    $0x64,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%eax
add    $0x60,%eax
cltq
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDataWriteNonBlocking>:
movslq %edi,%rcx
xor    %eax,%eax
testl  $0x2,0x50(%rcx)
je     112a <AESDataWriteNonBlocking+0x2a>
mov    (%rsi),%eax
mov    %eax,0x6c(%rcx)
mov    0x4(%rsi),%eax
mov    %eax,0x68(%rcx)
mov    0x8(%rsi),%eax
mov    %eax,0x64(%rcx)
mov    0xc(%rsi),%eax
mov    %eax,0x60(%rcx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @AESDataWriteNonBlocking(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 = add nsw i32 %6, 80
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 2, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %2
store i32 0, i32* %3
br label %43
14: ; preds = %2
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 108
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 %17, i32* %21
%22 = load i32*, i32** %5
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 104
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i32*
store volatile i32 %24, i32* %28
%29 = load i32*, i32** %5
%30 = getelementptr inbounds i32, i32* %29, i64 2
%31 = load i32, i32* %30
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 100
%34 = sext i32 %33 to i64
%35 = inttoptr i64 %34 to i32*
store volatile i32 %31, i32* %35
%36 = load i32*, i32** %5
%37 = getelementptr inbounds i32, i32* %36, i64 3
%38 = load i32, i32* %37
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 96
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i32*
store volatile i32 %38, i32* %42
store i32 1, i32* %3
br label %43
43: ; preds = %14, %13
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
define i32 @AESDataWriteNonBlocking(i32 %0, i32* nocapture %1) {
%3 = add nsw i32 %0, 80
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %29, label %9
9: ; preds = %2
%10 = load i32, i32* %1
%11 = add nsw i32 %0, 108
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
%14 = getelementptr inbounds i32, i32* %1, i64 1
%15 = load i32, i32* %14
%16 = add nsw i32 %0, 104
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 %15, i32* %18
%19 = getelementptr inbounds i32, i32* %1, i64 2
%20 = load i32, i32* %19
%21 = add nsw i32 %0, 100
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store volatile i32 %20, i32* %23
%24 = getelementptr inbounds i32, i32* %1, i64 3
%25 = load i32, i32* %24
%26 = add nsw i32 %0, 96
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i32*
store volatile i32 %25, i32* %28
br label %29
29: ; preds = %2, %9
%30 = phi i32 [ 1, %9 ], [ 0, %2 ]
ret i32 %30
}