#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*/ printk(char *, ...);
void Mali_MMUError(int stat, int mask, int faultstat, int faultvalo,
                   int faultvahi) {
  printk("Unexpected MMU Fault:\n");
  printk("Int Status=%08x, Error Mask=%08x\n", stat, mask);
  printk("FaultStats=%08x, VA=%08x%08x\n", faultstat, faultvahi, faultvalo);
  printk("TEST FAILED\n\n");
  ;
}


x86 assembly (clang, -O0):
<Mali_MMUError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mali_MMUError>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printk@plt>
lea    0xedd(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printk@plt>
lea    0xeed(%rip),%rdi
mov    %r12d,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1030 <printk@plt>
lea    0xef4(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printk@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Unexpected MMU Fault:\0A\00"
@.str.1 = [34 x i8] c"Int Status=%08x, Error Mask=%08x\0A\00"
@.str.2 = [30 x i8] c"FaultStats=%08x, VA=%08x%08x\0A\00"
@.str.3 = [14 x i8] c"TEST FAILED\0A\0A\00"
define void @Mali_MMUError(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* %8
%16 = load i32, i32* %10
%17 = load i32, i32* %9
%18 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
%19 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Unexpected MMU Fault:\0A\00"
@.str.1 = [34 x i8] c"Int Status=%08x, Error Mask=%08x\0A\00"
@.str.2 = [30 x i8] c"FaultStats=%08x, VA=%08x%08x\0A\00"
@.str.3 = [14 x i8] c"TEST FAILED\0A\0A\00"
define void @Mali_MMUError(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1)
%8 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 %4, i32 %3)
%9 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}