#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 /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int32_t FlashAllUserRegisterGet(uint32_t *pui32User0, uint32_t *pui32User1,
                                uint32_t *pui32User2, uint32_t *pui32User3) {
  ASSERT(pui32User0 != 0);
  ASSERT(pui32User1 != 0);
  ASSERT(pui32User2 != 0);
  ASSERT(pui32User3 != 0);
  *pui32User0 = (*((volatile uint32_t *)(0x400FE1E0)));
  *pui32User1 = (*((volatile uint32_t *)(0x400FE1E4)));
  *pui32User2 = (*((volatile uint32_t *)(0x400FE1E8)));
  *pui32User3 = (*((volatile uint32_t *)(0x400FE1EC)));
  return (0);
}


x86 assembly (clang, -O0):
<FlashAllUserRegisterGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    $0x400fe1e0,%eax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x400fe1e4,%eax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x400fe1e8,%eax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x400fe1ec,%eax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashAllUserRegisterGet>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   %r12,%r12
setne  %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <ASSERT@plt>
mov    0x400fe1e0,%eax
mov    %eax,(%rbx)
mov    0x400fe1e4,%eax
mov    %eax,(%r12)
mov    0x400fe1e8,%eax
mov    %eax,(%r15)
mov    0x400fe1ec,%eax
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @FlashAllUserRegisterGet(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32*, i32** %6
%14 = icmp ne i32* %13, null
%15 = zext i1 %14 to i32
%16 = call i32 @ASSERT(i32 %15)
%17 = load i32*, i32** %7
%18 = icmp ne i32* %17, null
%19 = zext i1 %18 to i32
%20 = call i32 @ASSERT(i32 %19)
%21 = load i32*, i32** %8
%22 = icmp ne i32* %21, null
%23 = zext i1 %22 to i32
%24 = call i32 @ASSERT(i32 %23)
%25 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
%26 = load i32*, i32** %5
store i32 %25, i32* %26
%27 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
%28 = load i32*, i32** %6
store i32 %27, i32* %28
%29 = load volatile i32, i32* inttoptr (i64 1074782696 to i32*)
%30 = load i32*, i32** %7
store i32 %29, i32* %30
%31 = load volatile i32, i32* inttoptr (i64 1074782700 to i32*)
%32 = load i32*, i32** %8
store i32 %31, i32* %32
ret i32 0
}

LLVM IR (-O2):
define i32 @FlashAllUserRegisterGet(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp ne i32* %0, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @ASSERT(i32 %6)
%8 = icmp ne i32* %1, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @ASSERT(i32 %9)
%11 = icmp ne i32* %2, null
%12 = zext i1 %11 to i32
%13 = tail call i32 @ASSERT(i32 %12)
%14 = icmp ne i32* %3, null
%15 = zext i1 %14 to i32
%16 = tail call i32 @ASSERT(i32 %15)
%17 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
store i32 %17, i32* %0
%18 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
store i32 %18, i32* %1
%19 = load volatile i32, i32* inttoptr (i64 1074782696 to i32*)
store i32 %19, i32* %2
%20 = load volatile i32, i32* inttoptr (i64 1074782700 to i32*)
store i32 %20, i32* %3
ret i32 0
}