#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*/ gen_allcolor_video();
int /*<<< orphan*/ gen_rgb24_colorbar(int, int);
int /*<<< orphan*/ gen_rgb24_rgbgradient_bar(int, int, int, int,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/, int);
int /*<<< orphan*/ gen_rgb24_stripe(int, int, int, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
int /*<<< orphan*/ gen_yuv420p_graybar(int, int, int, int, int);
int /*<<< orphan*/ gen_yuv420p_yuvgradient_bar(int, int, int,
                                               int /*<<< orphan*/,
                                               int /*<<< orphan*/,
                                               int /*<<< orphan*/, int, int,
                                               int);
int /*<<< orphan*/ rgb24_to_bmp(char *, char *, int, int);
int main(int argc, char *argv[]) {
  gen_yuv420p_graybar(1280, 720, 10, 16, 235);
  gen_rgb24_colorbar(1280, 720);
  gen_rgb24_rgbgradient_bar(1280, 720, 10, 255, 0, 0, 0, 0, 255);
  gen_yuv420p_yuvgradient_bar(1280, 720, 10, 0, 0, 0, 128, 128, 128);
  rgb24_to_bmp("colorbar_1280x720_rgb24.rgb", "colorbar_1280x720_rgb24.bmp",
               1280, 720);
  gen_rgb24_stripe(1280, 720, 255, 0, 0);
  gen_allcolor_video();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
mov    $0x10,%ecx
mov    $0xeb,%r8d
call   1060 <gen_yuv420p_graybar@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
call   1050 <gen_rgb24_colorbar@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
mov    $0xff,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0xff,0x10(%rsp)
call   1090 <gen_rgb24_rgbgradient_bar@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x80,(%rsp)
movl   $0x80,0x8(%rsp)
movl   $0x80,0x10(%rsp)
call   1070 <gen_yuv420p_yuvgradient_bar@plt>
lea    0xddb(%rip),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x500,%edx
mov    $0x2d0,%ecx
call   1040 <rgb24_to_bmp@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xff,%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <gen_rgb24_stripe@plt>
mov    $0x0,%al
call   1080 <gen_allcolor_video@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
mov    $0x10,%ecx
mov    $0xeb,%r8d
call   1060 <gen_yuv420p_graybar@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
call   1050 <gen_rgb24_colorbar@plt>
sub    $0x8,%rsp
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
mov    $0xff,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0xff
push   $0x0
push   $0x0
call   1090 <gen_rgb24_rgbgradient_bar@plt>
add    $0x18,%rsp
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xa,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x80
push   $0x80
push   $0x80
call   1070 <gen_yuv420p_yuvgradient_bar@plt>
add    $0x20,%rsp
lea    0xdfb(%rip),%rdi
lea    0xe10(%rip),%rsi
mov    $0x500,%edx
mov    $0x2d0,%ecx
call   1040 <rgb24_to_bmp@plt>
mov    $0x500,%edi
mov    $0x2d0,%esi
mov    $0xff,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <gen_rgb24_stripe@plt>
xor    %eax,%eax
call   1080 <gen_allcolor_video@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"colorbar_1280x720_rgb24.rgb\00"
@.str.1 = [28 x i8] c"colorbar_1280x720_rgb24.bmp\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @gen_yuv420p_graybar(i32 1280, i32 720, i32 10, i32 16, i32 235)
%7 = call i32 @gen_rgb24_colorbar(i32 1280, i32 720)
%8 = call i32 @gen_rgb24_rgbgradient_bar(i32 1280, i32 720, i32 10, i32 255, i32 0, i32 0, i32 0, i32 0, i32 255)
%9 = call i32 @gen_yuv420p_yuvgradient_bar(i32 1280, i32 720, i32 10, i32 0, i32 0, i32 0, i32 128, i32 128, i32 128)
%10 = call i32 @rgb24_to_bmp(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 1280, i32 720)
%11 = call i32 @gen_rgb24_stripe(i32 1280, i32 720, i32 255, i32 0, i32 0)
%12 = call i32 (...) @gen_allcolor_video()
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"colorbar_1280x720_rgb24.rgb\00"
@.str.1 = [28 x i8] c"colorbar_1280x720_rgb24.bmp\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @gen_yuv420p_graybar(i32 1280, i32 720, i32 10, i32 16, i32 235)
%4 = tail call i32 @gen_rgb24_colorbar(i32 1280, i32 720)
%5 = tail call i32 @gen_rgb24_rgbgradient_bar(i32 1280, i32 720, i32 10, i32 255, i32 0, i32 0, i32 0, i32 0, i32 255)
%6 = tail call i32 @gen_yuv420p_yuvgradient_bar(i32 1280, i32 720, i32 10, i32 0, i32 0, i32 0, i32 128, i32 128, i32 128)
%7 = tail call i32 @rgb24_to_bmp(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 1280, i32 720)
%8 = tail call i32 @gen_rgb24_stripe(i32 1280, i32 720, i32 255, i32 0, i32 0)
%9 = tail call i32 (...) @gen_allcolor_video()
ret i32 0
}