#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 */
void AESDataRead(uint32_t ui32Base, uint32_t *pui32Dest) {
  ;
  while ((0x00000001 &
          ((*((volatile unsigned long *)(ui32Base + 0x00000050))))) == 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)));
}


x86 assembly (clang, -O0):
<AESDataRead>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1127 <AESDataRead+0x27>
jmp    110c <AESDataRead+0xc>
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x60(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDataRead>:
testq  $0x1,0x50(%rdi)
je     1100 <AESDataRead>
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)
ret

LLVM IR (-O0):
define void @AESDataRead(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
br label %5
5: ; preds = %12, %2
%6 = load i64, i64* %3
%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 = %5
br label %5
13: ; preds = %5
%14 = load i64, i64* %3
%15 = add i64 %14, 108
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = load i64*, i64** %4
%19 = getelementptr inbounds i64, i64* %18, i64 0
store i64 %17, i64* %19
%20 = load i64, i64* %3
%21 = add i64 %20, 104
%22 = inttoptr i64 %21 to i64*
%23 = load volatile i64, i64* %22
%24 = load i64*, i64** %4
%25 = getelementptr inbounds i64, i64* %24, i64 1
store i64 %23, i64* %25
%26 = load i64, i64* %3
%27 = add i64 %26, 100
%28 = inttoptr i64 %27 to i64*
%29 = load volatile i64, i64* %28
%30 = load i64*, i64** %4
%31 = getelementptr inbounds i64, i64* %30, i64 2
store i64 %29, i64* %31
%32 = load i64, i64* %3
%33 = add i64 %32, 96
%34 = inttoptr i64 %33 to i64*
%35 = load volatile i64, i64* %34
%36 = load i64*, i64** %4
%37 = getelementptr inbounds i64, i64* %36, i64 3
store i64 %35, i64* %37
ret void
}

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