#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*/ assert(int);
int get_blue(int);
int get_green(int);
int get_red(int);
int make_pixel(int, int, int);
int main(void) {
  assert(sizeof(unsigned int) == 4);
  assert(make_pixel(0, 0, 0) == 0x1000000);
  assert(make_pixel(0, 64, 64) == 0x1004040);
  assert(make_pixel(128, 0, 0) == 0x1800000);
  assert(make_pixel(0xba, 0xda, 0x55) == 0x1BADA55);
  assert(get_red(make_pixel(0, 0, 0)) == 0);
  assert(get_blue(make_pixel(255, 255, 0)) == 0);
  assert(get_green(make_pixel(1, 0, 1)) == 0);
  assert(get_red(make_pixel(34, 56, 78)) == 34);
  assert(get_green(make_pixel(34, 198, 0)) == 198);
  assert(get_blue(make_pixel(34, 172, 235)) == 235);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1060 <make_pixel@plt>
cmp    $0x1000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %edi,%edi
mov    $0x40,%edx
mov    %edx,%esi
call   1060 <make_pixel@plt>
cmp    $0x1004040,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x80,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <make_pixel@plt>
cmp    $0x1800000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xba,%edi
mov    $0xda,%esi
mov    $0x55,%edx
call   1060 <make_pixel@plt>
cmp    $0x1bada55,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1040 <get_red@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xff,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1050 <get_blue@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%edx
xor    %esi,%esi
mov    %edx,%edi
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1070 <get_green@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0x38,%esi
mov    $0x4e,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1040 <get_red@plt>
cmp    $0x22,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0xc6,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1070 <get_green@plt>
cmp    $0xc6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0xac,%esi
mov    $0xeb,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1050 <get_blue@plt>
cmp    $0xeb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
xor    %edi,%edi
cmp    $0x1000000,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
mov    $0x40,%esi
mov    $0x40,%edx
call   1060 <make_pixel@plt>
xor    %edi,%edi
cmp    $0x1004040,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x80,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
xor    %edi,%edi
cmp    $0x1800000,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xba,%edi
mov    $0xda,%esi
mov    $0x55,%edx
call   1060 <make_pixel@plt>
xor    %edi,%edi
cmp    $0x1bada55,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1040 <get_red@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xff,%edi
mov    $0xff,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1050 <get_blue@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1070 <get_green@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0x38,%esi
mov    $0x4e,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1040 <get_red@plt>
xor    %edi,%edi
cmp    $0x22,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0xc6,%esi
xor    %edx,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1070 <get_green@plt>
xor    %edi,%edi
cmp    $0xc6,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x22,%edi
mov    $0xac,%esi
mov    $0xeb,%edx
call   1060 <make_pixel@plt>
mov    %eax,%edi
call   1050 <get_blue@plt>
xor    %edi,%edi
cmp    $0xeb,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @assert(i32 1)
%3 = call i32 @make_pixel(i32 0, i32 0, i32 0)
%4 = icmp eq i32 %3, 16777216
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 @make_pixel(i32 0, i32 64, i32 64)
%8 = icmp eq i32 %7, 16793664
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @make_pixel(i32 128, i32 0, i32 0)
%12 = icmp eq i32 %11, 25165824
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @make_pixel(i32 186, i32 218, i32 85)
%16 = icmp eq i32 %15, 29022805
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @make_pixel(i32 0, i32 0, i32 0)
%20 = call i32 @get_red(i32 %19)
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = call i32 @make_pixel(i32 255, i32 255, i32 0)
%25 = call i32 @get_blue(i32 %24)
%26 = icmp eq i32 %25, 0
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @make_pixel(i32 1, i32 0, i32 1)
%30 = call i32 @get_green(i32 %29)
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = call i32 @make_pixel(i32 34, i32 56, i32 78)
%35 = call i32 @get_red(i32 %34)
%36 = icmp eq i32 %35, 34
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = call i32 @make_pixel(i32 34, i32 198, i32 0)
%40 = call i32 @get_green(i32 %39)
%41 = icmp eq i32 %40, 198
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = call i32 @make_pixel(i32 34, i32 172, i32 235)
%45 = call i32 @get_blue(i32 %44)
%46 = icmp eq i32 %45, 235
%47 = zext i1 %46 to i32
%48 = call i32 @assert(i32 %47)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @make_pixel(i32 0, i32 0, i32 0)
%3 = icmp eq i32 %2, 16777216
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @make_pixel(i32 0, i32 64, i32 64)
%7 = icmp eq i32 %6, 16793664
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @make_pixel(i32 128, i32 0, i32 0)
%11 = icmp eq i32 %10, 25165824
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 @make_pixel(i32 186, i32 218, i32 85)
%15 = icmp eq i32 %14, 29022805
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = tail call i32 @make_pixel(i32 0, i32 0, i32 0)
%19 = tail call i32 @get_red(i32 %18)
%20 = icmp eq i32 %19, 0
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i32 @make_pixel(i32 255, i32 255, i32 0)
%24 = tail call i32 @get_blue(i32 %23)
%25 = icmp eq i32 %24, 0
%26 = zext i1 %25 to i32
%27 = tail call i32 @assert(i32 %26)
%28 = tail call i32 @make_pixel(i32 1, i32 0, i32 1)
%29 = tail call i32 @get_green(i32 %28)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
%33 = tail call i32 @make_pixel(i32 34, i32 56, i32 78)
%34 = tail call i32 @get_red(i32 %33)
%35 = icmp eq i32 %34, 34
%36 = zext i1 %35 to i32
%37 = tail call i32 @assert(i32 %36)
%38 = tail call i32 @make_pixel(i32 34, i32 198, i32 0)
%39 = tail call i32 @get_green(i32 %38)
%40 = icmp eq i32 %39, 198
%41 = zext i1 %40 to i32
%42 = tail call i32 @assert(i32 %41)
%43 = tail call i32 @make_pixel(i32 34, i32 172, i32 235)
%44 = tail call i32 @get_blue(i32 %43)
%45 = icmp eq i32 %44, 235
%46 = zext i1 %45 to i32
%47 = tail call i32 @assert(i32 %46)
ret i32 0
}