#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;

/* Variables and functions */
void prvGetRegistersFromStack(uint32_t *pulFaultStackAddress) {
  volatile uint32_t r0;
  volatile uint32_t r1;
  volatile uint32_t r2;
  volatile uint32_t r3;
  volatile uint32_t r12;
  volatile uint32_t lr;
  volatile uint32_t pc;
  volatile uint32_t psr;
  r0 = pulFaultStackAddress[0];
  r1 = pulFaultStackAddress[1];
  r2 = pulFaultStackAddress[2];
  r3 = pulFaultStackAddress[3];
  r12 = pulFaultStackAddress[4];
  lr = pulFaultStackAddress[5];
  pc = pulFaultStackAddress[6];
  psr = pulFaultStackAddress[7];
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<prvGetRegistersFromStack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,-0x28(%rbp)
jmp    1157 <prvGetRegistersFromStack+0x57>

x86 assembly (clang, -O2):
<prvGetRegistersFromStack>:
mov    (%rdi),%eax
mov    %eax,-0x4(%rsp)
mov    0x4(%rdi),%eax
mov    %eax,-0x8(%rsp)
mov    0x8(%rdi),%eax
mov    %eax,-0xc(%rsp)
mov    0xc(%rdi),%eax
mov    %eax,-0x10(%rsp)
mov    0x10(%rdi),%eax
mov    %eax,-0x14(%rsp)
mov    0x14(%rdi),%eax
mov    %eax,-0x18(%rsp)
mov    0x18(%rdi),%eax
mov    %eax,-0x1c(%rsp)
mov    0x1c(%rdi),%eax
mov    %eax,-0x20(%rsp)
nopw   0x0(%rax,%rax,1)
jmp    1140 <prvGetRegistersFromStack+0x40>

LLVM IR (-O0):
define void @prvGetRegistersFromStack(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %2
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 0
%13 = load i32, i32* %12
store volatile i32 %13, i32* %3
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
store volatile i32 %16, i32* %4
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 2
%19 = load i32, i32* %18
store volatile i32 %19, i32* %5
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
store volatile i32 %22, i32* %6
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 4
%25 = load i32, i32* %24
store volatile i32 %25, i32* %7
%26 = load i32*, i32** %2
%27 = getelementptr inbounds i32, i32* %26, i64 5
%28 = load i32, i32* %27
store volatile i32 %28, i32* %8
%29 = load i32*, i32** %2
%30 = getelementptr inbounds i32, i32* %29, i64 6
%31 = load i32, i32* %30
store volatile i32 %31, i32* %9
%32 = load i32*, i32** %2
%33 = getelementptr inbounds i32, i32* %32, i64 7
%34 = load i32, i32* %33
store volatile i32 %34, i32* %10
br label %35
35: ; preds = %35, %1
br label %35
}

LLVM IR (-O2):
define void @prvGetRegistersFromStack(i32* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i32* %2 to i8*
%11 = bitcast i32* %3 to i8*
%12 = bitcast i32* %4 to i8*
%13 = bitcast i32* %5 to i8*
%14 = bitcast i32* %6 to i8*
%15 = bitcast i32* %7 to i8*
%16 = bitcast i32* %8 to i8*
%17 = bitcast i32* %9 to i8*
%18 = load i32, i32* %0
store volatile i32 %18, i32* %2
%19 = getelementptr inbounds i32, i32* %0, i64 1
%20 = load i32, i32* %19
store volatile i32 %20, i32* %3
%21 = getelementptr inbounds i32, i32* %0, i64 2
%22 = load i32, i32* %21
store volatile i32 %22, i32* %4
%23 = getelementptr inbounds i32, i32* %0, i64 3
%24 = load i32, i32* %23
store volatile i32 %24, i32* %5
%25 = getelementptr inbounds i32, i32* %0, i64 4
%26 = load i32, i32* %25
store volatile i32 %26, i32* %6
%27 = getelementptr inbounds i32, i32* %0, i64 5
%28 = load i32, i32* %27
store volatile i32 %28, i32* %7
%29 = getelementptr inbounds i32, i32* %0, i64 6
%30 = load i32, i32* %29
store volatile i32 %30, i32* %8
%31 = getelementptr inbounds i32, i32* %0, i64 7
%32 = load i32, i32* %31
store volatile i32 %32, i32* %9
br label %33
33: ; preds = %33, %1
br label %33
}