#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 unsigned long uint32_t;

/* Variables and functions */
bool AESDataReadNonBlocking(uint32_t ui32Base, uint32_t *pui32Dest) {
  ;
  if ((0x00000001 & ((*((volatile unsigned long *)(ui32Base + 0x00000050))))) ==
      0) {
    return (0);
  }
  pui32Dest[0] = (*((volatile unsigned long *)(ui32Base + 0x0000006C)));
  pui32Dest[1] = (*((volatile unsigned long *)(ui32Base + 0x00000068)));
  pui32Dest[2] = (*((volatile unsigned long *)(ui32Base + 0x00000064)));
  pui32Dest[3] = (*((volatile unsigned long *)(ui32Base + 0x00000060)));
  return (1);
}


x86 assembly (clang, -O0):
<AESDataReadNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x50(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    112e <AESDataReadNonBlocking+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1174 <AESDataReadNonBlocking+0x74>
mov    -0x10(%rbp),%rax
mov    0x6c(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x68(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0x64(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    0x60(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x18(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDataReadNonBlocking>:
xor    %eax,%eax
testq  $0x1,0x50(%rdi)
je     1130 <AESDataReadNonBlocking+0x30>
mov    0x6c(%rdi),%rax
mov    %rax,(%rsi)
mov    0x68(%rdi),%rax
mov    %rax,0x8(%rsi)
mov    0x64(%rdi),%rax
mov    %rax,0x10(%rsi)
mov    0x60(%rdi),%rax
mov    %rax,0x18(%rsi)
mov    $0x1,%eax
ret

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

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