#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 */

/* Variables and functions */
int /*<<< orphan*/ panic_blink(int);
int /*<<< orphan*/ uart0_write(char *);
int /*<<< orphan*/ uart0_write_hex(long);
void prefetch_abort(long r_0, long r_1, long r_2, long r_3, long spsr, long r_4,
                    long r_5, long r_6, long r_7, long r_8, long r_9, long r_10,
                    long r_11, long r_12, long prev_pc) {
  uart0_write("prefetch abort!\r\n");
  uart0_write(" r0   ");
  uart0_write_hex(r_0);
  uart0_write(" r1   ");
  uart0_write_hex(r_1);
  uart0_write(" r2   ");
  uart0_write_hex(r_2);
  uart0_write(" r3   ");
  uart0_write_hex(r_3);
  uart0_write(" r4   ");
  uart0_write_hex(r_4);
  uart0_write(" r5   ");
  uart0_write_hex(r_5);
  uart0_write(" r6   ");
  uart0_write_hex(r_6);
  uart0_write(" r7   ");
  uart0_write_hex(r_7);
  uart0_write(" r8   ");
  uart0_write_hex(r_8);
  uart0_write(" r9   ");
  uart0_write_hex(r_9);
  uart0_write(" r10  ");
  uart0_write_hex(r_10);
  uart0_write(" r11  ");
  uart0_write_hex(r_11);
  uart0_write(" ip   ");
  uart0_write_hex(r_12);
  uart0_write(" pc   ");
  uart0_write_hex(prev_pc);
  uart0_write(" cpsr ");
  uart0_write_hex(spsr);
  panic_blink(1000);
}


x86 assembly (clang, -O0):
<prefetch_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xe85(%rip),%rdi
call   1040 <uart0_write@plt>
lea    0xe8b(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x8(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe7d(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x10(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe6f(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x18(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe61(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x20(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe53(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x30(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe45(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x10(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe37(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x18(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe29(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x20(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe1b(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x28(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe0d(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x30(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdff(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x38(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdf1(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x40(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xde3(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x48(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdd5(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x50(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdc7(%rip),%rdi
call   1040 <uart0_write@plt>
mov    -0x28(%rbp),%rdi
call   1050 <uart0_write_hex@plt>
mov    $0x3e8,%edi
call   1030 <panic_blink@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefetch_abort>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r13
mov    %r8,0x40(%rsp)
mov    %rcx,%rbp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    0xc0(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0xb8(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xb0(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xa8(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0xa0(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0x98(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x90(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x88(%rsp),%rax
mov    %rax,(%rsp)
mov    0x80(%rsp),%rbx
lea    0xe38(%rip),%rdi
call   1040 <uart0_write@plt>
lea    0xe3e(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %r12,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe31(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %r15,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe24(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %r14,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe17(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %rbp,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xe0a(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %r13,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdfd(%rip),%rdi
call   1040 <uart0_write@plt>
mov    %rbx,%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdf0(%rip),%rdi
call   1040 <uart0_write@plt>
mov    (%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xde2(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x8(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdd3(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x10(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdc4(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x18(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xdb5(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x20(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xda6(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x28(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xd97(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x30(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xd88(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x38(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
lea    0xd79(%rip),%rdi
call   1040 <uart0_write@plt>
mov    0x40(%rsp),%rdi
call   1050 <uart0_write_hex@plt>
mov    $0x3e8,%edi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <panic_blink@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"prefetch abort!\0D\0A\00"
@.str.1 = [7 x i8] c" r0 \00"
@.str.2 = [7 x i8] c" r1 \00"
@.str.3 = [7 x i8] c" r2 \00"
@.str.4 = [7 x i8] c" r3 \00"
@.str.5 = [7 x i8] c" r4 \00"
@.str.6 = [7 x i8] c" r5 \00"
@.str.7 = [7 x i8] c" r6 \00"
@.str.8 = [7 x i8] c" r7 \00"
@.str.9 = [7 x i8] c" r8 \00"
@.str.10 = [7 x i8] c" r9 \00"
@.str.11 = [7 x i8] c" r10 \00"
@.str.12 = [7 x i8] c" r11 \00"
@.str.13 = [7 x i8] c" ip \00"
@.str.14 = [7 x i8] c" pc \00"
@.str.15 = [7 x i8] c" cpsr \00"
define void @prefetch_abort(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, i64 %10, i64 %11, i64 %12, i64 %13, i64 %14) {
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca i64
%28 = alloca i64
%29 = alloca i64
%30 = alloca i64
store i64 %0, i64* %16
store i64 %1, i64* %17
store i64 %2, i64* %18
store i64 %3, i64* %19
store i64 %4, i64* %20
store i64 %5, i64* %21
store i64 %6, i64* %22
store i64 %7, i64* %23
store i64 %8, i64* %24
store i64 %9, i64* %25
store i64 %10, i64* %26
store i64 %11, i64* %27
store i64 %12, i64* %28
store i64 %13, i64* %29
store i64 %14, i64* %30
%31 = call i32 @uart0_write(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%32 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%33 = load i64, i64* %16
%34 = call i32 @uart0_write_hex(i64 %33)
%35 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%36 = load i64, i64* %17
%37 = call i32 @uart0_write_hex(i64 %36)
%38 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%39 = load i64, i64* %18
%40 = call i32 @uart0_write_hex(i64 %39)
%41 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%42 = load i64, i64* %19
%43 = call i32 @uart0_write_hex(i64 %42)
%44 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%45 = load i64, i64* %21
%46 = call i32 @uart0_write_hex(i64 %45)
%47 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%48 = load i64, i64* %22
%49 = call i32 @uart0_write_hex(i64 %48)
%50 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%51 = load i64, i64* %23
%52 = call i32 @uart0_write_hex(i64 %51)
%53 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%54 = load i64, i64* %24
%55 = call i32 @uart0_write_hex(i64 %54)
%56 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%57 = load i64, i64* %25
%58 = call i32 @uart0_write_hex(i64 %57)
%59 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%60 = load i64, i64* %26
%61 = call i32 @uart0_write_hex(i64 %60)
%62 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%63 = load i64, i64* %27
%64 = call i32 @uart0_write_hex(i64 %63)
%65 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%66 = load i64, i64* %28
%67 = call i32 @uart0_write_hex(i64 %66)
%68 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%69 = load i64, i64* %29
%70 = call i32 @uart0_write_hex(i64 %69)
%71 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%72 = load i64, i64* %30
%73 = call i32 @uart0_write_hex(i64 %72)
%74 = call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%75 = load i64, i64* %20
%76 = call i32 @uart0_write_hex(i64 %75)
%77 = call i32 @panic_blink(i32 1000)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"prefetch abort!\0D\0A\00"
@.str.1 = [7 x i8] c" r0 \00"
@.str.2 = [7 x i8] c" r1 \00"
@.str.3 = [7 x i8] c" r2 \00"
@.str.4 = [7 x i8] c" r3 \00"
@.str.5 = [7 x i8] c" r4 \00"
@.str.6 = [7 x i8] c" r5 \00"
@.str.7 = [7 x i8] c" r6 \00"
@.str.8 = [7 x i8] c" r7 \00"
@.str.9 = [7 x i8] c" r8 \00"
@.str.10 = [7 x i8] c" r9 \00"
@.str.11 = [7 x i8] c" r10 \00"
@.str.12 = [7 x i8] c" r11 \00"
@.str.13 = [7 x i8] c" ip \00"
@.str.14 = [7 x i8] c" pc \00"
@.str.15 = [7 x i8] c" cpsr \00"
define void @prefetch_abort(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, i64 %10, i64 %11, i64 %12, i64 %13, i64 %14) {
%16 = tail call i32 @uart0_write(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%18 = tail call i32 @uart0_write_hex(i64 %0)
%19 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = tail call i32 @uart0_write_hex(i64 %1)
%21 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%22 = tail call i32 @uart0_write_hex(i64 %2)
%23 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%24 = tail call i32 @uart0_write_hex(i64 %3)
%25 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%26 = tail call i32 @uart0_write_hex(i64 %5)
%27 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%28 = tail call i32 @uart0_write_hex(i64 %6)
%29 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%30 = tail call i32 @uart0_write_hex(i64 %7)
%31 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%32 = tail call i32 @uart0_write_hex(i64 %8)
%33 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%34 = tail call i32 @uart0_write_hex(i64 %9)
%35 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%36 = tail call i32 @uart0_write_hex(i64 %10)
%37 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%38 = tail call i32 @uart0_write_hex(i64 %11)
%39 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%40 = tail call i32 @uart0_write_hex(i64 %12)
%41 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%42 = tail call i32 @uart0_write_hex(i64 %13)
%43 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%44 = tail call i32 @uart0_write_hex(i64 %14)
%45 = tail call i32 @uart0_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%46 = tail call i32 @uart0_write_hex(i64 %4)
%47 = tail call i32 @panic_blink(i32 1000)
ret void
}