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


x86 assembly (clang, -O0):
<AESDataRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x44036000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%eax
cltq
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    114e <AESDataRead+0x3e>
jmp    1133 <AESDataRead+0x23>
mov    -0x4(%rbp),%eax
add    $0x6c,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x68,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%eax
add    $0x64,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%eax
add    $0x60,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDataRead>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x44036000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
nopl   0x0(%rax)
testl  $0x1,0x50(%rax)
je     1130 <AESDataRead+0x20>
mov    0x6c(%rax),%ecx
mov    %ecx,(%rbx)
mov    0x68(%rax),%ecx
mov    %ecx,0x4(%rbx)
mov    0x64(%rax),%ecx
mov    %ecx,0x8(%rbx)
mov    0x60(%rax),%eax
mov    %eax,0xc(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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