#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*/ full_color(char *, int, int, int, int);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int full_color_test(char *fbp, int size, int fbfd, int xres, int yres) {
  printf("size = %d\n", size);
  memset(fbp, 0xff, size);
  sleep(1);
  full_color(fbp, fbfd, xres, yres, 0x000000ff);
  sleep(1);
  full_color(fbp, fbfd, xres, yres, 0x0000ff00);
  sleep(1);
  full_color(fbp, fbfd, xres, yres, 0x00ff0000);
  sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<full_color_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0xff,%esi
call   1050 <memset@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0xff,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0xff00,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0xff0000,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<full_color_test>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebx
mov    %rdi,%rbp
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0xff,%esi
mov    %ebx,%edx
call   1050 <memset@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xff,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xff00,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    $0xff0000,%r8d
call   1030 <full_color@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"size = %d\0A\00"
define i32 @full_color_test(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %7
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = call i32 @memset(i8* %13, i32 255, i32 %14)
%16 = call i32 @sleep(i32 1)
%17 = load i8*, i8** %6
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = call i32 @full_color(i8* %17, i32 %18, i32 %19, i32 %20, i32 255)
%22 = call i32 @sleep(i32 1)
%23 = load i8*, i8** %6
%24 = load i32, i32* %8
%25 = load i32, i32* %9
%26 = load i32, i32* %10
%27 = call i32 @full_color(i8* %23, i32 %24, i32 %25, i32 %26, i32 65280)
%28 = call i32 @sleep(i32 1)
%29 = load i8*, i8** %6
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = load i32, i32* %10
%33 = call i32 @full_color(i8* %29, i32 %30, i32 %31, i32 %32, i32 16711680)
%34 = call i32 @sleep(i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"size = %d\0A\00"
define i32 @full_color_test(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = tail call i32 @memset(i8* %0, i32 255, i32 %1)
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 @full_color(i8* %0, i32 %2, i32 %3, i32 %4, i32 255)
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @full_color(i8* %0, i32 %2, i32 %3, i32 %4, i32 65280)
%12 = tail call i32 @sleep(i32 1)
%13 = tail call i32 @full_color(i8* %0, i32 %2, i32 %3, i32 %4, i32 16711680)
%14 = tail call i32 @sleep(i32 1)
ret i32 0
}