#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 AESDataWrite(uint32_t ui32Base, uint32_t *pui32Src) {
  ;
  while ((0x00000002 &
          ((*((volatile unsigned long *)(ui32Base + 0x00000050))))) == 0) {
  }
  (*((volatile unsigned long *)(ui32Base + 0x0000006C))) = pui32Src[0];
  (*((volatile unsigned long *)(ui32Base + 0x00000068))) = pui32Src[1];
  (*((volatile unsigned long *)(ui32Base + 0x00000064))) = pui32Src[2];
  (*((volatile unsigned long *)(ui32Base + 0x00000060))) = pui32Src[3];
}


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

x86 assembly (clang, -O2):
<AESDataWrite>:
testq  $0x2,0x50(%rdi)
je     1100 <AESDataWrite>
mov    (%rsi),%rax
mov    %rax,0x6c(%rdi)
mov    0x8(%rsi),%rax
mov    %rax,0x68(%rdi)
mov    0x10(%rsi),%rax
mov    %rax,0x64(%rdi)
mov    0x18(%rsi),%rax
mov    %rax,0x60(%rdi)
ret

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

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