#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*/ pixel_test_s1(unsigned char *, unsigned char *, int, int);
int /*<<< orphan*/ print_line();
int /*<<< orphan*/ print_square(unsigned char *);
main() {
  unsigned char src[16] = {1,  2,  3,  4,  5,  6,  7,  8,
                           -1, -2, -3, -4, -5, -6, -7, -8};
  unsigned char dst[8];
  print_square(src);
  print_line();
  print_square(src + 8);
  print_line();
  pixel_test_s1(dst, src, 1, 1);
  print_square(dst);
  print_line();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <print_square@plt>
mov    $0x0,%al
call   1040 <print_line@plt>
lea    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1050 <print_square@plt>
mov    $0x0,%al
call   1040 <print_line@plt>
lea    -0x18(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <pixel_test_s1@plt>
lea    -0x18(%rbp),%rdi
call   1050 <print_square@plt>
mov    $0x0,%al
call   1040 <print_line@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xec2(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <print_square@plt>
xor    %eax,%eax
call   1040 <print_line@plt>
lea    0x8(%rsp),%rdi
call   1050 <print_square@plt>
xor    %eax,%eax
call   1040 <print_line@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <pixel_test_s1@plt>
mov    %rbx,%rdi
call   1050 <print_square@plt>
xor    %eax,%eax
call   1040 <print_line@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.src = [16 x i8] c"\01\02\03\04\05\06\07\08\FF\FE\FD\FC\FB\FA\F9\F8"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [8 x i8]
%3 = bitcast [16 x i8]* %1 to i8*
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = call i32 @print_square(i8* %4)
%6 = call i32 (...) @print_line()
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds i8, i8* %7, i64 8
%9 = call i32 @print_square(i8* %8)
%10 = call i32 (...) @print_line()
%11 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%13 = call i32 @pixel_test_s1(i8* %11, i8* %12, i32 1, i32 1)
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%15 = call i32 @print_square(i8* %14)
%16 = call i32 (...) @print_line()
ret i32 0
}

LLVM IR (-O2):
@__const.main.src = [16 x i8] c"\01\02\03\04\05\06\07\08\FF\FE\FD\FC\FB\FA\F9\F8"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @print_square(i8* %3)
%6 = call i32 (...) @print_line()
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 8
%8 = call i32 @print_square(i8* %7)
%9 = call i32 (...) @print_line()
%10 = call i32 @pixel_test_s1(i8* %4, i8* %3, i32 1, i32 1)
%11 = call i32 @print_square(i8* %4)
%12 = call i32 (...) @print_line()
ret i32 0
}