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

/* Variables and functions */
int /*<<< orphan*/ ConsolePrint(int, int, char const *);
int /*<<< orphan*/ FBCopyDoubleBuffer();
int /*<<< orphan*/ FBPutColor(int, int, int);
int /*<<< orphan*/ MsDelay(int);
void ErrorDisplayMessage(const char *message, unsigned int blocking) {
  uint32_t x;
  uint32_t y;
  for (y = 0; y < 160; ++y)
    for (x = 0; x < 240 * 2; ++x)
      FBPutColor(x, y, 0xFF0000FF);
  ConsolePrint(1, 1, message);
  FBCopyDoubleBuffer();
  if (blocking)
    for (;;)
      ;
  else
    MsDelay(2500);
}


x86 assembly (clang, -O0):
<ErrorDisplayMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa0,-0x14(%rbp)
jge    11a8 <ErrorDisplayMessage+0x68>
movl   $0x0,-0x10(%rbp)
cmpl   $0x1e0,-0x10(%rbp)
jge    1195 <ErrorDisplayMessage+0x55>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0xff0000ff,%edx
call   1040 <FBPutColor@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116a <ErrorDisplayMessage+0x2a>
jmp    119a <ErrorDisplayMessage+0x5a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <ErrorDisplayMessage+0x16>
mov    -0x8(%rbp),%rdx
mov    $0x1,%esi
mov    %esi,%edi
call   1060 <ConsolePrint@plt>
mov    $0x0,%al
call   1050 <FBCopyDoubleBuffer@plt>
cmpl   $0x0,-0xc(%rbp)
je     11d3 <ErrorDisplayMessage+0x93>
jmp    11ce <ErrorDisplayMessage+0x8e>
jmp    11ce <ErrorDisplayMessage+0x8e>
mov    $0x9c4,%edi
call   1030 <MsDelay@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorDisplayMessage>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
xor    %ebp,%ebp
nop
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0xff0000ff,%edx
call   1040 <FBPutColor@plt>
add    $0x1,%ebx
cmp    $0x1e0,%ebx
jne    1160 <ErrorDisplayMessage+0x20>
add    $0x1,%ebp
cmp    $0xa0,%ebp
jne    1150 <ErrorDisplayMessage+0x10>
mov    $0x1,%edi
mov    $0x1,%esi
mov    %r15,%rdx
call   1060 <ConsolePrint@plt>
xor    %eax,%eax
call   1050 <FBCopyDoubleBuffer@plt>
test   %r14d,%r14d
je     11b2 <ErrorDisplayMessage+0x72>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    11b0 <ErrorDisplayMessage+0x70>
mov    $0x9c4,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <MsDelay@plt>

LLVM IR (-O0):
define void @ErrorDisplayMessage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %6
br label %7
7: ; preds = %22, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 160
br i1 %9, label %10, label %25
10: ; preds = %7
store i32 0, i32* %5
br label %11
11: ; preds = %18, %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 480
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @FBPutColor(i32 %15, i32 %16, i32 -16776961)
br label %18
18: ; preds = %14
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %11
21: ; preds = %11
br label %22
22: ; preds = %21
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %7
25: ; preds = %7
%26 = load i8*, i8** %3
%27 = call i32 @ConsolePrint(i32 1, i32 1, i8* %26)
%28 = call i32 (...) @FBCopyDoubleBuffer()
%29 = load i32, i32* %4
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %25
br label %32
32: ; preds = %32, %31
br label %32
33: ; preds = %25
%34 = call i32 @MsDelay(i32 2500)
br label %35
35: ; preds = %33
ret void
}

LLVM IR (-O2):
define void @ErrorDisplayMessage(i8* %0, i32 %1) {
br label %3
3: ; preds = %2, %10
%4 = phi i32 [ 0, %2 ], [ %11, %10 ]
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 0, %3 ], [ %8, %5 ]
%7 = tail call i32 @FBPutColor(i32 %6, i32 %4, i32 -16776961)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, 480
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = add nuw nsw i32 %4, 1
%12 = icmp eq i32 %11, 160
br i1 %12, label %13, label %3
13: ; preds = %10
%14 = tail call i32 @ConsolePrint(i32 1, i32 1, i8* %0)
%15 = tail call i32 (...) @FBCopyDoubleBuffer()
%16 = icmp eq i32 %1, 0
br i1 %16, label %18, label %17
17: ; preds = %13, %17
br label %17
18: ; preds = %13
%19 = tail call i32 @MsDelay(i32 2500)
ret void
}