#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 AESIVRead(uint32_t ui32Base, uint32_t *pui32IVData) {
  ;
  while ((0x40000000 &
          ((*((volatile unsigned long *)(ui32Base + 0x00000050))))) == 0) {
  }
  pui32IVData[0] = (*((volatile unsigned long *)((ui32Base + 0x00000040))));
  pui32IVData[1] = (*((volatile unsigned long *)((ui32Base + 0x00000044))));
  pui32IVData[2] = (*((volatile unsigned long *)((ui32Base + 0x00000048))));
  pui32IVData[3] = (*((volatile unsigned long *)((ui32Base + 0x0000004C))));
}


x86 assembly (clang, -O0):
<AESIVRead>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
jne    1129 <AESIVRead+0x29>
jmp    110c <AESIVRead+0xc>
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIVRead>:
testq  $0x40000000,0x50(%rdi)
40
je     1100 <AESIVRead>
mov    0x40(%rdi),%rax
mov    %rax,(%rsi)
mov    0x44(%rdi),%rax
mov    %rax,0x8(%rsi)
mov    0x48(%rdi),%rax
mov    %rax,0x10(%rsi)
mov    0x4c(%rdi),%rax
mov    %rax,0x18(%rsi)
ret

LLVM IR (-O0):
define void @AESIVRead(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 1073741824, %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, 64
%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, 68
%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, 72
%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, 76
%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 @AESIVRead(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, 1073741824
%8 = icmp eq i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = add i64 %0, 64
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %1
%13 = add i64 %0, 68
%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, 72
%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, 76
%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
}