#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*/ vfdlib_drawPointClipped(char *, int, int, char);
void drawPixel4WaySymmetricClipped(char *buffer, int cX, int cY, int x, int y,
                                   char shade) {
  vfdlib_drawPointClipped(buffer, cX + x, cY + y, shade);
  vfdlib_drawPointClipped(buffer, cX + x, cY - y, shade);
  vfdlib_drawPointClipped(buffer, cX - x, cY + y, shade);
  vfdlib_drawPointClipped(buffer, cX - x, cY - y, shade);
}


x86 assembly (clang, -O0):
<drawPixel4WaySymmetricClipped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r9b,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
add    -0x18(%rbp),%edx
movsbl -0x19(%rbp),%ecx
call   1030 <vfdlib_drawPointClipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
sub    -0x18(%rbp),%edx
movsbl -0x19(%rbp),%ecx
call   1030 <vfdlib_drawPointClipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
add    -0x18(%rbp),%edx
movsbl -0x19(%rbp),%ecx
call   1030 <vfdlib_drawPointClipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
sub    -0x18(%rbp),%edx
movsbl -0x19(%rbp),%ecx
call   1030 <vfdlib_drawPointClipped@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawPixel4WaySymmetricClipped>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %r8d,%r12d
mov    %rcx,0x10(%rsp)
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r15
lea    (%rcx,%rbp,1),%r13d
lea    (%r12,%rbx,1),%edx
mov    %edx,0xc(%rsp)
mov    %r13d,%esi
mov    %r9d,%ecx
call   1030 <vfdlib_drawPointClipped@plt>
sub    %r12d,%ebx
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <vfdlib_drawPointClipped@plt>
sub    0x10(%rsp),%ebp
mov    %r15,%rdi
mov    %ebp,%esi
mov    0xc(%rsp),%edx
mov    %r14d,%ecx
call   1030 <vfdlib_drawPointClipped@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <vfdlib_drawPointClipped@plt>

LLVM IR (-O0):
define void @drawPixel4WaySymmetricClipped(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8 %5, i8* %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %10
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %9
%18 = load i32, i32* %11
%19 = add nsw i32 %17, %18
%20 = load i8, i8* %12
%21 = call i32 @vfdlib_drawPointClipped(i8* %13, i32 %16, i32 %19, i8 signext %20)
%22 = load i8*, i8** %7
%23 = load i32, i32* %8
%24 = load i32, i32* %10
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %9
%27 = load i32, i32* %11
%28 = sub nsw i32 %26, %27
%29 = load i8, i8* %12
%30 = call i32 @vfdlib_drawPointClipped(i8* %22, i32 %25, i32 %28, i8 signext %29)
%31 = load i8*, i8** %7
%32 = load i32, i32* %8
%33 = load i32, i32* %10
%34 = sub nsw i32 %32, %33
%35 = load i32, i32* %9
%36 = load i32, i32* %11
%37 = add nsw i32 %35, %36
%38 = load i8, i8* %12
%39 = call i32 @vfdlib_drawPointClipped(i8* %31, i32 %34, i32 %37, i8 signext %38)
%40 = load i8*, i8** %7
%41 = load i32, i32* %8
%42 = load i32, i32* %10
%43 = sub nsw i32 %41, %42
%44 = load i32, i32* %9
%45 = load i32, i32* %11
%46 = sub nsw i32 %44, %45
%47 = load i8, i8* %12
%48 = call i32 @vfdlib_drawPointClipped(i8* %40, i32 %43, i32 %46, i8 signext %47)
ret void
}

LLVM IR (-O2):
define void @drawPixel4WaySymmetricClipped(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5) {
%7 = add nsw i32 %3, %1
%8 = add nsw i32 %4, %2
%9 = tail call i32 @vfdlib_drawPointClipped(i8* %0, i32 %7, i32 %8, i8 signext %5)
%10 = sub nsw i32 %2, %4
%11 = tail call i32 @vfdlib_drawPointClipped(i8* %0, i32 %7, i32 %10, i8 signext %5)
%12 = sub nsw i32 %1, %3
%13 = tail call i32 @vfdlib_drawPointClipped(i8* %0, i32 %12, i32 %8, i8 signext %5)
%14 = tail call i32 @vfdlib_drawPointClipped(i8* %0, i32 %12, i32 %10, i8 signext %5)
ret void
}