#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 */
void AESDataWrite(uint32_t ui32Base, uint32_t *pui32Src) {
  ;
  while ((0x00000002 & ((*((volatile uint32_t *)(ui32Base + 0x00000050))))) ==
         0) {
  }
  (*((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];
}


x86 assembly (clang, -O0):
<AESDataWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1126 <AESDataWrite+0x26>
jmp    110b <AESDataWrite+0xb>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x4(%rbp),%eax
add    $0x6c,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x4(%rbp),%eax
add    $0x68,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x4(%rbp),%eax
add    $0x64,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x4(%rbp),%eax
add    $0x60,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDataWrite>:
movslq %edi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testl  $0x2,0x50(%rax)
je     1110 <AESDataWrite+0x10>
mov    (%rsi),%ecx
mov    %ecx,0x6c(%rax)
mov    0x4(%rsi),%ecx
mov    %ecx,0x68(%rax)
mov    0x8(%rsi),%ecx
mov    %ecx,0x64(%rax)
mov    0xc(%rsi),%ecx
mov    %ecx,0x60(%rax)
ret

LLVM IR (-O0):
define void @AESDataWrite(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
br label %5
5: ; preds = %13, %2
%6 = load i32, i32* %3
%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 eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %5
br label %5
14: ; preds = %5
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
%18 = load i32, i32* %3
%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** %4
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = load i32, i32* %3
%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** %4
%30 = getelementptr inbounds i32, i32* %29, i64 2
%31 = load i32, i32* %30
%32 = load i32, i32* %3
%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** %4
%37 = getelementptr inbounds i32, i32* %36, i64 3
%38 = load i32, i32* %37
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 96
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i32*
store volatile i32 %38, i32* %42
ret void
}

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