#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*/ test_bmp_to_buffer_1(char *, char *, int, int, int);
int /*<<< orphan*/ test_bmp_to_buffer_800x480_16bits();
void test_bmp_to_buffer(void) {
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/bmp/1.bmp",
                       "/mnt/sdcard"
                       "/out.bmp",
                       800, 480, 24);
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/out.bmp",
                       "/mnt/sdcard"
                       "/out1.bmp",
                       800, 480, 24);
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/out.bmp",
                       "/mnt/sdcard"
                       "/out2.bmp",
                       800, 480, 16);
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/bmp/1.bmp",
                       "/mnt/sdcard"
                       "/out3.bmp",
                       800, 480, 16);
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/bmp/1.bmp",
                       "/mnt/sdcard"
                       "/out4.bmp",
                       400, 400, 16);
  test_bmp_to_buffer_1("/mnt/sdcard"
                       "/bmp/1.bmp",
                       "/mnt/sdcard"
                       "/out4.bmp",
                       900, 500, 16);
  test_bmp_to_buffer_800x480_16bits();
}


x86 assembly (clang, -O0):
<test_bmp_to_buffer>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x18,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xec8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x18,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xea5(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xe6c(%rip),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xe49(%rip),%rdi
lea    0xeab(%rip),%rsi
mov    $0x190,%ecx
mov    $0x10,%r8d
mov    %ecx,%edx
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xe29(%rip),%rdi
lea    0xe8b(%rip),%rsi
mov    $0x384,%edx
mov    $0x1f4,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
mov    $0x0,%al
call   1040 <test_bmp_to_buffer_800x480_16bits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bmp_to_buffer>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0xee4(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x18,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x18,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xecc(%rip),%rsi
mov    %rbx,%rdi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xec2(%rip),%rsi
mov    %r14,%rdi
mov    $0x320,%edx
mov    $0x1e0,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
lea    0xeb8(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x190,%edx
mov    $0x190,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x384,%edx
mov    $0x1f4,%ecx
mov    $0x10,%r8d
call   1030 <test_bmp_to_buffer_1@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_bmp_to_buffer_800x480_16bits@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"/mnt/sdcard/bmp/1.bmp\00"
@.str.1 = [20 x i8] c"/mnt/sdcard/out.bmp\00"
@.str.2 = [21 x i8] c"/mnt/sdcard/out1.bmp\00"
@.str.3 = [21 x i8] c"/mnt/sdcard/out2.bmp\00"
@.str.4 = [21 x i8] c"/mnt/sdcard/out3.bmp\00"
@.str.5 = [21 x i8] c"/mnt/sdcard/out4.bmp\00"
define void @test_bmp_to_buffer() {
%1 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 800, i32 480, i32 24)
%2 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 800, i32 480, i32 24)
%3 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 800, i32 480, i32 16)
%4 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 800, i32 480, i32 16)
%5 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 400, i32 400, i32 16)
%6 = call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 900, i32 500, i32 16)
%7 = call i32 (...) @test_bmp_to_buffer_800x480_16bits()
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"/mnt/sdcard/bmp/1.bmp\00"
@.str.1 = [20 x i8] c"/mnt/sdcard/out.bmp\00"
@.str.2 = [21 x i8] c"/mnt/sdcard/out1.bmp\00"
@.str.3 = [21 x i8] c"/mnt/sdcard/out2.bmp\00"
@.str.4 = [21 x i8] c"/mnt/sdcard/out3.bmp\00"
@.str.5 = [21 x i8] c"/mnt/sdcard/out4.bmp\00"
define void @test_bmp_to_buffer() {
%1 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 800, i32 480, i32 24)
%2 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 800, i32 480, i32 24)
%3 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 800, i32 480, i32 16)
%4 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 800, i32 480, i32 16)
%5 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 400, i32 400, i32 16)
%6 = tail call i32 @test_bmp_to_buffer_1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 900, i32 500, i32 16)
%7 = tail call i32 (...) @test_bmp_to_buffer_800x480_16bits()
ret void
}