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


x86 assembly (clang, -O0):
<AESDataReadNonBlocking>:
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    $0x1,%eax
cmp    $0x0,%eax
jne    112d <AESDataReadNonBlocking+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1177 <AESDataReadNonBlocking+0x77>
mov    -0x8(%rbp),%eax
add    $0x6c,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x68,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%eax
add    $0x64,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%eax
add    $0x60,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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